Example #1
0
 /**
  * Allows you to apply a Template to this controller.
  *
  * @param $ctr The name of the template controller or the object it self
  */
 public function applyTemplateController($ctr)
 {
     if ($ctr instanceof TemplateController) {
         $this->templateController = $ctr;
         array_merge($this->settings, $this->templateController->getSettings());
         $lang = $this->templateController->getLanguageStrings();
         if ($lang != null) {
             if ($this->language == null) {
                 $this->language = new Language();
             }
         }
         $this->language->merge($lang);
     } else {
         $this->templateController = SubViews::getInstance()->getSubView($ctr);
     }
 }
Example #2
0
<?php

\OWeb\manage\SubViews::getInstance()->getSubView('Controller\\articles\\widgets\\show_article\\Def')->addParams('article', $this->article)->addParams('short', $this->short)->addParams('image_level', $this->image_level)->display();
echo $this->getBBHtml('[title=h1]' . $this->l('pros_cons') . '[/title]');
?>

<div class="pros_cons uk-grid">
    <div class="Pros uk-width-1-2">
        <ul>
            <?php 
$pros = explode('*', $this->article->getAttribute("pros"));
foreach ($pros as $v) {
    if ($v != "") {
        echo "<li><span>{$v}</span></li>";
    }
}
?>
        </ul>
    </div>

    <div class="Cons uk-width-1-2">
        <ul>
            <?php 
$pros = explode('*', $this->article->getAttribute("cons"));
foreach ($pros as $v) {
    if ($v != "") {
        echo "<li><span>{$v}</span></li>";
    }
}
?>
        </ul>
<div class="uk-width-1-4">
    <div class="uk-panel uk-panel-box  uk-margin-top">
			<h3>Categories</h3>
			<?php 
$catTree = \OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\OWeb\\widgets\\TreeList');
$catTree->addParams('tree', $this->cats)->addParams('class', 'articles_category')->addParams('classes', array('articles_category_1'))->addParams('link', $this->url(array('page' => 'programs\\Categorie', "catId" => "")));
//->addParams('link', 'test');
$catTree->display();
?>
	</div>
</div>
Example #4
0
$this->addHeader('articles.css', \OWeb\manage\Headers::css);
$this->addHeader('onprogress.css', \OWeb\manage\Headers::css);
$this->addHeader('programs.css', \OWeb\manage\Headers::css);
?>


<p> <?php 
\OWeb\manage\SubViews::getInstance()->getSubView('Controller\\OWeb\\widgets\\Category_Parents')->addParams('cat', $this->category)->addParams('link', $this->url(array('page' => 'programs\\Categorie', "catId" => "")))->display();
?>
</p>
<h1><?php 
echo $this->category->getName();
?>
 </h1>
    <div  class="programs">

<?php 
$prog_display = \OWeb\manage\SubViews::getInstance()->getSubView('Controller\\programs\\widgets\\ProgramCard');
$box_display = \OWeb\manage\SubViews::getInstance()->getSubView('Controller\\OWeb\\widgets\\Box');
$box_display->addParams('ctr', $prog_display)->addParams('SecondBoxHeight', 500)->addParams('Html Class', 'programBox');
foreach ($this->programs as $program) {
    $prog_display->addParams('prog', $program);
    $box_display->addParams('SecondBoxContent', $program->getShortDescription("eng"));
    $box_display->display();
}
?>
        </div>


Example #5
0
 *
 * PHP version 5.3 and above
 *
 * LICENSE: This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see {http://www.gnu.org/licenses/}.
 */
$this->addHeader('2Collone.css', \OWeb\manage\Headers::css);
?>
<div class="uk-grid" >
    <div class="uk-width-3-4">
        <div>
            <?php 
$this->displayController();
?>
        </div>
    </div>
    <?php 
$catTree = \OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\programs\\widgets\\ColloneDroite');
$catTree->addParams('cats', \Model\programs\Categories::getInstance())->display();
?>
</div>
Example #6
0
<?php

$error = \OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\OWeb\\Error');
$error->addParams('Title', "404")->addParams('Description', 'This page couldn\' be found. It might have been deleted')->addParams('img', OWEB_HTML_DIR_CSS . '/_OWeb/errors/images/NotFound.jpg');
$error->display();
Example #7
0
<div class="uk-panel uk-panel-box uk-margin-top">
<?php 
\OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\articles\\widgets\\Article_Title')->addParams('article', $this->article)->display();
\OWeb\manage\SubViews::getInstance()->getSubView('Controller\\articles\\widgets\\show_article\\' . $this->article->getType())->addParams('article', $this->article)->addParams('short', false)->addParams('image_level', 2)->display();
?>
</div>
Example #8
0
 public function __construct(&$get, &$post, &$files, &$cookies, &$server, $adr)
 {
     $this->get_runTime();
     //Checking if There is an older instance. If yes Exception.
     if (self::$instance != null) {
         throw new Exception("Only 1 instance of OWeb can run.");
     } else {
         self::$instance = $this;
     }
     error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
     //Variables d'environement
     $this->_get = $get;
     $this->_post = $post;
     $this->_files = $files;
     $this->_cookies = $cookies;
     $this->_server = $server;
     $this->_adresse = $adr;
     //Initializing AutoLoader.
     $this->autoLoader = new autoLoader();
     //Initialize Events manager
     $this->manage_events = \OWeb\manage\Events::getInstance();
     //Initialize headers manager
     $this->manage_headers = \OWeb\manage\Headers::getInstance();
     //Initialize Extension manager
     $this->manage_extensions = \OWeb\manage\Extensions::getInstance();
     //Initialize Controller manager
     $this->manage_controllers = \OWeb\manage\Controller::getInstance();
     //Initialize SubView manager
     $this->manage_subViews = \OWeb\manage\SubViews::getInstance();
     //Initialize Setting Manager
     $this->manage_settings = \OWeb\manage\Settings::getInstance();
 }
Example #9
0
<div class="program_info uk-grid">

    <div class="uk-width-1-2">
        <?php 
$prog_display = \OWeb\manage\SubViews::getInstance()->getSubView('Controller\\programs\\widgets\\ProgramCard');
$box_program = \OWeb\manage\SubViews::getInstance()->getSubView('Controller\\OWeb\\widgets\\Box');
$box_program->addParams('ctr', $prog_display)->addParams('SecondBoxHeight', 500)->addParams('Html Class', 'programBox');
$prog_display->addParams('prog', $this->program);
$box_program->display();
?>
    </div>
    <div class="uk-width-1-2">
        <?php 
$box_download = \OWeb\manage\SubViews::getInstance()->getSubView('Controller\\OWeb\\widgets\\Box');
$dwld_display = \OWeb\manage\SubViews::getInstance()->getSubView('Controller\\programs\\widgets\\Downloads');
$dwld_display->addParams('prog', $this->program);
$box_download->addParams('ctr', $dwld_display)->addParams('Html Class', 'DwldBox');
$box_download->display();
?>
    </div>

    <div class="uk-width-1-1 Description">

        <?php 
$tabs_display = new \Controller\OWeb\widgets\uikit\SwitcherTabs();
$tabs_display->init();
//Adding Program description
if ($this->program->getDesc_article() == null) {
    $tabs_display->addSection($this->l('Description'), $this->program->getShortDescription('eng'));
} else {
Example #10
0
<?php

$this->addHeader('articles.css', \OWeb\manage\Headers::css);
$diplay_title = \OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\articles\\widgets\\Article_Title');
$display_content = \OWeb\manage\SubViews::getInstance()->getSubView('Controller\\articles\\widgets\\show_article\\Def');
if (!isset($this->showCatHeader) || $this->showCatHeader) {
    \OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\articles\\widgets\\Category_Description')->addParams('categories', $this->cats)->addParams('catId', $this->mcat->getId())->display();
}
// Articles -->
$nbArticle = 0;
if (is_array($this->articles)) {
    foreach ($this->articles as $article) {
        ?>
        <div class="uk-panel uk-panel-box  uk-margin-top">
            <?php 
        $diplay_title->addParams('article', $article)->display();
        $display_content->addParams('short', true)->addParams('image_level', 1)->addParams('article', $article)->display();
        $nbArticle++;
        ?>
        </div>
    <?php 
    }
}
$nbArticleShown = $nbArticle + $this->cpage * $this->nbElementPage;
?>
<div class="pageNb">
    <?php 
\OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\OWeb\\widgets\\MultiPage')->addParams('link', $this->CurrentUrl())->addParams('cpage', $this->cpage)->addParams('pname', 'npage')->addParams('lpage', $this->nbArticle / $this->nbElementPage)->display();
?>
</div>
Example #11
0
<?php

/**
 * @author      Oliver de Cramer (oliverde8 at gmail.com)
 * @copyright    GNU GENERAL PUBLIC LICENSE
 *                     Version 3, 29 June 2007
 *
 * PHP version 5.3 and above
 *
 * LICENSE: This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see {http://www.gnu.org/licenses/}.
 */
$changeLog = \OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\programs\\widgets\\ChangeLog');
foreach ($this->versions as $ver) {
    echo '<h3>' . $ver->getName() . '</h3>';
    $changeLog->setVersion($ver)->display();
}

<div class="categoryDescription">
	<p>
		<h3 class="categoryDescription">
			<?php 
\OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\OWeb\\widgets\\Category_Parents')->addParams('cat', $this->mcat)->addParams('link', $this->url(array('page' => 'articles\\Categorie', "catId" => "")))->display();
?>
		</h3>
		<h1 class="categoryDescription">
			<?php 
echo $this->mcat->getName();
?>
		</h1>
	</p>

	<?php 
if ($this->mcat->getImg() != NULL) {
    ?>
			<img class="categoryDescription" src="<?php 
    echo OWEB_HTML_URL_IMG . "/" . $this->mcat->getImg();
    ?>
" />
	<?php 
}
if ($this->mcat->getDescription() != "") {
    ?>
	<p>
		<?php 
    echo $this->mcat->getDescription();
    ?>
Example #13
0
?>
_tabs-1" data-title="<?php 
echo $this->article->getTitle($lang);
?>
"  >

				<?php 
if ($img_found) {
    echo '<img class="article_logo uk-float-right ' . $img_class . '"src = "' . $img_url . '" />';
}
?>

				<p>
				<?php 
if (!$this->short) {
    \OWeb\manage\SubViews::getInstance()->getSubView('\\Controller\\articles\\widgets\\Article_tree')->addParams('values', \Extension\bbcode\SBBCodeParser::$tree)->display();
    echo $content;
    echo '</p>';
} else {
    echo $content;
    ?>
		
						...
						</p>

						<p class="readmore"><a href="<?php 
    echo $link;
    ?>
">
							<?php 
    echo $this->l('readMore');