',$txt); $txt = str_replace(" "," ",$txt); $txt = str_replace("'","'",$txt); $txt = str_replace('"','"',$txt); $txt = str_replace('<','<',$txt); $txt = str_replace('>','>',$txt); $txt = preg_replace('//','',$txt); $txt=str_replace("","",$txt); return $txt; } //RETURNS BEFORE, AFTER, AND BETWEEN FOR STRINGS function before($this, $inthat) { return substr($inthat, 0, strpos($inthat, $this)); } function after($this, $inthat) { if(!is_bool(strpos($inthat, $this))) { return substr($inthat, strpos($inthat,$this)+strlen($this)); } else { return false; } } function between($this, $that, $inthat) { return before($that, after($this, $inthat)); }//END before(), after(), and between() functions // FIND NUMBER OF OCCURRENCES OF CONTAINERS IN TEMPLATE function occurrencecount($this, $that, $inthat, $count) { $newinthat = after("$that", after("$this", $inthat)); if($newinthat != false) { $count = $count + 1; return occurrencecount($this, $that, $newinthat, $count); } else { return $count; } }//END occurrencecount() function $domain = $_SERVER['SERVER_NAME']; $domain=str_replace("www.","",$domain); $domain=str_replace("http://","",$domain); $domainb=explode(".",$domain); $qdomaina=mysql_fetch_array(mysql_query("select weblog from domains where dmm='$domain' AND status='1' AND dmm!='8n8.ir' limit 0,1")); if($qdomaina['weblog']){$s=$qdomaina['weblog'];} $qdomainaaa=mysql_fetch_array(mysql_query("select dmm from domains where weblog='$weblog' AND status='1' AND dmm!='8n8.ir' limit 0,1")); $domainc=$qdomainaaa['dmm']; if(($domainb[1]=='8n8' OR $domainb[1]=='fabino' OR $domainb[1]=='fabner' OR $domainb[1]=='iranmid' OR $domainb[1]=='linefarsi') AND $domainc){header("Location: http://$domainc");exit;} if($s){ $id = $s; }else{ $id = $_GET['s']; } $weblog = $id; $qcba=mysql_query("select * from config where id='1' limit 0,1");$qcb=mysql_fetch_array($qcba); $qua=mysql_query("select * from blogs where usern='$id' limit 0,1"); @$qub=mysql_fetch_array($qua); $ckduinfo=mysql_fetch_array(mysql_query("select * from uinfo where user='$id' limit 0,1")); if (($s) OR (@$_GET['s'] AND @$_GET['t']=='29' AND @$_GET['u']=='11' AND @$_GET['v']=='66')){ if($s){ $id=$s; }else{ $id=$_GET['s']; } if (@$qub['id']){ if (@$qub['status']=='1'){ if(!$domain){if($qub['domain']){$domain=$qub['usern'].$qub['domain'];}else{$domain="$qub[usern].8n8.ir";}} $domainc=explode(".",$qub['domain']); if(!$qdomaina['weblog'] AND $qub['domain'] AND $domainb[1]!=$domainc[0]){header("Location: http://$domainb[0].$qub[domain]");exit;}elseif(!$qdomaina['weblog'] AND !$qub['domain'] AND $domainb[1]!='8n8'){header("Location: http://$domainb[0].8n8.ir");exit;}else{} $cfield = $qub['cfield'] ; $count_pcfield = substr_count($cfield, ','); $count_pcfield++; $beperma = explode("|",$qub['permalink']); $eperma = explode(",",$beperma[0]); $cperma = explode(",",$beperma[1]); $options = explode(",",$qub['options']); $rs=strtolower($_SERVER['REQUEST_URI']); $arrs = explode("/",$rs); if($id=='fard' or $id=='news' or $id=='computer' or $id=='bookmak' or $id=='saiedjon' or $id=='cdshop' or $id=='fardshop'){ $ptnum = 2; }elseif($id=='citymor' or $id=='shoptab' or $id=='marketiha'){ $ptnum = 3; }else{ $ptnum=''; } if($qub['permalink']==''){ if(substr($rs,0,6)=='/post/'){$p=(int)substr($rs,6);} $permalinkname = 'post'; if(substr($rs,0,5)=='/cat/'){ $catz=(int)substr($rs,5);$pat=1; $l = strlen($catz); if($arrs[3]=='scat' AND $arrs[5]=='page'){$pz=(int)$arrs[6];}elseif(substr(substr($rs,5),$l,6)=='/page/'){$pz=(int)substr(substr($rs,5),$l+6);}else{$pz=0;} } $cpermalinkname = 'cat'; }else{ $epermalen = strlen($eperma[1]); $epermalen = $epermalen+2; if(substr($rs,0,$epermalen)=="/$eperma[1]/"){$p=(int)substr($rs,$epermalen);} $permalinkname = $eperma[1]; ////////////////// cat $cpermalen = strlen($cperma[1]); $cpermalen = $cpermalen+2; if(substr($rs,0,$cpermalen)=="/$cperma[1]/"){ $catz=(int)substr($rs,$cpermalen);$pat=1; $l = strlen($catz); if($arrs[3]=='scat' AND $arrs[5]=='page'){$pz=(int)$arrs[6];}elseif(substr(substr($rs,$cpermalen),$l,6)=='/page/'){$pz=(int)substr(substr($rs,$cpermalen),$l+6);}else{$pz=0;} } $cpermalinkname = $cperma[1]; } if(substr($rs,0,6)=='/post/'){} elseif($_POST['send_link']){include('blogfiles/link_auto.php');exit;} elseif(substr($rs,0,$epermalen)=="/$eperma[1]/"){} elseif(substr($rs,0,5)=='/cat/'){} elseif(substr($rs,0,$epermalen)=="/$eperma[1]/"){} elseif(substr($rs,0,$cpermalen)=="/$cperma[1]/"){} //elseif(substr($rs,0,9)=='/payment/'){$p=(int)substr($rs,9);include('blogfiles/payment.php');exit;} elseif(substr($rs,0,5)=='/buy/'){$p=(int)substr($rs,5);include('blogfiles/buy.php');exit;} elseif(substr($rs,0,8)=='/verify/'){$p=(int)substr($rs,8);include('blogfiles/verify.php');exit;} elseif(substr($rs,0,11)=='/extrapage/'){ $bb= explode('?',$arrs[2]); if($bb[1]){$b=strip_tags(trim($bb[0]));}else{$b=strip_tags(trim(substr($rs,11)));} } elseif(substr($rs,0,6)=='/page/'){$pz=(int)substr($rs,6);} elseif(substr($rs,0,11)=='/buy-theme/'){$idtheme=(int)substr($rs,11);} elseif(substr($rs,0,4)=='/bid'){$bid=strip_tags(trim(substr($rs,5)));} elseif(substr($rs,0,8)=='/Message' or substr($rs,0,8)=='/message'){$message=1;} elseif(substr($rs,0,6)=='/m' or substr($rs,0,6)=='/Mob' or substr($rs,0,8)=='/m?page='){include('blogfiles/mobile.php');exit;} elseif(substr($rs,0,4)=='/rss' AND substr($rs,-4)=='.xml'){$rss=$id;include('blogfiles/rss.php');exit;} elseif(substr($rs,0,8)=='/sitemap' AND substr($rs,-4)=='.xml'){$xml=$id;include('blogfiles/sitemap.php');exit;} elseif(substr($rs,0,8)=='/profile'){$profile=1;} elseif(substr($rs,0,8)=='/policy'){$policy=1;} elseif(substr($rs,0,6)=='/panel'){$panel=1;} elseif(substr($rs,0,8)=='/addcart'){$addcart=1;$addbid=strip_tags(trim(substr($rs,9)));} elseif(substr($rs,0,8)=='/payment'){$filedl=1;$addbid=strip_tags(trim(substr($rs,9)));include('inc/filedlsubmit.php');} elseif(substr($rs,0,7)=='/record'){include"blogfiles/record.php";Exit;} elseif(substr($rs,0,6)=='/links'){$plinks=1;$pz=(int)substr($rs,12);} elseif(substr($rs,0,11)=='/removecart'){$removebid=strip_tags(trim(substr($rs,12))); @mysql_query("delete from cart where weblog='$id' AND fdate='$_SESSION[Ava_cArt]' AND bid='$removebid'"); header ("location: http://$domain/addcart");EXIT; } elseif(substr($rs,0,8)=='/search/'){ $nsearchz=substr($rs,8); $searchz=urldecode(substr($rs,8)); $l = explode("/",$searchz); if($l[2]){$pz=(int)$l[2];}else{$pz=0;} } elseif(substr($rs,0,6)=='/posts'){$pageposts=1;} elseif(substr($rs,0,7)=='/backup' AND substr($rs,-4)=='.xml'){$rss=$id;include('backup.php');exit;} elseif(substr($rs,0,5)=='/link'){$lnk='http://'.substr($rs,5);$lnki=$_GET['s'];mysql_query("update links set lclix=lclix+1 where weblog='$lnki' AND lweb='$lnk'");header ("location: ".$lnk);} elseif(substr($rs,0,10)=='/gotolink/'){$lnk='http://'.substr($rs,10);$lnki=$id;mysql_query("update dlinks set lclix=lclix+1 where weblog='$id' AND lweb='$lnk'");@$fl='caches/dlinks/'.$id.'.lnk';@$fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh);header ("location: ".$lnk);} elseif(substr($rs,0,5)=='/tag/'){ $nntag=substr($rs,5); $tag=urldecode(substr($rs,5)); $l = explode("/",$tag); if(@$l[2]){$pz=(int)$l[2];}else{$pz=0;} } elseif(!substr($rs,1,1)){} elseif($_GET['pollres']){$bpm=strip_tags($_GET['pollres']);include('blogfiles/bpl.php');exit;} else{include("blogfiles/page404.php");exit;} if($_POST['send_comment']){include('blogfiles/send_comment.php');exit;} if($_POST['blogpolls']){$blogpolls=strip_tags($_POST['blogpolls']);$bpl=strip_tags($_POST['blogpoll']);include('blogfiles/bpl.php');exit;} if($_POST['api']){include('blogfiles/apicart.php');exit;} if($qub['ipnum']!=''){$ipnum=$qub['ipnum'];}else{$ipnum=20;} $opnum=$qub['opnum']; if(@$dlnum){$dlnum=$qub['dlnum'];}else{$dlnum=10;} $numhit=$qub['numhit']; $lpnum=$qub['lpnum']; $numrelated=$qub['numrelated']; $tmob=''; $themeid=$qub['themeid'];if($themeid=='4004'){$themeid='';} $meyagent = strtolower($_SERVER['HTTP_USER_AGENT']); if(preg_match('/Windows/i',$meyagent) OR preg_match('/Linux/i',$meyagent)){$wwindo='1';} if($idtheme){ $qnua=mysql_fetch_array(mysql_query("select * from themes WHERE id='$idtheme' limit 0,1")); if($qnua['status']=='4'){$template="$qnua[tcode]$qnua[offer]$qnua[bid]$qnua[posts]$qnua[popular]$qnua[footer]"; }else{$template=$qnua['tcode'];} } elseif($themeid){ $qnua=mysql_fetch_array(mysql_query("select * from themes WHERE id='$themeid' limit 0,1")); if (($p OR $bid OR $b OR $profile OR $policy OR $message OR $pageposts OR $plinks OR $panel OR $addcart OR $filedl) AND $qub['them2s']=='on' AND $qnua['t2code']){$template=$qnua['t2code'];} else{ if($qnua['status']=='4'){ if($ckduinfo['theme2']){ $pvtheme=explode("|",$ckduinfo[theme2]); $pvtheme1=$pvtheme[0];$pvtheme2=$pvtheme[1];$pvtheme3=$pvtheme[2];$pvtheme4=$pvtheme[3]; $template="$qnua[tcode]$qnua[$pvtheme1]$qnua[$pvtheme2]$qnua[$pvtheme3]$qnua[$pvtheme4]$qnua[footer]"; } else{ $template="$qnua[tcode]$qnua[offer]$qnua[bid]$qnua[posts]$qnua[popular]$qnua[footer]"; } }else{ $template=$qnua['tcode']; } } } else{ if (($p OR $bid OR $b OR $profile OR $policy OR $message OR $pageposts OR $plinks OR $panel OR $addcart OR $filedl) AND $qub['them2s']=='on'){ $fi='.t2'; }else{ $fi='.t'; } $fl="caches/theme/".$id.$fi; if(!@filesize($fl)){ $qnua=mysql_fetch_array(mysql_query("select tcode,t2code from themes WHERE id='79' limit 0,1")); if ($p OR $bid OR $b OR $profile OR $policy OR $message OR $pageposts OR $plinks OR $panel OR $addcart OR $filedl){$template = $qnua['t2code'];} else{$template = $qnua['tcode'];} }else{ $template = file_get_contents($fl); } } if(@$p){ mysql_query("update posts$ptnum set phits=phits+1 WHERE weblog='$id' AND bid='$p'"); $BlogAndPostTitle = mysql_fetch_array(mysql_query("SELECT bid,ptitle,pcat, phits, status FROM posts$ptnum WHERE weblog='$id' AND bid='$p' AND status='1' limit 0,1")); if(!$BlogAndPostTitle['bid']){include("blogfiles/page404.php");} $bhits = $BlogAndPostTitle['phits']; $bstus = $BlogAndPostTitle['status']; $incat = $BlogAndPostTitle['pcat']; $bonecat1=explode(",",$incat); $bonecat=$bonecat1['0']; if($bonecat == "Array"){$bonecat=$incat;} $BlogAndPostTitle = $BlogAndPostTitle['ptitle']; $PostMore = mysql_fetch_array(mysql_query("SELECT * FROM postmore WHERE weblog='$id' AND bid='$p' limit 0,1")); }else if(@$b){ mysql_query("UPDATE pages SET phits=phits+1 WHERE weblog='$id' AND pna='$b'"); $BlogAndPostTitle = mysql_fetch_array(mysql_query("SELECT ptitle, phits, status FROM pages WHERE weblog='$id' AND pna='$b' limit 0,1")); $bhits = $BlogAndPostTitle['phits']; $bstus = $BlogAndPostTitle['status']; $BlogAndPostTitle = $BlogAndPostTitle['ptitle']; if($bstus=='1'){ $bi = mysql_fetch_array(mysql_query("SELECT ptext FROM pages WHERE weblog='$id' AND pna='$b' limit 0,1")); $template = $bi['ptext']; } }else if(@$catz){ $BlogAndPostTitle1 = mysql_fetch_array(mysql_query("SELECT id,ctitle,perma FROM cats WHERE weblog='$id' AND bid='$catz' limit 0,1")); $BlogAndPostTitle2 = mysql_fetch_array(mysql_query("SELECT id,ctitle,perma FROM cats WHERE weblog='$id' AND bid='$arrs[4]' AND status='$BlogAndPostTitle1[id]' limit 0,1")); if(!$BlogAndPostTitle1['id']){include("blogfiles/page404.php");} if($arrs[3]=='scat' AND !$BlogAndPostTitle2['id']){include("blogfiles/page404.php");} if($arrs[3]=='scat'){ $BlogAndPostTitle = "$BlogAndPostTitle2[ctitle] | $BlogAndPostTitle1[ctitle]"; }else{ $BlogAndPostTitle = $BlogAndPostTitle1['ctitle']; } if($pz){$BlogAndPostTitle = "$BlogAndPostTitle | صفحه $pz";} }else if(@$bid){ $BlogAndPostTitle = mysql_fetch_array(mysql_query("SELECT title FROM postsbid WHERE weblog='$id' AND id='$bid' limit 0,1")); $BlogAndPostTitle = $BlogAndPostTitle['title']; }else if(@$filedl){ $BlogAndPostTitle = mysql_fetch_array(mysql_query("SELECT ptitle FROM posts$ptnum WHERE weblog='$id' AND bid='$addbid' AND status='1' limit 0,1")); $BlogAndPostTitle = "$BlogAndPostTitle[ptitle] | $qub[btitle]"; }else if(@$profile){ $BlogAndPostTitle = 'درباره فروشگاه'; }else if(@$policy){ $BlogAndPostTitle = 'قوانین و مقررات فروشگاه'; }else if(@$message){ $BlogAndPostTitle = 'تماس با ما'; }else if(@$panel){ $BlogAndPostTitle = 'ورود به پنل مدیریت'; }else if(@$plinks){ if($pz){$BlogAndPostTitle = "تبادل لینک اتوماتیک $qub[btitle] - صفحه $pz";} else{$BlogAndPostTitle = "تبادل لینک اتوماتیک $qub[btitle]";} }else if(@$pageposts){ $BlogAndPostTitle = "کاتالوگ $qub[btitle]"; }else if(@$addcart){ $BlogAndPostTitle = 'سبد خرید'; }else if(@$tag){ $ntag = $tag; $ntag = str_replace("/page/$pz","",$tag); $BlogAndPostTitle = $ntag; }else if($searchz){ $nsearchz = $searchz; $nsearchz = str_replace("/page/$pz","",$searchz); $ckdsearchz = mysql_fetch_array(mysql_query("SELECT id FROM posts$ptnum WHERE weblog='$id' AND (ptitle LIKE '%$nsearchz%' OR ptags LIKE '%$nsearchz%') AND status='1' limit 0,1")); if(!$ckdsearchz['id']){include("blogfiles/page404.php");} $BlogAndPostTitle = $nsearchz; }else if(substr($rs,0,6)=='/page/'){ $BlogAndPostTitle = $qub[btitle].' - صفحه '.$pz; }else{ $BlogAndPostTitle = $qub[btitle]; } $search_array = Array("<", ">", '"', "<-BlogAndPostTitle->", "<-BlogTitle->", "<-BlogDescription->", "<-BlogId->", "<-BlogXmlLink->", "<-BlogUrl->", "<-BlogCustomHtml->", "<-BlogEmail->"); $jsh='.jsh'; $fjsh="caches/jsh/".$id.$jsh; $cjsh = file_get_contents($fjsh); $replace_array = Array("<", ">", '"', enbug($BlogAndPostTitle), enbug($qub[btitle]), enbug($qub[bdesc]), enbug($qub[usern]), "http://$domain/rss.xml", "http://$domain", enbug($cjsh), "$qub[email]"); $template = str_replace($search_array, $replace_array, $template); $template = str_replace("<8N8>","<8N8>",$template); $insert = ""; if($b OR $profile OR $policy OR $message OR $pageposts OR $plinks OR $panel OR $addcart OR $filedl){ $record=between("", "", $template); $buy=between("", "", $template); $dlfile=between("", "", $template); $timer=between("", "", $template); $template = str_replace("$record", "", $template); $template = str_replace("$buy", "", $template); $template = str_replace("$dlfile", "", $template); $template = str_replace("$timer", "", $template); } if(!$catz){ $navigation=between("", "", $template); $template = str_replace("$navigation", "", $template); } //Creat By Avazak.ir $template = str_replace("", "http://$domain/addcart", $template); $itemslider=between("", "", $template); $javatimer=between("", "", $template); $bidslider=between("", "", $template); if($ckduinfo['postsbidtime'] <= $fdate){ $template = str_replace("$javatimer", "", $template); $template = str_replace("$bidslider", "", $template); }else{ $stime=date("Y/m/d H:i:s",$ckduinfo['postsbidtime']); $template = str_replace("<-lasttimebid->", "$stime", $template); $bidposts = mysql_query("select * from postsbid where weblog='$id'"); $bidpostz = mysql_query("select id from postsbid where weblog='$id'"); $insert = ""; while($bids = mysql_fetch_array($bidposts)) { $insert .= $itemslider; $insert = str_replace("<-linkslide->", "http://$domain/bid/$bids[id]", $insert); $insert = str_replace("<-imgslide->", enbug($bids[photo]), $insert); $insert = str_replace("<-nvalue->", enbug($bids[nvalue]), $insert); } $template = str_replace("".$itemslider."", $insert, $template); $insert = ""; } $posts = between("<8N8>", "", $template); $expost = between("", "", $template); $tagsblock = between("", "", $template); $postcatsblock = between("", "", $template); if(@$p){ $allposts = mysql_query("SELECT * FROM posts$ptnum WHERE weblog='$id' AND bid='$p' AND status='1' limit 0,1"); }else if(@$tag){ $adjacents = 3; $limit = $ipnum; if($pz) {$start = ($pz - 1) * $limit; }else{$start = 0;} $allposts = mysql_query("SELECT * FROM posts$ptnum WHERE weblog='$id' AND FIND_IN_SET('$ntag', ptags) AND status='1' order by id desc limit $start,$limit"); $allpostz = mysql_query("SELECT id FROM posts$ptnum WHERE weblog='$id' AND FIND_IN_SET('$ntag', ptags) AND status='1'"); }else if(@$b){ $allposts = mysql_query("SELECT * FROM pages WHERE weblog='$id' AND pna='$b'"); $allpostz = mysql_query("SELECT id FROM pages WHERE weblog='$id' AND pna='$b'"); $allpostsanum=$b; }else if(@$profile){ $allposts = mysql_query("SELECT about FROM otherpages WHERE weblog='$id' limit 0,1"); }else if(@$policy){ $allposts = mysql_query("SELECT policy FROM otherpages WHERE weblog='$id' limit 0,1"); }else if(@$message){ $allposts = mysql_query("SELECT message FROM otherpages WHERE weblog='$id' limit 0,1"); }else if(@$addcart){ $allposts = mysql_fetch_array(mysql_query("SELECT * FROM cartsetting WHERE weblog='$id' limit 0,1")); }else if(@$filedl){ $allposts = mysql_fetch_array(mysql_query("SELECT ptitle,phits,pvalue,file FROM posts$ptnum WHERE weblog='$id' AND bid='$addbid' AND status='1' limit 0,1")); $allposts2 = mysql_fetch_array(mysql_query("SELECT sabadfile FROM otherpages WHERE weblog='$id' limit 0,1")); }else if(@$bid){ $allposts = mysql_query("SELECT * FROM postsbid WHERE weblog='$id' AND id='$bid'"); $allpostz = mysql_query("SELECT id FROM postsbid WHERE weblog='$id' AND id='$bid'"); }else if(@$catz){ mysql_query("UPDATE posts$ptnum SET pcat=REPLACE(pcat, '|', ',')") or die(mysql_error()); $adjacents = 3; $limit = $ipnum; if($pz) {$start = ($pz - 1) * $limit; }else{$start = 0;} if($arrs[3]=='scat'){ $qcatza=mysql_fetch_array(mysql_query("select id,status from cats where weblog='$id' AND bid='$arrs[4]'")); }else{ $qcatza=mysql_fetch_array(mysql_query("select id,status from cats where weblog='$id' AND bid='$catz'")); } $qcatzaid=$qcatza['id']; if($qcatza['status']=='1'){ $qcatzb=mysql_query("select * from cats where weblog='$id' AND status='$qcatzaid'"); $qcatzd=''; while($qcatzc=mysql_fetch_array($qcatzb)){ $qcatzcid = $qcatzc['id']; $qcatzd.= ' or FIND_IN_SET('.$qcatzcid.', pcat)'; } $allposts = mysql_query("SELECT * FROM posts$ptnum WHERE weblog='$id' AND status='1' AND (FIND_IN_SET('$qcatzaid', pcat) $qcatzd) order by id desc limit $start,$limit") or die(mysql_error()); $allpostz = mysql_query("SELECT id FROM posts$ptnum WHERE weblog='$id' AND status='1' AND (FIND_IN_SET('$qcatzaid', pcat) $qcatzd)"); }else{ $allposts = mysql_query("SELECT * FROM posts$ptnum WHERE weblog='$id' AND status='1' AND FIND_IN_SET('$qcatzaid', pcat) order by id desc limit $start,$limit"); $allpostz = mysql_query("SELECT id FROM posts$ptnum WHERE weblog='$id' AND status='1' AND FIND_IN_SET('$qcatzaid', pcat)"); } }else if(@$searchz){ $adjacents = 3; $limit = $ipnum; if($pz) {$start = ($pz - 1) * $limit; }else{$start = 0;} $allposts = mysql_query("SELECT * FROM posts$ptnum WHERE weblog='$id' AND ptitle LIKE '%$nsearchz%' AND status='1' order by id desc limit $start,$limit"); $allpostz = mysql_query("SELECT id FROM posts$ptnum WHERE weblog='$id' AND ptitle LIKE '%$nsearchz%' AND status='1'"); }else if($plinks){ ob_start(); include("blogfiles/links.php"); $str_message = ob_get_clean(); if($pz AND $pz!='1'){$pz=$pz;}else{$pz=0;} $limit = 20; if($pz) {$start = ($pz - 1) * $limit; }else{$start = 0;} $allposts = mysql_query("SELECT * FROM alinks WHERE weblog='$id' AND status!='1' order by id desc limit $start,$limit"); $allpostz = mysql_query("SELECT id FROM alinks WHERE weblog='$id' AND status!='1'"); }else if($pageposts){ $allposts = mysql_query("SELECT bid,ptitle FROM posts$ptnum WHERE weblog='$id' AND status='1' order by id desc"); $allpostz = mysql_query("SELECT id FROM posts$ptnum WHERE weblog='$id' AND status='1'"); }else{ $adjacents = 3; $limit = $ipnum; if($pz) {$start = ($pz - 1) * $limit; }else{$start = 0;} $allposts = mysql_query("SELECT * FROM posts$ptnum WHERE weblog='$id' And status = '1' order by bidd desc , id desc limit $start,$limit"); $allpostz = mysql_query("SELECT id FROM posts$ptnum WHERE weblog='$id' AND status = '1'"); } if($bid){ include("inc/bid.php"); }elseif($profile){ include("inc/profile.php"); }elseif($policy){ include("inc/policy.php"); }elseif($message){ include("inc/message.php"); }elseif($panel){ include("inc/shoplogin.php"); }elseif($plinks){ include("inc/links.php"); }elseif($pageposts){ include("inc/posts.php"); }elseif($addcart){ include("inc/addcart.php"); }elseif($filedl){ include("inc/filedl.php"); }elseif($b){ include("inc/extrapage.php"); }else{ ////////////////////// MEY super Cache $insert2 = ''; $cmmn="";$iiv=1; $buy=between("", "", $posts); $dlfile=between("", "", $posts); $record=between("", "", $posts); $timer=between("", "", $posts); $mediumtexts=between("", "", $posts); $details=between("", "", $posts); $pics=between("", "", $posts); while($post = mysql_fetch_array($allposts)) { $pauthor=$qub['flname']; $insert .= $posts; //Creat By Avazak.ir $insert = str_replace("$timer", "", $insert); if($post['file']){ $insert = str_replace("$record", "", $insert); $insert = str_replace("$buy", "", $insert); $insert = str_replace("<-boyfile->", "http://$domain/payment/$post[bid]", $insert); }elseif($post['pblink']){ $insert = str_replace("$dlfile", '', $insert); $insert = str_replace("$record", "", $insert); if($post[pblink]=='1'){$insert = str_replace("<-boylink->", "http://$domain/buy/$post[bid]", $insert);} else{$insert = str_replace("<-boylink->", enbug($post[pblink]), $insert);} }else{ $insert = str_replace("$dlfile", '', $insert); $insert = str_replace("$buy", "", $insert); } if($ckduinfo['cart']>$fdate){ if($post['number']){ $insert = str_replace('', 'خرید آنلاین', $insert); $insert = str_replace('', 'ثبت سفارش', $insert); }else{ $insert = str_replace('', 'ناموجود', $insert); $insert = str_replace('', 'ناموجود', $insert); $insert = str_replace('<-subcart->/<-PostId->', "http://$domain/#", $insert); $insert = str_replace('<-boylink->', "http://$domain/#", $insert); } } if($p AND $PostMore['id']){ $insert = str_replace('<-posttinytexts->', "$PostMore[tinytexts]", $insert); $insert = str_replace('<-filmlink->', "$PostMore[filmname]", $insert); $insert = str_replace('<-filmtext->', "$PostMore[filmtext]", $insert); $onepic=explode('|', $PostMore[pics]); $ipic=0;$insertpics=''; $nvali=explode("*",$PostMore[mediumtexts]);$nvaliaa=explode("|",$nvali[0]);$nvaliab=explode("|",$nvali[1]); $nvalii=explode("*",$PostMore[details]);$nvaliiaa=explode("|",$nvalii[0]);$nvaliiab=explode("|",$nvalii[1]); $idetails=0;$insertdetails='';$idetailsa=0;$insertdetailsa=''; while($eachpic=$onepic[$ipic]) { $insertpics .= $pics; $insertpics = str_replace('<-onepic->', "$eachpic", $insertpics); $ipic++; } while($eachdetailsa=$nvaliaa[$idetailsa]){ $insertdetailsa .= $mediumtexts; $insertdetailsa = str_replace('<-mediumname->', "$eachdetailsa", $insertdetailsa); $insertdetailsa = str_replace('<-mediumvalue->', "$nvaliab[$idetailsa]", $insertdetailsa); $idetailsa++; } while($eachdetails=$nvaliiaa[$idetails]){ $insertdetails .= $details; $insertdetails = str_replace('<-detailsname->', "$eachdetails", $insertdetails); $insertdetails = str_replace('<-detailsvalue->', "$nvaliiab[$idetails]", $insertdetails); $idetails++; } $insert = str_replace("$pics", "$insertpics", $insert); $insert = str_replace("$mediumtexts", "$insertdetailsa", $insert); $insert = str_replace("$details", "$insertdetails", $insert); } @$postvote = round($post['voteb']/$post['votea']); if($postvote>=1){ $insert = str_replace("<-PostVoteForm->", "
", $insert); }else{ $insert = str_replace("<-PostVoteForm->", "
", $insert); } if($postvote>=2){ $insert = str_replace("", "
", $insert); }else{ $insert = str_replace("", "
", $insert); } if($postvote>=3){ $insert = str_replace("", "
", $insert); }else{ $insert = str_replace("", "
", $insert); } if($postvote>=4){ $insert = str_replace("", "
", $insert); }else{ $insert = str_replace("", "
", $insert); } if($postvote==5){ $insert = str_replace("", "
", $insert); }else{ $insert = str_replace("", "
", $insert); } $insert = str_replace("<-PostVoteForm->", "", $insert); $insert = str_replace('', 'خرید آنلاین', $insert); $insert = str_replace('', 'ثبت سفارش', $insert); $insert = str_replace("<-PostImg->", enbug($post[pic]), $insert); $insert = str_replace("<-PostValue->", enbug($post[pvalue]), $insert); $insert = str_replace("<-PostWeight->", enbug($post[pweight]), $insert); $cartsetting = mysql_fetch_array(mysql_query("select payonline from cartsetting where weblog='$id' limit 0,1")); $insert = str_replace('<-subcart->', "http://$domain/addcart", $insert); if (@$p OR @!$post['pextext'] OR $postz OR $b){$insert = str_replace("".$expost."", "", $insert);} if(@$b OR @!$post['ptags']){$insert = str_replace("".$tagsblock."", "", $insert);} if(@$b OR @!$post['pcat']){$insert = str_replace("".$postcatsblock."", "", $insert);} $insert = str_replace("<-PostId->", enbug($post[bid]), $insert); if($post['perma']==''){ $urlencodeptitle = urlencode(enbug($post['ptitle'])); }else{ $urlencodeptitle = urlencode(enbug($post['perma'])); } if($eperma[0]!='2'){ $insert = str_replace("<-PostLink->", "http://$domain/$permalinkname/".enbug($post[bid])."", $insert); }else{ $insert = str_replace("<-PostLink->", "http://$domain/$permalinkname/".enbug($post[bid])."/$urlencodeptitle", $insert); } $insert = str_replace("<-PostHit->", "$post[phits]", $insert); $insert = str_replace("<-PostTitle->", enbug($post[ptitle]), $insert); $picnot = between('', $template); if ($post[pic]==''){ $insert = str_replace("<-PostPic->", $picnot, $insert); } else{ $insert = str_replace("<-PostPic->", enbug($post[pic]), $insert); } $insert = str_replace("<-PostComents->", $Coments , $insert); $fi='.bp'; $fl="blogposts/".$id."/".$post['bid'].$fi; $pvtex = stripslashes(file_get_contents($fl)); $pvtext = explode('<8n8postmore>', $pvtex ); if(!$postz){ if($p and $pvtext[1]){ $insert = str_replace("<-PostContent->", enbug($pvtext[1]), $insert); } else{ $insert = str_replace("<-PostContent->", enbug($pvtext[0]), $insert); $insert = str_replace("<-PostMoreContent->", enbug($pvtext[1]), $insert); } }else $insert = str_replace("<-PostContent->", "", $insert); ////////////////////////// SPECIAL DEFINE $ptags = $post['ptags']; //////////////// TAGS $insert = preg_replace('//is', '', $insert); $tags = between("", "", $insert); $tinsert = ''; $alltags=explode(",",$ptags); $vll=0; foreach($alltags as $tag){ $tinsert .= $tags; $tinsert = str_replace("<-TagLink->", "/tag/".urlencode(enbug($tag))."", $tinsert); $tinsert = str_replace("<-TagName->", enbug($tag), $tinsert); } $insert = str_replace("".$tags."", $tinsert, $insert); if (@!$tinsert){$insert = str_replace("".$tagsblock."", "", $insert);} //////////////////// end tags //$insert = str_replace("<-PostCustomField->", "$post[pcfield]", $insert); $pcfield = $post['pcfield']; $Epcfield = explode(",",$post['pcfield']); for($cf_id=1;$cf_id<$count_pcfield;$cf_id++){ //////////////// CUSTOM FIELD //$cf_id = 1; $postcfiledblock = between("", "", $template); $dcf_id = $cf_id-1; $mm = ''; if(@$Epcfield[$dcf_id]!=''){ $mm .= $postcfiledblock; $mm = str_replace("<-PostCustomField->", "$Epcfield[$dcf_id]", $postcfiledblock); $insert = str_replace("".$postcfiledblock."", $mm, $insert); }else{ $insert = str_replace("".$postcfiledblock."", "", $insert); } //////////////////// end CUSTOM FIELD } $pcat = $post['pcat']; //////////////// CATEGORIES $insert = preg_replace('//is', '', $insert); $cats = between("", "", $insert); $postcatal=explode(",",$pcat); $vl=0;$catinsert=''; while(@$postcatal[$vl]){ $postcat = $postcatal[$vl]; $postcata=mysql_fetch_array(mysql_query("select * from cats where id='$postcat' AND weblog='$id'")); //$catinsert.="$postcata[ctitle],"; $catinsert .= $cats; $catinsert = str_replace("<-CategoryName->", enbug($postcata[ctitle]), $catinsert); if($postcata['perma']==''){ $urlencodectitle = urlencode(enbug($postcata['ctitle'])); }else{ $urlencodectitle = urlencode(enbug($postcata['perma'])); } if($cperma[0]=='2'){ $catinsert = str_replace("<-CategoryLink->", "/$cpermalinkname/".enbug($postcata[bid])."/$urlencodectitle", $catinsert); }else{ $catinsert = str_replace("<-CategoryLink->", "/$cpermalinkname/".enbug($postcata[bid]), $catinsert); } $catinsert = str_replace("<-CategoryId->", enbug($postcata[bid]), $catinsert); $vl++; } $insert = str_replace("".$cats."", $catinsert, $insert); if (@!$catinsert){$insert = str_replace("".$postcatsblock."", "", $insert);} //////////////////// end categories $allpostsanum--; } } if ($insert == $posts){ $template = str_replace("<8N8>".$posts."", "", $template); }else{ $insert = enbug($insert); $template = str_replace("<8N8>".$posts."", $insert, $template); } //} // INPUT SearchBoxBlock $insert = ""; $sbox = between("", "", $template); $shotsb = between("", $sbox); if(!$shotsb){ $shotsb = " جستجو "; } $insert = $sbox; $inserto = ''; $inserto2 = ''; $insert = str_replace("<-SearchBoxInput->", "$inserto", $insert); $insert = str_replace("<-SearchBoxSubmit->", "$inserto2", $insert); $template = str_replace("".$sbox."", $insert, $template); $shotblock = between("", "", $template); if (@!$insert){$template = str_replace("". $shotblock."", "", $template);} // INPUT ABOUT $insert1 = ""; $insert3 = ""; $aboutblock = between("", "", $template); $bphoto = between("", "", $template); $cdir="caches/abt/"; $fi='.abt'; $fl=$cdir.$id.$fi; if(!is_file($fl)) {fclose(fopen($fl,"x"));} if(!filesize($fl)){ $fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh); $blogabout = mysql_query("SELECT usern,mypic,aboutme FROM blogs WHERE usern='$id' limit 0,1"); $about = mysql_fetch_array($blogabout); $insert3 .= $about['mypic'].'<1>'.$about['aboutme'].'<1>'; $fh = fopen($fl, 'w'); fwrite($fh, $insert3); fclose($fh); }else{ $fh = fopen($fl, 'r+'); if(filesize($fl)){$cts = fread($fh, filesize($fl));}else{$cts=0;} fclose($fh); $insert5=explode("<1>",$cts); $about = array(); $about['mypic'] = $insert5[0]; $about['aboutme'] = enbug($insert5[1]); } if (@$about['mypic']){ $insert1 .= $bphoto; $insert1 = str_replace("<-BlogPhotoLink->", "http://".$qcb['surl']."/".$about[mypic], $insert1); }else{ $insert1 = str_replace("<-BlogPhotoLink->", "", $insert1); } $template = str_replace("".$bphoto."", $insert1, $template); $aboutblock = str_replace("".$bphoto."", $insert1, $aboutblock); $insert2 = ""; if (@$about['aboutme']){ $insert2 .= $aboutblock; $insert2 = str_replace("<-BlogAbout->", enbug($about[aboutme]), $insert2); $template = str_replace("". $aboutblock."", enbug($insert2), $template); }else{ $insert2 .= $aboutblock; $insert2 = str_replace("<-BlogAbout->", "", $insert2); $template = str_replace("". $aboutblock."", enbug($insert2), $template); } $aboutblock = between("", "", $template); if (@!$insert1 AND @!$insert2){$template = str_replace("". $aboutblock."", "", $template);} if (@!$insert1){$template = str_replace("". $bphoto."", "", $template);} // INPUT POLLz $insert = ""; $cats = between("", "", $template); $submt = between("", $cats); $resl = between("", $cats); if(@!$submt){$submt= ' ثبت ';} if(@!$resl){$submt= ' نتایج ';} $allcats = mysql_query("SELECT * FROM polls WHERE weblog='$id' limit 0,1"); @$cat = mysql_fetch_array($allcats); if($cat['ptitle']){ $pitemsa=explode("|",$cat['pitems']); $pitems=""; $oi=0; $loop = between("", "", $cats); $insertt = ''; if($cat['psj']){ $bpitems=""; }else{$bpitems="";} while($pitemsa[$oi]){ $insertt .= $loop; if($cat['psj']){ $pitems=""; }else{ $pitems=""; } $insertt = str_replace("<-PollAnswer->", enbug($pitems), $insertt); $oi++; } $insert .= $cats; $insert = str_replace("<-PollQuestion->", enbug($cat[ptitle]), $insert); $insert = str_replace("<-PollSubmit->", "", $insert); $insert = str_replace("<-PollResult->", "", $insert); $template = str_replace("".$cats."", "
$insert
", $template); $template = str_replace("".$loop."", $bpitems.$insertt, $template); } $catsblock = between("", "", $template); if (@!$insert){$template = str_replace("". $catsblock."", "", $template);}else{ $template = preg_replace('//is', '', $template); $template = preg_replace('//is', '', $template); } // INPUT CATEGORIES $cats = between("", "", $template); $cdir="caches/cats/"; $fi='.cts'; $fl=$cdir.$id.$fi; if(!is_file($fl)) {fclose(fopen($fl,"x"));} if(!filesize($fl)){ $fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh); $allcats = mysql_query("SELECT * FROM cats WHERE weblog='$id' AND status='1' order by ord"); $cccid=0; $insert = ""; $insert2 = ""; while(@$cat = mysql_fetch_array($allcats)) { $insert .= $cats; $insert = str_replace("<-CategoryName->", enbug($cat[ctitle]), $insert); if($cat['perma']==''){ $urlencodectitle = urlencode($cat['ctitle']); }else{ $urlencodectitle = urlencode($cat['perma']); } $urlencodectitle=enbug($urlencodectitle); if($cperma[0]=='2'){ $insert = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/$urlencodectitle", $insert); }else{ $insert = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]", $insert); } $insert = str_replace("<-CategoryPosts->", "", $insert); $insert = str_replace("<-CategoryClass->", "cat-item cat-item-$cat[bid]", $insert); if($cperma[0]=='2'){ $insert2 .= $cat['ctitle'] . "<1>http://".$domain."/$cpermalinkname/".$cat['bid']."/$urlencodectitle<1> <1>cat-item cat-item-$cat[bid]<1><3>"; }else{ $insert2 .= $cat['ctitle'] . "<1>http://" . $domain . "/$cpermalinkname/" . $cat['bid'] . "<1> <1>cat-item cat-item-$cat[bid]<1><3>"; } $thiscatidz=$cat['id']; $allcatz = mysql_query("SELECT * FROM cats WHERE weblog='$id' AND status='$thiscatidz' order by ord"); while(@$catzy = mysql_fetch_array($allcatz)) { $insert .= $cats; $insert = str_replace("<-CategoryName->", enbug($catzy[ctitle]), $insert); if($catzy['perma']==''){ $urlencodecatzyctitle = urlencode($catzy['ctitle']); }else{ $urlencodecatzyctitle = urlencode($catzy['perma']); } $urlencodecatzyctitle=enbug($urlencodecatzyctitle); if($cperma[0]=='2'){ $insert = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/scat/$catzy[bid]/$urlencodecatzyctitle", $insert); }else{ $insert = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/scat/$catzy[bid]", $insert); } $pcatvb=$catzy['id'];$pcatnum=mysql_fetch_array(mysql_query("select count(id) from posts$ptnum where pcat LIKE '%$pcatvb%' And weblog = '$id' AND status='1'")); $insert = str_replace("<-CategoryPosts->", "($pcatnum[0])", $insert); $insert = str_replace("<-CategoryClass->", "cat-item cat-item-$catzy[bid] children", $insert); if($cperma[0]=='2'){ $insert2 .= $catzy['ctitle'] . "<1>http://" . $domain . "/$cpermalinkname/" .$cat[bid]."/scat/". $catzy['bid'] . "/$urlencodecatzyctitle<1>(" . $pcatnum[0] . ")<1>cat-item cat-item-$catzy[bid] children<1> <3>"; }else{ $insert2 .= $catzy['ctitle'] . "<1>http://" . $domain . "/$cpermalinkname/" .$cat[bid]."/scat/". $catzy['bid'] . "<1>(" . $pcatnum[0] . ")<1>cat-item cat-item-$catzy[bid] children<1> <3>"; } } } $insert2 = $insert2.'<4>'; $fh = fopen($fl, 'w'); fwrite($fh, $insert2); fclose($fh); }else{ $fh = fopen($fl, 'r+'); if(filesize($fl)){$cts = fread($fh, filesize($fl));}else{$cts=0;} fclose($fh); $grtz=explode("<4>",$cts); $insert3=$grtz[0]; $insert4=explode("<3>",$insert3); $insert5=0; $insert = ""; while($insert4[$insert5]){ $insert6=explode("<1>",$insert4[$insert5]); $insert .= $cats; $insert = str_replace("<-CategoryName->", enbug($insert6[0]), $insert); $insert = str_replace("<-CategoryLink->", enbug($insert6[1]), $insert); $insert = str_replace("<-CategoryPosts->", enbug($insert6[2]), $insert); $insert = str_replace("<-CategoryClass->", enbug($insert6[3]), $insert); $insert5++; } } $template = str_replace("".$cats."", $insert, $template); $catsblock = between("", "", $template); if (@!$insert){$template = str_replace("". $catsblock."", "", $template);} ////////////////////// end // INPUT EXTRAPAGES BLOCK $links = between("", "", $template); $cdir="caches/expg/"; $fi='.pg'; $fl=$cdir.$id.$fi; if(!is_file($fl)) {fclose(fopen($fl,"x"));} if(!filesize($fl)){ $fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh); $insert = "";$insert2 = ""; $allinks = mysql_query("SELECT bid,ptitle,pna FROM pages WHERE weblog='$id' order by id"); while(@$link = mysql_fetch_array($allinks)) { $insert .= $links; $insert = str_replace("<-ExtraPageId->", enbug($link[bid]), $insert); $insert = str_replace("<-ExtraPageUrl->", "http://$domain/extrapage/$link[pna]", $insert); $insert = str_replace("<-ExtraPageTitle->", enbug($link[ptitle]), $insert); $insert2 .= "$link[ptitle]<1>http://$domain/extrapage/$link[pna]<1>$link[bid]<1><3>"; } $insert2 = $insert2.'<4>'; $fh = fopen($fl, 'w'); fwrite($fh, $insert2); fclose($fh); }else{ $fh = fopen($fl, 'r+'); if(filesize($fl)){$cts = fread($fh, filesize($fl));}else{$cts=0;} fclose($fh); $grtz=explode("<4>",$cts); $insert3=$grtz[0]; $insert4=explode("<3>",$insert3); $insert5=0; $insert = ""; while($insert4[$insert5]){ $insert6=explode("<1>",$insert4[$insert5]); $insert .= $links; $insert = str_replace("<-ExtraPageTitle->", enbug($insert6[0]), $insert); $insert = str_replace("<-ExtraPageUrl->", enbug($insert6[1]), $insert); $insert = str_replace("<-ExtraPageId->", enbug($insert6[2]), $insert); $insert5++; } } $template = str_replace("".$links."", $insert, $template); $linksblock = between("", "", $template); if (@!$insert){$template = str_replace("". $linksblock."", "", $template);} ////////////////////// end // INPUT LINKS $links = between("", "", $template); $cdir="caches/links/"; $fi='.lnk'; $fl=$cdir.$id.$fi; if(!is_file($fl)) {fclose(fopen($fl,"x"));} if(!filesize($fl)){ $fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh); $insert = "";$insert2 = ""; $allinks = mysql_query("SELECT * FROM links WHERE weblog='$id' and status = '1' order by ord, id"); while(@$link = mysql_fetch_array($allinks)) { $insert .= $links; $insert = str_replace("<-LinkDescription->", enbug($link[ldesc]), $insert); $insert = str_replace("<-LinkUrl->", enbug($link[lweb]), $insert); $insert = str_replace("<-LinkTitle->", enbug($link[ltitle]), $insert); //$insert = str_replace("<-LinkClicks->", "$link[lclix]", $insert); $insert2 .= "$link[ltitle]<1>$link[lweb]<1>$link[ldesc]<1>$link[lclix]<1><3>"; } $insert2 = $insert2.'<4>'; $fh = fopen($fl, 'w'); fwrite($fh, $insert2); fclose($fh); }else{ $fh = fopen($fl, 'r+'); if(filesize($fl)){$cts = fread($fh, filesize($fl));}else{$cts=0;} fclose($fh); $grtz=explode("<4>",$cts); $insert3=$grtz[0]; $insert4=explode("<3>",$insert3); $insert5=0; $insert = ""; while($insert4[$insert5]){ $insert6=explode("<1>",$insert4[$insert5]); $insert .= $links; $insert = str_replace("<-LinkTitle->", enbug($insert6[0]), $insert); $insert = str_replace("<-LinkUrl->", enbug($insert6[1]), $insert); $insert = str_replace("<-LinkDescription->", enbug($insert6[2]), $insert); $insert = str_replace("<-LinkClicks->", enbug($insert6[3]), $insert); $insert5++; } } $template = str_replace("".$links."", $insert, $template); $linksblock = between("", "", $template); if (@!$insert){$template = str_replace("". $linksblock."", "", $template);} ////////////////////// end // INPUT DAILY LINKS $links = between("", "", $template); $mey_num = (int) between('', $template); if(@$mey_num){if(@$mey_num<1 or $mey_num>100){$mey_num=$dlnum;}}else{$mey_num=$dlnum;} $template = preg_replace('//is', '', $template); $linksblock = between("", "", $template); $cdir="caches/dlinks/"; $fi='.lnk'; $fl=$cdir.$id.$fi; if(!is_file($fl)) {fclose(fopen($fl,"x"));} if(!filesize($fl)){ $fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh); $allinks = mysql_query("SELECT id,weblog,ldesc,lweb,ltitle,lclix FROM dlinks WHERE weblog='$id' order by ord desc , id desc limit $mey_num"); $insert = ""; $insert2 = ""; while(@$link = mysql_fetch_array($allinks)) { $insert .= $links; $insert = str_replace("<-LinkDescription->", enbug($link[ldesc]), $insert); $insert = str_replace('<-LinkUrl->', 'http://'.$domain.'/gotolink/'.str_replace('http://','',$link[lweb].'" rel="nofollow'), $insert); $insert = str_replace("<-LinkTitle->", enbug($link[ltitle]), $insert); $insert = str_replace("<-LinkClicks->", enbug($link[lclix]), $insert); $insert2 .= "$link[ltitle]<1>http://$domain/gotolink/".str_replace('http://','',$link['lweb'])."<1>$link[ldesc]<1>$link[lclix]<1><3>"; } $insert2 = $insert2.'<4>'; $fh = fopen($fl, 'w'); fwrite($fh, $insert2); fclose($fh); }else{ $fh = fopen($fl, 'r+'); if(filesize($fl)){$cts = fread($fh, filesize($fl));}else{$cts=0;} fclose($fh); $grtz=explode("<4>",$cts); $insert3=$grtz[0]; $insert4=explode("<3>",$insert3); $insert5=0; $insert = ""; while($insert4[$insert5]){ $insert6=explode("<1>",$insert4[$insert5]); $insert .= $links; $insert = str_replace("<-LinkTitle->", enbug($insert6[0]), $insert); $insert = str_replace("<-LinkUrl->", enbug($insert6[1]), $insert); $insert = str_replace("<-LinkDescription->", enbug($insert6[2]), $insert); $insert = str_replace("<-LinkClicks->", enbug($insert6[3]), $insert); $insert5++; } } $template = str_replace("".$links."", $insert, $template); if (@!$insert){$template = str_replace("". $linksblock."", "", $template);} ////////////////////// end /// LAST POSTS $insert = ""; $insert2 = ""; $template = preg_replace('//is', '', $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $cats = between("", "", $template); $cdir="caches/preitms/"; $fi='.itm'; $fl=$cdir.$id.$fi; if(!is_file($fl)) {fclose(fopen($fl,"x"));} if(!filesize($fl)){ $fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh); $allcats = mysql_query("SELECT weblog,id,ptitle,bid,phits,perma,pic FROM posts$ptnum WHERE weblog='$id' AND status = '1' order by bidd desc , id desc limit $lpnum"); while(@$cat = mysql_fetch_array($allcats)) { if($cat['ptitle']){ if($cat['perma']==''){ $urlencodeptitle = urlencode(enbug($cat['ptitle'])); }else{ $urlencodeptitle = urlencode(enbug($cat['perma'])); } $insert .= $cats; $insert = str_replace("<-PostTitle->", enbug($cat[ptitle]), $insert); $insert = str_replace("<-Postimg->", enbug($cat[pic]), $insert); if($eperma[0]!='2'){ $insert = str_replace("<-PostLink->", "http://$domain/$permalinkname/$cat[bid]", $insert); }else{ $insert = str_replace("<-PostLink->", "http://$domain/$permalinkname/$cat[bid]/$urlencodeptitle", $insert); } if($eperma[0]!='2'){ $insert2 .= $cat['ptitle'] . "<1>http://".$domain."/$permalinkname/".$cat['bid']."<1>" . $cat['pic'] . "<3>"; }else{ $insert2 .= $cat['ptitle'] . "<1>http://".$domain."/$permalinkname/".$cat['bid']."/".$urlencodeptitle."<1>" . $cat['pic'] . "<3>"; } } } $insert2 = $insert2.'<4>'; $fh = fopen($fl, 'w'); fwrite($fh, $insert2); fclose($fh); }else{ $fh = fopen($fl, 'r+'); if(filesize($fl)){$cts = fread($fh, filesize($fl));}else{$cts=0;} fclose($fh); $grtz=explode("<4>",$cts); $insert3=$grtz[0]; $insert4=explode("<3>",$insert3); $insert5=0; $insert = ""; while($insert4[$insert5]){ $insert6=explode("<1>",$insert4[$insert5]); $insert .= $cats; $insert = str_replace("<-PostTitle->", enbug($insert6[0]), $insert); $insert = str_replace("<-PostLink->", enbug($insert6[1]), $insert); $insert = str_replace("<-Postimg->", enbug($insert6[2]), $insert); $insert5++; } } $template = str_replace("".$cats."", $insert, $template); $BlogPreviousblock = between("", "", $template); if (@!$insert){$template = str_replace("". $BlogPreviousblock."", "", $template);} ////////////////// end // COUNTER ////////////////////// change to new $template = str_replace("<-Online->", "<-OnlineVisitors->", $template); $template = str_replace("<-Today->", "<-TodayVisits->", $template); $template = str_replace("<-Yesterday->", "<-YesterdayVisits->", $template); $template = str_replace("<-Week->", "<-WeekVisits->", $template); $template = str_replace("<-Month->", "<-MonthVisits->", $template); $template = str_replace("<-Year->", "<-YearVisits->", $template); $template = str_replace("<-All->", "<-AllVisits->", $template); $template = str_replace("<-BlogPosts->", "<-BlogPostsCount->", $template); $template = str_replace("<-BlogComments->", "<-BlogCommentsCount->", $template); $cweblog=$id; include('counter.php'); $cdir="caches/cnts/"; $fi='.cnt'; $fl=$cdir.$id.'-comments'.$fi; if(!is_file($fl)) {fclose(fopen($fl,"x"));} if(!filesize($fl)){ $fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh); $blogcomms=(int)mysql_num_rows(mysql_query("select id from bcomments where weblog='$id'")); $fh = fopen($fl, 'w'); fwrite($fh, $blogcomms); fclose($fh); }else{ $fh = fopen($fl, 'r+'); if(filesize($fl)){$blogcomms = fread($fh, filesize($fl));}else{$cts=0;} fclose($fh); } $cdir="caches/cnts/"; $fi='.cnt'; $fl=$cdir.$id.'-posts'.$fi; if(!is_file($fl)) {fclose(fopen($fl,"x"));} if(!filesize($fl)){ $fh = fopen($fl, 'w');fwrite($fh,""); fclose($fh); $blogposts=(int)mysql_num_rows(mysql_query("select id from posts$ptnum where weblog='$id' AND status='1'")); $fh = fopen($fl, 'w'); fwrite($fh, $blogposts); fclose($fh); }else{ $fh = fopen($fl, 'r+'); if(filesize($fl)){$blogposts = fread($fh, filesize($fl));}else{$cts=0;} fclose($fh); } $template = str_replace("<-OnlineVisitors->", "$online", $template); $template = str_replace("<-TodayVisits->", "$day_value", $template); $template = str_replace("<-YesterdayVisits->", "$yesterday_value", $template); $template = str_replace("<-WeekVisits->", "$week_value", $template); $template = str_replace("<-MonthVisits->", "$month_value", $template); $template = str_replace("<-YearVisits->", "$year_value", $template); $template = str_replace("<-AllVisits->", "$all_value", $template); $template = str_replace("<-TodayGoogleEntrance->", "$tgoogle", $template); $template = str_replace("<-YesterdayGoogleEntrance->", "$ygoogle", $template); $template = str_replace("<-BlogPostsCount->", "$blogposts", $template); $template = str_replace("<-BlogCommentsCount->", "$blogcomms", $template); // ****************************** Start Hit Posts ****************************** $insert = ""; $hites = between("", "", $template); if ($hites AND $numhit){ $allhites = mysql_query("SELECT bid,ptitle,phits,perma,pic FROM posts$ptnum WHERE weblog='$id' AND phits>='1' AND status='1' order by phits desc limit $numhit"); while($hit = mysql_fetch_array($allhites)) { if($hit['perma']==''){$urlencodeptitle = urlencode(enbug($hit['ptitle']));} else{$urlencodeptitle = urlencode(enbug($hit['perma']));} if($hite['ptitle']){$hite['ptitle']=$hite['ptitle'];}else{$hite['ptitle']="بدون عنوان";} $insert .= $hites; $insert = str_replace("<-HitPostsTitle->", enbug($hit[ptitle]), $insert); $insert = str_replace("<-HitPostsimg->", enbug($hit[pic]), $insert); $insert = str_replace("<-HitPostsCount->", "$hit[phits]", $insert); if($eperma[0]!='2'){ $insert = str_replace("<-HitPostsLink->", "http://$domain/$permalinkname/$hit[bid]", $insert); } else{ $insert = str_replace("<-HitPostsLink->", "http://$domain/$permalinkname/$hit[bid]/$urlencodeptitle", $insert); } } $template = str_replace("".$hites."", $insert, $template); } if (!$insert){ $HitPostsBlock = between("", "", $template); $template = str_replace("". $HitPostsBlock."", "", $template); } // ****************************** End Hit Posts ****************************** // ****************************** Start Bid Posts ****************************** $insert = ""; $bidblock = between("", "", $template); $biditem = between("", "", $bidblock); if ($bidblock){ $allbids = mysql_query("SELECT * FROM bid WHERE weblog='$id' AND status='2' order by id desc limit 8"); while($bidd = mysql_fetch_array($allbids)) { $insert .= $biditem; $insert = str_replace("<-PostTitle->", enbug($bidd[title]), $insert); $insert = str_replace("<-PostImg->", enbug($bidd[photo]), $insert); $insert = str_replace("<-PostLink->", enbug($bidd[link]), $insert); } $template = str_replace("". $biditem."", $insert, $template); } if (!$insert OR $allbids){ $template = str_replace("". $bidblock."", "", $template); } // ****************************** Start Bid Posts ****************************** // ****************************** Start Popular Posts ****************************** $insert = ""; $popblock = between("", "", $template); $popitem = between("", "", $popblock); if ($popblock){ $allpops = mysql_query("SELECT * FROM bid WHERE weblog='$id' AND status='3' order by id desc limit 8"); while($popd = mysql_fetch_array($allpops)) { $insert .= $popitem; $insert = str_replace("<-PostTitle->", enbug($popd[title]), $insert); $insert = str_replace("<-PostImg->", enbug($popd[photo]), $insert); $insert = str_replace("<-PostLink->", enbug($popd[link]), $insert); } $template = str_replace("". $popitem."", $insert, $template); } if (!$insert){ $template = str_replace("". $popblock."", "", $template); } // ****************************** Start Popular Posts ****************************** // ****************************** Start Offer Posts ****************************** $insert = ""; $offerblock = between("", "", $template); $offitem = between("", "", $offerblock); if ($offerblock AND $ckduinfo['postsbidtime'] >= $fdate){ $alloffs = mysql_query("SELECT * FROM bid WHERE weblog='$id' AND status='4' order by id desc limit 4"); while($offd = mysql_fetch_array($alloffs)) { $insert .= $offitem; $insert = str_replace("<-PostTitle->", enbug($offd[title]), $insert); $insert = str_replace("<-PostImg->", enbug($offd[photo]), $insert); $insert = str_replace("<-PostLink->", enbug($offd[link]), $insert); } $template = str_replace("". $offitem."", $insert, $template); } if (!$insert){ $template = str_replace("". $offerblock."", "", $template); } // ****************************** Start Offer Posts ****************************** // ****************************** Start Slide Posts ****************************** $insert = ""; $slideblock = between("", "", $template); $slideitem = between("", "", $slideblock); if ($slideblock){ $allslides = mysql_query("SELECT * FROM bid WHERE weblog='$id' AND status='1' order by id desc limit 10"); while($slided = mysql_fetch_array($allslides)) { $insert .= $slideitem; $insert = str_replace("<-PostTitle->", enbug($slided[title]), $insert); $insert = str_replace("<-PostImg->", enbug($slided[photo]), $insert); $insert = str_replace("<-PostLink->", enbug($slided[link]), $insert); } $template = str_replace("". $slideitem."", $insert, $template); } if (!$insert){ $template = str_replace("". $slideblock."", "", $template); } // ****************************** Start Slide Posts ****************************** // ****************************** Start CommentList ****************************** $catslistcomment = between("", "", $template); $insert = ""; if($catslistcomment AND $p){ $adjacents = 3; $limit ='20'; $pcom=$_GET['pcom']; if($pcom) {$start = ($pcom - 1) * $limit;}else{$start = 0;} $allcomments = mysql_query("SELECT id,ctitle,cmail,ctext,ctime,cdate FROM bcomments WHERE weblog='$id' AND pid='$p' AND status='' order by id desc"); while($comm = mysql_fetch_array($allcomments)) { $insert .= $catslistcomment; $insert = str_replace("<-CommentAuthor->", enbug($comm[ctitle]), $insert); $insert = str_replace("<-CommentId->", $comm[id], $insert); $textcomm=explode("",$comm[ctext]); $Commenttext=$textcomm[0]; $icom=1;$ians=0; while($aracom=$textcomm[$icom]) { $ansverara=explode("",$aracom); if($ansverara[4]=='1'){ $Commenttext .="
$ansverara[0] : $ansverara[3] ساعت $ansverara[2]
$ansverara[5]
"; } $icom++; } $datei = $comm[ctime]." ساعت ".$comm[cdate]; $insert = str_replace("<-Commentdate->", "$datei", $insert); $insert = str_replace("<-Commenttext->", enbug($Commenttext), $insert); $insert = str_replace("", "$pauthor", $insert); } $template = str_replace("".$catslistcomment."", $insert, $template); include ("blogfiles/paginate-comment.php"); }else{$template = str_replace("".$catslistcomment."", "", $template);} // ****************************** End CommentList ****************************** // ****************************** Start Ads*120 ****************************** $insert = ""; $adsblock = between("", "", $template); $adsitem = between("", "", $adsblock); if ($adsblock){ $alladss = mysql_query("SELECT * FROM adsblogs WHERE weblog='$id' order by id desc limit 3"); while($adsd = mysql_fetch_array($alladss)) { $insert .= $adsitem; $insert = str_replace('<-adslink->', enbug($adsd[link]), $insert); $insert = str_replace('<-adstitle->', enbug($adsd[title]), $insert); $insert = str_replace('<-adsimg->', enbug($adsd[photo]), $insert); if($adsd[target]=='1'){$insert = str_replace('<-adstarget->', '_blank', $insert);}else{$insert = str_replace('<-adstarget->', '_none', $insert);} if($adsd[rell]=='1'){$insert = str_replace('<-adsrel->', 'rel="nofollow"', $insert);}else{$insert = str_replace('<-adsrel->', '', $insert);} } $template = str_replace("". $adsitem."", $insert, $template); } if (!$insert){ $template = str_replace("". $adsblock."", "", $template); } // ****************************** Start Ads*120 ****************************** // ****************************** Start Api ****************************** $insert=''; $cats = between("", "", $template); if($cats AND $ckduinfo['cart']>$fdate){ $pitems="

"; $insert = $cats; $insert = str_replace("<-ApiForm->", "$pitems", $insert); $template = str_replace("".$cats."", $insert, $template); } else{$template = str_replace("".$cats."", "", $template);} // ****************************** End Api ****************************** // ****************************** Start Copyaight ****************************** $insert=''; $ckdads=mysql_fetch_array(mysql_query("select ads from uinfo where user='$id' limit 0,1")); $cats = between("", "", $template); if($fdate < $ckdads[ads]){ $template = str_replace("".$cats."", "", $template); } // ****************************** End Copyaight ****************************** // ****************************** Start meta ****************************** ob_start(); include("inc/meta.php"); $str_meta = ob_get_clean(); $template = str_replace("", $str_meta, $template); // ****************************** End meta ****************************** // ****************************** Start Related Posts ****************************** $insert = ""; $relatedes = between("", "", $template); if($p AND $relatedes AND $numrelated){ $allrelated = mysql_query("SELECT bid,weblog,ptitle,pcat,perma,pic FROM posts$ptnum WHERE weblog='$id' AND bid!='$p' AND FIND_IN_SET('$bonecat', pcat) AND status='1' order by bid desc limit $numrelated"); while($related = mysql_fetch_array($allrelated)) { if($related['perma']==''){$urlencodeptitle = urlencode(enbug($related['ptitle']));} else{$urlencodeptitle = urlencode(enbug($related['perma']));} if($related['ptitle']){$related['ptitle']=$related['ptitle'];}else{$related['ptitle']="بدون عنوان";} $insert .= $relatedes; $insert = str_replace("<-RelatedPostsTitle->", enbug($related[ptitle]), $insert); $insert = str_replace("<-RelatedPostsimg->", enbug($related[pic]), $insert); if($eperma[0]!='2'){ $insert = str_replace("<-RelatedPostsLink->", "http://$domain/$permalinkname/$related[bid]", $insert); } else{ $insert = str_replace("<-RelatedPostsLink->", "http://$domain/$permalinkname/$related[bid]/$urlencodeptitle", $insert); } } $template = str_replace("".$relatedes."", $insert, $template); } if (!$insert){ $RelatedPostsBlock = between("", "", $template); $template = str_replace("". $RelatedPostsBlock."", "", $template); } // ****************************** End Related Posts ****************************** // ****************************** Start LinkAuto ****************************** $cats = between("", "", $template); $template = str_replace("".$cats."", "", $template); // ****************************** End LinkAuto ****************************** // ****************************** Start Categories ****************************** $catsk = between("", "", $template); $cats = between("", "", $template); $Mcats = between("", "", $template); $allcats = mysql_query("SELECT * FROM cats WHERE weblog='$id' AND status='1' order by ord"); $allcats2 = mysql_query("SELECT * FROM cats WHERE weblog='$id' AND status='1' order by ord"); $ckdallcats=mysql_num_rows($allcats); $ckdallcats2=mysql_num_rows($allcats2); $insert = "";$insert2 = "";$insert3 = "";$ncatW=0; if($ckdallcats AND $cats){ $mcats = between("", "", $template); while(@$cat = mysql_fetch_array($allcats)) { $insert .= $Mcats; $insert = str_replace("<-CategoryName->", enbug($cat[ctitle]), $insert); $insert = str_replace("", enbug($cat[bid]), $insert); $insert = str_replace("", $ncatW, $insert); $ncatW++; } $cat=''; $rcats = between("", "", $template); while(@$cat = mysql_fetch_array($allcats2)) { $insert2 .= $rcats; $insert2 = str_replace("", enbug($cat[bid]), $insert2); $rallcats = mysql_query("SELECT * FROM cats WHERE weblog='$id' AND status='$cat[id]' order by ord"); $rrcats = between("", "", $insert2); $rlcat="";$insert3=""; $rrrcats=$rrcats; if($cat['perma']==''){$urlencodectitle = urlencode($cat['ctitle']); }else{$urlencodectitle = urlencode($cat['perma']); } $urlencodectitle=enbug($urlencodectitle); if($cperma[0]=='2'){$rrrcats = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/$urlencodectitle", $rrrcats); }else{$rrrcats = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]", $rrrcats); } $rrrcats = str_replace("<-CategoryName->", enbug($cat[ctitle]), $rrrcats); while(@$rlcat = mysql_fetch_array($rallcats)) { $insert3 .= $rrcats; $insert3 = str_replace("<-CategoryName->", enbug($rlcat[ctitle]), $insert3); if($rlcat['perma']==''){$urlencodectitle = urlencode($rlcat['ctitle']); }else{$urlencodectitle = urlencode($rlcat['perma']); } $urlencodectitle=enbug($urlencodectitle); if($cperma[0]=='2'){$insert3 = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/scat/$rlcat[bid]/$urlencodectitle", $insert3); }else{$insert3 = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/scat/$rlcat[bid]", $insert3); } } $insert2 = str_replace("".$rrcats."", "$rrrcats $insert3", $insert2); } $template = str_replace("".$Mcats."", $insert, $template); $template = str_replace("".$rcats."", $insert2, $template); } elseif($ckdallcats AND $catsk){ while(@$cat = mysql_fetch_array($allcats)) { $insert2='';$rrrcats=''; $rallcats = mysql_query("SELECT * FROM cats WHERE weblog='$id' AND status='$cat[id]' order by ord"); $insert .= $Mcats; $rcats = between("", "", $insert); $rrcats = between("", "", $insert); while(@$rlcat = mysql_fetch_array($rallcats)) { $insert2 .= $rrcats; $insert2 = str_replace("<-CategoryName->", enbug($rlcat[ctitle]), $insert2); if($rlcat['perma']==''){$urlencodectitle = urlencode($rlcat['ctitle']); }else{$urlencodectitle = urlencode($rlcat['perma']); } $urlencodectitle=enbug($urlencodectitle); if($cperma[0]=='2'){$insert2 = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/scat/$rlcat[bid]/$urlencodectitle", $insert2); }else{$insert2 = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/scat/$rlcat[bid]", $insert2); } } $rrrcats=$rrcats; if($cat['perma']==''){$urlencodectitle = urlencode($cat['ctitle']); }else{$urlencodectitle = urlencode($cat['perma']); } $urlencodectitle=enbug($urlencodectitle); if($cperma[0]=='2'){$rrrcats = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]/$urlencodectitle", $rrrcats); }else{$rrrcats = str_replace("<-CategoryLink->", "http://$domain/$cpermalinkname/$cat[bid]", $rrrcats); } $rrrcats = str_replace("<-CategoryName->", enbug($cat[ctitle]), $rrrcats); $insert = str_replace("".$rrcats."", "$rrrcats $insert2", $insert); $insert = str_replace("<-CategoryName->", enbug($cat[ctitle]), $insert); $insert = str_replace("", enbug($cat[bid]), $insert); $insert = str_replace("", $ncatW, $insert); $ncatW++; } $template = str_replace("".$Mcats."", $insert, $template); }else{ $template = str_replace("". $cats."", "", $template); $template = str_replace("". $catsk."", "", $template); } // ****************************** End Categories ****************************** // ****************************** Start Navigation ****************************** if(@$catz){ $navlink=between("", "", $template); $navrep=$navlink;$navrepp=$navlink;$navreppp=$navlink; $navrep = str_replace("", "http://$domain", $navrep); $navrep = str_replace("", "$qub[btitle]", $navrep); if($BlogAndPostTitle1['perma']==''){$urlencodectitle = urlencode($BlogAndPostTitle1['ctitle']); }else{$urlencodectitle = urlencode($BlogAndPostTitle1['perma']);} $urlencodectitle=enbug($urlencodectitle); if($cperma[0]=='2'){$navrepp = str_replace("", "http://$domain/$cpermalinkname/$catz/$urlencodectitle", $navrepp); }else{$navrepp = str_replace("", "http://$domain/$cpermalinkname/$catz", $navrepp);} $navrepp = str_replace("", "$BlogAndPostTitle1[ctitle]", $navrepp); if($arrs[3]=='scat'){ if($BlogAndPostTitle2['perma']==''){$urlencodectitle2 = urlencode($BlogAndPostTitle2['ctitle']); }else{$urlencodectitle2 = urlencode($BlogAndPostTitle2['perma']);} if($cperma[0]=='2'){$navreppp = str_replace("", "http://$domain/$cpermalinkname/$catz/scat/$arrs[4]/$urlencodectitle2", $navreppp); }else{$navreppp = str_replace("", "http://$domain/$cpermalinkname/$catz/scat/$arrs[4]", $navreppp);} $navreppp = str_replace("", "$BlogAndPostTitle2[ctitle]", $navreppp); }else{$navreppp='';} $template = str_replace("".$navlink."", "$navrep$navrepp$navreppp", $template); } // ****************************** End Navigation ****************************** // INPUT PAGES $users = between("", "", $template); if($pat){ if($arrs[3]=='scat'){$ppasv='/'.$cpermalinkname.'/'.$catz.'/'.scat.'/'.$arrs[4]; }else{$ppasv='/'.$cpermalinkname.'/'.$catz;} }else if($tat){ $archivex = str_replace("|","/",$archivex); $archivex = str_replace("/page/$pz","",$archivex); $ppasv='/archive/'.$archivex; }else if($searchz){ $nsearchz = str_replace("/page/$pz","",$nsearchz); $ppasv='/search/'.$nsearchz; }else if($ntag){ $nntag = str_replace("/page/$pz","",$nntag); $ppasv='/tag/'.$nntag; }elseif($plinks){ $ppasv='/links'; }else{ $ppasv=''; } if (@$b OR $p OR $postz OR $profile or $policy OR $message OR $pageposts OR $panel OR $addcart){$template = str_replace("". $users ."", "", $template); }else{ $totalinks = mysql_num_rows($allpostz); if ($pz == 0) $pz = 1; $prev = $pz - 1; $next = $pz + 1; $lastpage = @ ceil($totalinks/$limit); $lpm1 = $lastpage - 1; $pagination = ''; if($lastpage > 1) { $pagination .= ''; } $pages = $pagination; //if (@!$pages OR $b OR $p OR $postz){$template = str_replace("". $users ."", "", $template); $template = str_replace("". $users ."", $pages, $template); } $template = str_replace("".$contactt."", "", $template); $template = str_replace("<-Contact_Us->", "/contact", $template); $template = str_replace("<8n8>", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("", "", $template); $template = str_replace("intTimeZone=<-BlogTimeZone->;", "", $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('<-posttinytexts->', '', $template); $template = str_replace('<-filmlink->', '', $template); $template = str_replace('<-filmtext->', '', $template); $template = str_replace('<-onepic->', '', $template); $template = str_replace('<-mediumname->', '', $template); $template = str_replace('<-mediumvalue->', '', $template); $template = str_replace('<-detailsname->', '', $template); $template = str_replace('<-detailsvalue->', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); $template = str_replace('', '', $template); /**************** END ***************/ // ADS in WEBLOGz $adfdate=$fdate-518400; $adslist = mysql_query("SELECT address,title FROM adslist WHERE place='blogs' AND fdate>='$adfdate'"); $adslisttt = mysql_fetch_array(mysql_query("SELECT id FROM adslist WHERE place='blogs' AND fdate>='$adfdate'")); if($fdate > $ckdads[ads] AND ($qcb['badz'] OR $adslisttt)){ $classads=rand(10000,90000); ?> $ckdads[ads] AND ($qcb['badz'] OR $adslisttt)){ ?>