コード例 #1
0
ファイル: ajax.php プロジェクト: hackingman/TubeX
# This file may not be redistributed in whole or significant part.  #
# TubeX IS NOT FREE SOFTWARE                                        #
#-------------------------------------------------------------------#
# http://www.jmbsoft.com/           http://www.jmbsoft.com/license/ #
#-------------------------------------------------------------------#
define('TUBEX_CONTROL_PANEL', true);
define('TUBEX_AJAX', true);
require_once 'includes/cp-global.php';
// Send initial response headers
header("Content-type: text/javascript; charset: UTF-8");
NoCacheHeaders();
if (Authenticate::Login()) {
    Execute(Request::Get('r'), 'tbxFunctionMissing');
} else {
    Growl::AddError(Authenticate::GetError());
    JSON::Logout();
}
function tbxVideoCommentDelete($comment)
{
    $DB = GetDB();
    $DB->Update('DELETE FROM `tbx_video_comment` WHERE `comment_id`=?', array($comment['comment_id']));
    if ($comment['status'] == STATUS_ACTIVE) {
        UpdateVideoCommentStats($comment, true);
    }
    return true;
}
function tbxVideoCommentApprove($comment)
{
    if ($comment['status'] == STATUS_PENDING) {
        $DB = GetDB();
        $schema = GetDBSchema();