Esempio n. 1
0
<?php

require_once "../config.php";
require_once "../function.php";
ob_start();
session_start();
date_default_timezone_set('Asia/Ho_Chi_Minh');
$_SESSION["admin"] = $_COOKIE["admin"];
if ($_SESSION["admin"] != 1) {
    header("refresh: 0; url=/admin.php");
}
require_once "header.php";
echo "<script>\ndocument.getElementById('x4').setAttribute('class', 'active');\n</script>";
echo "\n                    \t<li><a href='cmtlist.php'>Danh sách bình luận</a></li>\n                    </ul>\n                </div>\n                <h2><a href='#'>Bảng điều khiển chính</a> &raquo; <a href='#' class='active'>Xóa bình luận</a></h2>\n                <div id='main'>";
if (isset($_POST["delcmt"])) {
    delcmt();
}
echo "<br/>";
if ($_GET['id'] != NULL) {
    $sqlcmt = "SELECT * FROM `comments` where `id`='" . $_GET['id'] . "'";
    $querycmt = @mysql_query($sqlcmt);
    if (@mysql_num_rows($querycmt) != 0) {
        echo "\n\t\t\t\t<form action='' class='jNice' method='post'>\n\t\t\t\t<fieldset>\n\t\t\t\t<p>Bạn có chắc chắn muốn xóa bình luận này?</p>\n\t\t\t\t<input name='id' type='hidden' value='" . $_GET[id] . "' />\n\t\t\t\t<input name='delcmt' type='submit' value='Xóa' />\n\t\t\t\t</fieldset>\n\t\t\t\t</form>";
    } else {
        echo "Có lỗi";
    }
} else {
    echo "Có lỗi";
}
require_once "footer.php";
Esempio n. 2
0
 $tables = "enterprise";
 $set = "name='{$name}'{$logofileset},homepage='{$homepage}',short_profile='{$short_profile}'";
 switch ($action) {
     case "change":
         $set = $set . ",status='{$status}'";
         break;
     case "delete":
         $set = $set . ",status='D'";
         delprf($id);
         delcon($id);
         delsvc($id);
         delpro($id);
         delsol($id);
         delcus($id);
         delnew($id);
         delcmt($id);
         break;
     case "undelete":
         $set = $set . ",status='A'";
         break;
     case "erase":
         break;
     default:
         $be->box_full($t->translate("Error"), $t->translate("No Action specified"));
         $set = $set . ",status='{$status}'";
         break;
 }
 $where = "entid='{$id}'";
 if ($action == "erase") {
     $query = "DELETE FROM {$tables} WHERE {$where}";
 } else {