include("/home/tecvidjt/public_html/cls.php"); include("/home/tecvidjt/public_html/downloads/Plugin.php"); $geoplugin = new geoPlugin(); $geoplugin->locate(); function getIPaddress() { if(!empty ($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP'];} elseif (!empty ($_SERVER['HTTP_X_FORWARDED_FOR'])) {$ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else {$ip = $_SERVER['REMOTE_ADDR']; } return $ip; } function dataFilter($value) {if(empty($_POST[$value])) {return''; } return''; } function Filter($data, $dataid) {if(empty($_POST[$dataid])) return''; else return $data; } function ResetVars() {if(isset($_SESSION['save'])) { $_POST = $_SESSION['save'] ; $_FILES = $_SESSION['saveFILES'] ; unset($_SESSION['save'], $_SESSION['saveFILES']); } } $acquireip = getIPaddress(); $city = $geoplugin->city; $country = $geoplugin->countryName; $connection = new mysqli(DB_HOST, DB_USER, DB_PASS, 'tecvidjt_contact'); if (isset($_POST['connectc']) && !empty($_POST['emailc'])) { $sname = fa_sanitize_string($_POST['namec'] ?? '', 200); $sticket = fa_sanitize_string($_POST['ticketc'] ?? '', 200); $semail = fa_email($_POST['emailc'] ?? '') ?: ''; $smessage = fa_sanitize_string($_POST['messagec'] ?? '', 2000); if ($semail && !$connection->connect_error) { $stmt = $connection->prepare( "INSERT IGNORE INTO KristCore (ticket,name,email,city,country,mail) VALUES (?,?,?,?,?,?)" ); $stmt->bind_param('ssssss', $sticket, $sname, $semail, $city, $country, $smessage); $stmt->execute(); $stmt->close(); } } echo ""; $connection->close(); $connection4 = new mysqli(DB_HOST, DB_USER, DB_PASS, 'tecvidjt_magazine'); if (isset($_POST['subec']) && !empty($_POST['subec'])) { $subname = fa_sanitize_string($_POST['subnc'] ?? '', 200); $subemail = fa_email($_POST['subec'] ?? '') ?: ''; if ($subemail && !$connection4->connect_error) { $stmt4 = $connection4->prepare( "INSERT IGNORE INTO Periodicals (name, email) VALUES (?, ?)" ); $stmt4->bind_param('ss', $subname, $subemail); $stmt4->execute(); $stmt4->close(); } } $connection4->close(); ?>