prepare(); $tpl->assign( "content", "$close_comment"); $tpl->printToScreen(); include_once( "footer.php" ); exit; } /**************** الصفحات الاضافية ****************/ if (isset($got)) { $sql=("select * from pages where title_english='$got'"); $result=mysql_query($sql); $num_pages=mysql_num_rows($result); if ($num_pages < 1 ) //لا يوجد نتائج نعود للرئيسية { echo "No Found Page"; } else //الصفحة موجود ننفذ { $row = mysql_fetch_array($result); extract($row); include ('function.php'); include_once( "header.php" ); include_once( "right.php" ); $tpl = new TemplatePower( "template/$temp_name/templet.htm" ); $tpl->prepare(); if(!empty($pic)) { $pic="files/pages/$pic"; } else //لو صورة مرفوعة { $pic="./images/page.jpg"; } $tpl->assign( "pic", "$pic" ); $tpl->assign( "title_page", "$title_page"); $tpl->assign( "content", "$content"); $tpl->printToScreen(); include_once( "footer.php" ); } } /************************** الصفحات العادية **************************/ // elseif ($go=="reg") { include ('reg.php'); } //البوم الصور elseif ($go=="photo") { include ('photo.php'); } //البوم الصور elseif ($go=="photo_user") { include ('photo_user.php'); } // elseif ($go=="contact") { include ('contact.php'); } // elseif ($go=="sera") { include ('sera.php'); } // elseif ($go=="account") { include ('account.php'); } // elseif ($go=="search") { include ('search.php'); } elseif ($go=="news") { include ('news.php'); } elseif ($go=="article") { include ('article.php'); } elseif ($go=="Products") { include ('Products.php'); } elseif ($go=="msg") { include ('msg.php'); } // // elseif ($go=="comment") { include ('comment.php'); } elseif ($go=="sound") { include ('sound.php'); } elseif ($go=="video") { include ('video.php'); } elseif ($go=="statistics") { include ('statistics.php'); } elseif ($go=="archive") { include ('archive.php'); } elseif ($go=="search") { include ('search.php'); } elseif ($go=="goto") { include ('goto.php'); } elseif ($go=="usercp") { include ('usercp.php'); } elseif ($go=="clients") { include ('clients.php'); } elseif ($go=="Services") { include ('Services.php'); } elseif ($go=="Isuues") { include ('Isuues.php'); } /********************* الرئيسيـــــــة *********************/ else { include ('function.php'); include_once( "template/class.TemplatePower.inc.php" ); $showLeftHome = 1; $showSleader=1; include_once( "header.php" ); include_once( "right.php" ); /************************ الوسط *****************************/ $tpl = new TemplatePower( "template/$temp_name/body.htm" ); $tpl->prepare(); ads(5,$cutr,0,0); $tpl->assignglobal( "ads5", "$ads" ); $user=mysql_query("select * from article where show_home=1 ORDER BY id_article desc limit 5,3"); $num=mysql_num_rows($user); if ($num < 1) { $tpl->newBlock("no_article"); } else { while ($row=mysql_fetch_array($user)) { extract($row); $tpl->newBlock("article"); $tpl->assign( "id_article", "$id_article" ); $tpl->assign( "title", "$title" ); $tpl->assign( "first", strip_tags($first) ); $date=date('d/m/Y',$date_post); $tpl->assign( "date", "$date" ); //كود عشان لو مفيش صورة if (empty($pic) ) { $pic = "images/no_pic.gif"; // ضع هنا عنوان وصلة الصورة الافتراضيه } else { if(stristr($pic,http)) { $pic =$pic; } else //لو صورة مرفوعة { $tpl->assign( "link_photo", "thumb/$link_photo" ); $pic="files/pic_article/$pic"; } } $tpl->assign( "pic", "$pic" ); } } $sqlw=mysql_query("select * from writer where show_home=1"); //where show_home=1 limit 3 $i=1; while($row=mysql_fetch_array($sqlw)) { extract($row); $tpl->newBlock("Sec"); $tpl->assign( "name_writer", "$name_writer" ); $tpl->assign( "id_writer", "$id_writer" ); if($i == 3) { ads(6,$cutr,0,0); $tpl->assign( "ads6", "
$ads
" ); } $i++; $user=mysql_query("select * from article where id_writer=$id_writer ORDER BY id_article desc limit 1"); $num=mysql_num_rows($user); if ($num < 1) { $tpl->newBlock("no_article"); } else { while ($row=mysql_fetch_array($user)) { extract($row); $tpl->newBlock("articleSec"); $tpl->assign( "id_article", "$id_article" ); $tpl->assign( "title", "$title" ); $tpl->assign( "id_writer", "$id_writer" ); $tpl->assign( "first", strip_tags($first) ); $date=date('d/m/Y',$date_post); $tpl->assign( "date", "$date" ); //كود عشان لو مفيش صورة if (empty($pic) ) { $pic = "images/no_pic.gif"; // ضع هنا عنوان وصلة الصورة الافتراضيه } else { if(stristr($pic,http)) { $pic =$pic; } else //لو صورة مرفوعة { $tpl->assign( "link_photo", "thumb/$link_photo" ); $pic="files/pic_article/$pic"; } } $tpl->assign( "pic", "$pic" ); } } } ads(7,$cutr,0,0); $tpl->assignglobal( "ads7", "$ads" ); $sql="select * from photo ORDER BY id_photo desc limit 10"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { extract($row); $tpl->newBlock("sleader_photo"); $tpl->assign( "id_photo", "$id_photo" ); $tpl->assign( "name_photo", "$name_photo" ); $tpl->assign( "link", "index.php?go=photo&photo=do&id=$id_photo" ); if(stristr($link_photo,http)) { $tpl->assign( "link_photo", "$link_photo" ); } else //لو صورة مرفوعة { $tpl->assign( "link_photo", "files/thumb/$link_photo" ); $tpl->assign( "link_Main", "files/pic/$link_photo" ); } $tpl->assign( "n", $n ); $tpl->newBlock("sleader_photo2"); $tpl->assign( "id_photo", "$id_photo" ); $tpl->assign( "name_photo", "$name_photo" ); if(stristr($link_photo,http)) { $tpl->assign( "link_photo", "$link_photo" ); } else //لو صورة مرفوعة { $tpl->assign( "link_photo", "files/thumb/$link_photo" ); $tpl->assign( "link_Main", "files/pic/$link_photo" ); } } $tpl->printToScreen(); // include_once( "left.php" ); include_once( "footer.php" ); } ?>