Jump to content

PHP Error Minor


batherst

Recommended Posts

Hi All,

 

I have been handed a site from a friend of mine to fix as there were a few errors on it. I have only had very little experience with php coding and believe im doing well so far as i only have one more error to rectify on this particular site. Is any one familiar with the following error codes and how to resolve them?

 

 

Warning: include(list_.inc.php) [function.include]: failed to open stream: No such file or directory in /home/user/public_html/list.php on line 13

 

Warning: include(list_.inc.php) [function.include]: failed to open stream: No such file or directory in /home/user/public_html/list.php on line 13

 

Warning: include() [function.include]: Failed opening 'list_.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/list.php on line 13

 

Iv done a bit of research and to me it doesn't seem like a huge fix and i think its something i am capable of doing myself i just need a bit of guidance. Any help greatly appreciated.

 

Michael :)

Link to comment
Share on other sites

Hi mikesta707,

 

Thanks for your reply. I have the code if you would like to have a look. Iv copied from line 46 which is displaying the error right to the bottom of the document. can you see any thing wrong with that section?

 

include "list_$row[ca_type].inc.php";

?>

        <form>

        </form>

      <td><?

include "right.inc.php";

include "tail.inc.php";

?>

 

 

The actual errors for this site are:

Warning: include(list_.inc.php) [function.include]: failed to open stream: No such file or directory in /home/artformm/public_html/shop/list.php on line 46

 

Warning: include(list_.inc.php) [function.include]: failed to open stream: No such file or directory in /home/artformm/public_html/shop/list.php on line 46

 

Warning: include() [function.include]: Failed opening 'list_.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/artformm/public_html/shop/list.php on line 46

Link to comment
Share on other sites

Without seeing the code that populates that variable, all I can do is guess (based on the syntax) that a database query is either failing or returning an empty results set.

 

Thanks. Iv discovered the error occurred after the current host moved servers. So im not sure if that makes it any different to what has caused it.

Link to comment
Share on other sites

If it doesnt rain it pours. I managed to get the first error sorted out and now its presenting another error, please see below and let me know if you have any ideas on a fix:

 

Fatal error: Cannot redeclare alert_msg() (previously declared in /home/artformm/public_html/shop/lib.inc.php:50) in /home/artformm/public_html/shop/lib.inc.php on line 66

 

<?
if (!isset($g_rel_dir)) $g_rel_dir = ".";

$f = @fopen("$g_rel_dir/db_config.php", "r") or alert_msg("Installing shop.", "$g_rel_dir/install/");
$throw = fgets($f, 128);
$fs3_mysql_host = str_replace("\n", "", fgets($f, 128));
$fs3_mysql_user = str_replace("\n", "", fgets($f, 128));
$fs3_mysql_pass = str_replace("\n", "", fgets($f, 128));
$fs3_mysql_db   = str_replace("\n", "", fgets($f, 128));
fclose($f);

$connect = mysql_connect($fs3_mysql_host, $fs3_mysql_user, $fs3_mysql_pass);
mysql_select_db($fs3_mysql_db, $connect);

include "$g_rel_dir/config.inc.php";
include "$g_rel_dir/user_config.inc.php";


$curdate = date("Y-m-d", time());
$curtime = date("H:i:s", time());
$now     = $curdate . " " . $curtime;

//-------------------------------------------------------------------------------------------------
// SESSION
//-------------------------------------------------------------------------------------------------
session_save_path("$g_rel_dir/$g_session_dir");

if($SESSION_CACHE_LIMITER)
    session_cache_limiter($SESSION_CACHE_LIMITER);
else
    session_cache_limiter('nocache, must-revalidate');

session_start();

$sql = " select cfg_id, cfg_sel_value, cfg_value from $config_table ";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
  $var = $row['cfg_id'];
  if($row['cfg_sel_value'])
    $$var = $row['cfg_sel_value'];
  else
    $$var = $row['cfg_value'];
}
mysql_free_result($result);

$g_dir = $g_domain;
if ($g_freeshop3_dir != "")
    $g_dir .= "/" . $g_freeshop3_dir;

function alert_msg($msg, $url="") {
    global $HTTP_REFERER, $g_dir, $g_homepage_index;

    if ($url == "")
    {
        $url = "history.go(-1)";
    }
    else
        $url = "document.location.href = '$url'";

    if ($msg != "")
        echo "<script language='javascript'>alert('$msg');$url;</script>";
    else
        echo "<script language='javascript'>$url;</script>";

    exit;
}

function get_it_name($it_id, $link="N") {
    global $item_table, $g_domain, $g_freeshop_dir, $g_dir;
    $sql = " select it_name from $item_table where it_id = '$it_id' ";
    $result = mysql_query($sql);
    $row = mysql_fetch_row($result);
    mysql_free_result($result);
    $str = stripslashes($row[0]);

    return $str;
}

function check_file_ext($filename, $allow_ext)
{
if ($filename == "") return true;
$ext = get_file_ext($filename);
$allow_ext = explode(";", $allow_ext);
$sw_allow_ext = false;
for ($i=0; $i<count($allow_ext); $i++)
    	if ($ext == $allow_ext[$i]) 
    	{
        	$sw_allow_ext = true;
        	break;
        }
    return $sw_allow_ext;
}
//-------------------------------------------------------------------------------------------------
function upload_file($srcfile, $destfile, $dir)
{
if ($destfile == "") return false;
@move_uploaded_file($srcfile, "$dir/$destfile");
@chmod("$dir/$destfile", 0666);
return true;
}
//-------------------------------------------------------------------------------------------------
function get_file_ext($filename)
{
if ($filename == "") return "";
$type = explode(".", $filename);
$ext = strtolower($type[count($type)-1]);
return $ext;
}
//-------------------------------------------------------------------------------------------------
function htmlspecialchars2($str)
{
    $trans = array("\"" => "&#034;", "'" => "&#039;", "<"=>"&#060;", ">"=>"&#062;");
    $str = strtr($str, $trans);
    return $str;
}
//----------------------------------------------------------------------------------------------------------------------------
function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $charset="utf-8", $cc="", $bcc="") {

    $charset = ($charset != "") ? "charset=$charset" : "";
    $fname .= "";
    $header  = "Return-Path: <$fmail>\n";
    $header .= "From: $fname <$fmail>\n";
    $header .= "Reply-To: <$fmail>\n";
    if ($cc)  $header .= "Cc: $cc\n";
    if ($bcc) $header .= "Bcc: $bcc\n";
    $header .= "MIME-Version: 1.0\n";

    if ($type) {
        $header .= "Content-Type: TEXT/HTML; $charset\n";
        if ($type == 2)
            $content = nl2br($type);
    } else {
        $header .= "Content-Type: TEXT/PLAIN; $charset\n";
        $content = stripslashes($content);
    }
    $header .= "Content-Transfer-Encoding: BASE64\n\n";
    $header .= chunk_split(base64_encode($content)) . "\n";

    if ($file != "") {
        foreach ($file as $f => $v) {
            $header .= "Content-Type: APPLICATION/OCTET-STREAM; name=\"$v[name]\"\n";
            $header .= "Content-Transfer-Encoding: BASE64\n";
            $header .= "Content-Disposition: inline; filename=\"$v[name]\"\n";
            $header .= "\n";
            $header .= "\n";
        }
    }
    @mail($to, $subject, "", $header);
}
//---------------------------------------------------------------------------------------------------------
function cutstr($msg, $cut_size, $tail="...") {
  if ($cut_size<=0) return $msg;

  $max_len = 70;
  if(strlen($msg) > $max_len)
    if(!eregi(" ", $msg))
      $msg = substr($msg,0,$max_len);

  for($i=0;$i<$cut_size;$i++)
    if(@ord($msg[$i])>127) $han++;
    else $eng++;

  $cut_size=$cut_size+(int)$han*0.6;

  $snow=1;
  for ($i=0;$i<strlen($msg);$i++) {
    if ($snow>$cut_size) { return $snowtmp.$tail;}
    if (ord($msg[$i])<=127) {
      $snowtmp.= $msg[$i];
      if ($snow%$cut_size==0) { return $snowtmp.$tail; }
    } else {
      if ($snow%$cut_size==0) { return $snowtmp.$tail; }
      $snowtmp.=$msg[$i].$msg[++$i];
      $snow++;
    }
    $snow++;
  }
  return $snowtmp;
}
//-------------------------------------------------------------------------------------------------
function continue_cut_str($str, $len=80)
{
        $pattern = "[^ \n<>]{".$len."}";
    return eregi_replace($pattern, "\\0\n", $str);
}
//-------------------------------------------------------------------------------------------------
function fdatetime($dt) {
  $s = substr($dt,5,11);
  if($s=="00-00 00:00") $s = " ";
  return $s;
}
//-------------------------------------------------------------------------------------------------

$mouseover = "class=mout onmouseout=this.className='mout' onmouseover=this.className='mover'";

function recusive_level($level, $ca_sen_id) {
    global $category_table, $item_table, $mouseover;

    $sql = " select * from $category_table
              where ca_level = '$level'
                and ca_sen_id = '$ca_sen_id'
              order by ca_rank desc, ca_name, ca_id ";
    $result = mysql_query($sql) or die (mysql_error());
    while ($row = mysql_fetch_array($result)) {
        $s_level = "";
        if ($row[ca_level]) {
            $s_level = "+";
            for ($i=1; $i<$row[ca_level]; $i++) $s_level = "   " . $s_level;
        }

        $s_add = "<a href='category_form.php?j=a&ca_id=$row[ca_id]&level=$row[ca_level]'>Add</a>";
        $s_mod = "<a href='category_form.php?j=u&ca_id=$row[ca_id]'>Edit</a>";
        $s_del = "<a href=\"javascript:del('category_update.php?j=d&ca_id=$row[ca_id]');\">Remove</a>";

        $sql = " select count(it_id) from $item_table where ca_id = '$row[ca_id]' ";
        $result1 = mysql_query($sql);
        $n_item_cnt = mysql_result($result1, 0, 0);

        echo "
        <tr $mouseover>
        <td align=left>$s_level $row[ca_name]</td>
        <td align=center>$row[ca_level]</td>
        <td align=center>$n_item_cnt</td>
	<td align=center>$row[ca_type]</td>
        <td align=center>$row[ca_rank]</td>
        <td align=center>$s_add $s_mod $s_del</td>
        </tr>";

        recusive_level($row[ca_level]+1, $row[ca_id]);
    }
    return;
  }
//------------------------------------------------------------------------------------------------------------
function recursion_ca_id($ca_id, &$whereStr)
{
        global $category_table;

    $sql = " select ca_name, ca_sen_id from $category_table where ca_id = '$ca_id' and ca_rank >= 0 ";
    $result = mysql_query($sql) or die(mysql_error());
    $row = mysql_fetch_array($result);
    $whereStr = " » <a href='list.php?ca_id=$ca_id'>$row[ca_name]</a>" . $whereStr;
    if (!mysql_num_rows($result)) return $whereStr;
    if ($row[ca_sen_id] == 0) return $whereStr;
    recursion_ca_id($row[ca_sen_id], $whereStr);
}
//----------------------------------------------------------------------------------------------------
function sel_ca_id($level, $ancestor) {
    global $category_table, $item_table, $s_ca_id;

    $sql = " select * from $category_table
              where ca_level = '$level'
                and ca_sen_id = '$ancestor'
              order by ca_rank desc, ca_name, ca_id ";
    $result = mysql_query($sql) or die (mysql_error());
    while ($row = mysql_fetch_array($result)) {
        $s_level = "";
        if ($row[ca_level]) {
            $s_level = "+";
            for ($i=1; $i<$row[ca_level]; $i++) $s_level = "   " . $s_level;
        }

        $s_ca_id .= "<option value='$row[ca_id]'>$s_level $row[ca_name]";

        sel_ca_id($row[ca_level]+1, $row[ca_id]);
    }
    return;
  }
//----------------------------------------------------------------------------------
function get_it_image($img,$height="",$width="") {
global $g_item_dir, $g_skin_dir, $g_dir;

$sheight = "";
    if ($height) $sheight = " height='$height' ";
if (file_exists("$g_item_dir/$img") == true && $img != "")

    	$str = "<img src='show_image.php?filename=$g_item_dir/$img&width=$width&height=$height' style='border:0px;margin:0px 13px 13px 13px'>";
    else
        $str = "<img src='show_image.php?filename=$g_skin_dir/no_image.gif&width=150&height=100' style='border:0px;margin:13px'>";

    return $str;
}
//--------------------------------------------------------------------------------------------
function get_it_large_image($img,$it_id) {
global $g_dir, $g_skin_dir, $g_item_dir;

    if (file_exists("$g_item_dir/$img") == true && $img != "")
    {
        $size = getimagesize("$g_item_dir/$img");
        $width = $size[0];
        $height = $size[1];
        $str = "<a href='".$g_item_dir."/".$img."' rel='lightbox'>View Full Image</a>";
    }
    else
        $str = "";
    return $str;
}
//---------------------------------------------------------------------------------------------------
function get_it_image_large($img,$height="",$width="") {
global $g_item_dir, $g_skin_dir, $g_dir;

$sheight = "";
    if ($height) $sheight = " height='$height' ";
if (file_exists("$g_item_dir/$img") == true && $img != "")

    	$str = "<a href='$g_item_dir/$img' rel='lightbox[roadtrip]'><img src='show_image.php?filename=$g_item_dir/$img&width=$width&height=$height' style='border:0px;margin:0px 13px 13px 13px'></a>";
    else
        $str = "<img src='show_image.php?filename=$g_skin_dir/no_image.gif&width=150&height=100' style='border:0px;margin:13px'>";

    return $str;
}
//--------------------------------------------------------------------------------------------
function group_item($sel_item,$mod=3){
	 global $item_table, $category_table, $g_mb_id;

$sql = " select * from $item_table a, $category_table b
                  where a.ca_id = b.ca_id and a.it_group ='$sel_item' and b.ca_rank >= 0 and a.it_rank >= 0
			  and a.it_sell_use = 'Y'
			  order by a.ca_id,a.it_rank desc, a.it_id desc";
			  
$result      = mysql_query($sql) or die (mysql_error());

if(mysql_num_rows($result))
{
echo "<p>";
echo "<table width=100% cellpadding=0 cellspacing=0><tr>";
    $i=0;
    while(($row=mysql_fetch_array($result)) && $i<3) {
        if($i%$mod==0 && $i!=0) echo "</tr><tr>";
        $i++;
        echo "<td width=25% valign=top><table width=100% cellpadding=0 cellspacing=0>";
	echo "<tr><td height=5></td></tr>";
        echo "<tr><td align=center style='padding:0px'><img src='img/spacer.gif' width='202px' height='1px'><br>";
        echo "<a href='item.php?ca_id=$row[ca_id]&it_id=$row[it_id]'>";
        echo get_it_image($row[it_limg],"176","155");
        echo "</a>";
        echo "</td></tr>";
        echo "<tr><td align=center style='padding:5px'>$row[it_name]</td></tr>";
        echo "<tr><td align=center style='padding:5px'><span class=amount><b>$".number_format(get_it_amount($row[it_id]),2,'.',',')."</b> + GST</span></td></tr>";
        echo "<tr><td height=15></td></tr>";
	echo "</table></td>";
	if($i<3) echo "<td background='img/dotsVert.gif'><img src='img/spacer.gif' width=1 height=1></td>";
    }

    while($i%$mod!=0)
    {
        $i++;
        echo "<td width=25%></td>";
    }
    echo "</tr>
          </table>";
}else
return false;

}
//--------------------------------------------------------------------------------------------------------------------------------

function get_it_amount($it_id)
{
    global $item_table,  $g_mb_id, $g_mb_level, $HTTP_SESSION_VARS ;

    $sql = " select it_mprice, it_price
               from $item_table
              where it_id = '$it_id' ";
    $result = mysql_query($sql);
    $it = mysql_fetch_array($result);
    mysql_free_result($result);

   if($g_mb_id !="")
        $amount = $it["it_mprice"];
   else
	$amount = $it["it_price"];

    return (float)$amount;
}
//----------------------------------------------------------------------------------------------
function gotourl($url) {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=$url\">";
    exit;
}
//------------------------------------------------------------------------------------------------
function get_skin_dir($val)
{
    global $g_rel_dir;
    $result_array = array();

    $dirname = "$g_rel_dir/$val/";
    $handle = opendir($dirname);
    while ($file = readdir($handle)) {

        if($file == "."||$file == "..") {
            continue;
        }

        if (is_dir($dirname.$file)) {
            $result_array[] = $file;
        }
    }
    closedir($handle);
    sort($result_array);

    return $result_array;
}
//--------------------------------------------------------------------------------------
function get_milage($g_mb_id){
        global $member_table;
    $sql = "select fm_milage from $member_table where fm_id='$g_mb_id' ";
        $result = mysql_query($sql) or die(mysql_error());
        $row = mysql_fetch_array($result);

        return " :  $row[fm_milage]   points";
}
//--------------------------------------------------------------------------------
function get_qa_name($fqa_table){
        global $qa_manager_table;
    $sql = "select fqa_subject from $qa_manager_table where fqa_name='$fqa_table' ";
        $result = mysql_query($sql) or die(mysql_error());
        $row = mysql_fetch_array($result);

        return $row[fqa_subject];
}
//-----------------------------------------------------------------------------------
function get_qa_table($fqa_id){
        global $qa_manager_table;
    $sql = "select fqa_name from $qa_manager_table where fqa_id='$fqa_id' ";
        $result = mysql_query($sql) or die(mysql_error());
        $row = mysql_fetch_array($result);

        return $row[fqa_name];
}
//----------------------------------------------------------------------------------------
function get_admin_pwd(){
        global $member_table, $g_level_admin;
    $sql = "select fm_pwd from $member_table where fm_level='$g_level_admin' ";
        $result = mysql_query($sql) or die(mysql_error());
        $row = mysql_fetch_array($result);

        return $row[fm_pwd];
}
//------------------------------------------------------------------------------------
function get_cart_count($g_on_uid)
{
    global $cart_table;
    $sql = " select count(ct_id) from $cart_table where on_uid = '$g_on_uid' ";
    $result = mysql_query($sql) or die(mysql_error());
    $row = mysql_fetch_row($result);
    $cnt = (int)$row[0];
    mysql_free_result($result);
    return $cnt;
}

function pagelisting($cur_page, $total_page, $n, $url) {
  $retValue = "<table border='0' cellpadding='0' cellspacing='0' class=p><tr>";
  if ($cur_page > 1) {
    $retValue .= "<td><a href='" . $url . "1'>TOP</a> </td>";
    $retValue .= "<td><a href='" . $url . ($cur_page-1) . "'>PREVIOUS</a></td>";
  } else {
    $retValue .= "<td> </td>";
    $retValue .= "<td> </td>";
  }
  $retValue .= "<td> ";
  $start_page = ( ( (int)( ($cur_page - 1 ) / 10 ) ) * 10 ) + 1;
  //echo (int)(($cur_page - 1) / 10);
  $end_page = $start_page + 9;
  if ($end_page >= $total_page) $end_page = $total_page;
  if ($start_page > 1) $retValue .= " <a href='" . $url . ($start_page-1) . "'>...</a> ";
  if ($total_page > 1)
    for ($k=$start_page;$k<=$end_page;$k++)
      if ($cur_page != $k) $retValue .= " <a href='$url$k'>$k</a> ";
      else $retValue .= " <b>$k</b> ";
  if ($total_page > $end_page) $retValue .= "<a href='" . $url . ($end_page+1) . "'>...</a> ";
  $retValue .= " </td>";
  if ($cur_page < $total_page) {
    $retValue .= "<td><a href='$url" . ($cur_page+1) . "'>NEXT</a> </td>";
    $retValue .= "<td><a href='$url$total_page'>LAST</a></td>";
  } else {
    $retValue .= "<td> </td>";
    $retValue .= "<td></td>";
  }
  $retValue .= "</tr></table>";
  return $retValue;
}
//------------------------------------------------------------------------------------
function get_unique_id($len=32)
{
    global $cart_table;

    $unique = false;
    srand(time());
    do
    {
        $uid = substr(md5(rand()),0,$len);

        $sql = "select COUNT(*) from $cart_table where on_uid = '$uid' ";
        $result = mysql_query($sql);
        $row = mysql_fetch_row($result);
        $cnt = $row[0];
        if ($cnt == 0)
            $unique = true;
        mysql_free_result($result);
    }
    while ($unique == false);

return $uid;
}

if($HTTP_SESSION_VARS[g_on_uid] == ""){
$g_on_uid = "";
$uid = get_unique_id();
session_register("g_on_uid");
$g_on_uid = $HTTP_SESSION_VARS[g_on_uid] = $uid;
}


function get_new_od_id()
{
global $order_table;

    @mysql_query(" LOCK TABLES $order_table READ, $order_table WRITE ");
    $date = date("ymdHis", time());    
    $sql = " select max(fo_id) from $order_table where SUBSTRING(fo_id, 1, 12) = '$date' ";
    $result = mysql_query($sql);
    $row = mysql_fetch_row($result);
    mysql_free_result($result);
    $fo_id = $row[0];
    if ($fo_id == 0)
        $fo_id = 1;
    else
    {
        $fo_id = (int)substr($fo_id, -4);
        $fo_id++;
    }
    $fo_id = $date . substr("0000" . $fo_id, -4);
    @mysql_query(" UNLOCK TABLES ");

    return $fo_id;
}


function subtitle_bar($title, $more="")
{
    $s = "
        <table width=100% cellpadding=0 cellspacing=0>
        <tr>
            <td width=80% align=left>
                <table border='0' cellspacing='0' cellpadding='0'>
                <tr>
                    <td width='8' height='35' background='./admin/img/subtitle_bar_l.gif'></td>
                    <td background='./admin/img/subtitle_bar_m.gif' class='subtitle_bar' width=><font color=white>$title</font></td>
                    <td width='10' background='./admin/img/subtitle_bar_r.gif'></td>
                </tr>
                </table>
            </td>
            <td width=20% align=right >";
    if ($more) {
        $s .= "<a href='$more'><img src='./admin/img/more.gif' border=0></a>";
    }
    $s .= "</td></tr></table>\n";

    return $s;
}


function subtitle_bar2($title, $more="")
{
    $s = "
        <table width=100% cellpadding=0 cellspacing=0>
        <tr>
            <td width=80% align=left>
                <table border='0' cellspacing='0' cellpadding='0'>
                <tr>
                    <td width='8' height='24' background='./img/subtitle_bar_l.gif'></td>
                    <td background='./img/subtitle_bar_m.gif' class='subtitle_bar' width=><font color=white>$title</font></td>
                    <td width='10' background='./img/subtitle_bar_r.gif'></td>
                </tr>
                </table>
            </td>
            <td width=20% align=right >";
    if ($more) {
        $s .= "<a href='$more'><img src='./img/more.gif' border=0></a>";
    }
    $s .= "</td></tr></table>\n";

    return $s;
}

function attach_file($filename, $file)
{
    $fp = fopen($file, "r");
    $tmpfile = array(
        "name" => $filename,
        "data" => fread($fp, filesize($file)));
    fclose($fp);
    return $tmpfile;
}
?>

Link to comment
Share on other sites

How are you including lib.inc.php?

If you are using include() try include_once() (just a thought)

 

Hi Buddski thanks for your reply. Where would i be looking to find wherei was including? In the Lib.inc file itslef or elsewhere? Sorry very fresh at this trying to sort out these drama's

Link to comment
Share on other sites

My suggestion is just a guess, but it looks like you are including lib.inc.php twice.

Without seeing your code I cant see where you are including it.

It will be somewhere on the page where you are getting these errors. It is also possible that its inside another included file.

Link to comment
Share on other sites

My suggestion is just a guess, but it looks like you are including lib.inc.php twice.

Without seeing your code I cant see where you are including it.

It will be somewhere on the page where you are getting these errors. It is also possible that its inside another included file.

 

I just had a look and the actual page on the site that is displaying the error is list.php the code for that is below:

 

<?
include "./lib.inc.php";
include "head.inc.php";

recursion_ca_id($ca_id, $whereStr);
$subject = $whereStr;
?>


<tr>
  <td><table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#FFFFFF>
    <tr>
      <td width=628 valign=top><img src="img/spacer.gif" width="606px" height="1px" /><br />
        <table width=100% border=0 cellspacing=2 cellpadding=0>
          <tr>
            <td height=20 style="padding-left:15px"><span class="breadcrumb"><a href="javascript:history.go(-1);"><img align="left" style="vertical-align:middle" src='<? echo "$g_dir/$g_skin_dir/back_arrows.gif" ?>' border="0"></a> <a href='<? echo "$g_dir/index.php" ?>'>Home</a><? echo $subject ?></span></td>
          </tr>
          <tr>
            <td width=100% height=1 class=line2></td>
          </tr>
        </table>
        <p>
          <?
			$sql = " select ca_id, ca_name,ca_type from $category_table where ca_sen_id = '$ca_id' order by ca_rank desc, ca_name, ca_id ";
			$result = mysql_query($sql) or die(mysql_error());
			if (mysql_num_rows($result))
			{
			?>
        <table width=100% cellspacing=1 cellpadding=2 border=0 bgcolor=#cccccc>
          <tr >
            <?
				while ($row = mysql_fetch_array($result))
				{
					echo "<td bgcolor=#ffffff align='center'><a href='./list.php?ca_id=$row[ca_id]'>$row[ca_name]</a></td>";
				}
				?>
          </tr>
        </table>
        <p>
          <? } ?>
          <?
$sql = " select ca_id, ca_name,ca_type from $category_table where ca_id = '$ca_id' order by ca_rank desc, ca_name, ca_id ";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);

include "list_$row[ca_type].inc.php";

?>
        <form>
        </form>
      <td><?
include "right.inc.php";
include "tail.inc.php";
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.