HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/matomo.circ/plugins/IP2Location/templates/config.twig
{% extends 'admin.twig' %}

{% set title %}{{'IP2Location_IP2Location'|translate}}{% endset %}

{% block content %}
{% import 'macros.twig' as piwik %}
{% if isSuperUser %}

	<h1>{{'IP2Location_IP2LocationSettings'|translate}}</h1>

	{% if saved %}
	<div class="alert alert-success">
		{{'IP2Location_ChangesHasBeenSaved'|translate}}
	</div>
	{% endif %}

	{% for i, error in errors %}
	<div class="alert alert-danger">
		{{ error }}
	</div>
	{% endfor %}

	<form method="POST" action="{{ linkTo({'module':'IP2Location','action':'saveConfig'}) }}" class="col s6">

		<h2 class="card-title">{{'IP2Location_LookupMode'|translate}}</h2>

		<div class="form-group row">
			<div class="col s12">
				<p>
					<label for="lookupMode_BIN">
						<input type="radio" value="BIN" id="lookupMode_BIN" name="lookupMode" {% if lookupMode == 'BIN' %} checked="checked"{% endif %}>

						<span>{{ 'IP2Location_LocalBINDatabase'|translate }}</span>
					</label>

					<div style="margin-left:40px;">
						<div class="form-group">
							<div class="input-field">
								<input type="text" value="{{databasePath}}" id="databasePath" name="databasePath" />
								<label for="databasePath">{{'IP2Location_DatabasePath'|translate}}</label>
								<span class="form-description">Absolute path to BIN file. Example: <em>{{examplePath}}</em></span>
							</div>
						</div>
						{% if size != 0 %}
						<h5 class="card-title">{{'IP2Location_DatabaseInformation'|translate}}</h5>

						<div class="form-group">
							<div class="input-field">
								<input type="text" value="{{database}}" id="databaseFile" disabled>
								<label for="databaseFile">{{'IP2Location_IP2LocationDatabaseFile'|translate}}</label>
							</div>
						</div>
						<div class="form-group">
							<div class="input-field">
								<input type="text" value="{{date}}" id="databaseDate" disabled>
								<label for="databaseDate">{{'IP2Location_DatabaseDate'|translate}}</label>
							</div>
						</div>
						<div class="form-group">
							<div class="input-field">
								<input type="text" value="{{size}}" id="databaseSize" disabled>
								<label for="databaseSize">{{'IP2Location_DatabaseSize'|translate}}</label>

								<small class="form-text text-muted">
									{{'IP2Location_AutomatedUpdate'|translate}}
									<a href="{{'IP2Location_AutomatedUpdateURL'|translate}}" target="_blank">{{'IP2Location_LearnMore'|translate}}</a>
								</small>
							</div>
						</div>

						{% else %}
						<ul>
							<li><a href="https://lite.ip2location.com" target="_blank">{{ 'IP2Location_DownloadLITEDatabase'|translate }}</a></li>
							<li><a href="https://www.ip2location.com" target="_blank">{{ 'IP2Location_DownloadCommercialDatabase'|translate }}</a></li>
						</ul>
						{% endif %}
					</div>
				</p>
				<p>
					<label for="lookupMode_IO">
						<input type="radio" value="IO" id="lookupMode_IO" name="lookupMode" {% if lookupMode == 'IO' %} checked="checked"{% endif %}>
						<span>{{ 'IP2Location_WebServiceIO'|translate }}</span>
						<span class="form-description"><a href="https://www.ip2location.io/" target="_blank">{{ 'IP2Location_WebServiceIODescription'|translate }}</a></span>
					</label>

					<div style="margin-left:40px;">
						<div class="form-group">
							<div class="input-field">
								<input type="text" value="{{ioApiKey}}" id="ioApiKey" name="ioApiKey" />
								<label for="ioApiKey">{{'IP2Location_IOAPIKey'|translate}}</label>
								<span class="form-description">{{ 'IP2Location_PleaseGetYourAPIKeyFrom'|translate }} <a href="https://www.ip2location.io/" target="_blank">https://www.ip2location.io/</a></span>
							</div>
						</div>
					</div>
				</p>
			</div>
		</div>

		<div class="form-group row">
			<button class="waves-effect waves-light btn">{{'IP2Location_SaveChanges'|translate}}</button>
		</div>

		<input type="hidden" name="submit" value="true" />
	</form>
{% endif %}

{% endblock %}