") ;//معرفات مسموحة } } /*توضع الاسطر التالية في الاعلى من جميع التطبيقات فنضمن بذلك تجاوز جميع المحارف الخاصة التي يرسلها المستخدمون كونها جاهزة لمعالجة كافة انوزاع التطبيقات*/ scrub_data($_GET); scrub_data($_POST); scrub_data($_COOKIE); /////////////////////////////////////////التحقق من صلاحية العنوان///////////////////////////////////////////// $_SERVER[REQUEST_URI]=$_SERVER['REQUEST_URI']; //جلب كامل عنوان المحدد url ماعدا http://xxx.xname.xxx $ur=$_SERVER[REQUEST_URI]; $_arr = array('<', '>', '|', '"', '[', ']', ',','*','(',')',';', '@', '\''); foreach ($_arr as $value) { str_replace($value,'',$ur); } /*المرحلة الخامسة طباعة نص بدل كافة رسائل الخطأ من اجل ضمان عدم معرفة اسماء الجداول*/ function handle_query($query){ global $query_debug, $PHP_SELF; if($query_debug=="on"){ $result=mysql_query($query) or die( "Following query failed: $query
" . mysql_error() ); }elseif($query_debug="off"){ $result=mysql_query($query) or error_log( $PHP_SELF . ", " . $query . ", " . mysql_error() , 0); if(!$result){ echo "Sorry, internal error encountered"; exit; } } return $result; } function clean_ID($vID) { $vID = intval($vID); $vID = sprintf('%d',$vID); if($vID == '0'){ $url_refresh=""; echo "Enter Integer....."; echo "$url_refresh"; exit; } return $vID; } function filterletters($str){ $str = trim(preg_replace('/\*|\%|\'|\"|\\\|<|>|&|\^|$|#|@|!|~|\/|\+|\-|\?|\.|\|/', '', $str)); $str = strip_tags($str); return $str; } function catsub_id($str){ //cat_id sub_id sub2_id if(!preg_match('/[abc]?[0-9]+/',$str)){ $str=""; } return $str; } /* extract($_POST);extract($_GET);extract($_SESSION);extract($_COOKIE); php_flag register_globals on */ ?> دليل المواقع،تهامة قحطان، مجالس قحطان،ملتقى تهامة قحطان
البحرين مصر العراق الاردن الكويت المغرب قطر سلطنة عمان المملكة العربية السعودية الجمهورية العربية السورية اللبنان المغرب فلسطين السودان تونس الامارات العريية المتحدة اليمن
ضع شعار موقعك هنا
 
الصفحة الرئيسية اتصل بنا الدخول كود التقييم الاعلى تقييما الاكثر زيارة مواقع جديدة بحث متقدم اضف موقعك
 



prepare(); $Query="SELECT `Dlel_Name` FROM `num` WHERE id='1'"; $Result=@mysql_query($Query); while($Rows_Query=mysql_fetch_array($Result)){ $Dalel_Name=$Rows_Query[Dlel_Name]; $tpl->gotoBlock("_ROOT"); $tpl->assign("dalel",$Dalel_Name); } $Querya="SELECT `description` FROM `num` WHERE id='9'"; $Resulta=@mysql_query($Querya); while($Rows_Querya=mysql_fetch_array($Resulta)){ //كلمة ادارة الموقع $description=$Rows_Querya[description]; $tpl->newBlock("word_administrator"); $tpl->assign("w_administrator",$description); }//end while $sql="SELECT `website`.`web_id` , `website`.`visit` AS sum, `web_name` , `web_link` , `website`.`date` FROM `website` WHERE `website`.`cat_id` != '-1' and `website`.active='1' order by `website`.`web_id` DESC LIMIT 0,$n_web2 "; //مواقع جديدة $result=mysql_query($sql); if(!$result){echo mysql_error();} while($row=mysql_fetch_array($result)){ $tpl->newBlock("cat"); $web_id=$row[web_id]; $tpl->assign("web_id",$web_id); $web_name=$row[web_name]; $web_name=ltext($web_name,$wordsnum); // استدعاء الدالة $tpl->assign("web_name",$web_name); $web_link=$row[web_link]; // echo"$web_link"; // echo"
"; $tpl->assign("web_link",$web_link); $date_add=$row[date]; $tpl->assign("date_add",$date_add); //$showsite_link="showsite.php?wesit=$web_id"; $showsite_link="show".$web_id."-". replace($row[web_name]).".html"; //$showsite_link="sites$web_id.html"; $tpl->assign("showsite_link",$showsite_link); } //هذا من أجل تالمواقع الأكثر زيارة $sql="SELECT `website`.`web_id` , `website`.`visit` AS sum, `web_name` , `website`.`date` , `website`.`visit` FROM `website` WHERE `website`.active = '1' AND `website`.cat_id != '-1' ORDER BY `website`.visit DESC LIMIT 0,$visite_left "; $result=mysql_query($sql); if(!$result){echo mysql_error();} $num=mysql_num_rows($result); while($row=mysql_fetch_array($result)){ $tpl->newBlock("most_visited"); $web_name=$row[web_name]; $web_name=ltext($web_name,$wordsnum); // استدعاء الدالة $web_namez=trim($web_name); $web_namez=replace($web_namez); $tpl->assign("web_namez",$web_namez); $tpl->assign("web_name",$web_name); $sum=$row[sum]; $tpl->assign("sum",$sum); $web_id=$row[web_id]; $tpl->assign("web_id",$web_id); } $sql="SELECT `cat_id`,`cat_name`,`date`,`arr`,`active`,`link` FROM `frend` WHERE `active`=1 order by `arr` asc"; // echo "$sql"; $result=mysql_query($sql); if(!$result){echo mysql_error();} $num=mysql_num_rows($result); //echo "$num"; while($row=mysql_fetch_array($result)){ $tpl->newBlock("frend_web"); $web_id=$row[cat_id]; $tpl->assign("web_id",$web_id); $frend_name=$row[cat_name]; //echo "$frend_name"; $tpl->assign("frend_name",$frend_name); $link=$row[link]; //echo "$link"; $tpl->assign("link",$link); $dat=$row[date]; $tpl->assign("dat",$dat); } //////آخر الاخبار للموقع $sql="SELECT news_id,date,title FROM `news` WHERE news_to_e='1' and active='1' order by news_id DESC"; $result=mysql_query($sql); if(!$result){echo mysql_error();} $num=mysql_num_rows($result); while($row=mysql_fetch_array($result)){ $tpl->newBlock("news"); $news_id=$row[news_id]; $tpl->assign("news_id",$row[news_id]); $title=$row[title]; $tpl->assign("title",$title); $date_news=$row[date]; $tpl->assign("date_news",$date_news); } $sql="SELECT `visit`,`title`,web_id,`web_name` ,`web_link`,`date` FROM `website` WHERE cat_id='-1' and active='1'"; $result=mysql_query($sql); if(!$result){echo mysql_error();} $num=mysql_num_rows($result); while($row=mysql_fetch_array($result)){ $tpl->newBlock("news2"); $web_name=$row[web_name]; $web_name=ltext($web_name,$wordsnum); // استدعاء الدالة $tpl->assign("web_name",$web_name); $web_link=$row[web_link]; $tpl->assign("web_link",$web_link); $visit=$row[visit]; $tpl->assign("visit",$visit); $web_id=$row[web_id]; $tpl->assign("web_id",$web_id); $date_add1=$row[date]; $tpl->assign("date_add1",$date_add1); $title=$row[title]; $tpl->assign("title2",$title); $web_id=$row[web_id]; $tpl->assign("web_id",$web_id); } $count=0; $sql_cat="SELECT `arr` , `active`,`cat_id` , `cat_name` FROM `categories` WHERE `active` =1 and fix=1 order by arr asc limit 15"; $result_cat=mysql_query($sql_cat); if(!$result_cat){echo mysql_error();} $num_rows=mysql_num_rows($result_cat); $sql_update2="SELECT `num_td` FROM `num` WHERE `id`='1'"; $res2=mysql_query($sql_update2); $x1=mysql_result($res2,0,"num_td"); $count=0;$y=0; while($row_cat=mysql_fetch_array($result_cat)){ //////////////////////////////////////// $tpl->newBlock("medel"); ///////////////////////////////////////// $x=$x1; $count++; $catgories=$row_cat[cat_name]; $tpl->assign("catgories",$catgories); $cat_id=$row_cat[cat_id]; $tpl->assign("cat_id",$cat_id); $sql_sub1="SELECT `part_id`, `part_name` FROM `part_in_cat` WHERE cat_id='$cat_id' order by arr asc limit 15"; $result_sub1=mysql_query($sql_sub1); if(!$result_sub1){echo mysql_error();} $num_rows_sub1=mysql_num_rows($result_sub1); $tpl->assign("num_rows_sub1",$num_rows_sub1); //هذا من اجل الرابط //$tpl->assignGlobal("link_cat",$cat_id.html); //$link_cat="detailes.php?cat_id=$cat_id"; $link_cat="detailes?cat_id=$cat_id"; $tpl->assign("link_cat",$link_cat); while($row_sub=mysql_fetch_array($result_sub1)){ ////////////////////////////////////////// $tpl->newBlock("partone"); $name_part=$row_sub[part_name]; $tpl->assign("name_part",$name_part); $green=$row_sub[green]; $tpl->assign("green",$green); // $sql_web=mysql_query("SELECT `web_id` FROM `website` WHERE `part_id`='$row_sub[part_id]' order by arr asc"); // $num_rows_web=mysql_num_rows($sql_web); // $tpl->assign("num_rows_web",$num_rows_web); $link_sub="sub.php?part_id=$row_sub[part_id]"; $tpl->assign("link_sub",$link_sub); if($row_sub[green]=='1'){ $green="$name_part"; $tpl->assign("green",$green); }//end if if($row_sub[green]!='1'){ //echo "$name_part"; $tpl->assign("green",$name_part); }//end if }//end while loop sub }///end while loop cat ////////////موقع الساعة////////////// $sql_hour="select hour(now()) as xxx ,now() as hour"; $sql_query=mysql_query($sql_hour); $hour_now=mysql_result($sql_query,0,"xxx"); //echo "$hour_now"; $hour="select hour from `temporary` where 1"; $sql_query_hour=mysql_query($hour); $hour_from_mysql=mysql_result($sql_query_hour,0,"hour"); $time=mysql_result($sql_query,0,"hour"); $tpl->gotoBlock("_ROOT"); $tpl->assign("time",$time); if ($hour_now==$hour_from_mysql) { $sql_hour="SELECT web_id,web_name,web_link,description from `temporary` where 1 "; $sql_query=mysql_query($sql_hour); $web_id=mysql_result($sql_query,0,"web_id"); $web_name=mysql_result($sql_query,0,"web_name"); $web_link=mysql_result($sql_query,0,"web_link"); $description=mysql_result($sql_query,0,"description"); $tpl->newBlock("web_name"); $tpl->assign("web_link",$web_link); $tpl->assign("description",$description); $web_name=ltext($web_name,$wordsnum); // استدعاء الدالة $web_namel=trim($web_name); $web_namel=replace($web_namel); $tpl->assign("web_namel",$web_namel); $tpl->assign("web_name",$web_name); $tpl->assign("web_id",$web_id); $tpl->assign("description",$description); } else { $sql_hour="SELECT web_id,web_name,web_link,description from `website` where `website`.active='1' order by rand() limit 1"; $sql_query=mysql_query($sql_hour); $web_id=mysql_result($sql_query,0,"web_id"); $web_name=mysql_result($sql_query,0,"web_name"); $web_link=mysql_result($sql_query,0,"web_link"); $description=mysql_result($sql_query,0,"description"); $sql_hourx="select web_id from `temporary` where 1"; $sql_queryx=mysql_query($sql_hourx); $web_id_from_temp=mysql_result($sql_queryx,0,"web_id"); $sql4="update `temporary` set web_id='$web_id',web_name='$web_name',web_link='$web_link',hour='$hour_now',description='$description' where web_id ='$web_id_from_temp'"; $update=mysql_query($sql4); $sql_hour="SELECT web_id,web_name,web_link,description from `temporary` where 1 "; $sql_query=mysql_query($sql_hour); $web_id=mysql_result($sql_query,0,"web_id"); $web_name=mysql_result($sql_query,0,"web_name"); $web_link=mysql_result($sql_query,0,"web_link"); $web_link=mysql_result($sql_query,0,"description"); $tpl->newBlock("web_name"); $tpl->assign("web_link",$web_link); $web_name=ltext($web_name,$wordsnum); // استدعاء الدالة $web_namel=trim($web_name); $web_namel=replace($web_namel); $tpl->assign("web_namel",$web_namel); $tpl->assign("web_name",$web_name); $tpl->assign("web_id",$web_id); $tpl->assign("description",$description); } ////////////////////////// $tpl->printToScreen(); ob_end_flush(); ?>prepare(); //اسم الدليل $tpl->gotoBlock("_ROOT"); $tpl->assign("DALEL_NAME",$DALEL_NAMES); //اسم الدليل ///موقع االيوم///////////////// $sql_hourx="SELECT CURDATE()"; $sql_queryx=mysql_query($sql_hourx); $hour_THISTIME=mysql_result($sql_queryx,0); //echo "$sql_queryx"; $hourx="select hour from `today_website` where 1"; $sql_query_hourx=mysql_query($hourx); $hour_from_mysqlx=mysql_result($sql_query_hourx,0,"hour"); if ($hour_THISTIME==$hour_from_mysqlx) { //echo "$hour_THISTIME";echo "
"; // echo "$hour_from_mysqlx"; echo "
"; //جلب معلومتات الموقه التحا المجهر //////i§h هذا من اجل جلب صورة للموقع $sql1x="SELECT web_id,cat_id,part_id,`web_name` , `web_link` , `description` , `date` ,reser, `visit`,vote,`picture_alexa`,part_name,cat_name FROM `today_website` WHERE 1"; //echo"$sql1x"; $resultx=mysql_query($sql1x); $cat_id_today=mysql_result($resultx,0,"cat_id"); $part_id_today=mysql_result($resultx,0,"part_id"); $cat_name_T=mysql_result($resultx,0,"cat_name"); $tpl->assign("cat_name_T",$cat_name_T); $r3_cat_link="cut".$cat_id_today."-".ereg_replace(' ',"_",$cat_name_T).".html"; $tpl->assign("r3_cat_link",$r3_cat_link); $part_name_T=mysql_result($resultx,0,"part_name"); $tpl->assign("part_name_T",$part_name_T); $r3_part_link="sub".$part_id_today."-".ereg_replace(' ',"_",$part_name_T).".html"; $tpl->assign("r3_part_link",$r3_part_link); $namex_today=mysql_result($resultx,0,"web_name"); // echo "$namex_today"; $tpl->assign("name_today",$namex_today); $link=mysql_result($resultx,0,"vote"); $tpl->assign("vote",$vote); $links=mysql_result($resultx,0,"web_link"); $tpl->assign("links",$links); $date_T=mysql_result($resultx,0,"date"); $tpl->assign("date_T",$date_T); $visited=mysql_result($resultx,0,"visit"); $tpl->assign("visited",$visited); $description=mysql_result($resultx,0,"description"); $tpl->assign("description",$description); $reser=mysql_result($resultx,0,"reser"); $tpl->assign("reser",$reser); $web_id=mysql_result($resultx,0,"web_id"); $go="go$web_id.html"; $tpl->assign("go",$go); $show="show".$web_id."-". ereg_replace(' ',"_",$namex_today).".html"; //&id_sub=$part_id $tpl->assign("show",$show); $picture=mysql_result($resultx,0,"picture_alexa"); $tpl->assign("picture",$picture); } else { //الاستغلام من جدول المواقع //////i هذا من اجل جلب صورة للموقع $sql1_today="SELECT web_id,cat_id,reser,part_id,`web_name` , `web_link` , `description` , `date` , `visit`,vote FROM `website` WHERE `website`.active='1' order by rand() limit 1"; // echo"$sql1_today"; // echo"
"; $result_today=mysql_query($sql1_today); $name_today=mysql_result($result_today,0,"web_name"); $vote=mysql_result($result_today,0,"vote"); $date_TODAY=mysql_result($result_today,0,"date"); $linkss=mysql_result($result_today,0,"web_link"); $visit=mysql_result($result_today,0,"visit"); $description=mysql_result($result_today,0,"description"); $web_id=mysql_result($result_today,0,"web_id"); //echo"$web_id"; //$web_id_from_temp=mysql_result($result_today,0,"web_id"); $cat_id=mysql_result($result_today,0,"cat_id"); $part_idx=mysql_result($result_today,0,"part_id"); //echo"$part_idx"; $resx=$linkss; $length=strlen($resx); $result_today_url=substr($resx,11,$length);//cut from begin $picture="images$result_today_url.psd"; // echo"$web_id";zz $sql_cat_name="SELECT `categories`.cat_name,website.date,reser, part_in_cat.part_name,part_in_cat.part_id from `categories` INNER JOIN part_in_cat ON `categories`.cat_id = part_in_cat.cat_id INNER JOIN website ON `categories`.cat_id = website.cat_id WHERE web_id ='$web_id' and part_in_cat.part_id='$part_idx'"; //echo"$web_id"; //echo"
"; //echo"$sql_cat_name"; //echo"
"; // echo "$sql_cat_name"; $res_cat_name=mysql_query($sql_cat_name); $cat_namexx=@mysql_result($res_cat_name,0,"cat_name"); $reser=@mysql_result($res_cat_name,0,"reser"); $part_namexx=@mysql_result($res_cat_name,0,"part_name"); //$part_id_web=@mysql_result($res_cat_name,0,"part_id"); $DAY_TODAY=@mysql_result($res_cat_name,0,"date"); //معرفة الترتيب $query_web_id="SELECT * FROM `today_website` WHERE 1"; $res_cat_web_id=mysql_query($query_web_id); $web_today_id=@mysql_result($res_cat_web_id,0,"web_id"); //من اجل ترنيب الموقع //تحديث معلومات الجدول $sql_today="update `today_website` set vote='$vote',date='$DAY_TODAY',visit='$visit',description='$description',cat_id='$cat_id',part_id='$part_idx',picture_alexa='$picture',web_id='$web_id',web_name='$name_today',web_link='$linkss',hour=CURDATE(),cat_name='$cat_namexx',part_name='$part_namexx',reser='$reser' where web_id ='$web_today_id'"; //echo"
"; //echo"$sql_today"; //echo"
"; $update=mysql_query($sql_today); //من اجل التشييك على البنرات الاعلانية $q="SELECT CURDATE() as today"; $res=mysql_query($q); $TODAY=mysql_result($res,0,"today"); //يوم البنرات //echo"$TODAY"; $query="SELECT * FROM `adsplus` WHERE baner_priv !='5' "; $result=mysql_query($query); while($rows=mysql_fetch_array($result)){ $end_day=$rows[end_date]; if($TODAY > $end_day ){ $sql="update adsplus set adon='0' where `adid`='$rows[adid]'"; $res=@mysql_query($sql); if(!$res){echo mysql_error();exit;} } }//end ehile } $SQ="SELECT `num_td` from `num` where `id` ='4' "; $RE=mysql_query($SQ); while ($ROWS = mysql_fetch_array($RE)) { $num_tr=$ROWS[num_td]; //echo " $num_tr" ; } $y=1; $sqlxx="SELECT `num_td` from `num` where `id` ='$y' "; $sex1=mysql_query($sqlxx); while ($line = mysql_fetch_array($sex1)) { $num_td=$line[num_td]; //$num_tr=$line[num_tr]; } $COUNT=0; $counter_defult3=0; $result = mysql_query(" SELECT `arr` ,lin_name, `active`,`cat_id` , `cat_name`,`color_cat`,`count1_part`,`count1_web`,name_img FROM `categories` WHERE `active` =1 and fix=1 and cat_id !='1' and eklemi ='0' order by arr asc"); while ($Row = @mysql_fetch_array($result)) { $COUNT++; $counter_defult3++; $tpl->newBlock("bolock1"); $catgories=$Row[cat_name]; $tpl->assign("catgories",$catgories); $name_img=$Row[name_img]; $images_cat="\"\""; $tpl->assign("images_cat",$images_cat); $cat_id=$Row[cat_id]; if(!empty($Row[lin_name])){ $lin_name=$Row[lin_name]; $lin_name=ereg_replace(' ',"_",$lin_name); }else{ $lin_name=$Row['cat_name']; $lin_name=ereg_replace(' ',"_",$lin_name); } $links_cat="cut".$cat_id."-$lin_name.html"; $tpl->assign("links_cat",$links_cat); $tpl->assign("arr",$Row[arr]); $tpl->assign("color_cats",$Row[color_cat]); $count1_part=$Row[count1_part]; //echo"$count1_part"; $count1_web=$Row[count1_web]; $tpl->assign("count1_part",$Row[count1_part]); $tpl->assign("count1_web",$count1_web); $tpl->assign("cat_id",$cat_id); if($counter_defult3==$num_tr){ $tdtr="

"; $tpl->assign("COUNTER",$tdtr); $counter_defult3=0; }//end $counter_defult3 ////////////////////////////if($tamp !="defult3"){ $variabl=__LINE__; if($Type_Style !="1"){ IF($COUNT==$num_td){ //$tpl->newBlock("bolock1"); $tpl->assign("ABOSOD",""); $COUNT=0; $y++; $sqlxx="SELECT `num_td` from `num` where `id` ='$y'"; $sex1=mysql_query($sqlxx); while ($line = mysql_fetch_array($sex1)) { $num_td=$line[num_td]; } } }//end if $x = mysql_query("SELECT `part_id`, `part_name`,arr,`count_part`,green,`count_web`,lin_namep FROM `part_in_cat` WHERE fix='1' and active='1' and cat_id='$cat_id' order by arr asc limit 20"); while ($Row1 = @mysql_fetch_array($x)) { $tpl->newBlock("bolock2"); $name_part=$Row1[part_name]; $tpl->assign("name_part",$name_part); $count_part=$Row1[count_part]; $count_web=$Row1[count_web]; $tpl->assign("count_part",$count_part); $tpl->assign("count_web",$count_web); $green=$Row1['green']; $tpl->assign("green",$green); $tpl->assign("arr2",$Row1[arr]); if(!empty($Row1[lin_namep])){ $lin_namep=$Row1[lin_namep]; $lin_namep=ereg_replace(' ',"_",$lin_namep); }else{ $lin_namep=$Row1['part_name']; $lin_namep=ereg_replace(' ',"_",$lin_namep); } $link_sub="sub".$Row1[part_id]."-$lin_namep.html"; // $link_sub="sub.php?sub_id=$row_sub[part_id]"; $tpl->assign("link_sub",$link_sub); if($Row1[green]=='1'){ $green="$name_part"; $tpl->assign("green",$green); }//end if if($Row1[green]!='1'){ //echo "$name_part"; $tpl->assign("green",$name_part); }//end if } // while ($Row1 = @mysql_fetch_array($x)) /////////////////////////من اجل الستايل االثالث /////////////////////////من اجل الستايل االثالث } // $xes="ddddd"; $tpl->printToScreen(); ?>prepare(); //من اجل تعديل اسم الموقع $Query="SELECT `Dlel_Name` FROM `num` WHERE id='1'"; $Result=@mysql_query($Query); while($Rows_Query=mysql_fetch_array($Result)){ $Dalel_Name=$Rows_Query[Dlel_Name]; $tpl->gotoBlock("_ROOT"); $tpl->assign("dalel",$Dalel_Name); // $cat_id=$_GET[cat_id]; $tpl->assign("cate_id",$cat_id); // $sub_id=$_GET[sub_id]; $tpl->assign("sube_id",$sub_id); } //من اجل تعديل اسم الموقع /////هذا من أجلل المواقع الجدبدة $sql_add_web="select cat_id,part_id from part_in_cat where part_id='$_GET[sub_id]' or cat_id='$_GET[cat_id]' order by part_id limit 1"; $result_add_web=@mysql_query($sql_add_web); while($row_add_web=mysql_fetch_array($result_add_web)){ $cat_id_add_web=$row_add_web[cat_id];$tpl->assign("cat_id_add_web",$cat_id_add_web); //echo "$cat_id_add_web"; if(isset($_GET[sub_id])){ $part_id_add_web=$row_add_web[part_id];$tpl->assign("part_id_add_web",$part_id_add_web); } } ///////////////////////من اجل نسجيل دخول الاعضاء/////////////////////////////// if(($PREV=='1')||($PREV=='2')||($PREV=='-100')){ // $tpl->gotoBlock("logout"); //$link_login="control/add_web4.php"; $link_login="process.php?op=logout"; $tpl->assign("link_login",$link_login); $name="تسجيل الخروح"; $tpl->assign("name",$name); $tpl->assign("priv",$PREV); $link_login="control/"; $link_login2="control/add_web4.php"; // $name_member2=" دخول الاعضاء"; $tpl->assign("name_member2",$name_member2); $tpl->assign("name2",$name); $tpl->assign("link_login2",$link_login2); $tpl->assign("priv2",$PREV); $tpl->assign("FNAME",$FNAME); $hi=" أهلا بك "; $tpl->assign("txt",$hi); }else{ $link_login2="control"; $tpl->assign("name2",$name); $tpl->assign("link_login2",$link_login2); } ///////////////////////////من اجل نسجيل دخول الاعضاء/////////////////////////////////////// $sql_main="SELECT `cat_name`,lin_name,color_cat,count1_part,`cat_id` FROM `categories` WHERE active='1' and eklemi !='1' and show_in_right='1' order by arr asc limit 0,200"; $result_main=mysql_query($sql_main); if(!$result_main){echo mysql_error();} $num_main=mysql_num_rows($result_main); while($row_main=mysql_fetch_array($result_main)){ $tpl->newBlock("catmainue"); $cat_id=$row_main[cat_id]; if(!empty($row_main[lin_name])){ $lin_name=$row_main[lin_name]; $lin_name=ereg_replace(' ',"_",$lin_name); }else{ $lin_name=$row_main['cat_name']; $lin_name=ereg_replace(' ',"_",$lin_name); } $links_cat_in_minue="cut".$cat_id."-$lin_name.html"; $tpl->assign("links_cat_in_minue",$links_cat_in_minue); $tpl->assign("cat_name",$row_main[cat_name]); $tpl->assign("color_cats",$row_main[color_cat]); $tpl->assign("count1_part",$row_main[count1_part]); } //الأقسام: $sql_sub="SELECT `part_id` FROM `part_in_cat` WHERE 1"; $result_sub=mysql_query($sql_sub); $num_roes=@mysql_num_rows($result_sub); //$num_sub=mysql_result($result_sub,0,"sumpart"); $tpl->gotoBlock("_ROOT"); $tpl->assign("num_sub",$num_roes); //الأقسام: $sqlquery="SELECT v_t_month,all_visited,active_web,no_active_web FROM `num` where id='1'"; $res_this_m=mysql_query($sqlquery); $Result_this_month=@mysql_result($res_this_m,0,"v_t_month"); $ALL_Visited=@mysql_result($res_this_m,0,"all_visited"); $no_active_web=@mysql_result($res_this_m,0,"no_active_web"); $active_web=@mysql_result($res_this_m,0,"active_web"); //من اجل اختيار موقع عشوائي $tpl->gotoBlock("_ROOT"); $tpl->assign("sum_this_month",$Result_this_month); $tpl->gotoBlock("_ROOT"); $tpl->assign("ALL_VISITE",$ALL_Visited); $tpl->gotoBlock("_ROOT"); $link_rand="rand.php?web_id=$web_id";//rand.php?web_id=$web_id&x=1 $tpl->assign("no_active_web",$no_active_web); $tpl->assign("active_web",$active_web); $sql_cli=mysql_query("SELECT * FROM `lastupdate` WHERE 1 "); $num_click_last=mysql_result($sql_cli,0,"click"); $tpl->assign("num_click_last",$num_click_last); $sql="SELECT last FROM `lastupdate` WHERE 1"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)){ $last=$row[last]; $tpl->newBlock("last"); $tpl->assign("last",$last); } ////////////////////////////البداية من نظام الاستفتاء///////////////// $qq="select * from vote_q order by sort DESC"; $sqlq=mysql_query($qq); $rowq=mysql_fetch_array($sqlq); $qa="select * from vote_a where q_id=$rowq[id]"; $sqq=mysql_query($qa); $tpl->gotoBlock("_ROOT"); $tpl->assign("ask",$rowq[ask]); while(@$rowa=mysql_fetch_array($sqq)){ $tpl->newBlock("vote"); $tpl->assign("ans",$rowa[ans]); $tpl->assign("id",$rowa[id] ); }//end while /* $query="SELECT * FROM `nuke_poll_desc` WHERE in_index='1' limit 0,1"; //echo"$query"; $result=mysql_query($query); while($rows=mysql_fetch_array($result)){ $tpl->newBlock("poll"); $pollTitle=$rows[pollTitle]; //echo"$pollTitle"; $tpl->assign("polltitle",$pollTitle); $pollID=$rows[pollID]; $tpl->assign("poll_id",$pollID); } $query1="SELECT * FROM `nuke_poll_data` WHERE pollID='$pollID' and optionText !=''"; $result1=mysql_query($query1); while($rows1=mysql_fetch_array($result1)){ $tpl->newBlock("option_txt"); $voteID=$rows1[voteID]; $radio=""; $answer=$rows1[optionText]; $tpl->assign("radio",$radio); $tpl->assign("answer",$answer); } */ ///////////////////////////////////////النهاية من نظام الاستفتاء////////// /////////////////////////////اعطاء سماحية تغيير الستايل ///////////////////////////// $sql_add_S="SELECT `add_style` FROM `users` WHERE prev_id !='-100' limit 1"; $result_S=mysql_query($sql_add_S); $Num=mysql_num_rows($result_S); while($Row=mysql_fetch_array($result_S)){ $add_style=$Row[add_style]; } if($add_style=='2'){ //التعديل للجميع //$Forms1="
"; $Sql_Style="SELECT * FROM `style` WHERE 1"; $Result=mysql_query($Sql_Style); while($ROW=mysql_fetch_array($Result)){ $tpl->newBlock("add_style"); if($STYLE_SELECTED==$ROW[style_id]){$str="selected"; $tpl->assign("str",$str); }else{$str=""; $tpl->assign("str",$str); } $style_id=$ROW[style_id]; $tpl->assign("style_id",$style_id); $style_name=$ROW[style_name1]; $tpl->assign("style_name",$style_name); } }elseif($add_style=='1'){ //الاضافة للاعضاء if(isset($PREV)&&($PREV=='1')||($PREV=='2')||($PREV=='-100')){ //$tpl->assign("Forms1",$Forms1); //$optiones="