<?php include_once 'html.php'; $data['current-page'] = $currentPage; if ($currentPage == 'product-page') { $data['product-detail'] = $productDetail; $data['spin-content'] = $spinContent; } $header = Html::get('main', 'header', $data); $footer = Html::get('main', 'footer', $data); switch ($currentPage) { case 'home-page': $home = homePage($productItems, $categoryList, $brandList); break; case 'product-page': $product = productPage($productDetail, $spinContent, $relatedProducts, $paging, $lastestSearch); break; case 'category-page': $category = categoryPage($category, $paging, $catType); break; case 'brand-page': $category = categoryPage($category, $paging, $catType); break; case 'categories-page': $categories = categoriesPage($categories, $paging, $catType); break; case 'brands-page': $categories = categoriesPage($categories, $paging, $catType); break; case 'html-sitemap-page': $htmlSitemap = htmlSitemapPage($categoryList, $brandList);
case "educations": $page = educationsPage(); break; case "contact": $page = contactPage(); break; default: $top = true; $middle = true; $page = homePage(); break; } } else { $top = true; $middle = true; $page = homePage(); } if ($top == true) { echo '<section class="top"><a href="https://app.studielink.nl/front-office/?brinCode=22EX" class="button">Direct aanmelden via Studielink</a></section>'; } if ($middle == true) { echo '<section class="mid"> <img src="./images/circle.png" height="100" width="100"></img> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> <p>Aenean scelerisque magna nibh. Nam ligula lectus,</p> <h4>-dasdsad</h4> </section>'; } ?> <section class="bottom"> <?php
// quick (and dirty) hack to ensure that there is always a '?' in the URL // we add it to ensure that a user is always logged in at chris/? or chris/experimental/? // if not, in collaboration mode it can happend that // user 1 is at: chris/ // user 2 is at: chris/? // then the collaboration is buggy if ($_SERVER["REQUEST_URI"][strlen($_SERVER["REQUEST_URI"]) - 1] !== '?') { header("Location: ?"); exit; } // update user-specific configuration // BACKGROUND if (isset($_SESSION['userconf']['general']) && isset($_SESSION['userconf']['general']['background'])) { $prefix = ''; if (dirname($_SESSION['userconf']['general']['background']) == '.') { $prefix .= 'users/' . $_SESSION['username'] . '/' . CHRIS_USERS_CONFIG_DIR . '/'; } $_SESSION['userconf']['general']['background'] = $prefix . $_SESSION['userconf']['general']['background']; } else { $_SESSION['userconf']['general']['background'] = "view/gfx/fnndsc_1920x1200.jpg"; } // EMAIL ADDRESS if (isset($_SESSION['userconf']['general']) && isset($_SESSION['userconf']['general']['email'])) { UserC::setEmail($_SESSION['userid'], $_SESSION['userconf']['general']['email']); } // show the homepage echo homePage(); exit; } // otherwise show the login screen echo loginPage();
<?php /** * Created by PhpStorm. * User: jokerwolf * Date: 14/10/15 * Time: 00:33 */ require_once $_SERVER['DOCUMENT_ROOT'] . '/server/resources/constants.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/server/error/index.php'; if (!isset($_POST['login']) || !isset($_POST['pwd'])) { errorPage(ERROR_MESSAGE_ENTER_LOGIN_PWD); exit; } if (accessGranted($_POST['login'], $_POST['pwd'])) { homePage(); } else { errorPage(ERROR_MESSAGE_WRONG_LOGIN_PWD); } function homePage() { header('Location: todo/'); } function accessGranted($login, $pwd) { return true; }
filesPage($webgbDao, $idCommunity); break; case 6: photoPage($webgbDao, $idCommunity); break; case 7: moviePage($webgbDao, $idCommunity); break; case 8: glossaryPage($webgbDao, $idCommunity, $filter); break; case 9: recordPage($webgbDao, $idCommunity); break; default: homePage($webgbDao, $idCommunity, $cam); break; } } echo '</div>'; } else { print_error('unspecifycourseid', 'error'); } echo $OUTPUT->footer(); function homePage($webgbDao, $idCommunity, $cam) { global $CFG, $USER, $OUTPUT; if ($cam) { include_once $CFG->dirroot . '/blocks/webgd_community/lib/camera/index.php'; } $linkCam = $CFG->wwwroot . "/blocks/webgd_community/view.php?community={$idCommunity}&cam=1";