예제 #1
0
function pageContent()
{
    $foundMatch = false;
    global $pagesArray, $subpagesArray;
    foreach ($pagesArray as $p) {
        if (isset($_REQUEST[$p])) {
            navGroup($p);
            $foundMatch = true;
        }
    }
    foreach ($subpagesArray as $p) {
        if (isset($_REQUEST[$p])) {
            echo dbReadPage($p, 1);
            $foundMatch = true;
        }
    }
    if (isset($_REQUEST['sitemap'])) {
        echo '<table>';
        $first = true;
        foreach ($pagesArray as $p) {
            if (!$first) {
                echo '<tr><td colspan="2" style="height: 1px; background: #666;"></td></tr>';
            }
            echo '<tr><td><a href="?' . $p . '">' . dbReadTitle($p) . '</a></td><td><ul>';
            navGroup($p);
            echo '</ul></td></tr>';
            $first = false;
        }
        echo '</table>';
    }
    if (!$foundMatch) {
        echo dbReadPage('home', 1);
    }
}
예제 #2
0
                     <?php 
 foreach ($pagesArray as $v) {
     echo "\n" . '<option value="' . $v . '" style="background: #F66;">' . dbReadTitle($v) . '</option>';
 }
 foreach ($subpagesArray as $v) {
     echo "\n" . '<option value="' . $v . '" style="background: #CCF;">' . dbReadTitle($v) . '</option>';
 }
 ?>
                 </select>
             </td><td>
             	Page Title:
                 <?php 
 $tmp = array_merge($pagesArray, $subpagesArray);
 $first = true;
 foreach ($tmp as $v) {
     echo "\n" . '<div id="pn_' . $v . '" class="pageTitle"' . ($first ? ' style="display: inline;"' : '') . '><input type="text" name="pnt_' . $v . '" id="pnt_' . $v . '" value="' . dbReadTitle($v) . '"></div>';
     $first = false;
 }
 ?>
                 <div style="float: right;"><input type="button" value="  Save Changes  " onclick="sendCode('websiteContent');" /></div>
             </td></tr>
             <tr><td colspan="2">Pages in the select field with a<b style="background: #F66;"> red </b>background are navigation only pages. Editing these could cause navigational errors.</td></tr>
             <tr><td colspan="2">
             	<?php 
 $first = true;
 foreach ($tmp as $v) {
     echo "\n" . '<textarea class="pageContent" id="pc_' . $v . '" name="pc_' . $v . '"' . ($first ? ' style="display: block;"' : '') . '>';
     echo dbReadPage($v);
     //if (!file_exists("pages/".$v.".html")) { $f = fopen("pages/".$v.".html", "w"); fwrite($f, ""); fclose($f); }
     //echo file_get_contents("pages/".$v.".html");
     echo '</textarea>';
예제 #3
0
        </div>
        <div id="ticker">
        	<marquee id="tickerText"><?php 
echo dbReadSetting("Website_Ticker", 1);
?>
</marquee>
        </div>
        <div id="menu">
        	<ul>
            	<li><a href="/index.php"><?php 
echo dbReadTitle('home');
?>
</a></li>
            	<?php 
foreach ($pagesArray as $v) {
    echo '<li><a href="?' . $v . '">' . dbReadTitle($v) . '</a>';
    navGroup($v);
    echo '</li>';
}
?>
            </ul>
        </div>
    </div>
    <div id="body">
    	<div id="content">
        	<?php 
pageContent();
?>
        </div>
        <div class="clearfix"></div>
    </div>