Example #1
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'];
?>
Example #2
0
<?php

session_start();
require_once "../backend/model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$child = $_POST['child'];
$arrCustom = array();
if ($child == "type_bds") {
    echo "<option data-alias='' value='0'>-- Loại nhà đất --</option>";
    $arrResult = $model->getChild('type_bds', 'type', $id);
}
if ($child == "district") {
    echo "<option data-alias='' value='0'>-- Chọn Quận/Huyện --</option>";
    $arrResult = $model->getChild('district', 'city_id', $id);
}
if ($child == "price") {
    echo "<option data-alias='' value='0'>-- Chọn khoảng giá --</option>";
    $arrResult = $model->getChild('price', 'type', $id);
}
//$arrResult = $model->getChild($table, $column, $id, -1, $arrCustom);
if (!empty($arrResult)) {
    foreach ($arrResult as $key => $value) {
        echo "<option data-alias='" . $value['alias'] . "' value='" . $value['id'] . "'>" . $value['name'] . "</option>";
    }
}
Example #3
0
<?php

session_start();
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$column = $_POST['column'];
$table = $_POST['table'];
$type = isset($_POST['type']) ? $_POST['type'] : "form";
$arrCustom = array();
if ($table == "district") {
    if ($_SESSION['level'] == 1) {
        $arrCustom['user_id'] = -1;
    } else {
        $arrCustom['user_id'] = $_SESSION['user_id'];
    }
}
$arrResult = $model->getChild($table, $column, $id, -1, $arrCustom);
echo $type == 'form' ? "<option value='0'>--chọn--</option>" : "<option value='0'>--Tất cả--</option>";
if (!empty($arrResult)) {
    foreach ($arrResult as $key => $value) {
        echo "<option value='" . $key . "'>" . $value['name'] . "</option>";
    }
}
Example #4
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 
<?php

$id = 0;
if (isset($_GET['id'])) {
    $id = (int) $_GET['id'];
    require_once "model/Backend.php";
    $model = new Backend();
    $detailEvent = $model->getDetail("events", $id);
    $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'];
?>
 ( <?php 
Example #6
0
                        <th>Email</th>
                        <th>Số nhà cho thuê</th>

                        <th>Số phòng cho thuê</th>

                        <th style="width: 40px">Action</th>

                    </tr>
                     <?php 
$i = ($page - 1) * LIMIT;
if (!empty($list['data'])) {
    foreach ($list['data'] as $key => $row) {
        if ($row['level'] > 1) {
            $user_id = $row['id'];
            $arrAsset = $model->getChild('district', 'user_id', $user_id);
            $string_district_id = "";
            $arrDistrictAsset = array();
            if (!empty($arrAsset)) {
                foreach ($arrAsset as $value) {
                    $string_district_id .= $value['id'] . ",";
                }
                $string_district_id = rtrim($string_district_id, ",");
                $arrDistrictAsset = $model->getListByStringId('district', $string_district_id);
            }
            $i++;
            ?>
                  
                    <tr>

                        <td><?php 
Example #7
0
<?php

session_start();
$user_id = isset($_POST['user_id']) ? (int) $_POST['user_id'] : 0;
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['city_id'];
$arrResult = $model->getChild("district", 'city_id', $id);
$arrSelected = array();
if ($user_id > 0) {
    $arrSelected = $model->getListDistrictIDAsset($user_id);
}
$arrChoosed = array();
$sql = "SELECT id FROM district ";
if ($user_id > 0) {
    $sql .= " WHERE user_id <> {$user_id} ";
}
$s = mysql_query($sql);
while ($r = mysql_fetch_assoc($s)) {
    $arrChoosed[] = $r['id'];
}
if (!empty($arrResult)) {
    foreach ($arrResult as $value) {
        if (!in_array($value['id'], $arrChoosed)) {
            ?>
		<div class="col-md-3" style="height:40px">
			<div class="form-group">
				<label><input type="checkbox" name="district_id[]" 
					<?php 
            if (in_array($value['id'], $arrSelected)) {
                echo "checked=checked";
Example #8
0
<?php

require_once "model/Backend.php";
$model = new Backend();
$link = "index.php?mod=banner&act=list";
$position_id = (int) $_GET['position_id'];
$arrList = $model->getChild("banner", "position_id", $position_id);
?>
<div class="row">
    <div class="col-md-12">               
        <?php 
if (!in_array($position_id, array(2, 3, 6, 7))) {
    ?>
        <button class="btn btn-primary btn-sm right" 
        onclick="location.href='index.php?mod=banner&act=form&position_id=<?php 
    echo $position_id;
    ?>
'">
        Tạo mới</button>        
        <?php 
}
?>
        <button class="btn btn-primary btn-sm right" 
        onclick="location.href='index.php?mod=banner&act=index'">
        Back</button>
        <div class="box-header">
            <h3 class="box-title">Danh sách banner</h3>
        </div><!-- /.box-header -->
        <div class="box">
            
            <div class="box-body">