コード例 #1
0
    if (!empty($_POST["acceptrequest"])) {
        $id = $_POST["acceptrequest"];
        rateLanguage($id);
        deleterateRequest($id);
        $id = "";
        $n_requests = countrequests($login);
    }
    if (!empty($_POST["rejectrequest"])) {
        $id = $_POST["rejectrequest"];
        deleterateRequest($id);
        $id = "";
        $n_requests = countrequests($login);
    }
    if (!empty($_POST["deletecomment"])) {
        $id = $_POST["deletecomment"];
        deletecomment($id);
        echo "<script>alert(\"You have deleted a comment.\")</script>";
        $n_comments = countnewcomments();
    }
    if (!empty($_POST["readcomment"])) {
        $id = $_POST["readcomment"];
        readcomment($id);
        echo "<script>alert(\"You have maked a comment as read.\")</script>";
        $n_comments = countnewcomments();
    }
}
?>
                </div>
            </div>
        </div>
    </header>
コード例 #2
0
     addvideonode();
     break;
 case 'replacevideo':
     replacevideonode();
     break;
 case 'modifyvideo':
     editvideonode();
     break;
 case 'addcomments':
     addcomments();
     break;
 case 'editcomments':
     editcomments();
     break;
 case 'deletecomment':
     deletecomment();
     break;
 case 'getvideocomments':
     getvideocomments();
     break;
 case 'changerating':
     changerating();
     break;
 case 'addpeoplenode':
     addpeoplenode();
     break;
 case 'editprofile':
     editprofile();
     break;
 case 'chPwd':
     chPwd();
コード例 #3
0
ファイル: comment.inc.php プロジェクト: pan289091315/Discuz
/**
 *      [品牌空間] (C)2001-2010 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: comment.inc.php 4324 2010-09-04 07:08:16Z fanshengshuai $
 */
if (!defined('IN_ADMIN')) {
    exit('Acess Denied');
}
$wheresql = $joinsql = $query = $mlist = $opcheckstr = $catstr = $gradestr = '';
if ($_POST['deletesubmit'] && $_POST['operation'] == "delete") {
    require_once B_ROOT . './source/adminfunc/tool.func.php';
    if (!empty($_POST['cid'])) {
        foreach ($_POST['cid'] as $cid) {
            deletecomment($cid);
        }
        cpmsg('message_success', $_POST['buffurl']);
    } else {
        cpmsg('no_item', $_POST['buffurl']);
    }
}
shownav('infomanage', 'comment_list');
showsubmenu('menu_comment', array(array('menu_comment', 'comment', '1'), array('menu_remark', 'remark', '0')));
showtips('comment_list_tips');
//搜索條件拼合
if (!empty($_GET['filtersubmit']) || !empty($_GET['filter']) || !empty($_GET['sc']) || !empty($_GET['itemid']) || !empty($_GET['author']) || !empty($_GET['message'])) {
    $wheresql .= !empty($_GET['type']) ? ' AND s.type=\'' . $_GET['type'] . '\'' : '';
    $wheresql .= !empty($_GET['itemid']) ? ' AND s.itemid=\'' . $_GET['itemid'] . '\'' : '';
    $wheresql .= !empty($_GET['author']) ? ' AND s.author LIKE \'%' . $_GET['author'] . '%\'' : '';
    $wheresql .= !empty($_GET['message']) ? ' AND s.message LIKE \'%' . $_GET['message'] . '%\'' : '';
コード例 #4
0
ファイル: main.php プロジェクト: squidjam/LightNEasy
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
global $set, $newsmessage;
if (file_exists("addons/news/lang/lang_" . $set['language'] . ".php")) {
    require_once "addons/news/lang/lang_" . $set['language'] . ".php";
} else {
    require_once "addons/news/lang/lang_en_US.php";
}
if ($_POST['submit'] == "sendcomment") {
    $message = sendcomment();
}
if ($_POST['submit'] == "deletecomment") {
    $message = deletecomment();
}
if ($message != "") {
    $out .= "<p style=\"color: red; font-weight: 600; \">{$message}</p>\n";
}
// this function shows the news
function shownews($post_integra = 1, $post_cabecalho = 9, $comenta = 0, $categ = -1)
{
    global $newsmessage, $set, $pagenum, $prefix;
    if ($_GET['action'] == "delete" && is_intval($_GET['id']) && is_intval($_GET['commentid']) && $_SESSION['adminlevel'] > 3) {
        dbquery("DELETE FROM " . $prefix . "comments WHERE id=" . $_GET['commentid']);
    }
    if (isset($_GET['id'])) {
        if (!is_intval($_GET['id'])) {
            die("news - Aha! Clever!");
        } else {
コード例 #5
0
ファイル: tool.func.php プロジェクト: pan289091315/Discuz
function deletecomment($cid = 0)
{
    global $_G, $_SGLOBAL;
    $cid = intval($cid);
    if ($cid > 0) {
        $query = DB::query("SELECT itemid, type, upcid FROM " . tname("spacecomments") . " WHERE cid = '{$cid}'");
        $commentinfo = DB::fetch($query);
        DB::query("DELETE FROM " . tname("spacecomments") . " WHERE cid='{$cid}'");
        DB::query("DELETE FROM " . tname("commentscores") . " WHERE cid={$cid}");
        if ($commentinfo['upcid'] > 0) {
            deletecomment($commentinfo['upcid']);
        } else {
            DB::query("UPDATE " . tname($commentinfo['type'] . "items") . " SET replynum=replynum-1 WHERE itemid='{$commentinfo['itemid']}'");
        }
    }
    return 'message_success';
}