📄 item_addx.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="menu_item.php"
}
function checkblank()
{
if(form1.itemname.value=="") {
alert("栏目名不可为空!")
form1.itemname.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="item_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0">增加同类</a>
<a href="item_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a>
<a href="item_addx.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">增加下类</a>
<a href="item_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a><a href="item_edit.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">修改本类</a>
<a href="item_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a><a href="item_del.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">删除本类</a>
<a href="item_adds.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>"><img src="images/edit.gif" width="18" height="13" border="0"></a><a href="item_que.php?sid=<?echo $sid;?>&pid=<?echo $pid;?>">同类排序</a>
<font color="#000000" > <a href="#" onClick="loadframes()">刷新</a></font></font></div>
</td>
</tr>
</table>
<table width="102%" border="0">
<tr>
<td colspan="3">
<?
if($sid==""){
show_msg("请先选择栏目!");
}
if($action=="addx"){
$sqldo="select class_layer from baseclass where class_id=$sid";
$res_array=$cla->db_query($sqldo);
// $result=mysql_query($sqldo);
// $res_array=mysql_fetch_array($result);
$lay=$res_array[0][0]+1;
$sqldo="insert into baseclass(class_id,class_name,class_father,class_layer,class_description,imgfilepath,visible) values(baseclassclass_id.nextval,'$itemname',$sid,$lay,'$itemcomment','$imgfilepath',$visible)";
// echo $sqldo;
//if(mysql_query($sqldo)){
if($cla->db_insert($sqldo)){
$cla->db_commit();
$sqldo="select max(class_id) from baseclass ";
$res_array=$cla->db_query($sqldo);
$temp=$res_array[0][0];
if(!is_dir("itemfiles/$temp")){
if(mkdir("itemfiles/$temp",0777)){
// echo "目录建立成功!";
}
}
show_msg("新栏目 ".$itemname." 增加成功!");
}
else{
show_msg("增加失败!<br>请与管理员联系!");
}
}
?>
<form name="form1" method="post" action="?action=addx&sid=<?echo $sid;?>&pid=<?echo $pid;?>" onSubmit="return checkblank()">
<table width=644 border=0 cellpadding=0 align=center >
<tr bordercolor=FFFFFF >
<td align=left bgcolor="">
<table border=1 cellspacing=0 cellpadding=3 width=550 bordercolor=#111111 class=border >
<tr>
<td height="19" colspan="2">
<div align="center"><font color=#FFFFF size=10><b><font size="4" color="#000000">当前栏目:</font>
<?
$sqldo="select class_name from baseclass where class_id=$sid";
$res_array=$cla->db_query($sqldo);
//$result=mysql_query($sqldo);
//$res_array=mysql_fetch_array($result);
?>
<font size="4" color="#000000">
<?echo $res_array[0][0];?>
</font><font size="4"> </font></b></font> </div>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td height="19" width="138">新类名:</td>
<td height="19" width="386">
<input type="text" name="itemname" size="50" >
</td>
</tr>
<tr>
<td colspan=2 bgcolor="">
<div align="center">栏目编撰按:<br>
<textarea name=itemcomment rows="8" cols="75"></textarea>
</div>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="138">
<div align="center">栏目图片路径:</div>
</td>
<td width="386">
<input type=text name=imgfilepath size=49 value=>
</td>
</tr>
<tr>
<td bgcolor="" width="138">
<div align="center">栏目是否可见:</div>
</td>
<td bgcolor="" width="386">
<input type=radio name=visible checked value=0>
可见
<input type=radio name=visible 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>
</tr>
<tr>
<td width="19%"> </td>
<td width="68%"> </td>
<td width="13%"> </td>
</tr>
</table>
<p> </p>
<?$cla->db_logoff();?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -