function execute(CommandContext $context)
 {
     $pageMapper = RequestRegistry::getPageMapper();
     $page = $context->get('page');
     $children = $page->getChildren();
     foreach ($children as $child) {
         $pageMapper->delete($child);
     }
     $pageMapper->delete($page);
     return;
 }
 function sidebar()
 {
     $sidebar = '';
     $page_mapper = RequestRegistry::getPageMapper();
     $suggested_links = $page_mapper->findSuggestedLinksForPage($this->content->getId());
     if (count($suggested_links) == 0) {
         return '';
     }
     $sidebar = "<div id='sidebar'>\n";
     $sidebar .= "<div class='sidebar-links-title'>\n" . "<p>Suggested Links</p>\n" . "</div>\n" . "<ul class='sidebar-links-list'>\n";
     foreach ($suggested_links as $link) {
         $sidebar .= "<li><a href='{$link['href']}'>{$link['anchor_text']}</a></li>";
     }
     $sidebar .= "</ul>\n</div>\n";
     return $sidebar;
 }
 function execute(CommandContext $context)
 {
     $pageMapper = RequestRegistry::getPageMapper();
     $page = null;
     if ($context->get('page-id') != null) {
         $page = $pageMapper->find($context->get('page-id'));
     }
     if ($context->get('page-slug') != null) {
         $page = $pageMapper->findBySlug($context->get('page-slug'));
     }
     if ($page === null) {
         die("need either 'page-slug' or 'page-id' in the command context please!");
     }
     $context->addParam('page', $page);
     return;
 }
 public function execute(CommandContext $context)
 {
     $pageMapper = RequestRegistry::getPageMapper();
     $pageMapper->update($context->get('page'));
     return;
 }
Beispiel #5
0
<?php

include '../init.php';
include 'inc/fckeditor/fckeditor.php';
$page_mapper = RequestRegistry::getPageMapper();
$page = $page_mapper->findPcsPage($_REQUEST['code']);
if (isset($_POST['save-button'])) {
    $page->setTitle($_POST['title']);
    $page->setStatus($_POST['status']);
    $page->setKeywords($_POST['meta-keywords']);
    $page->setDescription($_POST['meta-description']);
    $page->setText($_POST['content']);
    $page->setIntroduction($_POST['introduction']);
    RequestRegistry::getPageMapper()->update($page);
}
//init fckeditor
$fh = RequestRegistry::getFormHelper();
$editor = $fh->getEditor('content', 'Basic', null, null, stripslashes($page->getText()));
$introEditor = $fh->getEditor('introduction', 'Basic', '100', null, stripslashes($page->getIntroduction()));
$suggested_links = $page_mapper->findSuggestedLinksForPage($page->getId());
include '../inc/doctype.php';
?>
<html>
        <head>
                <title>Immanuel College Admin Panel</title>
                <link rel='stylesheet' type='text/css' href='css/style.css' />
                <script type='text/javascript' src='js/jquery-1.3.2.min.js'></script>
                <script type='text/javascript' src='js/generic-functions.js'></script>
                <script type='text/javascript' src='js/pcs-functions.js'></script>
                <script type='text/javascript' src='js/font/cufon-yui.js'></script>
                <script type='text/javascript' src='js/font/Sanuk-Black_500.font.js'></script>
Beispiel #6
0
<?php

include 'init.php';
$page = RequestRegistry::getPageMapper()->findPcsPage($_GET['code']);
$view = ViewHelperFactory::createViewHelper($page);
$view->set_pcs_stylecode($_GET['code']);
include 'inc/doctype.php';
?>


<html>
<head>
<link rel='stylesheet' type='text/css' href='/css/shared.css' />
<link rel='stylesheet' type='text/css' href='/css/pcs-default.css' />
<?php 
echo $view->pcs_stylesheet();
?>
<script type='text/javascript' src='/js/jquery-1.3.2.min.js'></script>
<script type='text/javascript' src='/js/jquery.dimensions.js'></script>
<script type='text/javascript' src='/js/jquery.tooltip.min.js'></script>
<script type='text/javascript' src='/js/font/cufon-yui.js'></script>
<script type='text/javascript' src='/js/font/Sanuk-Black_500.font.js'></script>
<script type='text/javascript' src='/js/font/Sanuk-Regular_500.font.js'></script>
<script type="text/javascript">
		Cufon.replace('h1', { fontFamily: 'Sanuk-Black'});
		Cufon.replace('li.page-nav-link>a', { fontFamily: 'Sanuk-Black'});
		Cufon.replace('li.nav-link>a', { fontFamily: 'Sanuk-Black'});
                Cufon.replace('li ul li', { fontFamily: 'Sanuk-Regular'});
                Cufon.replace("#tooltip *", { fontFamily: 'Sanuk-Black'});
                Cufon.replace("body div#main div#sidebar div.sidebar-links-title p", { fontFamily: 'Sanuk-Black'});
                
Beispiel #7
0
 /**
  * Returns parent page object
  *
  * @return $parent Page parent page object or null if top level
  */
 public function getParent()
 {
     if ($this->isTopLevelPage()) {
         return null;
     }
     if (!isset($this->parent)) {
         $this->parent = RequestRegistry::getPageMapper()->find($this->parentId);
     }
     return $this->parent;
 }
Beispiel #8
0
<?php

$pageMapper = RequestRegistry::getPageMapper();
$urlHelper = RequestRegistry::getUrlHelper();
$theSchool = $pageMapper->find(1);
$joiningUs = $pageMapper->find(2);
$wayOfLife = $pageMapper->find(3);
$theSchoolChildren = $theSchool->getLiveChildren();
$joiningUsChildren = $joiningUs->getLiveChildren();
$wayOfLifeChildren = $wayOfLife->getLiveChildren();
?>
	<div id='footer'>
		<div id='footer-col-123'>
		
			<div id='footer-col-12'>
			
				<div class='footer-column' id='footer-col-1'>
                                        <h4><?php 
echo $theSchool->getTitle();
?>
</h4>
                                        <ul>
						<?php 
foreach ($theSchoolChildren as $child) {
    ?>
							<li>
							<a href='<?php 
    echo $urlHelper->url($child);
    ?>
'><?php 
    echo $child->getTitle();
Beispiel #9
0
<?php

include 'init.php';
$slug = mysql_escape_string($_GET['slug']);
$page = RequestRegistry::getPageMapper()->findBySlug($slug);
$view = RequestRegistry::getViewHelper($page);
$children = $page->getChildren();
include 'inc/doctype.php';
?>
<html>
<head>
<link rel='stylesheet' type='text/css' href='/css/shared.css' />
<link rel='stylesheet' type='text/css' href='/css/pcs-default.css' />
<!-- <link rel='stylesheet' type='text/css' href='/css/current.css' /> -->
<?php 
echo $view->pcs_stylesheet();
?>
<script type='text/javascript' src='/js/jquery-1.3.2.min.js'></script>
<script type='text/javascript' src='/js/jquery.dimensions.js'></script>
<script type='text/javascript' src='/js/jquery.tooltip.min.js'></script>
<script type='text/javascript' src='/js/font/cufon-yui.js'></script>
<script type='text/javascript' src='/js/font/Sanuk-Black_500.font.js'></script>
<script type='text/javascript' src='/js/font/Sanuk-Regular_500.font.js'></script>
<script type="text/javascript">
		Cufon.replace('h1', { fontFamily: 'Sanuk-Black'});
		Cufon.replace('li.page-nav-link>a', { fontFamily: 'Sanuk-Black'});
		Cufon.replace('li.nav-link>a', { fontFamily: 'Sanuk-Black'});
                Cufon.replace('li ul li', { fontFamily: 'Sanuk-Regular'});
                Cufon.replace("#tooltip *", { fontFamily: 'Sanuk-Black'});
                Cufon.replace("body div#main div#sidebar div.sidebar-links-title p", { fontFamily: 'Sanuk-Black'});
                
 function execute(CommandContext $context)
 {
     RequestRegistry::getPageMapper()->insertSuggestedLink($context->get('pageid'), $context->get('href'), $context->get('anchortext'));
 }
 function execute(CommandContext $context)
 {
     RequestRegistry::getPageMapper()->deleteSuggestedLink($context->get('suggestedlinkid'));
 }
 function execute(CommandContext $context)
 {
     $page = $context->get('page');
     $pageMapper = RequestRegistry::getPageMapper();
     $pageMapper->insert($page);
 }