\n"; while($ob = mysql_fetch_object($result)) { echo "\n"; } echo "\n"; } if($cmd) { if($cmd == "delete") { $result = mysql_query("DELETE FROM appBundle WHERE appId = $appId AND bundleId = $bundleId"); if($result) addmsg("App deleted from bundle", "green"); else addmsg("Failed: " . mysql_error(), "red"); } if($cmd == "add") { $result = mysql_query("INSERT INTO appBundle VALUES ($bundleId, $appId)"); if($result) addmsg("App $appId added to Bundle $bundleId", "green"); else addmsg("Failed: " . mysql_error(), "red"); } redirectref(); exit; } else { apidb_header("Edit Application Bundle"); $result = mysql_query("SELECT bundleId, appBundle.appId, appName FROM appBundle, appFamily ". "WHERE bundleId = $bundleId AND appFamily.appId = appBundle.appId"); if($result && mysql_num_rows($result)) { echo html_frame_start("Apps in this Bundle","300",'',0); echo "\n\n"; echo "\n"; echo " \n"; echo " \n"; echo "\n\n"; $c = 1; while($ob = mysql_fetch_object($result)) { //set row color if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; } $delete_link = "[delete]"; echo "\n"; echo " \n"; echo " \n"; echo "\n\n"; $c++; } echo "
Application Name Delete
$ob->appName  $delete_link  
\n\n"; echo html_frame_end(); } echo "
\n"; echo html_frame_start("Application List (double click to add)","",'',2); build_app_list(); echo html_frame_end(); echo "\n"; echo "\n"; echo "
\n"; apidb_footer(); } ?>