السلام عليكم
مطلوب دالة تظهر الروابط المواقع عشوائيه الموجودة في دليل المواقع وتتغير مع كل تحديث
واريد كيف طريقة تركيبها في دليل مواقع نواحي الجديد
وهذا الملف الذي اريد عمل فيه كود المواقع العشوائية :
كود PHP:
<?php
include("config.php");
include("function.php");
include("templates/template.php");
$id = intval($_GET["id"]);
clean_value($id);
$Sql = mysql_query("select * from dlil_site where id='$id'");
$Row = mysql_fetch_array($Sql);
if (!$Row)
{
error();
exit;
}
$Row['title'] = stripslashes($Row['title']);
$Row['title'] = htmlspecialchars($Row['title']);
$Row['url'] = stripslashes($Row['url']);
$Row['url'] = htmlspecialchars($Row['url']);
$t = $Row['url'];
$t = str_replace("http://","",$t);
$t = str_replace("http://www.","",$t);
$t = str_replace("http://www","",$t);
$t = str_replace("www.","",$t);
$t = str_replace("www","",$t);
$Row['metadescription'] = stripslashes($Row['metadescription']);
$Row['metadescription'] = htmlspecialchars($Row['metadescription']);
$Row['metakeywords'] = stripslashes($Row['metakeywords']);
$Row['metakeywords'] = htmlspecialchars($Row['metakeywords']);
$Row['country'] = stripslashes($Row['country']);
$Row['country'] = htmlspecialchars($Row['country']);
$Row['yourname'] = stripslashes($Row['yourname']);
$Row['yourname'] = htmlspecialchars($Row['yourname']);
$Row['yourmail'] = stripslashes($Row['yourmail']);
$Row['yourmail'] = htmlspecialchars($Row['yourmail']);
$d = date("j/n/Y",$Row['date']);
if($Row['metadescription'] == ""){
$meta1 = $t;
}else{
$meta1 = $Row['metadescription'];
}
if($Row['metakeywords'] == ""){
$meta2 = $t;
}else{
$meta2 = $Row['metakeywords'];
}
if($Row['metadescription'] == $Row['title']){
$meta1 = $t;
}else{
$meta1 = $Row['metadescription'];
}
if($Row['metakeywords'] == $Row['title']){
$meta2 = $t;
}else{
$meta2 = $Row['metakeywords'];
}
$img = "<a href='".$Row['url']."' title='".$Row['url']."'><img src='http://open.thumbshots.org/image.pxf?url=".$Row['url']."' border='0' vspace='0' hspace='0'>";
$p = "» ".$Row['title']."<div dir='ltr' align='right'><a target='_blank' class='aa' href='site.php?siteid=".$Row['id']."'>".$Row['url']."</a></div>".$f."";
$sql2 = @mysql_query("update dlil_site set vis=vis+1 where id='$id'") or die ("Query failed4");
$Sqlx = mysql_query("select * from dlil_catgory where id='".$Row['cat']."'");
$Rowx = mysql_fetch_array($Sqlx);
$Rowx['title'] = stripslashes($Rowx['title']);
$Rowx['title'] = htmlspecialchars($Rowx['title']);
if($htmlorphp==1){
$sxx = "section-".$Rowx['id'].".html";
}else{
$sxx = "section.php?id=".$Rowx['id']."";
}
tpl_header($Row['title']);
echo "<div align='center'>
<center>
<table border='0' style='border-collapse: collapse' width='99%' id='AutoNumber10' cellpadding='2'>
<tr>
<td width='100%' valign='top'>";
echo "<div align='center'>
<center>
<table class='xtable' width='98%' id='AutoNumber1555'>
<tr>
<td width='100%' colspan='5' class='xtr' align='center'>معلومات الموقع ".$Row['title']."</td>
</tr>
<tr>
<td width='20%' class='xtr'>» عنوان الموقع</td>
<td width='80%' class='xtd'><a target='_blank' class='aa' href='".$Row['url']."'>".$Row['url']."</a></td>
</tr>
<tr>
<td width='20%' class='xtr'>» زيارات الموقع</td>
<td width='80%' class='xtd'>".$Row['vis']."</td>
</tr>
<tr>
<td width='20%' class='xtr'>» وصف الموقع 1</td>
<td width='80%' class='xtd'>".$Row['metadescription']."</td>
</tr>
<tr>
<td width='20%' class='xtr'>» وصف الموقع 2</td>
<td width='80%' class='xtd'>".$Row['metakeywords']."</td>
</tr>
<tr>
<td width='20%' class='xtr'>» تقييم الموقع</td>
<td width='80%' class='xtd'>
<form name='vbform' method='POST' action='rate.php' style='margin-top: 0; margin-bottom: 0'>
<input type='hidden' name='id' value='$id'>
التقييم ".$Row['rate']." الأصوات ".$Row['count']." شخص <select size='1' name='rate'>
<option value='1' selected>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
</select> <input type='submit' value=' تقييم ' name='B1'>
</form>
</td>
</tr>
<tr>
<td width='20%' class='xtr'>» الموقع في جوجل</td>
<td width='80%' class='xtd'><a target='_blank' href='http://www.google.com/search?q=site:".$Row['url']."'>الصفحات</a> - <a target='_blank' href='http://www.google.com/search?q=link:".$Row['url']."'>الروابط</a> - <a target='_blank' href='http://www.google.com/search?q=cache:".$Row['url']."'>الكاش</a></td>
</tr>
<tr>
<td width='20%' class='xtr'>» صورة الموقع</td>
<td width='80%' class='xtd'>$img</td>
</tr>
<tr>
<td width='20%' class='xtr'>» القسم الخاص بالموقع</td>
<td width='80%' class='xtd'><a class='aa' href='$sxx'>".$Rowx['title']."</a></td>
</tr>
</table>
</center>
</div>";
echo "</td></tr></table></center></div>";
tpl_footer();
?>