<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hant-TW">
	<id>http://well-being-ng.net/wellBeingNg/index.php?action=history&amp;feed=atom&amp;title=%E9%96%8B%E5%B9%B3%E9%A3%9F%E6%9D%90%E6%8E%A1%E8%B3%BC%E7%B3%BB%E7%B5%B1%2Fetable</id>
	<title>開平食材採購系統/etable - 修訂歷史</title>
	<link rel="self" type="application/atom+xml" href="http://well-being-ng.net/wellBeingNg/index.php?action=history&amp;feed=atom&amp;title=%E9%96%8B%E5%B9%B3%E9%A3%9F%E6%9D%90%E6%8E%A1%E8%B3%BC%E7%B3%BB%E7%B5%B1%2Fetable"/>
	<link rel="alternate" type="text/html" href="http://well-being-ng.net/wellBeingNg/index.php?title=%E9%96%8B%E5%B9%B3%E9%A3%9F%E6%9D%90%E6%8E%A1%E8%B3%BC%E7%B3%BB%E7%B5%B1/etable&amp;action=history"/>
	<updated>2026-04-15T03:04:35Z</updated>
	<subtitle>本 Wiki 上此頁面的修訂歷史</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>http://well-being-ng.net/wellBeingNg/index.php?title=%E9%96%8B%E5%B9%B3%E9%A3%9F%E6%9D%90%E6%8E%A1%E8%B3%BC%E7%B3%BB%E7%B5%B1/etable&amp;diff=1123&amp;oldid=prev</id>
		<title>丁志仁：​新頁面: 分類:應用軟體 ==原汁 etable== MVC 分離 ===全伺服器共用(model)=== *constant.php *#etable class 的網址及檔案系統位置(絕對路徑) *#進入資料庫的帳...</title>
		<link rel="alternate" type="text/html" href="http://well-being-ng.net/wellBeingNg/index.php?title=%E9%96%8B%E5%B9%B3%E9%A3%9F%E6%9D%90%E6%8E%A1%E8%B3%BC%E7%B3%BB%E7%B5%B1/etable&amp;diff=1123&amp;oldid=prev"/>
		<updated>2015-03-08T04:41:10Z</updated>

		<summary type="html">&lt;p&gt;新頁面: &lt;a href=&quot;/wellBeingNg/index.php?title=%E5%88%86%E9%A1%9E:%E6%87%89%E7%94%A8%E8%BB%9F%E9%AB%94&quot; title=&quot;分類:應用軟體&quot;&gt;分類:應用軟體&lt;/a&gt; ==原汁 etable== MVC 分離 ===全伺服器共用(model)=== *constant.php *#etable class 的網址及檔案系統位置(絕對路徑) *#進入資料庫的帳...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[分類:應用軟體]]&lt;br /&gt;
==原汁 etable==&lt;br /&gt;
MVC 分離&lt;br /&gt;
===全伺服器共用(model)===&lt;br /&gt;
*constant.php&lt;br /&gt;
*#etable class 的網址及檔案系統位置(絕對路徑)&lt;br /&gt;
*#進入資料庫的帳密。&lt;br /&gt;
*#wiki 的文字過濾器。&lt;br /&gt;
*#MediaWiki 及 資料表欄位內容投射：webContent($path)&lt;br /&gt;
*etable 三層類別，工作程式必載入其中一層程式。&lt;br /&gt;
*#DB.php 連結資料庫&lt;br /&gt;
*#login.php 載入 DB.php 並提供登入登出功能。&lt;br /&gt;
*#etable.php 載入 login.php 並提供完整功能。&lt;br /&gt;
===全 CMS site共用(view)===&lt;br /&gt;
*siteConstant.php 全 site 共用常數。&lt;br /&gt;
*theme.php 載入 siteConstant.php ，定義頁頭、頁尾&lt;br /&gt;
*style.css 給 theme 用。&lt;br /&gt;
*menu.css 下拉表單的 css ，給 theme 用。&lt;br /&gt;
*index.php&lt;br /&gt;
*#載入 constant.php&lt;br /&gt;
*#載入 theme.php&lt;br /&gt;
*#載入 DB.php ，並連結資料庫&lt;br /&gt;
*#echo 頁頭、webContent($path)、頁尾&lt;br /&gt;
===工作程式(control)===&lt;br /&gt;
#載入 constant.php&lt;br /&gt;
#載入 theme.php&lt;br /&gt;
#載入 三層類別其中之一&lt;br /&gt;
#工作：&lt;br /&gt;
#*捕捉使用者按鍵，去資料庫找，然後產生業面新選單。&lt;br /&gt;
#*如為「插畢」則檢查條件：&lt;br /&gt;
#*#條件如成立 echo &amp;#039;alert(&amp;quot;警告訊息&amp;quot;);&amp;#039;;再echo &amp;quot;window.location=&amp;#039;目的地&amp;#039;;&amp;quot;;&lt;br /&gt;
#*#條件未成立，則為一般工作。&lt;br /&gt;
#*一般工作：new 類別，設屬性，輸出頁首，main()，輸出頁尾。&lt;br /&gt;
==森茂版 etable==&lt;br /&gt;
*改 constant.php&lt;br /&gt;
*#去掉 wiki 解譯&lt;br /&gt;
*#去掉 webContent (可投射wiki頁、投射資料表內容)&lt;br /&gt;
*#增加 load_template 函式&lt;br /&gt;
*#*載入並表現表頭：load_template(&amp;quot;header.php&amp;quot;)&lt;br /&gt;
*#*載入並表現表尾：load_template(&amp;quot;footer.php&amp;quot;)&lt;br /&gt;
*沒有 theme.php&lt;br /&gt;
===固定位置===&lt;br /&gt;
*/config/constant.php 根本常數檔&lt;br /&gt;
*/config/etable-lib.php&lt;br /&gt;
*#載入 config/constant.php&lt;br /&gt;
*#載入 etable.php&lt;br /&gt;
*# new $ET&lt;br /&gt;
*#指定 $ET 的登出錨點&lt;br /&gt;
*/views/template/header.php 頁首&lt;br /&gt;
*/views/template/footer.php 頁尾&lt;br /&gt;
==工作程式說明(以 food.php 為例)==&lt;br /&gt;
===基本載入===&lt;br /&gt;
# config/etable-lib.php&lt;br /&gt;
#*載入 config/constant.php&lt;br /&gt;
#*#不載入 wiki 解譯函式 wiki.php&lt;br /&gt;
#*#缺函式 webContent ：可投射wiki頁、投射資料表內容&lt;br /&gt;
#*#多函式 load_template ：可載入指定的 view&lt;br /&gt;
#*載入 etable.php&lt;br /&gt;
#* new $ET&lt;br /&gt;
#*指定 $ET 的登出錨點&lt;br /&gt;
# models/order.php&lt;br /&gt;
#*載入 models/db-lib.php&lt;br /&gt;
#*#函式 query($sql)：傳回查詢結果。&lt;br /&gt;
#*#函式 select_query($sql)：傳回查詢結果之陣列(使用 mysql_fetch_assoc )。&lt;br /&gt;
#*常用函式製備&lt;br /&gt;
# models/login.php：指定 $ET-&amp;gt;loginTable&lt;br /&gt;
# 取用 $_REQUEST[&amp;#039;workControl&amp;#039;][&amp;#039;o1id&amp;#039;]&lt;br /&gt;
===工作===&lt;br /&gt;
#若 catchText 載入 models/searchSelect.php&lt;br /&gt;
#* models/searchSelect.php ：由食材資料表找食材造 select 表單區塊，並 echo 出來。&lt;br /&gt;
#若剛完成插入一筆，則檢查請購單是否已有這筆食材，&lt;br /&gt;
#*如果有以 javascript 送出 alert&lt;br /&gt;
#*如果沒有則載入 food-list.php ( 請購單 main() 後再 load_template(&amp;quot;footer.php&amp;quot;))&lt;br /&gt;
#若非 catchText 也非剛完成插入一筆則：load_template(&amp;quot;header.php&amp;quot;) 再載入 food-list.php&lt;br /&gt;
==文件==&lt;br /&gt;
*[http://wiki.kpvs.tp.edu.tw/index.php/食材採購系統/etable 開平wiki]&lt;br /&gt;
*google 雲端硬碟/與我共用的項目&lt;br /&gt;
*#食材系統操作手冊&lt;br /&gt;
*#程式手冊&lt;br /&gt;
*#php程式說明&lt;br /&gt;
*#食材系統資料庫表格欄位說明&lt;br /&gt;
*[http://qq.kpvs.tp.edu.tw/ qq/0資訊中心123/食材系統暫存資料夾]&lt;br /&gt;
*#上段四文件&lt;br /&gt;
*#可由此查到所有的校內文件&lt;br /&gt;
&lt;br /&gt;
===其中「程式手冊」主要是寫PDF，內容摘要如下：===&lt;br /&gt;
*[http://www.tcpdf.org/doc/code/classTCPDF.html 英文文件]&lt;br /&gt;
====PDF產生流程：參考 order2pdf.php====&lt;br /&gt;
#在 models/pdf-fax.php（直印）或 models/pdf.php（橫印）產生 TCPDF 物件，並設定PDF相關資料，例如直印或橫印、紙張大小、邊界寬度、是否自動分頁、使用的字型等&lt;br /&gt;
#把要轉換成PDF的資料，例如食材清單等，都以HTML格式並加到變數 $html 中&lt;br /&gt;
#把變數 $html 透過 TCPDF 物件的方法 writeHTML() 暫存到記憶體中&lt;br /&gt;
#使用 TCPDF 物件的方法 Output 執行輸出 PDF。Output() 第一個參數是輸出的 PDF 檔名，如果如要指定儲存到伺服器的哪個資料夾中，則寫成「./資料夾名稱/PDF檔名」。第二個是輸出 PDF 的方式，I：使用瀏覽器顯示，D：下載到使用者的電腦中，F：儲存到伺服器&lt;br /&gt;
====傳真流程：參考 fax.php====&lt;br /&gt;
#中華電信網路傳真只接受上傳 PDF 檔，所以把要傳真的資料轉成PDF檔，儲存到伺服器上的資料夾 files_upload&lt;br /&gt;
#準備傳真所需的參數：廠商傳真號碼（$receiver）、上傳的PDF檔名（$msgbody）、是否立即傳真（$sendtype）、預定傳真時間($sendtime，立刻傳真，就給空值)&lt;br /&gt;
#使用 function fax_sent() 執行傳真，執行完畢會回傳「傳真代碼」(一個數字)，儲存到資料庫中，以供後續查詢是否傳真成功，因為傳真機大約1、2分鐘才會接收到傳真要求。fax_sent() 的定義在 models/fax-lib.php&lt;br /&gt;
#中華電信會自動重試三次，如果都沒有傳真成功，才會回傳失敗。&lt;br /&gt;
#執行 fax-result-all.php ，抓取資料庫中的傳真代碼，以查詢並更新傳真結果。如果傳真不成功，則會回傳失敗，否則只會是『已點選連結「傳真」』&lt;br /&gt;
#資料夾 files_upload 的 PDF 檔使用 cron 指令每天晚上刪除，避免佔用過多伺服器硬碟空間&lt;/div&gt;</summary>
		<author><name>丁志仁</name></author>
	</entry>
</feed>