Esempio n. 1
0
 function display()
 {
     current_page('index');
     $out = '';
     if (user('logged')) {
         $out .= '<div style="padding:20px;text-align:center;font-size:16px;"><a href="' . URL . '/page/client/">Скачать клиент!</a></div>';
         $out .= '<div style="padding:20px;text-align:center;font-size:16px;"><a href="' . URL . '/upload/">' . lang('fl_upload') . '</a></div>';
     } else {
         $out .= '<center>Welcommen!</center>';
     }
     return $out;
 }
Esempio n. 2
0
 function display()
 {
     current_page('upload');
     if (!user('logged')) {
         # Login req
         return login_req();
     }
     if (!@$_COOKIE['usid']) {
         setcookie('usid', md5(microtime(true) . mt_rand() . md5(sha1(time()) . microtime(true)) . mt_rand()), time() + 86400, '/', COOKIE_DOMAIN);
     } else {
         setcookie('usid', $_COOKIE['usid'], time() + 86400, '/', COOKIE_DOMAIN);
     }
     if (!$this->check_sid()) {
         // Generate new SID
         return $this->new_sid();
     }
     if (input(1, 'complete')) {
         return $this->complete();
     }
     if (input(1, 'final')) {
         return $this->get_final();
     }
     # Form - reset status
     if (ldb_select_one('upload', array('id'), $this->sid, 'code')) {
         return $this->new_sid();
     }
     # Default - show form
     $tpl = new ltpl('upload');
     # Get ext table
     $ext_t = '';
     $ext_js = array();
     if (cfg('ext_control')) {
         foreach ($GLOBALS['ext'] as $eg) {
             $ext_t .= '<div class="ext_t"><h3>' . $eg['t'] . ':</h3><ul>';
             foreach ($eg['d'] as $ed) {
                 $ext_t .= '<li><b>' . $ed[0] . '</b> (' . implode(', ', $ed[1]) . ')</li>';
                 $ext_js = array_merge($ext_js, $ed[1]);
             }
             $ext_t .= '</ul></div>';
         }
     }
     include_once CORE_PATH . '/ttl.php';
     $ttl_s = '';
     foreach ($GLOBALS['ttl'] as $tm => $tt) {
         $ttl_s .= '<option value="' . $tm . '"' . ($tm == $GLOBALS['ttl_def'] ? ' selected="selected"' : '') . '>' . $tt . '</option>';
     }
     $tpl->v('sid', $this->sid);
     $tpl->v('ext_t', $ext_t);
     $tpl->v('ext_js', '\'' . implode('\',\'', $ext_js) . '\'');
     $tpl->v('max_size', user_max_size());
     $tpl->v('ttl_sel', $ttl_s);
     return $tpl->get();
 }
Esempio n. 3
0
 function display()
 {
     current_page('page');
     if (!user('logged')) {
         return login_req();
     }
     $data = ldb_select_one('page', '*', input(1), 'name');
     if (!$data) {
         return core_error_404();
     }
     page_title($data['title']);
     site_title($data['title']);
     $out = '';
     $out .= $data['text'];
     return $out;
 }
Esempio n. 4
0
 function display()
 {
     current_page('files');
     page_title(lang('fl_mylist'), URL . '/files/');
     if (!user('logged')) {
         return login_req();
     }
     $data = ldb_select('upload', '*', '`uid`=' . user('id') . ' ORDER BY `tms_upload` DESC');
     $u_list = '';
     for ($x = 0; $x < count($data); $x++) {
         $f_title = '';
         if ($data[$x]['comment']) {
             $f_title = htmlspecialchars($data[$x]['comment']);
         } else {
             # Get files
             $f_list = ldb_select('file', array('file_name'), '`upid`=' . $data[$x]['id'] . ' ORDER BY `id`');
             $f_list_len = 0;
             $f_list_d = array();
             for ($a = 0; $a < count($f_list); $a++) {
                 $f_list_d[] = '<i>' . htmlspecialchars($f_list[$a]['file_name']) . '</i>';
                 $f_list_len += mb_strlen($f_list[$a]['file_name'], 'UTF-8');
                 if ($f_list_len > 50) {
                     break;
                 }
             }
             if (count($f_list_d) < count($f_list)) {
                 $f_list_d[] = '<b>...</b>';
             }
             $f_title = implode(', ', $f_list_d);
         }
         $f_title = trim($f_title);
         if (!$f_title) {
             $f_title = sprintf(lang('fld_title_n'), $data[$x]['id']);
         }
         $u_list .= '<tr>';
         $u_list .= '<td align="center">' . $data[$x]['id'] . '</td>';
         $u_list .= '<td align="left" class="mf-table-flink"><a href="' . URL . '/f/' . $data[$x]['code'] . '/">' . $f_title . '</a></td>';
         $u_list .= '<td align="center">' . date('d.m.Y H:i', $data[$x]['tms_upload']) . '</td>';
         $u_list .= '<td align="center">' . time_delete($data[$x]['tms_upload'], $data[$x]['tms_delete']) . '</td>';
         $u_list .= '<td align="center">' . format_size($data[$x]['file_size']) . '</td>';
         $u_list .= '</tr>';
     }
     $tpl = new ltpl('myfiles');
     $tpl->v('u_list', $u_list);
     return $tpl->get();
 }
 public function search_result($search, $filename)
 {
     function current_page($while_data)
     {
         $data = explode('src="http://pagead2.googlesyndication.com/pagead/show_ads.js">', getdata("http://www.lyrics007.com/search.php?q=" . replace_space($search) . "&page=" . $while_data, $curl));
         $data = explode('<a href="', $data[1]);
         $data = explode('Documents', $data[0]);
         $data = explode('..', $data[1]);
         return $data[0];
     }
     function all_page()
     {
         $data = explode('src="http://pagead2.googlesyndication.com/pagead/show_ads.js">', getdata("http://www.lyrics007.com/search.php?q=" . replace_space($search) . "&page=1", $curl));
         $data = explode('<a href="', $data[1]);
         $data = explode('total', $data[0]);
         $data = explode('found', $data[1]);
         return $data[0];
     }
     $getdata_page1 = getdata("http://www.lyrics007.com/search.php?q=" . replace_space($search) . "&page=1", $curl);
     if (strpos($getdata_page1, "No Results for '" . $_POST['lagu'] . "'")) {
         echo "<center>Either Mispelling or Search Not Found</center>";
     } else {
         $page = 1;
         while ($page <= 100) {
             $getdata_utama_search = getdata("http://www.lyrics007.com/search.php?q=" . replace_space($search) . "&page=" . $page, $curl);
             $getdata = explode('src="http://pagead2.googlesyndication.com/pagead/show_ads.js">', $getdata_utama_search);
             $getdata = explode('<div style="float:right;width:160px">', $getdata[1]);
             $getdata = explode('click.php?url=', $getdata[0]);
             foreach ($getdata as $pecah) {
                 $explode = explode('</strong>', $pecah);
                 $explode = explode('</script>', $explode[0]);
                 $explode = explode('</div>', $explode[0]);
                 $explode = explode('" target="_blank"><strong>', $explode[0]);
                 if (count($explode) != 1) {
                     $string = str_replace('http://www.lyrics007.com', '', $explode[0]) . ":" . $explode[1] . ":" . str_replace(".php", "", str_replace("_", ".", $filename));
                     echo "<center><a href='?lyrics=" . encode_url($string, "encode") . "'>" . $explode[1] . "</a><br></center>";
                 }
             }
             if (current_page($page) >= all_page()) {
                 $page = $page + 100;
             } else {
                 $page = $page + 1;
             }
         }
     }
 }
Esempio n. 6
0
/**
 * This function returns the provided menu. If no name is passed
 * navigation menu will load automatically.
 * 
 * @global object $Cbucket
 * @param array $params
 * @return string 
 */
function cbMenu($params = NULL)
{
    global $Cbucket;
    $name = $params['name'];
    if (!$name) {
        $name = 'navigation';
    }
    $menu = get_menu($name);
    $params['show_icons'] = $params['show_icons'] ? $params['show_icons'] : 'yes';
    if ($menu) {
        foreach ($menu as $item) {
            $continue = true;
            if ($item['section'] && !isSectionEnabled($item['section'])) {
                $continue = false;
            }
            if ($continue == true) {
                $selected = current_page(array('page' => $item['section']));
                $icon = '';
                $output .= '<li';
                $output .= " id='" . SEO(strtolower($name)) . "-" . $item['id'] . "' ";
                $classes = $params['class'] ? $params['class'] : '';
                if ($selected) {
                    $classes .= ' active';
                }
                $output .= " class='{$classes}'  ";
                if ($item['icon'] && $params['show_icons'] == 'yes') {
                    $icon = "<i class='" . $item['icon'] . "'></i> ";
                }
                $output .= "" . $params['extra_params'] ? $params['extra_params'] : '' . ">";
                $output .= "<a href='" . $item['link'] . "' target='" . $item['target'] . "'>" . $icon . $item['title'] . "</a>";
                $output .= "</li>";
            }
        }
        if ($params['assign']) {
            assign($params['assign'], $output);
        } else {
            return $output;
        }
    }
    //pr( $menu , true );
    //return $Cbucket->cbMenu($params);
}
<head>
	<meta charset="UTF-8">
	<title>Blog</title>

	<link rel="stylesheet" href="pure-release-0.6.0/pure-min.css">
	<link rel="stylesheet" href="pure-release-0.6.0/grids-responsive-min.css">

	<link rel="stylesheet" 	href="css/style.css">
	<link rel="stylesheet" href="css/blog.css">
	<link rel="stylesheet" 	href="css/nav-bar.css">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>
<body>
	<?php 
include_once "nav-bar.php";
current_page("News");
?>
	
	<section class="blog-splash">
		
	</section>
	<section>
		<div class="pure-g article-container">
			<div class="pure-u-2-5 pure-u-sm-6-24 pure-u-md-4-24 date-column">
				<ul class="date-container">
					<li class="month">Feb</li>
					<li class="num-day">4</li>
					<li class="year">2016</li>
				</ul>	
				<div class="green-line"></div>
			</div>
Esempio n. 8
0
 static function peep_prev()
 {
     self::debug('peep_prev : ');
     $prev = current_page() - 1;
     if ($prev < 0) {
         return false;
     }
     return $prev;
 }
Esempio n. 9
0
     unset($serialsortdirarray);
     unset($sortstring);
     //session_unregister($queryname);
     ${$queryname} = make_search_SQL($db, $tableinfo, $fields_table, $USER, $search, $sortstring, $listb['sql']);
     $r = $db->Execute(${$queryname});
     if (!isset($r)) {
         echo "{${$queryname}}.<br>";
         $db->debug = true;
         $r = $db->Execute(${$queryname});
         $db->debug = false;
     }
 }
 // set variables needed for paging
 $numrows = $r->RecordCount();
 // set the current page to what the user ordered
 ${$pagename} = current_page(${$pagename}, $tableinfo->short, $num_p_r, $numrows);
 // work around bug in adodb/mysql
 $r->Move(1);
 // set $rp->AtFirstPage and $rp->AtLastPage, will be used in nex-Previous buttons
 first_last_page($rp, ${$pagename}, $num_p_r, $numrows);
 // get variables for links
 $sid = SID;
 $actionLink = 'tablename=' . $tableinfo->name;
 if ($sid) {
     $actionLink .= '&amp;' . $sid;
 }
 // output javascript to cpature enter key and use it start Search:
 echo "<script type='text/javascript' language='JavaScript'>\n   function searchOnEnter(e) {\n      var pK = e? e.which: window.event.keyCode;\n      var node = (e.target) ? e.target : ((e.srcElement) ? e.srcElement : null);\n      if (pK == 13  && !(node.type==\"textarea\") ) {   \n         document.g_form.searchj.value=\"Search\"; \n         document.g_form.submit();\n      }\n   }\n   document.onkeypress = searchOnEnter;\n   if (document.layers)\n   document.captureEvents(Event.KEYPRESS);\n   </script>\n   ";
 // print form;
 //$dbstring=$PHP_SELF."?"."tablename=$tableinfo->name&";
 $formname = 'g_form';
Esempio n. 10
0
 function cbMenu($params = NULL)
 {
     $this->head_menu($params);
     if (!$params['tag']) {
         //$params['tag'] = 'li';
         if (!$params['class']) {
             $params['class'] = '';
         }
     }
     if (!isset($params['getSubTab'])) {
         $params['getSubTab'] = '';
     }
     if (!isset($params['parentTab'])) {
         $params['parentTab'] = '';
     }
     if (!isset($params['selectedTab'])) {
         $params['selectedTab'] = '';
     }
     $headMenu = $this->head_menu;
     $custom = isset($this->custom_menu) ? $this->custom_menu : false;
     if (is_array($custom)) {
         $headMenu = array_merge($headMenu, $custom);
     }
     /* Excluding tabs from menu */
     if (isset($params['exclude'])) {
         if (is_array($params['exclude'])) {
             $exclude = $params['exclude'];
         } else {
             $exclude = explode(",", $params['exclude']);
         }
         foreach ($headMenu as $key => $hm) {
             foreach ($exclude as $ex) {
                 $ex = trim($ex);
                 if (strtolower(trim($hm['name'])) == strtolower($ex)) {
                     unset($headMenu[$key]);
                 }
             }
         }
     }
     $main_menu = array();
     foreach ($headMenu as $menu) {
         if (isSectionEnabled($menu['this'])) {
             $selected = current_page(array("page" => $menu['this']));
             if ($selected) {
                 $menu['active'] = true;
             }
             $main_menu[] = $menu;
         }
     }
     $output = "";
     //if(($params['tag']))
     //		$output .= "<".$params['tag'].">";
     foreach ($main_menu as $menu) {
         $selected = getArrayValue($menu, 'active');
         $output .= "<li ";
         $output .= "id = 'cb" . $menu['name'] . "Tab'";
         $output .= " class = '";
         if ($params['class']) {
             $output .= $params['class'];
         }
         if ($selected) {
             $output .= " selected";
         }
         $output .= "'";
         if (isset($params['extra_params'])) {
             $output .= $params['extra_params'];
         }
         $output .= ">";
         $output .= "<a href='" . $menu['link'] . "'>";
         $output .= $menu['name'] . "</a>";
         $output .= "</li>";
     }
     //if(($params['tag']))
     //		$output .= "</".$params['tag'].">";
     if (SMARTY_VERSION < 3) {
         if ($params['echo']) {
             echo $output;
         } else {
             return $output;
         }
     } else {
         if (isset($params['echo'])) {
             echo $output;
         } else {
             return $main_menu;
         }
     }
 }
Esempio n. 11
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: common.tpl.php,v 1.121 2016-01-07 15:03:09 vtouchard Exp $
if (stristr($_SERVER['REQUEST_URI'], ".tpl.php")) {
    die("no access");
}
// Get current page...  pour marquer l'onglet...
if (!isset($current_alert)) {
    $current = current_page();
    $current_module = str_replace(".php", "", $current);
} else {
    $current_module = $current_alert;
}
if (!$current_module) {
    $current_module = "index";
}
require_once $class_path . "/sort.class.php";
function link_styles($style)
{
    // où $rep = répertoire de stockage des feuilles
    global $feuilles_style_deja_lu;
    if ($feuilles_style_deja_lu) {
        return $feuilles_style_deja_lu;
    }
    // mise en forme du répertoire
    global $styles_path;
    global $charset;
    if ($styles_path) {
Esempio n. 12
0
  <div class="span12 main-content">
    <?php 
    if (current_page() == 'support') {
        $message = get_current_network_status();
        if ($message != "") {
            echo "<div class='network-status'>{$message}</div>";
        }
    }
    ?>

    <?php 
    the_content();
    ?>

    <?php 
    if (current_page() == 'company/careers/careers') {
        ?>
      <?php 
        get_template_part('templates/pods', 'career-listing');
        ?>
    <?php 
    }
    ?>

    <?php 
    if (current_post_type() == 'career') {
        ?>
      <?php 
        get_template_part('templates/careers', 'custom-fields');
        ?>
    <?php 
Esempio n. 13
0
 function display()
 {
     current_page('f');
     page_title(lang('fl_mylist'), URL . '/files/');
     $out = '';
     $public = false;
     if (input(2)) {
         $public = true;
     }
     $sid = input(1);
     $u_data = ldb_select_one('upload', '*', $sid, 'code');
     if (!$u_data) {
         return core_error_404();
     }
     $GLOBALS['core']->public_wdg = !$public;
     if ($u_data['uid'] != user('id')) {
         if (!input(2, $u_data['ph'])) {
             return core_error_404();
         } else {
             # Public page view...
         }
     }
     $own = $u_data['uid'] == user('id');
     if ($own && @$_POST['sub_edit'] && @($_GET['k'] = md5(user('lk')))) {
         return $this->edit($u_data);
     }
     if ($own && @$_GET['del'] && @($_GET['k'] = md5(user('lk')))) {
         return $this->del($u_data);
     }
     page_title(sprintf(lang('fld_title_n'), $u_data['id']));
     $f_data = ldb_select('file', '*', '`upid`=' . $u_data['id']);
     $u_data['time_added'] = date('d.m.Y H:i', $u_data['tms_upload']);
     $u_data['time_del'] = time_delete($u_data['tms_upload'], $u_data['tms_delete']);
     $u_data['user'] = user_link($u_data['uid']);
     $u_data['descr'] = htmlspecialchars($u_data['comment']);
     $f_list = '';
     for ($x = 0; $x < count($f_data); $x++) {
         $f_link = URL . '/c/d/' . $u_data['code'] . '/' . $f_data[$x]['upn'] . '/' . $f_data[$x]['dh'] . '/' . htmlspecialchars($f_data[$x]['file_name']);
         $f_flink = URL . '/c/f/' . $u_data['code'] . '/' . $f_data[$x]['upn'] . '/' . $f_data[$x]['dh'] . '/' . htmlspecialchars($f_data[$x]['file_name']);
         $fd = $f_data[$x];
         $fd['size'] = format_size($fd['file_size']);
         $fd['name'] = htmlspecialchars($fd['file_name']);
         $tpl = new ltpl('download-file-item');
         $tpl->v('f', $fd);
         $tpl->v('f_link', $f_link);
         $tpl->v('f_link_f', $f_flink);
         # Get file icon
         $f_icon = get_icon($fd['file_ext']);
         $tpl->v('f_icon', $f_icon);
         $f_list .= $tpl->get();
     }
     include_once CORE_PATH . '/ttl.php';
     $ttl_s = '';
     foreach ($GLOBALS['ttl'] as $tm => $tt) {
         $ttl_s .= '<option value="' . $tm . '"' . ($tm == $u_data['ttl'] ? ' selected="selected"' : '') . '>' . $tt . '</option>';
     }
     $u_data['publink'] = URL . '/f/' . $u_data['code'] . '/' . $u_data['ph'] . '/';
     $tpl = new ltpl('download-file');
     $tpl->v('u_data', $u_data);
     $tpl->v('f_list', $f_list);
     $tpl->v('ttl_sel', $ttl_s);
     $tpl->v('own', $u_data['uid'] == user('id'));
     $out .= $tpl->get();
     return $out;
 }
	<meta charset="UTF-8">
	<title>Landing page</title>

	<link rel="stylesheet" href="pure-release-0.6.0/pure-min.css">
	<link rel="stylesheet" href="pure-release-0.6.0/grids-responsive-min.css">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
	
	<link rel="stylesheet" href="css/style.css">
	<link rel="stylesheet" href="css/nav-bar.css">
	<link rel="stylesheet" href="css/connections.css">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>
<body>
	<?php 
include_once "nav-bar.php";
current_page("Home");
?>

	<section class="splash-container">	
	<div class="splash-filter"></div>
		<div class="splash">			
			<h1 class="splash-title">A L L G O R H Y T H M</h1>

			<!-- <div class="splash-subtitle">
				<span>STUDIOS</span>
			</div>  -->
		</div>
		<canvas class="disable-select"></canvas>
	</section>

	<section class="main-content">
Esempio n. 15
0
<?php

/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if (!defined('IN_K')) {
    exit('No Access');
}
current_page('profile');
function cnt_sort($a, $b)
{
    return strnatcasecmp($a['data'], $b['data']);
}
class mod_user extends module_template
{
    function display()
    {
        // Viewprofile
        if (input(1) && is_numeric(input(1))) {
            return $this->show_user();
        }
        // Action
        if (!user('logged')) {
            // Try to login
            if (input(1, 'login')) {
                return $this->login();
            }
        }
        if (user('logged') && input(1, 'logout')) {
            // Try to log-out
Esempio n. 16
0
    }
    ?>


    <?php 
    if (current_post_type() == 'career') {
        ?>
      <?php 
        get_template_part('templates/careers', 'custom-fields');
        ?>
    <?php 
    }
    ?>

    <?php 
    if (current_page() == 'company/investors/news') {
        ?>
      <?php 
        get_template_part('templates/pods', 'news-listing');
        ?>
    <?php 
    }
    ?>
    
  </div>
  
</div>

<?php 
    get_template_part('templates/content', 'page-bottom');
    ?>
Esempio n. 17
0
  </div></div>
  <?php 
    }
    ?>
  <div class="row category-listing"><div class="">
     <?php 
    echo $content;
    ?>
  </div></div>
<?php 
}
?>

<?php 
if (current_page() == 'news') {
    ?>
    <?php 
    get_template_part('templates/pods', 'news-listing');
}
?>

<?php 
if (current_page() == 'press-releases') {
    ?>
    <?php 
    get_template_part('templates/pods', 'press-listing');
}
?>

<?php 
wp_link_pages(array('before' => '<nav class="pagination">', 'after' => '</nav>'));
	<meta charset="UTF-8">
	<title>About us </title>

	<link rel="stylesheet" href="pure-release-0.6.0/pure-min.css">
	<link rel="stylesheet" href="pure-release-0.6.0/grids-responsive-min.css">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
	
	<link rel="stylesheet" href="css/style.css">
	<link rel="stylesheet" href="css/nav-bar.css">

	<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
	<?php 
include_once "nav-bar.php";
current_page("About");
?>
			
	<h1>Meet  the  team</h1>

	<section class="main-content">
		<div class="pure-g">
			<div class="pure-u-1">
				<h3>Andy Chalk, News Writer</h3>

				<p>
					<strong>CAN </strong>Born and raised in the icy wastes of Canada, Andy Chalk has been playing videogames from the day he convinced his parents that owning a TRS-80 would help him learn to type, something his father considered a practical and valuable skill. He's particularly fond of RPGs and shooters these days but has a soft spot for less conventional fare as well, and makes a point of buying all his games in boxes. He lives amidst the tobacco fields of southwestern Ontario with his wife, dog and half-dozen cats, most of whom agree with him that the ending of Mass Effect 3 was just fine.
				</p>
			</div>
		</div>
	</section>
Esempio n. 19
0
function menu($file_name)
{
    // Берем имя файлаб парсим его по слешу
    // берем последний элемент - это имя самого файла
    // парсим по точке - первый элемент [0] - есть имя самого файла
    $delimiter = '\\';
    if ($_SERVER["HTTP_HOST"] == 'stroygradd.ru') {
        $delimiter = '/';
    }
    $way = explode($delimiter, $file_name);
    $last_element_number = sizeof($way) - 1;
    $elem = explode('.', $way[$last_element_number]);
    $elem = $elem[0];
    $index_page = "index.html";
    if ($_SERVER["HTTP_HOST"] == 'stroygradd.ru') {
        $index_page = 'http://stroygradd.ru';
    }
    ?>
        <li><a href="<?php 
    echo $index_page;
    ?>
"    <?php 
    current_page($elem, 'index');
    ?>
  >Главная</a></li>
        <li><a href="company.html"                  <?php 
    current_page($elem, 'company');
    ?>
  >О компании</a></li>
        <li><a href="begin.html"                    <?php 
    current_page($elem, 'begin');
    ?>
  >С чего начать?</a></li>
        <li><a href="project-help.html"             <?php 
    current_page($elem, 'project-help');
    ?>
>Выбор проекта</a></li>
        <li><a href="place-help.html"               <?php 
    current_page($elem, 'place-help');
    ?>
  >Выбор земельного участка</a></li>
        <li><a href="low.html"                      <?php 
    current_page($elem, 'low');
    ?>
  >Согласование проекта</a></li>
        <li><a href="start.html"                    <?php 
    current_page($elem, 'start');
    ?>
  >Начало строительства</a></li>
        <li><a href="news.html"                     <?php 
    current_page($elem, 'news');
    ?>
  >Новости</a></li>
        <li><a href="interview.html"                <?php 
    current_page($elem, 'interview');
    ?>
  >Интервью</a></li>
        
        <li class="multyline">
            <a href="album.html"                    <?php 
    current_page($elem, 'album');
    ?>
  >Фотоальбом (процесс&nbsp;строительства)</a>
        </li>
        <li class="multyline">
            <a href="primer.html"                   <?php 
    current_page($elem, 'primer');
    ?>
   >Примеры проектов с&nbsp;расчетом</a>
        </li>
        <li class="multyline">
            <a href="plans.html"                   <?php 
    current_page($elem, 'plans');
    ?>
   >Проекты домов</a>
        </li>
    <?php 
}
Esempio n. 20
0
defined('DIR_ROOT') || define('DIR_ROOT', realpath(dirname(__FILE__) . '/../') . '/');
defined('DIR_INCLUDE') || define('DIR_INCLUDE', realpath(dirname(__FILE__)) . '/');
defined('DIR_LIBS') || define('DIR_LIBS', realpath(dirname(__FILE__) . '/libs/') . '/');
defined('DIR_APP') || define('DIR_APP', realpath(dirname(__FILE__) . '/app/') . '/');
defined('DIR_UPLOAD') || define('DIR_UPLOAD', realpath(dirname(__FILE__) . '/../uploads/') . '/');
if (empty($_SERVER['REMOTE_ADDR']) || $_SERVER['REMOTE_ADDR'] == '127.0.0.1') {
    define('MYSQL_HOST', 'localhost');
    define('MYSQL_DATABASE', 'rangeen');
    define('MYSQL_USER', 'root');
    define('MYSQL_PASSWORD', '');
    error_reporting(E_ALL);
    error_reporting(E_ALL ^ E_NOTICE);
} else {
    define('MYSQL_HOST', 'localhost');
    define('MYSQL_USER', 'rangeen_isvet');
    define('MYSQL_PASSWORD', 'Livlafluv48!');
    define('MYSQL_DATABASE', 'rangeen_community');
}
require_once DIR_LIBS . 'mysql/dbFunctions.php';
$db_con = new CDatabase(MYSQL_DATABASE, MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD);
require_once DIR_INCLUDE . 'functions.php';
define('CURRENT_PAGE', current_page());
if (empty($_SESSION['logged_in']) && !empty($_COOKIE['uid'])) {
    $_SESSION['logged_in'] = 1;
    $_SESSION['uid'] = $_COOKIE['uid'];
    load_userdata($_COOKIE['uid']);
}
if (!empty($_SESSION['logged_in']) && empty($_SESSION['display_name'])) {
    load_userdata($_SESSION['uid']);
}
//echo md5(sha1('hello123'));
    $date = array('year' => $year, 'month' => $month, 'day' => $day);
    $skin = $prismic->get_skin();
    render($app, 'archive', array('posts' => $posts, 'date' => $date, 'skin' => $skin));
});
// Previews
$app->get('/preview', function () use($app, $prismic) {
    $token = $app->request()->params('token');
    $url = $prismic->get_api()->previewSession($token, $prismic->linkResolver, '/');
    $app->setCookie(Prismic\PREVIEW_COOKIE, $token, time() + 1800, '/', null, false, false);
    $app->response->redirect($url ? $url : '/', 301);
});
// RSS Feed,
// using the Suin RSS Writer library
$app->get('/feed', function () use($app, $prismic) {
    $blogUrl = $app->request()->getUrl();
    $posts = $prismic->get_posts(current_page($app))->getResults();
    $feed = new Feed();
    $channel = new Channel();
    $channel->title($prismic->config('site.title'))->description($prismic->config('site.description'))->url($blogUrl)->appendTo($feed);
    foreach ($posts as $post) {
        $item = new Item();
        $item->title($post->getText('post.title'))->description($post->getHtml('post.body', $prismic->linkResolver))->url($blogUrl . $prismic->linkResolver->resolveDocument($post))->pubDate($post->getDate('post.date')->asEpoch())->appendTo($channel);
    }
    echo $feed;
});
// --- DISQUS
$app->post('/disqus/threads/create', function () use($app, $prismic) {
    $title = $app->request->post('title');
    $identifier = $app->request->post('identifier');
    $apiKey = $prismic->config('disqus.apikey');
    $apiSecret = $prismic->config('disqus.apisecret');
Esempio n. 22
0
function get_category_listing_label()
{
    switch (current_page()) {
        case 'solutions':
            return "Solutions For Your Business";
            break;
        case 'services':
            return "Services For Your Business";
            break;
        case 'industries':
            return "Industries We Serve";
            break;
        case 'case-studies':
            return "Some Of Our Customers";
            break;
        case 'company/team-members':
            return "Alteva Executive Team";
            break;
        default:
            return "";
    }
}