Exemplo n.º 1
0
<?php

$test = $_SERVER['REQUEST_URI'];
if (strstr($test, ".php")) {
    header("HTTP/1.1 404 Not Found");
    include "404.php";
    exit;
}
include 'functions.php';
if (isset($_POST['submit'])) {
    if ($_POST['submit'] == $lng['delete']) {
        if ($_POST['cong_confirmed'] != "") {
            $cong_confirmed = urldecode($_POST['cong_confirmed']);
            //sanitize
            $deleting = cong_del($cong_confirmed, "del");
            if ($deleting == 'ok') {
                echo '<div id="ok_msg">' . $lng['op_ok'] . '...</div>';
                $info = time() . '**info**local cong del successful**' . $cong_confirmed . "**\n";
                $file = fopen('./db/logs-' . date("Y", time()) . '-' . date("m", time()), 'a');
                if (fputs($file, $info)) {
                    fclose($file);
                }
            } else {
                echo $deleting;
                $info = time() . '**error**local cong del fail**' . $cong_confirmed . "**\n";
                $file = fopen('./db/logs-' . date("Y", time()) . '-' . date("m", time()), 'a');
                if (fputs($file, $info)) {
                    fclose($file);
                }
            }
        } else {
Exemplo n.º 2
0
<?php

$test = $_SERVER['REQUEST_URI'];
if (strstr($test, ".php")) {
    header("HTTP/1.1 404 Not Found");
    include "404.php";
    exit;
}
include 'functions.php';
if (isset($_POST['submit'])) {
    if ($_POST['submit'] == $lng['save']) {
        if ($_POST['cong_confirmed'] != "") {
            //start cong del
            $cong_confirmed = urldecode($_POST['cong_confirmed']);
            //sanitize
            $deleting = cong_del($cong_confirmed, "edit");
            if ($deleting == 'ok') {
                $cong_name = $_POST['cong_name'];
                //check
                $cong_lang = $_POST['cong_lang'];
                //check
                $cong_no = $_POST['cong_no'];
                //what's that?
                $conf_admin = $_POST['conf_admin'];
                $conf_user = $_POST['conf_user'];
                $phone_no = $_POST['phone_no'];
                $voip_type = $_POST['voip_type'];
                $stream = $_POST['stream'];
                $stream_server = $_POST['stream_server'];
                $stream_type = $_POST['stream_type'];
                $voip_pwd = $_POST['voip_pwd'];