This repository has been archived on 2025-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
qemudb/vendorview.php

69 lines
1.4 KiB
PHP
Raw Normal View History

<?php
/*************************************/
/* code to view vendors & their apps */
/*************************************/
2004-03-15 16:22:00 +00:00
2004-12-25 20:08:00 +00:00
/*
2004-12-27 23:54:55 +00:00
* application environment
2004-12-25 20:08:00 +00:00
*/
require("path.php");
require(BASE."include/incl.php");
require_once(BASE."include/application.php");
require_once(BASE."include/vendor.php");
2004-03-15 16:22:00 +00:00
$oVendor = new Vendor($aClean['iVendorId']);
if ($aClean['sSub'])
{
if(!$_SESSION['current']->hasPriv("admin"))
util_show_error_page_and_exit("Insufficient privileges.");
2004-03-15 16:22:00 +00:00
if($aClean['sSub'] == 'delete')
{
$oVendor->delete();
util_redirect_and_exit($_SERVER['PHP_SELF']);
}
2004-03-15 16:22:00 +00:00
}
2004-03-15 16:22:00 +00:00
if($oVendor->iVendorId)
{
//display page
apidb_header("View Vendor");
echo html_frame_start("Vendor Information",500);
2004-03-15 16:22:00 +00:00
2007-01-31 02:16:54 +00:00
$oVendor->display();
2004-03-15 16:22:00 +00:00
echo html_frame_end();
echo html_back_link(1);
apidb_footer();
2004-03-15 16:22:00 +00:00
}
else
2004-03-15 16:22:00 +00:00
{
apidb_header("View Vendors");
//get available vendors
$hResult = vendor::objectGetEntries(false);
// show vendorlist
echo "<table width='100%' border=0 cellpadding=3 cellspacing=0>\n\n";
vendor::objectOutputHeader("color4");
for($c = 0; $oRow = mysql_fetch_object($hResult); $c++)
{
$oVendor = vendor::objectGetInstanceFromRow($oRow);
$oVendor->objectOutputTableRow(($c % 2) ? "color0" : "color1");
}
echo '<tr><td>',"\n";
echo html_back_link(1);
echo '</td></tr></table>',"\n";
apidb_footer();
2004-03-15 16:22:00 +00:00
}
?>