예제 #1
0
<?php

require "common_all.php";
$type = (int) $_GET["type"];
$name = $_GET["name"];
$supplier = new Supplier();
$results = $supplier->GetList(array(array("supplier_category_id", "=", $type), array("supplier_status", "=", "active")), "dt_created");
shuffle($results);
foreach ($results as $obj) {
    updateImpressions("supplier", $obj->supplierId);
}
$section = 7;
require "top.php";
?>
<table width="459" border="0" cellspacing="0" cellpadding="0" >
 <tr>
  <td><img src="images/spacer.gif" alt="spacer" width="1" height="5" border="0" /></td>
 </tr>
 <tr>
  <td><div class="roundcont">
   <div class="roundtop"> <img class="corner" src="images/bl_01.gif" alt="edge" style=" display: none;" /></div>
   <h1>Suppliers for <?php 
echo $_GET['name'];
?>
</h1>
   <div class="roundbottom"> <img src="images/bl_06.gif" alt="edge" class="corner" style=" display: none;" /></div>
  </div></td>
 </tr>
</table>
<table id="table" cellspacing = "0" cellpadding = "0">
<?php 
예제 #2
0
         }
         $smarty->assign('customers', $customers);
     } else {
         $smarty->assign('motd', 'Customer Table Empty');
         $smarty->assign('message', 'No customers found in the database.');
     }
     $smarty->display('templates/managecustomers.tpl');
     break;
 case 'addsupplier':
     $smarty->assign('title', "Tire Inventory | New Supplier");
     $smarty->display('templates/addsupplier.tpl');
     break;
 case 'managesuppliers':
     require_once 'objects/class.supplier.php';
     $supplier = new Supplier();
     $supplist = $supplier->GetList(array(array('supplierId', '>', 0), array('deleted', '=', 0)));
     if (count($supplist) > 0) {
         $suppliers = array();
         foreach ($supplist as $supplier) {
             array_push($suppliers, array('supplierid' => $supplier->supplierId, 'company' => $supplier->company, 'address1' => $supplier->address1, 'address2' => $supplier->address2, 'city' => $supplier->city, 'phone' => $supplier->phone, 'contactname' => $supplier->contactname, 'contactno' => $supplier->contactno, 'deleted' => $supplier->deleted));
         }
         $smarty->assign('suppliers', $suppliers);
     } else {
         $smarty->assign('motd', 'Suppliers Table Empty');
         $smarty->assign('message', 'No suppliers found in the database.');
     }
     $smarty->display('templates/managesuppliers.tpl');
     break;
 case 'savesupplier':
     print "save supplier";
     break;