コード例 #1
0
 public function editBreakingNews()
 {
     if (!isset($_SESSION['userId'])) {
         $this->error(C('LOGIN_FIRST'));
     }
     $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
     $this->assign('USER_ID', $_SESSION['userId']);
     $this->assign('CURRENT_MENU', 'BREAKINGNEWS');
     $breakingNews = M('breakingnews');
     $editBreakingNews = $breakingNews->where('breakingNewsId=' . $_GET['breakingnewsid'])->find();
     // doLog($_SESSION ['userId'],3,'edit_allActivityPractice_Id_:_' . $_GET ['activitypracticeid']);
     // dump($editActivityPractice);
     // return;
     $editor = new \FCKeditor\FCKeditor('editor');
     // 从contenturl中读取信息
     $fileName = $editBreakingNews['breakingnewscontenturl'];
     $myFile = fopen($fileName, "r") or die("Unable to open file!");
     $content = fread($myFile, filesize($fileName));
     fclose($myFile);
     $editor->Value = $content;
     // 设置默认值
     $editorHtml = $editor->Createhtml();
     // 创建。注意:若用到模板(如smarty)则$fck = $oFCKeditor->CreateHtml();然后把$fck抛给模板
     $this->assign("editorHtml", $editorHtml);
     $this->assign('breakingNews', $editBreakingNews);
     $this->display();
 }
コード例 #2
0
 public function editBranchApperance()
 {
     if (!isset($_SESSION['userId'])) {
         $this->error(C('LOGIN_FIRST'));
     }
     doLog($_SESSION['userId'], 35, 'Edit_BranchApperance_Id_:_' . $_GET['branchapperanceid']);
     // 		dump($_GET ['branchapperanceid']);
     // 		return;
     $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
     $this->assign('USER_ID', $_SESSION['userId']);
     $this->assign('USER_LEVEL', $_SESSION['userLevel']);
     $this->assign('CURRENT_MENU', 'BRANCHAPPERANCE');
     $branchapperance = M('branchapperance');
     $editBranchApperance = $branchapperance->where('branchApperanceId=' . $_GET['branchapperanceid'])->find();
     // 		dump($editBranchApperance);
     // 		return;
     $editor = new \FCKeditor\FCKeditor('editor');
     // 从contenturl中读取信息
     $fileName = $editBranchApperance['branchapperancecontenturl'];
     $myFile = fopen($fileName, "r") or die("Unable to open file!");
     $content = fread($myFile, filesize($fileName));
     fclose($myFile);
     $editor->Value = $content;
     // 设置默认值
     $editorHtml = $editor->Createhtml();
     // 创建。注意:若用到模板(如smarty)则$fck = $oFCKeditor->CreateHtml();然后把$fck抛给模板
     $user = M('user');
     $listUser = $user->select();
     $academy = M('academy');
     $listAcademy = $academy->select();
     $branch = M('branch');
     $listBranch = $branch->select();
     $this->assign('listUser', $listUser);
     // 赋值数据集
     $this->assign('listAcademy', $listAcademy);
     // 赋值数据集
     $this->assign('listBranch', $listBranch);
     // 赋值数据集
     $this->assign("editorHtml", $editorHtml);
     $this->assign('branchApperance', $editBranchApperance);
     $this->display();
 }
コード例 #3
0
 public function editWorkTendency()
 {
     if (!isset($_SESSION['userId'])) {
         $this->error(C('LOGIN_FIRST'));
     }
     $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
     $this->assign('USER_ID', $_SESSION['userId']);
     $this->assign('USER_LEVEL', $_SESSION['userLevel']);
     $this->assign('CURRENT_MENU', 'WORKTENDENCY');
     $workTendency = M('worktendency');
     $editWorkTendency = $workTendency->where('workTendencyId=' . $_GET['worktendencyid'])->find();
     // dump($editWorkTendency);
     // echo $editWorkTendency['worktendencyreleasedate'];
     $editor = new \FCKeditor\FCKeditor('editor');
     // 从contenturl中读取信息
     $fileName = $editWorkTendency['worktendencycontenturl'];
     $myFile = fopen($fileName, "r") or die("Unable to open file!");
     $content = fread($myFile, filesize($fileName));
     fclose($myFile);
     $editor->Value = $content;
     // 设置默认值
     $editorHtml = $editor->Createhtml();
     // 创建。注意:若用到模板(如smarty)则$fck = $oFCKeditor->CreateHtml();然后把$fck抛给模板
     $this->assign("editorHtml", $editorHtml);
     $this->assign('workTendency', $editWorkTendency);
     $this->display();
 }
コード例 #4
0
 public function editNotice()
 {
     if (!isset($_SESSION['userId'])) {
         $this->error(C('LOGIN_FIRST'));
     }
     doLog($_SESSION['userId'], 13, 'Edit_notice_Id_:_' . $_GET['noticeid']);
     $this->assign('APPLICATION_NAME', C('APPLICATION_NAME'));
     $this->assign('USER_ID', $_SESSION['userId']);
     $this->assign('USER_LEVEL', $_SESSION['userLevel']);
     $this->assign('CURRENT_MENU', 'NOTICE');
     $notice = M('notice');
     $editNotice = $notice->where('noticeId=' . $_GET['noticeid'])->find();
     // 		dump($editNotice);
     // 		return;
     $editor = new \FCKeditor\FCKeditor('editor');
     // 从contenturl中读取信息
     $fileName = $editNotice['noticecontenturl'];
     $myFile = fopen($fileName, "r") or die("Unable to open file!");
     $content = fread($myFile, filesize($fileName));
     fclose($myFile);
     $editor->Value = $content;
     // 设置默认值
     $editorHtml = $editor->Createhtml();
     // 创建。注意:若用到模板(如smarty)则$fck = $oFCKeditor->CreateHtml();然后把$fck抛给模板
     $this->assign("editorHtml", $editorHtml);
     $this->assign('notice', $editNotice);
     $this->display();
 }