班竹!你好非常感谢你给我的回复!
我的这个程序是一个"后台产品管理"程序,以前在另一个服务器上运行很好!
可是换了一个服务器就有问题了,它这原来的程序我没改过,只是将连接数据库中的数据稍改了一下,没理由呀!一字"郁闷!!!!"
1.现将editcategory.php 源码粘贴如下:
<?
//$phpbb_root_path = '../';
//include($phpbb_root_path . 'inc/conn.php');
//include($phpbb_root_path . 'inc/function.php');
include("..\inc\conn.php");
include("..\inc\function.php");
?>
<html>
<head>
<title>产品分类管理——修改分类</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../livestyle.css" rel="stylesheet" type="text/css">
<?
if ($page="")
{
$page=1;
}
?>
</head>
<body bgcolor="#ffffff">
<table width="90%" border="0" cellspacing="0" cellpadding="0" height="25" align="center">
<tr align="middle" bgcolor="#000000">
<td width="100%" class="white" align="center"><b>修改分类</b></td>
</tr>
</table>
<form name="form" method="post" action="editcategorydeal.php?id=<?=$categoryid?>&page=<?=$page?>">
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#ffffff">
<td height="22" align="left" bgcolor="#ffffff">分类编号:
<input name="categoryid" type="text" id="categoryid" value="<?=$categoryid?>" size="18"></td>
</tr>
<tr bgcolor="#ffffff">
<td class="pt9" height="22" bgcolor="#ffffff"> 所属父类:
<?
$strsql = "select productcategory.categoryid,productcategory.categoryname,productcategory.categoryidp from productcategory where ((productcategory.categoryidp)='')";
$result = mysql_query($strsql,$db_conn);
$rowcount = mysql_num_rows($result);
echo "<select name='categoryidp' id='categoryidp'>";
echo "<option value=''> 无父类 </option>";
if ($rowcount>0)
{
for ($i=0;$i<$rowcount;$i++)
{
$row = mysql_fetch_row($result);
echo "<option value='";
echo $row[0];
echo "'";
if ($categoryidp == $row[0])
{
echo "selected";
}
echo ">";
echo $row[1];
echo "</option>";
}
}
mysql_close($db_conn);
echo "</select>";
?>
</td>
</tr>
<tr bgcolor="#ffffff">
<td class="pt9" height="22"> 分类名称:
<input name="categoryname" value="<?=$categoryname?>" size="18"> </td>
</tr>
<tr bgcolor="#ffffff">
<td height="22" align="right" class="pt9"><a href="#" class="blue">添加产品动态分类</a>
</td>
</tr>
<tr bgcolor="#ffffff">
<td height="22" align="center" class="pt9"> <input type="submit" name="Submit" value="== 确 定 ==">
<input type="reset" name="reset1" value="== 重填 =="> </td>
</tr>
</table>
<br>
<p align="center"> </p>
</form>
</body>
</html>
2.现将articleedit.php代码粘贴如下:
<html>
<head>
<title>信息修改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../livestyle.css" type="text/css">
</head>
<body>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="506" height="25" align="center" class="tbl-fullpage-subhead">===
信息修改 ===</td>
</tr>
</table>
<?php
$phpbb_root_path = './';
include($phpbb_root_path . '../inc/conn.php');
include($phpbb_root_path . '../inc/contentTransition.php');
$sql="select * from article where id='$id'";
$query=mysql_query($sql) or die("数据库操作失败,请重试!");
$resultnum=mysql_num_rows($query);
if ($resultnum==0)
{
echo "<br><br>没有符合条件的信息,请<a href='javascript:history.back();'>返回</a>";
exit;
}
$array=mysql_fetch_array($query);
?>
<br>
<form action=articleeditdo.php name=form1 method=post enctype="multipart/form-data">
<input type=hidden name=showtitle value="产品介绍">
<input type=hidden name=id value="<?=$id?>">
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
<tr valign="middle" bgcolor="#FFFFFF">
<td width="100" height="20" align="right">标题:</td>
<td width="406" height="20"><input name="subject" type="text" size="40" value='<?=$array[subject]?>'></td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td width="100" height="20" align="right">内容:</td>
<td height="20">
<textarea name=content rows=10 cols=60><?=$array[content]?></textarea></td>
</tr>
<?
for($i=1;$i<=5;$i++)
{
$str1="pic".$i;
?>
<tr valign="middle" bgcolor="#FFFFFF">
<td width="100" height="20" align="right">文件<?=$i?>:</td>
<td height="20"><?=$array[$str1]?><br><input name="<?=$str1?>" type="file" size="30"></td>
</tr>
<?
}
?>
<tr valign="middle" bgcolor="#FFFFFF">
<td width="100" height="20" align="right">优先级:</td>
<td height="20">
<input name="pri" type="text" size="5" value='<?=$array[pri]?>'>
(1-100)整数,数值小的优先显示 </td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td width="100" height="20" align="right">信息类型:</td>
<td height="20">
<input type=text name=typename value='<?=$array[type]?>' disabled>
==此项为基础信息 不可更改==
</td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td width="100" height="20" align="right">上传文件:</td>
<td height="20">
<input type=radio name=picreload value='0' checked>不更新
<input type=radio name=picreload value='1'>更新
</td>
</tr>
</table>
<br>
<div align="center">
<input type="submit" name="post" value=" 修 改 ">
<input type="reset" name="Submit2" value=" 还 原 ">
<input type="button" onclick='javascript:history.back();' value=" 返 回 ">
</div>
</form>
</body>
</html>
3.现将pagesuggestion.php代码粘贴如下:
<!--#INCLUDE FILE="../inc/Conndb.php"-->
<!--#INCLUDE FILE="../inc/Function.php"-->
<html>
<head>
<title>产品管理——产品推荐</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../products/attach.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="../inc/product.js"></SCRIPT>
<script language=javascript>
var newWindow = null
function windowOpener(loadpos)
{
if (! newWindow || newWindow.closed)
{
newWindow = window.open(loadpos,"surveywin","scrollbars,dependent,width=400,height=420");
}else
{
newWindow.focus();
}
}
</script>
<?
//productid=request.QueryString("id")
//if
// $RsProduct is of type "ADODB.Recordset"
$sqlstr="select * from productcategory Order by categoryid";
mysql_query($RsProduct_CommandText,$RsProduct_ActiveConnection);$conn
if (!($RsProduct=0))
{
$CategoryList=;
}
$RsProduct=null;
$quto="\"";
$br=char(13);
print "<SCRIPT language=JavaScript>".$br;
print "var categorypcount; ".$br;
print "var proudctcount;".$br;
print "var k;".$br;
print "categorypcount=0; ".$br;
print "productcount=0;".$br;
print "categoryp = new Array(); ".$br;
if (is_array($CategoryList))
{
for ($i=0; $i<=count($CategoryList); $i=$i+1)
{
$categoryid=$CategoryList[0,$i];
$categoryname=$CategoryList[2,$i];
$categoryidp=$CategoryList[1,$i];
print "categoryp[".$i."] = new Array(".$quto.$categoryid.$quto.",".$quto.$categoryname.$quto.",".$quto.$categoryidp.$quto."); ".$br;
}
}
print "categorypcount =".$i.$br;
// $RsProduct is of type "ADODB.Recordset"
$sqlstr="select productid , productname , categoryid from product";
mysql_query($RsProduct_CommandText,$RsProduct_ActiveConnection);$conn
if (!($RsProduct==0))
{
$ProductList=;
}
$RsProduct=null;
print "product= new Array(); ".$br;
if (is_array($ProductList))
{
for ($j=0; $j<=count($ProductList); $j=$j+1)
{
$productid=$ProductList[0,$j];
$productname=$ProductList[1,$j];
$categoryid=$ProductList[2,$j];
print "product[".$j."] = new Array(".$quto.$productid.$quto.",".$quto.$productname.$quto.",".$quto.$categoryid.$quto.");".$br;
}
}
print "productcount =".$j.$br;
print "</SCRIPT> ".$br;
?>
<link href="../livestyle.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr>
<td height="22" align="center" class="white-bold">产品推荐</td>
</tr>
</table>
<form action="../products/pagesuggpro.php" method="post" name="form" id="form">
<table width="80%" border="0" cellspacing="1" cellpadding="5" align="center" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td width="20%" align="right" height="25">产品种类:</td>
<td width="572" height="25">
<? DrawCategoryidp($categorylist);?>
(推荐产品所属的种类)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="20%" height="25" align="right">所属子类:</td>
<td height="25"> <? DrawCategory();?>
(推荐产品所属的子类)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">产品名称:</td>
<td height="25"><select name="productname" size="1" id="productname">
</select> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="20%" height="25"><div align="right">推荐位置:</div></td>
<td height="25"><select name="relateposition" size="1" id="select5">
<option value="1" selected>首页</option>
<option value="2">产品展示页</option>
<option value="3">产品详情页面</option>
</select> </td>
</tr>
<tr bgcolor="#f5f5f5" align="center">
<td height="40" colspan="2"> <input type="submit" name="Submit" value=" 提 交 ">
<input type="submit" name="Submit2" value=" 重 选 "> </td>
</tr>
<tr bgcolor="#f5f5f5" align="center">
<td height="22" colspan="2"><a href="../products/listrecommand.php" class="blue">返回推荐信息列表</a>
>>></td>
</tr>
</table>
</form>
</body>
</html>
三个文件都在这里,请斑竹帮帮忙,在此谢谢啦!!!!
|
|