📄 indexof_today.php
字号:
<?
require_once("../include/admin_or_user.php");
require_once('../include/connection1.php');
require_once('../include/sqlfuns.php');
require_once('../include/classes.php');
$deptno=3;
?>
<?
if(isset($_GET['deleteid']))
{
$p=new author("","admin",$deptno);
$p->check();
$deleteid=intval($_GET['deleteid']);
$sql="delete from dept_3 where id=$deleteid";
odbc_exec($conn,$sql);
}
if(isset($_POST['s1']))
{
$sql = sprintf("update dept_3 set name=%s,mount=%s,prise=%s,other_prise=%s,total_prise=%s,descript=%s where id=%s",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['mount'], "double"),
GetSQLValueString($_POST['prise'], "double"),
GetSQLValueString($_POST['other_prise'], "double"),
GetSQLValueString(doubleval($_POST['prise'])*
doubleval($_POST['mount'])+doubleval($_POST['other_prise']), "double"),
GetSQLValueString($_POST['descript'], "text"),
GetSQLValueString($_POST['id'], "int"));
// echo $sql;
odbc_exec($conn,$sql);
}
$today=date("Y")."-".(date("m")*1)."-".date("d")*1;
$selectsql = "select * from dept_3 where time like '".$today."%' order by id";
$rs=odbc_exec($conn,$selectsql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="../css/hotel.css" rel="stylesheet" type="text/css" />
</head>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:934px;
left: 36px;
z-index:1;
visibility:visible
}
#Layer2 {
position:absolute;
width:934px;
left: 36px;
z-index:1;
visibility:hidden;
}
-->
</style>
<script>
function clickm(a,b)
{
a.style.visibility='hidden';
b.style.visibility='visible';
}
function clickn(a,b)
{
a.style.visibility='visible';
b.style.visibility='hidden';
}
</script>
<body>
<table width="100%" border="1">
<tr>
<td><? include("collectdept_top.php"); ?></td>
</tr>
<tr>
<td>
<div id="Layer1">
<table width="100%" border="1">
<tr>
<td>
今日采购
<table border="0" width="100%">
<?
$state=0;
$total=0;
while(odbc_fetch_row($rs))
{
$state=1;
$total++;
?>
<tr>
<td width="500">
<br \>
<table width="80%" border="1" id="i<? echo $total;?>" style="visibility:visible">
<tr>
<td> 编号</td>
<td> <? echo $total;?></td>
</tr>
<tr>
<td width="26%"> 名称</td>
<td width="74%"> <? echo odbc_result($rs,'name');?></td>
</tr>
<tr>
<td> 数量</td>
<td> <? echo odbc_result($rs,'mount');?></td>
</tr>
<tr>
<td> 单价</td>
<td> <span class="redclore">¥</span><? echo odbc_result($rs,'prise');?></td>
</tr>
<tr>
<td> 其它费用</td>
<td> <span class="redclore">¥</span><? echo odbc_result($rs,'other_prise');?></td>
</tr>
<tr>
<td> 总费用</td>
<td> <span class="redclore">¥</span><? echo odbc_result($rs,'total_prise');?></td>
</tr>
<tr>
<td> 时间</td>
<td> <? echo odbc_result($rs,'time');?></td>
</tr>
<tr>
<td> 备注</td>
<td> <? echo odbc_result($rs,'descript');?></td>
</tr>
<tr>
<td> 操作</td>
<td> <a href="#" onclick="clickm(i<? echo $total;?>,ii<? echo $total;?> )">修改</a> <a href="?deleteid=<? echo odbc_result($rs,'id');?>" onclick="return window.confirm('确认删除?')">删除</a></td>
</tr>
</table>
</td>
<? if(odbc_fetch_row($rs))
{
$total++;
?>
<td width="500" valign="bottom" id="i<? echo $total;?>" style="visibility:visible">
<table width="80%" border="1">
<tr>
<td> 编号</td>
<td> <? echo $total;?></td>
</tr>
<tr>
<td width="26%"> 名称</td>
<td width="74%"> <? echo odbc_result($rs,'name');?></td>
</tr>
<tr>
<td> 数量</td>
<td> <? echo odbc_result($rs,'mount');?></td>
</tr>
<tr>
<td> 单价</td>
<td> <span class="redclore">¥</span><? echo odbc_result($rs,'prise');?></td>
</tr>
<tr>
<td> 其它费用</td>
<td> <span class="redclore">¥</span><? echo odbc_result($rs,'other_prise');?></td>
</tr>
<tr>
<td> 总费用</td>
<td> <span class="redclore">¥</span><? echo odbc_result($rs,'total_prise');?></td>
</tr>
<tr>
<td> 时间</td>
<td> <? echo odbc_result($rs,'time');?></td>
</tr>
<tr>
<td> 备注</td>
<td> <? echo odbc_result($rs,'descript');?></td>
</tr>
<tr>
<td> 操作</td>
<td> <a href="#" onclick="clickm(i<? echo $total;?>,ii<? echo $total;?> )">修改</a> <a href="?deleteid=<? echo odbc_result($rs,'id');?>" onclick="return window.confirm('确认删除?')">删除</a></td>
</tr>
</table>
</td>
<? } ?>
</tr>
<? }
if(!$state)
echo "<script>
alert('今天无记录');
</script>";
?>
</table>
<br />
<br />
<br />
</td>
</tr>
</table>
<p \>
<script src="../copyright.inc">
</script>
</div>
<? odbc_fetch_row($rs,0);?>
<div id="Layer2">
<table width="100%" border="1">
<tr>
<td>
今日采购
<table border="0" width="100%">
<?
$total=0;
while(odbc_fetch_row($rs))
{
$total++;
?>
<tr>
<td width="500" valign="baseline">
<form method="post" enctype="application/x-www-form-urlencoded" name="ii<? echo $total;?>" id="ii<? echo $total;?>" style="visibility:hidden" >
<table width="80%" border="1">
<tr>
<td> 编号</td>
<td> <? echo $total;?></td>
</tr>
<tr>
<td width="26%"> 名称</td>
<td width="74%">
<label>
<input name="name" type="text" id="name" size="20" maxlength="30" value="<? echo odbc_result($rs,'name');?>"/>
</label></td>
</tr>
<tr>
<td> 数量</td>
<td>
<label>
<input name="mount" type="text" id="mount" size="6" maxlength="10" value="<? echo odbc_result($rs,'mount');?>"/>
</label></td>
</tr>
<tr>
<td> 单价</td>
<td> <span class="redclore">¥</span>
<label>
<input name="prise" type="text" id="prise" size="6" maxlength="10" value="<? echo odbc_result($rs,'prise');?>" />
</label></td>
</tr>
<tr>
<td> 其它费用</td>
<td> <span class="redclore">¥</span>
<label>
<input name="other_prise" type="text" id="other_prise" size="6" maxlength="10" value="<? echo odbc_result($rs,'other_prise');?>" />
</label></td>
</tr>
<tr>
<td> 备注</td>
<td>
<label>
<textarea name="descript" cols="30" rows="4" id="descript"><? echo odbc_result($rs,'descript');?></textarea>
</label></td>
</tr>
<tr>
<td> 操作</td>
<td>
<label>
<input name="s1" type="submit" id="s1" value="修改" />
</label>
<label>
<input type="button" name="Submit" value="返回" onclick="clickn(i<? echo $total;?>,ii<? echo $total;?>)"/>
</label>
<input name="id" type="hidden" value="<? echo odbc_result($rs,'id');?>">
</td>
</tr>
</table>
</form>
</td>
<? if(odbc_fetch_row($rs))
{
$total++;
?>
<td width="500" valign="bottom">
<form method="post" enctype="application/x-www-form-urlencoded" name="ii<? echo $total;?>" id="ii<? echo $total;?>" style="visibility:hidden">
<table width="80%" border="1">
<tr>
<td> 编号</td>
<td> <? echo $total;?></td>
</tr>
<tr>
<td width="26%"> 名称</td>
<td width="74%">
<label>
<input name="name" type="text" id="name" size="20" maxlength="30" value="<? echo odbc_result($rs,'name');?>"/>
</label></td>
</tr>
<tr>
<td> 数量</td>
<td>
<label>
<input name="mount" type="text" id="mount" size="6" maxlength="10" value="<? echo odbc_result($rs,'mount');?>"/>
</label></td>
</tr>
<tr>
<td> 单价</td>
<td> <span class="redclore">¥</span>
<label>
<input name="prise" type="text" id="prise" size="6" maxlength="10" value="<? echo odbc_result($rs,'prise');?>" />
</label></td>
</tr>
<tr>
<td> 其它费用</td>
<td> <span class="redclore">¥</span>
<label>
<input name="other_prise" type="text" id="other_prise" size="6" maxlength="10" value="<? echo odbc_result($rs,'other_prise');?>" />
</label></td>
</tr>
<tr>
<td> 备注</td>
<td>
<label>
<textarea name="descript" cols="30" rows="4" id="descript"><? echo odbc_result($rs,'descript');?></textarea>
</label></td>
</tr>
<tr>
<td> 操作</td>
<td>
<label>
<input name="s1" type="submit" id="s1" value="修改" />
</label>
<label>
<input type="button" name="Submit2" value="返回" onclick="clickn(i<? echo $total;?>,ii<? echo $total;?>)" />
</label>
<input name="id" type="hidden" value="<? echo odbc_result($rs,'id');?>">
</td>
</tr>
</table>
</form>
</td>
<? } ?>
</tr>
<? }
?>
</table>
</td>
</tr>
</table>
<p \>
<script src="../copyright.inc">
</script>
</div>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -