当前位置: 首页>>代码示例>>PHP>>正文


PHP Backend::getChild方法代码示例

本文整理汇总了PHP中Backend::getChild方法的典型用法代码示例。如果您正苦于以下问题:PHP Backend::getChild方法的具体用法?PHP Backend::getChild怎么用?PHP Backend::getChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Backend的用法示例。


在下文中一共展示了Backend::getChild方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Backend

<?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'];
?>
开发者ID:hoangnhonline,项目名称:hoa-tuoi,代码行数:31,代码来源:lichtrinh_sua.php

示例2: Backend

<?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>";
    }
}
开发者ID:hoangnhonline,项目名称:bds-sth,代码行数:26,代码来源:child.php

示例3: Backend

<?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>";
    }
}
开发者ID:hoangnhonline,项目名称:bds-sth,代码行数:24,代码来源:get-child.php

示例4: Backend

<?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 
开发者ID:hoangnhonline,项目名称:hoa-tuoi,代码行数:31,代码来源:form.php

示例5: Backend

<?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 
开发者ID:hoangnhonline,项目名称:hoa-tuoi,代码行数:31,代码来源:lichtrinh_them.php

示例6: foreach

                        <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 
开发者ID:hoangnhonline,项目名称:bds-sth,代码行数:30,代码来源:list.php

示例7: isset

<?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";
开发者ID:hoangnhonline,项目名称:phong-tro-sg,代码行数:31,代码来源:district.php

示例8: Backend

<?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">
开发者ID:hoangnhonline,项目名称:hoa-tuoi,代码行数:31,代码来源:list.php


注:本文中的Backend::getChild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。