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


PHP displayTemplate函数代码示例

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


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

示例1: error

function error($errorMessage, $line, $file)
{
    if (defined('DEBUG')) {
        $errorMessage .= '(Line: ' . $line . ')<br />';
        $errorMessage .= '(File: ' . $file . ')';
    }
    displayTemplate('An Error Occured', 'error', array('message' => $errorMessage));
    skLog($errorMessage);
    exit;
}
开发者ID:BackupTheBerlios,项目名称:saiko-svn,代码行数:10,代码来源:functions.php

示例2: smarty_function_includeCustomFile

function smarty_function_includeCustomFile($params, &$smarty)
{
    global $g_vars, $G_SESSION;
    $i_file = isset($params['file']) ? $params['file'] : '';
    $i_value = isset($params['value']) ? $params['value'] : $G_SESSION['testid'];
    $i_postfix = '-' . $i_value;
    if (file_exists($smarty->template_dir . $i_file . $i_postfix . '.tpl.html')) {
        displayTemplate($i_file . $i_postfix);
    } else {
        displayTemplate($i_file);
    }
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:12,代码来源:function.includeCustomFile.php

示例3: init

function init($args)
{
    global $_SESS, $user;
    die(print httpGetVar('foobar', "Wow you're so cool!"));
    displayTemplate('Hello, World', 'user_login_form', array('foo' => 'bar'));
    $_SESS['sess_uid'] = 1;
    updateSession();
    print_r($_SESS);
    print_r($user);
    /*
        while($i < 50)
        {
            print $i.'...<br />';
            $i++;
        }
        print_r($args);*/
}
开发者ID:BackupTheBerlios,项目名称:saiko-svn,代码行数:17,代码来源:index.php

示例4: displayAllTemplates

        case $_GET['update']:
            $form->success("Updated successfully");
            break;
        case $_GET['add']:
            $form->success("Added new data successfully");
            break;
        case $_GET['delete']:
            $form->success("Deleted successfully");
            break;
    }
}
// Templates
if ($_GET['action'] == "list_templates") {
    displayAllTemplates();
} elseif ($_GET['action'] == "showTemplate") {
    displayTemplate();
} elseif ($_GET['action'] == "editTemplate") {
    if (isset($_POST['updateTemplate'])) {
        updateTemplate();
    } else {
        editTemplate();
    }
} elseif ($_GET['action'] == "addTemplate") {
    if (isset($_POST['insertTemplate'])) {
        insertTemplate();
    } else {
        addTemplate();
    }
} elseif ($_GET['action'] == "deleteTemplate") {
    deleteTemplate();
} elseif ($_GET['action'] == "list_checks") {
开发者ID:precurse,项目名称:netharbour,代码行数:31,代码来源:monitor.php

示例5: array

<?php

$g_vars['page']['location'] = array('test_manager', 'test_manager', 'test_questions', 'import_questions');
$f_testid = (int) readGetVar('testid');
$g_vars['page']['testid'] = $f_testid;
$g_vars['page']['header'] = $lngstr['page_header_import_questions'];
$g_vars['page']['selected_section'] = 'testmanager';
$g_vars['page']['selected_tab'] = 'testmanager-10';
$g_vars['page']['menu_2_items'] = getMenu2Items($g_vars['page']['selected_section']);
$i_cookie_prefix = 'test_import_';
$g_vars['page']['question_delimiter'] = readPostCookieVar('question_delimiter', $i_cookie_prefix . 'question_delimiter', 'Question: ');
$g_vars['page']['answer_delimiter'] = readPostCookieVar('answer_delimiter', $i_cookie_prefix . 'answer_delimiter', 'Choice: ');
$g_vars['page']['answer2_delimiter'] = readPostCookieVar('answer2_delimiter', $i_cookie_prefix . 'answer2_delimiter', 'Choice 2: ');
$g_vars['page']['preq_delimiter'] = readPostCookieVar('preq_delimiter', $i_cookie_prefix . 'preq_delimiter', 'Intro: ');
$g_vars['page']['postq_delimiter'] = readPostCookieVar('postq_delimiter', $i_cookie_prefix . 'postq_delimiter', 'Explanation: ');
$g_vars['page']['correct_delimiter'] = readPostCookieVar('correct_delimiter', $i_cookie_prefix . 'correct_delimiter', 'Correct: ');
$g_vars['page']['points_delimiter'] = readPostCookieVar('points_delimiter', $i_cookie_prefix . 'points_delimiter', 'Points: ');
$g_vars['page']['type_delimiter'] = readPostCookieVar('type_delimiter', $i_cookie_prefix . 'type_delimiter', 'Type: ');
$g_vars['page']['subject_delimiter'] = readPostCookieVar('subject_delimiter', $i_cookie_prefix . 'subject_delimiter', 'Subject: ');
$g_smarty->assign('g_vars', $g_vars);
displayTemplate('testmanager-questions-import');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:21,代码来源:test-manager-10.inc.php

示例6: readGetVar

<?php

$_GET['limitto'] = 2000000000;
$f_rtemplateid = (int) readGetVar('rtemplateid');
if ($f_rtemplateid > 0) {
    $i_columns_text = trim(getRecordItem($srv_settings['table_prefix'] . 'rtemplates', 'rtemplate_body', 'rtemplateid=' . $f_rtemplateid));
} else {
    $i_columns_text = 'resultid,result_datestart,result_datestart_formatted,id,username,user_firstname,user_lastname,testid,test_name,result_timeexceeded,result_points,result_pointsmax,result_score,grade_name';
}
$i_columns = explode(',', $i_columns_text);
foreach ($i_columns as $key => $val) {
    $g_vars['page']['tables'][1]['columns_to_show'][$val] = true;
}
if (readGetVar('action') == 'print') {
    $g_vars['page']['meta'] .= '<script language=javascript type="text/javascript">window.print();</script>';
}
$i_donotshow = true;
include_once $DOCUMENT_PAGES . 'reports-manager-1.inc.php';
displayTemplate('reports-manager-report-1');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:19,代码来源:reports-manager-report-1.inc.php

示例7: writeQryTableHeaders

    } else {
        echo '<td width=32><img src="images/button-next-big-inactive.gif" border=0 title="' . $lngstr['button_next_page'] . '"></td>';
        echo '<td width=32><img src="images/button-last-big-inactive.gif" border=0 title="' . $lngstr['button_last_page'] . '"></td>';
    }
}
echo '<td width=2><img src="images/toolbar-right.gif" width=2 height=32></td></tr></table>';
echo '</td></tr><tr><td>';
echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">';
echo '<tr vAlign=top><td class=rowhdr1 title="' . $lngstr['label_hdr_select_hint'] . '" width=22><input type=checkbox name=toggleAll onclick="toggleCBs(this);"></td>';
writeQryTableHeaders('groups.php?action=' . $i_url_limit_addon, $i_tablefields, $i_order_no, $i_direction);
echo '<td class=rowhdr1 colspan=2>' . $lngstr['label_hdr_action'] . '</td></tr>';
//9917
$i_rSet1 = $g_db->SelectLimit("SELECT * FROM " . $srv_settings['table_prefix'] . "groups" . $i_sql_order_addon, $i_limitcount, $i_limitfrom);
if (!$i_rSet1) {
    showDBError(__FILE__, 1);
} else {
    $i_counter = 0;
    while (!$i_rSet1->EOF) {
        $rowname = $i_counter % 2 ? "rowone" : "rowtwo";
        echo '<tr id=tr_' . $i_pagewide_id . ' class=' . $rowname . ' onmouseover="rollTR(' . $i_pagewide_id . ',1);" onmouseout="rollTR(' . $i_pagewide_id . ',0);"><td align=center width=22' . ($i_rSet1->fields["groupid"] > SYSTEM_GROUP_MAX_INDEX ? '' : ' class=system') . '><input id=cb_' . $i_pagewide_id . ' type=checkbox name=box_groups[] value="' . $i_rSet1->fields["groupid"] . '" onclick="toggleCB(this);"></td><td align=right>' . $i_rSet1->fields["groupid"] . '</td><td>' . getTruncatedHTML($i_rSet1->fields["group_name"]) . '</td><td>' . $i_rSet1->fields["group_description"] . '</td>';
        echo '<td align=center width=22><a href="groups.php?groupid=' . $i_rSet1->fields["groupid"] . $i_order_addon . $i_url_limit_addon . '&action=edit"><img width=20 height=20 border=0 src="images/button-edit.gif" title="' . $lngstr['label_action_group_edit'] . '"></a></td><td align=center width=22>' . ($i_rSet1->fields["groupid"] > SYSTEM_GROUP_MAX_INDEX ? '<a href="groups.php?groupid=' . $i_rSet1->fields["groupid"] . $i_order_addon . $i_url_limit_addon . '&action=delete" onclick="return confirmMessage(this, \'' . $lngstr['qst_delete_group'] . '\')"><img width=20 height=20 border=0 src="images/button-cross.gif" title="' . $lngstr['label_action_group_delete'] . '"></a>' : '<img width=20 height=20 border=0 src="images/button-cross-inactive.gif">') . '</td></tr>';
        $i_counter++;
        $i_pagewide_id++;
        $i_rSet1->MoveNext();
    }
    $i_rSet1->Close();
}
echo '</table>';
echo '</td></tr></table></form>';
displayTemplate('_footer');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:30,代码来源:groups-1.inc.php

示例8: sprintf

$g_vars['page']['userfield6_type_label'] = sprintf($lngstr['label_userfield_type'], 6);
$g_vars['page']['userfield6_type_content'] = getSelectElement('type_userfield6', getConfigItem(CONFIG_reg_type_userfield6), $lngstr['label_userfield_type_items'], ' onchange="showDIV(\'div_config_values_userfield6\', this.selectedIndex==' . CONFIG_CONST_type_dropdownlist . ', false);"') . '<br><div id=div_config_values_userfield6 style="display:' . (getConfigItem(CONFIG_reg_type_userfield6) == CONFIG_CONST_type_dropdownlist ? 'block' : 'none') . '">' . getInputElement('values_userfield6', getConfigItem(CONFIG_reg_values_userfield6)) . ' ' . $lngstr['label_userfield_values_hint'] . '</div>';
$g_vars['page']['userfield6_caption_label'] = sprintf($lngstr['label_userfield_caption'], 6);
$g_vars['page']['userfield6_caption_content'] = getInputElement('caption_userfield6', getConfigItem(CONFIG_reg_caption_userfield6));
$g_vars['page']['userfield7_label'] = sprintf($lngstr['label_userfield'], 7);
$g_vars['page']['userfield7_content'] = getSelectElement('userfield7', getConfigItem(CONFIG_reg_userfield7), array(CONFIG_CONST_donotshow => $lngstr['page_config']['donotshow'], CONFIG_CONST_show_donotrequire => $lngstr['page_config']['show_donotrequire'], CONFIG_CONST_show_require => $lngstr['page_config']['show_require']));
$g_vars['page']['userfield7_type_label'] = sprintf($lngstr['label_userfield_type'], 7);
$g_vars['page']['userfield7_type_content'] = getSelectElement('type_userfield7', getConfigItem(CONFIG_reg_type_userfield7), $lngstr['label_userfield_type_items'], ' onchange="showDIV(\'div_config_values_userfield7\', this.selectedIndex==' . CONFIG_CONST_type_dropdownlist . ', false);"') . '<br><div id=div_config_values_userfield7 style="display:' . (getConfigItem(CONFIG_reg_type_userfield7) == CONFIG_CONST_type_dropdownlist ? 'block' : 'none') . '">' . getInputElement('values_userfield7', getConfigItem(CONFIG_reg_values_userfield7)) . ' ' . $lngstr['label_userfield_values_hint'] . '</div>';
$g_vars['page']['userfield7_caption_label'] = sprintf($lngstr['label_userfield_caption'], 7);
$g_vars['page']['userfield7_caption_content'] = getInputElement('caption_userfield7', getConfigItem(CONFIG_reg_caption_userfield7));
$g_vars['page']['userfield8_label'] = sprintf($lngstr['label_userfield'], 8);
$g_vars['page']['userfield8_content'] = getSelectElement('userfield8', getConfigItem(CONFIG_reg_userfield8), array(CONFIG_CONST_donotshow => $lngstr['page_config']['donotshow'], CONFIG_CONST_show_donotrequire => $lngstr['page_config']['show_donotrequire'], CONFIG_CONST_show_require => $lngstr['page_config']['show_require']));
$g_vars['page']['userfield8_type_label'] = sprintf($lngstr['label_userfield_type'], 8);
$g_vars['page']['userfield8_type_content'] = getSelectElement('type_userfield8', getConfigItem(CONFIG_reg_type_userfield8), $lngstr['label_userfield_type_items'], ' onchange="showDIV(\'div_config_values_userfield8\', this.selectedIndex==' . CONFIG_CONST_type_dropdownlist . ', false);"') . '<br><div id=div_config_values_userfield8 style="display:' . (getConfigItem(CONFIG_reg_type_userfield8) == CONFIG_CONST_type_dropdownlist ? 'block' : 'none') . '">' . getInputElement('values_userfield8', getConfigItem(CONFIG_reg_values_userfield8)) . ' ' . $lngstr['label_userfield_values_hint'] . '</div>';
$g_vars['page']['userfield8_caption_label'] = sprintf($lngstr['label_userfield_caption'], 8);
$g_vars['page']['userfield8_caption_content'] = getInputElement('caption_userfield8', getConfigItem(CONFIG_reg_caption_userfield8));
$g_vars['page']['userfield9_label'] = sprintf($lngstr['label_userfield'], 9);
$g_vars['page']['userfield9_content'] = getSelectElement('userfield9', getConfigItem(CONFIG_reg_userfield9), array(CONFIG_CONST_donotshow => $lngstr['page_config']['donotshow'], CONFIG_CONST_show_donotrequire => $lngstr['page_config']['show_donotrequire'], CONFIG_CONST_show_require => $lngstr['page_config']['show_require']));
$g_vars['page']['userfield9_type_label'] = sprintf($lngstr['label_userfield_type'], 9);
$g_vars['page']['userfield9_type_content'] = getSelectElement('type_userfield9', getConfigItem(CONFIG_reg_type_userfield9), $lngstr['label_userfield_type_items'], ' onchange="showDIV(\'div_config_values_userfield9\', this.selectedIndex==' . CONFIG_CONST_type_dropdownlist . ', false);"') . '<br><div id=div_config_values_userfield9 style="display:' . (getConfigItem(CONFIG_reg_type_userfield9) == CONFIG_CONST_type_dropdownlist ? 'block' : 'none') . '">' . getInputElement('values_userfield9', getConfigItem(CONFIG_reg_values_userfield9)) . ' ' . $lngstr['label_userfield_values_hint'] . '</div>';
$g_vars['page']['userfield9_caption_label'] = sprintf($lngstr['label_userfield_caption'], 9);
$g_vars['page']['userfield9_caption_content'] = getInputElement('caption_userfield9', getConfigItem(CONFIG_reg_caption_userfield9));
$g_vars['page']['userfield10_label'] = sprintf($lngstr['label_userfield'], 10);
$g_vars['page']['userfield10_content'] = getSelectElement('userfield10', getConfigItem(CONFIG_reg_userfield10), array(CONFIG_CONST_donotshow => $lngstr['page_config']['donotshow'], CONFIG_CONST_show_donotrequire => $lngstr['page_config']['show_donotrequire'], CONFIG_CONST_show_require => $lngstr['page_config']['show_require']));
$g_vars['page']['userfield10_type_label'] = sprintf($lngstr['label_userfield_type'], 10);
$g_vars['page']['userfield10_type_content'] = getSelectElement('type_userfield10', getConfigItem(CONFIG_reg_type_userfield10), $lngstr['label_userfield_type_items'], ' onchange="showDIV(\'div_config_values_userfield10\', this.selectedIndex==' . CONFIG_CONST_type_dropdownlist . ', false);"') . '<br><div id=div_config_values_userfield10 style="display:' . (getConfigItem(CONFIG_reg_type_userfield10) == CONFIG_CONST_type_dropdownlist ? 'block' : 'none') . '">' . getInputElement('values_userfield10', getConfigItem(CONFIG_reg_values_userfield10)) . ' ' . $lngstr['label_userfield_values_hint'] . '</div>';
$g_vars['page']['userfield10_caption_label'] = sprintf($lngstr['label_userfield_caption'], 10);
$g_vars['page']['userfield10_caption_content'] = getInputElement('caption_userfield10', getConfigItem(CONFIG_reg_caption_userfield10));
$g_smarty->assign('g_vars', $g_vars);
displayTemplate('config-main');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:30,代码来源:config-1.inc.php

示例9: sprintf

$g_vars['page']['questionindicator'] = sprintf($lngstr['page_test']['questionindicator'], $G_SESSION['yt_questionno_current'], $G_SESSION['yt_questioncount']);
$g_vars['page']['testid'] = $G_SESSION['testid'];
$g_vars['page']['test_name'] = convertTextValue($G_SESSION['yt_name']);
$g_vars['page']['content_protection'] = $G_SESSION['yt_contentprotection'];
if (!isset($G_SESSION['questionid'])) {
    $nQuestionNoReal = $G_SESSION['yt_questions'][$G_SESSION['yt_questionno_current'] - 1];
    $G_SESSION['questionid'] = $G_SESSION['yt_questionids'][$nQuestionNoReal];
    $G_SESSION['yt_questionstart'] = time();
}
$g_vars['page']['has_feedback'] = $G_SESSION['yt_state'] == TEST_STATE_QFEEDBACK;
readTestQuestion($G_SESSION['yt_questionno_current'], $G_SESSION['questionid']);
$G_SESSION['yt_page_hasfeedback'] = $g_vars['page']['has_feedback'];
if ($g_vars['page']['errors_fatal'] && $G_SESSION['yt_state'] != TEST_STATE_QFEEDBACK) {
    unregisterTestData();
}
$g_vars['page']['variables']['yt_questionno'] = $G_SESSION['yt_questionno'];
$g_vars['page']['variables']['yt_questionno_current'] = $G_SESSION['yt_questionno_current'];
$g_vars['page']['variables']['yt_questioncount'] = $G_SESSION['yt_questioncount'];
$g_vars['page']['variables']['yt_state'] = $G_SESSION['yt_state'];
$g_vars['page']['review']['mode'] = $G_SESSION['yt_canreview'];
if ($G_SESSION['yt_canreview'] == IGT_TEST_REVIEW_ALLOWED) {
    for ($nQuestionNo = 1; $nQuestionNo <= min($G_SESSION['yt_questionno'], $G_SESSION['yt_questioncount']); $nQuestionNo++) {
        $nQuestionNoReal = $G_SESSION['yt_questions'][$nQuestionNo - 1];
        $nQuestionID = $G_SESSION['yt_questionids'][$nQuestionNoReal];
        $g_vars['page']['review']['question'][$nQuestionNo]['text_truncated'] = getTruncatedHTML(getRecordItem($srv_settings['table_prefix'] . 'questions', 'question_text', 'questionid=' . $nQuestionID));
    }
}
$g_smarty->assign('g_questionno', $G_SESSION['yt_questionno_current']);
$g_smarty->assign('g_vars', $g_vars);
displayTemplate('test-question');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:30,代码来源:test-1.inc.php

示例10: sprintf

                        if ($g_vars['page']['test'][$i_test_count]['attempts'] >= $g_vars['page']['test'][$i_test_count]['attempts_total']) {
                            $g_vars['page']['test'][$i_test_count]['status_label'] = $lngstr['page-takeatest']['attempts_limit_reached'];
                        } else {
                            $g_vars['page']['test'][$i_test_count]['status_label'] = sprintf($lngstr['page-takeatest']['attempts_left'], $g_vars['page']['test'][$i_test_count]['attempts_total'] - $g_vars['page']['test'][$i_test_count]['attempts']);
                            $g_vars['page']['test'][$i_test_count]['status'] = IGT_TEST_STATUS_AVAILABLE;
                        }
                    } else {
                        $g_vars['page']['test'][$i_test_count]['status_label'] = $lngstr['page_panel_status_available'];
                        $g_vars['page']['test'][$i_test_count]['status'] = IGT_TEST_STATUS_AVAILABLE;
                    }
                }
                if ($g_vars['page']['test'][$i_test_count]['testid'] == readCookieVar('pending_test_ids') && $g_vars['page']['test'][$i_test_count]['status'] == IGT_TEST_STATUS_AVAILABLE) {
                    $g_vars['page']['test'][$i_test_count]['status'] = IGT_TEST_STATUS_INPROGRESS;
                }
                $g_vars['page']['test'][$i_test_count]['status'] = eventOnQueryTestStatus(array('testno' => $i_test_count, 'testid' => $g_vars['page']['test'][$i_test_count]['testid'], 'status' => $g_vars['page']['test'][$i_test_count]['status']));
            }
            $i_rSet1->MoveNext();
        }
        $i_rSet1->Close();
    }
}
if ($g_vars['page']['user_points_max'] != 0) {
    $g_vars['page']['user_score'] = $g_vars['page']['user_points'] * 100 / $g_vars['page']['user_points_max'];
} else {
    $g_vars['page']['user_score'] = 0;
}
$g_vars['page']['test_count'] = $i_test_count;
eventOnBeforePageGeneration(array('page_name' => 'test-select'));
$g_smarty->assign('g_vars', $g_vars);
displayTemplate('test-select');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:30,代码来源:home.inc.php

示例11: readGetVar

<?php

$g_vars['page']['title'] = $lngstr['page_getfile_template_html']['title'];
$f_resultid = (int) readGetVar('resultid');
if ($f_resultid > 0) {
    $g_vars['page']['content'] = getAdvancedReport($f_resultid);
    if ($g_vars['page']['content']) {
        $g_smarty->assign('g_vars', $g_vars);
        displayTemplate('getfile-template-html');
    }
}
function getTestResultSubjectsData($resultid)
{
    global $g_db, $G_SESSION, $srv_settings;
    $arrResult = array();
    $i_rSet1 = $g_db->Execute("SELECT questionid, result_answer_points, result_answer_iscorrect FROM " . $srv_settings['table_prefix'] . "results_answers WHERE resultid=" . $resultid);
    if (!$i_rSet1) {
        showDBError('getTestResultSubjectsData', 1);
    } else {
        while (!$i_rSet1->EOF) {
            $arrQuestion = getRecordItems($srv_settings['table_prefix'] . 'questions', array('subjectid', 'question_points'), 'questionid=' . $i_rSet1->fields['questionid']);
            if (!isset($arrResult[$arrQuestion['subjectid']])) {
                $arrResult[$arrQuestion['subjectid']]['got_answers'] = 0;
                $arrResult[$arrQuestion['subjectid']]['total_answers'] = 0;
                $arrResult[$arrQuestion['subjectid']]['got_points'] = 0;
                $arrResult[$arrQuestion['subjectid']]['total_points'] = 0;
            }
            $arrResult[$arrQuestion['subjectid']]['got_answers'] += $i_rSet1->fields['result_answer_iscorrect'] == IGT_ANSWER_IS_CORRECT ? 1 : 0;
            $arrResult[$arrQuestion['subjectid']]['total_answers'] += 1;
            $arrResult[$arrQuestion['subjectid']]['got_points'] += $i_rSet1->fields['result_answer_points'];
            $arrResult[$arrQuestion['subjectid']]['total_points'] += $arrQuestion['question_points'];
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:getfile-template-html.inc.php

示例12: showDBError

        if ($i_rSet1->fields['test_attempts'] > 0) {
            $i_rSet4 = $g_db->Execute("SELECT test_attempt_count FROM " . $srv_settings['table_prefix'] . "tests_attempts WHERE testid=" . $i_rSet1->fields['testid'] . " AND id=" . $i_rSet1->fields['id']);
            if (!$i_rSet4) {
                showDBError(__FILE__, 3);
            } else {
                if (!$i_rSet4->EOF) {
                    $i_attempt_count = $i_rSet4->fields['test_attempt_count'];
                }
                $i_rSet4->Close();
            }
        }
        $g_vars['page']['tables'][1]['rows'][$i_counter] = $i_rSet1->fields;
        $g_vars['page']['tables'][1]['rows'][$i_counter]['result_datestart_formatted'] = getDateLocal($lngstr['language']['date_format'], $i_rSet1->fields['result_datestart']);
        $g_vars['page']['tables'][1]['rows'][$i_counter]['test_attempt_count'] = $i_attempt_count;
        if ($i_rSet1->fields['rtemplateid'] > 0 && ($i_rSet1->fields['test_reportgradecondition'] == 0 || $i_rSet1->fields['test_reportgradecondition'] >= $i_rSet1->fields['gscale_gradeid'])) {
            $g_vars['page']['tables'][1]['rows'][$i_counter]['show_html'] = $i_rSet1->fields['test_result_showhtml'];
            $g_vars['page']['tables'][1]['rows'][$i_counter]['show_pdf'] = $i_rSet1->fields['test_result_showpdf'];
        } else {
            $g_vars['page']['tables'][1]['rows'][$i_counter]['show_html'] = false;
            $g_vars['page']['tables'][1]['rows'][$i_counter]['show_pdf'] = false;
        }
        $i_counter++;
        $i_rSet1->MoveNext();
    }
    $i_rSet1->Close();
}
eventOnBeforePageGeneration(array('page_name' => 'reports-manager'));
$g_smarty->assign('g_vars', $g_vars);
if (empty($i_donotshow)) {
    displayTemplate('reports-manager');
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:reports-manager-1.inc.php

示例13: showDBError

if (!$i_rSet1) {
    showDBError(__FILE__, 1);
} else {
    if (!$i_rSet1->EOF) {
        $g_vars['page']['test_instructions'] = $i_rSet1->fields['test_instructions'];
    }
    $i_rSet1->Close();
}
for ($i = 2; $i <= $f_pageno; $i++) {
    if (($i_pos = strpos($g_vars['page']['test_instructions'], IGT_TAG_PAGE_BREAK)) !== false) {
        $g_vars['page']['test_instructions'] = substr($g_vars['page']['test_instructions'], $i_pos + strlen(IGT_TAG_PAGE_BREAK));
    } else {
        $g_vars['page']['test_instructions'] = '';
    }
}
if (strlen($g_vars['page']['test_instructions']) > 0) {
    if (($i_pos = strpos($g_vars['page']['test_instructions'], IGT_TAG_PAGE_BREAK)) !== false) {
        $g_vars['page']['test_instructions'] = substr($g_vars['page']['test_instructions'], 0, $i_pos);
        $g_vars['page']['next_page_exists'] = true;
    } else {
        $g_vars['page']['next_page_exists'] = false;
    }
    $g_vars['page']['form_action_url'] = 'test.php?action=instructions&testid=' . $G_SESSION['testid'] . '&pageno=' . ($f_pageno + 1);
    $g_smarty->assign('g_vars', $g_vars);
    displayTemplate('test-instructions');
} else {
    if ($G_SESSION['yt_state'] == TEST_STATE_TESTINTRO) {
        $G_SESSION['yt_state'] = TEST_STATE_QSHOW;
    }
    gotoLocation('test.php?action=&testid=' . $G_SESSION['testid']);
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:test-5.inc.php

示例14: defined

<?php

defined('IGT_VALID_ENVIRONMENT') or exit('Restricted access');
$g_vars['page']['hide_cpanel'] = true;
$f_username = readPostVar('username');
$g_vars['page']['username'] = convertTextValue($f_username);
$g_vars['page']['gotourl'] = @htmlspecialchars($_SERVER['REQUEST_URI']);
$g_vars['page']['cansigninasguest'] = getRecordCount($srv_settings['table_prefix'] . 'users', 'id=' . SYSTEM_GROUP_GUEST_id . ' AND user_enabled=1') > 0;
$g_vars['page']['test_code'] = isset($G_SESSION['test_code']) ? $G_SESSION['test_code'] : '';
$g_vars['page']['can_register'] = getConfigItem(CONFIG_can_register);
eventOnBeforePageGeneration(array('page_name' => 'signin'));
$g_smarty->assign('g_vars', $g_vars);
displayTemplate('signin');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:13,代码来源:signin-1.inc.php

示例15: showDBError

        if (!$i_rSet5) {
            showDBError(__FILE__, 5);
        } else {
            if (!$i_rSet5->EOF) {
                $i_subjectid = $i_rSet5->fields['subjectid'];
                $g_vars['page']['subjects'][$i_subjectid]['question_count'] = getRecordCount($srv_settings['table_prefix'] . 'questions', 'subjectid=' . $i_subjectid);
                if (!isset($g_vars['page']['subjects'][$i_subjectid]['question_got'])) {
                    $g_vars['page']['subjects'][$i_subjectid]['name'] = $i_rSet5->fields['subject_name'];
                    $g_vars['page']['subjects'][$i_subjectid]['question_got'] = 0;
                    $g_vars['page']['subjects'][$i_subjectid]['question_correct'] = 0;
                }
                $g_vars['page']['subjects'][$i_subjectid]['question_got']++;
                if ($i_question['iscorrect'] == IGT_ANSWER_IS_CORRECT) {
                    $g_vars['page']['subjects'][$i_subjectid]['question_correct']++;
                }
            }
            $i_rSet5->Close();
        }
    }
    foreach ($g_vars['page']['subjects'] as $i_subjectid => $i_grade) {
        $g_vars['page']['subjects'][$i_subjectid]['question_correct_percents'] = $g_vars['page']['subjects'][$i_subjectid]['question_correct'] * 100 / $g_vars['page']['subjects'][$i_subjectid]['question_got'];
    }
}
$i_resultid = (int) readGetVar('resultid');
writeResultStats((int) $i_resultid);
$g_smarty->assign('g_vars', $g_vars);
if (!empty($_GET['print'])) {
    displayTemplate('statistics-resultid-print');
} else {
    displayTemplate('statistics-resultid');
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:statistics-resultid.inc.php


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