{foreach from=$array_banners key=i item=v}
{if $i%2==1}<div class="center">{$i}{include file="banner.html" bclass="btypelp_rc"}</div><div class="clearfix"></div>{/if}
{/foreach}
{foreach from=$array_banners key=k item=v}
{foreach name="listings" from=$listings_array item=v}
{include file="short_listing.html"}
{if ($smarty.foreach.listings.index+1)==$appearance.ads_per_page/2|ceil && $smarty.foreach.listings.index!=$listings_array|@count-1}
{* ------ listings4 banners ------- *}
{if in_array('listings4',$banners_positions)}
{banner->getTemplateBanners p1='listings4' p2=$section p3=$cat p4=$bloc assign='array_banners'}
{if $array_banners|@count}<div class="clearfix mt10 mb10"></div><div class="dcenter">{/if}
{foreach from=$array_banners item=v}
<div class="center">{include file="banner.html" bclass="btypelp_rc"}</div><div class="clearfix"></div>
{/foreach}
{if $array_banners|@count}</div><br/>{/if}{/if}
{* ------- end listings4 banners ------- *}
{/if}
{/foreach}
require_once $config_abs_path . "/classes/credits.php";
$this->pay->setSubscription($total, $days);
}
if (0 < $act_type && !$nologin && isset($this->actions_array["new_creditspkg"]) && $this->actions_array["new_creditspkg"]["value"] != 0) {
require_once $config_abs_path . "/classes/credits.php";
if (!$credits_pending) {
$cr = new credits();
$no_credits = $cr->getNoCredits($this->actions_array["credits_pkg_id"]);
$cr->addForUser($user_id, $no_credits);
}
}
{$v.price_curr/$v.no_days}
class robokassa
{
public $postback_url = NULL;
public $post = NULL;
public $user_key = NULL;
public $robokassa_keys = NULL;
public $pending = NULL;
public $invoice_no = NULL;
public $pay_settings = NULL;
public $table = NULL;
public $error = NULL;
public $tmp = NULL;
public $formTitle = NULL;
public $name = NULL;
public $invId = NULL;
public function __construct()
{
global $db;
global $config_table_prefix;
$arr = $db->fetchAssoc("select `processor_table`, `processor_ret_table` from " . TABLE_PAYMENT_PROCESSORS . " where `processor_code` like 'robokassa'");
$this->table = $config_table_prefix . $arr["processor_table"];
$this->ret_table = $config_table_prefix . $arr["processor_ret_table"];
$this->name = "robokassa";
$this->invId = 0;
}
public function getTable()
{
global $db;
global $config_table_prefix;
$table = $config_table_prefix . $db->fetchRow("select `processor_table` from " . TABLE_PAYMENT_PROCESSORS . " where `processor_code` like 'robokassa'");
return $table;
}
public function setTable($table)
{
$this->table = $table;
}
public function init($key = "")
{
global $config_live_site;
$this->pending = 0;
if ($key) {
$this->user_key = $key;
} else {
if (isset($_REQUEST["InvId"])) {
$this->setUserKey(escape($_REQUEST["InvId"]));
} else {
$this->user_key = md5(uniqid(rand(), true));
}
}
$this->postback_url = $config_live_site . "/payment_return/robokassa.php";
$this->pay_settings = $this->getSettings();
$this->post["MrchLogin"] = $this->pay_settings["login"];
$this->post["Desc"] = $this->pay_settings["payment_desc"];
$this->post["Culture"] = $this->pay_settings["language"];
$this->post["Encoding"] = $this->pay_settings["encoding"];
$this->setDemo($this->pay_settings["test"]);
$this->robokassa_keys = array("OutSum", "InvId", "SignatureValue");
}
public function getUserKey()
{
return $this->user_key;
}
public function setUserKey($val)
{
global $db;
$ukey = $db->fetchRow("select `ukey` from " . TABLE_PAYMENT_ACTIONS . " where id='" . $val . "'");
$this->user_key = $ukey;
}
public function setSubscription($total, $days)
{
$this->amount = $total;
$this->pay->setSubscription($total, $days);
}
public function setFirstSubscription($total, $days)
{
$this->amount = $total;
$this->pay->setFirstSubscription($total, $days);
}
<select class="test45" onchange="window.location.href=this.options[this.selectedIndex].value">
<option value="https://site.ru/url.html" onclick="javascript:onSelect(this);">Категория 1</option>
onclick="javascript:onSelect(this);"
// categories list
global $short_categories;
$subcategories_array = array();
$i=0;
foreach($short_categories as $crt_cat) {
if($crt_cat['id']==$cat) { $parent_id = $crt_cat['parent_id']; }
if($crt_cat['parent_id']==$cat) {
$subcategories_array[$i++] = $crt_cat;
}
}
$smarty->assign("categories_array",$subcategories_array);
$fset = 0;
$cf = new fields('cf');
$base_refine_fields = common::getCachedObject("base_refine_fields", array("fieldset" => $fset));
$smarty->assign("fields", $base_refine_fields);
return number_format(floatval$credits, 2);