コード例 #1
0
ファイル: catalognew.ctl.php プロジェクト: nellka/numiz-new
    $tpl['seo_data'] = $catalognew_class->getSeo($materialtype, $group_data, $nominal_data);
    if ($tpl['seo_data']["pagetitle"]) {
        $tpl['catalognew']['_Title'] = $tpl['seo_data']["pagetitle"];
    }
    if ($tpl['seo_data']["description"]) {
        $tpl['catalognew']['_Description'] = $tpl['seo_data']["description"];
    }
}
if (count($group_data) == 1) {
    $groupMain = $GroupNameID = $group_data[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), '.'));
コード例 #2
0
ファイル: subscribe.ctl.php プロジェクト: nellka/numiz-new
$tpl['subscribe']['send_status'] = false;

$group = (int)request('group');
$catalog = (int)request('catalog');

if(!$tpl['user']['user_id']){
    $tpl['catalognew']['subscribe']['error'] = 'Чтобы подписаться на группу необходимо авторизоваться!';
} else {
     $userData = $user_class->getUserData();
     $tpl['subscribe']["email"] = $userData["email"];
     $tpl['subscribe']["userlogin"] = $userData["userlogin"];
}

if(!$tpl['catalognew']['subscribe']['error']){

    if($group&&$catalognew_class->getMyGroupSubscribe($tpl['user']['user_id'],$group)){
        $tpl['catalognew']['subscribe']['error'] = 'Вы уже подписаны на эту группу!';
    }

    if($catalog&&$catalognew_class->getMyCatalogSubscribe($tpl['user']['user_id'],$catalog)){
        $tpl['catalognew']['subscribe']['error'] = 'Вы уже подписаны на этот каталог!';
    }
}



if ($group)	{
	$groupData = $shopcoins_class->getGroupItem($group);
	$GroupName = $groupData["name"];
	
	$tpl['subscribe']['title'] = "Подписка на новые поступления в <br><b><font color=red>каталог</font> группы ".$GroupName."</b>";