Title1

Title2

Title3

10-3 run_system_contact()

###############################################################################
#  寫入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 = "<section id='contact'>\n";
	$content .= "	<div class='container'>\n";
	$content .= "		<div class='row'>\n";
	$content .= "			<div class='col-lg-8 col-lg-offset-2 text-center'>\n";
	$content .= "				<h2 class='section-heading'>{$system_contact_title}</h2>\n";
	$content .= "				<hr class='primary'>\n";
	$content .= "				<p>{$system_contact_content}</p>\n";
	$content .= "			</div>\n";
	$content .= "			{$system_contact_content1}\n";
	$content .= "		</div>\n";
	$content .= "	</div>\n";
	$content .= "</section>\n";

	$file = XOOPS_ROOT_PATH . "/uploads/ugm_creative/tpl/creative_contact.html";
	$f = fopen($file, 'w'); //以寫入方式開啟文件
	fwrite($f, $content); //將新的資料寫入到原始的文件中
	fclose($f);
}