############################################################################### # 寫入creative_contact.html ############################################################################### function run_system_contact($sn, $name, $kind) { global $DIRNAME, $xoopsDB; #---- 過濾讀出的變數值 ---- $myts = MyTextSanitizer::getInstance(); #---- 檢查資料夾 mk_dir(XOOPS_ROOT_PATH . "/uploads/{$DIRNAME}/tpl"); $tbl = "ugm_creative_system"; $kind = "contact"; #---- 聯絡我們 標題 $name = "system_contact_title"; $system_contact_title = $myts->htmlSpecialChars(get_modules_system_var($tbl, $kind, $name)); #---- 聯絡我們 摘要 $html = 0; $br = 1; $name = "system_contact_content"; $system_contact_content = $myts->displayTarea(get_modules_system_var($tbl, $kind, $name), $html, 1, 0, 1, $br); #---- 聯絡我們 內容 $html = 1; $br = 0; $name = "system_contact_content1"; $system_contact_content1 = $myts->displayTarea(get_modules_system_var($tbl, $kind, $name), $html, 1, 0, 1, $br); $content = "\n"; $content .= " \n"; $content .= " \n"; $content .= " \n"; $content .= " {$system_contact_title}\n"; $content .= " \n"; $content .= " {$system_contact_content}\n"; $content .= " \n"; $content .= " {$system_contact_content1}\n"; $content .= " \n"; $content .= " \n"; $content .= "\n"; $file = XOOPS_ROOT_PATH . "/uploads/ugm_creative/tpl/creative_contact.html"; $f = fopen($file, 'w'); //以寫入方式開啟文件 fwrite($f, $content); //將新的資料寫入到原始的文件中 fclose($f); } ```
{$system_contact_content}