Exemple #1
0
        golink("plugins.php?d=iplugin");
        exit;
        break;
    case "delpl":
        mysql_query("DELETE FROM cyn_plugins WHERE id = '" . $_GET["id"] . "'");
        mysql_query("DELETE FROM cyn_plugins_settings WHERE plugin = '" . $_GET["id"] . "'");
        mysql_query("DELETE FROM cyn_replacions WHERE plugin = '" . $_GET["id"] . "'");
        error_reporting(E_ALL);
        $dir = '../_plugins/' . $_GET["id"] . "/";
        $files = glob($dir . '/*.*');
        if (!empty($files)) {
            foreach ($files as $file) {
                unlink($file);
            }
        }
        rmdir($dir);
        golink("plugins.php?d=delpl");
        break;
    case "ndelete":
        mysql_query("DELETE FROM cyn_alerts WHERE id = '" . $_GET["id"] . "'");
        break;
    case "preview":
        $handle = fopen("_data/_interface/preview.ini", "w");
        $array = array();
        $array["content"] = $_POST["content"];
        $array["pagen"] = $_POST["pagen"];
        $json = json_encode($array);
        fwrite($handle, $json);
        fclose($handle);
        break;
}
Exemple #2
0
<?php

include "_data/_prefs/prefs.ini.php";
error_reporting(0);
session_start();
include "_data/_interface/queries.php";
if ($_GET["login"] == 1) {
    $_SESSION["user"] = $_POST["user"];
    $_SESSION["pass"] = sha1($_POST["pass"]);
    header("Location: center.php");
} else {
    if (!$_GET["error"]) {
        if ($_SESSION["user"] != false && $_SESSION["user"] != null && $_SESSION["user"] != "") {
            golink("center.php");
        }
    }
}
?>
<!doctype html>
<html>
<head>
   <meta charset='utf-8'>
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
   <script src="_data/_js/jquery.min.js" type="text/javascript"></script>
   <script type="text/javasript" src="_data/_js/bootstrap.min.js"></script>
   <script type="text/javascript" src="_data/_js/metisMenu.js"></script>
   <script src="_data/_js/base.js" type="text/javascript"></script>
   <link rel="stylesheet" href="_data/_css/base.css" type="text/css">
   <link rel="stylesheet" href="_data/_css/bootstrap.min.css" type="text/css">
   <link rel="stylesheet" href="_data/_css/font-awesome.min.css" type="text/css">
Exemple #3
0
<?php

error_reporting(0);
session_start();
include "_data/_interface/queries.php";
$foo = session_destroy();
if ($foo == false) {
    $_SESSION["user"] = "";
    $_SESSION["pass"] = "";
}
golink("index.php?logout=1");
Exemple #4
0
<?php

$user = $_SESSION["user"];
$pass = $_SESSION["pass"];
if ($user == false || $user == null || $user == "") {
    $error = true;
}
if ($pass == false || $pass == null || $pass == "") {
    $error = true;
}
$res = mysql_query("SELECT `pass` FROM `cyn_users` WHERE `user` = '" . mysql_real_escape_string($user) . "'");
$rpass = mysql_result($res, 0);
if ($res == false || $error == true) {
    golink("index.php?error=user");
    exit;
} else {
    if ($rpass != $pass) {
        golink("index.php?error=pass");
        exit;
    } else {
        if ($rpass == $pass) {
            $allok = true;
        }
    }
}