List

Try: ca/tecreations/ViewFile.php -- Online


<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/tec_SiteRoot.php";

global $site_db;

global $ip, $hostname, $country, $region, $municipality,$other_authorities, $detected_timezone, $applied_timezone, $current_timezone;
global $lat, $lon, $gps_antenna, $gps_term, $gps_client, $gps_host, $machine_code, $planet, $phone, $email, $host, $postal_mail;
global $btc, $eth, $e_transfer;
global $submit;

$ip = $_SERVER['REMOTE_ADDR'];

if (isset($_REQUEST['hostname'])) $hostname = $_REQUEST['hostname'];
if (isset($_REQUEST['country'])) $country = $_REQUEST['country'];
if (isset($_REQUEST['region'])) $region = $_REQUEST['region'];
if (isset($_REQUEST['municipality'])) $municipality = $_REQUEST['municipality'];
if (isset($_REQUEST['other_authorities'])) $other_authorities = $_REQUEST['other_authorities'];
if (isset($_REQUEST['detected_timezone'])) $detected_timezone = $_REQUEST['detected_timezone'];
if (isset($_REQUEST['applied_timezone'])) $applied_timezone = $_REQUEST['applied_timezone'];
if (isset($_REQUEST['current_timezone'])) $current_timezone = $_REQUEST['current_timezone'];
if (isset($_REQUEST['lat'])) $lat = $_REQUEST['lat'];
if (isset($_REQUEST['lon'])) $long= $_REQUEST['lon'];
if (isset($_REQUEST['gps_antenna'])) $gps_antenna = $_REQUEST['gps_antenna'];
if (isset($_REQUEST['gps_terminator'])) $gps_terminator = $_REQUEST['gps_terminator'];
if (isset($_REQUEST['gps_client'])) $gps_client = $_REQUEST['gps_client'];
if (isset($_REQUEST['gps_host'])) $gps_host = $_REQUEST['gps_host'];
if (isset($_REQUEST['machine_code'])) $machine_code = $_REQUEST['machine_code'];
if (isset($_REQUEST['planet'])) $planet = $_REQUEST['planet'];
if (isset($_REQUEST['phone'])) $phone = $_REQUEST['phone'];
if (isset($_REQUEST['email'])) $email = $_REQUEST['email'];
if (isset($_REQUEST['host'])) $host = $_REQUEST['host'];
if (isset($_REQUEST['postal_mail'])) $postal_mail = $_REQUEST['postal_mail'];
if (isset($_REQUEST['btc'])) $btc = $_REQUEST['btc'];
if (isset($_REQUEST['eth'])) $eth = $_REQUEST['eth'];
if (isset($_REQUEST['e_transfer'])) $e_transfer = $_REQUEST['e_transfer'];

$site_db->setDebug(false);


if (isset($_REQUEST['submit']) && $_REQUEST['submit'] == "Save") {
     $delete = "DELETE FROM locations WHERE ip='$ip'";
     $insert = "INSERT INTO locations (ip,hostname,country,region,municipality,other_authorities,detected_timezone" .
              ",applied_timezone,current_timezone,lat,lon,gps_antenna,gps_terminator,gps_client,gps_host,machine_code" .
              ",planet,phone,email,host,postal_mail,btc,eth,e_transfer) VALUES(" .
              "'$ip','$hostname','$country','$region','$municipality','$other_authorities','$detected_timezone'," .
              "'$applied_timezone','$current_timezone','$lat','$lon','$gps_antenna','$gps_terminator','$gps_client','$gps_host','$machine_code'," .
              "'$planet','$phone','$email','$host','$postal_mail','$btc','$eth','$e_transfer')";
     $site_db->issue($delete);
     $site_db->issue($insert);
} else {
    $sql = "SELECT * FROM locations WHERE ip='$ip' LIMIT 1";
    $rows = $site_db->select($sql);
    $row = $rows['rows'];
    $hostname = $row['hostname'];
    $region = $row['region'];
    $municipality= $row['municipality'];
    $other_authorities= $row['other_authorities'];
    $detected_timezone= $row['detected_timezone'];
    $applied_timezone= $row['applied_timezone'];
    $current_timezone= $row['current_timezone'];
    $lat= $row['lat'];
    $lon= $row['lon'];
    $gps_antenna= $row['gps_antenna'];
    $gps_terminator= $row['gps_terminator'];
    $gps_client= $row['gps_client'];
    $gps_host= $row['gps_host'];
    $machine_code= $row['machine_code'];
    $planet= $row['planet'];
    $phone= $row['phone'];
    $email= $row['email'];
    $host= $row['host'];
    $postal_mail= $row['postal_mail'];
    $btc = $row['btc'];
    $eth = $row['eth'];
    $e_transfer = $row['e_transfer'];
}
?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>?" method="GET" action="<?php echo $_SERVER['PHP_SELF']; ?>?">
    IP: <input name="ip" type="text" maxlength="15" value="<?php global $ip; echo $ip; ?>" placeholder="null" /><br />
    Hostname: <input name="hostname" type="text" maxlength="255" value="<?php global $hostname; echo $hostname; ?>" placeholder="Hostname" /><br />
    Country: <input name="country" type="text" maxlength="255" value="<?php global $country; echo $country; ?>" placeholder="Country" /><br />
    Region: <input name="region" type="text" maxlength="255" value="<?php global $region; echo $region; ?>" placeholder="Region" /><br />
    Municipality: <input name="municipality" type="text" maxlength="255" value="<?php global $municipality; echo $municipality; ?>" placeholder="Municipality" /><br />
    Other Authorities: <input name="other_authorities" maxlength="255" value="<?php global $other_authorities; echo $other_authorities; ?>" placeholder="Other Authorities" /><br />
    Detected Timezone: <input name="detected_timezone" type="text" maxlength="255" value="<?php global $detected_timezone; echo $detected_timezone; ?>" placeholder="Detected Timezone" /><br />
    Applied  Timezone: <input name="applied_timezone" type="text" maxlength="255" value="<?php global $applied_timezone; echo $applied_timezone; ?>" placeholder="Applied Timezone" /><br />
    Current  Timezone: <input name="current_timezone" type="text" maxlength="255" value="<?php global $current_timezone; echo $current_timezone; ?>" placeholder="Current Timezone" /> : Client<br />
    Lat: <input name="lat" type="text" maxlength="255" value="<?php global $lat; echo $lat; ?>" placeholder="empty" /><br />
    Long: <input name="lon" type="text" maxlength="255" value="<?php global $lon; echo $lon; ?>" placeholder="empty" /><br />
    GPS_Antenna: <input name="gps_antenna" type="text" maxlength="255" value="<?php global $gps_antenna; echo $gps_antenna; ?>" placeholder="empty" /><br />
    GPS_Terminator: <input name="gps_terminator" type="text" maxlength="255" value="<?php global $gps_terminator; echo $gps_terminator; ?>" placeholder="empty" /><br />
    GPS_Client: <input name="gps_client" type="text" maxlength="255" value="<?php global $gps_client; echo $gps_client; ?>" placeholder="empty" /><br />
    GPS_Host: <input name="gps_host" type="text" maxlength="255" value="<?php global $gps_host; echo $gps_host; ?>" placeholder="empty" /><br />
    Machine Code: <input name="machine_code" type="text" maxlength="255" value="<?php global $machine_code; echo $machine_code; ?>" placeholder="empty" /><br />
    Planet: <input name="planet" type="text" maxLength=255 value="<?php global $planet; echo $planet; ?>" placeholder="Earth" /><br />
    <br />


    Phone: <input name="phone" value="<?php global $phone; echo $phone; ?>" /><br />
    Email: <input name="email" placeholder="Not mine, please." value="<?php global $email; echo $email; ?>" /><br />
    Host : <input name="host" value="tecreations.ca" value="<?php global $host; echo $host; ?>"><br />
    Mail : <input name="postal_mail" value="Box 111, Heisler, AB, CANADA, T0B 2A0" value="<?php global $postal_mail; echo $postal_mail; ?>"><br />
    <br />
    Bitcoin?  : <input name="btc" placeholder="BTC Address" value="<?php global $btc; echo $btc; ?>"><br />
    Ethereum? : <input name="eth" placeholder="ETH Address" value="<?php global $eth; echo $eth; ?>"><br />
    E-Transfer: <input name="e_transfer" placeholder="Deposit Method Data" value="<?php global $e_transfer; echo $e_transfer; ?>"><br />
    <br />
    <input type="submit" name="submit" value="Save" />
</form>