ACC SHELL
<?php
class Page_Sablony {
function Head($url) {
$sSql = "SELECT * FROM eq_category WHERE url = '" . $url . "'";
$data = $this->query_fetch_assoc($sSql);
$open_graph = '';
if ($data) {
$sImgUrl = "http://{$_SERVER["SERVER_NAME"]}" .
substr($_SERVER["SCRIPT_NAME"], 0, strrpos($_SERVER["SCRIPT_NAME"], "/") + 1) .
"data/img1_big/{$data["foto1"]}";
$sPageUrl = "http://{$_SERVER["SERVER_NAME"]}{$_SERVER['SCRIPT_NAME']}?{$_SERVER['QUERY_STRING']}";
$open_graph .= "<meta property='og:url' content='" . $sPageUrl . "' />
<meta property='og:description' content='" . str_replace(array("\n", "\r"), '', $data["description"]) . "' />
<meta property='og:type' content='article' />
<meta property='og:title' content='" . $data["name"] . "'/>
<meta property='og:site_name' content='Equinox-bikes' />
<meta property='og:image' content='" . $sImgUrl . "'/>";
$this->data['name'] = $data['name'];
}
$end = "<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='cs'>
<head>
<title>".$this->data['name']." | EQUINOX</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<meta http-equiv='Content-Language' content='cs' />
<meta name='description' content='Carbon bike wheels directly from the manufacturer. Certified by UCI, proven by worldclass athletes. Light, stiff and aerodynamic.' />
".$open_graph."
<link rel='stylesheet' href='css/style.css?013' type='text/css' media='screen' />
<link href='favicon.png' rel='icon' type='image/png' />
<script type='text/javascript' src='js/js.js'></script>
<script type='text/javascript' src='js/jquery.min.js'></script>
<script type='text/javascript' src='js/jquery-ui.min.js'></script>
<script type='text/javascript' src='js/jquery.fancybox-1.3.4.js'></script>
<script type='text/javascript' src='js/jquery.easing-1.3.pack.js'></script>
<script type='text/javascript' src='js/jquery.dumbcrossfade-2.0.js'></script>
<script type='text/javascript' src='js/jquery.stickyfloat.js'></script>
<script type='text/javascript' src='js/jquery.colorbox.js'></script>
<script type='text/javascript' src='js/jquery.tabs.js'></script>
<script type='text/javascript' src='js/scripts.js?001'></script>
<link rel='stylesheet' href='css/coin-slider-styles.css' type='text/css' />
<link rel='stylesheet' href='css/sifr.css' type='text/css'/>
<link rel='stylesheet' href='css/colorbox.css' type='text/css'/>
<link rel='stylesheet' href='css/jquery.tabs.css' type='text/css' media='print, projection, screen' />
<link rel='stylesheet' href='css/jquery.fancybox-1.3.4.css' type='text/css'/>
<!--[if lt IE 7]>
<link rel='stylesheet' href='css/ie7.css' type='text/css' media='projection, screen' />
<![endif]-->
<!-- Additional IE/Win specific style sheet (Conditional Comments) -->
<!--[if lte IE 7]>
<link rel='stylesheet' href='css/jquery.tabs-ie.css' type='text/css' media='projection, screen' />
<![endif]-->
<!--[if lt IE 7]>
<script type='text/javascript'>
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById('hlpIE');
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=='LI') {
node.onmouseover=function() {
this.className+=' over';
}
node.onmouseout=function() {
this.className=this.className.replace(' over', '');
}
}
}
}
}
window.onload=startList;
</script>
<![endif]-->
<script type='text/javascript' src='js/sifr.js'></script>
<script type='text/javascript' src='js/sifr-debug.js'></script>
<script type='text/javascript' src='js/sifr-config.js'></script>
<script type='text/javascript'>
$(function(){
// Tabs
$('#tabs').tabs();
});
$(document).ready(function() {
$('li').hover(function(){
sIFR.replace(futura, {
selector: 'h2',
wmode: 'transparent',
css: [
'.sIFR-root { color: #FD0000; font-size: 14px; }'
]
});
});
$(\"a[rel='g1']\").colorbox();
$('.galleryfull a').colorbox();
$('.isocerf a').colorbox();
$('.order-button').click(function() {
var button = $(this);
$.colorbox({
href: '#order-colorbox',
inline: true,
onComplete: function() {
$('#starttime').val(Date.now());
$('#produkt').val(button.attr('data-product'));
// Form Validation
$('#order-form').submit(function() {
if ($('#name').val() == '' || $('#surname').val() == '' || $('#email').val() == '' || $('#phone').val() == '' || $('#street').val() == '' || $('#city').val() == '') {
alert('Please, fill in the required fields. Thank you.');
return false;
}
$('#endtime').val(Date.now());
$(this).attr('action', 'send-order-mail.php');
return true;
});
}
});
});
$('#mainbanner div').dumbCrossFade({ 'slideType':'fade','doHoverPause': false, 'showTime': 4000, 'transitionTime': 2000 });
if ($('#whymenu').length) { // implies *not* zero
$('#whymenu').stickyfloat({ duration: 400 });
}
});
</script>
<!-- Begin Cookie Consent plugin by Silktide - http://silktide.com/cookieconsent -->
<script type=\"text/javascript\">
window.cookieconsent_options = {\"message\":\"This website uses cookies to ensure you get the best experience on our website\",\"dismiss\":\"Got it!\",\"learnMore\":\"More info\",\"link\":\"https://www.google.com/intl/cs/policies/technologies/cookies/\",\"theme\":\"dark-bottom\"};
</script>
<script type=\"text/javascript\" src=\"//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.9/cookieconsent.min.js\"></script>
<!-- End Cookie Consent plugin -->
</head>
<body class='body".mt_rand(0, 4)."'>
<div id='fb-root'></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = '//connect.facebook.net/cs_CZ/all.js#xfbml=1&appId=702446016448894';
fjs.parentNode.insertBefore(js, fjs);
}
(document, 'script', 'facebook-jssdk'));
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
</script>";
session_start();
if (isset($_SESSION["order"])) {
$message = ($_SESSION["order"] ? 'Order was successfully sent.' : 'Something went wrong and order was not sent, please get in touch with us at info@eqnx.co.');
$end .= '<script>
$(document).ready(function() {
alert("'.$message.'\n\nThank you and have a safe ride.\nEquinox Team");
});
</script>';
unset($_SESSION["order"]);
}
if (isset($_SESSION["newsletter"]) && $_SESSION["newsletter"] == 1) {
$_SESSION["newsletter"] = 0;
$end .= '<script>
$(document).ready(function() {
alert("Email was successfully saved");
});
</script>';
}
return $end;
}
function Top() {
$_SESSION["bLink"] = 0;
// echo file_get_contents("inc/whyChooseEquinox.php"); die;
$end = '<div id="top">
<a href="./" class="logo"><img src="img2/logo.png" alt="Equinox - Road wheels"/></a>
<div class="fb-like-btn"><div class="fb-like" data-href="https://www.facebook.com/EquinoxWheels" data-layout="button" data-action="like" data-show-faces="true" data-share="false"></div></div>
<div class="links">
<a href="news.php" class="a4"><span>NEWS</span></a>
<a href="warranty-conditions.php" class="a5"><span>customer service</span></a>
<a href="distributors.php" class="a2"><span>distributors</span></a>
</div>
<div class="about">
<a href="#" class="a3" onclick="showOrHideBlok(\'box\')"><span>why choose equinox</span></a>
<div class="box" id="box" style="display:none;">' .
file_get_contents("inc/whyChooseEquinox.php") .
' </div>
</div>
</div>';
return $end;
}
function Bottom() {
$remarketing = '
<!-- Google Code for Značka pro remarketing -->
<!-- Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. For instructions on adding this tag and more information on the above requirements, read the setup guide: google.com/ads/remarketingsetup -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 984174972;
var google_conversion_label = "GWl4CPyh3wUQ_KKl1QM";
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/984174972/?value=0&label=GWl4CPyh3wUQ_KKl1QM&guid=ON&script=0"/>
</div>
</noscript>
<!-- Google Code for 360 -->
<!-- Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. For instructions on adding this tag and more information on the above requirements, read the setup guide: google.com/ads/remarketingsetup -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 984174972;
var google_conversion_label = "6UBMCPSi3wUQ_KKl1QM";
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/984174972/?value=0&label=6UBMCPSi3wUQ_KKl1QM&guid=ON&script=0"/>
</div>
</noscript>
<!-- Google Code for 180 -->
<!-- Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. For instructions on adding this tag and more information on the above requirements, read the setup guide: google.com/ads/remarketingsetup -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 984174972;
var google_conversion_label = "gCVaCOyj3wUQ_KKl1QM";
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/984174972/?value=0&label=gCVaCOyj3wUQ_KKl1QM&guid=ON&script=0"/>
</div>
</noscript>
<!-- Google Code for 90 -->
<!-- Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. For instructions on adding this tag and more information on the above requirements, read the setup guide: google.com/ads/remarketingsetup -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 984174972;
var google_conversion_label = "8h1UCOSk3wUQ_KKl1QM";
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/984174972/?value=0&label=8h1UCOSk3wUQ_KKl1QM&guid=ON&script=0"/>
</div>
</noscript>
<!-- Google Code for 30 -->
<!-- Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. For instructions on adding this tag and more information on the above requirements, read the setup guide: google.com/ads/remarketingsetup -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 984174972;
var google_conversion_label = "cdhoCNyl3wUQ_KKl1QM";
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/984174972/?value=0&label=cdhoCNyl3wUQ_KKl1QM&guid=ON&script=0"/>
</div>
</noscript>';
$end = "<div id='bottom'>
<!--<div class='menu'><a href='./'>HOME</a> / <a href='distributors.php?id=13'>CONTACT</a></div>-->
<div class='copyright'>© Equinox Europe 2015, <a href='http://old.eqnx.co'>old website</a> <!--design <a href='http://www.cyril-metodej.cz/'>Cyril & Metoděj</a>--></div>
<div class='soc'>
<a href='/data/pdf/EQU-catalog.pdf' class='download-catalogue'><img src='img2/download-catalogue.png' width='200' height='36' alt='Download Catalogue'></a>
<a href='https://www.instagram.com/equinoxwheels/' class='ig out' title='Instagram'></a>
<a href='https://twitter.com/EquinoxWheels' class='tw out' title='Twitter'></a>
<a href='http://www.youtube.com/user/EquinoxWheels' class='yt out' title='YouTube'></a>
<a href='http://www.pinterest.com/EquinoxWheels' class='pin out' title='Pinterest'></a>
<a href='http://www.linkedin.com/company/equinox-wheels' class='in out' title='Linkedin'></a>
</div>
</div>
<!--<div id='newsletter-colorbox-obal'>
<div id='newsletter-open' onclick='hideNewsletterForm()'></div>
<div id='newsletter-close' onclick='displayNewsletterForm()'></div>
<div id='newsletter-colorbox'>
<p>
Receive fresh updates every now and then.<br />
Come on. It will be worth it.
</p>
<form id='newsletter-form' method='post'>
<input type='text' id='www-newsletter' name='www' value='' />
<input type='text' id='newsletter-email'
name='newsletter-email' class='placeholder'
value='email' />
<div id='submit' onclick='validateNewsletterForm()'></div>
</form>
</div>
</div>-->
<script type='text/javascript'>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1058339-17']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-65131307-4', 'auto');
ga('send', 'pageview');
</script>
".$remarketing."
</body></html>";
return $end;
}
function Body($stranka,$akt) {
$end = "";
return $end;
}
function ProductsList($id) {
$sSql = "SELECT *
FROM eq_products
WHERE id_cat='$id'
ORDER BY poradi";
$dataProducts = $this->query_fetch_assoc_all($sSql);
/* $sSql = "SELECT name
FROM eq_category
WHERE id = '$id'";
$dataCategory = $this->query_fetch_assoc($sSql); */
$end = '';
for ($i = 0; $i<count($dataProducts); $i++) {
// $sNazev = "{$dataCategory["name"]} {$dataProducts[$i]["name"]}";
$sNazev = "{$dataProducts[$i]["name"]}";
$end .= '<li>
<a href="products.php?' . $dataProducts[$i]['url'] . '">
<span>></span> '. $sNazev .
'</a>
</li>';
}
return $end;
}
function CategoryBenefits($sBenefits) {
$aBenefits = explode("- ", $sBenefits);
$sBenefits = "";
if (count($aBenefits) > 1) {
$sBenefits = '<p>
Benefits:
<ul class="benefitsList">';
for ($i = 1; $i < count($aBenefits); $i++) {
$sBenefits .= "<li>{$aBenefits[$i]}</li>";
}
$sBenefits .= '</ul>
</p>';
}
return $sBenefits;
}
function MainMenu() {
$TB = $this->tbl['category'];
$frames = $this->query_fetch_assoc_all("SELECT * FROM $TB WHERE `group`='7' ORDER BY poradi ASC");
$road = $this->query_fetch_assoc_all("SELECT * FROM $TB WHERE `group` IN (1,2) ORDER BY `group` ASC, poradi ASC");
$mtb = $this->query_fetch_assoc_all("SELECT * FROM $TB WHERE `group`='3' ORDER BY poradi ASC");
$time_trial = $this->query_fetch_assoc_all("SELECT * FROM $TB WHERE `group`='4' ORDER BY poradi ASC");
$end = '<div id="menu">
<ul id="hlpIE">
<!--<li class="m1">
<a href="frames"><span>Frames</span></a>
<div class="submenu submenu-category">
<table><tr>';
for ($i = 0; $i < count($frames); $i++) {
$end .= '<td><figure>
<img src="data/categories/' . $frames[$i]["logo"] . '" />
<span class="category-subtitle">'.$frames[$i]['subtitle'].'</span>
<a href="'.$frames[$i]["url"].'"><img src="data/categories/' . $frames[$i]["foto"] . '?02" width="220" height="220" class="category-logo" /></a>
</figure></td>';
}
$end .= '</tr></table>
</div>
</li>-->
<li class="m2">
<a href="road"><span>Road</span></a>
<div class="submenu submenu-category">
<table><tr>';
for ($i = 0; $i < count($road); $i++) {
$end .= '<td><figure>
<img src="data/categories/' . $road[$i]["logo"] . '" />
<span class="category-subtitle">'.$road[$i]['subtitle'].'</span>
<a href="'.$road[$i]["url"].'"><img src="data/categories/' . $road[$i]["foto"] . '?02" width="220" height="220" /></a>
</figure></td>';
}
$end .= '</tr></table>
</div>
</li>
<li class="m3">
<a href="mtb"><span>MTB</span></a>
<div class="submenu submenu-category">
<table><tr>';
for ($i = 0; $i < count($mtb); $i++) {
$end .= '<td><figure>
<img src="data/categories/' . $mtb[$i]["logo"] . '" />
<span class="category-subtitle">'.$mtb[$i]['subtitle'].'</span>
<a href="'.$mtb[$i]["url"].'"><img src="data/categories/' . $mtb[$i]["foto"] . '?02" width="220" height="220" /></a>
</figure></td>';
}
$end .= '</tr></table>
</div>
</li>
<li class="m4">
<a href="time-trial"><span>Time Trial</span></a>
<div class="submenu submenu-category">
<table><tr>';
for ($i = 0; $i < count($time_trial); $i++) {
$end .= '<td><figure>
<img src="data/categories/' . $time_trial[$i]["logo"] . '" />
<span class="category-subtitle">'.$time_trial[$i]['subtitle'].'</span>
<a href="'.$time_trial[$i]["url"].'"><img src="data/categories/' . $time_trial[$i]["foto"] . '?02" width="220" height="220" /></a>
</figure></td>';
}
$end .= '</tr></table>
</div>
</li>
<li class="m5">
<a href="accessories"><span>ACCESSORIES</span></a>
</li>
</ul>
<ul class="languages">';
if ($_SERVER['HTTP_HOST'] === 'old.eqnx.co') {
$end .= '<li class="selected"><a href="http://www.eqnx.co?lang=en" class="flag-en"><span>ENG</span></a></li>
<li><a href="http://de.eqnx.co?lang=de" class="flag-de"><span>GER</span></a></li>
<li><a href="http://old.eqnx.co?lang=cs" class="flag-cs"><span>CZE</span></a></li>';
}
elseif ($_SERVER['HTTP_HOST'] === 'de.eqnx.co') {
$end .= '<li class="selected"><a href="http://www.eqnx.co?lang=en" class="flag-en"><span>ENG</span></a></li>
<li><a href="http://old.eqnx.co?lang=cs" class="flag-cs"><span>CZE</span></a></li>
<li><a href="http://de.eqnx.co?lang=de" class="flag-de"><span>GER</span></a></li>';
}
else {
$end .= '<li class="selected"><a href="http://old.eqnx.co?lang=cs" class="flag-cs"><span>CZE</span></a></li>
<li><a href="http://de.eqnx.co?lang=de" class="flag-de"><span>GER</span></a></li>
<li><a href="http://www.eqnx.co?lang=en" class="flag-en"><span>ENG</span></a></li>';
}
$end .= '</ul>
</div>';
return $end;
}
function Product($url) {
$nIdx = strpos($url, "&");
if ($nIdx > 0) {
$url = substr($url, 0, $nIdx);
}
$TB_c = $this->tbl['category'];
$TB_p = $this->tbl['products'];
$TB_r = $this->tbl['parameters'];
$data=$this->query_fetch_assoc("SELECT * FROM $TB_p WHERE url='$url'");
$categ=$this->query_fetch_assoc("SELECT * FROM $TB_c WHERE id='".$data['id_cat']."'");
$sImgUrl = "http://{$_SERVER["SERVER_NAME"]}" .
substr($_SERVER["SCRIPT_NAME"], 0, strrpos($_SERVER["SCRIPT_NAME"], "/") + 1) .
"data/img1/{$data["foto1"]}";
$sScriptUrl = "http://{$_SERVER["SERVER_NAME"]}{$_SERVER["SCRIPT_NAME"]}";
$texy = new Texy();
$sPageUrl = "http://{$_SERVER["SERVER_NAME"]}{$_SERVER['SCRIPT_NAME']}?{$_SERVER['QUERY_STRING']}";
$sDescriptionPinterest =
"{$categ["name"]} {$data["name"]}. {$categ["description"]}";
$sPrice = (intval($data["price"]) > 0) ? (substr($data["price"], -3) == '.00' ? substr($data["price"], 0, -3) : $data["price"])." €" : "on demand";
// echo $sPageUrl; die;
$end = "<div id='text'><div class='produkt'>
<div class='nahled'>
<a rel='g1' title='" . $data['foto1_alt']."'
href='data/img1_big/" . $data['foto1']."'>
<img src='data/img1/" . $data['foto1']."'
width='320' height='400'
alt='" . $data["foto1_alt"] . "'/>
</a>
<center>
<div id='nahled-order'>
<span id='price-title'>PRICE:</span>
<span id='price'>" . $sPrice . "</span>
<hr id='hr-order'/>
<button class='order-button' data-product='".$categ['name'].' '.$data["name"]."'>Order</button>
<div id='social-buttons'>
<div class='fb-like' data-href='" . $sPageUrl . "'
data-width='280' data-colorscheme='light'
data-show-faces='true' data-layout='button_count'
data-action='recommend' data-send='false'>
</div>
<div class='twitter-like'>
<a href='https://twitter.com/share'
class='twitter-share-button'
data-text=''
data-via='ryvova'
data-lang='cs'>
Tweet
</a>
</div>
<div class='pinterest-like'>
<a href='//pinterest.com/pin/create/button/?" .
"url=" . $sScriptUrl .
"&media=" . urlencode($sImgUrl) .
"&description=" . urlencode($sDescriptionPinterest) . "'
data-pin-do='buttonPin' data-pin-config='beside'>
<img src='" . $data["foto1"] . "' />
</a>
</div>
</div>
</div>
</center>
</div>
<div class='detail'>
<h1>" . $data['name'] . "</h1>";
if ($categ["name"] == "ACCESSORIES") {
$end .= "<div class='product-line-description'>
".$texy->process(stripslashes(trim($data['overview'])))."
".$texy->process(stripslashes(trim($data['benefits'])))."
</div>";
}
$end .= "<div id='tabs'>
<!--<ul class='menuZ'>
<li><a href='#tabs-1'>Benefits</a></li>
<li><a href='#tabs-2'>Specifications</a></li>
</ul>-->";
$end .= "<div id='tabs-1'>
".$texy->process(stripslashes(trim($categ['benefits'])))."
<br/>
<div class='galleryfull'>
".(!empty($data['foto2'])?"<a rel='g1' title='".$data['foto2_alt']."' class='p1' href='data/img2_big/".$data['foto2']."'><img src='data/img2/".$data['foto2']."' alt='" . $data["foto2"] . "' width='112' height='140' /><span>".$data['foto2_alt']."</span></a>":"")."
".(!empty($data['foto3'])?"<a rel='g1' title='".$data['foto3_alt']."' class='p1' href='data/img3_big/".$data['foto3']."'><img src='data/img3/".$data['foto3']."' alt='" . $data["foto3"] . "' width='112' height='140'/><span>".$data['foto3_alt']."</span></a>":"")."
".(!empty($data['foto4'])?"<a rel='g1' title='".$data['foto4_alt']."' class='p1' href='data/img4_big/".$data['foto4']."'><img src='data/img4/".$data['foto4']."' alt='" . $data["foto4"] . "' width='112' height='140' /><span>".$data['foto4_alt']."</span></a>":"")."
".(!empty($data['foto5'])?"<a rel='g1' title='".$data['foto5_alt']."' class='p1' href='data/img5_big/".$data['foto5']."'><img src='data/img5/".$data['foto5']."' alt='" . $data["foto5"] . "' width='112' height='140'/><span>".$data['foto5_alt']."</span></a>":"")."
</div>
<div class='galleryfull'>
".(!empty($data['foto6'])?"<a rel='g1' title='".$data['foto6_alt']."' class='p1' href='data/img6_big/".$data['foto6']."'><img src='data/img6/".$data['foto6']."' alt='" . $data["foto6"] . "' width='112' height='140'/><span>".$data['foto6_alt']."</span></a>":"")."
".(!empty($data['foto7'])?"<a rel='g1' title='".$data['foto7_alt']."' class='p1' href='data/img7_big/".$data['foto7']."'><img src='data/img7/".$data['foto7']."' alt='" . $data["foto7"] . "' width='112' height='140'/><span>".$data['foto7_alt']."</span></a>":"")."
".(!empty($data['foto8'])?"<a rel='g1' title='".$data['foto8_alt']."' class='p1' href='data/img8_big/".$data['foto8']."'><img src='data/img8/".$data['foto8']."' alt='" . $data["foto8"] . "' width='112' height='140'/><span>".$data['foto8_alt']."</span></a>":"")."
".(!empty($data['foto9'])?"<a rel='g1' title='".$data['foto9_alt']."' class='p1' href='data/img9_big/".$data['foto9']."'><img src='data/img9/".$data['foto9']."' alt='" . $data["foto9"] . "' width='112' height='140'/><span>".$data['foto9_alt']."</span></a>":"")."
</div>
</div>
<!--<div id='tabs-2'>
".Page_Sablony::Parameters($data['id'])."
</div>-->
<!--<div id='tabs-3'>
".$texy->process(stripslashes(trim($data['benefits'])))."
</div>-->
</div>
</div>
<a href='".($categ['name'] == 'ACCESSORIES' ? 'accessories-'.$data['next'] : 'products.php?'.$data['next'])."' class='next'><span>next</span></a>
<a href='".($categ['name'] == 'ACCESSORIES' ? 'accessories-'.$data['prev'] : 'products.php?'.$data['prev'])."' class='prev'><span>prev</span></a>
</div></div>" .
Page_Sablony::Order($categ['name'] . ' ' . $data["name"]);
// $end.= Page_Sablony::Others($data['id']);
return $end;
}
function ProductsCategory($category) {
switch ($category)
{
case 'frames':
// TODO: new products category – frames
$products = $this->query_fetch_assoc_all('SELECT * FROM '.$this->tbl['category'].' WHERE `group` = 7 ORDER BY poradi ASC');
$this->data['name'] = 'Frames';
break;
case 'road':
$products = $this->query_fetch_assoc_all('SELECT * FROM '.$this->tbl['category'].' WHERE `group` IN (1, 2) ORDER BY `group` ASC, poradi ASC');
$this->data['name'] = 'Road';
break;
case 'road-steel':
$products = $this->query_fetch_assoc_all('SELECT * FROM '.$this->tbl['category'].' WHERE `group` = 1 ORDER BY poradi ASC');
$this->data['name'] = 'Road Steel Spoke';
break;
case 'road-carbon':
$products = $this->query_fetch_assoc_all('SELECT * FROM '.$this->tbl['category'].' WHERE `group` = 2 ORDER BY poradi ASC');
$this->data['name'] = 'Road Carbon Spoke';
break;
case 'mtb':
$products = $this->query_fetch_assoc_all('SELECT * FROM '.$this->tbl['category'].' WHERE `group` = 3 ORDER BY poradi ASC');
$this->data['name'] = 'MTB';
break;
case 'time-trial':
$products = $this->query_fetch_assoc_all('SELECT * FROM '.$this->tbl['category'].' WHERE `group` = 4 ORDER BY poradi ASC');
$this->data['name'] = 'Time Trial';
break;
case 'accessories':
$accessories_category = $this->query_fetch_assoc('SELECT * FROM '.$this->tbl['category'].' WHERE `group` = 5');
$products = $this->query_fetch_assoc_all('SELECT * FROM '.$this->tbl['products'].' WHERE id_cat = '.$accessories_category['id'].' ORDER BY poradi ASC');
foreach ($products as $i => $product)
{
$products[$i]['url'] = 'accessories-'.$product['url'];
}
$this->data['name'] = 'Accessories';
break;
default:
return '';
}
ob_start();
?>
<div id="text" class="products-category accessories">
<div class="produkt product-line">
<ul>
<?php foreach ($products as $product): ?>
<li>
<a href="<?php echo $product['url']; ?>">
<figure>
<img src="<?php echo 'data/img1/'.$product['foto1']; ?>" width="210" height="263" />
<figcaption><?php echo $product['name']; ?></figcaption>
</figure>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php
$contents = ob_get_contents();
ob_end_clean();
return $contents;
}
function Category($url) {
$nIdx = strpos($url, "&");
if ($nIdx > 0) {
$url = substr($url, 0, $nIdx);
}
if (in_array($url, array('frames', 'road', 'road-steel', 'road-carbon', 'mtb', 'time-trial', 'accessories'))) {
return Page_Sablony::ProductsCategory($url);
}
$TB_c = $this->tbl['category'];
$TB_p = $this->tbl['products'];
$TB_r = $this->tbl['parameters'];
$data = $this->query_fetch_assoc("SELECT * FROM $TB_c WHERE `group` != 6 AND url='$url'");
$products = $this->query_fetch_assoc_all("SELECT * FROM $TB_p WHERE id_cat='".$data['id']."' ORDER BY poradi ASC");
$sImgUrl = "http://{$_SERVER["SERVER_NAME"]}" .
substr($_SERVER["SCRIPT_NAME"], 0, strrpos($_SERVER["SCRIPT_NAME"], "/") + 1) .
"data/img1/{$data["foto1"]}";
$sScriptUrl = "http://{$_SERVER["SERVER_NAME"]}{$_SERVER["SCRIPT_NAME"]}";
$texy = new Texy();
$sPageUrl = "http://{$_SERVER["SERVER_NAME"]}{$_SERVER['SCRIPT_NAME']}?{$_SERVER['QUERY_STRING']}";
$sDescriptionPinterest = "{$data["name"]} {$data["name"]}. {$data["description"]}";
$paramsAll = array();
foreach ($products as $product)
{
$params = $this->query_fetch_assoc_all("SELECT * FROM $TB_r WHERE id_prod='".$product['id']."'");
foreach ($params as $param) {
if (!isset($paramsAll[$param['name']])) {
$paramsAll[$param['name']] = array();
}
$paramsAll[$param['name']][] = $param['value'];
}
}
$table = '<table class="table-params"><thead><tr><th></th>';
foreach ($products as $product) {
$table .= '<th>'.$product['name'].'</th>';
}
$table .= '</tr></thead><tbody>';
foreach ($paramsAll as $param => $row) {
$table .= '<tr>';
$table .= '<th>'.$param.'</th>';
foreach ($row as $cell) {
$table .= '<td>'.$cell.'</td>';
}
$table .= '</tr>';
}
$table .= '</tbody><tfoot><tr><td>Price:</td>';
foreach ($products as $product) {
$table .= '<th>'.($product['price'] ? (substr($product["price"], -3) == '.00' ? substr($product["price"], 0, -3) : $product["price"]).' €' : 'on demand').'</th>';
}
$table .= '</tr><tr><td></td>';
foreach ($products as $product) {
$table .= '<th><button class="order-button" data-product="'.$product['name'].'">Order</button></th>';
}
$table .= '</tr></tfoot></table>';
$end = "<div id='text'><div class='produkt product-line'>
<div class='nahled'>
<a rel='g1' title='" . $data['foto1_alt']."' href='data/img1_big/" . $data['foto1']."'>
<img src='data/img1/" . $data['foto1']."' alt='" . $data["foto1_alt"] . "'/>
</a>
</div>
<div class='detail'>
<h1>" . $data['name'] . "</h1>
<div class='product-line-description'>
".$texy->process(stripslashes(trim($data['description'])))."
".$texy->process(stripslashes(trim($data['benefits'])))."
</div>
<div class='galleryfull'>
".(!empty($data['foto2'])?"<a rel='g1' title='".$data['foto2_alt']."' class='p1' href='data/img2_big/".$data['foto2']."'><img src='data/img2/".$data['foto2']."' alt='" . $data["foto2"] . "' width='112' height='140' /><span>".$data['foto2_alt']."</span></a>":"")."
".(!empty($data['foto3'])?"<a rel='g1' title='".$data['foto3_alt']."' class='p1' href='data/img3_big/".$data['foto3']."'><img src='data/img3/".$data['foto3']."' alt='" . $data["foto3"] . "' width='112' height='140'/><span>".$data['foto3_alt']."</span></a>":"")."
".(!empty($data['foto4'])?"<a rel='g1' title='".$data['foto4_alt']."' class='p1' href='data/img4_big/".$data['foto4']."'><img src='data/img4/".$data['foto4']."' alt='" . $data["foto4"] . "' width='112' height='140' /><span>".$data['foto4_alt']."</span></a>":"")."
".(!empty($data['foto5'])?"<a rel='g1' title='".$data['foto5_alt']."' class='p1' href='data/img5_big/".$data['foto5']."'><img src='data/img5/".$data['foto5']."' alt='" . $data["foto5"] . "' width='112' height='140'/><span>".$data['foto5_alt']."</span></a>":"")."
</div>
<div class='galleryfull'>
".(!empty($data['foto6'])?"<a rel='g1' title='".$data['foto6_alt']."' class='p1' href='data/img6_big/".$data['foto6']."'><img src='data/img6/".$data['foto6']."' alt='" . $data["foto6"] . "' width='112' height='140'/><span>".$data['foto6_alt']."</span></a>":"")."
".(!empty($data['foto7'])?"<a rel='g1' title='".$data['foto7_alt']."' class='p1' href='data/img7_big/".$data['foto7']."'><img src='data/img7/".$data['foto7']."' alt='" . $data["foto7"] . "' width='112' height='140'/><span>".$data['foto7_alt']."</span></a>":"")."
".(!empty($data['foto8'])?"<a rel='g1' title='".$data['foto8_alt']."' class='p1' href='data/img8_big/".$data['foto8']."'><img src='data/img8/".$data['foto8']."' alt='" . $data["foto8"] . "' width='112' height='140'/><span>".$data['foto8_alt']."</span></a>":"")."
".(!empty($data['foto9'])?"<a rel='g1' title='".$data['foto9_alt']."' class='p1' href='data/img9_big/".$data['foto9']."'><img src='data/img9/".$data['foto9']."' alt='" . $data["foto9"] . "' width='112' height='140'/><span>".$data['foto9_alt']."</span></a>":"")."
</div>
</div>
".$table."
<div id='social-buttons'>
<div class='fb-like' data-href='" . $sPageUrl . "'
data-width='280' data-colorscheme='light'
data-show-faces='true' data-layout='button_count'
data-action='recommend' data-send='false'>
</div>
<div class='twitter-like'>
<a href='https://twitter.com/share'
class='twitter-share-button'
data-text=''
data-via='ryvova'
data-lang='cs'>
Tweet
</a>
</div>
<div class='pinterest-like'>
<a href='//pinterest.com/pin/create/button/?" .
"url=" . $sScriptUrl .
"&media=" . urlencode($sImgUrl) .
"&description=" . urlencode($sDescriptionPinterest) . "'
data-pin-do='buttonPin' data-pin-config='beside'>
<img src='" . $data["foto1"] . "' />
</a>
</div>
</div>
</div></div>";
$end .= Page_Sablony::Order($data["name"]);
return $end;
}
function getCountries() {
$sSql = "SELECT id, cz AS country
FROM eq_distributors_kategorie
WHERE poradi > 1
ORDER BY cz ASC";
$aCountries = $this->query_fetch_assoc_all($sSql);
$sOptions = "";
for ($i = 0; $i < count($aCountries); $i++) {
$sOptions .= "<option value=\"{$aCountries[$i]["id"]}\">" .
$aCountries[$i]["country"] .
"</option>";
}
return $sOptions;
}
function Order($sProdukt) {
$sOptions = Page_Sablony::getCountries();
$sProduktUrl = "http://{$_SERVER["SERVER_NAME"]}{$_SERVER["REQUEST_URI"]}";
$sText = '<div id="order-obal">
<div id="order-colorbox">
<h2>Order</h2>
<!-- action nastaví js kvůli robotům -->
<form id="order-form" method="post" />
<input type="hidden" id="produkt" name="produkt"
value="' . $sProdukt. '" />
<input type="hidden" id="url" name="url"
value="' . $sProduktUrl . '" />
<!-- inputy pro roboty -->
<input type="text" id="www" name="www" value="" />
<input type="hidden" id="starttime" name="starttime"
value="0" />
<input type="hidden" id="endtime" name="endtime"
value="0" />
<table>
<tr>
<td><label for="name">Name*:</label></td>
<td>
<input type="text" id="name"
name="name" size="50" />
</td>
</tr>
<tr>
<td>
<label for="surname">Surname*:</label>
</td>
<td>
<input type="text" id="surname"
name="surname" size="50" />
</td>
</tr>
<tr>
<td><label for="email">E-mail*:</label></td>
<td>
<input type="text" id="email"
name="email" size="50" />
</td>
</tr>
<tr>
<td><label for="phone">Phone*:</label></td>
<td>
<input type="text" id="phone"
name="phone" size="50" />
</td>
</tr>
<tr>
<td><label for="street">Street*:</label></td>
<td>
<input type="text" id="street"
name="street" size="50" />
</td>
</tr>
<tr>
<td><label for="city">City*:</label></td>
<td>
<input type="text" id="city"
name="city" size="50" />
</td>
</tr>
<tr>
<td>
<label for="country">Country:</label>
</td>
<td>
<select id="country" name="country">' .
$sOptions .
'</select>
</td>
</tr>
<tr>
<td><label for="message">Message:</label></td>
<td>
<textarea cols="38" rows="5"
id="message"
name="message"></textarea>
</td>
</tr>
<tr>
<td> </td>
<td>
<button id="order-button-submit">Order</button>
</td>
</tr>
<tr>
<td> </td>
<td id="td-note">
The order is non-committal. You will be contacted by<br />our local distributor to finish your request.
</td>
</tr>
</table>
</form>
</div>
</div>';
return $sText;
}
function Parameters($id) {
$TB_r = $this->tbl['parameters'];
$data=$this->query_fetch_assoc_all("SELECT * FROM $TB_r WHERE id_prod='$id' ORDER BY id ASC");
$end.= "<table>";
for($i=0;$i<count($data);$i++) {
$end.= "<tr><td class='b'>".$data[$i]["name"]."</td><td><span>></span> ".$data[$i]["value"]."</td></tr>";
}
$end.= "</table>";
return $end;
}
function Others($id) {
$TB_o = $this->tbl['others'];
$TB_p = $this->tbl['products'];
$oth = $this->query_result("SELECT others FROM $TB_o WHERE id_prod='$id'");
$pole = explode(";",$oth);
for ($i=0;$i<count($pole);$i++) {
$inf = $this->query_fetch_assoc("SELECT * FROM $TB_p WHERE id='".$pole[$i]."'");
$links.= "<a href='products.php?".$inf[url]."' class='".$inf[img_interested]."'><span>></span> ".$inf[name]."</a>";
}
$end = "<div id='interested'>
<div class='produkty'>
<p>You may also be interested in:</p>
$links
</div>
</div>
";
return $end;
}
function Distributors($url) {
$texy = new Texy();
$cat = Data::getDistributorCategories();
for ($i=0;$i<count($cat);$i++) {
if(empty($id)) { $id = $cat[$i][id]; }
$kategorie .= "<li><a href='?id=".$cat[$i]['id']."'><span>></span> ".$cat[$i]['nazev']."</a></li>";
}
if (isset($_GET['id'])) { $id = $_GET['id']; }
$title = Data::getDistributorsTitle($id);
$kontakty .= "<h1>".$title."</h1>";
$data = Data::getDistributorsByCategory($id);
for ($i=0;$i<count($data);$i++) {
if(!empty($data[$i]['logo'])) {
$kontakty .= "<img src='/img/logo/".$data[$i]['logo']."' style='position: absolute; right: 100px;' alt='".$data[$i]['firma']."'/>";
}
$kontakty .= "<h2>".$data[$i]['firma']."</h2>";
$kontakty .= "<div class='adresa'>".$texy->process(stripslashes(trim($data[$i]['text'])))."</div>";
$last = $data[$i]['mesto'];
}
$end = "<div id='text'><div class='produkt'>
<div class='menu' id='whymenu'>
<ul>
".$kategorie."
</ul>
</div>
<div class='obsah'>
".$kontakty."
</div>
<div class='clear'> </div>
</div></div>
";
return $end;
}
function News() {
$texy = new Texy();
$limit = 10;
if(!isset($_GET['page'])){
$stranka = 0;
}
else{
$stranka = intval($_GET['page']);
}
$cat = Data::getMonths();
for ($i=0;$i<count($cat);$i++) {
if(empty($id)) { $id = $cat[$i][id]; }
$kategorie .= "<li><a href='".$cat[$i]['url']."'><span>></span> ".strtoupper($cat[$i]['text'])."</a></li>";
}
$news .= "<h1>NEWS</h1>";
if (empty($_GET['month'])) {
$data = Data::getNews(10, $stranka, $limit);
$pom = $data['data'];
} else {
$data = Data::getNewsByMonth($_GET['month'], $_GET['year'], $stranka, $limit);
$pom = $data['data'];
}
for ($i=0;$i<count($pom);$i++) {
$news .= "<div class='news'>";
$news .= "<h2>".$pom[$i]['titulek']."</h2>";
if(!empty($pom[$i]['foto_url']) && file_exists(".".$pom[$i]['foto_url'])) {
$news .= "<div class='newsnahled' style='background-image:url(\"".$pom[$i]['foto_url']."\")'> </div>";
}
$news .= $texy->process(stripslashes(trim($pom[$i]['anotace'])));
if ($pom[$i]['url']) {
$news .= "<p class='more'><a href='news-".$pom[$i]['url'].($stranka!=0?"?page=".$stranka:"")."'>MORE</a></p>";
}
else {
$news .= "<p class='more'><a href='news_detail.php?id=".$pom[$i]['id'].($stranka!=0?"&page=".$stranka:"")."'>MORE</a></p>";
}
$news .= "<div class='newsclear'> </div></div>";
}
$news .= "<div class='strankovani'>";
if($data['pocet_stranek']>1){
$url = "";
if(isset($_GET['month']) && isset($_GET['year'])){
$url = "?month=".intval($_GET['month'])."&year=".intval($_GET['year']);
}
if($stranka>0){
if(!empty($url)){
$url_left = $url."&";
}
else{
$url_left = "?";
}
$url_left .= "page=".($stranka-1);
$news .= "<div class='strankovani_left'><a href='news.php$url_left'><span><</span></div>";
}
for($i=0;$i<$data['pocet_stranek'];$i++){
$news .= "<div class='stranka'>";
if($i==$stranka){
$news .= "<span>".($i+1)."</span>";
}
else{
if(!empty($url)){
$url_akt = $url."&";
}
else{
$url_akt = "?";
}
$url_akt .= "page=".$i;
$news .= "<a href='news.php$url_akt'>".($i+1)."</a>";
}
$news .= "</div>";
}
if(($stranka+1)<$data['pocet_stranek']){
if(!empty($url)){
$url_right = $url."&";
}
else{
$url_right = "?";
}
$url_right .= "page=".($stranka+1);
$news .= "<div class='strankovani_right'><a href='news.php$url_right'><span>></span></div>";
}
}
$news .= "</div>";
$end = "<div id='text'><div class='produkt news news-list'>
<div class='menu' id='whymenu'>
<ul>
".$kategorie."
</ul>
</div>
<div class='obsah'>
".$news."
</div>
<div class='clear'> </div>
</div></div>
";
return $end;
}
function NewsDetail($get) {
$id = (isset($get['id']) ? $get['id'] : '');
$url = (isset($get['url']) ? $get['url'] : '');
$texy = new Texy();
$kategorie = '';
$foto = '';
$cat = Data::getMonths();
for ($i=0;$i<count($cat);$i++) {
if(empty($id)) { $id = $cat[$i][id]; }
$kategorie .= "<li><a href='".$cat[$i]['url']."'><span>></span> ".strtoupper($cat[$i]['text'])."</a></li>";
}
$data = Data::newsDetail($id, $url);
$pom = $data[fotky];
for ($i=0;$i<count($pom);$i++) {
// echo $i;
$foto .= "<a href='".$pom[$i]['url']."' rel='g1'><img src='".$pom[$i]['url_nahled']."' alt=''/></a>";
}
//$data[anotace] = "<span style='font-weight:bold;color:#f00;'>".Page_Sablony::formatDate($data[datum]) . "</span> " . $data[anotace];
$sPageUrl = "http://{$_SERVER["SERVER_NAME"]}{$_SERVER['SCRIPT_NAME']}?{$_SERVER['QUERY_STRING']}";
$href = 'http://www.eqnx.co/'.($data['url'] ? 'news-'.$data['url'] : 'news_detail.php?id='.$data['id']);
$end = "<div id='text'><div class='produkt bloknovinek news news-detail'>
<div class='menu' id='whymenu'>
<ul>
".$kategorie."
</ul>
</div>
<div class='obsah'>
<div style='width:600px;'>
<h1>".$data[titulek]."</h1>
<a href='".$data[foto_url_big]."' rel='g1'><img src='".$data[foto_url_nahled]."' alt='' class='ilustrace'/></a>
<span style='font-weight:bold;color:#f00;'>".Page_Sablony::formatDate($data[datum]) . "</span>
".$texy->process(stripslashes(trim($data['anotace'])))."
".$texy->process(stripslashes(trim($data['text'])))."
<p class='newsfotky'>$foto</p>
<div id='social-buttons'>
<div class='fb-like' data-href='" . $sPageUrl . "'
data-width='280' data-colorscheme='light'
data-show-faces='true' data-layout='button_count'
data-action='recommend' data-send='false'>
</div>
</div>
<div class='fb-comments' data-href='".$href."' data-width='600' data-numposts='5' data-colorscheme='light'></div>
<p style='clear:both;'><a href='news.php' class='back'>Back</a></p>
<p style='clear:both;'>
".((!empty($data['nasl']))?"<a href='news_detail.php?id=".$data['nasl']."' class='newer'>Newer Post</a>":"")."
".((!empty($data['pred']))?"<a href='news_detail.php?id=".$data['pred']."' class='older'>Older Post</a>":"")."
</p>
</div>
</div>
<div class='clear'> </div>
</div></div>
";
return $end;
}
function Home()
{
$block = "<div id='mainbanner'>
<a href='http://www.youtube.com/watch?v=dgfuo7hOhJM&autoplay=1' class='videoIn'><img src='img2/bike-promo-2015.jpg' alt='A Wheel Ahead – Play Video' /></a>
</div>
<div id='banner'>
<div class='banner2a'>
<div class='psBlock'>
<iframe src='//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FEquinoxWheels&width=300&height=640&colorscheme=dark&show_faces=true&header=false&stream=true&show_border=false&appId=1375189516044496' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:300px; height:640px;' allowTransparency='true'></iframe>
</div>
</div>";
$data = Data::getNews(5);
$data = $data['data'];
$block .= '<div class="banner3b" id="news">'; //<h3><a href="news.php">News</a></h3>';
// for ($i=0;$i<count($data);$i++)
// {
// //$news .= "<p><a href='news_detail.php?id=".$data[$i]['id']."'>".$data[$i]['titulek']."</a></p><p class='hpmore'><a href='news_detail.php?id=".$data[$i]['id']."'> </a></p>";
// $url = ($data[$i]['url'] ? "news-".$data[$i]['url'] : "news_detail.php?id=" . $data[$i]['id']);
// $block .= "<a href='".$url."'><span><img src='" . $data[$i]['foto_url'] . "' alt='" . $data[$i]['titulek'] . "'></span><strong>" . $data[$i]['titulek'] . "</strong>" . $data[$i]['anotace'] . "</a>";
// }
$block .= "
</div>
<div class='banner3a'>
<h3><a href='https://www.youtube.com/user/EquinoxWheels'>Videos</a></h3>
<a href='https://www.youtube.com/watch?v=DIHzwEC9utI' class='out'><img src='img2/video-rock-solid.jpg' width='260' height='170' alt='Rock Solid'></a>
<a href='https://www.youtube.com/watch?v=Lh4tgthXzic' class='out'><img src='img2/video-custom-design.jpg' width='260' height='170' alt='Custom Design'></a>
<a href='https://www.youtube.com/watch?v=nH8lceODHVQ&list=PLzTADPsrtd7nGjarno95ZbGBolVtuDCH7' class='out'><img src='img2/video-service-videos.jpg' width='260' height='170' alt='Service Videos'></a>
</div>
</div>";
return $block;
}
/*
<div class='distributors'><a href='/eurobike/index.php?utm_source=homepage&utm_medium=banner&utm_campaign=Distributors'></a></div>
<!-- <div class='banner3'><div>
<h2><a href='news.php'>News</a></h2>
$news
</div></div> -->
<div class='banner1'><div>
<h2><a href='products.php?MR25_plus'>NEW MTB CARBON TUBULAR WHEELSET</a></h2>
<p>- 1350 g<br/>
- cross country or marathon<br/>
- excellenet stiffness,<br/>dynamics and acceleration</p>
</div></div>
*/
function formatDate($datum){
$dat = explode("-",$datum);
if(count($dat)!=3){
return "";
}
$ret = $dat['2'].". ".$this->mesice[intval($dat['1'])]." ".$dat['0'];
return $ret;
}
function formatOneError(){
$end = "";
if(!empty($_SESSION['error'])){
$end .= "<div class='chyba'>".$_SESSION['error']."</div>";
$_SESSION['error'] = "";
}
return $end;
}
function formatLogError(){
$end = "";
if(!empty($_SESSION['log'])){
$end .= "<div class='chyba'>$_SESSION[log]</div>";
$_SESSION['log'] = "";
}
return $end;
}
function HeadAdmin ($title, $description, $keyword) {
$end = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" >
<head>
<title>Administrace Equinox '.$title.'</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="/css/style_admin.css" rel="stylesheet" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="/js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="/js/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php"></script>
<script type="text/javascript" src="/js/swfobject.js"></script>
<script type="text/javascript" src="/js/jquery.uploadify.v2.1.0.min.js"></script>
<script type="text/javascript" src="/js/scripts.js"></script>
<script type="text/Javascript">
var path = \'/admin/reference\';
var config = {
\'uploader\' : \'/upload/uploadify.swf\',
\'script\' : \'/uploadify.php\',
\'cancelImg\' : \'/images/cancel.png\',
\'folder\' : \'/foto/\',
\'queueID\' : \'fileQueue\',
\'auto\' : false,
\'multi\' : true,
\'onAllComplete\' : oncomplete
}
function oncomplete(){
window.location.href=path;
}
$(document).ready(function(){
$("#uploadify").uploadify(config);
});
tinyMCE.init({
// General options
mode : "specific_textareas",
editor_selector : "editor",
theme : "advanced",
relative_urls : false,
plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,blockquote,|,undo,redo,|,link,unlink,anchor,imagemanager,image",
theme_advanced_buttons2 : "forecolor,backcolor,|,tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,cleanup,help,code,|,insertdate,inserttime,preview",
theme_advanced_buttons3 : "print,fullscreen,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_blockformats: "p, div, h2, h3, blockquote",
force_p_newlines : false,
entity_encoding : "raw",
force_br_newlines : true,
language : "cs",
body_class : "clanky",
file_browser_callback : "tinyBrowser"
});
</script>';
$end .= '
</head>
<body>
<div id="top">
<a href="./" class="logo"><img src="/img/logo-head_03.png" alt=""/></a>
</div>
<div class="page">';
return $end;
}
function BottomAdmin(){
$end .= "</div></div></body>
</html>";
return $end;
}
function TopAdmin () {
$end .= "<div class='top'>";
if(!empty($_SESSION['admin_id'])){
$end .= Page_Sablony::AdminMenu();
}
else{
//return Header("/adminlogin/logout");
}
$end .= "</div><div class='content'>";
return $end;
}
function AdminMenu(){
$end .= "<h1>Equinox Bikes — administrační část</h1>
<div class='adminmenu'>
<div style='text-align:center;display: inline;float:left;width: 60px;'><a href='/admin'>Home</a></div>
<div style='text-align:center;display: inline;float:left;width: 2px;''>|</div>
<div style='text-align:center;display: inline;float:left;width: 160px;'>
<a href='/admin/distributori'>Distributoři</a>
</div>
<div style='text-align:center;display: inline;float:left;width: 2px;''>|</div>
<div style='text-align:center;display: inline;float:left;width: 160px;'>
<a href='/admin/novinky'>Novinky</a>
</div>
<div style='text-align:center;display: inline;float:left;width: 2px;''>|</div>
<div style='text-align:center;display: inline;float:left;width: 160px;'>
<a href='/admin/maily'>Maily</a>
</div>
<div style='text-align:center;display: inline;float:left;width: 2px;''>|</div>
<div style='text-align:center;display: inline;float:left;width: 200px;'>
<a href='/adminlogin/logout'>Odhlásit</a>
</div>
</div>";
return $end;
}
function AdminLoginForm(){
$end .= '<h1>Administrace</h1>
Pro přístup do této sekce se musíte přihlásit.</p>
'.Page_Sablony::formatOneError().'
<form action="/adminlogin/login/" method="post">
<table style="border-collapse: collapse;">
<tr>
<td>Login:</td>
<td>
<input type="text" name="user" size="15" />
</td>
</tr>
<tr>
<td>Heslo: </td><td><input type="password" name="passwd" size="15" /></td>
</tr>
<tr>
<td colspan="2" style="border: none;" align="right"><input id="submit" type="submit" name="log-in" value="přihlásit" /></td>
</tr>
</table>
</form>';
return $end;
}
}
?>
ACC SHELL 2018