?? add_money.php
字號:
<?php
require(dirname(__FILE__)."/include/config_base.php");
require(dirname(__FILE__)."/include/config_rglobals.php");
if($action=='save'){
if($atext==''){
ShowMsg('請輸入財務進出原因','-1');
exit();
}
if($amoney=='' || !is_numeric($amoney) || $amoney<0){
ShowMsg('請確保輸入了正確的金額','-1');
exit();
}
$loginip=getip();
$logindate=getdatetimemk(time());
$username=str_replace($cfg_cookie_encode,'',$_COOKIE['VioomaUserID']);
$addsql="insert into #@__accounts(atype,amoney,abank,dtime,apeople,atext) values('$atype','$amoney','$abank','$logindate','$username','$atext')";
$message="手動添加賬務成功";
$asql=New Dedesql(false);
$asql->ExecuteNoneQuery($addsql);
$asql->close();
WriteNote($message,$logindate,$loginip,$username);
showmsg('成功添加了賬務','system_money.php');
exit();
}
?>
<!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" />
<link href="style/main.css" rel="stylesheet" type="text/css" />
<title><?php echo $cfs_softname;?>賬戶管理</title>
</head>
<body>
<table width="100%" border="0" id="table_style_all" cellpadding="0" cellspacing="0">
<tr>
<td id="table_style" class="l_t"> </td>
<td> </td>
<td id="table_style" class="r_t"> </td>
</tr>
<tr>
<td> </td>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td><strong> 賬務管理</strong> <a href="system_money.php">查看明細賬</a></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><form action="add_money.php?action=save" method="post">
<table width="100%" cellspacing="0" cellpadding="0" border="0" id="table_border">
<tr>
<td id="row_style"> 科目:</td>
<td>
<select name="atype"><option value="收入">收入</option><option value="支出">支出</option></select>
</td>
</tr>
<tr>
<td id="row_style"> 銀行:</td>
<td>
<?php
$bank=new dedesql(false);
$bank->setquery("select * from #@__bank");
$bank->execute();
$r=$bank->gettotalrow();
if($r==0)
echo "沒有銀行供選擇,請先<a href='bank.php?action=new'>添加</a>";
else{
echo "<select name='abank'>";
while($row=$bank->getArray()){
if($row['bank_default']==1)
echo "<option selected value='".$row['id']."'>".$row['bank_name']."</option>";
else
echo "<option value='".$row['id']."'>".$row['bank_name']."</option>";
}
echo "</select>";
}
$bank->close();
?>
</td>
</tr>
<tr>
<td id="row_style"> 金額:</td>
<td>
<input type="text" name="amoney" size="10"> 元</td>
</tr>
<tr>
<td id="row_style"> 備注:</td>
<td>
<textarea name="atext" rows="2" cols="40"></textarea></td>
</tr>
<tr>
<td id="row_style"> </td>
<td> <input type="submit" name="submit" value=" 添加賬務 "></td>
</tr>
</table></form>
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
<tr>
<td id="table_style" class="l_b"> </td>
<td> </td>
<td id="table_style" class="r_b"> </td>
</tr>
</table>
<?php
copyright();
?>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -