⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 item_edit.php

📁 本书主要介绍了从基础开始建立Portal的快速应用开发过程(RAD)的方法。通过本书你可以了解到关于Oracle 9iAS Portal产品的主要特性、入口的开发和组织、网络开发和管理、实际的关系型数
💻 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" >&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onClick="loadframes()">刷新</a></font></font></div>
    </td>
  </tr>
</table>
<table width="100%" border="0">
  <tr>
    <td width="13%">&nbsp;</td>
    <td width="74%"> 
      <?

  if($sid==""){
  
	show_msg("请先选择栏目!");
	}
if($action=="edit"){  

	$sqldo="update baseclass set class_name='$itemname',class_description='$itemcomment',imgfilepath='$imgfilepath',visible=$visible where class_id=$sid";
	
   //  echo $sqldo;
    //	if(mysql_query($sqldo)){
        if($cla->db_update($sqldo)){
             if(!is_dir("itemfiles/$sid")){
                   if(mkdir("itemfiles/$sid",0777)){
	                echo "目录建立成功!";
	               }
	          }
              $cla->db_commit();
	          show_msg("栏目 ".$itemname." 修改成功!");
	    }
     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>
                      <?    
	    $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);   
        //     echo "<font size=\"4\" color=\"#000000\"> $res_array[0]['CLASS_NAME'] </font><font size=\"4\">" ;   
		
	    $sqldo="select class_id,class_name,class_date,class_father,tabindex,imgfilepath,class_layer,visible,class_description from baseclass where class_id='$sid'";
	    $res_array=$cla->db_query($sqldo);	
        ?>
                      <font size="4" color="#000000">
                      <?echo  $res_array[0]['CLASS_NAME'] ;?>
                      </font><font size="4"> 
                      <?   //echo $res_array[0]['CLASS_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=addslashes($res_array[0]['CLASS_NAME']);?>
                    <input type="text" name="itemname" size="50" value=<?echo "$str";?>>
                  </td>
                </tr>
                <tr> 
                  <td colspan=2 height="186" bgcolor=""> 
                    <div align="center">栏目编撰按:<br>
                      <textarea name=itemcomment rows="8" cols="75"  ><?echo $res_array[0]['CLASS_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="">&nbsp;&nbsp;&nbsp;&nbsp; 
                    <input type=radio name=visible <? if($res_array[0]['VISIBLE']==0){echo "checked";}?>  value=0>
                    可见&nbsp;&nbsp;&nbsp;&nbsp; 
                    <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%" >&nbsp;</td>
  </tr>
  <tr>
    <td width="13%">&nbsp;</td>
    <td width="74%">&nbsp;</td>
    <td width="13%">&nbsp;</td>
  </tr>
</table>
<p>&nbsp;</p>
<?$cla->db_logoff();?>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -