- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
<?
/******************************************************************************
Набор функций для фрмирования контента страницы сайт
******************************************************************************/
function GetAnnnounses($dp){
global $shopid,$db,$ll;
$qwe=$db->query("SELECT ap.position,ac.content,ac.name
FROM announce_pages ap,
announce_content ac
WHERE ap.owner=".$shopid."
AND ap.page=".$ll['id']."
AND ap.line".$dp."
AND ac.owner=".$shopid."
AND ac.id=ap.announse
AND ac.publish=1
GROUP BY 1,2
ORDER BY ac.updated");
while($v=$db->fetch_row($qwe)){
$an[$v[0]][] = $v[1]; //content
$at[$v[0]][] = $v[2]; //title
} //while v
if((is_array($an)) && (($ll['announse_before']+$ll['announse_after'])>0)){
$qwe=$db->query("SELECT id,main_shab,template_type,title
FROM templates
WHERE owner=".$shopid."
AND id IN(".$ll['announse_before'].",".$ll['announse_after'].")");
while($v=$db->fetch_row($qwe)){
if($v[1]=='') continue;
$i=($v[0]==$ll['announse_before']) ? 0 : 1;
$cnt=(is_array($an[$i])) ? join("\n",$an[$i]) : $an[$i];
//все объявления блока входят в один шаблон
if($v[2]==0) $an[$i]=str_replace(array("{title}","{content}"),
array($v[3],$cnt),
$v[1]);
//под каждое объявление свой экземпляр шаблона
else{
reset($an[$i]);
while(list($o,$vl)=each($an[$i])) $an[$i][$o]=str_replace(array("{title}","{content}"),
array($at[$i][$o],$vl),
************ ПРОПУЩЮ Г*********** И ДАЛЕЕ ПРОСТО ФИШИН!!!!!!!!!
function getMainContent(&$d,&$post,$shab=1){
global $shopid,$db,$path,$af,$dar,$dfc,$dtc,$ll,$cpc,$dir,$root,$domain,$swp,
$fl,$tv,$ln,$fr,$ud,$m,$u,$fn,$info,$ni,$bd,$ffp,$fn,$uf,$dfa,$dx,$fla,
$st,$ba,$ds,$mid,$mia,$pma,$tm,$mt,$dts,$ft,$sc,$dis,$fcnt,$pub,$auth,
$otp,$ans,$dh,$ds,$nms,$tps,$pgs,$dh,$str,$spr,$bid,$dr,$fdp,$mmm,
$ass,$dss,$clmn,$dclmn,$fn,$at,$aclmn,$fclmn,$da,$da2,$nc,$crs,$aodh,
$pcol,$rc,$vr,$cc,$cnm,$no,$lclmn,$cur,$tmp,$tdl,$cln,$fldc,$ms,$un,$ii,
$oid,$sid,$stb,$msh,$kid,$sqt,$stn,$sss,$tta,$ic,$view,$cid,$pid,$nt,$sord,
$add,$pr,$mas,$gd,$scc,$ppp,$rpr,$sclmn,$sln,$sos,$tov,$lim,$p,$r,$tic,
$ftp,$free,$did,$line,$dstr,$dm,$img,$script,$sid,$parent,$ordinal,$uf,
$cca,$csa,$ccc,$dop,$cba,$cfa,$cft,$cai,$cfd,$cfc,$ccs,$cur,$dtc,$dfc,
$repeat,$rh,$me,$sc,$dis,$tpl,$flt,$iw,$url,$dm,$ddd,$otmp,$fl,$ur,$ug,
$onload,$cl,$dr,$fdp,$pm,$dm,$num,$fmid,$url,$str,$mls,$dm,$pm,$mis,$way,
$pa,$pms,$val,$last,$prop,$url,$is,$us,$uw,$used,$na,$pat,$rep,$un,$sc,$dis,
$dt,$ga,$ds,$nms,$tps,$pgs,$fpg,$dln,$uln,$loc,$dms,$gt,$ni,$spam,$arr,
$fld,$cnt,$fa,$uf,$atf,$dfa,$fib,$equal,$c,$tid,$ttl,$short_ttl,$css,
$add,$oid,$sqt,$stb,$stn,$da,$da2,$pr,$clmn,$mas,$gd,$path,$scc,$tov,$svs,$sva,
$sss,$rpr,$sclmn,$sln,$sos,$ft,$aclmn,$tov,$lim,$ppp,$answ,$rln,$ver,$scom,
$cr,$sc,$cc,$ccn,$rc;
$me = $_SESSION['usr'][$shopid];
switch($post['i']){
case 1: //вносим изменения в свой профайл на сайте
if(!empty($me)){include($path."site/auth/edit_profile.php");}
break;
case 2: //форма запроса на восстановление пароля
if(empty($me)){include($path."site/auth/restore_pwd.php");}
break;
case 3: //аккаунт юзера заблокирован
case 4: //неверный логин/пароль
case 5: //удачная авторизация
case 18: //пароль изменен
include($path."panel/structure/dop_fields/announses/get_mes.php");
$spam = $gt = 1;
$mma = array(3=>9,4=>14,5=>15,18=>22);
$d = get_mes($mma[$post['i']],1);
break;
case 9: //subscribe :: не верно указан email