| 8 |
liveuser |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/*
|
|
|
4 |
|
|
|
5 |
QBPWCF, Quick Build PHP website Component base on Fedora Linux.
|
|
|
6 |
Copyright (C) 2015~2024 Min-Jhin,Chen
|
|
|
7 |
|
|
|
8 |
This file is part of QBPWCF.
|
|
|
9 |
|
|
|
10 |
QBPWCF is free software: you can redistribute it and/or modify
|
|
|
11 |
it under the terms of the GNU General Public License as published by
|
|
|
12 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
13 |
(at your option) any later version.
|
|
|
14 |
|
|
|
15 |
QBPWCF is distributed in the hope that it will be useful,
|
|
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
18 |
GNU General Public License for more details.
|
|
|
19 |
|
|
|
20 |
You should have received a copy of the GNU General Public License
|
|
|
21 |
along with QBPWCF. If not, see <http://www.gnu.org/licenses/>.
|
|
|
22 |
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
#使用 qbpwcf 命名空間
|
|
|
26 |
namespace qbpwcf;
|
|
|
27 |
|
|
|
28 |
#初始化輸出
|
|
|
29 |
$output=array();
|
|
|
30 |
|
|
|
31 |
#取得 lib path
|
| 98 |
liveuser |
32 |
exec("php -f ".escapeshellarg(pathinfo(__FILE__)["dirname"]."/../../../../usr/bin/libexec/folderOfUsrLib.php"),$output,$status);
|
| 8 |
liveuser |
33 |
|
|
|
34 |
#如果執行失敗
|
|
|
35 |
if($status!==0){
|
|
|
36 |
|
|
|
37 |
#debug
|
|
|
38 |
var_dump(__LINE__,$output);
|
|
|
39 |
|
|
|
40 |
#結束執行,回傳shell 1.
|
|
|
41 |
exit(1);
|
|
|
42 |
|
|
|
43 |
}#if end
|
|
|
44 |
|
|
|
45 |
#儲存lib path
|
|
|
46 |
$folderOfUsrLib=$output[0];
|
|
|
47 |
|
|
|
48 |
#初始化輸出
|
|
|
49 |
$output=array();
|
|
|
50 |
|
|
|
51 |
#以該檔案的實際位置的 lib path 為 include path 首位
|
| 98 |
liveuser |
52 |
exec("cd ".pathinfo(__FILE__)["dirname"]."/../../../../usr/".$folderOfUsrLib."/qbpwcf;pwd;",$output,$status);
|
| 8 |
liveuser |
53 |
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
|
|
|
54 |
|
|
|
55 |
#匯入套件
|
|
|
56 |
require_once("allInOne.php");
|
|
|
57 |
|
|
|
58 |
#qbpwcf用的javascript
|
|
|
59 |
$qbpwcfJavaScript=javaScript::qbpwcfJavaScript();
|
|
|
60 |
|
|
|
61 |
#如果建立 qbpwcf 用的 js 語法失敗
|
|
|
62 |
if($qbpwcfJavaScript["status"]==="false"){
|
|
|
63 |
|
|
|
64 |
#debug
|
|
|
65 |
var_dump($qbpwcfJavaScript);
|
|
|
66 |
exit;
|
|
|
67 |
|
|
|
68 |
}#if end
|
|
|
69 |
|
|
|
70 |
#印出js語法
|
|
|
71 |
echo $qbpwcfJavaScript["content"];
|
|
|
72 |
|
|
|
73 |
#建議的log位置
|
|
|
74 |
$logFile=$_SERVER["DOCUMENT_ROOT"].$_SERVER["PHP_SELF"].".log";
|
|
|
75 |
|
|
|
76 |
#函式說明:
|
|
|
77 |
#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
|
|
|
78 |
#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
|
|
|
79 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
80 |
#$result["error"],陣列,錯訊訊息.
|
|
|
81 |
#$result["content"],字串,含有<div>標籤的內容.
|
|
|
82 |
#必填參數:
|
|
|
83 |
#$conf["contentArray"],字串陣列,要放入的內容陣列.
|
|
|
84 |
$conf["contentArray"]=array();
|
|
|
85 |
#可省略參數
|
|
|
86 |
#$conf["id"],字串,div區塊的id.
|
|
|
87 |
$conf["id"]="slide";
|
|
|
88 |
#$conf["styleAttr"],字串陣列,給div區段要套用的style樣式屬性.
|
|
|
89 |
$conf["styleAttr"]=array("min-width","max-width","min-height","max-height");
|
|
|
90 |
#$conf["styleVal"],字串陣列,給div區段要套用的style樣式數值.
|
|
|
91 |
$conf["styleVal"]=array("100vw","100vw","100vh","100vh");
|
|
|
92 |
#$conf["class"],字串,div區段要套用的css樣式.
|
|
|
93 |
#$conf["class"]="";
|
|
|
94 |
#$conf["title"],陣列,滑鼠移到上面時要顯示的內容,每個元素代表一列內容.
|
|
|
95 |
#$conf["title"]=array();
|
|
|
96 |
#$conf["oneScreenSize"],字串,div區塊是否要占一個螢幕的大小,預設為"false"不設定,"true"為設定成一個螢幕的大小.
|
|
|
97 |
#$conf["oneScreenSize"]="false";
|
|
|
98 |
#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
|
|
|
99 |
#$conf["textAlignCenter"]="";
|
|
|
100 |
#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
|
|
|
101 |
#$conf["data"]=array();
|
|
|
102 |
#參考資料:
|
|
|
103 |
#無.
|
|
|
104 |
#備註:
|
|
|
105 |
#無.
|
|
|
106 |
$divSection=css::divSection($conf);
|
|
|
107 |
unset($conf);
|
|
|
108 |
|
|
|
109 |
#如果建立 div 失敗
|
|
|
110 |
if($divSection["status"]==="false")
|
|
|
111 |
{
|
|
|
112 |
|
|
|
113 |
#函式說明:
|
|
|
114 |
#撰寫log
|
|
|
115 |
#回傳結果:
|
|
|
116 |
#$result["status"],狀態,"true"或"false".
|
|
|
117 |
#$result["error"],錯誤訊息陣列.
|
|
|
118 |
#$result["function"],當前函式的名稱.
|
|
|
119 |
#$result["argu"],使用的參數.
|
|
|
120 |
#必填參數:
|
|
|
121 |
#$conf["path"],字串,log檔案的路徑與名稱.
|
|
|
122 |
$conf["path"]=$logFile;
|
|
|
123 |
#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
|
|
|
124 |
$conf["content"]=$divSection;
|
|
|
125 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
126 |
$conf["fileArgu"]=__FILE__;
|
|
|
127 |
#可省略參數:
|
|
|
128 |
#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
|
|
|
129 |
#$conf["rewrite"]="false";
|
|
|
130 |
#參考資料:
|
|
|
131 |
#無.
|
|
|
132 |
#備註:
|
|
|
133 |
#無.
|
|
|
134 |
$record=logs::record($conf);
|
|
|
135 |
unset($conf);
|
|
|
136 |
|
|
|
137 |
#結束執行
|
|
|
138 |
exit;
|
|
|
139 |
|
|
|
140 |
}#if end
|
|
|
141 |
|
|
|
142 |
#印出放置投影片的 div
|
|
|
143 |
echo $divSection["content"];
|
|
|
144 |
|
|
|
145 |
#函式說明:
|
|
|
146 |
#顯示一行文字,太長會自動省略.
|
|
|
147 |
#回傳的結果:
|
|
|
148 |
#$result["status"],執行是否正常,"true"為正常,"false"為不正常.
|
|
|
149 |
#$result["error"],錯誤訊息陣列.
|
|
|
150 |
#$result["function"],當前執行的函數名稱.
|
|
|
151 |
#$result["content"],語法.
|
|
|
152 |
#必填參數:
|
|
|
153 |
#$conf["string"],字串
|
|
|
154 |
$conf["string"]="Hello World!";
|
|
|
155 |
#可省略參數:
|
|
|
156 |
#$conf["class"],字串,要使用的css樣式名稱,預設為"__defaultTextStyle".
|
|
|
157 |
#$conf["class"]="";
|
|
|
158 |
#參考資料:
|
|
|
159 |
#無.
|
|
|
160 |
#備註:
|
|
|
161 |
#無.
|
|
|
162 |
$oneLine=text::oneLine($conf);
|
|
|
163 |
unset($conf);
|
|
|
164 |
|
|
|
165 |
#如果執行失敗
|
|
|
166 |
if($oneLine["status"]==="false")
|
|
|
167 |
{
|
|
|
168 |
#函式說明:
|
|
|
169 |
#撰寫log
|
|
|
170 |
#回傳結果:
|
|
|
171 |
#$result["status"],狀態,"true"或"false".
|
|
|
172 |
#$result["error"],錯誤訊息陣列.
|
|
|
173 |
#$result["function"],當前函式的名稱.
|
|
|
174 |
#$result["argu"],使用的參數.
|
|
|
175 |
#必填參數:
|
|
|
176 |
#$conf["path"],字串,log檔案的路徑與名稱.
|
|
|
177 |
$conf["path"]=$logFile;
|
|
|
178 |
#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
|
|
|
179 |
$conf["content"]=$oneLine;
|
|
|
180 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
181 |
$conf["fileArgu"]=__FILE__;
|
|
|
182 |
#可省略參數:
|
|
|
183 |
#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
|
|
|
184 |
#$conf["rewrite"]="false";
|
|
|
185 |
#參考資料:
|
|
|
186 |
#無.
|
|
|
187 |
#備註:
|
|
|
188 |
#無.
|
|
|
189 |
$record=logs::record($conf);
|
|
|
190 |
unset($conf);
|
|
|
191 |
|
|
|
192 |
#結束執行
|
|
|
193 |
exit;
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
#放置文字的語法
|
|
|
197 |
#$oneLine["content"];
|
|
|
198 |
|
|
|
199 |
#函式說明:
|
|
|
200 |
#放置可以套用css樣式的圖片
|
|
|
201 |
#回傳結果:
|
|
|
202 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
203 |
#$result["error"],錯誤訊息陣列
|
|
|
204 |
#$result["function"],當前函數執行的名稱
|
|
|
205 |
#$result["content"],印出圖片的語法。
|
|
|
206 |
#必填參數:
|
|
|
207 |
$conf["position"]="assets of img/celine-ruiz-rr4bawLxOjc-unsplash.jpg";#圖片位置
|
|
|
208 |
#可省略參數:
|
|
|
209 |
#$conf["id"]="";#圖片的id,沒有就不設定.
|
|
|
210 |
#$conf["alt"]="";#若沒有圖片要用什麼文字顯示。
|
|
|
211 |
#$conf["class"]="";#要套用的css樣式類別名稱。
|
|
|
212 |
#參考資料:
|
|
|
213 |
#無.
|
|
|
214 |
#備註:
|
|
|
215 |
#無.
|
|
|
216 |
$show=img::show($conf);
|
|
|
217 |
unset($conf);
|
|
|
218 |
|
|
|
219 |
#如果執行失敗
|
|
|
220 |
if($show["status"]==="false")
|
|
|
221 |
{
|
|
|
222 |
#函式說明:
|
|
|
223 |
#撰寫log
|
|
|
224 |
#回傳結果:
|
|
|
225 |
#$result["status"],狀態,"true"或"false".
|
|
|
226 |
#$result["error"],錯誤訊息陣列.
|
|
|
227 |
#$result["function"],當前函式的名稱.
|
|
|
228 |
#$result["argu"],使用的參數.
|
|
|
229 |
#必填參數:
|
|
|
230 |
#$conf["path"],字串,log檔案的路徑與名稱.
|
|
|
231 |
$conf["path"]=$logFile;
|
|
|
232 |
#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
|
|
|
233 |
$conf["content"]=$show;
|
|
|
234 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
235 |
$conf["fileArgu"]=__FILE__;
|
|
|
236 |
#可省略參數:
|
|
|
237 |
#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
|
|
|
238 |
#$conf["rewrite"]="false";
|
|
|
239 |
#參考資料:
|
|
|
240 |
#無.
|
|
|
241 |
#備註:
|
|
|
242 |
#無.
|
|
|
243 |
$record=logs::record($conf);
|
|
|
244 |
unset($conf);
|
|
|
245 |
|
|
|
246 |
#結束執行
|
|
|
247 |
exit;
|
|
|
248 |
}
|
|
|
249 |
|
|
|
250 |
#放置圖片的語法
|
|
|
251 |
#$show["content"];
|
|
|
252 |
|
|
|
253 |
#函式說明:
|
|
|
254 |
#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
|
|
|
255 |
#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
|
|
|
256 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
257 |
#$result["error"],陣列,錯訊訊息.
|
|
|
258 |
#$result["content"],字串,含有<div>標籤的內容.
|
|
|
259 |
#必填參數:
|
|
|
260 |
#$conf["contentArray"],字串陣列,要放入的內容陣列.
|
|
|
261 |
$conf["contentArray"]=array($show["content"]);
|
|
|
262 |
#可省略參數
|
|
|
263 |
#$conf["id"],字串,div區塊的id.
|
|
|
264 |
#$conf["id"]="";
|
|
|
265 |
#$conf["styleAttr"],字串陣列,給div區段要套用的style樣式屬性.
|
|
|
266 |
#$conf["styleAttr"]=array();
|
|
|
267 |
#$conf["styleVal"],字串陣列,給div區段要套用的style樣式數值.
|
|
|
268 |
#$conf["styleVal"]=array();
|
|
|
269 |
#$conf["class"],字串,div區段要套用的css樣式.
|
|
|
270 |
#$conf["class"]="";
|
|
|
271 |
#$conf["title"],陣列,滑鼠移到上面時要顯示的內容,每個元素代表一列內容.
|
|
|
272 |
#$conf["title"]=array();
|
|
|
273 |
#$conf["oneScreenSize"],字串,div區塊是否要占一個螢幕的大小,預設為"false"不設定,"true"為設定成一個螢幕的大小.
|
|
|
274 |
#$conf["oneScreenSize"]="false";
|
|
|
275 |
#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
|
|
|
276 |
#$conf["textAlignCenter"]="";
|
|
|
277 |
#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
|
|
|
278 |
#$conf["data"]=array();
|
|
|
279 |
#參考資料:
|
|
|
280 |
#無.
|
|
|
281 |
#備註:
|
|
|
282 |
#無.
|
|
|
283 |
$divSection=css::divSection($conf);
|
|
|
284 |
unset($conf);
|
|
|
285 |
|
|
|
286 |
#如果建立 div 失敗
|
|
|
287 |
if($divSection["status"]==="false")
|
|
|
288 |
{
|
|
|
289 |
|
|
|
290 |
#函式說明:
|
|
|
291 |
#撰寫log
|
|
|
292 |
#回傳結果:
|
|
|
293 |
#$result["status"],狀態,"true"或"false".
|
|
|
294 |
#$result["error"],錯誤訊息陣列.
|
|
|
295 |
#$result["function"],當前函式的名稱.
|
|
|
296 |
#$result["argu"],使用的參數.
|
|
|
297 |
#必填參數:
|
|
|
298 |
#$conf["path"],字串,log檔案的路徑與名稱.
|
|
|
299 |
$conf["path"]=$logFile;
|
|
|
300 |
#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
|
|
|
301 |
$conf["content"]=$divSection;
|
|
|
302 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
303 |
$conf["fileArgu"]=__FILE__;
|
|
|
304 |
#可省略參數:
|
|
|
305 |
#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
|
|
|
306 |
#$conf["rewrite"]="false";
|
|
|
307 |
#參考資料:
|
|
|
308 |
#無.
|
|
|
309 |
#備註:
|
|
|
310 |
#無.
|
|
|
311 |
$record=logs::record($conf);
|
|
|
312 |
unset($conf);
|
|
|
313 |
|
|
|
314 |
#結束執行
|
|
|
315 |
exit;
|
|
|
316 |
|
|
|
317 |
}#if end
|
|
|
318 |
|
|
|
319 |
#另存放置圖片的語法
|
|
|
320 |
$img=$divSection["content"];
|
|
|
321 |
|
|
|
322 |
#函式說明:
|
|
|
323 |
#放置html5支援的webm格式影片(webm),結果會回傳語法.
|
|
|
324 |
#回傳結果:
|
|
|
325 |
#$result["status"],執行正常與否,"true"代表正常;"false"代表不正常.
|
|
|
326 |
#$result["error"],錯誤訊息陣列.
|
|
|
327 |
#$result["function"],當前函數名稱.
|
|
|
328 |
#$result["content"],放置html5支援的webm格式影片語法.
|
|
|
329 |
#$result["base64data"],用base64加密影片後放置html5支援的webm格式影片語法.
|
|
|
330 |
#必填參數:
|
|
|
331 |
#$conf["videoFilePosition"],字串,爲影片的路徑,需要有附檔名.
|
|
|
332 |
$conf["videoFilePosition"]="assets of video/big-buck-bunny_trailer.webm";
|
|
|
333 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑.
|
|
|
334 |
$conf["fileArgu"]=__FILE__;
|
|
|
335 |
#可省略參數:
|
|
|
336 |
#$conf["width"],字串,爲影片的寬度,預設不設置.
|
|
|
337 |
#$conf["width"]="";
|
|
|
338 |
#$conf["height"],字串,爲影片的高度,預設不設置.
|
|
|
339 |
#$conf["height"]="";
|
|
|
340 |
#$conf["codecs"],字串,爲解碼器名稱,預設爲 "vp8, vorbis"
|
|
|
341 |
#$conf["codecs"]="vp8, vorbis"
|
|
|
342 |
#$conf["autoplay"],字串,為是否要自動播放,"true"代表要,"false"代表不要,預設為"false".
|
|
|
343 |
$conf["autoplay"]="true";
|
|
|
344 |
#$conf["loop"],字串,爲是否重複播放,若要重複播放則應填入 "true" ,預設爲不重複
|
|
|
345 |
#$conf["loop"]="false";
|
|
|
346 |
#$conf["controlls"],字串,是否要顯示控制面板,預設為"false"不顯示;反之為"true"要顯示.
|
|
|
347 |
#$conf["controlls"]="true";
|
|
|
348 |
#$conf["muted"],字串,是否要靜音,"true"代表要;預設為"false",不靜音.
|
|
|
349 |
$conf["muted"]="true";
|
|
|
350 |
#$conf["class"],字串,要套用的css類別樣式名稱.
|
|
|
351 |
#$conf["class"]="";
|
|
|
352 |
#參考資料:
|
|
|
353 |
#無.
|
|
|
354 |
#備註:
|
|
|
355 |
#建議增加影片載入完畢就自動播放的js.
|
|
|
356 |
$html5=video::html5($conf);
|
|
|
357 |
unset($conf);
|
|
|
358 |
|
|
|
359 |
#如果執行失敗
|
|
|
360 |
if($html5["status"]==="false")
|
|
|
361 |
{
|
|
|
362 |
#函式說明:
|
|
|
363 |
#撰寫log
|
|
|
364 |
#回傳結果:
|
|
|
365 |
#$result["status"],狀態,"true"或"false".
|
|
|
366 |
#$result["error"],錯誤訊息陣列.
|
|
|
367 |
#$result["function"],當前函式的名稱.
|
|
|
368 |
#$result["argu"],使用的參數.
|
|
|
369 |
#必填參數:
|
|
|
370 |
#$conf["path"],字串,log檔案的路徑與名稱.
|
|
|
371 |
$conf["path"]=$logFile;
|
|
|
372 |
#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
|
|
|
373 |
$conf["content"]=$html5;
|
|
|
374 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
375 |
$conf["fileArgu"]=__FILE__;
|
|
|
376 |
#可省略參數:
|
|
|
377 |
#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
|
|
|
378 |
#$conf["rewrite"]="false";
|
|
|
379 |
#參考資料:
|
|
|
380 |
#無.
|
|
|
381 |
#備註:
|
|
|
382 |
#無.
|
|
|
383 |
$record=logs::record($conf);
|
|
|
384 |
unset($conf);
|
|
|
385 |
|
|
|
386 |
#結束執行
|
|
|
387 |
exit;
|
|
|
388 |
}
|
|
|
389 |
|
|
|
390 |
#放置影片的語法
|
|
|
391 |
#$html5["content"];
|
|
|
392 |
|
|
|
393 |
#函式說明:
|
|
|
394 |
#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
|
|
|
395 |
#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
|
|
|
396 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
397 |
#$result["error"],陣列,錯訊訊息.
|
|
|
398 |
#$result["content"],字串,含有<div>標籤的內容.
|
|
|
399 |
#必填參數:
|
|
|
400 |
#$conf["contentArray"],字串陣列,要放入的內容陣列.
|
|
|
401 |
$conf["contentArray"]=array($html5["content"]);
|
|
|
402 |
#可省略參數
|
|
|
403 |
#$conf["id"],字串,div區塊的id.
|
|
|
404 |
#$conf["id"]="";
|
|
|
405 |
#$conf["styleAttr"],字串陣列,給div區段要套用的style樣式屬性.
|
|
|
406 |
#$conf["styleAttr"]=array();
|
|
|
407 |
#$conf["styleVal"],字串陣列,給div區段要套用的style樣式數值.
|
|
|
408 |
#$conf["styleVal"]=array();
|
|
|
409 |
#$conf["class"],字串,div區段要套用的css樣式.
|
|
|
410 |
#$conf["class"]="";
|
|
|
411 |
#$conf["title"],陣列,滑鼠移到上面時要顯示的內容,每個元素代表一列內容.
|
|
|
412 |
#$conf["title"]=array();
|
|
|
413 |
#$conf["oneScreenSize"],字串,div區塊是否要占一個螢幕的大小,預設為"false"不設定,"true"為設定成一個螢幕的大小.
|
|
|
414 |
#$conf["oneScreenSize"]="false";
|
|
|
415 |
#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
|
|
|
416 |
#$conf["textAlignCenter"]="";
|
|
|
417 |
#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
|
|
|
418 |
#$conf["data"]=array();
|
|
|
419 |
#參考資料:
|
|
|
420 |
#無.
|
|
|
421 |
#備註:
|
|
|
422 |
#無.
|
|
|
423 |
$divSection=css::divSection($conf);
|
|
|
424 |
unset($conf);
|
|
|
425 |
|
|
|
426 |
#如果建立 div 失敗
|
|
|
427 |
if($divSection["status"]==="false")
|
|
|
428 |
{
|
|
|
429 |
|
|
|
430 |
#函式說明:
|
|
|
431 |
#撰寫log
|
|
|
432 |
#回傳結果:
|
|
|
433 |
#$result["status"],狀態,"true"或"false".
|
|
|
434 |
#$result["error"],錯誤訊息陣列.
|
|
|
435 |
#$result["function"],當前函式的名稱.
|
|
|
436 |
#$result["argu"],使用的參數.
|
|
|
437 |
#必填參數:
|
|
|
438 |
#$conf["path"],字串,log檔案的路徑與名稱.
|
|
|
439 |
$conf["path"]=$logFile;
|
|
|
440 |
#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
|
|
|
441 |
$conf["content"]=$divSection;
|
|
|
442 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
443 |
$conf["fileArgu"]=__FILE__;
|
|
|
444 |
#可省略參數:
|
|
|
445 |
#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
|
|
|
446 |
#$conf["rewrite"]="false";
|
|
|
447 |
#參考資料:
|
|
|
448 |
#無.
|
|
|
449 |
#備註:
|
|
|
450 |
#無.
|
|
|
451 |
$record=logs::record($conf);
|
|
|
452 |
unset($conf);
|
|
|
453 |
|
|
|
454 |
#結束執行
|
|
|
455 |
exit;
|
|
|
456 |
|
|
|
457 |
}#if end
|
|
|
458 |
|
|
|
459 |
#另存放置影片的語法
|
|
|
460 |
$video=$divSection["content"];
|
|
|
461 |
|
|
|
462 |
#函式說明:
|
|
|
463 |
#區塊輪播的效果,輪播內容支援影片播放結束後再換下一張.
|
|
|
464 |
#回傳結果:
|
|
|
465 |
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
|
|
|
466 |
#$result["error"],錯誤訊息.
|
|
|
467 |
#$result["function"],當前執行的函數名稱.
|
|
|
468 |
#$result["content"],語法.
|
|
|
469 |
#必填參數:
|
|
|
470 |
#$conf["place"],字串,輪播區塊要在哪個元素裡面呈現,其區塊特徵為何?(請參閱javascript的querySelector函式).
|
|
|
471 |
$conf["place"]="div#slide";
|
|
|
472 |
#$conf["slideHtml"],字串陣列,每個投影片的html語法,其生成結構必須為 html > body > div > anyTag(content to show).
|
|
|
473 |
$conf["slideHtml"]=array($oneLine["content"],$img,$video);
|
|
|
474 |
#可省略參數:
|
|
|
475 |
#$conf["sec"],字串,過幾秒就要置換成下一張投影片,預設為"3",代表每3秒就換一張投影片.
|
|
|
476 |
#$conf["sec"]="3";
|
|
|
477 |
#參考資料:
|
|
|
478 |
#無.
|
|
|
479 |
#備註:
|
|
|
480 |
#無.
|
|
|
481 |
$slideDivPlus=javaScript::slideDivPlus($conf);
|
|
|
482 |
unset($conf);
|
|
|
483 |
|
|
|
484 |
#如果執行失敗
|
|
|
485 |
if($slideDivPlus["status"]==="false")
|
|
|
486 |
{
|
|
|
487 |
#函式說明:
|
|
|
488 |
#撰寫log
|
|
|
489 |
#回傳結果:
|
|
|
490 |
#$result["status"],狀態,"true"或"false".
|
|
|
491 |
#$result["error"],錯誤訊息陣列.
|
|
|
492 |
#$result["function"],當前函式的名稱.
|
|
|
493 |
#$result["argu"],使用的參數.
|
|
|
494 |
#必填參數:
|
|
|
495 |
#$conf["path"],字串,log檔案的路徑與名稱.
|
|
|
496 |
$conf["path"]=$logFile;
|
|
|
497 |
#$conf["content"],any,要寫的內容,若內容不為字串則會用var_dump的格式寫入.
|
|
|
498 |
$conf["content"]=$slideDivPlus;
|
|
|
499 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
500 |
$conf["fileArgu"]=__FILE__;
|
|
|
501 |
#可省略參數:
|
|
|
502 |
#$conf["rewrite"],預設為"false",接續寫入;反之"true"代表重新寫入.
|
|
|
503 |
#$conf["rewrite"]="false";
|
|
|
504 |
#參考資料:
|
|
|
505 |
#無.
|
|
|
506 |
#備註:
|
|
|
507 |
#無.
|
|
|
508 |
$record=logs::record($conf);
|
|
|
509 |
unset($conf);
|
|
|
510 |
|
|
|
511 |
#結束執行
|
|
|
512 |
exit;
|
|
|
513 |
}
|
|
|
514 |
|
|
|
515 |
#放置投影片的語法
|
|
|
516 |
echo $slideDivPlus["content"];
|
|
|
517 |
|
|
|
518 |
?>
|