当前位置: 首页>>代码示例>>PHP>>正文


PHP readGetVar函数代码示例

本文整理汇总了PHP中readGetVar函数的典型用法代码示例。如果您正苦于以下问题:PHP readGetVar函数的具体用法?PHP readGetVar怎么用?PHP readGetVar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了readGetVar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: readGetVar

<?php

$f_groupid = (int) readGetVar('groupid');
$f_ids = explode(SYSTEM_ARRAY_ITEM_SEPARATOR, readGetVar('ids'));
if ($_GET["set"]) {
    foreach ($f_ids as $i_id) {
        //9917//9917
        $g_db->Execute("INSERT INTO " . $srv_settings['table_prefix'] . "groups_users (groupid, id) VALUES ({$f_groupid}, {$i_id})");
    }
} else {
    $i_sql_where_addon = '';
    reset($f_ids);
    if (list(, $val) = each($f_ids)) {
        $i_sql_where_addon .= "id=" . (int) $val;
    }
    while (list(, $val) = each($f_ids)) {
        $i_sql_where_addon .= " OR id=" . (int) $val;
    }
    if ($i_sql_where_addon) {
        $i_sql_where_addon = ' AND (' . $i_sql_where_addon . ')';
    }
    //9917//9917
    if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "groups_users WHERE groupid={$f_groupid}" . $i_sql_where_addon) === false) {
        showDBError(__FILE__, 2);
    }
}
gotoLocation('users.php' . getURLAddon('?action=groups', array('action')));
开发者ID:skyview059,项目名称:e-learning-website,代码行数:27,代码来源:manageusers-9.inc.php

示例2: switch

require_once "inc/init.inc.php";
if (isset($G_SESSION['id'])) {
    if ($G_SESSION['access_reporttemplates'] > 0) {
        $g_vars['page']['title'] = $lngstr['page_title_rtemplates'];
        switch (readGetVar('action')) {
            case 'create':
                if ($G_SESSION['access_reporttemplates'] > 1) {
                    include_once $DOCUMENT_PAGES . "report-templates-4.inc.php";
                } else {
                    gotoLocation('report-templates.php');
                }
                break;
            case 'delete':
                if ($G_SESSION['access_reporttemplates'] > 1) {
                    $f_confirmed = readGetVar('confirmed');
                    if ($f_confirmed == 1) {
                        if (isset($_GET['rtemplateid']) || isset($_POST["box_rtemplates"])) {
                            include_once $DOCUMENT_PAGES . "report-templates-5.inc.php";
                        } else {
                            gotoLocation('report-templates.php');
                        }
                    } else {
                        if ($f_confirmed == '0') {
                            gotoLocation('report-templates.php');
                        } else {
                            $i_confirm_header = $lngstr['page-rtemplates']['delete_rtemplate'];
                            $i_confirm_request = $lngstr['page-rtemplates']['qst_rtemplate_delete'];
                            $i_confirm_url = 'report-templates.php?rtemplateid=' . (int) $_GET['rtemplateid'] . '&action=delete';
                            include_once $DOCUMENT_PAGES . "confirm.inc.php";
                        }
开发者ID:skyview059,项目名称:e-learning-website,代码行数:30,代码来源:report-templates.php

示例3: isset

    $i_rSet2->Close();
}
$f_subjectid = isset($_GET['subjectid']) ? (int) readGetVar('subjectid') : '';
writeTR2($lngstr['page_edittests_subjectid'], getSelectElement('subjectid', $f_subjectid, $i_subjects, ' onchange="document.location.href=\'test-manager.php?subjectid=\'+this.value+\'' . $i_testid_addon . $i_order_addon . $i_url_limitto_addon . '\';"'));
$i_tests = array('' => $lngstr['label_none']);
$i_rSet2 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "tests");
if (!$i_rSet2) {
    showDBError(__FILE__, 2);
} else {
    while (!$i_rSet2->EOF) {
        $i_tests[$i_rSet2->fields['testid']] = $i_rSet2->fields['test_name'];
        $i_rSet2->MoveNext();
    }
    $i_rSet2->Close();
}
$f_testid = isset($_GET['testid']) ? (int) readGetVar('testid') : '';
writeTR2($lngstr['page_edittests_testname'], getSelectElement('testid', $f_testid, $i_tests, ' onchange="document.location.href=\'test-manager.php?testid=\'+this.value+\'' . $i_subjectid_addon . $i_order_addon . $i_url_limitto_addon . '\';"'));
echo '</table>';
echo '</div></td></tr>';
echo '</table></p>';
echo '<p><form name=testsForm class=iactive method=post><table cellpadding=0 cellspacing=0 border=0 width="100%"><tr><td>';
echo '<table cellpadding=0 cellspacing=0 border=0 width="100%" style="background: url(images/toolbar-background.gif) repeat-x"><tr vAlign=center><td width=2><img src="images/toolbar-left.gif" width=2 height=32></td><td width=32><a href="test-manager.php?action=create"><img src="images/button-new-big.gif" width=32 height=32 border=0 title="' . $lngstr['label_action_create_test'] . '"></a></td><td width=3><img src="images/toolbar-separator.gif" width=3 height=32 border=0></td><td width=32><img src="images/button-groups-big.gif" border=0 title="' . $lngstr['label_action_groups'] . '" style="cursor: hand;" onclick="f=document.testsForm;f.action=\'test-manager.php?action=groups\';f.submit();"></td><td width=3><img src="images/toolbar-separator.gif" width=3 height=32 border=0></td><td width=32><img src="images/button-cross-big.gif" border=0 title="' . $lngstr['label_action_tests_delete'] . '" style="cursor: hand;" onclick="f=document.testsForm;if (confirm(\'' . $lngstr['qst_delete_tests'] . '\')) { f.action=\'test-manager.php?action=delete&confirmed=1\';f.submit();}"></td>';
echo '<td width=3><img src="images/1x1.gif" width=3 height=1></td>';
echo '<td width="100%">&nbsp;</td>';
if ($i_limitcount > 0) {
    $i_url_pages_addon = $i_url_limitto_addon . $i_order_addon . $i_testid_addon . $i_subjectid_addon;
    echo '<td vAlign=middle width=32><nobr>&nbsp;' . sprintf($lngstr['label']['KtoLofN'], $nRecordFrom, $nRecordTo, $i_recordcount) . '&nbsp;</nobr></td>';
    echo '<td width=3><img src="images/toolbar-separator.gif" width=3 height=32 border=0></td>';
    echo '<td vAlign=middle width=32><nobr>&nbsp;';
    for ($i = $nStartPage; $i <= $nEndPage; $i++) {
        if ($i != $i_pageno) {
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:test-manager-1.inc.php

示例4: array

<?php

$g_vars['page']['location'] = array('reports_manager', 'test_results', 'question_details');
$g_smarty->assign('g_vars', $g_vars);
displayTemplate('_header');
$f_resultid = (int) readGetVar('resultid');
$g_vars['page']['selected_section'] = 'reportsmanager';
$g_vars['page']['selected_tab'] = 'reportsmanager-2';
$g_vars['page']['menu_2_items'] = getMenu2Items($g_vars['page']['selected_section']);
writePanel2($g_vars['page']['menu_2_items']);
echo '<h2>' . $lngstr['page_header_results_questions'] . '</h2>';
$i_pagewide_id = 0;
$i_resultid_addon = "&resultid=" . $f_resultid;
$i_can_access = false;
if ($G_SESSION['access_reportsmanager'] > 1) {
    $i_can_access = true;
} else {
    $i_rSet1 = $g_db->Execute("SELECT resultid FROM " . $srv_settings['table_prefix'] . "results WHERE id=" . $G_SESSION['id'] . " AND resultid=" . $f_resultid);
    if (!$i_rSet1) {
        showDBError(__FILE__, 1);
    } else {
        $i_can_access = $i_rSet1->RecordCount() > 0;
    }
}
if (!$i_can_access) {
    $g_vars['page']['notifications'] = $lngstr['inf_cant_view_this_test_details'];
}
writeErrorsWarningsBar();
if ($i_can_access) {
    $i_direction = "";
    $i_order_addon = "";
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:reports-manager-2.inc.php

示例5: readGetVar

<?php

if (!empty($g_vars['system']['payment_engine'])) {
    include_once $DOCUMENT_ADDONS . 'payment/' . $g_vars['system']['payment_engine'] . '/checkout.inc.php';
    exit;
} else {
    $g_vars['page']['header'] = $lngstr['page_buycheckout']['title'];
    $g_vars['page']['errors'] = $lngstr['page_buycheckout']['err_no_handler'];
    $f_testid = (int) readGetVar('testid');
    $g_smarty->assign('g_vars', $g_vars);
    displayTemplate('buy-checkout');
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:12,代码来源:buy-checkout-1.inc.php

示例6: switch

<?php

require_once "inc/init.inc.php";
switch (readGetVar('action')) {
    case 'activate':
        if (isset($_GET['id'])) {
            if (isset($_POST['bsubmit']) || isset($_GET['checkword'])) {
                include_once $DOCUMENT_PAGES . "account-activate-submit.inc.php";
            } else {
                include_once $DOCUMENT_PAGES . "account-activate.inc.php";
            }
        }
        break;
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:14,代码来源:account.php

示例7: readGetVar

<?php

$f_review_questionno = (int) readGetVar('questionno');
if ($f_review_questionno > $G_SESSION['yt_questionno']) {
    $f_review_questionno = $G_SESSION['yt_questionno'];
}
if ($G_SESSION['yt_canreview'] == IGT_TEST_REVIEW_ALLOWED && $f_review_questionno > 0) {
    unset($G_SESSION['questionid']);
    unset($G_SESSION['yt_questionstart']);
    $G_SESSION['yt_questionno_current'] = $f_review_questionno;
    if ($f_review_questionno >= $G_SESSION['yt_questionno']) {
        if ($G_SESSION['yt_questionno'] >= $G_SESSION['yt_questioncount']) {
            $G_SESSION['yt_state'] = TEST_STATE_QREVIEW;
        } else {
            $G_SESSION['yt_state'] = TEST_STATE_QSHOW;
        }
    } else {
        $G_SESSION['yt_state'] = TEST_STATE_QREVIEW;
    }
    include_once $DOCUMENT_PAGES . 'test-1.inc.php';
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:21,代码来源:test-review-question.inc.php

示例8: getGauge

            $i_grade_times_percentage = $i_grades_times[$i_gradeid] * 100 / $i_grades_times_total;
            echo '<td>' . getGauge($i_grade_times_percentage) . '</td>';
            echo '<td align=right>' . $i_grades_times[$i_gradeid] . '</td>';
            echo '<td align=right>' . sprintf("%.2f", $i_grade_times_percentage) . '%</td>';
        } else {
            echo '<td colspan=3 align=center class=gray>' . $lngstr['label_notapplicable'] . '</td>';
        }
        echo '</tr>';
    }
    echo '<tr class=rowone>';
    echo '<td>' . $lngstr['page_testmanager_stats']['total_responses'] . '</td>';
    echo '<td></td>';
    echo '<td align=right>' . $i_resultcount . '</td>';
    echo '<td align=right></td>';
    echo '</tr>';
}
echo '<p><form name=tstatsForm class=iactive method=post><table cellpadding=0 cellspacing=0 border=0 width="100%"><tr><td>';
echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">';
echo '<tr>';
echo '<td class=rowhdr1 title="' . $lngstr['page_testmanager_stats']['hdr_testid_hint'] . '">' . $lngstr['page_testmanager_stats']['hdr_testid'] . '</td>';
echo '<td class=rowhdr1 title="' . $lngstr['page_testmanager_stats']['hdr_test_data_hint'] . '" colspan=2>' . $lngstr['page_testmanager_stats']['hdr_test_data'] . '</td>';
echo '<td class=rowhdr1 title="' . $lngstr['page_testmanager_stats']['hdr_points'] . '">' . $lngstr['page_testmanager_stats']['hdr_points_hint'] . '</td>';
echo '<td class=rowhdr1 title="' . $lngstr['page_testmanager_stats']['hdr_percents_hint'] . '">' . $lngstr['page_testmanager_stats']['hdr_percents'] . '</td>';
echo '</tr>';
$i_tests = isset($_POST['box_tests']) ? readPostVar('box_tests') : explode(SYSTEM_ARRAY_ITEM_SEPARATOR, readGetVar('testids'));
foreach ($i_tests as $i_testid) {
    writeTestStats($i_testid);
}
echo '</table>';
echo '</td></tr></table></form>';
displayTemplate('_footer');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:test-manager-stats.inc.php

示例9: readGetVar

<?php

$f_testid = (int) readGetVar('testid');
$f_test_questionid = (int) readGetVar('test_questionid');
$i_questioncount = getRecordCount($srv_settings['table_prefix'] . 'tests_questions', "testid=" . $f_testid);
if ($f_test_questionid < $i_questioncount) {
    $g_db->Execute("LOCK TABLES " . $srv_settings['table_prefix'] . "tests_questions WRITE");
    $g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests_questions SET test_questionid=0 WHERE test_questionid=" . ($f_test_questionid + 1) . " AND testid=" . $f_testid);
    $g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests_questions SET test_questionid=test_questionid+1 WHERE test_questionid=" . $f_test_questionid . " AND testid=" . $f_testid);
    $g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests_questions SET test_questionid=" . $f_test_questionid . " WHERE test_questionid=0 AND testid=" . $f_testid);
    $g_db->Execute("UNLOCK TABLES");
}
gotoLocation('test-manager.php' . getURLAddon('?action=editt', array('action')));
开发者ID:skyview059,项目名称:e-learning-website,代码行数:13,代码来源:edit_questions-9.inc.php

示例10: getMenu2Items

$g_vars['page']['menu_2_items'] = getMenu2Items($g_vars['page']['selected_section']);
writePanel2($g_vars['page']['menu_2_items']);
echo '<h2>' . $lngstr['page_header_edit_question'] . '</h2>';
writeErrorsWarningsBar();
$i_rSet1 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "questions WHERE questionid=" . $f_questionid);
if (!$i_rSet1) {
    showDBError(__FILE__, 1);
} else {
    if (!$i_rSet1->EOF) {
        if (!is_numeric($f_question_type) || $f_question_type < 0 || $f_question_type > QUESTION_TYPE_COUNT) {
            $f_question_type = $i_rSet1->fields['question_type'];
        }
        echo '<p><form method=post action="question-bank.php' . getURLAddon() . '" onsubmit="return submitForm();">';
        echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">';
        $i_rowno = 0;
        $f_subjectid = isset($_GET['subjectid']) ? (int) readGetVar('subjectid') : $i_rSet1->fields['subjectid'];
        $i_subjects = array();
        $i_rSet2 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "subjects");
        if (!$i_rSet2) {
            showDBError(__FILE__, 2);
        } else {
            while (!$i_rSet2->EOF) {
                $i_subjects[$i_rSet2->fields['subjectid']] = $i_rSet2->fields['subject_name'];
                $i_rSet2->MoveNext();
            }
            $i_rSet2->Close();
        }
        writeTR2($lngstr['page_editquestion_subjectid'], getSelectElement('subjectid', $f_subjectid, $i_subjects));
        $i = 0;
        $i_rSet3 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "answers WHERE questionid={$f_questionid} ORDER BY answerid");
        if (!$i_rSet1) {
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:edit_questions-2.inc.php

示例11: writePanel2

writePanel2($g_vars['page']['menu_2_items']);
echo '<h2>' . $lngstr['page_title_users_memberof_users'] . '</h2>';
writeErrorsWarningsBar();
writeInfoBar($lngstr['tooltip_users_groups']);
$i_pagewide_id = 0;
$f_ids = array();
$i_ids_addon = "";
if (isset($_POST["box_users"]) && is_array($_POST["box_users"])) {
    foreach ($_POST["box_users"] as $f_id) {
        array_push($f_ids, $f_id);
    }
} else {
    if (isset($_GET["ids"]) && $_GET["ids"] != "") {
        $f_ids = explode(SYSTEM_ARRAY_ITEM_SEPARATOR, readGetVar('ids'));
    } else {
        array_push($f_ids, readGetVar('id'));
    }
}
$i_ids_addon .= "&ids=" . implode(SYSTEM_ARRAY_ITEM_SEPARATOR, $f_ids);
reset($f_ids);
$i_direction = "";
$i_order_addon = "";
$i_sql_order_addon = "";
$i_tablefields = array(array($lngstr["label_manageusers_hdr_id"], $lngstr["label_manageusers_hdr_id_hint"], $srv_settings['table_prefix'] . "users.id"), array($lngstr["label_manageusers_hdr_user_notes"], $lngstr["label_manageusers_hdr_user_notes_hint"], ""), array($lngstr["label_manageusers_hdr_username"], $lngstr["label_manageusers_hdr_username_hint"], $srv_settings['table_prefix'] . "users.username"), array($lngstr["label_manageusers_hdr_email"], $lngstr["label_manageusers_hdr_email_hint"], $srv_settings['table_prefix'] . "users.email"), array($lngstr["label_manageusers_hdr_user_firstname"], $lngstr["label_manageusers_hdr_user_firstname_hint"], $srv_settings['table_prefix'] . "users.user_firstname"), array($lngstr["label_manageusers_hdr_user_lastname"], $lngstr["label_manageusers_hdr_user_lastname_hint"], $srv_settings['table_prefix'] . "users.user_lastname"), array($lngstr["label_manageusers_hdr_user_enabled"], $lngstr["label_manageusers_hdr_user_enabled_hint"], $srv_settings['table_prefix'] . "users.user_enabled"));
$i_order_no = isset($_GET["order"]) ? (int) $_GET["order"] : 0;
if ($i_order_no >= count($i_tablefields)) {
    $i_order_no = -1;
}
if ($i_order_no >= 0) {
    $i_direction = isset($_GET["direction"]) && $_GET["direction"] ? "DESC" : "";
    $i_order_addon = "&order=" . $i_order_no . "&direction=" . $i_direction;
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:manageusers-8.inc.php

示例12: writeErrorsWarningsBar

echo '<h2>' . $lngstr['page_header_test_assignto_tests'] . '</h2>';
writeErrorsWarningsBar();
writeInfoBar($lngstr['tooltip_tests_groups']);
$i_pagewide_id = 0;
$f_testids = array();
$i_testids_addon = "";
$i_sql_where_addon = "";
if (isset($_POST["box_tests"]) && is_array($_POST["box_tests"])) {
    foreach ($_POST["box_tests"] as $f_testid) {
        array_push($f_testids, $f_testid);
    }
} else {
    if (isset($_GET["testids"]) && $_GET["testids"] != "") {
        $f_testids = explode(SYSTEM_ARRAY_ITEM_SEPARATOR, readGetVar('testids'));
    } else {
        array_push($f_testids, readGetVar('testid'));
    }
}
$i_testids_addon .= "&testids=" . implode(SYSTEM_ARRAY_ITEM_SEPARATOR, $f_testids);
reset($f_testids);
if (list(, $val) = each($f_testids)) {
    $i_sql_where_addon .= "testid=" . (int) $val;
}
while (list(, $val) = each($f_testids)) {
    $i_sql_where_addon .= " OR testid=" . (int) $val;
}
if ($i_sql_where_addon != "") {
    $i_sql_where_addon = '(' . $i_sql_where_addon . ') AND ';
}
$i_direction = "";
$i_order_addon = "";
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:test-manager-8.inc.php

示例13: foreach

<?php

if (isset($_POST["box_visitors"])) {
    foreach ($_POST["box_visitors"] as $f_visitorid) {
        deleteVisitor((int) $f_visitorid);
    }
} else {
    $f_visitorid = (int) readGetVar('visitorid');
    deleteVisitor($f_visitorid);
}
gotoLocation('visitors.php' . getURLAddon('', array('action', 'confirmed')));
function deleteVisitor($i_visitorid)
{
    global $g_db, $srv_settings;
    if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "visitors WHERE visitorid={$i_visitorid}") === false) {
        showDBError(__FILE__, 1);
    }
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:18,代码来源:visitors-4.inc.php

示例14: readGetVar

<?php

$f_groupid = (int) readGetVar('groupid');
$f_group_name = readPostVar('group_name');
$f_group_name = $g_db->qstr($f_group_name, get_magic_quotes_gpc());
$f_group_description = readPostVar('group_description');
$f_group_description = $g_db->qstr($f_group_description, get_magic_quotes_gpc());
$f_access_tests = (int) readPostVar('access_tests');
$f_access_questionbank = (int) readPostVar('access_questionbank');
$f_access_subjects = (int) readPostVar('access_subjects');
$f_access_testmanager = (int) readPostVar('access_testmanager');
$f_access_gradingsystems = (int) readPostVar('access_gradingsystems');
$f_access_emailtemplates = (int) readPostVar('access_emailtemplates');
$f_access_reporttemplates = (int) readPostVar('access_reporttemplates');
$f_access_reportsmanager = (int) readPostVar('access_reportsmanager');
$f_access_users = (int) readPostVar('access_users');
$f_access_groups = (int) readPostVar('access_groups');
$f_access_config = (int) readPostVar('access_config');
$f_access_visitors = (int) readPostVar('access_visitors');
if ($g_vars['page']['errors']) {
    include_once $DOCUMENT_PAGES . "groups-2.inc.php";
} else {
    //9917
    if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "groups SET group_name=" . $f_group_name . ", group_description=" . $f_group_description . ", access_tests=" . $f_access_tests . ", access_testmanager=" . $f_access_testmanager . ", access_gradingsystems=" . $f_access_gradingsystems . ", access_emailtemplates=" . $f_access_emailtemplates . ", access_reporttemplates=" . $f_access_reporttemplates . ", access_reportsmanager=" . $f_access_reportsmanager . ", access_questionbank=" . $f_access_questionbank . ", access_subjects=" . $f_access_subjects . ", access_groups=" . $f_access_groups . ", access_users=" . $f_access_users . ", access_visitors=" . $f_access_visitors . ", access_config=" . $f_access_config . " WHERE groupid=" . $f_groupid) === false) {
        showDBError(__FILE__, 1);
    }
    gotoLocation('groups.php');
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:28,代码来源:groups-3.inc.php

示例15: readCookieVar

        $i_sql_where_addon = '';
    }
} else {
    $i_sql_where_addon = $srv_settings['table_prefix'] . 'results.id=' . $G_SESSION['id'] . ' AND ';
}
$f_user_lastname = readCookieVar('filter_reportsmanager_user_lastname', readGetVar('user_lastname'));
if (!empty($f_user_lastname)) {
    $i_user_lastname = $g_db->qstr($f_user_lastname, get_magic_quotes_gpc());
    $i_sql_where_addon .= $srv_settings['table_prefix'] . 'users.user_lastname LIKE ' . $i_user_lastname . ' AND ';
}
$f_testid = readCookieVar('filter_reportsmanager_testid', readGetVar('testid'));
if (!empty($f_testid)) {
    $f_testid = (int) $f_testid;
    $i_sql_where_addon .= $srv_settings['table_prefix'] . 'results.testid=' . $f_testid . ' AND ';
}
$f_result_date = readCookieVar('filter_reportsmanager_result_date', readGetVar('result_date', 1));
if ($f_result_date > 0) {
    $i_result_date = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y") - $f_result_date);
    $i_sql_where_addon .= $srv_settings['table_prefix'] . 'results.result_datestart>=' . $i_result_date . ' AND ';
}
$i_direction = '';
$i_order_addon = '';
$i_sql_order_addon = '';
$i_tablefields = array(array($lngstr['label_report_hdr_resultid'], $lngstr['label_report_hdr_resultid_hint'], $srv_settings['table_prefix'] . 'results.resultid'), array($lngstr['label_report_hdr_result_datestart'], $lngstr['label_report_hdr_result_datestart_hint'], $srv_settings['table_prefix'] . 'results.result_datestart'), array($lngstr['label_report_hdr_username'], $lngstr['label_report_hdr_username_hint'], $srv_settings['table_prefix'] . 'users.username'), array($lngstr['label_report_hdr_test_name'], $lngstr['label_report_hdr_test_name_hint'], $srv_settings['table_prefix'] . 'tests.test_name'), array($lngstr['page_reportsmanager']['hdr_test_attempts'], $lngstr['page_reportsmanager']['hdr_test_attempts_hint'], ''), array($lngstr['label_report_hdr_result_timeexceeded'], $lngstr['label_report_hdr_result_timeexceeded_hint'], $srv_settings['table_prefix'] . 'results.result_timeexceeded'), array($lngstr['label_report_hdr_result_points'], $lngstr['label_report_hdr_result_points_hint'], $srv_settings['table_prefix'] . 'results.result_points'), array($lngstr['label_report_hdr_result_pointsmax'], $lngstr['label_report_hdr_result_pointsmax_hint'], $srv_settings['table_prefix'] . 'results.result_pointsmax'), array($lngstr['label_report_hdr_result_score'], $lngstr['label_report_hdr_result_score_hint'], 'result_score'), array($lngstr['label_report_hdr_gscale_gradeid'], $lngstr['label_report_hdr_gscale_gradeid_hint'], $srv_settings['table_prefix'] . 'gscales_grades.gscale_gradeid'));
$i_order_no = isset($_GET['order']) ? (int) $_GET['order'] : 0;
if ($i_order_no >= count($i_tablefields)) {
    $i_order_no = -1;
}
if ($i_order_no >= 0) {
    $i_direction = isset($_GET['direction']) && $_GET['direction'] ? 'DESC' : '';
    $i_order_addon = '&order=' . $i_order_no . '&direction=' . $i_direction;
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:reports-manager-exportcsv.inc.php


注:本文中的readGetVar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。