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


PHP AdminController::getTableData方法代码示例

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


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

示例1: AdminController

<?php

include 'header.php';
$msg = '';
$class = '';
$display = 'style="display:none"';
$data['id'] = '';
$data['business_email'] = '';
$data['mode'] = '';
$data['currency'] = '';
$data['table'] = 'paypal_settings';
$adminController = new AdminController();
$result = $adminController->getTableData($data);
if (!empty($result)) {
    $row = mysql_fetch_array($result);
    $data['id'] = $row['id'];
    $data['business_email'] = $row['business_email'];
    $data['mode'] = $row['mode'];
    $data['currency'] = $row['currency'];
}
if (!empty($_POST['btnSubmit'])) {
    $data['business_email'] = $_POST['txtBusinessEmail'];
    $data['mode'] = $_POST['rdoMode'];
    $data['currency'] = $_POST['ddlCurrency'];
    if (!empty($_POST['hdnId'])) {
        $data['id'] = $_POST['hdnId'];
    }
    if ($adminController->insertUpdateLocationData($data) > 0) {
        $msg = 'Saved successfully';
        $class = 'success';
        $display = 'style="display:block"';
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:paypal_setting.php

示例2:

        $data['district_id'] = $row['district_id'];
        $data['fax'] = $row['fax'];
        $data['postal_code'] = $row['postal_code'];
        $data['facebook_url'] = $row['facebook_url'];
        $data['twitter_url'] = $row['twitter_url'];
        $data['sms_time'] = $row['sms_time'];
    }
}
if (!empty($_POST['btnSubmit'])) {
    $uniqueData['select'] = "id";
    $uniqueData['table'] = 'users';
    $uniqueData['where'][] = "(username='" . $_POST['txtUsername'] . "' OR email='" . $_POST['txtEmail'] . "' OR contact='" . $_POST['txtContact'] . "')";
    if (!empty($_POST['hdnId'])) {
        $uniqueData['where'][] = "id!='" . $_POST['hdnId'] . "'";
    }
    $uniqueResult = $adminController->getTableData($uniqueData);
    $userCount = mysql_num_rows($uniqueResult);
    if ($userCount == 0) {
        $flag = 1;
    } else {
        $flag = 0;
        $msg = 'Username, Email and Contact must be unique.';
        $class = 'danger';
    }
    if ($flag) {
        $uploadFlag = 1;
        $data['firstname'] = $_POST['txtFirstname'];
        $data['lastname'] = $_POST['txtLastname'];
        $data['username'] = $_POST['txtUsername'];
        $data['email'] = $_POST['txtEmail'];
        if (!empty($_FILES['fileImage']['name'])) {
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:add_edit_users.php

示例3: header

<?php

include 'header.php';
if (empty($_GET['q'])) {
    header('location:' . ADMIN_SITE_URL . 'orders.php');
}
$id = base64_decode($_GET['q']);
$data['select'] = 'o.*, pt.*';
$data['table'] = 'orders o, payment_transaction pt';
$data['where'] = array('o.id = pt.order_id', 'pt.order_id = ' . $id);
$adminController = new AdminController();
$dataOrder = $adminController->getTableData($data);
$order = mysql_fetch_assoc($dataOrder);
?>
<div class="row">
	<div class="col-md-12">
		<h1 class="page-header">
			Order #<?php 
echo $order['order_id'];
?>
		</h1>
	</div>
</div>

<div class='row'>
	<div class="col-md-6">
		<div class="panel panel-primary">
			<div class="panel-heading">
				Customer Information
			</div>
			<div class="panel-body">
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:view_orders.php

示例4: date

 $data['message'] = $_POST['txtMessage'];
 $data['send_on'] = date("Y-m-d H:i:s");
 if ($_POST['ddlTo'] != "0") {
     if (!empty($data['to'])) {
         $toList = explode(";", $data['to']);
     }
     $dataUser['table'] = 'users';
     switch ($_POST['ddlTo']) {
         case "2":
             $dataUser['where'] = array('type=0');
             break;
         case "3":
             $dataUser['where'] = array('type=1');
             break;
     }
     $resultData = $adminController->getTableData($dataUser);
     if (mysql_num_rows($resultData) > 0) {
         while ($rowData = mysql_fetch_array($resultData)) {
             $toList[] = $rowData['email'];
         }
     }
     if (!empty($toList) && count($toList) > 0) {
         $toList = array_unique($toList);
         $data['to'] = implode(";", $toList);
     }
 }
 if ($adminController->sentMail($data) > 0) {
     $msg = 'Mail sent successfully';
     $class = 'success';
     $display = 'style="display:block"';
 } else {
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:compose_email.php

示例5: establishmentBooking

function establishmentBooking()
{
    $userID = base64_decode($_REQUEST['q']);
    $adminController = new AdminController();
    $dataUser['select'] = "username,type";
    $dataUser['table'] = 'users';
    $dataUser['where'] = array("id='" . $userID . "'");
    $resultUser = $adminController->getTableData($dataUser);
    $userDetails = mysql_fetch_array($resultUser);
    $userTypeTitle = $userDetails['type'] ? 'establishment' : 'private';
    $data['select'] = "booking_requests.sent_date, booking_requests.check_in, booking_requests.check_out, booking_requests.message, establishments.name, establishments.email, users.username, countries.name country_name, states.name state_name, cities.name city_name, districts.name district_name";
    $data['table'] = 'booking_requests, establishments 
										LEFT JOIN users ON users.id = establishments.user_id
										LEFT JOIN countries ON countries.id = establishments.country_id
										LEFT JOIN states ON states.id = establishments.state_id
										LEFT JOIN cities ON cities.id = establishments.city_id
										LEFT JOIN districts ON districts.id = establishments.district_id';
    $data['where'] = array("booking_requests.from_id='" . $userID . "'", "booking_requests.establishment_id = establishments.id");
    if ($_REQUEST['bookingStatus'] == 0 || $_REQUEST['bookingStatus'] == 1 || $_REQUEST['bookingStatus'] == 2) {
        $data['where'][] = "booking_requests.status='" . $_REQUEST['bookingStatus'] . "'";
    }
    $data['order'] = 'sent_date DESC';
    $result = $adminController->getTableData($data);
    $totalEstablishment = mysql_num_rows($result);
    if ($_REQUEST['fromPage'] == 'viewUser') {
        $backLink = "view_users.php?userType=" . $userTypeTitle . "&q=" . base64_encode($userID);
    } else {
        $backLink = "listingUser.php?userType=" . $userTypeTitle;
    }
    ?>
	<div class="row">
		<div class="col-md-12">
			<h1 class="page-header">
				<?php 
    echo $userDetails['username'] ? $userDetails['username'] : 'User';
    ?>
's Booking(s) Listing<br /><small><i>Total No. of Booking(s): <?php 
    echo $totalEstablishment;
    ?>
</i></small>
			</h1>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
		<!-- Advanced Tables -->
			<div class="panel panel-default">
				<div class="panel-heading text-right"><a href="<?php 
    echo $backLink;
    ?>
" class="btn btn-primary functionality-link" title="Back"><i class="fa fa-arrow-left"></i></a></div>
				<div class="panel-body">
					<div class="table-responsive">
						<table class="table table-striped table-bordered table-hover" id="dataTables-example">
							<thead>
								<tr>
									<th>Sl No.</th>
									<th>Establishment Name</th>
									<th>Establishment Owner</th>
									<th>Establishment Location</th>
									<!--<th>Message</th>-->
									<th>Booking Period</th>
									<th>Requested On</th>
								</tr>
							</thead>
							<tbody>
								<?php 
    if (!empty($result)) {
        $cnt = 1;
        while ($row = mysql_fetch_array($result)) {
            ?>
										<tr id="item-<?php 
            echo $row['id'];
            ?>
">
											<td><?php 
            echo $cnt;
            ?>
</td>
											<td><?php 
            echo $row['name'];
            ?>
</td>
											<td><?php 
            echo $row['username'] . '<br />' . $row['email'];
            ?>
</td>
											<td>
												<?php 
            echo $row['country_name'];
            echo !empty($row['state_name']) ? ',<br />' . $row['state_name'] . ',' : '';
            echo !empty($row['city_name']) ? '<br />' . $row['city_name'] . ',' : '';
            echo !empty($row['district_name']) ? '<br />' . $row['district_name'] : '';
            ?>
											</td>
											<!--<td><?php 
            echo $row['message'];
            ?>
</td>-->
											<td><?php 
//.........这里部分代码省略.........
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:101,代码来源:listingUserStatistic.php


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