function get_sets() { db_conn('cubit'); # go throug the dbs $Sl = "SELECT datname FROM pg_stat_database WHERE datname!='template0' and datname!='template1' ORDER BY datname ASC LIMIT 1"; $Rs = db_exec($Sl) or errDie("Unabled to retrive sales reps from Cubit.", SELF); if (pg_numrows($Rs) > 0) { while ($data = pg_fetch_array($Rs)) { db_conn_maint($data['datname']); $Sql = "VACUUM FULL"; $Ex = db_exec($Sql) or errDie("Unable to access database."); } } else { return "<li class=err> - There are no valid Databases in the system."; } $sets = "<h3>Maintenance Complete</h3>\n\t<br>\n\t<p>\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n\t<tr><th>Quick Links</th></tr>\n\t</table>"; return $sets; }
#Developers, Software Vendors, Support, Accountants, Users # # #The full software license can be found here: #http://www.accounting-123.com/a.php?a=153/GPLv3 # # # # # # # # # # # require "settings.php"; require "https_urlsettings.php"; db_conn_maint("cubit"); $sql = "SELECT * FROM version"; $rslt = db_exec($sql) or errDie("Error fetching version info."); $version = pg_fetch_result($rslt, 0, 0); // post the search request $update_request = @file(urler(UPDATE_URL . "?version={$version}&" . sendhash())); if ($update_request == false) { $site_msg = "<li class=err>Connection to server failed. Check you internet connection and try again.</li>"; } else { $site_msg = implode("<br>", $update_request); } $OUTPUT = "\r\n<h3>Cubit Update Download</h3>\r\n{$site_msg}"; require "template.php";