',"\n"; if ($_REQUEST['sub']) { if($_REQUEST['sub'] == 'delete') { $sQuery = "SELECT * FROM appFamily WHERE vendorId = ".$_REQUEST['vendorId'].";"; if (debugging()) echo "$sQuery"; $hResult = query_appdb($sQuery); if(!$hResult || !mysql_num_rows($hResult)) { $sQuery = "DELETE FROM vendor WHERE vendorId = ".$_REQUEST['vendorId'].";"; if (debugging()) echo "$sQuery"; $hResult = query_appdb($sQuery); echo html_frame_start("Delete vendor: ".$_REQUEST['vendorId'],400,"",0); if($hResult) { //success echo "

Vendor was successfully deleted

\n"; } } else { echo "

Error: Can not delete a vendor with applications attached to it!

\n"; } echo html_frame_end(" "); echo html_back_link(1,'adminVendors.php'); } } else { //get available vendors $sQuery = "SELECT * FROM vendor ORDER BY vendorName, vendorId;"; $hResult = query_appdb($sQuery); if(!$hResult || !mysql_num_rows($hResult)) { // no vendors echo html_frame_start("","90%"); echo '

There are no application vendors.

',"\n"; echo html_frame_end(" "); } else { // show vendorlist echo html_frame_start("","90%","",0); echo "\n\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n\n"; $c = 1; while($ob = mysql_fetch_object($hResult)) { if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; } echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n\n"; $c++; } echo "
Vendor nameVendor url 
".$ob->vendorName."vendorURL."\">".$ob->vendorURL."[delete]
\n\n"; echo html_frame_end(" "); } } echo ""; apidb_footer(); ?>