View Single Post
ישן 18-04-07, 20:11   # 1
Gold-System
Permanently Banned
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 401

Gold-System לא מחובר  

בעיה בקובץ מסוים -

זה הקובץ -
index2.php

קוד:
<html dir="rtl">
<title>
goldsystem.co.il - פאנל ניהול אתר | ניהול דפים
</title>
<?
include "db.php";

if(!$_GET['page'])   
$page = '1';   
else    
$page = $_GET['page'];    

$per = 5;
$end=$per*$page;
$start = $per*($page - 1);  

$select_comments = mysql_query("SELECT * FROM `links` ORDER by id DESC LIMIT $start,$end");
if(@mysql_num_rows($select_comments) == 0){
  echo ""
<p align='center'><font face='Arial' size='2'>לא נמצאו דפים במערכת!</font></p>
<p align='center'></p>
<p align='center'><b><font face='Arial' size='2'><a href='add_link.php'>
<font color='#000000'>הוסף דף >></font></a></font></b></p>
";
}else { 
     while($row = mysql_fetch_array($select_comments)){
    $id = ($row['id']); 
     $link = ($row['link']);
     $name = ($row['name']);

         echo <<< EOD



<html dir="rtl">

<table border="0" width="100%" style="padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
	<tr>
		<td width="26" bgcolor="#EBEBEB">
		<p align="center"><b><font face="Arial">
		ID</font></b></td>
                <td width="218">
		<p align="center"><b><font face="Arial">שם האתר</font></b></td>
		<td width="238" bgcolor="#EBEBEB">
		<p align="center"><b><font face="Arial">תוכן</font></b></td>
                <td width="218">
		<p align="center"><b><font face="Arial">אפשרויות</font></b></td>
		<td bgcolor="#EBEBEB" width="48">
		<p align="center"><b><font face="Arial">
  </tr> 
</table> 
<table border="0" width="100%"> 
    <tr> 
        <td width="28"> 
        <p align="center"><font face="Arial">$id</font></td> 
        <td width="218"> 
        <p align="center"><font face="Arial">&nbsp;$name</font></td> 
        <td width="236"> 
        <p align="center"><font face="Arial">&nbsp;$link</font></td> 
        <td> 
        <p align="center"><font face="Arial"><b> 
        <a target="_blank" href="http://$link"><font color="#000000">כנס לאתר</font></a></b>&nbsp;  
        |&nbsp; </font><font face="Arial"><a href="edit.php?id=$id"> 
        <font color="#000000"> 
        ערוך</font></a>&nbsp;&nbsp; |&nbsp;&nbsp; <a href="delete.php?id=$id"> 
        <font color="#000000">מחק</font></a></font></td> 
    </tr> 
</table>


EOD;
}}
$query = mysql_query("SELECT * FROM `links`");    
$number = mysql_num_rows($query); 
$pages = ceil($number / 5);   
for($x = 1; $x<=$pages; $x++)   
{   
echo "
<center>
		<a href='index.php?page={$x}'>$x</a>
		</center>
";   
}   

?>
פשוט מציג דף ריק!
מה הבעיה?

תודה
  Reply With Quote