Exemplo n.º 1
0
function outputMenuItemRecurse($parentId, $pad, $language_selected)
{
    global $logger;
    $logger->LogDebug("Getting menu items for parent: {$parentId} ...");
    $pages = PageContents::fetchFromDbActiveForParent($parentId);
    if (sizeof($pages) > 0) {
        $logger->LogDebug("Found matches.");
        echo $pad . "<ul>\n";
        foreach ($pages as $page) {
            if (!$page instanceof PageContents) {
                continue;
            }
            $title = $page->title->getText($language_selected);
            $logger->LogDebug("\tTitle={$title}");
            $logger->LogDebug("\tURL=" . $page->getUrl());
            echo $pad . '    <li><a href="' . $page->getUrl() . '">' . $page->title->getText($language_selected) . '</a>' . "\n";
            outputMenuItemRecurse($page->id, $pad . "\t", $language_selected);
            echo $pad . "</li>\n";
        }
        echo $pad . "</ul>\n";
    }
}
Exemplo n.º 2
0
 public static function fetchFromDbForUrl($url)
 {
     $sql = "SELECT * FROM bsi_site_contents WHERE url = '" . mysql_escape_string($url) . "' ORDER BY ord";
     $query = mysql_query($sql);
     if (!$query) {
         global $logger;
         $logger->LogFatal("Error executing query: {$sql}");
         $logger->LogFatal("Database error: " . mysql_errno() . ". Message: " . mysql_error());
         die("Database error: " . mysql_errno() . ". Message: " . mysql_error());
     }
     if ($row = mysql_fetch_assoc($query)) {
         $pageContents = PageContents::fetchFromParameters($row);
         return $pageContents;
     } else {
         PageContents::setStaticError("No page contents with url " . $url . " could be found.");
         return NULL;
     }
 }
Exemplo n.º 3
0
<?php

include_once "includes/SystemConfiguration.class.php";
session_start();
include "includes/language.php";
global $systemConfiguration;
global $logger;
$logger->LogInfo(__FILE__);
unset($_SESSION['bookingDetails']);
$page = null;
if (sizeof($_REQUEST) > 0 && isset($_REQUEST['id']) && is_numeric($_REQUEST['id'])) {
    $id = intval($_REQUEST['id']);
    $page = PageContents::fetchFromDb($id);
    if ($page == null) {
        $_SESSION['errors'] = BOOKING_FAILURE_INVALID_REQUEST;
        header("Location: booking-failure.php");
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>     
    <meta name="description" content="<?php 
echo $systemConfiguration->getSiteDescription();
?>
" />
	<meta name="keywords" content="<?php 
echo $systemConfiguration->getSiteKeywords();
?>
" />
	<meta http-equiv="Content-Type" content="text/html;charset=<?php 
Exemplo n.º 4
0
" />
                                            </div>                                            
                                            <!-- /.confirm -->
                                            </form>
                                        </div>
                                        <!--/div-->
                                    </div>                                    
                                    <div class="box_down">
                                    </div>
                                </div>
                                <div class="box box_3-1">
                                    <div class="box_top">
                                    </div>                                    
                                    <?php 
$logger->LogInfo("Fetching content to display ...");
$indexPage = PageContents::fetchFromDbForUrl("index.php");
if ($indexPage != null) {
    echo $indexPage->contents->getText($language_selected);
} else {
    $logger->LogWarn("No content exists for page: index.php!");
}
?>
                                                                        
                                    <div class="box_down">
                                    </div>
                                </div>
                                <div class="box box_3-1">
                                    <div class="box_top">
                                    </div>
                                    <!--<object width="290" height="260" id="_player" name="_player" data="http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf" type="application/x-shockwave-flash"><param name="autoPlay" value="false" /><param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value='config={"clip":{"url":"http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv"},"autoPlay":"false","autoBuffering":"true"}' /></object>-->
<!--                                    	<div style="width:295px;height:260px; margin-left: -10px;" id="player"></div>-->
Exemplo n.º 5
0
                            </td>
                            <td style="text-align: right;">
                                <a href="contact.php"><?php 
echo FOOTER_CONTACT_US;
?>
</a>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="links" style="padding-top: 10px;">
                    <table width="100%">
                        <tr>
                            <td style="text-align: center;">
                            <?php 
$pages = PageContents::fetchFromDbActiveForParent(0);
if ($pages == null) {
    die(PageContents::$staticErrors);
}
$separator = "";
foreach ($pages as $page) {
    if (!$page instanceof PageContents) {
        continue;
    }
    echo $separator;
    echo '<a href="' . $page->getUrl() . '">' . $page->title->getText($language_selected) . '</a>' . "\n";
    $separator = '<span class="sep">|</span>';
}
?>
                               
                            </td>
Exemplo n.º 6
0
                                        		<td align="left">
                                        			<input type="text" size=5 name="ord" value="<?php 
echo $page->displayOrder;
?>
"  />
                                          		</td>
                                      		</tr>                                      		
                                      		<tr bgcolor="#ffffff" class="lnk">
                                        		<td  valign="top" width="20%" >
                                        			Parent Header (Optional) 
                                        		</td>
                                        		<td align="left">
                                        			<select name="parent_id" size="1" style="width:50%; height:20">
                                        				<option value="0">Select Header-----&gt;</option>
                                            			<?php 
$pages = PageContents::fetchFromDbAllActive();
foreach ($pages as $currentPage) {
    if ($currentPage->parentId == 0) {
        echo "<option value='" . $currentPage->id . "'" . ($currentPage->id == $page->parentId ? " selected" : "") . ">" . htmlentities($currentPage->title->getText($defaultLanguage->languageCode)) . "</option>\n";
        outputOptionItem($currentPage, $pages, $defaultLanguage, "|----", $page->parentId);
    }
}
?>
                                          			</select>
                                          		</td>
                                      		</tr>
                                      		<tr bgcolor="#ffffff" class="lnk">
                                        		<td  valign="top" width="20%">
                                        			Status 
                                        		</td>
                                        		<td align="left">