<?
/*-------------------------------------------------------------------
FILENAME Ver. $Revision: 1.2 $ $Date: 2003/05/21 02:05:50 $
*
Copyright (C) 2000 Hong Kong Baptist University
*
This file is part of the Quadrille system.
* This program is free software; it is distributed under the terms of
the GNU General Public License, either version 2, or (at your option)
* any later version.
* This program 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 General Public License for more details.
*
---------------------------------------------------------------------
*/
?>
<?
require "config_inc.php";
require "global_inc.php";
require "template.php";
include $language_pack;
include "user_{$lang_name}.inc";
require "user_function_inc.php";
require "output_inc.php";
/*************/
/* Main Part */
/*************/
check_expire();
set_cookie($cookie);
$AcceptRole=array("Adm");
restrict_access($AcceptRole);
insert_header();
$currentlocation = insert_current_location($cookie["course_uid"],$cookie["unit_uid"],$cookie["paper_uid"]);//
$content=GET_SEPARATOR();
$java = get_file("javascript/user_js.js");
$html = get_template($template, $template_dir);
if($userrole=="Tea")
$html=ereg_replace("<BEGIN>TITLE<END>",$PAGE_TITLE["TEACHER_EXPORT"],$html);
if($userrole=="Stu")
$html=ereg_replace("<BEGIN>TITLE<END>",$PAGE_TITLE["STUDENT_EXPORT"],$html);
$html=ereg_replace("<BEGIN>CURRENTLOCATION<END>",$currentlocation,$html);
$html=ereg_replace("<BEGIN>CONTENT<END>",$content,$html);
$html=ereg_replace("<BEGIN>COPYRIGHT<END>",$COPYRIGHT,$html);
$html=ereg_replace("<BEGIN>JAVASCRIPT<END>",$java,$html);
print $html;
/**********************/
/* Function Part */
/**********************/
function GET_SEPARATOR(){
include ("./config_inc.php");
include $language_pack;
include "user_{$lang_name}.inc";
global $external_info;
global $user_uid_list;
global $userrole;
global $fromURL;
global $criteria;
global $group_uid;
global $class_uid;
global $course_uid;
global $filename;
global $separator;
$checked_list = split(",",$user_uid_list);
$content='<form name="form1" method="post">';
$content.="<input type=hidden value=\"".basename(__FILE__)."\" name=\"fromURL\">\n";
$content.="<input type=hidden value=\"$userrole\" name=\"userrole\">\n";
$content.="<input type=hidden name=\"user_uid_list\" value=\"$user_uid_list\">\n";
$content.=<<<_HTML_
<table align="center" border="2">
<tr><td nowrap="nowrap" class="tablehead" with="10%">
$SELECT_FIELD_SENTENCE
</td></tr>
<tr class="tablerowyellow"><td> $UID</td></tr>
<tr class="tablerowyellow"><td> $ID_OF_USER</td></tr>
<tr class="tablerowyellow"><td><input type="checkbox" checked name="check_name" value="1">$NAME_OF_USER</td></tr>
<tr class="tablerowyellow"><td><input type="checkbox" checked name="check_sex" value="1">$SEX_OF_USER</td></tr>
<tr class="tablerowyellow"><td> $PASSWD_OF_USER</td></tr>
<tr class="tablerowyellow"><td> $USER_ROLE</td></tr>
_HTML_;
if($userrole=="Stu")
{
$content.=<<<_HTML_
<tr class="tablerowyellow"><td><input type="checkbox" checked name="check_class" value="2">$CLASS_OF_USER</td></tr>
<tr class="tablerowyellow"><td><input type="checkbox" checked name="check_group" value="2">$GROUP_OF_USER</td></tr>
<tr class="tablerowyellow"><td><input type="checkbox" checked name="check_course" value="2">$COURSE_OF_USER</td></tr>
_HTML_;
}
else
if($userrole=="Tea")
{
$content.=<<<_HTML_
<tr class="tablerowyellow"><td><input type="checkbox" checked name="check_class" value="3">$USER_CLASS</td></tr>
<tr class="tablerowyellow"><td><input type="checkbox" checked name="check_group" value="3">$USER_GROUP</td></tr>
<tr class="tablerowyellow"><td><input type="checkbox" checked name="check_course" value="3">$USER_COURSE</td></tr>
_HTML_;
}
$content.="</table><br />";
$content.=<<<_HTML_
<table align="center" border="2">
<tr><td nowrap="nowrap" class="tablehead" with="10%">
$INPUT_SEPARATOR_SENTENCE
<input type="text" name="separator" value="|" size="1">
</td></tr>
</table><br />
</form>
<p align="center">
_HTML_;
$a['CONFIRM_EXPORT']="javascript:Confirm_Export();";
$a['BACK_TO_USER_LIST'] = "user_list.php";
$content.=link_line($a, "");
$content.="</p>";
return $content;
}
?>