📄 topic_edit.php
字号:
<?
require "inc/check.php";
require "inc/func.php";
require "inc/error.php";
//check_login();
?>
<html>
<head>
<script language="JavaScript">
function loadframes()
{
parent.leftFrame.location.href="menu2.php"
}
function checkblank()
{
if(form1.topicname.value=="") {
alert("专题名不可为空!")
form1.topicname.focus()
return false
}
}
</script>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>BODY {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px; scrollbar-face-color: ffffff; scrollbar-shadow-color: C1C1BB; scrollbar-highlight-color: C1C1BB; scrollbar-3dlight-color: EBEBE4; scrollbar-darkshadow-color: EBEBE4; scrollbar-track-color: F4F4F0; scrollbar-arrow-color: CACAB7
}
P {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
INPUT {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
FONT {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
SELECT {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
OPTION {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
TEXTAREA {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
FORM {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
TD {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px; TABLE-LAYOUT: fixed; WORD-BREAK: break-all
}
A:link {
TEXT-DECORATION: none
}
A:visited {
TEXT-DECORATION: none
}
A:hover {
TEXT-DECORATION: underline
}
A:active {
FONT-SIZE: 12px; TEXT-DECORATION: none
}
.border {
BACKGROUND-COLOR: #efefef; BORDER-BOTTOM: 1px dotted; BORDER-COLLAPSE: collapse; BORDER-LEFT: 1px dotted; BORDER-RIGHT: 1px dotted; BORDER-TOP: 1px dotted; COLOR: #000000
}
.shadow1 {
COLOR: #ffffff; FILTER: dropshadow(color=#000000,offx=1,offy=1); FONT-SIZE: 12px
}
.shadow2 {
COLOR: #000000; FILTER: dropshadow(color=#d5d5d5,offx=1,offy=1); FONT-SIZE: 12px
}
.p1 {
COLOR: #ffffff; FONT-SIZE: 12px; TEXT-DECORATION: none
}
.p2 {
COLOR: #000000; FONT-SIZE: 12px; TEXT-DECORATION: none
}
.p3 {
COLOR: #004080; FONT-SIZE: 14px; TEXT-DECORATION: none
}
</STYLE>
</head>
<body bgcolor="#FFFFFF" text="#000000" >
<table width="80%" border="1" cellspacing="0" cellpadding="3" align="center" bordercolor="#c0c0c0">
<tr bgcolor="">
<td class="head-2" height="27" bgcolor="#FFFFFF"><b><font size="2" color="#cae4ff"> </font></b>
<div align="center"><font color="#FFFFFF"><a href="topic_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0">增加同类</a>
<a href="topic_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a>
<a href="topic_addx.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">增加下类</a>
<a href="topic_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a><a href="topic_edit.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">修改本类</a>
<a href="topic_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a><a href="topic_del.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">删除本类</a>
<a href="topic_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a><a href="topic_que.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">同类排序</a>
<a href="topic_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a><a href="topic_que2.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">统一排序</a>
<font color="#000000" > <a href="#" onClick="loadframes()">刷新</a></font>
</font></div>
</td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td width="13%"> </td>
<td width="74%">
<?
if($sid==""){
show_msg("请先选择专题!");
}
if($action=="edit"){
$topicname=trim($topicname);
$sqldo="update basespec set spec_name='$topicname',spec_description='$topiccomment',imgfilepath='$imgfilepath',visible=$visible where spec_id=$sid";
// echo $sqldo;
// if(mysql_query($sqldo)){
if($cla->db_update($sqldo)){
$cla->db_commit();
show_msg("专题 ".$topicname." 修改成功!");
}
else{
show_msg("修改失败!<br>请与管理员联系!");
}
}
?>
<form name="form1" method="post" action="?action=edit&sid=<? echo $sid;?>&pid=<? echo $pid;?>" onSubmit="return checkblank()">
<table width=550 border=0 cellpadding=0 align=center bordercolorlight=000000 bordercolordark=000000 bordercolor=FFFFFF>
<tr bordercolor=FFFFFF >
<td align=left>
<table border=1 cellspacing=0 cellpadding=5 width=550 bordercolor=#111111 class=border>
<tr>
<td colspan="2" height="31">
<div align="center"><font color=#FFFFF size=10><b><font size="4" color="#000000">当前专题:</font><font size="4">
<?
$sqldo="select spec_name from basespec where spec_id='$sid'";
$res_array=$cla->db_query($sqldo);
//$result=mysql_query($sqldo);
//$res_array=mysql_fetch_array($result);
// echo "<font size=\"4\" color=\"#000000\"> $res_array[0]['SPEC_NAME'] </font><font size=\"4\">" ;
$sqldo="select spec_id,spec_name,spec_date,spec_father,tabindex,imgfilepath,spec_layer,visible,spec_description from basespec where spec_id='$sid'";
$res_array=$cla->db_query($sqldo);
?>
<font size="4" color="#000000"><?echo $res_array[0]['SPEC_NAME'] ;?></font><font size="4">
<? //echo $res_array[0]['SPEC_NAME'];
// $result=mysql_query($sqldo);
//$res_array=mysql_fetch_array($result);
?>
</font></b></font> </div>
</td>
</tr>
<tr>
<td width="137" bgcolor="#f7f7f7">
<div align="center">新类名:</div>
</td>
<td bgcolor="#f7f7f7">
<? $str=stripslashes($res_array[0]['SPEC_NAME']);?>
<input type="text" name="topicname" size="50" value='<?echo "$str";?>'>
</td>
</tr>
<tr>
<td colspan=2 height="186" bgcolor="">
<div align="center">专题编撰按:<br>
<textarea name=topiccomment rows="8" cols="75" ><?echo $res_array[0]['SPEC_DESCRIPTION'];?></textarea>
</div>
</td>
</tr>
<tr>
<td width="137" bgcolor="#f7f7f7">专题图片路径:</td>
<td bgcolor="#f7f7f7">
<input type=text name=imgfilepath size=49 value=<?echo $res_array[0]['IMGFILEPATH'];?>>
</td>
</tr>
<tr>
<td width="137" bgcolor="">专题类是否可见:</td>
<td bgcolor="">
<input type=radio name=visible <? if($res_array[0]['VISIBLE']==0){echo "checked";}?> value=0>
可见
<input type=radio name=visible <? if($res_array[0]['VISIBLE']==1){echo "checked";}?> value=1>
不可见 </td>
<input type="hidden" name="classid2" value="8" >
<input type="hidden" name="parent" value="8" >
</tr>
</table>
</td>
</tr>
</table>
<div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</div>
</form>
<td width="13%" onclick="loadframes()"> </td>
</tr>
<tr>
<td width="13%"> </td>
<td width="74%"> </td>
<td width="13%"> </td>
</tr>
</table>
<p> </p>
<?$cla->db_logoff();?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -