Ejemplo n.º 1
0
                        </ul>

                    </div>

                </div>

                <div class="divInfoContext">

                    <div style="font: 2px; line-height: 2px;">

                        &nbsp;</div>

                    <div id="score_tab">
                        <table class="Ntable" cellspacing="1" cellpadding="0" align="Center" border="0" id="gvInfo" style="border-style:None;width:100%;">
	                   <?php 
school_list($type);
?>
                    
                    </table>
                </div>

            </div>
            <div class="divSave">
                            <input type="button" id="btnSubmit" value="增加" class="SkyButtonFocus" onclick="add_obj()" />
                             <input type="submit" id="btnSubmit" value="确认" class="SkyButtonFocus" onclick="" />
                             <input type="button" id="btnSubmit" value="jiancha" class="SkyButtonFocus" onclick="checkfull()" />
            </div>  
    </form>

        
Ejemplo n.º 2
0
// init app
require_once 'init.php';
require_once 'function.php';
// retrieve request parameters
$model = empty($_GET['model']) ? null : strtolower($_GET['model']);
$action = empty($_GET['action']) ? null : strtolower($_GET['action']);
$id = empty($_GET['id']) ? null : $_GET['id'];
header('Content Type: application/json');
switch ($model) {
    case 'schools':
        switch ($action) {
            case 'list':
                // set up response array
                $response = array();
                // get data
                $data = school_list($dbh);
                if ($data === false) {
                    // no data, request failed
                    $response['status'] = 0;
                    $response['statusmessage'] = 'There was a query error';
                } else {
                    $response['status'] = 1;
                    $response['statusmessage'] = 'Ok';
                    $response['data'] = $data;
                }
                // JSONify the response
                echo json_encode($response);
                break;
            default:
                // return error issue
                echo '{"status":0,"statusmessage":"Invalid action"}';
Ejemplo n.º 3
0
if ($_REQUEST['act'] == 'list') {
    /* 检查权限 */
    admin_priv('school_manage');
    $smarty->assign('ur_here', $_LANG['03_school_list']);
    $smarty->assign('action_link', array('text' => $_LANG['04_school_add'], 'href' => 'school.php?act=add'));
    $school_list = school_list();
    $smarty->assign('school_list', $school_list['school_list']);
    $smarty->assign('filter', $school_list['filter']);
    $smarty->assign('record_count', $school_list['record_count']);
    $smarty->assign('page_count', $school_list['page_count']);
    $smarty->assign('full_page', 1);
    $smarty->assign('sort_school_id', '<img src="images/sort_desc.gif">');
    assign_query_info();
    $smarty->display('school_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
    $school_list = school_list();
    $smarty->assign('school_list', $school_list['school_list']);
    $smarty->assign('filter', $school_list['filter']);
    $smarty->assign('record_count', $school_list['record_count']);
    $smarty->assign('page_count', $school_list['page_count']);
    $sort_flag = sort_flag($school_list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    make_json_result($smarty->fetch('school_list.htm'), '', array('filter' => $school_list['filter'], 'page_count' => $school_list['page_count']));
} elseif ($_REQUEST['act'] == 'add') {
    /* 检查权限 */
    admin_priv('school_manage');
    $school = array();
    $smarty->assign('ur_here', $_LANG['04_school_add']);
    $smarty->assign('action_link', array('text' => $_LANG['03_school_list'], 'href' => 'school.php?act=list'));
    $smarty->assign('form_action', 'insert');
    $smarty->assign('school', $school);