Exemplo n.º 1
0
    }
    $blog->query("UPDATE `{$db_prefix}replies` SET `adminrepcontent`='{$adminreplycontent}' , {$queryplus} WHERE `repid`='{$repid}'");
    if ($ajax != 'on') {
        catchsuccess($finishok2, array($backtoprevious, $backtoindex, $backtodefault));
    } else {
        // For ajax
        if ($mbcon['avatar'] == 1 || $mbcon['usergravatar'] == 1 || $mbcon['visitorgravatar'] == 1) {
            $thiscommentwithreply = $blog->getgroupbyquery("SELECT t1.*, t2.userid, t2.avatar FROM `{$db_prefix}replies` t1 LEFT JOIN `{$db_prefix}user` t2 ON t1.replierid=t2.userid WHERE t1.repid='{$repid}'");
        } else {
            $thiscommentwithreply = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}replies` WHERE `repid`='{$repid}'");
        }
        include "data/cache_emot.php";
        $mbcon['images'] = $template['images'];
        define("ADMIN_LOGIN", 1);
        $m_b = new getblogs();
        $ajaxresult = $m_b->single_reply($thiscommentwithreply[0]);
        catchsuccess($ajaxresult);
    }
} else {
    checkpermission('CP');
    confirmpsw();
    //Re-check password
}
if ($job == 'deladminreply') {
    $blog->query("UPDATE `{$db_prefix}replies` SET `adminrepcontent`='', `adminreplier`='', `adminrepid`='0',`adminreptime`='0',  `adminrepeditorid`='0', `adminrepeditor`='', `adminrepedittime`='0' WHERE `repid`='{$repid}'");
    catchsuccess($finishok2, array($backtoprevious, $backtoindex, $backtodefault));
}
if ($job == 'delreply') {
    if (!is_array($repid)) {
        $tmp_array[0] = $repid;
        $repid = $tmp_array;
Exemplo n.º 2
0
    $repid = floor($repid);
    $reppsw = md5($reppsw);
    $tablename = $way == 'reply' ? 'replies' : 'messages';
    $partialquery = "SELECT * FROM `{$db_prefix}{$tablename}` WHERE `repid`='{$repid}' LIMIT 1";
    $m_b = new getblogs();
    $records = $m_b->getbyquery($partialquery);
    if (!is_array($records) || $records['repid'] != $repid) {
        catcherror($lnc[305]);
    }
    if ($reppsw != $records['reppsw']) {
        catcherror($lnc[297]);
    }
    $records['reppsw'] = '';
    $records['reproperty'] = '0';
    if ($way == 'reply') {
        $output_single = $m_b->single_reply($records, floor($onetimecounter));
    } else {
        $output_single = $m_b->single_message($records, floor($onetimecounter));
    }
    catchsuccess($output_single);
}
//OpenID support
if ($job == 'openidaddreply' || $job == 'openidaddmessage') {
    if ($mbcon['enableopenid'] != '1') {
        catcherror($lnc[315] . $lnc[319]);
    }
    $lastpost = $_COOKIE['lastpost'];
    if ($nowtime['timestamp'] - $lastpost < $permission['MinPostInterval']) {
        catcherror($lnc[210]);
    }
    $findintable = $job == 'openidaddreply' ? 'replies' : 'messages';