📄 edit.php
字号:
<?
include_once("inc/auth.php");
?>
<html>
<head>
<title>工资项目编辑</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="JavaScript">
function CheckForm()
{
if(document.form1.ITEM_NAME.value=="")
{ alert("工资项目名称不能为空!");
return (false);
}
}
function LoadWindow2()
{
URL="formula_edit.php";
myleft=(screen.availWidth-500)/2;
window.open(URL,"formul_edit","height=400,width=700,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}
function sel_change(input)
{
if(form1.ITEM_TYPE.value=="2")
{
document.all("FORMU").style.display="";
}
else
{
document.all("FORMU").style.display="none";
document.form1.FORMULA.value="";
document.form1.FORMULANAME.value="";
}
}
</script>
</head>
<?
$connection=OpenConnection();
$query = "SELECT * from SAL_ITEM where ITEM_ID=$ITEM_ID";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$ITEM_ID=$ROW["ITEM_ID"];
$ITEM_NAME=$ROW["ITEM_NAME"];
$ISPRINT=$ROW["ISPRINT"];
$ISCOMPUTER=$ROW["ISCOMPUTER"];
$FORMULA=$ROW["FORMULA"];
$FORMULANAME=$ROW["FORMULANAME"];
$ISREPORT=$ROW["ISREPORT"];
}
?>
<body class="bodycolor" topmargin="5" onload="document.form1.ITEM_NAME.focus();">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/edit.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 工资项目编辑</span>
</td>
</tr>
</table>
<div align="center" class="big1">
<b>
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form action="update.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableContent">工资项目名称:: </td>
<td nowrap class="TableData">
<input type="text" name="ITEM_NAME" class="BigInput" size="30" maxlength="100" value="<?=$ITEM_NAME?>" <? if($ITEM_COUNT>=50) echo disabled;?>>
<input type="hidden" name="ITEM_ID" value="<?=$ITEM_ID?>">
</td>
</tr>
<tr>
<td nowrap class="TableContent">项目类型: </td>
<td nowrap class="TableData">
<select name="ITEM_TYPE" class="BigSelect" onchange="sel_change()">
<option value="0" <? if($ISREPORT!="1"&&$ISCOMPUTER!="1") echo "selected";?>>财务录入项</option>
<option value="1" <? if($ISREPORT=="1") echo "selected";?>>部门上报项</option>
<option value="2" <? if($ISREPORT!="1"&&$ISCOMPUTER=="1") echo "selected";?>>计算项</option>
</select>
</td>
</tr>
<tr id="FORMU" style=<? if($ISCOMPUTER=="1") {echo "";}else {echo "display:none";}?>>
<td nowrap class="TableContent">计算公式:</td>
<td nowrap class="TableData">
<input type="hidden" name="FORMULA" value="<?=$FORMULA?>">
<textarea cols=37 name="FORMULANAME" rows="4" class="BigStatic" readonly wrap="yes"><?=$FORMULANAME?></textarea>
<input type="button" value="编辑公式" class="SmallButton" onClick="LoadWindow2()" title="编辑公式" name="button">
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type="submit" value="修改" class="BigButton" title="修改工资项目" name="button">
<input type="button" value="返回" class="BigButton" onclick="location='index.php'">
</td>
</tr>
</form>
</table>
</b>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -