Esempio n. 1
0
    	die();
	}  
    
    $stats_class->saveCoins($catalog);
	if ($rows_main) {
		$ourcoinsorder = array();

		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"];
			}
		}

		$rows_main['name'] = contentHelper::nominalFormat($rows_main['name']);
		$details = $details_class->getItem($catalog);
		$rows_main['details'] = '';
		if ($details) $rows_main['details'] = $details["details"];
		$rows_main['metal'] = $tpl['metalls'][$rows_main['metal_id']];
		$rows_main['condition'] = $tpl['conditions'][$rows_main['condition_id']];
		$next_coins = $shopcoins_class->getNext($catalog, $materialtype);
		//var_dump($next_coins);
		if ($next_coins) {
			$next_coins['metal'] = $tpl['metalls'][$next_coins['metal_id']];
		}
		$previos_coins = $shopcoins_class->getPrevios($catalog, $materialtype);

		if ($previos_coins) $previos_coins['metal'] = $tpl['metalls'][$previos_coins['metal_id']];
		$tpl['show']['next'] = ($next_coins) ? contentHelper::getRegHref($next_coins, $materialtype, $parent) : null;
		$tpl['show']['previos'] = ($previos_coins) ? contentHelper::getRegHref($previos_coins, $materialtype, $parent) : null;
Esempio n. 2
0
 $rows = array_merge($rows, $tpl['shop']['items'][$rows["shopcoins"]]);
 $tpl['shop']['MyShowArray'][$i] = array_merge($rows, $tpl['shop']['items'][$rows["shopcoins"]]);
 $tpl['shop']['MyShowArray'][$i]['condition'] = isset($tpl['conditions'][$rows['condition_id']]) ? $tpl['conditions'][$rows['condition_id']] : '';
 $tpl['shop']['MyShowArray'][$i]['metal'] = isset($tpl['metalls'][$rows['metal_id']]) ? $tpl['metalls'][$rows['metal_id']] : '';
 $details = $details_class->getItem($rows["shopcoins"]);
 $tpl['shop']['MyShowArray'][$i]["details"] = '';
 if ($details) {
     $tpl['shop']['MyShowArray'][$i]["details"] = $details["details"];
 }
 //формируем картинки "подобные"
 $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]['name'] = contentHelper::nominalFormat($tpl['shop']['MyShowArray'][$i]['name']);
 $tpl['shop']['MyShowArray'][$i] = array_merge($tpl['shop']['MyShowArray'][$i], contentHelper::getRegHref($tpl['shop']['MyShowArray'][$i], $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]['mark'] = $shopcoins_class->getMarks($rows["shopcoins"]);
 $tpl['shop']['MyShowArray'][$i]['buy_status'] = 0;