Пример #1
0
foreach ($pageArray as $page) {
    echo "<li>";
    echo "<a href='testFinal.php?page=" . $page->getId() . "'> " . $page->getWebName() . "</a>";
    echo "</li>";
}
?>
    </ul>
</nav>
<section>
    <?php 
// BUILD OUR PAGE CONTENT
// obtain/receive all content areas ($areaArray)
// get them in ORDER
// every page gets all content areas (they may be empty)
// so I do not need to tie to current page
$areaArray = ContentAreaClass::retrieveDivs();
foreach ($areaArray as $area) {
    // all of our content areas are DIVs
    echo "<div id='" . $area->getDivName() . "'>";
    // obtain/receive all articles ($articleArray)
    // for the current page (or for all pages)
    // and for the current area
    // in REVERSE ORDER of creation date
    $articleArray = ArticleClass::getAreaArticles($_GET['page'], $area->getId());
    foreach ($articleArray as $article) {
        echo "<article id='" . $article->getTitle() . "'>";
        //  echo "<article id='$article->getAlias()'>";
        echo $article->getTitle();
        echo "<p>";
        echo $article->getContent();
        echo "</p>";
Пример #2
0
<?php

require '../Business/ContentAreaClass.php';
//build new article business object
$newDiv = new ContentAreaClass($_POST['dName'], $_POST['dDivName']);
$newDiv->setId($_POST['editDivId']);
$newDiv->setDesc($_POST['aDesc']);
$newDiv->setOrder($_POST['dOrder']);
//call ContentArea's save function
$result = $newDiv->updateDiv();
//report success/failure
echo $result;
?>

Пример #3
0
<?php

require '../Business/ContentAreaClass.php';
//build new article business object
$newDiv = new ContentAreaClass($_POST['dName'], $_POST['dDivName']);
$newDiv->setDesc($_POST['aDesc']);
$newDiv->setOrder($_POST['dOrder']);
//call ContentArea's save function
$result = $newDiv->saveDiv();
//report success/failure
echo $result;
?>

Пример #4
0
} elseif (isset($_POST['addDiv'])) {
    //load the divs management table\
    include_once 'tables/div/div.php';
} elseif (isset($_POST['delDiv'])) {
    //load delete confirmation page
    include_once 'tables/div/deleteDiv.php';
} elseif (isset($_POST['addedDiv'])) {
    //load insert routine + success/fail message
    include_once 'tables/div/addDiv.php';
} elseif (isset($_POST['editedDiv'])) {
    //load update routine + success/fail message
    include_once 'tables/div/editDiv.php';
} elseif (isset($_POST['deletedDiv'])) {
    //delete selected article
    require_once '../Business/ContentAreaClass.php';
    $currentDiv = ContentAreaClass::getSingleDiv($_POST['delDivId']);
    $result = $currentDiv->deleteDiv();
    echo $result;
}
//////////////////////////////////////////
//         Template MGMT Block         //
////////////////////////////////////////
if (isset($_POST['cssMgmtBtn'])) {
    //load the templates management table
    include_once 'tables/cssMgmt.php';
} elseif (isset($_POST['editCss'])) {
    //load the divs management table\
    include_once 'tables/css/css.php';
} elseif (isset($_POST['addCss'])) {
    //load the divs management table\
    include_once 'tables/css/css.php';
Пример #5
0
<?php

//TODO: add conditional for header (add/edit)
?>

<h3>Edit Article:</h3>
<form action="editorPortal.php" method="post">


    <?php 
require "../Business/ArticleClass.php";
require "../Business/PageClass.php";
require "../Business/ContentAreaClass.php";
$currentArticle = ArticleClass::getSingleArticle($_POST['editArticleId']);
$arrayOfPages = PageClass::retrievePages();
$arrayOfDivs = ContentAreaClass::retrieveDivs();
//TODO: add code to preset pageOn and divIn selected option values (add vs edit?)
?>

    <table>
        <tr>
            <td>Article Title: </td>
            <td><input type="text" id="aTitle" name="aTitle" value="<?php 
echo $currentArticle->getTitle();
?>
" /></td>
        </tr>
        <tr>
            <td>Webname: </td>
            <td><input type="text" id="aWebName" name="aWebName" value="<?php 
echo $currentArticle->getWebName();