예제 #1
0
파일: adArea.php 프로젝트: cranefly/crane
 public function index()
 {
     $query = RKit::getData('search_txt');
     if (!empty($query['search_txt'])) {
         $this->bindModel->where('area_name like ("%' . $query['search_txt'] . '%")');
     }
     $this->setData('search', $query['search_txt']);
     $this->lists($query);
 }
예제 #2
0
파일: upload.php 프로젝트: cranefly/crane
 public function doUpload()
 {
     $params = $this->getData('params');
     $upload = array('Field' => 'file');
     $file = $_FILES['file'];
     $fileUrl = RKit::doAttachment("upload", $upload);
     $resource = array('size' => $file["size"], 'oname' => $file["name"], 'resource_url' => $fileUrl);
     if ($fileUrl !== FALSE) {
         $this->_addResource($resource);
     }
     $params = '{\\"params\\":' . $params . ',\\"files\\":"' . $fileUrl . '"}';
     echo '<script>window.parent.callback_upload(\'' . $params . '\');</script>';
     exit;
 }
예제 #3
0
파일: mbase.php 프로젝트: cranefly/crane
 /**
  * 输出ajax信息
  * @param int $statusCode
  * @param string $msg
  * @param array $data
  */
 protected function echoAjax($statusCode, $msg, $data = array())
 {
     $response = array('status' => (int) $statusCode, 'msg' => $msg);
     RKit::printJson(array_merge($response, $data));
 }
예제 #4
0
 /**
  * 记录日志
  * @param string $msg
  */
 protected function log($msg)
 {
     RKit::appendFileLog($this->rauth->getUserInfo('employmentId'), $this->rauth->getUserInfo('loginName'), $this->activeModule, $msg);
 }
예제 #5
0
 public function saveBefore($isInsert)
 {
     if ($isInsert) {
         $this->upass = isset($this->upass) && !empty(trim($this->upass)) ? RKit::makePwd($this->uname . $this->upass) : RKit::makePwd($this->uname . DEFAULTPWD);
         $this->reg_date = time();
         $this->reg_ip = $this->input->ip_address();
     }
 }