コード例 #1
0
ファイル: db_action.php プロジェクト: Turante/boincweb
// This file was modified by contributors of "BOINC Web Tweak" project.
require_once "../inc/util_ops.inc";
require_once "../inc/db_ops.inc";
db_init();
$detail = null;
$show_aggregate = false;
$nresults = get_int("nresults", true);
$entries_to_show = get_int("entries_to_show", true);
$last_pos = get_int("last_pos", true);
$table = get_str("table", true);
$detail = get_str("detail", true);
$clauses = get_str("clauses", true);
if (strstr($clauses, ";")) {
    error_page("bad clause");
}
$q = new SqlQueryString();
$q->process_form_items();
if (isset($nresults)) {
    $entries_to_show = $nresults;
} else {
    $entries_to_show = 20;
}
$page_entries_to_show = $entries_to_show;
if (isset($last_pos)) {
    $start_at = $last_pos;
} else {
    $start_at = 0;
}
$title = table_title($table);
admin_page_head($title);
$count = $q->count();
コード例 #2
0
ファイル: trdl.php プロジェクト: happyj/qcn
}
// first off get the sensor types
$sqlsensor = "select id,description from qcn_sensor order by id";
$result = mysql_query($sqlsensor);
$i = 0;
$arrSensor = array();
if ($result) {
    while ($res = mysql_fetch_array($result)) {
        $arrSensor[$i] = $res;
        $i++;
    }
    mysql_free_result($result);
}
$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);
$bUseArchive = get_int("cbUseArchive", true);
$bUseFile = get_int("cbUseFile", true);
$bUseGeoIP = get_int("cbUseGeoIP", 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);
$bDownloadAll = get_int("cbDownloadAll", true);
$strHostID = get_int("HostID", true);
コード例 #3
0
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
require_once "../inc/util_ops.inc";
db_init();
admin_page_head("Failure summary by (app version, error)");
$query_appid = $_GET['appid'];
$query_received_time = time() - $_GET['nsecs'];
$q = new SqlQueryString();
$q->process_form_items();
$main_query = "\nSELECT\n    app_version_id,\n    app_version.plan_class,\n    case\n        when INSTR(host.os_name, 'Darwin') then 'Darwin'\n        when INSTR(host.os_name, 'Linux') then 'Linux'\n        when INSTR(host.os_name, 'Windows') then 'Windows'\n        when INSTR(host.os_name, 'SunOS') then 'SunOS'\n        when INSTR(host.os_name, 'Solaris') then 'Solaris'\n        when INSTR(host.os_name, 'Mac') then 'Mac'\n        else 'Unknown'\n    end AS OS_Name,\n    exit_status,\n    COUNT(*) AS error_count\nFROM   result\n        left join host on result.hostid = host.id\n        left join app_version on result.app_version_id = app_version.id\nWHERE\n    result.appid = '{$query_appid}' and\n    server_state = '5' and\n    outcome = '3' and\n    received_time > '{$query_received_time}'\nGROUP BY\n    app_version_id,\n    exit_status\norder by error_count desc\n";
$urlquery = $q->urlquery;
$result = _mysql_query($main_query);
start_table();
table_header("App version", "Exit Status", "Error Count");
while ($res = _mysql_fetch_object($result)) {
    $exit_status_condition = "exit_status={$res->exit_status}";
    table_row(app_version_desc($res->app_version_id), link_results(exit_status_string($res->exit_status), $urlquery, "{$exit_status_condition}", ""), $res->error_count);
}
_mysql_free_result($result);
end_table();
admin_page_tail();
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
コード例 #4
0
ファイル: ramp_map.php プロジェクト: happyj/qcn
<?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);
*/