Пример #1
0
function other()
{
    $dept = new department();
    $admindept = $dept->getAll();
    $man = new manager();
    $dept_managers = $man->getAllDept();
    while ($element = each($dept_managers)) {
    }
    $smt = new SMT('manager/AddAdmin', '..');
    $smt->render(array('admindept' => $admindept, 'admindept_sel' => key($admindept), 'dept_managers' => $dept_managers));
}
Пример #2
0
 function setColumn()
 {
     $MT = $this->grid->MasterTable;
     $column = new GridBoundColumn();
     $column->DataField = "m_id";
     $column->ReadOnly = true;
     $column->Visible = false;
     $MT->AddColumn($column);
     $column = new GridBoundColumn();
     $column->DataField = "m_user";
     $column->HeaderText = "用户名";
     $column->NullDisplayText = "请添加该院系管理员";
     $column->AddValidator(REValidator::username());
     $MT->AddColumn($column);
     $column = new GridBoundColumn();
     $column->DataField = "m_name";
     $column->HeaderText = "姓名";
     $MT->AddColumn($column);
     $column = new GridDropDownColumn();
     $column->DataField = "dept_id";
     $column->HeaderText = "院系";
     $column->ReadOnly = false;
     $column->Visible = false;
     $deptobj = new department();
     $dept = $deptobj->getAll();
     foreach ($dept as $key => $value) {
         $column->AddItem($value, $key);
     }
     $MT->AddColumn($column);
     $column = new GridBoundColumn();
     $column->DataField = "dept_name";
     $column->HeaderText = "院系";
     $column->ReadOnly = true;
     $column->Width = "200px";
     $MT->AddColumn($column);
     $column = new GridBoundColumn();
     $column->DataField = "m_pwd";
     $column->HeaderText = "密码";
     $column->DefaultValue = "请使用强密码";
     $column->ReadOnly = false;
     $column->Visible = false;
     $column->AddValidator(REValidator::password());
     $MT->AddColumn($column);
     $column = new GridEditDeleteColumn();
     $column->ShowDeleteButton = true;
     $column->Align = "center";
     $MT->AddColumn($column);
 }
Пример #3
0
<?php

$noSession = 1;
require_once "../../../../../class/autoload.inc";
$webroot = "../../../..";
//    $_SESSION['dept_id']=4;
$dep = new department();
$st_depart = $dep->getAll();
// $st_depart[-1] = "无";
$edu = new education();
$st_edu = $edu->getAll();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  xml:lang="zh-CN" lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Account Registration</title>
        
        <link href="../../../../css/StuReg.css" rel="stylesheet" type="text/css" />
        <script src="<?php 
echo $webroot . '/jquery-ui/js/jquery-1.9.1.js';
?>
"></script>
        <script src="<?php 
echo $webroot . '/jquery-ui/js/jquery-ui-1.10.1.custom.js';
?>
"></script>
        <script type="text/javascript" src="../../../../js/StuReg.js"></script>
        <link rel="stylesheet" href="<?php 
echo $webroot . '/jquery-ui/development-bundle/themes/black-tie/jquery-ui.css';
?>
Пример #4
0
    public static function select($withMajorAndClass)
    {
        $dept_obj = new department();
        $dept = $dept_obj->getAll();
        $html = "<span class='header' style='margin:4px;padding:4px;height:25px;width:500px;border:solid 1px #C6E1F2;'>";
        $html .= "学院:<select id='st_depart' name='st_depart' >";
        $html .= "<option value='-1'>全部</option>";
        foreach ($dept as $key => $value) {
            $html .= "<option value='{$key}'>{$value}</option>";
        }
        $html .= "</select>";
        if ($withMajorAndClass) {
            $html .= "专业:<select id='st_major' name='st_major' class='dept_select'>\n            <option value='-1'>全部</option> </select>\n            班级:<select id='st_class' name='st_class' class='dept_select'>\n            <option value='-1'>全部</option></select>";
        }
        $html .= "</span>";
        $html .= "<script type='text/javascript'>";
        $html .= <<<'EOF'
   var post_url = '../../../../../class/LoadAndCheck.php';
function depart_change($dept_id) {
    $("#st_major").html('<option value="-1" selected="selected">全部</option>');
    $("#st_class").html('<option value="-1" selected="selected">全部</option>');
    if($dept_id != -1) {
        $.post(post_url,{
            oper:'LoadMajor', 
            dept_id:$dept_id
        }, 
        function(data) {
            var option = "";
            for(var i = 0; i < data.length; i++) {
                option += '<option value="'+data[i].major_id+'">'+data[i].major_name+'</option>';
            }
            $("#st_major").append(option);
        }, 'json');
    }
}
function major_change($major_id){
    $("#st_class").html('<option value="-1" selected="selected">全部</option>');
    if($major_id != -1) {
        $.post(post_url,{
            oper:'LoadClass',
            major_id:$major_id
        }, function(data) {
            var option="";
            for(var i = 0; i < data.length; i++) {
                option += '<option value="'+data[i].class_id+'">'+data[i].class_name+'</option>';
            }
            $("#st_class").append(option);
        },'json');
    }
}
$(document).ready(function() {
    $.ajaxSetup({
        async: false
    });
    $("#st_depart").change(function(){
        depart_change($(this).val());
    });

    $("#st_major").change(function() {
        major_change($(this).val());
    });
    $("#st_button").click(function(){
        $.get("grid.php",{
            dept_id: $("#st_depart").val(),
            major_id: $("#st_major").val(),
            class_id: $("#st_class").val()
        }, function(data) {
            $("#studentGrid").html(data);
        },'html');			
    });
    
    
    var hidden_depart = $("#hidden_depart").val();
    var hidden_major = $("#hidden_major").val();
    var hidden_class = $("#hidden_class").val();
    
    
    
    if (hidden_depart != "-1"){
        $('#st_depart').val(hidden_depart).change();
    }
    if (hidden_major != "-1"){
        $('#st_major').val(hidden_major).change();
    }
    if (hidden_class != "-1"){
        $('#st_class').val(hidden_class).change();
    }
});



EOF;
        $html .= "</script>";
        return $html;
    }
Пример #5
0
function Step_3()
{
    $dep = new department();
    $st_depart = $dep->getAll();
    $st_depart[-1] = "无";
    $edu = new education();
    $st_edu = $edu->getAll();
    $html = '<div class="blank_cell">
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_edu" id="st_edu_label">在读学历</label>             	
                            </div> 
                        </div>
                        <div class="input_blank"><select id="st_edu" name="st_edu">';
    foreach ($st_edu as $key => $value) {
        $html .= '<option value="' . $key . '">' . $value . '</option>';
    }
    $html .= '</select></div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_depart" id="st_depart_label">学院</label>             	
                            </div> 
                        </div>
                        <div class="input_blank"><select id="st_depart" name="id_depart">';
    foreach ($st_depart as $key => $value) {
        $html .= '<option value="' . $key . '">' . $value . '</option>';
    }
    $html .= '</select></div>
                    </div>

                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_major_label">专业</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_major">
                            </select>
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_class_label">班级</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_class">

                            </select>
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_grade_label">入学年份</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_grade">

                            </select>
                        </div>
                    </div>
             <div class="alert_blank">       
                <div id="st_edu_aten" class="aten_style  gray">
                    选择当前在读学历
                </div>
                
                <div id="st_depart_aten" class="aten_style  gray">
                    Please select your department, if there is none, please contact the administrators!
                </div>
                <div id="st_major_aten" class="aten_style  gray">
                    选择学院后,专业会自动弹出,若网速慢,请稍作等待。
                    Please select your major, if there is none, please contact the administrators!
                </div>
                <div id="st_class_aten" class="aten_style  gray">
                    选择专业后,班级会自动弹出,若网速慢,请稍作等待。
                    Please select your class, if there is none, please contact the administrators!
                </div>
                <div id="st_grade_aten" class="aten_style  gray">
                </div>
             </div>
    <div id="submit_part">
            <a  id="submit_bt"  href="javascript:void(0);"></a>
        </div>
';
    return $html;
}
Пример #6
0
function Step_2()
{
    $dep = new department();
    $st_depart = $dep->getAll();
    $st_depart[-1] = "无";
    $edu = new education();
    $st_edu = $edu->getAll();
    $html = '<div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_name" id="st_name_label">姓名</label>             	
                            </div> 
                        </div>
                        <div class="input_blank input_blank_de">
                            <input type="text" id="st_name" />
                        </div>
                    </div>

                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label  id="st_birth_label">出生年月</label>             	
                            </div> 
                        </div>
                        <div class="input_blank input_blank_de">
                            <input type="text" id="datepicker" />
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_No" id="st_No_label">学号</label>             	
                            </div> 
                        </div>
                        <div class="input_blank input_blank_de">
                            <input type="text" id="st_No" />
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_mail" id="st_mail_label">邮箱</label>             	
                            </div> 
                        </div>
                        <div class="input_blank input_blank_de">
                            <input type="text" id="st_mail" />
                        </div>
                    </div>
                    
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_edu" id="st_edu_label">在读学历</label>             	
                            </div> 
                        </div>
                        <div class="input_blank"><select id="st_edu" name="st_edu">';
    foreach ($st_edu as $key => $value) {
        $html .= '<option value="' . $key . '">' . $value . '</option>';
    }
    $html .= '</select></div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_depart" id="st_depart_label">学院</label>             	
                            </div> 
                        </div>
                        <div class="input_blank"><select id="st_depart" name="id_depart">';
    $html .= '<option value="-1">无</option>';
    foreach ($st_depart as $key => $value) {
        $html .= '<option value="' . $key . '">' . $value . '</option>';
    }
    $html .= '</select></div>
                    </div>

                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_major_label">专业</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_major">
                            </select>
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_class_label">班级</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_class">

                            </select>
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_grade_label">入学年份</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_grade">

                            </select>
                        </div>
                    </div>
    <div id="submit_part">
            <a  id="submit_bt"  href="javascript:void(0);"></a>
        </div>';
    return $html;
}