<?php /** * Created by JetBrains PhpStorm. * User: oleg * Date: 05.09.12 * Time: 22:56 * To change this template use File | Settings | File Templates. */ require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; CModule::IncludeModule("iblock"); $stockID = intval($_POST['ID']); global $USER; $userRes = new User($USER::GetID()); $props = $userRes->getProps(array("PROPERTY_CLUB")); $clubID = $props['PROPERTY_CLUB_VALUE']; $stock = new Stocks(); $stockInfo = $stock->getInfo($stockID); if ($stockInfo['PROPERTY_CLUB_ID_VALUE'] == $clubID) { if ($stock->published($stockID)) { $kupon = new Kupon(); $kupon->sendNotice(array("{$clubID}" => array($stockID))); } die(json_encode(array("status" => "ok", "class" => $stockInfo['ACTIVE'] == "N" ? "Y" : "N", "text" => $stockInfo['ACTIVE'] == "N" ? "Акция показываетя" : "Акция не показывается."))); } die(json_encode(array("status" => "error", "eee" => $USER::GetID())));
data-yashareQuickServices="yaru,vkontakte,facebook,twitter,moimir,lj,gplus"></div></td> </tr> </table> </div> <div class="clear_both"></div> <br/> <? if (count($arResult['stockList']) > 0): ?> <div id="list"> <table class="table table-striped"> <?foreach ($arResult['stockList'] as $val => $var): ?> <? $club = $arResult['club'][$stock["PROPERTY_CLUB_ID_VALUE"]]; $arFile = CFile::GetFileArray($var["DETAIL_PICTURE"]); $partner = Kupon::getDataServise($var['TAGS']); ?> <tr> <td> <div class="pull-left" style="margin:0px 10px 10px 0px"> <img class="thumbnail" src="<?php echo imgurl($arFile["SRC"], array("w" => 300)); ?> "/> </div> <a href="/club/stock/<?php echo $var["ID"]; ?> " class="stock_title" title="<?php
<?$type=is_array($arResult['club']['PROPERTY_TYPE_FACILITY_VALUE'])?implode("/",$arResult['club']['PROPERTY_TYPE_FACILITY_VALUE']):$arResult['club']['PROPERTY_TYPE_FACILITY_VALUE']; $APPLICATION->SetPageProperty("description", substr(str_replace("\n"," ",strip_tags($arResult['stockInfo']['~PREVIEW_TEXT'])),0,100)); $arFile = CFile::GetFileArray($arResult['stockInfo']["DETAIL_PICTURE"]); $partner = Kupon::getDataServise($arResult['stockInfo']['TAGS']); ?> <div class="stock"> <h2><?php echo $arResult['stockInfo']['NAME']; ?> </h2> <? $APPLICATION->IncludeComponent("mytb:subscribe.button", "", array( "CLUB_ID"=> intval($arResult['club']["ID"]), "CLUB_NAME"=> $arResult['club']['NAME'], ), false); ?> <div class="m_left w5"> <table class="table"> <tr> <th>Заведение</th> <td>«<a href="/club/<?php echo formUrl($arResult['club']["ID"], implode("-", $arResult['club']['PROPERTY_TYPE_FACILITY_VALUE']) . " " . $arResult['club']['NAME']); ?> /" title="<?php echo $type;