Add and use vendor::objectOutputHeader() and vendor::objectGetEntries()

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-01-31 02:24:54 +00:00
committed by WineHQ
parent cbfc49f42f
commit fa111ec39d
2 changed files with 31 additions and 11 deletions

View File

@@ -140,6 +140,34 @@ class Vendor {
echo "</table>\n";
}
function objectGetEntries($bQueued)
{
/* Vendor queueing is not implemented yet */
if($bQueued)
return NULL;
$hResult = query_parameters("SELECT * FROM vendor
ORDER BY vendorName");
if(!$hResult)
return FALSE;
return $hResult;
}
function objectOutputHeader($sClass = "")
{
$sCells = array(
"Name",
"Website",
array("Linked apps", "align=\"right\""));
if(vendor::canEdit())
$sCells[sizeof($sCells)] = "Action";
echo html_tr($sCells, $sClass);
}
function canEdit()
{
if($_SESSION['current']->hasPriv("admin"))