$tpl['filter']['nominals'] = array(); $tpl['filter']['series'] = array(); $tpl['filter']['prices'] = array(); /* монеты наборы монет мелочь цветные подарочные наборы барахолка - что это */ $cache_prefix = contentHelper::strtolower_ru("$materialtype"."_".md5($search)); $cache_prefix .= $nocheck?"_nocheck":""; $cache_prefix .= $mycoins?"_mycoins":""; if($bydate) $cache_prefix .= "_bydate$bydate"; if($mycoins) $cache_prefix .='mycoins_1_u_'.$tpl['user']['user_id']; if($nocheck) $cache_prefix .='nocheck_'.$nocheck; if(in_array($materialtype,array(1,7,8,6,4,'newcoins'))){ //if(!$tpl['filters']['metalls'] = $cache->load("metalls_$cache_prefix")) { $tpl['filters']['metalls'] = $shopcoins_class->getMetalls(false,$groups,$nominals,$bydate); // $cache->save($tpl['filters']['metalls'], "metalls_".$cache_prefix); //}
//if($tpl['user']['user_id']==352480){ if ($tpl['user']['user_id'] == 352480) { //var_dump($tpl['news']['data'][$key]['img']); //echo "<br>"; } $tpl['news']['data'][$key]['img'] = imageMini::getMini($tpl['news']['data'][$key]['img'], "news_img/"); //} $news_text = $rows['text']; $news_text = str_replace("</h1>", "</h1>. ", $news_text); $news_text = strip_tags($news_text); while (substr_count($news_text, "<<<")) { $news_text = mb_substr($news_text, 0, strpos($news_text, "<<<")) . substr(strstr($news_text, ">>>"), 3, 'utf-8'); } $news_text = mb_substr($news_text, 0, 320, 'utf-8') . '...'; $tpl['news']['data'][$key]['text'] = strip_tags($news_text); $tpl['news']['data'][$key]['namehref'] = contentHelper::strtolower_ru($rows["name"]) . "_n" . $rows["news"] . ".html"; } //if($addhref) $addhref = substr($addhref,1); $correct_url = urlBuild::makePrettyUrl($urlParams, "http://www.numizmatik.ru/news"); if ($tpl['datatype'] != 'text_html' && $correct_url != urldecode("http://www.numizmatik.ru" . $_SERVER["REQUEST_URI"]) && $_SERVER["REQUEST_URI"] !== '/news/') { header("HTTP/1.1 301 Moved Permanently"); header("location: " . $correct_url); die; } unset($urlParams['pagenum']); $correct_url_for_paginator = urlBuild::makePrettyUrl($urlParams, "http://www.numizmatik.ru/news"); $tpl['paginator'] = new Paginator(array('url' => $correct_url_for_paginator, 'count' => $countpubs, 'per_page' => $tpl['onpage'] == 'all' ? $countpubs : $tpl['onpage'], 'page' => $tpl['pagenum'], 'border' => 4)); foreach ($tpl['breadcrumbs'] as $key => $value) { if ($value["base_href"] == $correct_url) { $tpl['breadcrumbs'][$key]['base_href'] = ''; }
static function makePrettyOfferUrl($urlParams, $materialIDsRule, $ThemeArray, $data, $shopcoins_class, $return_params = array()) { // , $divisions, $Country, $Region, $RegionPart, $City, $domain $domain = "www.numizmatik.ru/shopcoins"; $params = $urlParams; $texts = array(); foreach ($params as $key => $value) { if (!$params[$key]) { unset($params[$key]); } } $pattern = 'http://' . $domain; if (isset($params['materialtype'])) { if ($params['materialtype'] == 100) { $pattern .= '/newcoins'; $texts[] = "Новинки"; } elseif ($params['materialtype'] == 200) { $pattern .= '/revaluation'; $texts[] = "Распродажа"; } elseif (isset(self::$shopcoins_materialIDsRule[$params['materialtype']])) { $pattern .= '/' . self::$shopcoins_materialIDsRule[$params['materialtype']]; $texts[] = contentHelper::$menu[$params['materialtype']]; } } if (isset($params['group_id'])) { $groupData = $shopcoins_class->getGroupItem($params['group_id']); if ($groupData) { $pattern .= contentHelper::groupUrl($groupData['name'], $params['group_id']); $texts[] = $groupData['name']; } } if (isset($params['nominal_id'])) { $nominalMainTitle = $shopcoins_class->getNominal($params['nominal_id']); if ($nominalMainTitle) { $pattern .= contentHelper::nominalUrl($nominalMainTitle, $params['nominal_id']); $texts[] = $nominalMainTitle; } } if (isset($params['metal_id'])) { $metalMainTitle = $data['metalls'][$params['metal_id']]; if ($metalMainTitle) { $pattern .= contentHelper::metalUrl($metalMainTitle, $params['metal_id']); $texts[] = $metalMainTitle; } } if (isset($params['condition_id'])) { $conditionMainTitle = $data['conditions'][$params['condition_id']]; if ($conditionMainTitle) { $pattern .= contentHelper::conditionUrl($conditionMainTitle, $params['condition_id']); $texts[] = $conditionMainTitle; } } if (isset($params['year'])) { $pattern .= '/y_ysp' . $params['year']; $texts[] = $params['year']; } if (isset($params['theme_id'])) { $themeMainTitle = $ThemeArray[$params['theme_id']]; if ($themeMainTitle) { $pattern .= contentHelper::themeUrl($themeMainTitle, $params['theme_id']); $texts[] = $themeMainTitle; } } if (isset($return_params['full']) && $return_params['full']) { return array('href' => $pattern, 'title' => implode(" ", $texts)); } return $pattern; }
<?php require_once $cfg['path'] . '/models/news.php'; require_once $cfg['path'] . '/configs/config_news.php'; $id = request('id'); //для инициализации фильтров $text = ''; $years = array(); $sp_s = array(); $news_class = new model_news($db_class, $tpl['user']['user_id']); $tpl['news']['errors'] = false; $Meta = $news_class->getMeta("keywords", "text", "news='{$id}'", "", 0, 0); $tpl['news']['data'] = $news_class->getItem($id); $correct_links = contentHelper::strtolower_ru($tpl['news']['data']["name"]) . "_n" . $tpl['news']['data']["news"] . ".html"; if ("/news/" . $correct_links != urldecode($_SERVER['REQUEST_URI'])) { //header('HTTP/1.1 301 Moved Permanently'); //header('Location: '.$cfg['site_dir']."news/".$correct_links); //die(); } if ($tpl['news']['data']['pagetitle']) { $tpl['news']['_Title'] = $tpl['news']['data']['pagetitle']; } else { $tpl['news']['_Title'] = $tpl['news']['data']["name"] . " | Новости нумизматики - выпуск юбилейных и памятных монет центральных банков мира | Клуб Нумизмат"; } if ($tpl['news']['data']['description']) { $tpl['news']['_Description'] = $tpl['news']['data']['description']; } else { $tpl['news']['_Description'] = 'Последние новости нумизматики.' . $Meta[1]; } $tpl['news']['data']['text'] = preg_replace_callback('#(<img\\s(?>(?!src=)[^>])*?src=")(.*?)("[^>]*>)#', "data_to_img", $tpl['news']['data']['text']); $tpl['news']['data']['text'] = str_replace('</div><div class="sep"></div><div class="news-img">', '</div><div class="news-img">', $tpl['news']['data']['text']);
'>Купить</a> </div> </div> <?} elseif ($rows['buy_status']==7) {?> <div id=bascetshopcoins<?php echo $rows["shopcoins"]; ?> > <?if(($rows['buy_status']==7||$rows['buy_status']==6)&&($minpriceoneclick<=$rows['price'])) { echo contentHelper::render('_mobile/shopcoins/price/oneclick',$rows); }?> <div class="buy-div"> <a class="button25" href='#' onclick='if(AddAccessory(<?php echo $rows["shopcoins"]; ?> )){ga("send", "event", "shop", "basket");return false;}return false;' title='Положить в корзину <?php echo contentHelper::setWordOn($rows["materialtype"]); ?> <?php echo $rows["name"]; ?> '>Купить</a> </div> </div> <?} elseif ($rows['buy_status']==9) { echo "Нет в наличии"; // _gaq.push(["_trackEvent", "shop", "basket"]); //ga("send", "event", "shop", "basket"]); }?> </div>
$text = $keywords_class->createText($row); echo $group['group']."<br>"; echo $text[0]."<br>"; echo $text[1]."<br><hr>"; $res = $keywords_class->setMetaDetails($materialtype,$group['group'],$text[0],$text[1]); //die(); //$i++; //if($i>100) break; } } die(); //$data = $keywords_class->getCoinsByID(1041088); foreach ($data as $row){ $details = $keywords_class->getDetails($row['shopcoins']); $row['details'] = strip_tags(str_replace(array("<br>","\n"),"",trim($details["details"]))); $text = $keywords_class->createText($row); $correct_links = contentHelper::getRegHref($row); echo "<a href=\"".$cfg['site_dir']."shopcoins/".$correct_links["rehref"]."\" target=_blank>".$row['name']."</a> - ".$cfg['site_dir']."shopcoins/".$correct_links["rehref"]."<br>"; echo $text[0]."<br>"; echo $text[1]."<br><hr>"; $res = $keywords_class->setMetaDetails($row['shopcoins'],$text[0],$text[1]); } unset($keywords_class); die('end'); ?>
$sql = "update user set star=star+2 where user='******';"; $result = mysql_query($sql); } $check = 1; } else { $check = 2; } } if ( substr_count($_SERVER['REQUEST_URI'],".html")==0 && $weekquestion>0 && !$weekquestionsubmit) { $sql = "select * from weekquestion where weekquestion='".intval($weekquestion)."';"; $result = mysql_query($sql); $rows = $shopcoins_class->getRowSql($sql); $namehref = contentHelper::strtolower_ru($rows['question'])."_n".$rows['tboard']."_p".$pagenum."_s1.html"; //header('HTTP/1.1 301 Moved Permanently'); //header('Location: http://'.$_SERVER['HTTP_HOST'].'/weekquestion/'.$namehref); } if ($weekquestion) { $sql = "select question, answer1, answer2, answer3, answer4, answer5 from weekquestion where weekquestion=$weekquestion and type='week';"; $rows = $shopcoins_class->getRowSql($sql); $tpl['breadcrumbs'][] = array( 'text' => $rows['question'], 'href' => '', 'base_href' =>''
} elseif ($st == 4) { $sql1 = "(name like '%{$s}%' or text like '%{$s}%' or keywords like '%{$s}%')"; } //отображаем страницы $sql = "Select count(*) from biblio where `check`=1 and {$sql1};"; $count = $biblio_class->getOneSql($sql); $pages = ceil($count / $tpl['onpage']); if ($tpl['pagenum'] > $pages) { $tpl['pagenum'] = $pages; } $p_url = $cfg['site_dir'] . "biblio/?s={$s}&st={$st}" . ($group ? "&group={$group}" : ""); if ($count > 0) { $sql = "select biblio, FROM_UNIXTIME(date, \"%d.%m.%Y\"), \n name, text from biblio \n where {$sql1} and `check`=1 order by date desc \n limit " . ($tpl['pagenum'] - 1) * $tpl['onpage'] . "," . $tpl['onpage']; $tpl['result'] = $biblio_class->getDataSql($sql); $nnn = 0; foreach ($tpl['result'] as $n => $rows) { $text = mb_substr($rows['text'], 0, 250, 'utf8'); while (substr_count($text, "<<<")) { $text = substr($text, 0, strpos($text, "<<<")) . substr(strstr($text, ">>>"), 3); } $tpl['result'][$n]['text'] = substr($text, 0, strlen($text) - strpos(strrev($text), '.')); $tpl['result'][$n]['namehref'] = contentHelper::strtolower_ru($rows["name"]) . "_n" . $rows["biblio"] . ".html"; } } else { $tpl['error'] = "Извините, нет результатов, удовлетворяющих поиску. Попробуйте другие варианты."; } } else { $tpl['error'] = "Внимание!!!</font> Cлово для поиска должно состоять более чем из трех букв"; } } $tpl['paginator'] = new Paginator(array('url' => $p_url, 'count' => $count, 'per_page' => $tpl['onpage'], 'page' => $tpl['pagenum'], 'border' => 3));
<td class="tboardtop">Описание</td> </tr> </thead> <tbody> <? foreach ($tpl['order_results'] as $rows){ if ($rows['title']){?> <tr><td class="h-cat" colspan="9"><b><?php echo $rows['title']; ?> </b></td></tr> <?}?> <tr> <td class=tboard width=220> <?php echo contentHelper::showImage('images/' . $rows["image"], $rows["name"]); ?> </td> <td class=tboard><?php echo $rows["name"]; ?> </td> <td class=tboard><?php echo $rows["gname"]; ?> </td> <td class=tboard><?php echo $rows["year"]; ?> </td> <td class=tboard><?php
<table width=98% border=0 cellpadding=2 cellspacing=1 class=txt> <tr bgcolor=#ffcc66> <td width=55% class=tboard><b>Тема</b></td> <td nowrap class=tboard><b>дата начала</b></td> <td nowrap class=tboard ><b>дата окончания</b></td> </tr> <? foreach ($tpl['data'] as $i=>$rows){?> <tr <?php echo $i % 2 == 1 ? "" : "bgcolor=#ebe4d4"; ?> ><td class=tboard><a href="<?php echo contentHelper::strtolower_ru($rows['question']) . "_n" . $rows["weekquestion"] . "_p" . $pagenum . "_s1.html"; ?> "><?php echo $rows['question']; ?> </a></td> <td class=tboard><?php echo $rows['d1']; ?> </td> <td class=tboard><?php echo $rows['d2']; ?> </td> </tr> <?}?>
<div class="table coin_division_block bordered fm"> <h3><a href="<?=$cfg['site_dir']?>forum/">Форум нумизматов</a></h3> <?foreach ($tpl['lastForumNews'] as $thread_get){ $dateline = $thread_get['dateline']; $poster = $thread_get['lastposter']; $pid = $thread_get['getp']['postid']; $date2 = date ("d.m.Y" ,$dateline); $title = $thread_get['title']; ?> <p><b><?=$date2?></b> <a href='<?=$cfg['site_dir']?>/forum/showthread.php?p=<?=$pid?>#post<?=$pid?>' title='Новости форума тема <?=htmlspecialchars(strip_tags($title))?> смотреть'><?=$title?></a><br> <?=contentHelper::inputspace(strip_tags(mb_substr($thread_get["pagetext"], 0, 350,'utf-8')),60)?> ... </p> <?}?> </div> <div class="table coin_division_block bordered fm"> <h3><a href="<?=$cfg['site_dir']?>video.php">Видео для нумизматов</a></h3> <div id=thisplayvideo><a id=#label1></a></div> <div> <?php foreach ($tpl['video'] as $rows_video ){?> <a href=#label1 title='Смотреть <?=$rows_video['title']?>' onclick="ShowVideo('<?=$rows_video['numberlink']?>','<?=$rows_video['type']?>');" > <img src="<?=$cfg['site_dir']?>imagesvideo/video<?=$rows_video['video']?>.jpg" width="215" alt="Видео Клуба Нумизмат" title="Видео Клуба Нумизмат" style="padding: 0 16px 0 0"/></a> <?}?>
<div class="center"> <a class="borderimage primage" href='<?=$cfg['site_dir']?>shopcoins/<?=$rows["rehref"]?>' title='<?=$cfg['site_dir']?>/shopcoins<?=$rows['namecoins']?>' > <?=contentHelper::showImage("images/".$rows["image"],contentHelper::getImgTitle($rows),array('alt'=>contentHelper::getAlt($rows)));?> </a> <? if(!isset($rows['is_mobile'])||!$rows['is_mobile']) {?> <a onclick="showWin('<?=$cfg['site_dir']?>shopcoins/?module=shopcoins&task=showsmall&catalog=<?=$rows["shopcoins"]?>&ajax=1',1100);return false;" href='#' class="qwk">Быстрый просмотр</a> <?}?> </div> <div class="info-block" > <a href="<?=$cfg['site_dir']?>shopcoins/<?=$rows["rehref"]?>" class="title-mini"><span itemprop="name"><?=$rows['name']?></span></a><br> <div itemprop="description"> <span clas="country-c"><?=$rows['gname']?></span><br> <b>Год:</b> <?=$rows['year']?$rows['year']:"Без указания года"?><br> <?if($rows['metal']){?> <b>Металл:</b> <?=$rows['metal']?><br> <?}?> <?if($rows['condition']){?> <b>Состояние:</b> <?=$rows['condition']?><br> <?}?> </div> </div> <? $rows['for_mini'] = true; if(isset($rows['buy_status'])) echo contentHelper::render('shopcoins/price/prices',$rows); if(isset($rows['reserved_status'])) echo contentHelper::render('shopcoins/price/buy_button',$rows); if(($rows['buy_status']==7||$rows['buy_status']==6)&&($minpriceoneclick<=$rows['price'])) { $rows['is_mini'] = true; echo contentHelper::render('shopcoins/price/oneclick',$rows); }
echo $rows['metal']; ?> <br> <?if($rows['condition']){?> <b>Состояние:</b> <?php echo $rows['condition']; ?> <br> </span> <?}?> <? if(isset($rows['buy_status'])) { echo contentHelper::render('shopcoins/price/prices',$rows); } else {?> <div class='center' itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <meta itemprop="priceCurrency" content="RUB"> <meta itemprop="price" content="<?php echo $rows['price']; ?> "> </div> <?} if(isset($rows['reserved_status'])) echo contentHelper::render('shopcoins/price/buy_button',$rows); if(isset($rows['mark'])){ echo contentHelper::render('shopcoins/price/markitem',$rows['mark']); } ?>
static function getRegHref($rows, $materialtype = 0, $parent = 0) { $mtype = $rows['materialtype'] > 0 ? $rows['materialtype'] : $materialtype; $rows['year'] = contentHelper::setYearText($rows['year'], $rows['materialtype']); $rehref = ""; if ($materialtype == 5 || $materialtype == 3) { if ($mtype == 1) { $rehref = "Монета-"; } if ($mtype == 8) { $rehref = "Монета-"; } if ($mtype == 7) { $rehref = "Набор-монет-"; } if ($mtype == 2) { $rehref = "Банкнота-"; } if ($mtype == 4) { $rehref = "Набор-монет-"; } if ($mtype == 5) { $rehref = "книга-"; } if ($mtype == 9) { $rehref = "Лот монет "; } if ($rows['gname']) { $rehref .= $rows['gname'] . "-"; } $rehref .= $rows['name']; if ($rows['metal']) { $rehref .= "-" . $rows['metal']; } if ($rows['year']) { $rehref .= "-" . $rows['year']; } $namecoins = $rehref; $rehrefdubdle = contentHelper::strtolower_ru($rehref) . "_c" . ($mtype == 1 ? $rows['parent'] : $rows['shopcoins']) . "_pc" . ($parent > 0 ? $parent : (($mtype == 7 || $mtype == 8 || $mtype == 6 || $mtype == 4 || $mtype == 2) && $rows["amount"] > 1 ? $rows['shopcoins'] : ($mtype == 1 ? $rows['parent'] : 0))) . "_m" . $rows['materialtype'] . "_pp1.html"; $rehref = contentHelper::strtolower_ru($rehref) . "_c" . $rows['shopcoins'] . "_m" . $rows['materialtype'] . ".html"; } else { if ($mtype == 1) { $rehref = "Монета "; } if ($mtype == 8) { $rehref = "Монета "; } if ($mtype == 7) { $rehref = "Набор монет "; } if ($mtype == 2) { $rehref = "Банкнота "; } if ($mtype == 4) { $rehref = "Набор монет "; } if ($mtype == 5) { $rehref = "Книга "; } if ($mtype == 9) { $rehref = "Лот монет "; } if ($mtype == 10) { $rehref = "Нотгельд "; } if ($mtype == 11) { $rehref = "Монета "; } if (in_array($rows["materialtype"], array(2, 4, 7, 8, 6)) && $rows['amount'] > 10) { $rows['amount'] = 10; } if ($rows['gname']) { $rehref .= $rows['gname'] . " "; } $rehref .= $rows['name']; if ($rows['metal']) { $rehref .= " " . $rows['metal']; } if ($rows['year']) { $rehref .= " " . $rows['year']; } $namecoins = $rehref; $rehrefdubdle = contentHelper::strtolower_ru($rehref) . "_c" . ($mtype == 1 || $mtype == 10 || $mtype == 12 ? $rows['parent'] : $rows['shopcoins']) . "_pc" . ($parent > 0 ? $parent : (($mtype == 7 || $mtype == 8 || $mtype == 6 || $mtype == 4 || $mtype == 2) && $rows["amount"] > 1 ? $rows['shopcoins'] : ($mtype == 1 || $mtype == 10 ? $rows['parent'] : 0))) . "_m" . $rows['materialtype'] . "_pp1.html"; $rehref = contentHelper::strtolower_ru($rehref) . "_c" . $rows['shopcoins'] . "_m" . $rows['materialtype'] . ".html"; } return array('namecoins' => $namecoins, 'rehrefdubdle' => $rehrefdubdle, 'rehref' => $rehref); }
<li> <div class="coin_info" id='item<?php echo $rowsp['shopcoins']; ?> '> <div id=show<?php echo $rowsp['shopcoins']; ?> ></div> <? $rowsp = array_merge($rowsp, contentHelper::getRegHref($rowsp)); $statuses = $shopcoins_class->getBuyStatus($rowsp["shopcoins"],$tpl['user']['can_see'],$ourcoinsorder,$shopcoinsorder); $rowsp['buy_status'] = $statuses['buy_status']; $rowsp['reserved_status'] = $statuses['reserved_status']; //$rowsp['mark'] = $shopcoins_class->getMarks($rowsp["shopcoins"]); echo contentHelper::render('shopcoins/item/itemmini-carusel',$rowsp);?> </div> </li> <?}?> </ul> </div> </div> <script> $(document).ready(function() { $('.d-carousel-show .carousel').jcarousel({ scroll: 1, itemFallbackDimension: 75 }); }); </script>
//тематика $shopcoinstheme = array(); $ShopcoinsThemeArray = array(); $strtheme = decbin($rows_main["theme"]); $strthemelen = strlen($strtheme); $chars = preg_split('//', $strtheme, -1, PREG_SPLIT_NO_EMPTY); for ($k=0; $k<$strthemelen; $k++) { if ($chars[$k]==1) { $shopcoinstheme[] = $ThemeArray[($strthemelen-1-$k)]; if (!in_array(($strthemelen-1-$k), $ShopcoinsThemeArray)) $ShopcoinsThemeArray[] = ($strthemelen-1-$k); } } $tpl['show']['shopcoinstheme'] = $shopcoinstheme; //серия if ($rows_main["series"]){ $rows_main["series_title"] = $shopcoins_class->getSeries($rows_main["series"]); } $rows_main['year'] = contentHelper::setYearText($rows_main['year'],$materialtype); } else $tpl['show']['error']['no_coins'] = true; } else { $tpl['show']['error']['no_coins'] = true; } require_once("show-search.ctl.php");
} if($ArrayShopcoins) $itemsShopcoins = $shopcoins_class->findByIds($ArrayShopcoins); foreach ($itemsShopcoins as $item){ $key = $item["shopcoins"]; $tpl['one_series']['data'][$key] = array_merge($tpl['one_series']['data'][$key],$item); //$group = $shopcoins_class->getGroupItem($rows['group']); // $tpl['one_series']['data'][$key]['gname'] = $group['name'] ; //var_dump($tpl['one_series']['data'][$key]['gname']); $tpl['one_series']['data'][$key]['metal'] = $tpl['metalls'][$rows['metal_id']]; $tpl['one_series']['data'][$key]['condition'] = $tpl['conditions'][$rows['condition_id']]; $tpl['one_series']['data'][$key] = array_merge($tpl['one_series']['data'][$key], contentHelper::getRegHref($tpl['one_series']['data'][$key])); $statuses = $shopcoins_class->getBuyStatus($key,$tpl['user']['can_see'],$ourcoinsorder,$shopcoinsorder,$item); // var_dump($tpl['one_series']['data'][$key]); //echo "<br><br>"; $tpl['one_series']['data'][$key]['buy_status'] = $statuses['buy_status']; $tpl['one_series']['data'][$key]['reserved_status'] = $statuses['reserved_status']; $tpl['one_series']['data'][$key]['mark'] = $shopcoins_class->getMarks($key); $details = $details_class->getItem($key); $tpl['one_series']['data'][$key]["details"] = ''; if($details) $tpl['one_series']['data'][$key]["details"] = $details["details"]; } } }
foreach ($tpl['series']['data'] as $s){ // var_dump($s); ?> <div class="blockshop"> <div class="blockshop-full"> <div class="ceries-top"> <a href="<?php echo $cfg['site_dir']; ?> shopcoins/series/<?php echo $s["id"]; ?> " class="image-s left"> <? if($s["image"]){ echo contentHelper::showImage('/seriesimages/'.$s["image"],$s["name"]); } else {?> <img src="<?php echo $cfg['site_dir']; ?> images/net_izobrajenia.jpg" width="200" /> <?}?> </a> <a href="<?php echo $cfg['site_dir']; ?> shopcoins/series/<?php echo $s["id"]; ?> " class="image-t"> <?php
$keywords = $tpl['biblio']['_Keywords']; $correct_links = contentHelper::strtolower_ru($tpl['biblio']['data']["name"]) . "_n" . $tpl['biblio']['data']["biblio"] . ".html"; if ("/biblio/" . $correct_links != urldecode($_SERVER['REQUEST_URI'])) { header('HTTP/1.1 301 Moved Permanently'); header('Location: ' . $cfg['site_dir'] . "biblio/" . $correct_links); die; } $tpl['breadcrumbs'][] = array('text' => 'Библиотека нумизмата', 'href' => $cfg['site_dir'] . 'biblio', 'base_href' => $cfg['site_dir'] . 'biblio'); $tpl['breadcrumbs'][] = array('text' => $tpl['biblio']['data']['name'], 'href' => '', 'base_href' => ""); $mytext = str_replace(chr(13), "<br>", $tpl['biblio']['data']['text']); $mytext = str_replace("<<<", "<img src={$biblioimagesfolder}/", $mytext); $mytext = str_replace(">>>", ">", $mytext); $tpl['biblio']['data']['text'] = str_replace("`", "'", $mytext); $tpl['pages'] = array(); if (!$tpl['biblio']['data']['parent']) { //является вершиной дерева $sql = "select biblio,name from biblio where parent='{$biblio}' order by biblio;"; $tpl['pages'] = $biblio_class->getDataSql($sql); foreach ($tpl['pages'] as $i => $rows1) { $tpl['pages'][$i]['correct_link'] = contentHelper::strtolower_ru($rows1["name"]) . "_n" . $rows1["biblio"] . ".html"; } } else { //является лепестком $sql = "select biblio,name from biblio where biblio='" . $tpl['biblio']['data']['parent'] . "' or parent='" . $tpl['biblio']['data']['parent'] . "' order by parent, biblio;"; $tpl['pages'] = $biblio_class->getDataSql($sql); foreach ($tpl['pages'] as $i => $rows1) { $tpl['pages'][$i]['correct_link'] = contentHelper::strtolower_ru($rows1["name"]) . "_n" . $rows1["biblio"] . ".html"; } } $biblioByKeywords = $biblio_class->getBiblioByKeywords($keywords, $biblio); $newsbyKeywords = $biblio_class->getNewsByKeywords($keywords, $biblio);
$tmpbody2 .= "<td>".$rows['price2']; } if ($rows['price3'] && $rows['amount3']) { $tmpbody1 .= "<td>".$rows['amount3']; $tmpbody2 .= "<td>".$rows['price3']; } if ($rows['price4'] && $rows['amount4']) { $tmpbody1 .= "<td>".$rows['amount4']; $tmpbody2 .= "<td>".$rows['price4']; } if ($rows['price5'] && $rows['amount5']) { $tmpbody1 .= "<td>".$rows['amount5']; $tmpbody2 .= "<td>".$rows['price5']; } echo $tmpbody1."</tr>".$tmpbody2."</tr></table>"; } ?> </div> <? echo contentHelper::render('shopcoins/price/prices',$rows); if(!$mycoins){ echo contentHelper::render('_mobile/shopcoins/price/buy_button',$rows); echo contentHelper::render('_mobile/shopcoins/price/reserved',$rows); } ?>
$row['metal'] = $tpl['metalls'][$row['metal_id']]; $rehref = ""; if ($row['gname']) $rehref .= $row['gname']." "; $rehref .= $row['name']; if($row['year']) $rehref .= " ".contentHelper::setYearText($row['year'],$row['materialtype']); if ($row['metal']) $rehref .= " ".$row['metal']; if($row['price']) $rehref .= " <font color=red>".ceil($row['price'])." руб.</font>"; $image = contentHelper::showImage("smallimages/".$row["image_small"],'');; $currval = array(); $currval['label'] = TRIM($rehref)?trim($rehref):$row['name']; $currval['image'] = $image?$image:''; $currval['id'] = $row['shopcoins']; $data_href = contentHelper::getRegHref($row); $currval['href'] = $cfg['site_dir'].'shopcoins/'.$data_href['rehref']; array_push($data, $currval); } $currval = array(); $currval['label'] = "Показать результаты поиска"; $currval['image'] = ""; $currval['id'] = 0; $currval['href'] = $cfg['site_dir']."shopcoins/index.php?search=".$search; array_push($data, $currval); echo json_encode($data); die();
foreach ($result_shopcoins as $rows_shopcoins) { // var_dump($rows_shopcoins); // echo "<br>"; $tpl['catalognew']['catalogshopcoins'][$rows_shopcoins["catalog"]] = $rows_shopcoins["shopcoins"]; } } if (sizeof($tpl['catalognew']['MyShowArray']) == 0) { $tpl['catalognew']['errors'][] = "<br><p class=txt><strong><font color=red>Извините, нет результатов, удовлетворяющих поиску. Попробуйте другие варианты.</font></strong><br><br>"; } else { foreach ($tpl['catalognew']['MyShowArray'] as $key => $rows) { $tpl['catalognew']['MyShowArray'][$key]['metal'] = $tpl['metalls'][$rows['metal']]; $tpl['catalognew']['MyShowArray'][$key]['shopcoins'] = $rows['catalog']; $tpl['catalognew']['MyShowArray'][$key]['year'] = $rows['yearstart']; // moneta-severnaya-koreya-1-von-alyuminii-2001_c67404_m1.html // moneta-severnaya-koreya-1-von-alyuminii-2001_c_pc_m1_pp1.html $tpl['catalognew']['MyShowArray'][$key] = array_merge($tpl['catalognew']['MyShowArray'][$key], contentHelper::getRegHref($tpl['catalognew']['MyShowArray'][$key], $materialtype)); $tpl['catalognew']['MyShowArray'][$key]['show_in_shop'] = false; if (isset($tpl['catalognew']['catalogshopcoins'][$rows["catalog"]])) { $tpl['catalognew']['MyShowArray'][$key]['show_in_shop'] = true; $tpl['catalognew']['MyShowArray'][$key]['show_in_shop_id'] = $tpl['catalognew']['catalogshopcoins'][$rows["catalog"]]; } $shopcoinstheme = array(); $strtheme = decbin($rows["theme"]); $strthemelen = strlen($strtheme); $chars = preg_split('//', $strtheme, -1, PREG_SPLIT_NO_EMPTY); for ($k = 0; $k < $strthemelen; $k++) { if ($chars[$k] == 1) { $shopcoinstheme[] = $ThemeArray[$strthemelen - 1 - $k]; } } $tpl['catalognew']['MyShowArray'][$key]["theme"] = implode(',', $shopcoinstheme);
?> <?php echo contentHelper::returnSeoHref("http://www.numizmatik.ru/shopcoins/revaluation", "Распродажа монет", array('title' => 'Распродажа монет', "class" => "topmenu")); ?> </li> <li> <?php echo $tpl['user']['user_id'] == 811 ? " <a href='" . $cfg['site_dir'] . "shopcoins/newcoins?nocheck=1' class='pls left'><font color=black>(" . ($nocheck && $materialtype == 'newcoins' ? " - " : " + ") . ")</font></a>" : ""; ?> <?php echo contentHelper::returnSeoHref("http://www.numizmatik.ru/shopcoins/newcoins", "Новинки монет " . (date('Y', time()) - 2) . "-" . date('Y', time()), array('title' => 'Новинки монет', "class" => "topmenu")); ?> </li> <li><?php echo contentHelper::returnSeoHref("http://www.numizmatik.ru/shopcoins/series", "Серии монет", array('title' => 'Серии монет', "class" => "topmenu")); ?> </li> </ul> </div> <script> $('#hidden-shopcoins-menu').click(function (e) { if ($(e.target).prop('id') == "hidden-shopcoins-menu"||$(e.target).prop('id') == "hidden-shopcoins-span") { showMainLeftMenu('left_menu_shop');return false; } }); $('.hidden-shopcoins-stat').click(function (e) { //if ($(e.target).prop('id') == "hidden-shopcoins-stat") {
$tpl['price']['years'][$rows['year']][$rows2['simbol']]['url'] = urlBuild::makePrettyUrl($urlParams,$r_url); } } if (!$pcondition) { $rehref = "Монета "; if ($rows_main['gname'])$rehref .= $rows_main['gname']." "; $rehref .= $rows_main['aname']; if ($rows['ametal'])$rehref .= " ".$rows_main['ametal']; if ($rows['year']) $rehref .= " ".$rows_main['year']; $namecoins = $rehref; $tpl['rehref'] = contentHelper::strtolower_ru($rehref)."_cpc".$rows_main['priceshopcoins']."_cpr".$rows_main['parent']."_pcn0.html"; $sql_n = "select priceshopcoins.*, group.name as gname, `pricename`.name as aname, `pricemetal`.metal as ametal, pricesimbols.simbols as asimbols, `pricecondition`.`condition` as acondition from `priceshopcoins`,`pricename`,pricemetal, pricesimbols, pricecondition,`group` where priceshopcoins.parent='$parent' and `priceshopcoins`.`name`=`pricename`.`pricename` and priceshopcoins.metal=pricemetal.pricemetal and priceshopcoins.simbols=pricesimbols.pricesimbols and priceshopcoins.condition=pricecondition.pricecondition and priceshopcoins.group=group.group order by pricecondition.position;"; //echo $sql_n; $tpl['result_n'] = $price_class->getDataSql($sql_n); $tpl['arrayprice'] = $tpl['arrayamount'] = $tpl['arraycondition'] = array(); $condition = 0; foreach ($tpl['result_n'] as $rows_n) { if ($condition != $rows_n['condition'] && $condition!=9) { $tpl['arraycondition'][$rows_n['condition']] = $rows_n['acondition']; $condition = $rows_n['condition']; } $tpl['arrayprice'][$rows_n['acondition']] += $rows_n['priceend'];
foreach ($tpl['shop']['MyShowArray'] as $i=>$rows) { $item = $shopcoins_class->getItem($rows['shopcoins']); $rows = array_merge($rows,$item); $tpl['shop']['MyShowArray'][$i] = $rows; // var_dump($rows["image_small"]); //формируем картинки "подобные" $tpl['shop']['MyShowArray'][$i]['tmpsmallimage'] = array(); if (($rows["materialtype"] ==1)&&isset($tpl['shop']['ImageParent'][$rows["parent"]])&&$tpl['shop']['ImageParent'][$rows["parent"]]>0 && !$mycoins) { $tpl['shop']['MyShowArray'][$i]['tmpsmallimage'][] =contentHelper::showImage("smallimages/".$rows["image_small"],"Монета ".$rows["gname"]." | ".$rows["name"]); $tpl['shop']['MyShowArray'][$i]['tmpsmallimage'][] =contentHelper::showImage("smallimages/".$tpl['shop']['ImageParent'][$rows["parent"]][0],"Монета ".$rows["gname"]." | ".$rows["name"]); } $tpl['shop']['MyShowArray'][$i] = array_merge($tpl['shop']['MyShowArray'][$i], contentHelper::getRegHref($rows,$materialtype,$parent)); if ($materialtype==5||$materialtype==3){ $tpl['shop']['MyShowArray'][$i]['amountall'] = ( !$rows["amount"])?1:$rows["amount"]; } else { if (in_array($rows["materialtype"],array(2,4,7,8,6)) && $rows['amount']>10) $rows['amount'] = 10; $amountall = $rows['amount']; if (in_array($rows["materialtype"],array(8,6,7,2,4))) { $amountall = ( !$rows["amount"])?1:$rows["amount"]; } $tpl['shop']['MyShowArray'][$i]['amountall'] = $amountall; } /*$tpl['shop']['MyShowArray'][$i]['namecoins'] = $namecoins;
$ahref_groups .=contentHelper::groupUrl($GroupName,$groupMain); } else { foreach ((array)$groups as $group){ $ahref_groups .='&groups[]='.$group; } } foreach ((array)$years_p as $year_p){ $ahref_years_p .='&years_p[]='.$year_p; } foreach ((array)$years as $year){ $ahref_years .='&years[]='.$year; } if($nominalMain){ $ahref_nominals = contentHelper::nominalUrl($nominalMainTitle,$nominalMain); } else { foreach ((array)$nominals as $nominal){ $ahref_nominals .='&nominals[]='.$nominal; } } if($materialtype!=3||($materialtype==3&&$tpl['filter']['nominals'])){ ?> <div class="box-heading" id='filters-opened' style="display:<?php echo $minifed_f ? 'none' : 'block'; ?> "> <div class="left">Фильтр товаров</div>
?> <div class="coin_info-mini left " id='item<?php echo $rows_show_relation2['shopcoins']; ?> '> <div id=show<?php echo $rows_show_relation2['shopcoins']; ?> ></div> <? $statuses = $shopcoins_class->getBuyStatus($rows_show_relation2["shopcoins"],$tpl['user']['can_see'],$ourcoinsorder,$shopcoinsorder); $rows_show_relation2['buy_status'] = $statuses['buy_status']; $rows_show_relation2['reserved_status'] = $statuses['reserved_status']; $rows_show_relation2['mark'] = $shopcoins_class->getMarks($rows_show_relation2["shopcoins"]); echo contentHelper::render('shopcoins/item/itemmini-carusel',$rows_show_relation2); ?> </div> <?}?> </div> <?break; } case 'filter':{?> <div class="tab_filter"> </div> <? foreach ($lastFilters as $row){ $href_array = urlBuild::makePrettyOfferUrl($row,$materialIDsRule,$ThemeArray,$tpl,$shopcoins_class,array('full'=>true)); ?> <div> <span><?php echo date('Y-m-d H:i', $row['datetime']); ?>
$tpl['shop']['related'] = array(); //сейчас показываем токо для аксессуаров if ($materialtype == 3) { //показ сопутствующих товаров $tpl['shop']['related'] = $shopcoins_class->getRelated($catalog); $i = 0; $oldmaterialtype = 0; if ($tpl['shop']['related']) { foreach ($tpl['shop']['related'] as $rows) { $rows['metal'] = $tpl['metalls'][$rows['metal_id']]; $rows['condition'] = $tpl['conditions'][$rows['condition_id']]; $tpl['shop']['related'][$i]['additional_title'] = ''; $row = $shopcoins_class->getItem($rows["shopcoins"],true); $tpl['shop']['related'][$i] = array_merge($row, contentHelper::getRegHref($rows)); if ($oldmaterialtype != $rows["materialtype"]) { $tpl['shop']['related'][$i]['additional_title'] = $MaterialTypeArray[$rows["materialtype"]]; $oldmaterialtype = $rows["materialtype"]; } $i++; } } } $tpl['shop']['resultp'] = $shopcoins_class->showedWith($catalog, $rows_main); //$tpl['shop']['resultp'][$i]['buy_status']=2; $tpl['shop']['result_show_relation2'] = array(); $tpl['shop']['result_show_relation3'] = array();
} elseif ($tpl['biblio']['data']['typesource']==4) { echo "<p align=right>Источник: \"".$tpl['biblio']['data']['source']."\""; } elseif ($tpl['biblio']['data']['typesource']==5) { echo "<p align=right>Источник: <a href=mailto:".$tpl['biblio']['data']['source'].">".$tpl['biblio']['data']['source']."</a>"; } } if ($tpl['biblio']['data']['author']) echo "<p align=right>Автор: ".$tpl['biblio']['data']['author']; if ($tpl['biblio']['data']['email']) echo "<p align=right>Email: <a href=mailto:".$tpl['biblio']['data']['email'].">".$tpl['biblio']['data']['email']."</a>"; echo "<br><br>"; if ($biblioByKeywords) { echo "<p class=txt><b>Статьи по теме:</b></p><ul>"; foreach ($biblioByKeywords as $rows){ $namehref = contentHelper::strtolower_ru($rows["name"])."_n".$rows["biblio"].".html"; echo "<p class=txt><li><a href=\"".$cfg['site_dir']."biblio/$namehref"."\">".$rows["name"]."</a></li>"; } echo "</ul>"; } echo "<br><br>"; if ($newsbyKeywords){ echo "<p class=txt><b>Новости по теме:</b></p><ul>"; $sql = "select news, name from news where $sql1 order by date desc limit 5;"; foreach ($newsbyKeywords as $rows){ $namehref = contentHelper::strtolower_ru($rows["name"])."_n".$rows["news"].".html"; echo "<p class=txt><li><a href=\"".$cfg['site_dir']."news/$namehref"."\">".$rows["name"]."</a></li>"; } echo "</ul>"; }
<? $image = (trim($rows_main["image_big"])?$rows_main["image_big"]:$rows_main["image"]); ?> <div id=Image_Big class="main_img_big center"> <?php echo contentHelper::showImage('images/' . $rows_main["image_big"], contentHelper::getImgTitleOne($rows_main), array('alt' => contentHelper::getAltOne($rows_main))); ?> </div>