From e9826f34fe34a3029c410ec611fbb4f302c21e6a Mon Sep 17 00:00:00 2001 From: "altob.rd" Date: Mon, 16 Oct 2017 15:51:25 +0800 Subject: [PATCH] add B1 format --- controllers/Pks.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/Pks.php b/controllers/Pks.php index 4a37a38..6bec435 100644 --- a/controllers/Pks.php +++ b/controllers/Pks.php @@ -201,7 +201,11 @@ class Pks extends CI_Controller $parms = $this->uri->uri_to_assoc(3); // 調整 pksno 為 pks 格式 - $parms['pksno'] = intval(implode('', explode('F_', $parms['pksno']))); + if (strpos($test_string, 'B') !== false) { + $parms['pksno'] = '9' . intval(preg_replace('/[^0-9\-]/', '', $test_string)); // 地下 B + } + else + $parms['pksno'] = intval(preg_replace('/[^0-9\-]/', '', $test_string)); trigger_error('在席參數傳入:'.print_r($parms, true));