求大神,帮忙看这段PHP代码哪里错了,我能力有限,没看出来。 悬赏1元 已结束
求大神,帮忙看这段PHP代码哪里错了,我能力有限,没看出来。
错误提示:
Parse error: syntax error, unexpected T_VARIABLE in /www/wwwroot/cnwzad.cn/admin/template/xg.php on line 19
<?php
/*获取当前URL中关于站点ID的数字*/
$params = explode(',', $_GET['id']);
foreach($params as $key => $value){
}
$arr=array("age","base","ceils","dpl","enforce",'golf');
error_reporting(0);
isset($_COOKIE['adminloginusername']) ? $adminuser = $_COOKIE['adminloginusername'] :
$adminuser = null;
if ($adminuser != null) {
require_once ("../config.php");
$check_sql = "select * from dunling_admin where username='$adminuser'";
$check_sql = mysql_query($check_sql, $config);
$check_num = mysql_num_rows($check_sql);
if ($check_num != "1") {header("location:index.php");exit;}
} else {header("location:index.php")
/*判断查找ID=1的一行数据*/
$sql="select * from dunling_link WHERE 'id' = '$value'";
/*执行查找*/
$result = mysql_query($sql);
if(mysql_num_rows($result)>=1){
/*对数据表中各字段赋值*/
$id=mysql_result($result,0,id);
$catid=mysql_result($result,0,url_catid);
$url_link=mysql_result($result,0,url_link);
$url_names=mysql_result($result,0,url_names);
$url_cat=mysql_result($result,0,url_cat);
$url_gjz=mysql_result($result,0,url_gjz);
$url_jj=mysql_result($result,0,url_jj);
$url_time=mysql_result($result,0,cjsj);
$url_tj=mysql_result($result,0,url_gz);
$url_wz=mysql_result($result,0,url_wz);
$url_user=mysql_result($result,0,user_name);
}
echo <<< EOT
<style>
table{
margin:0;
padding:0;
}
table tr td{
font-size:16px;
color: #393939;
}
table tr td input.input{
width:500px;
height:30px;
line-height: 30px;
}
</style>
<form method="post" action="" >
<input type="hidden" name="post" value="post" />
<table width="700" cellpadding="5" cellspacing="6">
<tr>
<th align="right" style="font-size: 18px;color: #6A3500;">
修改网站 »
</th>
<td></td>
</tr>
<tr>
<td align="right">网站分类:</td><td align="left"><select name="url_cat" id="url_cat" class="sel">
<option value="$url_cat" style="background: #EEF3F7;">├$url_cat</option>
<option value="文学阅读" style="background: #EEF3F7;">├文学阅读</option>
<option value="小说阅读" style="background: #EEF3F7;">├小说阅读</option>
<option value="企业黄页" style="background: #EEF3F7;">├企业黄页</option>
<option value="资源下载" style="background: #EEF3F7;">├资源下载</option>
<option value="聊天交友" style="background: #EEF3F7;">├聊天交友</option>
<option value="图片相册" style="background: #EEF3F7;">├图片相册</option>
<option value="新闻资讯" style="background: #EEF3F7;">├新闻资讯</option>
<option value="影视直播" style="background: #EEF3F7;">├影视直播</option>
<option value="音乐MP3" style="background: #EEF3F7;">├音乐MP3</option>
<option value="建站服务" style="background: #EEF3F7;">├建站服务</option>
<option value="站长周边" style="background: #EEF3F7;">├站长周边</option>
<option value="政府网站" style="background: #EEF3F7;">├政府网站</option>
<option value="教育网站" style="background: #EEF3F7;">├教育网站</option>
<option value="社区论坛" style="background: #EEF3F7;">├社区论坛</option>
<option value="人才招聘" style="background: #EEF3F7;">├人才招聘</option>
<option value="娱乐游戏" style="background: #EEF3F7;">├娱乐游戏</option>
<option value="行业交流" style="background: #EEF3F7;">├行业交流</option>
<option value="其他网站" style="background: #EEF3F7;">├其他网站</option>
</select> 是否加入友链群:<select name="url_yl" id="url_yl" class="sel">
<option value="0" style="background: #EEF3F7;">否</option>
<option value="1" style="background: #EEF3F7;">是</option>
</select>友链显示系统按最新来访排名
</td>
</tr>
<tr>
<td align="right" style="width: 150px;height">网站名称:</td><td align="left"><input type="text" class="input" name="url_names" value="$url_names" /></td>
</tr>
<tr>
<td align="right" style="width: 150px;height">网站域名:</td><td><input type="text" class="input" name="url_link" value="$url_link" /></td>
</tr>
<tr>
<td align="right" style="width: 150px;height">网站标签:</td><td align="left"><input type="text" class="input" name="url_gjz" value="$url_gjz" /></td>
</tr>
<tr>
<td align="right" style="width: 150px;height">首页描述:</td><td align="left"><input type="text" class="input" name="url_jj" style="height:50px;" value="$url_jj" /></td>
</tr>
<tr>
<td align="right" style="width: 150px;height">网站介绍:</td><td align="left"><textarea name="url_wz" style="height:200px;width:500px;word-break : break-all;">$url_wz</textarea></td>
</tr>
<tr>
<td align="right"></td><td align="left"><input type="submit" value="保存" style="width: 150px;height:30px;" />
</td>
</tr>
</table>
</form>
EOT;
isset($_POST['post'])?$post=$_POST['post']:$post=null;
if($post=="post"){
if ($_POST['url_cat']=="文学阅读") {
$upurl_catid =1;
} else if($_POST['url_cat']=="小说阅读") {
$upurl_catid =2;
} else if($_POST['url_cat']=="企业黄页") {
$upurl_catid =3;
} else if($_POST['url_cat']=="资源下载") {
$upurl_catid =4;
} else if($_POST['url_cat']=="聊天交友") {
$upurl_catid =5;
} else if($_POST['url_cat']=="图片相册") {
$upurl_catid =6;
} else if($_POST['url_cat']=="新闻资讯") {
$upurl_catid =7;
} else if($_POST['url_cat']=="影视直播") {
$upurl_catid =8;
} else if($_POST['url_cat']=="音乐MP3") {
$url_catid =9;
} else if($_POST['url_cat']=="建站服务") {
$upurl_catid =10;
} else if($_POST['url_cat']=="站长周边") {
$upurl_catid =11;
} else if($_POST['url_cat']=="政府网站") {
$upurl_catid =12;
} else if($_POST['url_cat']=="教育网站") {
$upurl_catid =13;
} else if($_POST['url_cat']=="社区论坛") {
$upurl_catid =14;
} else if($_POST['url_cat']=="人才招聘") {
$upurl_catid =15;
} else if($_POST['url_cat']=="娱乐游戏") {
$upurl_catid =16;
} else if($_POST['url_cat']=="行业交流") {
$upurl_catid =17;
} else if($_POST['url_cat']=="其他网站") {
$upurl_catid =18;}
else { $url_catid =18;}
$upurl_cat = $_POST['url_cat'];
$upurl_names = $_POST['url_names'];
$upurl_link = $_POST['url_link'];
$upurl_gjz = $_POST['url_gjz'];
$upurl_jj = $_POST['url_jj'];
$upurl_wz = $_POST['url_wz'];
$upurl_yl = $_POST['url_yl'];
mysql_query("UPDATE dunling_link SET (url_catid,url_cat,url_names,url_link,url_gjz,url_jj,url_wz,user_name,url_yl) = ($upurl_catid','$upurl_cat','$upurl_names','$upurl_link','$upurl_gjz','$upurl_jj','$upurl_wz','$upadminuser','$upurl_yl') WHERE id = '$value'");
echo "<script>alert('修改成功');location.href='?p=insert';</script>";
}
?>