Location: PHPKode > scripts > PHP Hosting Directory > phphost_directoryv2/include/admin.orders.php
<?

if ($request[2] == 'delete' && $request[3] != '')
{
	mysql_query("DELETE FROM `hsl_order` WHERE `order_id`='".$request[3]."'");
	java_redirect($config['base_url']."admin/orders");
}

$plans = array(
                1 => 'Premium 1 month',
                2 => 'Premium 3 month',
                3 => 'Premium 12 month',
                4 => 'Executive 1 month',
                5 => 'Executive 3 month',
                6 => 'Executive 12 month'
               );

$sql = "SELECT o.*, p.`price` AS amount, DATE_FORMAT(o.`postdate`,'%d.%m.%Y [%T]') AS date FROM `hsl_order` o LEFT JOIN `hsl_price` p ON o.`price_id`=p.`price_id` ORDER BY `order_id`";
$res = mysql_query($sql);

$orders = array();
while ($row = mysql_fetch_assoc($res))
{
  $row['plan'] = $plans[$row['price_id']];
  $orders[] = $row;
}
$t->assign('orders', $orders);

$t->assign('main_html', 'admin_'.$request[1].'.html');

?>
Return current item: PHP Hosting Directory