Beispiel #1
0
 function setUp()
 {
     $options = new HessianOptions();
     $options->version = $this->version;
     $this->url = baseURL() . 'php_test_server.php';
     //echo "Testing in url $this->url<br>";
     $this->proxy = new HessianClient($this->url, $options);
 }
Beispiel #2
0
function getURL($url)
{
    if ($GLOBALS['config']['enable_mod_rewrite']) {
        return baseURL() . $url;
    } else {
        return baseURL() . "index.php/" . $url;
    }
}
Beispiel #3
0
 /**
  * 
  * @access private
  * @static
  * @return string
  */
 private static function _getRequest()
 {
     if (!Config::get('baseURL')) {
         showError('The baseURL is not defined on config file.', 'baseURL Not Defined', 500);
     }
     $url_path = parse_url(baseURL(), PHP_URL_PATH);
     $request = ltrim(rtrim(str_replace($url_path, '', $_SERVER['REQUEST_URI']), '/'), '/');
     return $request;
 }
Beispiel #4
0
function menu_prof()
{
    $prefix = baseURL();
    echo <<<EOF
<ul>
<li><a href="ajoutrendu.php">Ajout d'une livraison</a></li>
<li><a href="listerendus.php">Liste des livraisons</a></li>
<li><a href="{$prefix}/rss.php?id={$_SESSION['login']}">Flux RSS de vos dernières livraisons</a></li>
</ul>
EOF;
}
Beispiel #5
0
function redirect($uri = '', $method = 'location', $http_response_code = 302)
{
    if (!preg_match('#^https?://#i', $uri)) {
        $uri = baseURL() . "/" . $uri;
    }
    switch ($method) {
        case 'refresh':
            header("Refresh:0;url=" . $uri);
            break;
        default:
            header("Location: " . $uri, TRUE, $http_response_code);
            break;
    }
    exit;
}
Beispiel #6
0
 public function loadView($fileName, $data = array(), $return_string = false)
 {
     require_once CORE_DIR . '/rain.tpl.class.php';
     raintpl::configure("base_url", null);
     raintpl::configure("tpl_dir", APP_DIR . "/views/");
     raintpl::configure("cache_dir", APP_DIR . "/cache/");
     $tpl = new RainTPL();
     foreach ($data as $key => $val) {
         $tpl->assign($key, $val);
     }
     $tpl->assign("baseURL", baseURL());
     if ($return_string) {
         $html = $tpl->draw($fileName, true);
         return $html;
     } else {
         $tpl->draw($fileName, false);
     }
 }
Beispiel #7
0
echo $contentLayout;
?>
            
            <!-- footer layer start //-->
            <footer id="footer">
                <p><a href="<?php 
echo baseURL('about_us');
?>
">About Us</a> | <a href="<?php 
echo baseURL('privacy_policy');
?>
">Privacy Policy</a> | <a href="<?php 
echo baseURL('terms_of_use');
?>
">Term of Use</a> | <a href="<?php 
echo baseURL('contact');
?>
">Contact</a></p>
                <p>&copy; <?php 
echo Config::get('siteName', 'seo');
?>
 <?php 
echo date('Y');
?>
 &middot; Powered by <a href="http://www.ocads.org" title="Free Classifieds Script">ocAds</a></p>
            </footer>
            <!-- footer layer end //-->
        </div>
        <!-- wrap layer end //-->
    </body>
</html>
Beispiel #8
0
/**
 * Implements hook_civicrm_dashboard().
 *
 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_dashboard
 */
function tournament_civicrm_dashboard($contactID, &$contentPlacement)
{
    //TODO restrict this dashboard by access rights
    //       if (!CRM_Core_Permission::check('administer reserved groups')) {
    //         CRM_Core_Error::statusBounce(ts("You do not have sufficient permission to change settings for this reserved group."));
    //       }
    // Insert custom content above activities
    $contentPlacement = CRM_Utils_Hook::DASHBOARD_ABOVE;
    $cid = CRM_Utils_Request::retrieve('bid', 'Positive', $this);
    if (!isset($cid)) {
        $cid = $contactID;
    }
    $session = CRM_Core_Session::singleton();
    $session->set('billing_contact_id', $cid);
    $contact = contact_get($cid);
    $profile = named_profile_get("Billing Individual Profile");
    $currentUserHREF = profileEditHREF($profile, $contact);
    $currentUserHTML = "Welcome, {$currentUserHREF}. The links on this page (and the Tournament navigation menu above) will guide you through the steps of tournament registration." . "<p>If you are new to this system, the first step is to double-check your contact information. You probably only need to do this once, ever.<p>";
    //The links on this 'dash";
    $billingOrgsHTML = "The next step is to double-check your organization's contact information. You probably only need to do this once, ever. <p>This is also where you submit your Preliminary Estimates. You do need to do this once per tournament, in January.</p>You are a contact for these organizations:<ol>";
    $billingOrgs = billing_organizations_get($cid);
    $profile = named_profile_get("Billing Organization Profile");
    foreach ($billingOrgs as $contact) {
        $billingOrgsHTML .= "<li>" . profileEditHREF($profile, $contact) . "</li>";
    }
    $billingOrgsHTML .= "</ol>";
    $registrationProfilesHTML = "The next step is to enter contacts for your group(s). You probably only need to do this once per contact, ever." . "<p>This only enters them into the database. it doesn't mean they are committed to attending a tournament.</p>" . "You have access to contacts in these groups:<ol>";
    $registrationProfiles = get_registrationProfiles($cid);
    foreach ($registrationProfiles as $profile) {
        $registrationProfilesHTML .= "<li>" . $profile['title'] . "<ul>";
        $registrationProfilesHTML .= "<li>" . profileListHREF($profile) . "</li>";
        $registrationProfilesHTML .= "<li>" . profileCreateHREF($profile) . "</li>";
        $registrationProfilesHTML .= "</li></ul>";
    }
    $registrationProfilesHTML .= "</ol>";
    $registerParticipantHTML = "Once you have entered all the contacts for your group(s), you can register them to attend the tournament. Be sure to indicate which competitions they will enter. That's important for the team registration step. <ul>" . "<li><a href = \"" . baseURL() . registrationRelativeURL() . "\">Use this link to register a contact for the tournament</a>.</li>" . "<li><a href = \"" . baseURL() . registrationReportRelativeURL() . "\">Use this link to list/edit contacts already registered for the tournament</a>.</li>" . "</ul>";
    $buildTeamsHTML = "Once you have registered all the players for your district/league, you can combine them into teams.<ul>" . "<li><a href = \"" . baseURL() . newTeamRelativeURL() . "\">Use this link to start a start a new team</a>.</li>" . "<li><a href = \"" . baseURL() . listTeamsRelativeURL() . "\">Use this link to list/edit your teams</a>.</li>" . "</ul>";
    return array('1. Your Contact Data' => $currentUserHTML, '2. Billing Organizations (e.g., School Districts)' => $billingOrgsHTML, '3. Contacts (Players, coaches, etc.)' => $registrationProfilesHTML, '4. Register Contacts for Tournament' => $registerParticipantHTML, '5. Combine Registered Players into Teams' => $buildTeamsHTML);
}
Beispiel #9
0
 /**
  * 
  * @param array $params
  * @param boolean $page Default is TRUE
  * @param array $extend Extra params field. Default is NULL
  * @param boolean $rss Default is FALSE
  * @return string
  */
 function searchLink($params, $page = TRUE, $extend = NULL, $rss = FALSE)
 {
     if ($rss === FALSE) {
         $link = 'searchLink';
     } else {
         $link = 'rssLink';
     }
     $str = makeParams($params, $page, $extend);
     return baseURL(Route::get_config('searchLink', 'route') . ($str ? '?' . $str : ''));
 }
Beispiel #10
0
         } else {
             echo "<div class='info'>Manque le paramètre idFichier.</div>\n";
         }
     }
 }
 $row = DB::request_one_row("SELECT code, titre, COUNT(idFichier) C, notification FROM rendu R LEFT OUTER JOIN fichier F ON R.idRendu=F.idRendu WHERE R.idRendu=? GROUP BY F.idRendu", array($idRendu));
 if (!$row) {
     die("Mauvais ID de livraison.");
 }
 echo "<h1>Livraison&nbsp;: " . htmlspecialchars($row->titre) . "</h1>\n";
 echo "<h2>Spécifications</h2>\n";
 echo "<table class='rendu_summary'>\n";
 # Code
 echo "<tr><td><img src='img/icon_code.png' alt='Code'></td><td>Code</td><td>" . $row->code . "</td></tr>\n";
 # URL
 $url = baseURL() . "?code=" . $row->code;
 $notification = $row->notification;
 echo "<tr><td><img src='img/icon_url.png' alt='URL'></td><td>URL</td> <td><a href='{$url}'>{$url}</a></td></tr>\n";
 # Fichiers
 echo "<tr><td><img src='img/icon_file.png' alt='Files'></td><td>Fichiers ({$row->C})</td>\n<td>\n";
 $res = DB::request("SELECT nom, script, idFichier, optionnel FROM fichier WHERE idRendu=? ORDER BY idFichier", array($idRendu));
 echo "<form action='voirrendu.php?id={$idRendu}&amp;do=filemod' method='POST'>\n";
 echo "<table class='filelist'>";
 echo "<tr><th>Intitulé</th><th>Script vérificateur</th><th>Optionnel</th><th></th></tr>";
 $formInserted = FALSE;
 while ($row = $res->fetch()) {
     if (isset($_GET["modFichier"]) && $_GET["modFichier"] == $row->idFichier) {
         insertFileEditRow($row->nom, $row->script, $row->optionnel, $row->idFichier);
         $formInserted = TRUE;
     } else {
         echo "<tr><td>{$row->nom}</td><td>{$row->script}</td><td>" . ($row->optionnel ? "✓" : "") . "</td><td>" . "<a href='voirrendu.php?id={$idRendu}&amp;modFichier={$row->idFichier}' class='btn_mod_file'><img src='img/icon_edit.png' alt='Modifier'></a>" . "<a href='voirrendu.php?id={$idRendu}&amp;idFichier={$row->idFichier}&amp;do=filedel' class='btn_del_file'><img src='img/icon_trash.png' alt='Supprimer'></a>" . "</td></tr>\n";
Beispiel #11
0
                        <div class="clear">&nbsp;</div>
                        
                        <h2>Do we disclose any information to outside parties?</h2>

                        <p>We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect our rights, property, or safety, or those of others. However, non-personally identifiable visitor information may be provided to other parties for marketing, advertising, or other uses.</p>

                        <div class="clear">&nbsp;</div>
                        
                        <h2>Third party links</h2>

                        <p>Occasionally, at our discretion, we may include or offer third party products or services on our website. These third party sites have separate and independent privacy policies. We therefore have no responsibility or liability for the content and activities of these linked sites. Nonetheless, we seek to protect the integrity of our site and welcome any feedback about these sites.</p>

                        <div class="clear">&nbsp;</div>
                        
                        <h2>Changes to our Privacy Policy</h2>

                        <p>If we decide to change our privacy policy, we will post those changes on this page.</p>

                        <div class="clear">&nbsp;</div>
                        
                        <h2>Contacting Us</h2>

                        <p>If you have any questions regarding this privacy policy, you may <a href="<?php 
echo baseURL('contact_us');
?>
">contact us here</a>.</p>
                    </div>
                </div>
            </section>
            <!-- content layer end //-->
Beispiel #12
0
            </header>
            <!-- home header layer end //-->
            <!-- content layer start //-->
            <section id="content">
                <div class="static">
                    <h1>Terms of Use</h1>
                    <?php 
echo $sidebarLayout;
?>
                    <div class="staticContent">
                        <h2>PLEASE READ THESE TERMS OF USE CAREFULLY, AS THEY CONTAIN IMPORTANT INFORMATION REGARDING YOUR LEGAL RIGHTS AND REMEDIES.</h2>
                        
                        <div class="clear">&nbsp;</div>
                        
                        <p>Welcome to our website. If you continue to browse and use this website you are agreeing to comply with and be bound by the following terms and conditions of use, which together with our <a href="<?php 
echo baseURL('privacy_policy');
?>
">privacy policy</a> govern <?php 
echo Config::get('siteName', 'seo');
?>
&rsquo;s relationship with you in relation to this website.</p>

                        <p>The term &ldquo;<?php 
echo Config::get('siteName', 'seo');
?>
&rdquo; or &ldquo;us&rdquo; or &ldquo;we&rdquo; refers to the owner of the website. The term &ldquo;you&rdquo; refers to the user or viewer of our website.</p>

                        <p>The use of this website is subject to the following terms of use:</p>

                        <ul>
                                <li>The content of the pages of this website is for your general information and use only. It is subject to change without notice.</li>
Beispiel #13
0
/**
 * Pages list and page meta data gathering function
 */
function pageslist($location)
{
    $metas = parse_ini_file($location . 'pages' . EXT_INI, true, INI_SCANNER_RAW);
    $pages = array();
    foreach ($metas as $name => $meta) {
        $page = $meta;
        $page['name'] = $name;
        $page['path'] = baseURL();
        $pages[$name] = $page;
    }
    return $pages;
}
Beispiel #14
0
<?php

include_once 'base_test.php';
echo '<h4>HessianPHP 2 Unit tests (protocol v1)</h4>';
echo "Url " . baseURL() . 'php_test_server.php';
class Hessian1Tests extends BaseHessianTests
{
    var $version = 1;
}
Beispiel #15
0
function redirect($loc)
{
    header('Location: ' . baseURL() . $loc);
    exit;
}
Beispiel #16
0
 /**
  * 
  * @param array $data
  * @param array $getData
  * @return string
  */
 public function getRSS($data = array(), $getData = array())
 {
     Loader::helper('XML');
     $dom = xmlDOM();
     $rss = xmlAddChild($dom, 'rss');
     xmlSetAttribute($rss, 'version', '2.0');
     xmlSetAttribute($rss, 'xmlns:dc', 'http://purl.org/dc/elements/1.1/');
     xmlSetAttribute($rss, 'xmlns:sy', 'http://purl.org/rss/1.0/modules/syndication/');
     xmlSetAttribute($rss, 'xmlns:admin', 'http://webns.net/mvcb/');
     xmlSetAttribute($rss, 'xmlns:rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
     xmlSetAttribute($rss, 'xmlns:content', 'http://purl.org/rss/1.0/modules/content/');
     xmlSetAttribute($rss, 'xmlns:media', 'http://search.yahoo.com/mrss/');
     $channel = xmlAddChild($rss, 'channel');
     xmlAddChild($channel, 'title', Config::get('siteName', 'seo'));
     xmlAddChild($channel, 'link', baseURL());
     xmlAddChild($channel, 'description', Config::get('siteDesc', 'seo'));
     xmlAddChild($channel, 'dc:language', 'en-en');
     $atom = xmlAddChild($channel, 'atom10:link');
     xmlSetAttribute($atom, 'xmlns:atom10', 'http://www.w3.org/2005/Atom');
     xmlSetAttribute($atom, 'href', searchLink($getData, TRUE, NULL, TRUE));
     xmlSetAttribute($atom, 'rel', 'self');
     xmlSetAttribute($atom, 'type', 'application/rss+xml');
     if (isset($data['items'])) {
         foreach ($data['items'] as $entry) {
             $item = xmlAddChild($channel, 'item');
             xmlAddChild($item, 'title', xmlConvert(filterText($entry->title)), TRUE);
             $itemLink = itemLink($entry->hash);
             xmlAddChild($item, 'link', $itemLink);
             xmlAddChild($item, 'guid', $itemLink);
             xmlAddChild($item, 'description', filterText($entry->content, TRUE, TRUE), TRUE);
             xmlAddChild($item, 'pubDate', date('D, d M Y H:i:s O', $entry->time));
             if ($entry->picture) {
                 $media = xmlAddChild($item, 'media:thumbnail');
                 xmlSetAttribute($media, 'url', $entry->picture);
                 xmlSetAttribute($media, 'width', '120');
                 xmlSetAttribute($media, 'height', '100');
             }
         }
     }
     return xmlPrint($dom, TRUE);
 }
Beispiel #17
0
 /**
  * 
  * @static
  * @param string $js
  * @return void
  */
 public static function js($js)
 {
     if (filter_var($js, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)) {
         self::$_js[] = $js;
     } else {
         self::$_js[] = baseURL($js);
     }
 }
Beispiel #18
0
echo $config['description'];
?>
">
  <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,400|Anonymous+Pro:400,400italic&amp;subset=latin-ext,latin" rel="stylesheet" type="text/css">
  <link rel="stylesheet" type="text/css" href="./css/main.css">
  <link rel="alternate" type="application/atom+xml" href="./feed.php?posts" title="<?php 
echo $config['title'];
?>
">
  <script type="text/javascript">
    /* analytics etc. */
  </script> 
</head>
<body>
	<?php 
$root = baseURL();
?>
  <div id="header"><?php 
echo $config['title'];
?>
</div>
  <div id="menu">
    <div class="nav">
		<?php 
echo '<a href="' . $root . '">' . $lang['home'] . '</a>' . '<a href="' . $root . 'index.php?posts">' . $lang['posts'] . '</a>' . '<a href="' . $root . 'index.php?comments">' . $lang['comments'] . '</a>';
if (isAdmin()) {
    echo '<a href="' . $root . 'index.php?drafts">' . $lang['drafts'] . '</a>' . '<a href="' . $root . 'add.php?draft">' . $lang['newDraft'] . '</a>';
}
?>
    </div>
    <div class="ctl">
Beispiel #19
0
//Create and initialize common data registry object
$data = new stdClass();
$data->admin = false;
$data->pagename = false;
$data->page = false;
$data->template = false;
$data->content = false;
$data->warnings = array();
$data->layout = 'main';
$data->language = 'en';
//Load Site Config
loadConfig(PATH_SITE, 'site', $data);
//Get pages list
$data->pages = pageslist(PATH_PAGES);
//Determine request path
$data->baseURL = baseURL();
$path = trim(str_replace($data->baseURL, '', baseURI()));
//Determine request target
$data->target = explode(DS, str_replace(EXT_HTML, '', $path));
//Determine request type
$service_path = PATH_SERVICES . $data->target[0] . EXT_PHP;
if (file_exists($service_path)) {
    //Get request method
    $data->method = $_SERVER['REQUEST_METHOD'];
    if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
        $data->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
    }
    //Set service name
    $data->servicename = $data->target[0];
    include_once $service_path;
}
function php2js()
{
    $json = !empty($_GET) ? json_encode($_GET) : '{}';
    return "\r\n\t\t\t<script type='text/javascript'>\r\n\t\t\t\tvar __GET = {$json};\r\n\t\t\t\tvar __URL = '" . fullURL() . "';\r\n\t\t\t\tvar __BASE_URL = '" . baseURL() . "';\r\n\t\t\t\t\r\n\t\t\t\tfunction _toURLstring(){\r\n\t\t\t\t\treturn jQuery.param(__GET);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfunction _buildNewString(){\r\n\t\t\t\t\treturn __BASE_URL+'/?'+_toURLstring();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfunction _makeQueryURL(){\r\n\t\t\t\t\twindow.location = _buildNewString();\r\n\t\t\t\t}\r\n\t\t\t</script>\r\n\t\t";
}
Beispiel #21
0
                                </div>
                                <div class="formPart">
                                    <label for="fEmail">Your email</label>
                                    <input type="text" name="email" id="fEmail" value="<?php 
echo filterText(Input::post('email'));
?>
" class="inputText">
                                </div>
                                <div class="formPart">
                                    <label for="fMessage">Your message</label>
                                    <textarea name="message" id="fMessage" class="inputTextArea"><?php 
echo filterText(Input::post('message'));
?>
</textarea>
                                </div>
                                <div class="formPart">
                                    <label for="fCaptcha">Captcha</label>
                                    <img src="<?php 
echo baseURL('captcha');
?>
" alt="Captcha"> &nbsp; <input type="text" name="captcha" id="fCaptcha" value="" class="inputCaptcha">
                                </div>
                                <div class="formPart">
                                    <button class="inputSubmit">Send</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </section>
            <!-- content layer end //-->
Beispiel #22
0
<div class="container">
            <a href="<?php 
echo baseURL();
?>
"><img src="<?php 
echo baseURL('assets/img/logo-large.gif');
?>
" alt="Home Page"></a>
            <h1>Opps!</h1>
            <h2><?php 
echo $heading;
?>
</h2>
            <p><?php 
echo $message;
?>
</p>
        </div>
Beispiel #23
0
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCtgj1kQZnFLNOQaOkX1fB6Tu_ZeZXzGNI&sensor=false"></script>
<script type="text/javascript">
	function initialize() {
		var mapOptions = {
			zoom : 15,
			scrollwheel : false,
			center : new google.maps.LatLng(47.232435,39.730486),
			mapTypeId : google.maps.MapTypeId.ROADMAP
		}
		var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
		var image = '<?php 
echo baseURL("img/interface/map_mark.png");
?>
';
		var myLatLng = new google.maps.LatLng(47.232435,39.730486);
		var beachMarker = new google.maps.Marker({
			position : myLatLng,
			map : map,
			icon : image
		});
	}
	initialize();
</script>
Beispiel #24
0
/**
 * build HREF from base URL, token, record id, link title, and record name
 *
 * @param $token string
 * @param $title string
 * @param $id long
 * @param $name string
 * @return string
 */
function tokenIDHREF($token, $title, $name)
{
    $baseURL = baseURL();
    return "<a title=\"{$title}\" href=\"{$baseURL}{$token}\">{$name}</a>";
}
Beispiel #25
0
}
require 'config/config.php';
require 'config/language.php';
require 'include/db.php';
require 'include/util.php';
require 'include/ui.php';
session_start();
if (!isset($_SESSION['role'])) {
    $_SESSION['role'] = '';
}
function home()
{
    redirect('.');
}
// $_GET = urlPath();
$out['baseURL'] = baseURL();
$out['content'] = '';
$out['error'] = '';
// Links
$out['addLink'] .= isAdmin() ? '<a href="./add.php?link" class="add"></a>' : '';
$out['linkListItems'] .= '';
$links = listEntry('links');
if ($links) {
    foreach ($links as $link) {
        $linkEntry = readEntry('links', $link);
        $out['linkListItems'] .= '<li><a href="' . $linkEntry['url'] . '">' . $linkEntry['name'] . '</a>' . manageLink($link) . '</li>';
    }
}
// Tags
$out['addTag'] .= isAdmin() ? '<a href="./add.php?tag" class="add"></a>' : '';
$out['tagLinks'] .= '';
Beispiel #26
0
function assetURL($path)
{
    // others rely on this
    return baseURL() . "assets/{$path}";
}
Beispiel #27
0
echo filterText($headingLayout);
?>
</h1>
                    <div class="rssLink">
                        <p><a href="<?php 
echo searchLink($params, FALSE, NULL, TRUE);
?>
" title="RSS Feed"><i class="rssIcon"></i> RSS Feed</a></p>
                    </div>
                </header>
                <!-- search title end //-->
                <!-- search filter begin //-->
                <aside id="searchFilter">
                    <h2>Filter your search</h2>
                    <form id="filterForm" method="get" action="<?php 
echo baseURL(Route::get_config('searchLink', 'route'));
?>
">
                        <?php 
if (!Config::get('searchKeyword', 'search')) {
    ?>
                        <div class="filterPart">
                            <label for="fQuery">Search for</label>
                            <input type="text" name="query" id="fQuery" value="<?php 
    echo filterText($params['query']);
    ?>
" class="inputText">
                        </div>
                        <?php 
}
?>
Beispiel #28
0
<?php

require './parts/product/product.php';
// Define the root folder and base URL for the application
function baseURL()
{
    return sprintf("%s://%s%s", isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http', $_SERVER['SERVER_NAME'], dirname($_SERVER['REQUEST_URI']));
}
define('BASE_URL', baseURL());
define('RB_ROOT', dirname(__FILE__));
$page = isset($_GET['page']) ? $_GET['page'] : 'fashion-v1';
$layout = isset($_GET['layout']) ? $_GET['layout'] : 'fluid';
if ($page == 'box') {
    $layout = 'boxed';
}
$pages = array('fashion-v1' => 'Fashion-v1', 'fashion-v2' => 'Fashion-v2', 'fashion-v3' => 'Fashion-v3', 'fashion-v3' => 'Fashion-v4', 'fashion-v3' => 'Fashion-v5', 'fashion-v3' => 'Fashion-v6', 'blog-single' => 'Blog Single', 'blog' => 'Blog', 'box' => 'Box', 'cart' => 'Cart', 'checkout' => 'Checkout', 'contact-us' => 'Contact Us', 'details-v1' => 'Detail V1', 'details-v2' => 'Detail V2', 'digital' => 'Digital', 'food' => 'Food', 'furniture' => 'Furniture', 'category-v1' => 'category V1', 'category-v2' => 'category V2', 'category-v3' => 'category V3', 'handtools' => 'Handtools');
$pageTitle = isset($pages[$page]) ? $pages[$page] . ' | ' : '';
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php 
echo $pageTitle;
?>
RimBus</title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">