コード例 #1
0
<?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"';
コード例 #2
0
        $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='******'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'])) {
コード例 #3
0
<?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">
コード例 #4
0
 $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 {
コード例 #5
0
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'] : '******';
    ?>
'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 
            echo "<b>From :</b> " . date("l jS F, Y", strtotime($row['check_in'])) . '<br /><b>To :</b> ' . date("l jS F, Y", strtotime($row['check_out']));
            ?>
</td>
											<td><?php 
            echo date("l jS F, Y", strtotime($row['sent_date']));
            ?>
</td>
										</tr>								
										<?php 
            $cnt++;
        }
    }
    ?>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		<!--End Advanced Tables -->
		</div>
	</div>
	<?php 
}