Exemplo n.º 1
0
function setup_userdata($user)
{
    global $userdata;
    $userdata = $user;
    if ($userdata != null) {
        $faculty = get_facultydata($user->faculty_id);
        setup_facultydata($faculty);
    }
}
<tfoot>
	<tr>
    <th scope="col" class="column-stt">STT</th>
	<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox" /></th>
	<th scope="col" id="cname" class="manage-column column-cname" style="">Môn học</th>
	<th scope="col" id="cfaculty" class="manage-column column-cfaculty" style="">Khoa</th>
	<th scope="col" id="ccredit" class="manage-column column-ccredit" style="">Số tín chỉ</th>
    <th scope="col" id="numstudent" class="manage-column column-numstudent" style="">Số sinh viên</th>
    <th scope="col" id="cexpire" class="manage-column column-cexpire" style="">Hạn đăng ký</th>
	</tr>
</tfoot>
<tbody id="the-course-list" class="list:course">
<?php 
foreach ((array) $all_courses as $course) {
    setup_coursedata($course);
    setup_facultydata(get_facultydata(get_course_facultyid()));
    ?>
<tr id="course-<?php 
    course_id();
    ?>
" valign="top"<?php 
    class_alternate();
    ?>
>
<td class="column-stt"><?php 
    echo ++$offset;
    ?>
</td>
<th scope="row" class="check-column"><input type="checkbox" name="delete_courses[]" value="<?php 
    course_id();
    ?>
Exemplo n.º 3
0
        ?>
"/>
<label for="username">Tên đăng nhập:</label> <input type="text" id="username" name="username" value="<?php 
        ?>
"/>
<label for="code">Mã số GV:</label> <input type="text" id="code" name="code" value="<?php 
        ?>
"/></p>
<label for="birthday">Ngày sinh:</label> <input type="text" id="birthday" name="birthday" value="<?php 
        ?>
"/>
<label for="faculty_id">Khoa:</label> <select id="faculty_id" name="faculty_id">
    <?php 
        $all_faculties = get_all_faculties();
        foreach ($all_faculties as $faculty) {
            setup_facultydata($faculty);
            ?>
    <option  value="<?php 
            faculty_id();
            ?>
"><?php 
            faculty_name();
            ?>
</option>
    <?php 
        }
        ?>
  </select>
  <small><a href="faculty-new.php?redirect_to=<?php 
        echo urlencode(current_url());
        ?>