</div><!-- /.modal --> <script src="js/jquery-1.11.2.min.js"></script> <script src="js/bootstrap.min.js"></script> </body> </html> <script> function dialog_doa_open(){ //dialog_doa_reset(); $("#doafindacc .modal-header").css("background-color","antiquewhite"); $("#doafindacc .modal-header").css("border-top-left-radius","4px"); $("#doafindacc .modal-header").css("border-top-right-radius","4px"); var data = <?php echo get_acc(); ?> ; var html_a=''; var html_b=''; var html_c=''; html_a+='<table rules="all" border="1" class="finAcc" style="width:100%;" >'+ '<thead>'+ '<th style="width: 110px">Action</th>'+ '<th style="width: 110px;">配件 id</th>'+ '<th>配件製造商</th>'+ '<th style="">配件名稱</th>'+ '<th style="width: 100px">配件種類</th>'+ '<th style="width: 100px">Color</th>'+ //'<th>oprice</th>'+ //'<th>sprice</th>'+ //'<th>配件狀態</th>'+ //'<th>店舖</th>'+
if (function_exists('date_default_timezone_set')) { date_default_timezone_set($timezone); } //must set timezone on the top global $db; //session_start(); //$action=''; if (isset($_GET['action'])) { $action = $_GET['action']; } else { $action = $_POST['action']; } switch ($action) { case 'get_acc': //last update at 2012-11-12 get_acc(); break; } function get_acc() { global $db; $shopInfoObj = isset($_POST['shopInfoObj']) ? $_POST['shopInfoObj'] : $_GET['shopInfoObj']; $keywords = isset($_POST['keywords']) ? $_POST['keywords'] : $_GET['keywords']; $shopno = $shopInfoObj['shopno']; $sql = "SELECT si.acc_no,acc_id,manufacturer,accName,typeName,color,\r\n\t\t\t\toprice,sprice,stateName,retail_id,sum(ava_bal) as ava_bal\r\n\t\t\t\tFROM stockin si, accessories acc, retailShop rs, acctype act ,productstate pd\r\n\t\t\t\tWHERE si.acc_no = acc.acc_no\r\n\t\t\t\tAND si.retailShop_no = rs.retailShop_no\r\n\t\t\t\tAND acc.productState_no = pd.productState_no\r\n\t\t\t\tAND acc.accType_no = act.accType_no"; $sql .= " and si.retailShop_no = {$shopno} "; $sql .= " and acc.acc_id like '{$keywords}%' "; $sql .= " group by si.retailShop_no,si.acc_no"; //$result = $db->selectLimit($sql, '14',$pageNo); $result = $db->query($sql); $data_arr = array();