<?php

/**
 * 启动器接口控制器
 *
 * @author EllisRan
 */

class StartUpController extends DooController {

	public $staff;

	function __construct() {

	}

	public function getKeyNum() {
		if (isset($_GET['num'])) {
			Doo::loadModel('longle');
			$longle = new longle();
			$keynum = $longle->getOne(array('select' => 'key_num', 'where' => 'SerialNumber=?', 'param' => array($_GET['num']), 'asArray' => TRUE));
			if (!empty($keynum)) {
				echo json_encode(array('error' => 0, 'msg' => '', 'info' => $keynum['key_num']));
				exit;
			} else {
				echo json_encode(array('error' => 1, 'msg' => '不存在该锁号'));
				exit;
			}
		} else {
			echo json_encode(array('error' => 1, 'msg' => '参数有误'));
			exit;
		}
	}
}

?>