<?php $id = $_GET['id']; $user = $_GET['user']; $ngaydat = $_GET['ngaydat']; $ngaygiao = $_GET['ngaygiao']; $nguoinhan = $_GET['nguoinhan']; $dienthoai = $_GET['dienthoai']; $diadiem = $_GET['diadiem']; $ghichu = $_GET['ghichu']; require_once '../../../libraries/oop.php'; require_once '../../../libraries/donhang.php'; $a = new DonHang(); $a->set_idDonHang($id); $a->set_Username($user); $a->set_ThoiDiemDatHang($ngaydat); $a->set_ThoiDiemGiaoHang($ngaygiao); $a->set_TenNguoiNhan($nguoinhan); $a->set_DienThoai($dienthoai); $a->set_DiaDiemGiaoHang($diadiem); $a->set_GhiChu($ghichu); if ($a->ThemDonHang()) { echo "18"; } else { echo "0"; }
require_once '../../../libraries/chitietphieuxuat.php'; require_once '../../../libraries/chitietdonhang.php'; require_once '../../../libraries/hanghoa.php'; require_once '../../../libraries/loaihang.php'; require_once '../../../libraries/function.php'; if (isset($_POST['dong'])) { dongcuaso(); exit; } $ngaydat = date('d'); $thangdat = date('m'); $namdat = date('Y'); $dat = "{$namdat}-{$thangdat}-{$ngaydat}"; /////// lay tong tien tu donhang ra $iddh = $_GET['id']; $a = new DonHang(); $a->set_idDonHang($iddh); $data = $a->getdatatheogiatri("TongTien"); $a->update_tinhtrang(); //cap nhat tinh trang la da xuat cho don hang //lay danh sach hanghoa trong chitietdonhang $chitietdh = new ChiTietDonHang(); $chitietdh->set_idDonHang($iddh); $datachitietdh = $chitietdh->listChiTietDonhang(); // lay cac bien $bophan = $_POST['txtbophan']; $so = $_POST['txtso']; $no = $_POST['txtno']; $co = $_POST['txtco']; $hoten = $_POST['txthoten']; $diachi = $_POST['txtdiachi'];
echo "<script type='text/javascript'> location.href='chitiet.php?id=$id'; </script> "; }*/ // lay cac bien $bophan = $_POST['txtbophan']; $so = $_POST['txtso']; $no = $_POST['txtno']; $co = $_POST['txtco']; $hoten = $_POST['txthoten']; $diachi = $_POST['txtdiachi']; $sodienthoai = $_POST['txtsodienthoai']; $lydoxuatkho = $_POST['txtlydoxuatkho']; $xuattaikho = $_POST['txtxuattaikho']; ///// $a = new DonHang(); $a->set_idDonHang($id); $data = $a->getdata(); $ngaydat = date('d'); $thangdat = date('m'); $namdat = date('Y'); ?> <!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=utf-8" /> <title>Chi Tiết Hóa Đơn</title> <script type="text/javascript" src="../../../libraries/ajax_donhang.js"></script> <link href="../../templates/default/style_admin.css" rel="stylesheet" type="text/css" /> </head>
<?php ini_set("display_errors", 0); require_once '../../../libraries/oop.php'; require_once '../../../libraries/donhang.php'; require_once '../../../libraries/chitietdonhang.php'; $dh = new DonHang(); $ct = new ChiTietDonHang(); $id = $_GET['id']; $ct->set_idDonHang($id); $ct->Xoa_tatcaChitietDonHang(); $dh->set_idDonHang($id); $dh->XoaDonHang(); echo '17'; ?>
<td class=title width="80px">Người Nhận</td> <td class=title width="100px">Điện Thoại</td> <td class=title width="100px">Địa điểm giao</td> <td class=title width="100px">Ghi Chú</td> <td class=title width="50px">Chi Tiết</td> <td class=title width="50px">Xuất hàng</td> </tr> <?php ini_set("display_errors", 0); require_once '../../../libraries/oop.php'; require_once '../../../libraries/donhang.php'; require_once '../../../libraries/phieuxuat.php'; require_once '../../../libraries/function.php'; $donhang = new DonHang(); $data_donhang = $donhang->listDonhang(); $stt = 0; foreach ($data_donhang as $item_donhang) { if ($item_donhang['TinhTrang'] != 1) { $stt++; echo "<tr height='20px'>"; echo "<td align=center width='50px'>{$stt}</td>"; echo "<td align=center width='100px'>{$item_donhang['idDonHang']}</td>"; echo "<td align=center width='100px'><textarea id='username{$stt}' readonly='readonly' cols='5' rows='1' disabled >{$item_donhang['Username']}</textarea></td>"; echo "<td align=center width='70px'><input type='text' class='tim' id='ngaydat{$stt}' value='{$item_donhang['ThoiDiemDatHang']}' size='7' disabled='disabled'/>\r\n\t\t\t\t\t\t\t\t\t\t<input type='text' class='cam' id='ngaygiao{$stt}' value='{$item_donhang['ThoiDiemGiaoHang']}' size='7' disabled='disabled' /></td>"; echo "<td align=center width='70px'><font style='font-weight:900; color:#FF0'>" . xulygia($item_donhang['TongTien']) . "</font></td>"; echo "<td align=center width='80px'><textarea id='nguoinhan{$stt}' cols='7' rows='2' disabled='disabled' >{$item_donhang['TenNguoiNhan']}</textarea></td>"; echo "<td align=center width='100px'><input type='text' id='dienthoai{$stt}' value='{$item_donhang['DienThoai']}' size='9' disabled='disabled' /></td>"; echo "<td align=center width='100px'><textarea id='diadiemgiao{$stt}' cols='9' rows='2' disabled='disabled'>{$item_donhang['DiaDiemGiaoHang']}</textarea></td>"; echo "<td align=center width='100px'><input type='text' id='ghichu{$stt}' value='{$item_donhang['GhiChu']}' size='10' disabled='disabled'/></td>";
<?php require_once '../../../libraries/oop.php'; require_once '../../../libraries/donhang.php'; $a = new DonHang(); $id = $_GET['id']; $ngaygiao = $_GET['ngaygiao']; $nguoinhan = $_GET['nguoinhan']; $dienthoai = $_GET['dienthoai']; $diadiemgiao = $_GET['diadiemgiao']; $ghichu = $_GET['ghichu']; $a->set_idDonHang($id); $a->set_ThoiDiemGiaoHang($ngaygiao); $a->set_TenNguoiNhan($nguoinhan); $a->set_DienThoai($dienthoai); $a->set_DiaDiemGiaoHang($diadiemgiao); $a->set_GhiChu($ghichu); $a->update_donhang(); echo "16";
<script language="javascript" src="modules/user/calendar.js"></script> <?php session_start(); require_once "libraries/donhang.php"; require_once "libraries/chitietdonhang.php"; require_once "modules/user/classes/tc_calendar.php"; if (isset($_SESSION['username'])) { if (isset($_POST['ok'])) { $idDonHang = time(); $donhang = new DonHang(); $chitietdonhang = new ChiTietDonHang(); if ($_POST['txttennn'] == NULL) { $loi[] = "Xin nhập họ tên<br/>"; } else { $tennn = $_POST['txttennn']; } if ($_POST['txtdt'] == NULL) { $loi[] = "Xin nhập số điện thoại<br/>"; } else { $dt = $_POST['txtdt']; } if ($_POST['txtdc'] == NULL) { $loi[] = "Xin nhập địa chỉ<br/>"; } else { $dc = $_POST['txtdc']; } if ($_POST['date1_day'] == 0) { $loi[] = "Chưa chọn ngày giao<br/>"; } else { $ngaygiao = $_POST['date1_day']; }