예제 #1
0
     } else {
         deleteEntrySubmit();
     }
     break;
 case "editEntry":
     if ($debugMode == "on") {
         echo "editEntry  " . $_POST['process'] . "<br>";
     }
     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;
예제 #2
0
파일: index.php 프로젝트: hardkap/pritlog
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;
    }
}
예제 #3
0
    // entry is an array with uid, name, reason
    $html = '<div style="border: 1px solid #000; padding: 10px;"><a href="?tab=view&show=' . $entry['uid'] . '">';
    $html .= '<img src="' . $GLOBALS['app_config']['server']['url'] . '/user_content/' . $entry['uid'] . '.' . $entry['ext'] . '" width="' . $width . '" height="' . $height . '" />';
    $html .= '<br /><div align="center" style="font-size: 14px; font-weight: bold;"><fb:name uid="' . $entry['uid'] . '" firstnameonly=1 linked=0 reflexive=0 /></a></div>';
    $html .= '</div>';
    return $html;
}
?>

<?php 
if (isset($_GET['show'])) {
    echo '<a href="?tab=view"><div align="right" style="font-size: 18px; margin-right: 10px;">Back to other entries</div></a>';
    if (empty($_GET['show'])) {
        $_GET['show'] = $user;
    }
    echo viewEntry($db->getEntry($_GET['show']));
} else {
    ?>

   <?php 
    if ($config['admin'] == true) {
        ?>
   <fb:tabs>
      <fb:tab-item href="?tab=view&mod" title="Require Moderation" />
      <fb:tab-item href="?tab=view" title="Approved Entries" />
   </fb:tabs>
   <div style="height: 10px;"></div>
   <?php 
    }
    ?>