Exemplo n.º 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));
}
Exemplo n.º 2
0
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once '../../private/class/SMT.php';
require_once '../../private/class/DB_Connect.php';
$con = new DB_Connect();
$admin_info = array();
session_start();
if (!array_key_exists("dxU1", $_SESSION)) {
    //
    $_SESSION["dxU1"] = "qwe123";
    //
}
$query = 'select info_id,title,info_date from info_board where state = 1';
if ($stmt = $con->prepare($query)) {
    $stmt->execute();
    $info = $stmt->fetchAll(PDO::FETCH_ASSOC);
}
$smt = new SMT('adminInfo');
$smt->render(array('title' => '公告通知', 'adminInfo' => $info));
Exemplo n.º 3
0
<?php

require_once '../private/class/SMT.php';
$smt = new SMT('test');
$smt->render(array('title' => '考试页面'));
Exemplo n.º 4
0
<?php

require_once '../private/class/autoload.inc';
$smt = new SMT('Login');
$smt->render();
Exemplo n.º 5
0
<?php

require_once '../../private/class/SMT.php';
require_once '../../private/class/DB_Connect.php';
require_once '../../private/class/util.php';
util::sessionRequire(util::student);
/*
session_start();
if(!array_key_exists("dxU1",$_SESSION))
{
    //
    $_SESSION["dxU1"] = "qwe123";
    //
}
*/
$con = new DB_Connect();
$query = 'select  student.s_name s_name,student.s_date s_date,department.dept_name s_dept,student.s_class s_class,student.s_num s_num,student.s_mail s_mail from student,department where student.state = 1 and student.dept_id = department.dept_id and student.s_user =  \'' . $_SESSION["dxU1"] . '\'';
if ($stmt = $con->prepare($query)) {
    $stmt->execute();
    $student = $stmt->fetch();
    //$stmt->close();
}
$smt = new SMT('PerInfo');
$smt->render(array('title' => '用户信息', 'student_info' => $student));