コード例 #1
0
	 <form method="post" name="sel">
     <tr>
      <td bgcolor="#FFFFFF">
       <?php 
$asql = new dedesql(false);
$aquery = "select sum(amoney) as imoney from #@__accounts where atype='收入'";
$aquery1 = "select sum(amoney) as omoney from #@__accounts where atype='支出'";
$asql->setquery($aquery);
$asql->execute();
$rs = $asql->getone();
$imoney = $rs['imoney'];
$asql->setquery($aquery1);
$asql->execute();
$rs = $asql->getone();
$omoney = $rs['omoney'];
$asql->close();
if ($imoney < $omoney) {
    $moneystring = "亏损:¥" . ($omoney - $imoney) . "元,总收入:¥" . $imoney . ",总支出:¥" . $omoney;
} elseif ($imoney - $omoney == 0) {
    $moneystring = "收支平衡,总收入:¥" . $imoney . ",总支出:¥" . $omoney;
} else {
    $moneystring = "盈利:¥" . ($imoney - $omoney) . "元,总收入:¥" . $imoney . ",总支出:¥" . $omoney;
}
echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" id=\"table_border\">";
if ($action == 'seek') {
    if ($cp_sdate == '' || $cp_edate == '' || $cp_sdate == '单击选择日期' || $cp_edate == '单击选择日期' || $cp_sdate > $cp_edate) {
        echo "<script>alert('请选择正确的时间段');history.go(-1);</script>";
    }
    if ($atype != '') {
        $query = "select * from #@__accounts where dtime between '{$cp_sdate}' and '{$cp_edate}' and atype='{$atype}' order by dtime desc";
    } else {
コード例 #2
0
        exit;
    }
    if ($b_default == 1) {
        $sasql = new Dedesql(false);
        $sasql->ExecuteNoneQuery("update #@__bank set bank_default=0");
        $sasql->close();
    }
    $addsql = "update #@__bank set bank_name='{$b_name}',bank_account='{$b_account}',bank_default='{$b_default}',bank_text='" . $b_text . "' where id='{$id}'";
    $message = "修改银行资料" . $b_name . "成功";
    $loginip = getip();
    $logindate = getdatetimemk(time());
    $username = str_replace($cfg_cookie_encode, '', $_COOKIE["VioomaUserID"]);
    WriteNote($message, $logindate, $loginip, $username);
    $isql = new dedesql(false);
    $isql->ExecuteNoneQuery($addsql);
    $isql->close();
    showmsg('成功修改了银行账户资料', 'bank.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 $cfg_softname;
?>
银行管理</title>
</head>
<body>
コード例 #3
0
function getbank($id)
{
    $banksql = new dedesql(false);
    $banksql->SetQuery("select * from #@__bank where id='{$id}'");
    $banksql->Execute();
    $bankr = $banksql->gettotalrow();
    if ($bankr == 1) {
        $rs = $banksql->getone();
        return $rs['bank_name'];
    } else {
        return "<font color=red>已删除银行</font>";
    }
    $banksql->close();
}
コード例 #4
0
        $wsql->close();
    }
    $csql->SetQuery("select * from #@__saleback where rdh='{$did}'");
}
$csql->Execute();
$rowcount = $csql->GetTotalRow();
if ($rowcount == 0) {
    echo "<tr><td>&nbsp;</td></tr>";
} else {
    echo "<tr class='row_color_head'><td>货号</td><td>名称</td><td>规格</td><td>分类</td><td>单位</td><td>售价</td><td>退回原因<td>退回数量</td><td>删除</tr>";
    while ($row = $csql->GetArray()) {
        $nsql = new dedesql(false);
        $query1 = "select * from #@__basic where cp_number='" . $row['productid'] . "'";
        $nsql->setquery($query1);
        $nsql->execute();
        $row1 = $nsql->getone();
        $amoney += $row1['cp_sale'] * $row['number'];
        $anum += $row['number'];
        echo "<tr onMouseMove=\"javascript:this.bgColor='#EBF1F6';\" onMouseOut=\"javascript:this.bgColor='#FFFFFF';\"><td>" . $row['productid'] . "</td><td>&nbsp;" . $row1['cp_name'] . "</td><td>" . $row1['cp_gg'] . "</td><td>" . get_name($row1['cp_categories'], 'categories') . ">" . get_name($row1['cp_categories_down'], 'categories') . "</td><td>" . get_name($row1['cp_dwname'], 'dw') . "</td><td>¥" . $row1['cp_sale'] . "</td><td>" . $row['r_text'] . "</td><td>" . $row['number'] . "</td><td><a href='current_order_back.php?action=del&id=" . $row['id'] . "&rid=" . $row['rdh'] . "'>删除</a></td></tr>";
        $nsql->close();
    }
}
echo "<tr><td>&nbsp;共计:</td><td></td><td></td><td></td><td>&nbsp;金额:</td><td>¥" . $amoney . "</td><td align='right'>数量:</td><td>" . $anum . "</td></tr></table>";
$csql->close();
?>
	  </td>
     </tr></form>
    </table>
</body>
</html>
コード例 #5
0
$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();
?>
		 &nbsp;
		 </td>
	    </tr>
		<tr>
		 <td id="row_style">&nbsp;金额:</td>
		 <td>
		 &nbsp;<input type="text" name="amoney" size="10">&nbsp;元</td>
	    </tr>
		<tr>
		 <td id="row_style">&nbsp;备注:</td>
		 <td>
		 &nbsp;<textarea name="atext" rows="2" cols="40"></textarea></td>
	    </tr>	
		<tr>