הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   עזרה לגבי מערכת PHP (https://hosts.co.il/forums/showthread.php?t=102724)

EBSites 28-02-13 17:43

אני קצת מסתבך עם ה- else
זה עדיין מציג לי כמה שגיאות. תוכל לעזור לי עם זה?

Gmedia 28-02-13 21:28

אילו שגיאות מוצגות לך כרגע?

EBSites 01-03-13 02:20

Gmedia יש אפשרות לצור איתך קשר?
אשמח שנדבר על זה.

אם תוכל לעזור לי פה לתקן את הקוד עוד יותר טוב!


ציטוט:

<table cellpadding="0" cellspacing="0" class="page" align="center" width="780">
<tr><td class="catitlepage">סרטונים</td></tr>
<tr>
<td class="pagesize" width="30%">

<?php
require_once("config.php");
require_once("XXX.inc");
?>
<?php
$query = "select * from catgs";
$result = mysql_query($query) or die("Query failed: ".mysql_error());
while($row = mysql_fetch_array($result)){
echo "<a target='_top' href='clips.php?catgid=".$row['id']."'>"
.$row['catgname']."</a> | ";
}
echo "<a href='index.php'></a></div>";
$query = "select * from articles order by id desc";
$result = mysql_query($query) or die("Query failed: ".mysql_error());
if($catgid!=null){
if($aid==null){
?>
<br>
<div style="width: 780; height: 5px"><font style="font-size: 1pt"><br></font></div>
<table cellpadding="0" cellspacing="0" class="msglist">
<?php
if($pid==null)$pid=1;
$check = 1;
$count = 0;
$count2= 0;
while($row = mysql_fetch_array($result)){
if(!strcmp($row["catgnum"],$catgid) && !strcmp($row['rank'],"2")){
$check=0;
if($count2<(7*$pid)-7){
$count2++;
}
else if($count!=0 &&$count==(7*$pid)-7)break;
else if($count==7*$pid)break;
else{
$count++;
?>
<table cellpadding="0" cellspacing="0" width="780">
<tr>

<td width="15%">
<IMG SRC="<?php echo $row['image'] ?>" style="border: solid 5px #FFFFFF" width="90" height="90"></td>
<td width="100%" style="border-style: none; border-width: medium">
<a target="_top" href="clips.php?catgid=<?php echo $row['catgnum'] ?>&aid=<?php echo $row['id'] ?>"><b><?php echo $row["title"] ?></b></a>
</font>
&nbsp;<font size="1" color="black" face="arial"><?php echo "/ נוסף בתאריך ובשעה: ".$row["date"] ?></font></br>
<font size="2" color="black" face="arial">
<?php echo $row['discription'] ?></font></br></td>

</tr></table>
<hr class="hr" size="1">
<?php
}
}
}
if($check){
echo "אין סרטונים במאגר זה.";
}
$query = "select * from articles";
$result = mysql_query($query) or die("Query failed: ".mysql_error());
$count = 0;
$count2= 1;
echo "<tr><td colspan='2' align='center'>| ";
while($row = mysql_fetch_array($result)){
if(!strcmp($row["catgnum"],$catgid) && !strcmp($row['rank'],"2")){
$count++;
if($count==1){
echo "<a target='_top' href='{$_SERVER['PHP_SELF']}?catgid=".$catgid."&pid=".$count2."'>"
.$count2."</a> | ";
$count2++;
}
if($count==7){
$count=0;
}
}
}
echo "</td></tr>";
}
else if($aid!=null){
?>
<table align="center" cellpadding="0" cellspacing="0">
<?php
$check = 1;
while($row = mysql_fetch_array($result)){
if(!strcmp($row["id"],$aid) && !strcmp($row["catgnum"],$catgid)){
?>
<table cellpadding="0" cellspacing="0" width="780">
<tr>
<td><br></td>
</tr>
<tr>
<td align="center" width="100%">
<b><font size="4" color="black" face="arial"><?php echo $row["title"] ?></b></font></br>
&nbsp;<font size="1" color="black" face="arial"><?php echo "נוסף בתאריך ובשעה: ".$row["date"] ?></font></br><br>
<script type="text/javascript" src="../media/swfobject.js"></script>
<div id="flashcontent">המחשב שלך לא תומך בפלאש</div>
<script type="text/javascript">
var so = new SWFObject("http://albums.tapuz.co.il/albums/flixBlogPlayer.swf?autoStart=false&MID=<?php echo breakLongWords($row["article"],70,"") ?>", "menu", "458", "384", "7", "#FFF");
so.write("flashcontent");</script></td>

</tr></table>
<p>
<table width="458" align="center">
<tr>
<td width="120"><font size="2">קישור לסרטון:</font></td>
<td><input class="clips" type="text" value="http://www.pclick.co.il/clips/clips.php?catgid=<?php echo $row['catgnum'] ?>&aid=<?php echo $row['id'] ?>" dir="ltr"></td>
</tr>
</table>

</table>
</div>

</td>
</tr>
<?php
$check=0;
break;
}
}
if($check){
echo "<br>העמוד המבוקש אינו קיים";
}
}
}
?>
</table>

</td>
</tr>
</table>

Gmedia 02-03-13 01:14

Query failed: Access denied for user 'ODBC'@'localhost' (using password: NO)

זה רושם את זה. מסד הנתונים עלה בוודאות לשרת כמו שצריך?

EBSites 02-03-13 21:07

כמובן, זאת לא הבעיה.
זה מציג לי שיש נתונים אבל לא פותח לי אותם בדף שאני רוצה.

בעיה, לא יודע איך לסדר את זה.


כל הזמנים הם GMT +2. הזמן כעת הוא 20:43.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ