النتائج 1 إلى 2 من 2

الموضوع: مطلوب دالة الروابط الاعشوائيه

  1. #1

    مطلوب دالة الروابط الاعشوائيه



    السلام عليكم

    مطلوب دالة تظهر الروابط المواقع عشوائيه الموجودة في دليل المواقع وتتغير مع كل تحديث

    واريد كيف طريقة تركيبها في دليل مواقع نواحي الجديد



    وهذا الملف الذي اريد عمل فيه كود المواقع العشوائية :



    كود 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();
    ?>








  2. #2
    عضو نشيط
    تاريخ التسجيل
    May 2008
    المشاركات
    151


    جرب هذا وقولي إذا نفع (ماجربته) :
    كود PHP:
    $query mysql_query("SELECT * FROM dalil_site WHERE id IN (SELECT id FROM dalil_site)");
    $link mysql_fetch_array($query);
    $rand rand(0count($site_list)-1);
    echo 
    "<a href=\"" $link['site_link'] . "\">" $link['site_name'] . "</a>; 
    أو شوف هالكود ممكن يفيدك :
    كود PHP:
    $site_list = array(
    array(
    "سوالف سوفت""http://www.swalif.net"),
    array(
    "Google""http://www.google.com"),
    array(
    "W3C""http://www.w3.org"),
    );

    $rand rand(0count($site_list)-1);
    echo 
    "<a href=\"" $site_list[$rand][1] . "\">" $site_list[$rand][0] . "</a>; 











ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض