示例#1
0


if ($group)	{
	$groupData = $shopcoins_class->getGroupItem($group);
	$GroupName = $groupData["name"];
	
	$tpl['subscribe']['title'] = "Подписка на новые поступления в <br><b><font color=red>каталог</font> группы ".$GroupName."</b>";
	
} elseif ($catalog)	{
    
	$sql = "select catalognew.*, group.name as gname
	from catalognew, `group`
	where catalognew.catalog='$catalog'
	and catalognew.group = group.group;";
	
	$result = $catalognew_class->getItem($catalog,true);
	
	$tpl['subscribe']['title'] = "Подписка на изменения в <b><font color=red>каталоге</font> монеты<br> ".$result["gname"]." | ".$result["name"]."</b>";
}
	

if ($_SERVER['REQUEST_METHOD']=='POST'&&!$tpl['catalognew']['subscribe']['error']){	
	if (!$tpl['catalognew']['subscribe']['error']){
	    $catalognew_class->addCatalogsubscribe($tpl['user']['user_id'],$catalog,$group);			
		$tpl['subscribe']['send_status'] = true;
	}
} 

?>