Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
$serach_data = $sp_s;
if (!in_array($year, $tpl['filters']['years'])) {
    $year = null;
}
if ($years) {
    $years_data = $years;
} elseif ($year) {
    $years_data = $years = array($year);
}
$r_url = "http://www.numizmatik.ru/news";
if (count($group_data) == 1) {
    $groupMain = $GroupNameID = $group_data[0];
    $groupData = $shopcoins_class->getGroupItem($group_data[0]);
    $GroupName = $groupData["name"];
    $urlParams['group'] = array($groupMain => $GroupName);
    $tpl['breadcrumbs'][] = array('text' => $GroupName, 'href' => $r_url . contentHelper::groupUrl($GroupName, $groupMain), 'base_href' => $r_url . contentHelper::groupUrl($GroupName, $groupMain));
} else {
    $urlParams['group'] = $group_data;
}
$WhereParams = array();
if ($years_data) {
    $WhereParams['years'] = $years_data;
}
if ($theme_data) {
    $WhereParams['theme'] = $theme_data;
}
if ($group_data) {
    $WhereParams['group'] = $group_data;
}
$urlParams['theme'] = $theme_data;
if ($text) {
Ejemplo n.º 3
0
<? 

if(isset($filter_groups)&&$filter_groups){
    $minifed_f = isset($_COOKIE['minifed_f'])?$_COOKIE['minifed_f']:0;

    $ahref = $nocheck?"&nocheck=$nocheck":'';
    $ahref .= $search?"&search=$search":'';
    $ahref .= $bydate?"&bydate=$bydate":'';
    $ahref_groups = $ahref;
    
    $ahref_years_p ='';
    $ahref_years ='';
    $ahref_nominals ='';
    
    if($groupMain){
        $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);
Ejemplo n.º 4
0
 $data_filter['group_id'] = $groupMain;
 $groupData = $shopcoins_class->getGroupItem($group_data[0]);
 //получаем дочерние элементы
 $childs = $catalognew_class->getParrentGroupsIds($group_data[0], $WhereParams);
 //Проверяем, подписаны или нет
 $tpl['is_Subscribe_for_group'] = $catalognew_class->getMyGroupSubscribe($tpl['user']['user_id'], $group_data[0]);
 $i = 1;
 foreach ($childs as $child) {
     $group_data[$i] = $child;
     $groups[$i] = $child;
     $i++;
 }
 $GroupName = $groupData["name"];
 $urlParams['group'] = array($group_data[0] => $GroupName);
 $tpl['breadcrumbs'][] = array('text' => $GroupName, 'href' => urlBuild::makePrettyUrl(array('materialtype' => $materialtype, 'group' => array($group_data[0] => $GroupName)), "http://www.numizmatik.ru/catalognew"), 'base_href' => urlBuild::makePrettyUrl(array('materialtype' => $materialtype, 'group' => array($group_data[0] => $GroupName)), "http://www.numizmatik.ru/catalognew"));
 $groupHref = contentHelper::groupUrl($GroupName, $groupMain);
 //$grouphref = strtolower_ru($GroupName)."_gn".$groupData['group'];
 $arraykeyword[] = $groupData["name"];
 if (trim($groupData["description"])) {
     $text = substr($groupData["description"], 0, 650);
     $text = substr($text, 0, strlen($text) - strpos(strrev($text), '.'));
     $text = iconv("CP1251//TRANSLIT//IGNORE", "UTF8", $text);
     //UTF-8
     $pic = '';
     if ($groupData["flagsmall"]) {
         $pic = "../group/smallimages/" . $groupData["flagsmall"];
     } elseif ($groupData["emblemsmall"]) {
         $pic = "../group/smallimages/" . $groupData["emblemsmall"];
     } elseif ($groupData["mapsmall"]) {
         $pic = "../group/smallimages/" . $groupData["mapsmall"];
     }
Ejemplo n.º 5
0
        ".($rows["weight"]>0?"<br>Вес: <strong>".$rows["weight"]." гр.</strong><br>":"")."
        ".(isset($rows["series"])&&$rows["series"]&&$group?"<br>Серия монет: ".$series_name[$rows["series"]]."":"")."
        ".($rows["materialtype"]==8&&$materialtype==1&&!$mycoins?"<br><font color=red>МОНЕТА С РАЗДЕЛА МЕЛОЧЬ, см. условия покупки в разделе</font>":"")."
        ".($rows["accessoryProducer"]?"<br>Производитель:<strong> ".$rows["accessoryProducer"]."</strong>":"")."
        ".($rows["accessoryColors"]?"<br>Цвета:<strong> ".$rows["accessoryColors"]."</strong>":"")."
        ".($rows["accessorySize"]?"<br>Размеры:<strong> ".$rows["accessorySize"]."</strong>":"");
        
        if ($rows["details"]){
        	echo "<br>Описание: ".$rows["details"];
        }*/?>
	   </td>
	   <td class=tboard>
	       <a href="<?=$names["rehref"]?>" target=_blank><?=$rows["name"]?></a>
	   </td>
	   <td class=tboard>
	       <a href="<?=$cfg['site_dir'].'shopcoins/'.$materialIDsRule[$rows["materialtype"]].contentHelper::groupUrl($rows["gname"],$rows['group'])?>">
	       <?=$rows["gname"]?>
	       </a>
	   </td>
	<td class=tboard><?=$rows["year"]?></td>
	<td class=tboard><?=$rows["number"]?></td>
	<td class=tboard><?=($rows["price"]==0)?"бесплатно":round($rows["price"])." руб."?></td>
	<td class=tboard align=center>
	
	<input type=hidden name=shopcoins<?=$i?> value='<?=$rows["catalog"]?>'>
	<!--<input type=hidden name=sqlamount<?=$i?> value='<?=$rows["amount"]?>'>
	<input type="<?=($rows["oamount"]?"text":"hidden")?>" name=amount_<?=$i?> value='<?=$rows["oamount"]?>' size=2 maxlength=5 class=formtxt>
	<?($rows["oamount"]?$rows["oamount"]:"")?>
	-->

<? 
Ejemplo n.º 6
0
	</a><br>
	<?}?>
	<?= ($rows_main["year"]?"Год: <strong>".$rows_main["year"]."</strong><br>":"")?>
	<?= (trim($rows_main["metal"])?"Металл: <strong>".$rows_main["metal"]."</strong><br>":"")?>
	<?=(trim($rows_main["condition"])?"Состояние: <strong><font color=blue>".$rows_main["condition"]."</font></strong>":"")?>
        </span>

    
    <div id=subinfo>
Название: <strong>

<?
//if($rows_main["materialtype"]==1){
    
    $r_gr_url = $cfg['site_dir'].'shopcoins/'.$materialIDsRule[$rows_main["materialtype"]];
    if($rows_main['group'])$r_gr_url .= contentHelper::groupUrl($rows_main["gname"],$rows_main['group']);
    $r_gr_url .= contentHelper::nominalUrl($rows_main["name"],$rows_main['nominal_id']);
    
    ?>
    <a href="<?=$r_gr_url?>" title="Посмотреть <?=$rows_main["name"]?>  <?=$rows_main["gname"]?>" alt="Посмотреть <?=$rows_main["name"]?>  <?=$rows_main["gname"]?>">
    <?=$rows_main["name"]?>
    </a>
<?//} else echo $rows_main["name"];

?>

</strong><br>
Номер: <strong><?=$rows_main["number"]?></strong><br>
<?
echo ($rows_main["width"]&&$rows_main["height"]?"<br>Приблизительный размер: <strong>".$rows_main["width"]."*".$rows_main["height"]." мм.</strong>":"")."
".($rows_main["weight"]>0?"<br>Вес: <strong>".$rows_main["weight"]." гр.</strong>":"")."