Добрый день, есть такой код.
На одном серваке он работает номально на другом нет... т.е. не понимает
когда надо перейти внутри страницы на
Код |
if ($do==2) |
Код |
<? $menu=0; include "./config/config.php"; include "./segment/top.inc"; ?> <? if(!isset($do)): $do=1; endif; if ($do==1){ $sql="select * from bd_company order by cat_index LIMIT 0, 1 "; $result=mysql_query($sql); while($row1=mysql_fetch_array($result)) { $cat_id_act=$row1["cat_id"]; $title_act=$row1["title"]; $file=$row1["file"]; $cat_index=$row1["cat_index"]; } $sql="select * from bd_company order by cat_index"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { $cat_id=$row["cat_id"]; $title=$row["title"]; $file=$row["file"]; $id_ctagot=$row["id_categot"]; if ($cat_id == $cat_id_act){ echo "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20' class='podrbg_off'></td><td> <span class='podr_off'>$title</span> </td></tr></table></br>"; } else{ echo "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'></td><td> <a href='company.php?do=2&cat_id=$cat_id' class='podr_in'>$title </td></tr></table></br>"; } } echo "</td><td width='40'></td><td valign='top'>"; $sql2="select * from bd_company WHERE cat_id='$cat_id_act' LIMIT 0, 1"; $result2=mysql_query($sql2); while($row2=mysql_fetch_array($result2)) { $cat_id=$row2["cat_id"]; $title=$row2["title"]; $file=$row2["file"]; $id_ctagot=$row2["id_categot"]; echo "<title>О компании - $title</title>"; include "./company/$file"; } } if ($do==2){ $cat_id_act=$cat_id; $sql="select * from bd_company order by cat_index"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { $cat_id=$row["cat_id"]; $title=$row["title"]; $file=$row["file"]; $id_ctagot=$row["id_categot"]; if ($cat_id == $cat_id_act){ echo "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20' class='podrbg_off'></td><td> <span class='podr_off'>$title</span> </td></tr></table></br>"; } else{ echo "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'></td><td> <a href='company.php?do=2&cat_id=$cat_id' class='podr_in'>$title </td></tr></table></br>"; } } echo "</td><td width='40'></td><td valign='top'>"; $sql2="select * from bd_company WHERE cat_id='$cat_id_act' LIMIT 0, 1"; $result2=mysql_query($sql2); while($row2=mysql_fetch_array($result2)) { $cat_id=$row2["cat_id"]; $title=$row2["title"]; $file=$row2["file"]; $id_ctagot=$row2["id_categot"]; echo "<title>О компании - $title</title>"; include "./company/$file"; } } ?> </td></tr> </table> <!-- --> </td> <td width='190' align='center' valign='top'><img src='./images/icon.jpg'></td></tr> </table> </body> </html> |
PHP |
if(!isset($do)): |
Цитата (waldicom @ 6.04.2009 - 09:35) | ||
Причин может быть много, возможно проблема в настройках php... пысы. Это что за мегачит?
|