Title1

Title2

Title3

MarkDown

"; } elseif ($row['formtype'] == "fck") { $row['form'] = ""; } elseif ($row['formtype'] == "yesno") { $value_1 = $row['value'] ? " checked" : ""; $value_0 = $row['value'] ? "" : " checked"; $row['form'] = "\n   \n \n "; } #把變數送至樣板 $smarty->assign("row", $row); } ######################################## #取得單筆記錄 ######################################## function get_creative_system($sn = "") { global $mysqli; if (!$sn) { redirect_header("index.php", 3000, "查詢系統變數資料錯誤!!"); } $sql = "select * from `creative_system` where `sn`='{$sn}'"; $result = $mysqli->query($sql) or die(printf("Error: %s
" . $sql, $mysqli->sqlstate)); $row = $result->fetch_assoc(); #過濾撈出資料 $row['sn'] = intval($row['sn']); //http://www.w3school.com.cn/php/func_string_htmlspecialchars.asp $row['name'] = htmlspecialchars($row['name'], ENT_QUOTES); // 轉換雙引號和單引號 $row['kind'] = htmlspecialchars($row['kind'], ENT_QUOTES); // 轉換雙引號和單引號 $row['title'] = htmlspecialchars($row['title'], ENT_QUOTES); // 轉換雙引號和單引號 $row['value'] = htmlspecialchars($row['value'], ENT_QUOTES); // 轉換雙引號和單引號 $row['description'] = htmlspecialchars($row['description'], ENT_QUOTES); // 轉換雙引號和單引號 $row['formtype'] = htmlspecialchars($row['formtype'], ENT_QUOTES); // 轉換雙引號和單引號 $row['valuetype'] = htmlspecialchars($row['valuetype'], ENT_QUOTES); // 轉換雙引號和單引號 $row['enable'] = intval($row['enable']); $row['sort'] = intval($row['sort']); return $row; } ```