public function getAddHtmlAction() { //session_start(); $VTs = new clsSystem(); $VTs->initialization(); //-----BI開始----- typeunit 單位表IUD頁面 $type = $_GET["type"]; switch ($type) { case '0': $path = dirname(__DIR__) . "\\..\\..\\..\\..\\public\\include\\pageSetting\\styles\\editor\\typeunit_addlist.html"; $html = $VTs->GetHtmlContent($path); $data = $VTs->json2data($VTs->UrlDataGet("http://127.0.0.1:88/editor/getdbdata?page=type_a")); $str = ''; foreach ($data as $opData) { $str .= '<option value=' . $opData->uid . '>' . $opData->name . '</option>'; } $html = str_replace('@@select@@', $str, $html); break; } $pageContent = $html . $VTs->CreateFinishOptionBtn(["uid" => 1], 'test/tw', 'inputClass', 'contentClass'); //-----BI結束----- //關閉資料庫連線 $VTs->DBClose(); //釋放 $VTs = null; $this->viewContnet['pageContent'] = $pageContent; return new ViewModel($this->viewContnet); }