function popup() { $list = software_list(); $add = Paragraphe("software-back-64-add.png", "{ADD_NEW_SOFTWARE}", "{ADD_NEW_SOFTWARE_TEXT}", "javascript:AddRemoteSoftware()"); $refresh = Paragraphe("64-refresh.png", "{refresh}", "{resfresh_software_list}", "javascript:RefreshSoftwaresList()"); $users = new usersMenus(); if (!$users->winexe_installed) { $warn = Paragraphe("64-infos.png", "{APP_WINEXE_NOT_INSTALLED}", "{APP_WINEXE_NOT_INSTALLED_TEXT}", "javascript:Loadjs('setup.index.progress.php?product=APP_WINEXE&start-install=yes');") . "<br>"; } $html = "<H1>{APP_STORAGE_CENTER}</H1>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%>{$warn}{$refresh}<br>{$add}</td>\n\t<td valign='top'>\n\t\t<p class=caption>{APP_STORAGE_CENTER_TEXT}</p>\n\t\t" . RoundedLightWhite("<div id='software_list' style='width:100%;height:450px;overflow:auto'>{$list}</div>") . "\n\t</td>\n\t</tr>\n\t</table>"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
# Copyright 2007, 2008 Ohio Supercomputer Center # Revision info: # $HeadURL: https://svn.osc.edu/repos/pbstools/trunk/web/usage-summary.php $ # $Revision: 168 $ # $Date: 2007-06-26 16:53:55 -0400 (Tue, 26 Jun 2007) $ require_once 'dbutils.php'; require_once 'page-layout.php'; require_once 'metrics.php'; require_once 'site-specific.php'; # accept get queries too for handy command-line usage: suck all the # parameters into _POST. if (isset($_GET['system'])) { $_POST = $_GET; } # list of software packages $packages = software_list(); # regular expressions for different software packages $pkgmatch = software_match_list(); $title = "Usage summary"; if (isset($_POST['system'])) { $title .= " for " . $_POST['system']; if (isset($_POST['start_date']) && isset($_POST['end_date']) && $_POST['start_date'] == $_POST['end_date'] && $_POST['start_date'] != "") { $title .= " on " . $_POST['start_date']; } else { if (isset($_POST['start_date']) && isset($_POST['end_date']) && $_POST['start_date'] != $_POST['end_date'] && $_POST['start_date'] != "" && $_POST['end_date'] != "") { $title .= " from " . $_POST['start_date'] . " to " . $_POST['end_date']; } else { if (isset($_POST['start_date']) && $_POST['start_date'] != "") { $title .= " after " . $_POST['start_date']; } else { if (isset($_POST['end_date']) && $_POST['end_date'] != "") {
function software_match_list() { # default to "script LIKE '%pkgname%' foreach (software_list() as $pkg) { $pkgmatch[$pkg] = "script LIKE '%" . $pkg . "%' OR software LIKE '%" . $pkg . "%'"; } # exceptions # REGEXP match is ***MUCH*** slower than regular LIKE matching # in MySQL, so don't use REGEXP unless you really need it. $pkgmatch['a_out'] = "script LIKE '%a.out%'"; $pkgmatch['abinit'] = "script LIKE '%abinis%' OR script LIKE '%abinip%'"; $pkgmatch['aces2'] = "script LIKE '%xaces2%'"; $pkgmatch['adf'] = "script LIKE '%adf%'"; $pkgmatch['AliEn'] = "( script LIKE '%aliroot%' OR script LIKE '%agent.startup%' )"; $pkgmatch['amber'] = "( script LIKE '%amber%' OR script LIKE '%sander%' OR script LIKE '%pmemd%' OR script LIKE '%sviol%' )"; $pkgmatch['blat'] = "script LIKE '%blat %'"; $pkgmatch['cbl'] = "( script LIKE '% cbl%' OR script LIKE '%pcbl%' OR script LIKE '%biolib%' )"; $pkgmatch['chemshell'] = "script LIKE '%chemsh%'"; $pkgmatch['cpmd'] = "script LIKE '%cpmd.x%'"; $pkgmatch['crystal'] = "script LIKE '%Pcrystal%'"; $pkgmatch['decypher'] = "script REGEXP '(decypher|dc_(target|make|blast|phrap)|TimeLogic)'"; $pkgmatch['dock'] = "( script LIKE '%dock5%' OR script LIKE '%dock6%' OR script LIKE '%sphgen%' OR script LIKE '%mopac%' )"; $pkgmatch['ex_e'] = "script LIKE '%ex.e%'"; $pkgmatch['fsweep'] = "script LIKE '%fsweep.exe%' OR script LIKE '%fsweep2.exe%'"; $pkgmatch['gamess'] = "script LIKE '%gamess%' OR script LIKE '%rungms%' OR script LIKE '%rungmx%'"; $pkgmatch['gaussian'] = "script LIKE '%g98%' OR script LIKE '%g03%'"; $pkgmatch['glast'] = "( script LIKE '%glast%' OR script LIKE '%gp run%' )"; $pkgmatch['gromacs'] = "( script LIKE '%gromacs%' OR script LIKE '%grompp%' OR script LIKE '%mdrun%' OR script LIKE '%rgmx%' )"; $pkgmatch['lammps'] = "( script LIKE '%lammps%' OR script LIKE '% lmp_%' )"; $pkgmatch['mrbayes'] = "( script LIKE '%mrbayes%' OR script LIKE '%mb-parallel%' )"; $pkgmatch['openeye'] = "( script LIKE '%babel3%' OR script LIKE '%checkcff%' OR script LIKE '%chunker%' OR script LIKE '%fred2%' OR script LIKE '%fredPA%' OR script LIKE '%ligand_info%' OR script LIKE '%makefraglib%' OR script LIKE '%makerocsdb%' OR script LIKE '%nam2mol%' OR script LIKE '%omega2%' OR script LIKE '%szybki%' )"; $pkgmatch['ncbi'] = "( script LIKE '%ncbi%' OR script LIKE '%blastall%' OR script LIKE '%fastacmd%' OR script LIKE '%formatdb%' OR script LIKE '%rpsblast%' OR script LIKE '%seqtest%' )"; $pkgmatch['rosetta'] = "( script LIKE '%rosetta.%' OR script LIKE '%/rr %' )"; $pkgmatch['root'] = "script LIKE '%\nroot -q%'"; $pkgmatch['sable'] = "( script LIKE '%sable%' AND script NOT LIKE '%DISABLE%' )"; $pkgmatch['sas'] = "script LIKE '%\nsas%' OR software LIKE '%sas%' OR queue LIKE '%sas%'"; $pkgmatch['turbo'] = "script LIKE '%pturbo.x%'"; $pkgmatch['vasp'] = "script LIKE '%vasp%'"; # package matches with dependencies on other package matches $pkgmatch['R'] = "( script LIKE '%\nR %' AND NOT ( " . $pkgmatch['gaussian'] . " OR " . $pkgmatch['adf'] . " ) )"; $pkgmatch['charmm'] = "( script LIKE '%charmm%' AND NOT ( " . $pkgmatch['chemshell'] . " ) )"; $pkgmatch['turbomole'] = "( script LIKE '%turbomole%' AND NOT ( " . $pkgmatch['chemshell'] . " ) )"; return $pkgmatch; }