Exemple #1
0
     changeContent($cid, -1, $sectionid, $option);
     break;
 case 'unarchive':
     changeContent($cid, 0, $sectionid, $option);
     break;
 case 'cancel':
     cancelContent($option);
     break;
 case 'orderup':
     orderContent($cid[0], -1, $option);
     break;
 case 'orderdown':
     orderContent($cid[0], 1, $option);
     break;
 case 'showarchive':
     viewArchive($sectionid, $option);
     break;
 case 'movesect':
     moveSection($cid, $sectionid, $option);
     break;
 case 'movesectsave':
     moveSectionSave($cid, $sectionid, $option);
     break;
 case 'copy':
     copyItem($cid, $sectionid, $option);
     break;
 case 'copysave':
     copyItemSave($cid, $sectionid, $option);
     break;
 case 'resethits':
     resetHits();
Exemple #2
0
function mainLogic()
{
    global $debugMode, $option, $requestCategory, $optionValue, $serverName;
    //$category = $data[4];
    switch ($option) {
        case "newEntry":
            if ($debugMode == "on") {
                echo "Calling newEntryPass()";
            }
            newEntryForm();
            break;
        case "newEntryForm":
            if ($debugMode == "on") {
                echo "Calling newEntryForm()";
            }
            newEntryForm();
            break;
        case "newEntrySubmit":
            newEntrySubmit();
            break;
        case "newEntrySuccess":
            newEntrySuccess();
            break;
        case "mainPage":
            $requestCategory = '';
            listPosts();
            $referrer = $serverName . $_SERVER['REQUEST_URI'];
            $_SESSION['referrer'] = $referrer;
            break;
        case "adminPage":
            adminPage();
            break;
        case "adminPageBasic":
            if ($debugMode == "on") {
                echo "adminPageBasic  " . $_POST['process'] . "<br>";
            }
            adminPageBasic();
            break;
        case "adminPageBasicSubmit":
            if ($debugMode == "on") {
                echo "adminPageBasicSubmit  " . $_POST['process'] . "<br>";
            }
            adminPageBasicSubmit();
            break;
        case "adminPageAdvanced":
            if ($debugMode == "on") {
                echo "adminPageAdvanced  " . $_POST['process'] . "<br>";
            }
            adminPageAdvanced();
            break;
        case "adminPageAdvancedSubmit":
            if ($debugMode == "on") {
                echo "adminPageAdvancedSubmit  " . $_POST['process'] . "<br>";
            }
            adminPageAdvancedSubmit();
            break;
        case "adminPageAuthors":
            if ($debugMode == "on") {
                echo "adminPageAuthors  " . $_POST['process'] . "<br>";
            }
            adminPageAuthors();
            break;
        case "adminAuthorsAdd":
            if ($debugMode == "on") {
                echo "adminAuthorsAdd  " . $_POST['process'] . "<br>";
            }
            adminAuthorsAdd();
            break;
        case "adminAuthorsEdit":
            if ($debugMode == "on") {
                echo "adminAuthorsEdit  " . $_POST['process'] . "<br>";
            }
            adminAuthorsEdit();
            break;
        case "adminPluginsSubmit":
        case "adminPagePlugins":
            adminPagePlugins();
            break;
        case "adminPageModerate":
        case "adminModerateSubmit":
            adminPageModerate();
            break;
        case "deleteEntry":
            if ($debugMode == "on") {
                echo "deleteEntry  " . $_POST['process'] . "<br>";
            }
            //deleteEntrySubmit();
            if ($_POST['process'] !== "deleteEntrySubmit") {
                deleteEntryForm();
            } else {
                deleteEntrySubmit();
            }
            break;
        case "editEntry":
            if ($debugMode == "on") {
                echo "editEntry  " . $_POST['process'] . "<br>";
            }
            editEntryForm();
            $referrer = $serverName . $_SERVER['REQUEST_URI'];
            $_SESSION['referrer'] = $referrer;
            break;
        case "editEntryForm":
            editEntryForm();
            break;
        case "editEntrySubmit":
            editEntrySubmit();
            break;
        case "posts":
            viewEntry();
            break;
        case "archives":
            viewArchive();
            break;
        case "month":
            viewArchiveMonth();
            break;
        case "category":
            $requestCategory = $optionValue;
            listPosts();
            $referrer = $serverName . $_SERVER['REQUEST_URI'];
            $_SESSION['referrer'] = $referrer;
            break;
        case "searchPosts":
            searchPosts();
            break;
        case "sendComment":
            sendComment();
            break;
        case "sendCommentSuccess":
            sendCommentSuccess();
            break;
        case "listAllComments":
            listAllComments();
            break;
        case "deleteComment":
            if ($debugMode == "on") {
                echo "deleteEntry  " . $_POST['process'] . "<br>";
            }
            $process = isset($_POST['process']) ? $_POST['process'] : "";
            if ($process !== "deleteCommentSubmit") {
                deleteCommentForm();
            } else {
                deleteCommentSubmit();
            }
            break;
        case "loginPage":
            loginPage();
            break;
        case "logoutPage":
            logoutPage();
            break;
        case "registerPage":
            registerPage();
            break;
        case "registerPageSubmit":
            registerPageSubmit();
            break;
        case "forgotPass":
            forgotPass();
            break;
        case "forgotPassSubmit":
            forgotPassSubmit();
            break;
        case "activation":
            activation();
            break;
        case "myProfile":
            myProfile();
            break;
        case "myProfileSubmit":
            myProfileSubmit();
            break;
        case "pluginFunction1":
            pluginFunction1();
            break;
        case "pluginFunction2":
            pluginFunction2();
            break;
        case "pluginFunction3":
            pluginFunction3();
            break;
        case "pluginFunction4":
            pluginFunction4();
            break;
        case "pluginFunction5":
            pluginFunction5();
            break;
    }
}
Exemple #3
0
     }
     if ($_POST['process'] !== "editEntrySubmit") {
         editEntryForm();
     } else {
         editEntrySubmit();
     }
     break;
 case "viewEntry":
     viewEntry();
     break;
 case "commentEntry":
     echo "<h1>Ooops</h1>";
     echo "Sorry! This functionality is not coded yet.<br>";
     break;
 case "viewArchive":
     viewArchive();
     break;
 case "viewCategory":
     $requestCategory = isset($_POST['category']) ? $_POST['category'] : $_GET['category'];
     listPosts();
     break;
 case "searchPosts":
     searchPosts();
     break;
 case "sendComment":
     sendComment();
     break;
 case "listAllComments":
     listAllComments();
     break;
 case "deleteComment":