Beispiel #1
0
<?php

require_once '../../../libraries/oop.php';
require_once '../../../libraries/congty.php';
$a = new CongTy();
$id = $_GET['id'];
$loai = $_GET['loai'];
$ten = $_GET['ten'];
$a->set_tencongty($ten);
$a->set_idcongty($id);
$a->set_idloaihang($loai);
if ($a->update_congty()) {
    echo "4";
} else {
    echo "0";
}
Beispiel #2
0
function laydatahanghoa($idct)
{
    $ct = new CongTy();
    $ct->set_idcongty($idct);
    return $ct->listhanghoa();
}
Beispiel #3
0
ini_set("display_errors", 0);
require_once '../../../libraries/oop.php';
require_once '../../../libraries/congty.php';
require_once '../../../libraries/loaihang.php';
require_once '../../../libraries/hanghoa.php';
require_once '../../../libraries/function.php';
$idhang = $_GET['idhang'];
$a = new HangHoa();
$a->set_idhang($idhang);
$data = $a->getdata();
$hinh = $data[UrlHinh];
$tenhang = $data[TenHang];
$mota = $data[MoTa];
$congty = new CongTy();
$congty->set_idcongty($data['idCongTy']);
$data_congty = $congty->getdata();
$loaihang = new LoaiHang();
$loaihang->set_idloai($data_congty['idLoaiHang']);
$data_loaihang = $loaihang->getdata();
$thumuc = locdau($data_loaihang[TenLoai]);
$duongdan = "../../../images/" . $thumuc . "/";
if (isset($_POST['ok'])) {
    if ($_FILES['img']['name'] != "" || $_POST['txtfull'] != "") {
        if ($_FILES['img']['name'] != "") {
            if (!is_dir($duongdan)) {
                mkdir($duongdan);
            }
            move_uploaded_file($_FILES['img']['tmp_name'], $duongdan . $_FILES['img']['name']);
            if ($hinh != "" || $hinh != "none") {
                unlink($hinh);
Beispiel #4
0
<?php

ini_set("display_errors", 0);
require_once '../../../libraries/oop.php';
require_once '../../../libraries/loaihang.php';
require_once '../../../libraries/congty.php';
require_once '../../../libraries/hanghoa.php';
$idcongty = $_GET['idcongty'];
$congty = new CongTy();
$congty->set_idcongty($idcongty);
$data_hang = $congty->listhanghoa();
echo "<option value='-1'>----Chọn----</option>";
foreach ($data_hang as $item_hang) {
    ?>
					<option value='<?php 
    echo $item_hang['idHang'];
    ?>
'><?php 
    echo $item_hang['TenHang'];
    ?>
</option> <?php 
}
?>