Пример #1
0
 public function ueditor()
 {
     $data = new \Org\Util\Ueditor();
     layout(false);
     C('SHOW_PAGE_TRACE', false);
     echo $data->output();
 }
 public function uploadAction()
 {
     $userId = I('session.userId');
     $configFile = APP_PATH . "Yunzhi/Conf/ueditor.json";
     $data = new \Org\Util\Ueditor($userId, $configFile);
     echo $data->output();
 }
Пример #3
0
 public function ueditor()
 {
     if (!session('?admin')) {
         $this->redirect('Main/index');
     }
     $data = new \Org\Util\Ueditor();
     echo $data->output();
 }
Пример #4
0
 public function plupload()
 {
     $data = new \Org\Util\Ueditor();
     $json = $data->output();
     $result = json_decode($json, 1);
     if ('SUCCESS' == $result['state']) {
         $output = array('ok' => 1, 'path' => $result['url']);
     } else {
         $output = array('ok' => 0, 'code' => $result['state']);
     }
     die(json_encode($output));
 }
Пример #5
0
 public function ueditor()
 {
     $data = new \Org\Util\Ueditor();
     echo $data->output();
 }
 protected function crawler($CONFIG)
 {
     set_time_limit(0);
     /* 上传配置 */
     $config = array("pathFormat" => $CONFIG['catcherPathFormat'], "maxSize" => $CONFIG['catcherMaxSize'], "allowFiles" => $CONFIG['catcherAllowFiles'], "oriName" => "remote.png");
     $fieldName = $CONFIG['catcherFieldName'];
     /* 抓取远程图片 */
     $list = array();
     if (isset($_POST[$fieldName])) {
         $source = $_POST[$fieldName];
     } else {
         $source = $_GET[$fieldName];
     }
     foreach ($source as $imgUrl) {
         $item = new \Org\Util\Ueditor($imgUrl, $config, "remote");
         $info = $item->getFileInfo();
         array_push($list, array("state" => $info["state"], "url" => $info["url"], "size" => $info["size"], "title" => htmlspecialchars($info["title"]), "original" => htmlspecialchars($info["original"]), "source" => htmlspecialchars($imgUrl)));
     }
     /* 返回抓取数据 */
     return json_encode(array('state' => count($list) ? 'SUCCESS' : 'ERROR', 'list' => $list));
 }