Subversion Repositories php-qbpwcf

Rev

Rev 81 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 81 Rev 226
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
/*
3
/*
4
 
4
 
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
6
    Copyright (C) 2015~2025 Min-Jhin,Chen
6
    Copyright (C) 2014~2025 MIN ZHI, CHEN
7
 
7
 
8
    This file is part of QBPWCF.
8
    This file is part of QBPWCF.
9
 
9
 
10
    QBPWCF is free software: you can redistribute it and/or modify
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
11
    it under the terms of the GNU General Public License as published by
Line 26... Line 26...
26
namespace qbpwcf;
26
namespace qbpwcf;
27
 
27
 
28
#assets dir
28
#assets dir
29
$assetsDir="assets of javaScript::qbpwcfJavaScript_20240910";
29
$assetsDir="assets of javaScript::qbpwcfJavaScript_20240910";
30
 
30
 
31
#產生 qbpwcfJavaScript 
31
#產生 qbpwcfJavaScript
32
#函式說明:
32
#函式說明:
33
#建立qbpwcf專屬的js函式庫
33
#建立qbpwcf專屬的js函式庫
34
#回傳結果
34
#回傳結果
35
#$result["funciton"],當前函式的名稱.
35
#$result["funciton"],當前函式的名稱.
36
#$result["status"],執行的狀態,"true"代表正常,"false"代表不正常.
36
#$result["status"],執行的狀態,"true"代表正常,"false"代表不正常.
Line 52... Line 52...
52
if($qbpwcfJavaScript["status"]==="false")
52
if($qbpwcfJavaScript["status"]==="false")
53
{
53
{
54
 
54
 
55
	#show detail info
55
	#show detail info
56
	var_dump($qbpwcfJavaScript);
56
	var_dump($qbpwcfJavaScript);
57
	
57
 
58
	#結束執行,並回傳shell 1.
58
	#結束執行,並回傳shell 1.
59
	exit(1);
59
	exit(1);
60
 
60
 
61
}#if end
61
}#if end
62
 
62
 
Line 75... Line 75...
75
#$conf["script"],字串,要執行的javaScript語法.
75
#$conf["script"],字串,要執行的javaScript語法.
76
$conf["script"]="
76
$conf["script"]="
77
 
77
 
78
	//建立按鈕
78
	//建立按鈕
79
	var button=document.createElement('button');
79
	var button=document.createElement('button');
80
	
80
 
81
	//設置按鈕上的文字
81
	//設置按鈕上的文字
82
	button.innerText='click to choose file to upload';
82
	button.innerText='click to choose file to upload';
83
	
83
 
84
	//綁定按鈕的事件	
84
	//綁定按鈕的事件
85
	button.addEventListener('click',async function()
85
	button.addEventListener('click',async function()
86
	{
86
	{
87
	
87
 
88
		//選擇要上傳的檔案
88
		//選擇要上傳的檔案
89
		await window.qbpwcf.clientFile.init();
89
		await window.qbpwcf.clientFile.init();
90
	
90
 
91
	});
91
	});
92
	
92
 
93
	//放置按鈕
93
	//放置按鈕
94
	document.body.appendChild(button);
94
	document.body.appendChild(button);
95
 
95
 
96
	";
96
	";
97
#可省略參數:
97
#可省略參數:
Line 113... Line 113...
113
#如果執行失敗
113
#如果執行失敗
114
if($toScript["status"]==="false"){
114
if($toScript["status"]==="false"){
115
 
115
 
116
	#show detail info
116
	#show detail info
117
	var_dump($toScript);
117
	var_dump($toScript);
118
	
118
 
119
	#結束執行,並回傳shell 1.
119
	#結束執行,並回傳shell 1.
120
	exit(1);
120
	exit(1);
121
 
121
 
122
	}#if end
122
	}#if end
123
 
123
 
124
#印出js語法
124
#印出js語法
125
echo $toScript["content"];
-
 
126
125
echo $toScript["content"];
-
 
126