Add and use vendor::display()

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-01-31 02:16:54 +00:00
committed by WineHQ
parent cc7c6e661a
commit 446191f533
2 changed files with 29 additions and 23 deletions

View File

@@ -148,11 +148,38 @@ class Vendor {
return FALSE;
}
function getOutputEditorValues($aClean)
function getOutputEditorValues($aClean)
{
$this->sName = $aClean['sVendorName'];
$this->sWebpage = $aClean['sVendorWebpage'];
}
function display()
{
echo 'Vendor Name: '.$this->sName,"\n";
if($this->canEdit())
{
echo "[<a href=\"".BASE."admin/editVendor.php?iVendorId=$this->iVendorId\">edit</a>]";
}
echo '<br />',"\n";
if ($this->sWebpage)
echo 'Vendor URL: <a href="'.$this->sWebpage.'">'.
$this->sWebpage.'</a> <br />',"\n";
if($this->aApplicationsIds)
{
echo '<br />Applications by '.$this->sName.'<br /><ol>',"\n";
foreach($this->aApplicationsIds as $iAppId)
{
$oApp = new Application($iAppId);
echo '<li> <a href="appview.php?iAppId='.$oApp->iAppId.'">'.
$oApp->sName.'</a> </li>',"\n";
}
echo '</ol>',"\n";
}
}
}
/* Get the total number of Vendors in the database */