Beispiel #1
0
<?php

$id = 0;
$is_detail = false;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("pages", $id);
    $is_detail = true;
}
?>
<div class="row">
    <div class="col-md-12">
        <section class="content-header">     
          <ol class="breadcrumb">
            <li><a href="index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="index.php?mod=pages&act=list">Trang nội dung</a></li>              
          </ol>
        </section>
        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=pages&act=list'">
            Danh sách
        </button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h2 class="box-title" style="text-tranform:uppercase !important;color: #B10007">
                    <?php 
echo $id > 0 ? "Cập nhật" : "Tạo mới";
Beispiel #2
0
<?php

$id = 0;
$is_detail = false;
$cate_type_id = $parent_id = $menu_type = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("cate", $id);
    $is_detail = true;
}
$cateTypeArr = $model->getListCateType();
if ($is_detail) {
    $cate_type_id = $detail['cate_type_id'];
    $detailCateType = $model->getDetail('cate_type', $cate_type_id);
    $parent_id = $detail['parent_id'];
    $detailParent = $model->getDetail('cate', $parent_id);
    $menu_type = $detail['menu_type'];
} else {
    if (isset($_GET['cate_type_id']) && $_GET['cate_type_id'] > 0) {
        $cate_type_id = $_GET['cate_type_id'];
        $detailCateType = $model->getDetail('cate_type', $cate_type_id);
    }
    if (isset($_GET['parent_id']) && $_GET['parent_id'] > 0) {
        $parent_id = $_GET['parent_id'];
        $detailParent = $model->getDetail('cate', $parent_id);
        $cate_type_id = $detailParent['cate_type_id'];
    }
    if (isset($_GET['menu_type']) && $_GET['menu_type'] > 0) {
        $menu_type = $_GET['menu_type'];
Beispiel #3
0
<?php

$id = 11;
require_once "model/Backend.php";
$model = new Backend();
$detail = $model->getDetail("text", $id);
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=text&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Tạo mới";
?>
 text</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/Text.php">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
    echo $id;
    ?>
" name="id" />
Beispiel #4
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("articles_cate", $id);
}
?>
<div class="row">
    <div class="col-md-12">
        <section class="content-header">     
          <ol class="breadcrumb">
            <li><a href="index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="index.php?mod=cate-articles&act=list">Danh mục tin tức</a></li>       
          </ol>
        </section>
        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=cate-articles&act=list'">
            Danh sách
        </button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h2 class="box-title" style="text-tranform:uppercase !important;color: #B10007">
                    <?php 
echo $id > 0 ? "Cập nhật" : "Tạo mới";
?>
  danh mục tin tức <?php 
Beispiel #5
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("footer", $id);
}
?>
<div class="row">
    <div class="col-md-12">
        <section class="content-header">     
          <ol class="breadcrumb">
            <li><a href="index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="index.php?mod=footer&act=list">Nội dung footer</a></li>       
          </ol>
        </section>
        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=footer&act=list'">
            Danh sách
        </button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h2 class="box-title" style="text-tranform:uppercase !important;color: #B10007">
                    <?php 
echo $id > 0 ? "Cập nhật" : "Tạo mới";
?>
  nội dung footer <?php 
Beispiel #6
0
<?php

require_once "model/Backend.php";
$model = new Backend();
$link = "index.php?mod=page&act=list";
$detail = array();
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    $data = $model->getDetail("pages", $id);
}
?>
<div class="row">
    <div class="col-md-12">
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=page&act=list'">Danh sách</button>
        <form method="post"  action="controller/Page.php" enctype="multipart/form-data">

        <div class="col-md-6">

            <!-- Custom Tabs -->

            <div style="clear:both;margin-bottom:10px"></div>

            <div class="box-header">

                <h3 class="box-title"><?php 
echo isset($id) && $id > 0 ? "Cập nhật" : "Tạo mới";
?>
 
                    trang 
                    <?php 
echo isset($id) && $id > 0 ? " : " . $data['page_name'] : "";
Beispiel #7
0
<?php

if ($_SESSION['level'] == 1) {
    $user_id = isset($_GET['user_id']) ? (int) $_GET['user_id'] : -1;
} else {
    $user_id = $_SESSION['user_id'];
}
require_once "model/Backend.php";
$model = new Backend();
$link = "index.php?mod=doanhthu&act=list";
$detail = array();
if (isset($_GET['house_id']) && $_GET['house_id'] > 0) {
    $house_id = (int) $_GET['house_id'];
    $detail = $model->getDetail('house', $house_id);
} else {
    $house_id = -1;
}
$month = isset($_GET['month']) ? (int) $_GET['month'] : -1;
$year = isset($_GET['year']) ? (int) $_GET['year'] : -1;
if ($_SESSION['level'] == 1) {
    $user_id = -1;
} else {
    $user_id = $_SESSION['user_id'];
}
$arrList = $model->getChiPhiTotalHouse($house_id, $user_id, $month, $year);
$modArr = $model->getList('users', -1, -1, array('level' => 2));
/* get list house */
$arrCustom = array('type' => 1);
if ($_SESSION['level'] == 1) {
    $arrCustom['user_id'] = -1;
} else {
Beispiel #8
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("convenient", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=convenient&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Thêm mới";
?>
 tiện nghi</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/Convenient.php" enctype="multipart/form-data">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
Beispiel #9
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $data = $model->getDetail("seo", $id);
}
?>
<div class="row">
    <div class="col-md-12" >
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=seo&act=list'">SEO List</button>
        <form method="post"  action="controller/Seo.php" enctype="multipart/form-data">

        <div class="col-md-10" style="background-color:#FFF">

            <!-- Custom Tabs -->

            <div style="clear:both;margin-bottom:10px"></div>

            <div class="box-header">

                <h3 class="box-title"><?php 
echo isset($id) && $id > 0 ? "Update SEO info " : "Tạo mới";
?>
                      
                    <?php 
echo isset($id) && $id > 0 ? " : " . $data['page_name'] : "";
?>
</h3>
Beispiel #10
0
<?php

$id = 0;
$is_detail = false;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("banner", $id);
    $is_detail = true;
}
$position_id = isset($_GET['position_id']) ? (int) $_GET['position_id'] : 0;
?>
<div class="row">
    <div class="col-md-12">
        <section class="content-header">     
          <ol class="breadcrumb">
            <li><a href="index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="index.php?mod=banner&act=index">Banner</a></li>              
          </ol>
        </section>
        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=banner&act=list&position_id=<?php 
echo $position_id;
?>
'">
            Danh sách
        </button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
Beispiel #11
0
<?php

$id = 0;
$is_detail = false;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("articles", $id);
    $is_detail = true;
}
$cateArr = $model->getList('articles_cate', -1, -1);
?>
<div class="row">
    <div class="col-md-12">
        <section class="content-header">     
          <ol class="breadcrumb">
            <li><a href="index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="index.php?mod=articles&act=list">Tin tức</a></li>              
          </ol>
        </section>
        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=articles&act=list'">
            Danh sách
        </button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h2 class="box-title" style="text-tranform:uppercase !important;color: #B10007">
                    <?php 
Beispiel #12
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("purpose", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=purpose&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Tạo mới";
?>
 mục đích</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/Purpose.php">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
Beispiel #13
0
<?php

if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    $contract_id = (int) $_GET['contract_id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("doanh_thu", $id);
    $detailHD = $model->getDetail('contract', $contract_id);
    $object_type = $detailHD['object_type'];
    $object_id = $detailHD['object_id'];
    if ($object_type == 1) {
        $detailObject = $model->getDetail('objects', $object_id);
        $house_id = $detailObject['house_id'];
        $arrServiceHouse = $model->getHouseServices($house_id);
        $conArr = $model->getList('convenient', -1, -1);
        $conArr = $conArr['data'];
        //var_dump("<pre>", $arrServiceHouse);
    }
    $arrPriceDT = $model->getDoanhThuThang($id, 1);
    $arrServiceDT = $model->getDoanhThuThang($id, 2);
    $arrConvenientDT = $model->getDoanhThuThang($id, 3);
    $arrService = $model->getList('services', -1, -1);
    $arrCon = $model->getList('convenient', -1, -1);
    $haveDoanhThu = $model->checkDoanhThu($contract_id);
    $serviceSelectedArr = $model->getContractService($contract_id);
    $conSelectedArr = $model->getContractCon($contract_id);
}
?>
<div class="row">
    <div class="col-md-8">
Beispiel #14
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("services", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=services&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Thêm mới";
?>
 dịch vụ</h3>

            </div><!-- /.box-header -->
            <div class="box-body">
            <!-- form start -->
            <form role="form" method="post" action="controller/Services.php">
                <?php 
if ($id > 0) {
    ?>
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detailEvent = $model->getDetail("events", $id);
    $imageArr = $model->getChild("images", "object_id", $id, 2);
    $lichArr = $model->getChild("event_content", "event_id", $id);
    if (!empty($lichArr)) {
        foreach ($lichArr as $key => $value) {
            $dayArr['content_vi'][$value['days']][] = $value['content_vi'];
            $dayArr['content_en'][$value['days']][] = $value['content_en'];
        }
    }
}
?>
<div class="row">
    <div class="col-md-12">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=event&act=list'">LIST</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h2 class="box-title" style="text-tranform:uppercase !important;color: #B10007">
                    LỊCH TRÌNH EVENT : <?php 
echo $detailEvent['name_vi'];
?>
Beispiel #16
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("album", $id);
    $imageArr = $model->getChild("images", "object_id", $id, 1);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=album&act=list'">LIST</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h2 class="box-title" style="text-tranform:uppercase !important;color: #B10007"><?php 
echo $id > 0 ? "UPDATE" : "CREATE";
?>
 ALBUM</h2>
                <div class="clearfix"></div>
            </div><!-- /.box-header -->
            <div class="clearfix"></div>
            <div class="box-body">
            <!-- form start -->
            <form role="form" method="post" action="controller/Album.php" enctype="multipart/form-data">
                <?php 
Beispiel #17
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    $contract_id = (int) $_GET['contract_id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("doanh_thu", $id);
    $detailHD = $model->getDetail('contract', $contract_id);
    $arrPriceDT = $model->getDoanhThuThang($id, 1);
    $arrServiceDT = $model->getDoanhThuThang($id, 2);
    $arrConvenientDT = $model->getDoanhThuThang($id, 3);
    $arrService = $model->getList('services', -1, -1);
    $arrCon = $model->getList('convenient', -1, -1);
}
?>
<div class="row">   
   
    <div class="col-md-12">

        <!-- Custom Tabs -->

        <button class="btn btn-default btn-sm" onclick="location.href='index.php?mod=doanhthu&act=list&contract_id=<?php 
echo $contract_id;
?>
'">Quay lại</button>
        <?php 
if ($detailHD['status'] == 1) {
    ?>
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=doanhthu&act=form&id=<?php 
Beispiel #18
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("city", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=city&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Thêm mới";
?>
 Tỉnh / Thành</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/City.php">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
Beispiel #19
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("expense", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=expense&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Tạo mới";
?>
 loại chi phí</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/Expense.php">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
Beispiel #20
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("direction", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=direction&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Tạo mới";
?>
 hướng nhà</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/Direction.php">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
Beispiel #21
0
$model = new Backend();
$link = $link_back = "index.php?mod=articles&act=list";
$link_form = "index.php?mod=articles&act=form";
if (isset($_GET['name_vi']) && $_GET['name_vi'] != '') {
    $arrCustom['name_vi'] = $model->processData($_GET['name_vi']);
    $link .= "&name=" . $arrCustom['name_vi'];
    $link_back .= "&name=" . $arrCustom['name_vi'];
} else {
    $arrCustom['name_vi'] = '';
}
if (isset($_GET['cate_id']) && $_GET['cate_id'] > 0) {
    $cate_id = $_GET['cate_id'];
    $link .= "&cate_id=" . $cate_id;
    $link_form .= "&cate_id=" . $cate_id;
    $arrCustom['cate_id'] = $cate_id;
    $detailParent = $model->getDetail('articles_cate', $cate_id);
} else {
    $cate_id = -1;
}
if (isset($_GET['is_hot'])) {
    $is_hot = $_GET['is_hot'];
    $link .= "&is_hot=" . $is_hot;
    $link_form .= "&is_hot=" . $is_hot;
    $arrCustom['is_hot'] = $is_hot;
} else {
    $is_hot = -1;
}
$table = "articles";
$listTotal = $model->getList($table, -1, -1, $arrCustom);
$total_record = $listTotal['total'];
$total_page = ceil($total_record / 100);
Beispiel #22
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("addon", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=addon&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Thêm mới";
?>
 tiện ích</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/Addon.php">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
Beispiel #23
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("estate_type", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=estate_type&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Tạo mới";
?>
 loại bất động sản</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/Estate.php">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
Beispiel #24
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("old_event", $id);
    $imageArr = $model->getChild("images", "object_id", $id, 3);
}
?>
<div class="row">
    <div class="col-md-12">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=old&act=list'">LIST</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h2 class="box-title" style="text-tranform:uppercase !important;color: #B10007"><?php 
echo $id > 0 ? "UPDATE" : "CREATE";
?>
 OLD EVENT</h2>
                <div class="clearfix"></div>
            </div><!-- /.box-header -->
            <div class="clearfix"></div>
            <div class="box-body">
            <!-- form start -->
            <form role="form" method="post" action="controller/Old.php" enctype="multipart/form-data">
                <?php 
Beispiel #25
0
                            </a>   
<?php 
        if ($row['status'] == 2) {
            ?>
<span class="label label-danger">Đã kết thúc</span>                       
<?php 
        } else {
            ?>
<span class="label label-info">Đang hiệu lực</span>                       
<?php 
        }
        ?>
                    
                            <br />     
                            <?php 
        $detail = $model->getDetail("objects", $row['object_id']);
        ?>

                            <?php 
        echo $row['object_type'] == 1 ? "Phòng" : "Nhà";
        ?>
 : 
                            <a href="index.php?mod=<?php 
        echo $table;
        ?>
&act=form&id=<?php 
        echo $row['object_id'];
        ?>
" target="_blank">
                            <?php 
        echo $detail['name'];
Beispiel #26
0
<?php

$id = 0;
$cityArr = $model->getList('city', -1, -1);
$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
if (isset($_GET['id'])) {
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("users", $id);
} else {
    $pass = randomPassword();
}
function randomPassword()
{
    $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
    $pass = array();
    //remember to declare $pass as an array
    $alphaLength = strlen($alphabet) - 1;
    //put the length -1 in cache
    for ($i = 0; $i < 8; $i++) {
        $n = rand(0, $alphaLength);
        $pass[] = $alphabet[$n];
    }
    return implode($pass);
    //turn the array into a string
}
?>
<div class="row">
   <div class="col-md-12">
      <!-- Custom Tabs -->        
      <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=user&act=list'">Danh sách</button>        
Beispiel #27
0
     $contract_id = $model->insert('contract', $contractArr);
     $start = $_POST['start_date'];
     $current = date('d-m-Y');
     if ($current < $start) {
         $status = 2;
         // coc
     } else {
         $status = 3;
         // dang o
     }
     mysql_query("UPDATE objects SET status = {$status} WHERE id = {$object_id} AND object_type = {$object_type}");
 }
 mysql_query("DELETE FROM contract_service WHERE contract_id = {$contract_id}");
 //save service
 if ($object_type == 1) {
     $detailTaiSan = $model->getDetail('objects', $object_id);
     if ($detailTaiSan['house_id'] > 0) {
         $arrServiceHouse = $model->getHouseServices($detailTaiSan['house_id']);
     }
     if (!empty($_POST['service_id'])) {
         foreach ($_POST['service_id'] as $service_id) {
             $dataService['service_id'] = $service_id;
             $dataService['contract_id'] = $contract_id;
             $dataService['cal_type'] = $arrServiceHouse[$service_id]['cal_type'];
             $model->insert('contract_service', $dataService);
         }
     }
     mysql_query("DELETE FROM contract_convenient WHERE contract_id = {$contract_id}");
     //save convenient
     if (!empty($_POST['convenient_id'])) {
         foreach ($_POST['convenient_id'] as $convenient_id) {
Beispiel #28
0
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("customers", $id);
}
?>
<div class="row">
    <div class="col-md-8">

        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=customers&act=list'">Danh sách</button>
        <div style="clear:both;margin-bottom:10px"></div>

        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php 
echo $id > 0 ? "Cập nhật" : "Thêm mới";
?>
 khách hàng</h3>

            </div><!-- /.box-header -->
            <!-- form start -->
            <form role="form" method="post" action="controller/Customer.php">
                <?php 
if ($id > 0) {
    ?>
                <input type="hidden" value="<?php 
Beispiel #29
0
<?php

if ($_SESSION['level'] == 1) {
    $user_id = isset($_GET['user_id']) ? (int) $_GET['user_id'] : -1;
} else {
    $user_id = $_SESSION['user_id'];
}
require_once "model/Backend.php";
$model = new Backend();
$link = "index.php?mod=doanhthu&act=list";
if (isset($_GET['contract_id']) && $_GET['contract_id'] > 0) {
    $contract_id = (int) $_GET['contract_id'];
    $detail = $model->getDetail('contract', $contract_id);
} else {
    $contract_id = -1;
}
$month = isset($_GET['month']) ? (int) $_GET['month'] : -1;
$year = isset($_GET['year']) ? (int) $_GET['year'] : -1;
$arrList = $model->getDoanhThuTotalUser($user_id, $month, $year);
$modArr = $model->getList('users', -1, -1, array('level' => 2));
?>
<form id="exportForm" action="export.php">
    <input type="hidden" name="user_id" value="<?php 
echo $user_id;
?>
">
    <input type="hidden" name="year" value="<?php 
echo $year;
?>
">
    <input type="hidden" name="month" value="<?php 
Beispiel #30
0
<?php

$id = 0;
$is_detail = false;
$arrLink = array();
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detail = $model->getDetail("block", $id);
    $is_detail = true;
    $rs = mysql_query("SELECT * FROM link WHERE block_id = {$id} ORDER BY id ASC");
    while ($row = mysql_fetch_assoc($rs)) {
        $arrLink[] = $row;
    }
}
$current = count($arrLink);
$balance = 7 - $current;
?>
<div class="row">
    <div class="col-md-12">
        <section class="content-header">     
          <ol class="breadcrumb">
            <li><a href="index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="index.php?mod=block&act=list">Link footer</a></li>              
          </ol>
        </section>
        <!-- Custom Tabs -->
        <button class="btn btn-primary btn-sm" onclick="location.href='index.php?mod=block&act=list'">
            Danh sách
        </button>