Exemple #1
0
/**
 * Update article
 */
function api_article_delete_function()
{
    $ret = DelArticle();
    if ($ret !== true) {
        API::$IO->end(0);
    }
}
Exemple #2
0
         Redirect(GetVars('HTTP_REFERER', 'SERVER'));
     }
     break;
 case 'getcmt':
     ViewComments((int) GetVars('postid', 'GET'), (int) GetVars('page', 'GET'));
     die;
     break;
 case 'ArticleEdt':
     Redirect('admin/edit.php?' . GetVars('QUERY_STRING', 'SERVER'));
     break;
 case 'ArticleDel':
     if (!$zbp->ValidToken(GetVars('token', 'GET'))) {
         $zbp->ShowError(5, __FILE__, __LINE__);
         die;
     }
     DelArticle();
     $zbp->BuildModule();
     $zbp->SaveCache();
     $zbp->SetHint('good');
     Redirect('cmd.php?act=ArticleMng');
     break;
 case 'ArticleMng':
     Redirect('admin/?' . GetVars('QUERY_STRING', 'SERVER'));
     break;
 case 'ArticlePst':
     PostArticle();
     $zbp->BuildModule();
     $zbp->SaveCache();
     $zbp->SetHint('good');
     Redirect('cmd.php?act=ArticleMng');
     break;
Exemple #3
0
function zbp_deletePost($id)
{
    $strXML = '<methodResponse><params><param><value><boolean>$%#1#%$</boolean></value></param></params></methodResponse>';
    $_GET['id'] = $id;
    if (DelArticle() == true) {
        $strXML = str_replace("\$%#1#%\$", 1, $strXML);
        echo $strXML;
    } else {
        $zbp->ShowError(0, __FILE__, __LINE_);
    }
}