writeErrorsWarningsBar(); $i_rSet1 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "subjects WHERE subjectid={$f_subjectid}"); if (!$i_rSet1) { showDBError(__FILE__, 1); } else { if (!$i_rSet1->EOF) { $i_subjects = array('' => $lngstr['label_none']); $i_rSet2 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "subjects"); if (!$i_rSet2) { showDBError(__FILE__, 2); } else { while (!$i_rSet2->EOF) { if ($i_rSet2->fields['subjectid'] != $f_subjectid) { $i_subjects[$i_rSet2->fields['subjectid']] = $i_rSet2->fields['subject_name']; } $i_rSet2->MoveNext(); } $i_rSet2->Close(); } echo '<p><form method=post action="subjects.php?subjectid=' . $f_subjectid . '&action=edit">'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; $i_rowno = 0; writeTR2($lngstr['page_subjects_subjectid'], $i_rSet1->fields['subjectid']); writeTR2($lngstr['page_subjects_subjectname'], getInputElement('subject_name', $i_rSet1->fields['subject_name'])); writeTR2($lngstr['page_subjects_subjectdescription'], getTextArea('subject_description', $i_rSet1->fields['subject_description'])); echo '</table>'; echo '<p class=center><input class=btn type=submit name=bsubmit value=" ' . $lngstr['button_update'] . ' "> <input class=btn type=submit name=bcancel value=" ' . $lngstr['button_cancel'] . ' "></form>'; } $i_rSet1->Close(); } displayTemplate('_footer');
$g_vars['page']['selected_section'] = 'testmanager'; $g_vars['page']['selected_tab'] = 'grades-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_grades_edit'] . '</h2>'; writeErrorsWarningsBar(); $i_rSet1 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "gscales WHERE gscaleid={$f_gscaleid}"); if (!$i_rSet1) { showDBError(__FILE__, 1); } else { if (!$i_rSet1->EOF) { echo '<p><form method=post action="grades.php?gscaleid=' . $f_gscaleid . '&action=settings">'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; $i_rowno = 0; writeTR2($lngstr['page_grades_gscaleid'], $i_rSet1->fields["gscaleid"]); writeTR2($lngstr['page_grades_gradename'], getInputElement('gscale_name', $i_rSet1->fields["gscale_name"])); writeTR2($lngstr['page_grades_gradedescription'], getTextArea('gscale_description', $i_rSet1->fields["gscale_description"])); $i_scale_text = ""; $i_rSet3 = $g_db->Execute("SELECT gscale_gradeid, grade_name, grade_from, grade_to FROM " . $srv_settings['table_prefix'] . "gscales_grades WHERE gscaleid=" . $f_gscaleid); if (!$i_rSet3) { showDBError(__FILE__, 3); } else { while (!$i_rSet3->EOF) { $i_scale_text .= sprintf("%.1f", $i_rSet3->fields['grade_from']) . '% - ' . sprintf("%.1f", $i_rSet3->fields['grade_to']) . '% <b>' . $i_rSet3->fields['grade_name'] . '</b> [<a href="grades.php?action=edits&gscaleid=' . $f_gscaleid . '&gscale_gradeid=' . $i_rSet3->fields['gscale_gradeid'] . '">' . $lngstr['page_grades']['edit_grade'] . '</a>]<br>'; $i_rSet3->MoveNext(); } $i_rSet3->Close(); } if ($i_scale_text) { $i_scale_text .= '<br>'; }
case 4: echo '<h1>' . $lngstr['install_page3'] . '</h1>'; echo $lngstr['install_page3_description']; if (isset($g_vars['page']['errors']) && $g_vars['page']['errors']) { echo '<p><b><font color="#cc0000">' . $g_vars['page']['errors'] . '</font></b>'; } if (isset($g_vars['page']['notifications']) && $g_vars['page']['notifications']) { echo '<p><b><font color="#006000">' . $g_vars['page']['notifications'] . '</font></b>'; } echo '<p><table cellpadding=5 cellspacing=1 border=0 width="100%">'; writeInstallDialogRow($lngstr['install_dbdriver'], getSelectElement('db_driver', @$_SESSION['INSTALL']['db_driver'], $m_db_drivers)); writeInstallDialogRow($lngstr['install_dbhost'], getInputElement('db_host', @$_SESSION['INSTALL']['db_host'])); writeInstallDialogRow($lngstr['install_dbdb'], getInputElement('db_db', @$_SESSION['INSTALL']['db_db'])); writeInstallDialogRow($lngstr['install_dbuser'], getInputElement('db_user', @$_SESSION['INSTALL']['db_user'])); writeInstallDialogRow($lngstr['install_dbpassword'], getInputElement('db_password', @$_SESSION['INSTALL']['db_password'])); writeInstallDialogRow($lngstr['install_dbtableprefix'], getInputElement('table_prefix', @$_SESSION['INSTALL']['table_prefix'])); echo '</table>'; break; case 5: echo '<h1>' . $lngstr['install_page4'] . '</h1>'; if (isset($g_vars['page']['errors']) && $g_vars['page']['errors']) { echo '<p><b><font color="#cc0000">' . $g_vars['page']['errors'] . '</font></b>'; echo $lngstr['install_downloadconfig']; } else { echo $lngstr['install_canwritetoconfig']; } echo $lngstr['install_page4_description']; break; } echo '</td></tr><tr><td>'; echo '<p align=center>';
$g_vars['page']['userfield6_content'] = getSelectElement('userfield6', getConfigItem(CONFIG_reg_userfield6), 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']['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');
writeErrorsWarningsBar(); $i_rSet1 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "etemplates WHERE etemplateid={$f_etemplateid}"); if (!$i_rSet1) { showDBError(__FILE__, 1); } else { if (!$i_rSet1->EOF) { echo '<p><form name=etemplateForm method=post action="email-templates.php?etemplateid=' . $f_etemplateid . '&action=edit">'; echo '<table cellpadding=0 cellspacing=1 border=0 width="100%">'; echo '<tr vAlign=top><td>'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; $i_rowno = 0; writeTR2($lngstr['page_etemplates_etemplateid'], $i_rSet1->fields["etemplateid"]); writeTR2($lngstr['page_etemplates_etemplatename'], getInputElement('etemplate_name', $i_rSet1->fields["etemplate_name"])); writeTR2($lngstr['page_etemplates_etemplatedescription'], getTextArea('etemplate_description', $i_rSet1->fields["etemplate_description"])); writeTR2($lngstr['page_etemplates_etemplatefrom'], getInputElement('etemplate_from', $i_rSet1->fields["etemplate_from"])); writeTR2($lngstr['page_etemplates_etemplatesubject'], getInputElement('etemplate_subject', $i_rSet1->fields["etemplate_subject"])); writeTR2($lngstr['page_etemplates_etemplatebody'], getTextArea('etemplate_body', $i_rSet1->fields["etemplate_body"], '', 30)); echo '</table>'; echo '</td><td>'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; echo '<tr><td class=rowhdr1>' . $lngstr['page_etemplates_template_tags'] . '</td></tr>'; echo '<tr class=rowone><td>'; writeTemplateTag(ETEMPLATE_TAG_USERNAME); echo '<br>'; writeTemplateTag(ETEMPLATE_TAG_USER_PASSWORD); echo '<br>'; writeTemplateTag(ETEMPLATE_TAG_USER_TITLE); echo '<br>'; writeTemplateTag(ETEMPLATE_TAG_USER_FIRST_NAME); echo '<br>'; writeTemplateTag(ETEMPLATE_TAG_USER_LAST_NAME);
echo '<td>' . nl2br($i_result_answer_text) . '</td></tr>'; break; case QUESTION_TYPE_ESSAY: echo '<tr><td width=23 valign=top><nobr><img src="images/select_' . ($i_result_answer_iscorrect == IGT_ANSWER_IS_UNDEFINED ? '13' : ($i_result_answer_iscorrect == IGT_ANSWER_IS_CORRECT ? '12' : ($i_result_answer_iscorrect == IGT_ANSWER_IS_PARTIALLYCORRECT ? '11' : '10'))) . '.gif" width=13 height=15><img src="image/1x1.gif" width=9 height=1></nobr></td>'; echo '<td>' . nl2br($i_result_answer_text) . '</td></tr>'; if ($G_SESSION['access_reportsmanager'] > 2) { echo '<tr>'; echo '<td width=23></td>'; echo '<td width="100%">'; echo '<p><form method=post action="reports-manager.php?resultid=' . $f_resultid . '&answerid=' . $f_answerid . '&action=setpoints">'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; $i_rowno = 0; if ($i_result_answer_iscorrect == IGT_ANSWER_IS_UNDEFINED) { $i_result_answer_points = ''; } writeTR2($lngstr['page_editquestion_points'], getInputElement('points', $i_result_answer_points, 3)); writeTR2($lngstr['page_reportsmanager']['answerfeedback'], getTextArea('feedback', $i_result_answer_feedback)); echo '</table>'; echo '<p class=center><input class=btn type=submit name=bsubmit value=" ' . $lngstr['button_set'] . ' "></p></form>'; echo '</td></tr>'; } else { echo '<tr>'; echo '<td width=23></td>'; echo '<td width="100%"><strong>'; echo nl2br($i_result_answer_feedback); echo '</strong></td></tr>'; } break; } echo '</table>'; }
$i_userfield9_items = array(); $i_items = explode(',', getConfigItem(CONFIG_reg_values_userfield9)); foreach ($i_items as $val) { $i_userfield9_items[$val] = $val; } } if (getConfigItem(CONFIG_reg_userfield9) > CONFIG_CONST_donotshow) { writeTR2Fixed(getConfigItem(CONFIG_reg_caption_userfield9) . ':', getConfigItem(CONFIG_reg_type_userfield9) == CONFIG_CONST_type_singlelinetext ? getInputElement('user_ufield9', @$arrUserData['user_ufield9']) : (getConfigItem(CONFIG_reg_type_userfield9) == CONFIG_CONST_type_multilinetext ? getTextArea('user_ufield9', @$arrUserData['user_ufield9']) : getSelectElement('user_ufield9', @$arrUserData['user_ufield9'], $i_userfield9_items))); } if (isset($lngstr['custom']['user_userfield10_items'])) { $i_userfield10_items = $lngstr['custom']['user_userfield10_items']; } else { $i_userfield10_items = array(); $i_items = explode(',', getConfigItem(CONFIG_reg_values_userfield10)); foreach ($i_items as $val) { $i_userfield10_items[$val] = $val; } } if (getConfigItem(CONFIG_reg_userfield10) > CONFIG_CONST_donotshow) { writeTR2Fixed(getConfigItem(CONFIG_reg_caption_userfield10) . ':', getConfigItem(CONFIG_reg_type_userfield10) == CONFIG_CONST_type_singlelinetext ? getInputElement('user_ufield10', @$arrUserData['user_ufield10']) : (getConfigItem(CONFIG_reg_type_userfield10) == CONFIG_CONST_type_multilinetext ? getTextArea('user_ufield10', @$arrUserData['user_ufield10']) : getSelectElement('user_ufield10', @$arrUserData['user_ufield10'], $i_userfield10_items))); } echo '</table></div></td></tr>'; if ($G_SESSION['access_users'] != 1 && $G_SESSION['access_users'] != 3) { echo '<tr valign=top><td class=rowhdr2 colspan=2><a class=rowhdr2 href="javascript:void(0)" onclick="javascript:toggleSection(\'div_users_notes\')">' . $lngstr['page_users']['section_notes'] . '</td></tr>'; echo '<tr valign=top><td class=rowone colspan=2><div id=div_users_notes style="display:' . (isset($_COOKIE['div_users_notes']) && $_COOKIE['div_users_notes'] == 'Y' ? 'block' : 'none') . '"><table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; writeTR2Fixed($lngstr['page_users']['notes'], getTextArea('user_notes', @$arrUserData['user_notes'])); echo '</table></div></td></tr>'; } echo '</table>'; echo '<p class=center><input class=btn type=submit name=bsubmit value=" ' . $lngstr['button_update'] . ' "> <input class=btn type=submit name=bcancel value=" ' . $lngstr['button_cancel'] . ' "></form>'; displayTemplate('_footer');
$i_answer_text = $i_rSet3->fields['answer_text']; } writeTR2(sprintf($lngstr['label_answer_text'], $i), getTextEditor(0, 'answer_text[' . $i . ']', $i_answer_text, 3)); break; case QUESTION_TYPE_ESSAY: writeTR2($lngstr['page_editquestion_answer_count'], $lngstr['label_notapplicable']); writeTR2($lngstr['page_editquestion_question_text'], getTextEditor($G_SESSION['config_editortype'], 'question_text', !empty($i_rSet1->fields['question_text']) ? $i_rSet1->fields['question_text'] : $lngstr['page_editquestion_emptyquestion'])); break; case QUESTION_TYPE_RANDOM: writeTR2($lngstr['page_editquestion_question_name'], getInputElement('question_text', !empty($i_rSet1->fields['question_text']) ? $i_rSet1->fields['question_text'] : $lngstr['label_atype_random'] . ' (' . $i_subjects[$f_subjectid] . ')')); break; } $i_rSet3->Close(); } if ($f_question_type != QUESTION_TYPE_RANDOM) { writeTR2($lngstr['page_editquestion_points'], getInputElement('question_points', $i_rSet1->fields['question_points'], 3)); } echo '</table>'; echo '<p class=center><input class=btn type=submit name=bsubmit value=" ' . $lngstr['button_update'] . ' "> <input class=btn type=submit name=bsubmit2 value=" ' . $lngstr['button_update_and_create_new_question'] . ' "> <input class=btn type=submit name=bcancel value=" ' . $lngstr['button_cancel'] . ' "></form>'; echo '<script language=JavaScript type="text/javascript"> function updateQuestion() { ctlQuestionType = document.getElementById("question_type"); nQuestionType = ctlQuestionType ? document.getElementById("question_type").options[document.getElementById("question_type").selectedIndex].value : ""; ctlSubjectID = document.getElementById("subjectid"); nSubjectID = ctlSubjectID ? ctlSubjectID.options[ctlSubjectID.selectedIndex].value : ""; ctlAnswerCount = document.getElementById("answercount"); nAnswerCount = ctlAnswerCount ? ctlAnswerCount.options[ctlAnswerCount.selectedIndex].value : ""; window.open("question-bank.php' . getURLAddon('', array('question_type', 'subjectid', 'answercount')) . '&question_type="+nQuestionType+"&subjectid="+nSubjectID+"&answercount="+nAnswerCount,"_top"); } </script>'; }
$g_vars['page']['selected_tab'] = 'groups-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_groups_settings'] . '</h2>'; writeErrorsWarningsBar(); //9917 $i_rSet1 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "groups WHERE groupid={$f_groupid}"); if (!$i_rSet1) { showDBError(__FILE__, 1); } else { if (!$i_rSet1->EOF) { echo '<p><form method=post action="groups.php?groupid=' . $f_groupid . '&action=edit">'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; $i_rowno = 0; writeTR2($lngstr['page_managegroups_groupid'], $i_rSet1->fields["groupid"]); writeTR2($lngstr['page_managegroups_groupname'], getInputElement('group_name', $i_rSet1->fields["group_name"])); writeTR2($lngstr['page_managegroups_groupdescription'], getTextArea('group_description', $i_rSet1->fields["group_description"])); echo '<tr valign=top><td class=rowhdr2 colspan=2>' . $lngstr['page_groups_access_rights'] . '</td></tr>'; writeTR2($lngstr['page_groups_access_tests'], getSelectElement('access_tests', $i_rSet1->fields["access_tests"], $lngstr['page_groups_access_tests_select'])); writeTR2($lngstr['page_groups_access_questionbank'], getSelectElement('access_questionbank', $i_rSet1->fields["access_questionbank"], $lngstr['page_groups_access_questionbank_select'])); writeTR2($lngstr['page_groups_access_subjects'], getSelectElement('access_subjects', $i_rSet1->fields["access_subjects"], $lngstr['page_groups_access_subjects_select'])); writeTR2($lngstr['page_groups_access_testmanager'], getSelectElement('access_testmanager', $i_rSet1->fields["access_testmanager"], $lngstr['page_groups_access_testmanager_select'])); writeTR2($lngstr['page_groups_access_gradingsystems'], getSelectElement('access_gradingsystems', $i_rSet1->fields["access_gradingsystems"], $lngstr['page_groups_access_gradingsystems_select'])); writeTR2($lngstr['page_groups_access_emailtemplates'], getSelectElement('access_emailtemplates', $i_rSet1->fields["access_emailtemplates"], $lngstr['page_groups_access_emailtemplates_select'])); writeTR2($lngstr['page_groups_access_reporttemplates'], getSelectElement('access_reporttemplates', $i_rSet1->fields["access_reporttemplates"], $lngstr['page_groups_access_reporttemplates_select'])); writeTR2($lngstr['page_groups_access_reportsmanager'], getSelectElement('access_reportsmanager', $i_rSet1->fields["access_reportsmanager"], $lngstr['page_groups_access_reportsmanager_select'])); writeTR2($lngstr['page_groups_access_users'], getSelectElement('access_users', $i_rSet1->fields["access_users"], $lngstr['page_groups_access_users_select'])); writeTR2($lngstr['page_groups_access_groups'], getSelectElement('access_groups', $i_rSet1->fields["access_groups"], $lngstr['page_groups_access_groups_select'])); writeTR2($lngstr['page_groups_access_config'], getSelectElement('access_config', $i_rSet1->fields["access_config"], $lngstr['page_groups_access_config_select'])); writeTR2($lngstr['page_groups_access_visitors'], getSelectElement('access_visitors', $i_rSet1->fields["access_visitors"], $lngstr['page_groups_access_visitors_select'])); echo '</table>';
if ($G_SESSION['access_reportsmanager'] > 1) { $i_users = array('' => $lngstr['label_none']); $i_rSet2 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "users"); if (!$i_rSet2) { showDBError(__FILE__, 2); } else { while (!$i_rSet2->EOF) { $i_users[$i_rSet2->fields['id']] = $i_rSet2->fields['username']; $i_rSet2->MoveNext(); } $i_rSet2->Close(); } $f_id = (int) readGetVar('id', readCookieVar('filter_reportsmanager_id')); $g_vars['page']['username_content'] = getSelectElement('id', $f_id, $i_users); $g_vars['page']['user_lastname_content'] = getInputElement('user_lastname', $f_user_lastname); $g_vars['page']['user_department_content'] = getInputElement('user_department', $f_user_department); } $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 = (int) readGetVar('testid', readCookieVar('filter_reportsmanager_testid')); $g_vars['page']['testid_content'] = getSelectElement('testid', $f_testid, $i_tests); $i_subjects = array('' => $lngstr['label_none']);
echo '<h2>' . $lngstr['page_header_rtemplates_edit'] . '</h2>'; function getTemplateTag($i_tag) { return '["' . $i_tag . '","' . $i_tag . '"]'; } writeErrorsWarningsBar(); $i_rSet1 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "rtemplates WHERE rtemplateid={$f_rtemplateid}"); if (!$i_rSet1) { showDBError(__FILE__, 1); } else { if (!$i_rSet1->EOF) { echo '<p><form name=rtemplateForm method=post action="report-templates.php?rtemplateid=' . $f_rtemplateid . '&action=edit" onsubmit="return submitForm();">'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; $i_rowno = 0; writeTR2($lngstr['page-rtemplates']['rtemplateid'], $i_rSet1->fields['rtemplateid']); writeTR2($lngstr['page-rtemplates']['rtemplatename'], getInputElement('rtemplate_name', $i_rSet1->fields['rtemplate_name'])); writeTR2($lngstr['page-rtemplates']['rtemplatedescription'], getTextArea('rtemplate_description', $i_rSet1->fields['rtemplate_description'])); $i_addon = 'rtemplate_bodyEditor.btnCustomTag=true; rtemplate_bodyEditor.arrCustomTag=['; $i_addon .= getTemplateTag(ETEMPLATE_TAG_IGIVETEST_URL) . ', '; $i_addon .= getTemplateTag(IGT_TAG_PAGE_BREAK) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_id) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USERNAME) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USER_PASSWORD) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USER_CHECKWORD) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_email) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USER_TITLE) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USER_FIRST_NAME) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USER_LAST_NAME) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USER_MIDDLE_NAME) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USER_ADDRESS) . ', '; $i_addon .= getTemplateTag(ETEMPLATE_TAG_USER_CITY) . ', ';
if (isset($lngstr['custom']['user_userfield9_items'])) { $i_userfield9_items = $lngstr['custom']['user_userfield9_items']; } else { $i_userfield9_items = array(); $i_items = explode(',', getConfigItem(CONFIG_reg_values_userfield9)); foreach ($i_items as $val) { $i_userfield9_items[$val] = $val; } } $g_vars['page']['items']['userfield9'] = @getInputField(getConfigItem(CONFIG_reg_userfield9), getConfigItem(CONFIG_reg_caption_userfield9) . ':', getConfigItem(CONFIG_reg_type_userfield9) == CONFIG_CONST_type_singlelinetext ? getInputElement('userfield9', $f_userfield9) : (getConfigItem(CONFIG_reg_type_userfield9) == CONFIG_CONST_type_multilinetext ? getTextArea('userfield9', $f_userfield9) : getSelectElement('userfield9', $f_userfield9, $i_userfield9_items))); if (isset($lngstr['custom']['user_userfield10_items'])) { $i_userfield10_items = $lngstr['custom']['user_userfield10_items']; } else { $i_userfield10_items = array(); $i_items = explode(',', getConfigItem(CONFIG_reg_values_userfield10)); foreach ($i_items as $val) { $i_userfield10_items[$val] = $val; } } $g_vars['page']['items']['userfield10'] = @getInputField(getConfigItem(CONFIG_reg_userfield10), getConfigItem(CONFIG_reg_caption_userfield10) . ':', getConfigItem(CONFIG_reg_type_userfield10) == CONFIG_CONST_type_singlelinetext ? getInputElement('userfield10', $f_userfield10) : (getConfigItem(CONFIG_reg_type_userfield10) == CONFIG_CONST_type_multilinetext ? getTextArea('userfield10', $f_userfield10) : getSelectElement('userfield10', $f_userfield10, $i_userfield10_items))); function getInputField($i_showsettings, $i_caption, $i_value) { if ($i_showsettings >= CONFIG_CONST_show_donotrequire) { return getTR(array($i_caption . ' ' . ($i_showsettings >= CONFIG_CONST_show_autogenerate ? REQUIRED_FIELD_MARK : ''), $i_value)); } return ''; } $g_vars['page']['items']['groupid_input'] = getInputElement('groupid', $f_groupid, 0, 0, '', $i_type = 'hidden'); $g_vars['page']['items']['testid_input'] = getInputElement('testid', $f_testid, 0, 0, '', $i_type = 'hidden'); $g_smarty->assign('g_vars', $g_vars); displayTemplate('register');
function writeInputElement($i_name, $i_value, $size = 50, $maxlength = 0, $i_additional = '') { echo getInputElement($i_name, $i_value, $size, $maxlength, $i_additional); }
$i_groups_text = ''; //9917 $i_rSet3 = $g_db->Execute("SELECT " . $srv_settings['table_prefix'] . "groups.groupid, " . $srv_settings['table_prefix'] . "groups.group_name, " . $srv_settings['table_prefix'] . "groups_tests.groupid as isingroup FROM " . $srv_settings['table_prefix'] . "groups LEFT JOIN " . $srv_settings['table_prefix'] . "groups_tests ON testid=" . $f_testid . " AND " . $srv_settings['table_prefix'] . "groups.groupid=" . $srv_settings['table_prefix'] . "groups_tests.groupid"); if (!$i_rSet3) { showDBError(__FILE__, 3); } else { while (!$i_rSet3->EOF) { if ($i_groups_text) { $i_groups_text .= '<br>'; } $i_groups_text .= getCheckbox('group[' . $i_rSet3->fields['groupid'] . ']', $i_rSet3->fields['isingroup'] != NULL, $i_rSet3->fields['group_name']); $i_rSet3->MoveNext(); } $i_rSet3->Close(); } writeTR2Fixed($lngstr['page_testmanager']['testprice'], getInputElement('test_price', sprintf("%.2f", $i_rSet1->fields['test_price'] / 100), 5)); echo '<tr valign=top><td class=rowhdr2 colspan=2><a class=rowhdr2 href="javascript:void(0)" onclick="javascript:toggleSection(\'div_testmanager_settings_groups\')">' . $lngstr['page_testmanager']['settings']['section_groups'] . '</td></tr>'; echo '<tr valign=top><td class=rowone colspan=2><div id=div_testmanager_settings_groups style="display:' . (isset($_COOKIE['div_testmanager_settings_groups']) && $_COOKIE['div_testmanager_settings_groups'] == 'Y' ? 'block' : 'none') . '"><table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; writeTR2Fixed($lngstr['page_edittests_assignedto'], '<p>' . $i_groups_text . '<p>' . getCheckbox('test_forall', $i_rSet1->fields['test_forall'], $lngstr['page_edittests_assignto_everybody'])); $i_tests_items = array(0 => $lngstr['label_none']); $i_rSet3 = $g_db->Execute("SELECT " . $srv_settings['table_prefix'] . "tests.testid, " . $srv_settings['table_prefix'] . "tests.test_name FROM " . $srv_settings['table_prefix'] . "tests ORDER BY testid"); if (!$i_rSet3) { showDBError(__FILE__, 3); } else { while (!$i_rSet3->EOF) { $i_tests_items[$i_rSet3->fields['testid']] = $i_rSet3->fields['test_name']; $i_rSet3->MoveNext(); } $i_rSet3->Close(); } echo '</table></div></td></tr>';
$f_gscaleid = (int) readGetVar('gscaleid'); $f_gscale_gradeid = (int) readGetVar('gscale_gradeid'); $g_vars['page']['selected_section'] = 'testmanager'; $g_vars['page']['selected_tab'] = 'grades-7'; $g_vars['page']['menu_2_items'] = getMenu2Items($g_vars['page']['selected_section']); writePanel2($g_vars['page']['menu_2_items']); echo '<h2>' . $lngstr['page_header_grade_settings'] . '</h2>'; writeErrorsWarningsBar(); $i_rSet1 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "gscales_grades WHERE gscaleid=" . $f_gscaleid . " AND gscale_gradeid=" . $f_gscale_gradeid); if (!$i_rSet1) { showDBError(__FILE__, 1); } else { if (!$i_rSet1->EOF) { echo '<p><form method=post action="grades.php?action=edits&gscaleid=' . $f_gscaleid . '&gscale_gradeid=' . $f_gscale_gradeid . '">'; echo '<table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; $i_rowno = 0; writeTR2Fixed($lngstr['page_grade_gscaleid'], $i_rSet1->fields['gscale_gradeid']); writeTR2Fixed($lngstr['page_grade_gradename'], getInputElement('grade_name', $i_rSet1->fields['grade_name'])); writeTR2Fixed($lngstr['page_grade_gradefrom'], getInputElement('grade_from', $i_rSet1->fields['grade_from'])); writeTR2Fixed($lngstr['page_grade_gradeto'], getInputElement('grade_to', $i_rSet1->fields['grade_to'])); writeTR2Fixed($lngstr['page_grade_gradedescription'], getTextArea('grade_description', $i_rSet1->fields['grade_description'])); echo '<tr valign=top><td class=rowhdr2 colspan=2><a class=rowhdr2 href="javascript:void(0)" onclick="javascript:toggleSection(\'div_grades_advanced\')">' . $lngstr['page_grade']['section_advanced'] . '</td></tr>'; echo '<tr valign=top><td class=rowone colspan=2><div id=div_grades_advanced style="display:' . (!isset($_COOKIE['div_grades_advanced']) || $_COOKIE['div_grades_advanced'] == 'Y' ? 'block' : 'none') . '"><table class=rowtable2 cellpadding=5 cellspacing=1 border=0 width="100%">'; writeTR2Fixed($lngstr['page_grade']['feedback'], getTextEditor($G_SESSION['config_editortype'], 'grade_feedback', $i_rSet1->fields['grade_feedback'])); echo '</table></div></td></tr>'; echo '</table>'; echo '<p class=center><input class=btn type=submit name=bsubmit value=" ' . $lngstr['button_update'] . ' "> <input class=btn type=submit name=bcancel value=" ' . $lngstr['button_cancel'] . ' "></form>'; } $i_rSet1->Close(); } displayTemplate('_footer');