Subversion Repositories php-qbpwcf

Rev

Blame | Last modification | View Log | RSS feed

<?php

#使用命名空間qbpwcf
namespace qbpwcf{

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

        #印出要測試的函式
        echo "<hr>exam::randomSeater - testCase 1<br>";

        /*
        
        #函式說明:
        #根據座位表csv檔與坐者csv檔來隨機安排座位,並自動下載安排好的座位表csv檔.
        #回傳的結果:
        #$result["status"],執行正常與否,"true"為正常,"false"為不正常.
        #$result["error"],錯誤訊息陣列.
        #$result["content"],處理好的座位表csv檔位置.
        #必填的參數:
        #$conf["seaterList"],字串,坐者的csv檔位置與名稱,單攔,每一列為坐者的代稱.
        $conf["seaterList"]="examT/seaterList.csv";
        #$conf["seatMap"],字串,座位表示意csv檔位置與名稱,格子內容為0代表非座位,1為座位.
        $conf["seatMap"]="examT/seatMap.csv";
        #$conf["outputAddress"],字串,csv檔要輸出到哪邊,不用加csv副檔名.
        $conf["outputAddress"]="examT/output";
        #$conf["fileArgu"],字串,__FILE__的內容.
        $conf["fileArgu"]=__FILE__;
        #可省略的參數:
        #$conf["emptySeatName"],字串,要空下來的座位,其代稱要用什麼?預設為empty.
        $conf["emptySeatName"]="留空";
        #$conf["noDownload"],字串,是否不要立馬下載處理好的坐位表csv檔,"true"代表不要要立馬下載處理好的坐位表csv檔.
        #$conf["noDownload"]="true";
        var_dump(exam::randomSeater($conf));
        unset($conf);
        
        */
        
        #印出要測試的函式
        echo "<hr>exam::randomSeater - testCase 2<br>";

        /*
        
        #函式說明:
        #根據座位表csv檔與坐者csv檔來隨機安排座位,並自動下載安排好的座位表csv檔.
        #回傳的結果:
        #$result["status"],執行正常與否,"true"為正常,"false"為不正常.
        #$result["error"],錯誤訊息陣列.
        #$result["content"],處理好的座位表csv檔位置.
        #必填的參數:
        #$conf["seaterList"],字串,坐者的csv檔位置與名稱,單攔,每一列為坐者的代稱.
        $conf["seaterList"]="examT/seaterList.csv";
        #$conf["seatMap"],字串,座位表示意csv檔位置與名稱,格子內容為0代表非座位,1為座位.
        $conf["seatMap"]="examT/seatMap.csv";
        #$conf["outputAddress"],字串,csv檔要輸出到哪邊,不用加csv副檔名.
        $conf["outputAddress"]="examT/output";
        #$conf["fileArgu"],字串,__FILE__的內容.
        $conf["fileArgu"]=__FILE__;
        #可省略的參數:
        #$conf["emptySeatName"],字串,要空下來的座位,其代稱要用什麼?預設為empty.
        $conf["emptySeatName"]="留空";
        #$conf["repeat"],字串,能否連續兩個位置的名稱都一樣,"false"代表不連續重複,"true"代表允許連續重複,預設為"false".
        $conf["repeat"]="true";
        #$conf["noDownload"],字串,是否不要立馬下載處理好的坐位表csv檔,"true"代表不要要立馬下載處理好的坐位表csv檔.
        #$conf["noDownload"]="true";
        var_dump(exam::randomSeater($conf));
        unset($conf);
        
        */
        
        }#namespace qbpwcf end

?>