* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License in GPL.txt for more details. */ session_start(); if (isset($_SESSION['login'])) { // Do nothing } else { header("Location: ."); exit(); } if (isset($_GET['logout'])) { if (isset($_SESSION['login'])) unset($_SESSION['login']); session_destroy(); header("Location: ."); exit(); } $date = date('jS F Y'); $ip = $_SERVER['REMOTE_ADDR']; require_once('../config.php'); $con = mysqli_connect($dbhost, $dbuser, $dbpassword, $dbname); if (mysqli_connect_errno()) { $sql_error = mysqli_connect_error(); die("Unable connect to database"); } $query = "SELECT @last_id := MAX(id) FROM admin_history"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { $last_id = $row['@last_id := MAX(id)']; } $query = "SELECT * FROM admin_history WHERE id=" . Trim($last_id); $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { $last_date = $row['last_date']; $last_ip = $row['ip']; } if ($last_ip == $ip) { if ($last_date == $date) { } else { $query = "INSERT INTO admin_history (last_date,ip) VALUES ('$date','$ip')"; mysqli_query($con, $query); } } else { $query = "INSERT INTO admin_history (last_date,ip) VALUES ('$date','$ip')"; mysqli_query($con, $query); } $query = "SELECT * FROM site_info"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { $title = Trim($row['title']); $des = Trim($row['des']); $baseurl = Trim($row['baseurl']); $keyword = Trim($row['keyword']); $site_name = Trim($row['site_name']); $email = Trim($row['email']); $twit = Trim($row['twit']); $face = Trim($row['face']); $gplus = Trim($row['gplus']); $ga = Trim($row['ga']); $additional_scripts = Trim($row['additional_scripts']); } $query = "SELECT * FROM captcha WHERE id='1'"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { $cap_e = $row['cap_e']; $mode = $row['mode']; $mul = $row['mul']; $allowed = $row['allowed']; $color = $row['color']; $recaptcha_sitekey = $row['recaptcha_sitekey']; $recaptcha_secretkey = $row['recaptcha_secretkey']; } $query = "SELECT * FROM site_permissions WHERE id='1'"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { $disableguest = Trim($row['disableguest']); $siteprivate = Trim($row['siteprivate']); } $query = "SELECT * FROM mail WHERE id='1'"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { $verification = Trim($row['verification']); $smtp_host = Trim($row['smtp_host']); $smtp_username = Trim($row['smtp_username']); $smtp_password = Trim($row['smtp_password']); $smtp_port = Trim($row['smtp_port']); $protocol = Trim($row['protocol']); $auth = Trim($row['auth']); $socket = Trim($row['socket']); } ?> Paste - Configuration
' . mysqli_error($con) . '
'; } else { $msg = '
Configuration saved
'; } } if (isset($_POST['cap'])) { $cap_e = Trim($_POST['cap_e']); $mode = Trim($_POST['mode']); $mul = Trim($_POST['mul']); $allowed = Trim($_POST['allowed']); $color = Trim($_POST['color']); $recaptcha_sitekey = Trim($_POST['recaptcha_sitekey']); $recaptcha_secretkey = Trim($_POST['recaptcha_secretkey']); $query = "UPDATE captcha SET cap_e='$cap_e', mode='$mode', mul='$mul', allowed='$allowed', color='$color', recaptcha_sitekey='$recaptcha_sitekey', recaptcha_secretkey='$recaptcha_secretkey' WHERE id='1'"; mysqli_query($con, $query); if (mysqli_errno($con)) { $msg = '
' . mysqli_error($con) . '
'; } else { $msg = '
Captcha settings saved
'; } } if (isset($_POST['permissions'])) { $disableguest = Trim($_POST['disableguest']); $siteprivate = Trim($_POST['siteprivate']); $query = "UPDATE site_permissions SET disableguest='$disableguest', siteprivate='$siteprivate' WHERE id='1'"; mysqli_query($con, $query); if (mysqli_errno($con)) { $msg = '
' . mysqli_error($con) . '
'; } else { $msg = '
Site permissions saved.
'; } } } if (isset($_POST['smtp_code'])) { $verification = Trim($_POST['verification']); $smtp_host = Trim($_POST['smtp_host']); $smtp_port = Trim($_POST['smtp_port']); $smtp_username = Trim($_POST['smtp_user']); $smtp_password = Trim($_POST['smtp_pass']); $socket = Trim($_POST['socket']); $auth = Trim($_POST['auth']); $protocol = Trim($_POST['protocol']); $query = "UPDATE mail SET verification='$verification', smtp_host='$smtp_host', smtp_port='$smtp_port', smtp_username='$smtp_username', smtp_password='$smtp_password', socket='$socket', protocol='$protocol', auth='$auth' WHERE id='1'"; mysqli_query($con, $query); if (mysqli_errno($con)) { $msg = '
' . mysqli_error($con) . '
'; } else { $msg = '
Mail settings updated
'; } } if (isset($msg)) echo $msg; ?>
type="checkbox" name="disableguest" id="disableguest">
type="checkbox" name="siteprivate" id="siteprivate">

type="checkbox" name="cap_e" id="cap_e">


Internal Captcha Settings:
type="checkbox" name="mul" id="mul">


reCAPTCHA Settings:
Registration Settings
Mail Settings