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;
if($tpl['user']['user_id']) { $count = $cache->load("coinscount_user_".$tpl['user']['user_id']); } else $count = $cache->load("coinscount_ses_".session_id()); $tpl['catalog']['lastViewsStat'] = array(); $lastCoinsIds = $stats_class->getlastCoinsIds($tpl['pagenum']); if($lastCoinsIds){ $d = array(); $d_order = array(); foreach ($lastCoinsIds as $id){ $row = $shopcoins_class->getItem($id,true); $row['condition'] = $tpl['conditions'][$row['condition_id']]; $row['metal'] = $tpl['metalls'][$row['metal_id']]; $d_order[] = array_merge($row, contentHelper::getRegHref($row)); } $tpl['catalog']['lastViewsStat'] = $d_order; } break; } case 'filter':{ if($tpl['user']['user_id']) { $count = $cache->load("filterscount_user_".$tpl['user']['user_id']); } else $count = $cache->load("filterscount_ses_".session_id()); $title = "Последние просматриваемые страны и номиналы"; $lastFilters = $stats_class->getlastFilters($tpl['pagenum']); break; }
$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'); ?>
$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 ($tpl['show']['resultcicle'] as $rowsp){ $rowsp['metal'] = $tpl['metalls'][$rowsp['metal_id']]; $rowsp['condition'] = $tpl['conditions'][$rowsp['condition_id']]; ?> <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({
} 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 ($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);
$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();
$materials = array(1 => ""); foreach (urlBuild::$shopcoins_materialIDsRule as $k => $v) { $materials[$k] = $v; } $pos = 0; $sql = "SELECT count(shopcoins) FROM `shopcoins_search` AS `s` WHERE (s.check=1 or s.check>=4) "; $count = $shopcoins_class->getOneSql($sql); echo $count; while ($pos < $count) { echo $pos . "\n"; $sql = "SELECT `s`.*, `group`.`name` AS `gname`, `sn`.`name` FROM `shopcoins_search` AS `s` \n\t\tINNER JOIN `group` ON s.group=group.group\n\t\tINNER JOIN `shopcoins_name` AS `sn` ON s.nominal_id=sn.id \n\t\tWHERE (s.check=1 or s.check>=4) order by novelty desc, dateinsert desc limit {$pos},2000"; $data = $shopcoins_class->getDataSql($sql); foreach ($data as $i => $row) { $data[$i]['condition'] = isset($tpl['conditions'][$rows['condition_id']]) ? $tpl['conditions'][$rows['condition_id']] : ''; $data[$i]['metal'] = isset($tpl['metalls'][$rows['metal_id']]) ? $tpl['metalls'][$rows['metal_id']] : ''; $ro = contentHelper::getRegHref($data[$i]); $urls[1][] = "http://www.numizmatik.ru/shopcoins/" . $ro["rehref"]; } $pos += 5000; } $urls[35][] = "http://www.numizmatik.ru/shopcoins/series"; require_once $cfg['path'] . '/models/shopcoinsbyseries.php'; $shopcoinsbyseries_class = new model_shopcoinsbyseries($db_class); $tpl['series']['data'] = $shopcoinsbyseries_class->getAllSeries(); foreach ($tpl['series']['data'] as $key => $s) { $urls[35][] = "http://www.numizmatik.ru/shopcoins/" . ($s["alias"] ? $s["alias"] . '-s' . $s["id"] . '.html' : 'series/' . $s["id"]); } //$sql = "truncate table `sitemaps`;"; //$result = mysql_query($sql); /*1 - товары 20 - разделы
<? foreach ($tpl['news']['show_relation'] as $rows_show_relation2){ $rows_show_relation2['metal'] = $tpl['metalls'][$rows_show_relation2['metal_id']]; $rows_show_relation2['condition'] = $tpl['conditions'][$rows_show_relation2['condition_id']]; ?> <li> <div class="coin_info" id='item<?php echo $rows_show_relation2['shopcoins']; ?> ' itemscope itemtype="http://schema.org/Product"> <div id=show<?php echo $rows_show_relation2['shopcoins']; ?> ></div> <? $rows_show_relation2 = array_merge($rows_show_relation2, contentHelper::getRegHref($rows_show_relation2)); $statuses = $shopcoins_class->getBuyStatus($rows_show_relation2["shopcoins"],$tpl['user']['can_see'],$ourcoinsorder,$shopcoinsorder); $rows_show_relation2['buy_status'] = $statuses['buy_status']; //if($tpl['user']['user_id']==352480){ $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> </li> <?}?> </ul> </div>
$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); $tpl['shop']['related'] = array(); //сейчас показываем токо для аксессуаров $ourcoinsorder = array(); if ($materialtype==3 || $materialtype==5) { if ($shopcoinsorder > 1) { $result_ourorder = $shopcoins_class->getMyOrderdetails($shopcoinsorder); foreach ( $result_ourorder as $rows_ourorder){ $ourcoinsorder[] = $rows_ourorder["catalog"]; $ourcoinsorderamount[$rows_ourorder["catalog"]] = $rows_ourorder["amount"]; } } } $statuses = $shopcoins_class->getBuyStatus($catalog,$tpl['user']['can_see'],$ourcoinsorder,$shopcoinsorder); $rows_main['buy_status'] = $statuses['buy_status']; $rows_main['reserved_status'] = $statuses['reserved_status']; $rows_main = array_merge($rows_main, contentHelper::getRegHref($rows_main)); } else { $tpl['show']['error']['no_coins'] = true; } ?>
<td class="tboardtop" nowrap>Фото товара</td> <td class="tboardtop" width="200">Наименование</td> <td class="tboardtop" >Группа(страна)</td> <td class="tboardtop" >Год</td> <td class="tboardtop" >Номер</td> <td class="tboardtop" >Цена</td> <td class="tboardtop" >Количество</td> <td class="tboardtop" ><b>Сумма</b></td> <td class="tboardtop" ></td> </tr> </thead> <? $i=0; foreach ($tpl['orderdetails']['ArrayShopcoinsInOrder'] as $rows ){ $rows['shopcoins'] = $rows['catalog']; $names = contentHelper::getRegHref($rows); if ($rows["title_materialtype"]) {?> <tr><td colspan=9 class=h-cat><?=$rows["title_materialtype"]?></td></tr> <?}?> <tr> <td class=tboard id=image<?=$rows['catalog']?>> <div id=show<?=$rows['catalog']?>></div> <div class='image_block'> <?if($rows['image_big']){?> <div id="image<?=$rows['catalog']?>" class='imageBig' style="display:none;position: absolute;"> <img class="img_hover" src="<?=contentHelper::urlImage($rows['image_big'])?>" /> </div> <?}?> <? echo contentHelper::showImage("smallimages/".$rows["image_small"],$rows["gname"]." | ".$rows["name"]);?> </div> <?
$k = 0; $ids = array(); for ($i = 0; $i < sizeof($tmp); $i++) { $tmp1 = explode("|", $tmp[$i]); if ($tmp1[0]) { $ids[] = (int) $tmp1[0]; } } $tpl['catalog']['lastViews'] = array(); if ($ids) { $last_products = $shopcoins_class->getLastProducts($ids); $d = array(); foreach ($last_products as &$row) { $row['condition'] = $tpl['conditions'][$row['condition_id']]; $row['metal'] = $tpl['metalls'][$row['metal_id']]; $d[$row['shopcoins']] = array_merge($row, contentHelper::getRegHref($row)); } $d_order = array(); foreach ($ids as $id) { if (isset($d[$id])) { $d_order[] = $d[$id]; } } $tpl['catalog']['lastViews'] = $d_order; } $arraykeyword[] = "монеты"; $tpl['infotext'] = ''; if ($materialtype == 7) { $tpl['infotext'] = "Изображение предоставлено для данного типа монет. Все наборы не из обращения, но могут быть иногда банковские царапины, патина, налет и прочие дефекты хранения. В некоторых случаях может быть несовпадение года."; } if ($materialtype == 8) {