DirName = $DirName; $this->ColName = $ColName; $this->Value = $Value; // if (!empty($xoopsModuleConfig['uploadcare_publickey'])) { // $this->set_demopublickey($xoopsModuleConfig['uploadcare_publickey']); // } } //設定自定義設定檔 public function setCustomConfigurationsPath($path = "") { $this->CustomConfigurationsPath = $path; } //設定自定義工具列 public function setToolbarSet($ToolbarSet = "") { $this->ToolbarSet = $ToolbarSet; } //設定自定義設寬度 public function setWidth($Width = "") { $this->Width = $Width; } //設定自定義設高度 public function setHeight($Height = "") { $this->Height = $Height; } //新增樣式 public function setContentCss($ContentsCss = "") { $this->ContentsCss[] = $ContentsCss; } public function set_demopublickey($demopublickey = "") { $this->demopublickey = $demopublickey; } //產生編輯器 public function render() { global $xoTheme; $_SESSION['DirName'] = $this->DirName; // before being fed to the textarea of CKEditor $content = str_replace('&', '&', $this->Value); $content = str_replace('[', '[', $content); $other_css = ''; if ($this->ContentsCss) { $other_css = ",'" . implode("','", $this->ContentsCss) . "'"; } $editor = " {$content} "; return $editor; } } /* $DirName = "prod"; mk_dir(WEB_PATH . "/uploads/{$DirName}"); mk_dir(WEB_PATH . "/uploads/{$DirName}/image"); mk_dir(WEB_PATH . "/uploads/{$DirName}/flash"); include_once WEB_PATH . "/class/ck.php"; $fck = new CKEditor($DirName, "content", $row['content']); $fck->setHeight(350); $row['content'] = $fck->render(); */ ``` 4. /class/upload.php ``` uploaded) { // save uploaded image with no changes $foo->Process($path); if ($foo->processed) { $msg = $url . $_FILES['upload']['name']; mkhtml($fn, $msg); } else { $msg = 'error : ' . $foo->error; mkhtml($fn, "", $msg); } } function mkhtml($fn, $fileurl, $message) { $str = ''; exit($str); } ``` 5. 將 /class/elFinder/ 「$LANGCODE = str\_replace("-", "\_", \_LANGCODE); 」替換成 「$LANGCODE = "zh\_TW";」 6. 將 /class/elFinder/ 「include\_once $GLOBALS\['xoops'\]->path('/modules/system/include/functions.php');」替換成 「」 7. 將 /class/elFinder/ 「../../../mainfile.php」替換成 「../../head.php」 8. 將 /class/elFinder/ 「$xoopsUser」替換成 「$\_SESSION\['isAdmin'\]」 9. 將 /class/elFinder/ 「$\_SESSION\['xoops\_mod\_name'\]」替換成 「$\_SESSION\['DirName'\]」 10. 將 /class/elFinder/ 「XOOPS\_ROOT\_PATH」替換成 「WEB\_PATH」 11. 將 /class/elFinder/ 「XOOPS\_URL」替換成 「WEB\_URL」 12. 將 /class/elFinder/ 「/modules/tadtools」替換成 「/class」 13. sqlConfig.php ```
uploaded) { // save uploaded image with no changes $foo->Process($path); if ($foo->processed) { $msg = $url . $_FILES['upload']['name']; mkhtml($fn, $msg); } else { $msg = 'error : ' . $foo->error; mkhtml($fn, "", $msg); } } function mkhtml($fn, $fileurl, $message) { $str = ''; exit($str); } ``` 5. 將 /class/elFinder/ 「$LANGCODE = str\_replace("-", "\_", \_LANGCODE); 」替換成 「$LANGCODE = "zh\_TW";」 6. 將 /class/elFinder/ 「include\_once $GLOBALS\['xoops'\]->path('/modules/system/include/functions.php');」替換成 「」 7. 將 /class/elFinder/ 「../../../mainfile.php」替換成 「../../head.php」 8. 將 /class/elFinder/ 「$xoopsUser」替換成 「$\_SESSION\['isAdmin'\]」 9. 將 /class/elFinder/ 「$\_SESSION\['xoops\_mod\_name'\]」替換成 「$\_SESSION\['DirName'\]」 10. 將 /class/elFinder/ 「XOOPS\_ROOT\_PATH」替換成 「WEB\_PATH」 11. 將 /class/elFinder/ 「XOOPS\_URL」替換成 「WEB\_URL」 12. 將 /class/elFinder/ 「/modules/tadtools」替換成 「/class」 13. sqlConfig.php ```