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/admin/editVendor.php

45 lines
1.4 KiB
PHP
Raw Normal View History

<?php
2004-03-15 16:22:00 +00:00
include("path.php");
2005-10-21 02:48:27 +00:00
require(BASE."include/incl.php");
require(BASE."include/vendor.php");
2004-03-15 16:22:00 +00:00
if(!$_SESSION['current']->hasPriv("admin"))
2004-03-15 16:22:00 +00:00
{
errorpage();
exit;
}
2005-10-21 02:48:27 +00:00
$oVendor = new Vendor($_REQUEST['vendorId']);
if($_REQUEST['submit'])
2004-03-15 16:22:00 +00:00
{
2005-10-21 02:48:27 +00:00
$oVendor->update($_REQUEST['name'],$_REQUEST['webpage']);
redirect(apidb_fullurl("admin/adminVendors.php"));
2004-03-15 16:22:00 +00:00
}
else
{
2005-10-21 02:48:27 +00:00
apidb_header("Edit Vendor");
echo "<form method=\"post\" action=\"addVendor.php\">
<input type=\"hidden\" name=\"vendorId\" value=\"".$oVendor->iVendorId."\" />
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">
<tr>
<td width=\"15%\" class=\"box-label\"><b>Vendor name</b></td>
<td class=\"box-body\">
<input type=\"text\" size=\"50\" name=\"name\" value=\"".$oVendor->sName."\" />
</td>
</tr>
<tr>
<td width=\"15%\" class=\"box-label\"><b>Vendor URL</b></td>
<td class=\"box-body\">
<input type=\"text\" size=\"50\" name=\"webpage\" value=\"".$oVendor->sWebpage."\" />
</td>
</tr>
<tr>
<td colspan=\"2\" class=\"box-body\">
<input type=\"submit\" name=\"submit\" value=\"Submit\" />
</td>
</tr>
</table>
</form>";
apidb_footer();
2004-03-15 16:22:00 +00:00
}
?>