Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 891 | Rev 911 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

#使用命名空間
namespace qbpwcf;

#匯入外部套件
include("../allInOne.php");

/*

#提示正在測試的功能
echo "<hr>linkT::show_link - testCase 1<br>";

#涵式說明:
#放置超鏈結
#回傳的結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$result["error"],錯誤訊息
#$result["content"],語法
#$result["function"],當前執行的函數名稱
#必填的參數:
$conf["position"]="";#爲要連結到的位置  
$conf["linkName"]="沒有作用的超連結";#爲連結的顯示名稱
#可省略的參數:
$conf["method"]="_blank";#爲點選連結後,新畫面要如何呈現,可省略預設爲"_self",可用的選項有 _top(覆蓋目前的視窗來顯現新內容) _parent _self _blank(跳新視窗) 
#$conf["class"]="";#爲要套用的css超連節樣式,可省略。
echo link::show_link($conf)["content"];
unset($conf);

*/

/*

#提示正在測試的功能
echo "<hr>linkT::show_link - testCase 2<br>";

#涵式說明:
#放置超鏈結
#回傳的結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$result["error"],錯誤訊息
#$result["content"],語法
#$result["function"],當前執行的函數名稱
#必填的參數:
$conf["position"]="jqueryT.php";#爲要連結到的位置       
$conf["linkName"]="到jqueryT.php的超連結";#爲連結的顯示名稱
#可省略的參數:
$conf["method"]="_blank";#爲點選連結後,新畫面要如何呈現,可省略預設爲"_self",可用的選項有 _top(覆蓋目前的視窗來顯現新內容) _parent _self _blank(跳新視窗) 
#$conf["class"]="";#爲要套用的css超連節樣式,可省略。
echo link::show_link($conf)["content"];
unset($conf);

*/

/*

#提示正在測試的功能
echo "<hr>linkT::show_link - testCase 3<br>";

#涵式說明:
#放置超鏈結
#回傳的結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$result["error"],錯誤訊息
#$result["content"],語法
#$result["function"],當前執行的函數名稱
#必填的參數:
#$conf["position"],字串,爲要連結到的位置,若留空,將回自動變成"#",則可以搭配ajax傳值.   
$conf["position"]="https://www.facebook.com";
#$conf["linkName",字串,爲連結的顯示名稱
$conf["linkName"]="facebook";
#可省略的參數:
#$conf["method"],字串,爲點選連結後,新畫面要如何呈現,可省略預設爲"_self",可用的選項有 _top(覆蓋目前的視窗來顯現新內容) _parent _self _blank(跳新視窗)
$conf["method"]="_blank"; 
#$conf["class"],字串,爲要套用的css超連節樣式,可省略.
#$conf["class"]="";
#$conf["id"],字串,超連結的id.
#$conf["id"]="";
#$conf["no_outline"],字串,是否要取消連結的框線,"false為不取消,"true"代表要取消,預設為"false".
$conf["no_outline"]="true";
var_dump(link::show_link($conf));
unset($conf);
        
*/

/*

#提示正在測試的功能
echo "<hr>linkT::showImgLink - testCase 1<br>";

#涵式說明:
#放置圖片超鏈接
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$result["error"],錯誤訊息
#$result["content"],語法
#$result["function"],當前執行的函數名稱
#必填的參數:
$conf["linkLocation"]="jqueryT.php";#爲連結的網路位置。
$conf["imgFilePosition"]="fedoraBear.png";#爲圖片檔案的位置。
#可省略的參數:
#$conf["class"]="";#爲圖片的css類別名稱
$conf["method"]="_blank";#爲點選該連結之後,新畫面要如何呈現,可留空,可用的選項有 _top(覆蓋目前的視窗來顯現新內容) _parent(在目前的父頁面顯示新畫面) _blank(跳新視窗) _self(在自己的頁面呈現),預設爲 _self。
#$conf["imgHeight"]="";#爲圖片的高度,可省略,省略則按照圖片原始高度。
#$conf["imgWidth"]="";#爲圖片的寬度,可省略,省略則按照圖片原始寬度。
#$conf["imgLinkName"]="";#若圖片無法顯示,則會出現以下替代文字。
echo link::showImgLink($conf)["content"];
unset($conf);

*/

/*

#提示正在測試的功能
echo "<hr>linkT::showImgLink - testCase 2<br>";

#涵式說明:
#放置圖片超鏈接
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$result["error"],錯誤訊息
#$result["content"],語法
#$result["function"],當前執行的函數名稱
#必填的參數:
$conf["linkLocation"]="jqueryT.php";#爲連結的網路位置。
$conf["imgFilePosition"]="fedoraBear.png";#爲圖片檔案的位置。
#可省略的參數:
#$conf["class"]="";#爲圖片的css類別名稱
$conf["method"]="_blank";#爲點選該連結之後,新畫面要如何呈現,可留空,可用的選項有 _top(覆蓋目前的視窗來顯現新內容) _parent(在目前的父頁面顯示新畫面) _blank(跳新視窗) _self(在自己的頁面呈現),預設爲 _self。
#$conf["imgHeight"]="";#爲圖片的高度,可省略,省略則按照圖片原始高度。
#$conf["imgWidth"]="";#爲圖片的寬度,可省略,省略則按照圖片原始寬度。
#$conf["imgLinkName"]="";#若圖片無法顯示,則會出現以下替代文字。
#$conf["no_outline"],字串,是否要取消連結的框線,"false為不取消,"true"代表要取消,預設為"true".
#$conf["no_outline"]="";
var_dump(link::showImgLink($conf));
unset($conf);

*/

/*

echo "<hr>linkT::aTagSection - testCase 1<br>";

#涵式說明:
#放置超鏈接,裏面可以放各種內容.
#回傳內容:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$result["error"],錯誤訊息
#$result["content"],語法
#$result["function"],當前執行的函數名稱
#必填參數:
#$conf["linkLocation"],字串,爲連結的網路位置.
$conf["linkLocation"]="https://nopanic.qbpwcf.org";
#$conf["content"],字串陣列,要放置的內容.
$conf["content"]=array("a","<p>","b","<p>","c"); 
#可省略參數:
#$conf["class"],陣列,爲link的css類別名稱.
#$conf["class"]=array();
#$conf["method"],爲點選該連結之後,新畫面要如何呈現,可留空,可用的選項有 _top(覆蓋目前的視窗來顯現新內容) _parent(在目前的父頁面顯示新畫面) _blank(跳新視窗) _self(在自己的頁面呈現),預設爲 _self。
#$conf["method"]="";            
#$conf["no_outline"],字串,是否要取消連結的框線,"false為不取消,"true"代表要取消,預設為"true".
#$conf["no_outline"]="true";
$aTagSection=link::aTagSection($conf);
unset($conf);
var_dump($aTagSection);

*/

/*

echo "<hr>linkT::call - testCase 1<br>";

#涵式說明:
#放置超鏈接,裏面可以放各種內容.
#回傳內容:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$result["error"],錯誤訊息
#$result["content"],語法
#$result["function"],當前執行的函數名稱
#必填參數:
#$conf["phone"],字串,爲要撥打的號碼.
$conf["phone"]="8860928047786";
#$conf["content"],字串陣列,要顯示的內容.
$conf["content"]="call me now!"; 
#可省略參數:
#$conf["class"],陣列,爲link的css類別名稱.
#$conf["class"]=array();                
$call=link::call($conf);
unset($conf);

#如果執行失敗
if($call["status"]==="false"){

        #print all
        var_dump($call);

        #end
        exit;

        }#if end

#印出結果
echo $call["content"];

*/

?>