Exemplo n.º 1
0
<main>
	<nav>
	    <ul>
		   <?php 
create_nav("nav");
?>
 
		</ul>
	</nav>
	<aside>
	    <ul>
	       <?php 
create_nav("aside");
?>
		   <section id="warenkorb">
		   	<?php 
echo $_SESSION['cart']->renderSidebar();
?>
		   </section>
	    </ul>
	</aside>
	<article id="mainArticle">
		<section id="content" >
			<?php 
include $innerTpl;
?>
		</section>
	</article>	
</main>
Exemplo n.º 2
0
<?php

session_start();
// Aloitetaan istunto.
require_once 'kokonaisuudet/asetukset/tietokantayhteys.php';
require_once 'kokonaisuudet/yhteiset/php_yhteismetodit.php';
load_files("home");
$head = create_head();
$nav = create_nav();
$footer = create_footer();
$content = create_content();
$content_container = Html::luo_div($content, array(Attr::classs("container text-center")));
$html = Html::luo_body($head . $nav . $content_container . $footer, array());
$doc = Html::luo_html($html, array());
echo $doc;
//===================== Funktiot ===========================================
/**
 * Creates the html for head element with addresses for Bootstrap.
 * @return type
 */
function create_head()
{
    $text = Html::luo_head(Html::luo_title(Tekstit::$home_title, array()) . Html::luo_link_to_stylesheet("http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css") . Html::luo_link_to_stylesheet("css/etusivutyylit.css") . Html::luo_script_to_js("https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js") . Html::luo_script_to_js("http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js") . Html::luo_meta(array(Attr::charset("utf-8"))) . Html::luo_meta(array(Attr::name("viewport"), Attr::content("width=device-width, initial-scale=1"))), array());
    return $text;
}
/**
 * Creates the html for the main content.
 */
function create_content()
{
    $content = Html::luo_div(Html::luo_div(Html::luo_div(Html::luo_otsikko(Tekstit::$home_heading_main, array(Attr::classs("")), 1) . Html::luo_p(Tekstit::$home_wellcome_text, array()), array(Attr::classs("col-sm-12"))), array(Attr::classs("row"))) . Html::luo_div(Html::luo_div(Html::luo_div(Html::luo_otsikko(ucwords(Tekstit::$oppiaine_nimi_MA), array(Attr::classs("")), 3) . create_links_of_subject(Oppiaineet::$MA), array(Attr::classs("well"))), array(Attr::classs("col-sm-4"))) . Html::luo_div(Html::luo_div(Html::luo_otsikko(ucwords(Tekstit::$oppiaine_nimi_TT), array(Attr::classs("")), 3) . create_links_of_subject(Oppiaineet::$TT), array(Attr::classs("well"))), array(Attr::classs("col-sm-4"))) . Html::luo_div(Html::luo_div(Html::luo_otsikko(ucwords(Tekstit::$oppiaine_nimi_FY), array(Attr::classs("")), 3) . create_links_of_subject(Oppiaineet::$FY), array(Attr::classs("well"))), array(Attr::classs("col-sm-4"))), array(Attr::classs("row"))), array(Attr::classs("container text-center")));