function show_nav() { $config = get_config(); $master_url = parse_config($config, "<master_url>"); $no_computing = parse_config($config, "<no_computing>"); $no_web_account_creation = parse_bool($config, "no_web_account_creation"); $user = get_logged_in_user(false); echo "<div class=\"mainnav\">\n <h2 class=headline>About " . PROJECT . "</h2>\n "; echo "\n The Quake Catcher Network (QCN) is a research project that uses Internet-connected\n computers to do research, education, and outreach in seismology.\n You can participate by downloading and running a free program\n on your computer. Currently only certain Mac (OS X) PPC and Intel laptops are supported --\n recent ones which have a built-in accelerometer. You can also buy an external USB accelerometer.\n <p>\n QCN is based at the Stanford University School of Earth Sciences.\n <ul>\n <li> <A HREF=\"" . BASEURL . "/index.php\">Quake Catcher Network Home Page</A>\n <li> <A HREF=\"" . BASEURL . "/about-qcn/contact-us\">Project Personnel</A>\n </ul>\n "; if ($no_computing) { echo "\n <li> <a href=\"create_account_form.php\">Create an account</a>\n "; } else { echo "\n <li><a href=\"info.php\">" . tra("Read our rules and policies") . "</a>\n <li> This project uses BOINC.\n If you're already running BOINC, select Add Project.\n If not, <a target=\"_new\" href=\"http://boinc.berkeley.edu/download.php\">download BOINC</a>.\n <li> When prompted, enter <br><b>" . $master_url . "</b>\n "; if (!$no_web_account_creation) { echo "\n <li> If you're running a command-line version of BOINC,\n <a href=\"create_account_form.php\">create an account</a> first.\n "; } echo "\n <li> If you have any problems,\n <a target=\"_new\" href=\"http://boinc.berkeley.edu/wiki/BOINC_Help\">get help here</a>.\n "; } echo "\n </ul><BR><p>\n\n <h2 class=headline>Returning participants</h2>\n <ul>\n "; if ($no_computing) { echo "\n <li><a href=\"bossa_apps.php\">Do work</a>\n <li><a href=\"home.php\">Your account</a> - view stats, modify preferences\n <li><a href=\"team.php\">Teams</a> - create or join a team\n "; } else { echo "\n <li><a href=\"home.php\">Your account</a> - view stats, modify preferences\n <li><a href=server_status.php>Server status</a>\n <li><a href=\"team.php\">Teams</a> - create or join a team\n <li><a href=\"cert1.php\">Certificate</a>\n <li><a href=\"apps.php\">" . tra("Applications") . "</a>\n "; } echo "\n </ul>\n <h2 class=headline>" . tra("Community") . "</h2>\n <ul>\n <li><a href=\"user_search.php\">User search</a>\n <li><a href=\"forum_index.php\">" . tra("Message boards") . "</a>\n <li><a href=\"stats.php\">Statistics</a>\n <li><a href=language_select.php>Languages</a>\n </ul>\n "; // CMC changed to forum prefs 4th bit if (qcn_admin_user_auth($user)) { // defined in project/project.inc echo "\n <h2>" . tra("Extra Links") . "</h2>\n <ul>\n <li><a href=\"trdl.php\">" . tra("Trigger Search/Upload/Download Page") . "</a>\n <li><a href=\"ramp.php\">" . tra("View RAMP Signups") . "</a>\n <li><a href=\"" . BASEURL . "/sensor/todo\">" . tra("To-Do List") . "</a></ul>"; //if ($user->id == 15) { // check for db replication timestamp #$kewfile = BASEPATH . "/boinc/sensor/html/user/max.txt"; #if (file_exists($kewfile) && ($handle = fopen($kewfile, 'r'))) { # $output = fgets($handle); // skip first line # $output = fgets($handle); fclose($handle); # echo " <li>Kew Sync Diff (seconds): " . $output . "<BR>(should be a small number else server is down) <BR>"; # } else { # echo " <li>No Replication Sync File on Kew - Better Check!"; # } } qcn_show_map(); echo " </div>"; }
<?php require_once "../inc/util.inc"; require_once "../inc/db.inc"; require_once "../inc/db_ops.inc"; require_once "../project/common.inc"; db_init(); set_time_limit(600); $user = get_logged_in_user(true); // authenticate admin-level user qcn_admin_user_auth($user, true); $query = "select id, fname, lname, email_addr, addr1, addr2, city, region, postcode, country, latitude, longitude, phone, fax, bshare_coord, bshare_map, bshare_ups, cpu_type, cpu_os, cpu_age, cpu_floor, cpu_admin, cpu_permission, cpu_firewall, cpu_proxy, cpu_internet, cpu_unint_power, sensor_distribute, comments,\n loc_home,\n loc_business,\n loc_affix_perm,\n loc_self_install,\n loc_day_install_sunday,\n loc_time_install_sunday,\n loc_day_install_monday,\n loc_time_install_monday,\n loc_day_install_tuesday,\n loc_time_install_tuesday,\n loc_day_install_wednesday,\n loc_time_install_wednesday,\n loc_day_install_thursday,\n loc_time_install_thursday,\n loc_day_install_friday,\n loc_time_install_friday,\n loc_day_install_saturday,\n loc_time_install_saturday,\n loc_years_host\nfrom qcn_ramp_participant WHERE active=1"; $order = "order by country, lname, fname"; $detail = null; $show_aggregate = false; $q = new SqlQueryString(); // start $_GET $nresults = get_int("nresults", true); $last_pos = get_int("last_pos", true); $bUseCSV = get_int("cbUseCSV", true); $bUseRegional = get_int("cbUseRegional", true); /*$bUseArchive = get_int("cbUseArchive", true); $bUseFile = get_int("cbUseFile", true); $bUseQuake = get_int("cbUseQuake", true); $bUseQCNQuake = get_int("cbUseQCNQuake", true); $bUseLat = get_int("cbUseLat", true); $bUseSensor = get_int("cbUseSensor", true); $bUseTime = get_int("cbUseTime", true); $bUseHost = get_int("cbUseHost", true); $strHostID = get_int("HostID", true); */