示例#1
0
文件: home.php 项目: asundaram1/Test
		            	<h4 class="panel-title pull-left" style="padding-top:7px;padding-bottom:6px;">Info</h4>
		                <div class="btn-group pull-right"></div>
					</div>

		            <!-- Table -->
		            <table class="table">
		                <thead>
		                    <tr>
		                        <th>Info</th>
		                        <th>#</th>
		                        <th>Action</th>
		                    </tr>
		                </thead>
			            <tbody>
			                <?php 
$unapprovedDeals = getUnApprovedDeals();
$count = count($unapprovedDeals);
echo "<tr>";
echo "<td>Unapproved Deals</td>";
echo "<td>{$count}</td>";
echo "<td><a class='btn btn-primary btn-xs' href='unapproved_deals.php'><span class='glyphicon glyphicon-th'></span></a></td>";
echo "</tr>";
$approvedDeals = getApprovedDeals();
$count = count($approvedDeals);
echo "<tr>";
echo "<td>Approved Deals</td>";
echo "<td>{$count}</td>";
echo "<td><a class='btn btn-primary btn-xs' href='approved_deals.php'><span class='glyphicon glyphicon-th'></span></a></td>";
echo "</tr>";
$categories = getCategories();
$count = count($categories);
示例#2
0
<?php

require 'routes/RouteHome.php';
require 'routes/RouteDeal.php';
$deals = getUnApprovedDeals();
$search_criteria = "";
if (isset($_POST['button_search'])) {
    $search_criteria = trim(strip_tags($_POST['search']));
    $deals = getSearchDeals($search_criteria, 0);
}
if (!empty($_SERVER['QUERY_STRING'])) {
    $params = getParams();
    if ($params == null) {
        header("Location: 403.php");
        return;
    }
    if (count($params) == 0) {
        header("Location: 403.php");
        return;
    }
    if (!empty($params['action_delete'])) {
        deleteDeal($params['deal_id'], "unapproved_deals.php");
    }
}
?>

<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">