Exemplo n.º 1
0
     $jtx->registerFunction(array('JCommentsSaveSettingsAjax', 'JCommentsAdmin', 'saveSettingsAjax'));
     $jtx->registerFunction(array('JCommentsRestoreSettingsAjax', 'JCommentsAdmin', 'restoreSettingsAjax'));
     $jtx->registerFunction(array('JCommentsImportCommentsAjax', 'JCommentsAdmin', 'importCommentsAjax'));
     $jtx->registerFunction(array('JCommentsRemoveReportAjax', 'JCommentsAdmin', 'removeReportAjax'));
     $jtx->processRequests();
 } else {
     if (isset($_REQUEST['no_html']) && intval($_REQUEST['no_html']) == 1) {
         require_once JCOMMENTS_BASE . '/jcomments.php';
     } else {
         switch ($task) {
             case "comments":
                 JCommentsAdmin::checkPhpVersion();
                 JCommentsAdmin::show();
                 break;
             case 'comments.edit':
                 JCommentsAdmin::edit();
                 break;
             case 'comments.apply':
             case 'comments.save':
                 JCommentsAdmin::save();
                 break;
             case 'comments.cancel':
                 JCommentsAdmin::cancel();
                 break;
             case 'comments.publish':
                 JCommentsAdmin::publish(1);
                 break;
             case 'comments.unpublish':
                 JCommentsAdmin::publish(0);
                 break;
             case 'comments.remove':