@@ -264,7 +264,7 @@ |
||
| 264 | 264 | throw new \Exception('data must be set for LDAPGroup'); |
| 265 | 265 | } |
| 266 | 266 | $filter = new \Data\Filter("cn eq $name"); |
| 267 | - $group = $data->read($data->group_base, $filter); |
|
| 267 | + $group = $data->read($data->group_base, $filter); |
|
| 268 | 268 | if($group === false || !isset($group[0])) |
| 269 | 269 | { |
| 270 | 270 | return false; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | return substr($split[0], 4); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - public function getMemberUids($recursive=true) |
|
| 75 | + public function getMemberUids($recursive = true) |
|
| 76 | 76 | { |
| 77 | 77 | $members = array(); |
| 78 | 78 | $rawMembers = $this->getMembersField(); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | return LDAPUser::from_name(substr($split[0], 4), $this->server); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - public function members($details=false, $recursive=true, $includeGroups=true) |
|
| 120 | + public function members($details = false, $recursive = true, $includeGroups = true) |
|
| 121 | 121 | { |
| 122 | 122 | $members = array(); |
| 123 | 123 | $rawMembers = $this->getMembersField(); |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | return $members; |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - public function getNonMemebers($select=false) |
|
| 157 | + public function getNonMemebers($select = false) |
|
| 158 | 158 | { |
| 159 | 159 | $data = array(); |
| 160 | 160 | $groupFilter = '(&(cn=*)(!(cn='.$this->getGroupName().'))'; |
@@ -163,18 +163,18 @@ discard block |
||
| 163 | 163 | $count = count($members); |
| 164 | 164 | for($i = 0; $i < $count; $i++) |
| 165 | 165 | { |
| 166 | - $dnComps = explode(',',$members[$i]); |
|
| 166 | + $dnComps = explode(',', $members[$i]); |
|
| 167 | 167 | if(strncmp($members[$i], "uid=", 4) == 0) |
| 168 | 168 | { |
| 169 | - $userFilter.='(!('.$dnComps[0].'))'; |
|
| 169 | + $userFilter .= '(!('.$dnComps[0].'))'; |
|
| 170 | 170 | } |
| 171 | 171 | else |
| 172 | 172 | { |
| 173 | - $groupFilter.='(!('.$dnComps[0].'))'; |
|
| 173 | + $groupFilter .= '(!('.$dnComps[0].'))'; |
|
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | - $userFilter.=')'; |
|
| 177 | - $groupFilter.=')'; |
|
| 176 | + $userFilter .= ')'; |
|
| 177 | + $groupFilter .= ')'; |
|
| 178 | 178 | $groups = $this->server->read($this->server->group_base, $groupFilter); |
| 179 | 179 | $count = count($groups); |
| 180 | 180 | for($i = 0; $i < $count; $i++) |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - public function addMember($name, $isGroup=false, $flush=true) |
|
| 210 | + public function addMember($name, $isGroup = false, $flush = true) |
|
| 211 | 211 | { |
| 212 | 212 | $dn = false; |
| 213 | 213 | if($isGroup) |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | } |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | - static function from_dn($dn, $data=false) |
|
| 257 | + static function from_dn($dn, $data = false) |
|
| 258 | 258 | { |
| 259 | 259 | if($data === false) |
| 260 | 260 | { |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | return new static($group[0]); |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | - static function from_name($name, $data=false) |
|
| 271 | + static function from_name($name, $data = false) |
|
| 272 | 272 | { |
| 273 | 273 | if($data === false) |
| 274 | 274 | { |
@@ -241,7 +241,7 @@ |
||
| 241 | 241 | $obj['userPassword'] = $this->generateLDAPPass($password); |
| 242 | 242 | if(isset($this->ldap_obj->uniqueidentifier)) |
| 243 | 243 | { |
| 244 | - $obj['uniqueIdentifier'] = null; |
|
| 244 | + $obj['uniqueIdentifier'] = null; |
|
| 245 | 245 | } |
| 246 | 246 | //Make sure we are bound in write mode |
| 247 | 247 | $auth = \AuthProvider::getInstance(); |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | private $ldapObj; |
| 9 | 9 | private $server; |
| 10 | 10 | |
| 11 | - public function __construct($data=false) |
|
| 11 | + public function __construct($data = false) |
|
| 12 | 12 | { |
| 13 | 13 | $this->server = \LDAP\LDAPServer::getInstance(); |
| 14 | 14 | if($data !== false && !isset($data['dn']) && !isset($data['extended'])) |
@@ -220,9 +220,9 @@ discard block |
||
| 220 | 220 | |
| 221 | 221 | private function generateLDAPPass($pass) |
| 222 | 222 | { |
| 223 | - mt_srand((double)microtime()*1000000); |
|
| 223 | + mt_srand((double)microtime() * 1000000); |
|
| 224 | 224 | $salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand()); |
| 225 | - $hash = base64_encode(pack('H*',sha1($pass.$salt)).$salt); |
|
| 225 | + $hash = base64_encode(pack('H*', sha1($pass.$salt)).$salt); |
|
| 226 | 226 | return '{SSHA}'.$hash; |
| 227 | 227 | } |
| 228 | 228 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | { |
| 231 | 231 | if(!is_object($this->ldapObj)) |
| 232 | 232 | { |
| 233 | - return $this->setFieldLocal('userPassword', $this->generateLDAPPass($password)); |
|
| 233 | + return $this->setFieldLocal('userPassword', $this->generateLDAPPass($password)); |
|
| 234 | 234 | } |
| 235 | 235 | else |
| 236 | 236 | { |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | return false; |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | - static function from_name($name, $data=false) |
|
| 269 | + static function from_name($name, $data = false) |
|
| 270 | 270 | { |
| 271 | 271 | if($data === false) |
| 272 | 272 | { |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | return new static($user[0]); |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | - static function from_dn($dn, $data=false) |
|
| 284 | + static function from_dn($dn, $data = false) |
|
| 285 | 285 | { |
| 286 | 286 | if($data === false) |
| 287 | 287 | { |
@@ -116,26 +116,26 @@ |
||
| 116 | 116 | |
| 117 | 117 | private function getDataTable($name, $pending=false) |
| 118 | 118 | { |
| 119 | - if(isset($this->dataTables[$name]) && isset($this->dataTables[$name][$pending])) |
|
| 120 | - { |
|
| 121 | - return $this->dataTables[$name][$pending]; |
|
| 122 | - } |
|
| 123 | - $dataSet = $this->dataSet; |
|
| 124 | - if($pending) |
|
| 125 | - { |
|
| 126 | - $dataSet = $this->pendingDataSet; |
|
| 127 | - } |
|
| 128 | - if($dataSet === null) |
|
| 129 | - { |
|
| 130 | - throw new \Exception('Unable to obtain dataset for SQL Authentication!'); |
|
| 131 | - } |
|
| 132 | - $dataTable = $dataSet[$name]; |
|
| 133 | - if(!isset($this->dataTables[$name])) |
|
| 134 | - { |
|
| 135 | - $this->dataTables[$name] = array(); |
|
| 136 | - } |
|
| 137 | - $this->dataTables[$name][$pending] = $dataTable; |
|
| 138 | - return $dataTable; |
|
| 119 | + if(isset($this->dataTables[$name]) && isset($this->dataTables[$name][$pending])) |
|
| 120 | + { |
|
| 121 | + return $this->dataTables[$name][$pending]; |
|
| 122 | + } |
|
| 123 | + $dataSet = $this->dataSet; |
|
| 124 | + if($pending) |
|
| 125 | + { |
|
| 126 | + $dataSet = $this->pendingDataSet; |
|
| 127 | + } |
|
| 128 | + if($dataSet === null) |
|
| 129 | + { |
|
| 130 | + throw new \Exception('Unable to obtain dataset for SQL Authentication!'); |
|
| 131 | + } |
|
| 132 | + $dataTable = $dataSet[$name]; |
|
| 133 | + if(!isset($this->dataTables[$name])) |
|
| 134 | + { |
|
| 135 | + $this->dataTables[$name] = array(); |
|
| 136 | + } |
|
| 137 | + $this->dataTables[$name][$pending] = $dataTable; |
|
| 138 | + return $dataTable; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | private function getPendingUserDataTable() |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | } |
| 21 | 21 | if(!is_int($algo)) |
| 22 | 22 | { |
| 23 | - trigger_error("password_hash() expects parameter 2 to be long, " . gettype($algo) . " given", E_USER_WARNING); |
|
| 23 | + trigger_error("password_hash() expects parameter 2 to be long, ".gettype($algo)." given", E_USER_WARNING); |
|
| 24 | 24 | return false; |
| 25 | 25 | } |
| 26 | 26 | $resultLength = 0; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $base64String = base64_encode($salt); |
| 44 | 44 | $salt = strtr(rtrim($base64String, '='), $base64Digits, $bcrypt64Digits); |
| 45 | 45 | $salt = substr($salt, 0, $requiredSaltLen); |
| 46 | - $hash = $hashFormat . $salt; |
|
| 46 | + $hash = $hashFormat.$salt; |
|
| 47 | 47 | $ret = crypt($password, $hash); |
| 48 | 48 | if(!is_string($ret) || strlen($ret) != $resultLength) |
| 49 | 49 | { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | return \DataSetFactory::getDataSetByName('pending_authentication'); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - private function getDataTable($name, $pending=false) |
|
| 117 | + private function getDataTable($name, $pending = false) |
|
| 118 | 118 | { |
| 119 | 119 | if(isset($this->dataTables[$name]) && isset($this->dataTables[$name][$pending])) |
| 120 | 120 | { |
@@ -227,12 +227,12 @@ discard block |
||
| 227 | 227 | return $data; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - public function getGroupsByFilter($filter, $select=false, $top=false, $skip=false, $orderby=false) |
|
| 230 | + public function getGroupsByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false) |
|
| 231 | 231 | { |
| 232 | 232 | return $this->convertDataToClass('group', 'SQLGroup', $filter, $select, $top, $skip, $orderby); |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | - public function getUsersByFilter($filter, $select=false, $top=false, $skip=false, $orderby=false) |
|
| 235 | + public function getUsersByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false) |
|
| 236 | 236 | { |
| 237 | 237 | return $this->convertDataToClass('group', 'SQLUser', $filter, $select, $top, $skip, $orderby); |
| 238 | 238 | } |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | { |
| 250 | 250 | $userDataTable = $this->getPendingUserDataTable(); |
| 251 | 251 | $fieldData = $filter->to_mongo_filter(); |
| 252 | - $firstFilter = new \Data\Filter('substringof(data,"'.implode($fieldData,' ').'")'); |
|
| 252 | + $firstFilter = new \Data\Filter('substringof(data,"'.implode($fieldData, ' ').'")'); |
|
| 253 | 253 | $users = $userDataTable->read($firstFilter, $select, $top, $skip, $orderby); |
| 254 | 254 | if($users === false) |
| 255 | 255 | { |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | return $ret; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - public function getPendingUsersByFilter($filter, $select=false, $top=false, $skip=false, $orderby=false) |
|
| 279 | + public function getPendingUsersByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false) |
|
| 280 | 280 | |
| 281 | 281 | { |
| 282 | 282 | if($this->pending === false) return false; |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | $ret = $auth->activatePendingUser($user); |
| 67 | 67 | if($ret === false) |
| 68 | 68 | {
|
| 69 | - throw new \Exception('Unable to create user! '.$res);
|
|
| 69 | + throw new \Exception('Unable to create user! '.$res);
|
|
| 70 | 70 | } |
| 71 | 71 | return self::SUCCESS; |
| 72 | 72 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function authenticate($code, &$currentUser = false) |
| 35 | 35 | {
|
| 36 | 36 | $googleUser = false; |
| 37 | - try{
|
|
| 37 | + try {
|
|
| 38 | 38 | $this->client->authenticate($code); |
| 39 | 39 | $this->token = $this->client->getAccessToken(); |
| 40 | 40 | \FlipSession::setVar('GoogleToken', $this->token);
|
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $collections = $this->db->getCollectionNames(); |
| 66 | 66 | if(in_array($name, $collections)) |
| 67 | 67 | { |
| 68 | - return true; |
|
| 68 | + return true; |
|
| 69 | 69 | } |
| 70 | 70 | return false; |
| 71 | 71 | } |
@@ -7,15 +7,15 @@ |
||
| 7 | 7 | $classname = ltrim($classname, '\\'); |
| 8 | 8 | $filename = ''; |
| 9 | 9 | $namespace = ''; |
| 10 | - if ($lastNsPos = strrpos($classname, '\\')) |
|
| 10 | + if($lastNsPos = strrpos($classname, '\\')) |
|
| 11 | 11 | { |
| 12 | 12 | $namespace = substr($classname, 0, $lastNsPos); |
| 13 | 13 | $classname = substr($classname, $lastNsPos + 1); |
| 14 | - $filename = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; |
|
| 14 | + $filename = str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR; |
|
| 15 | 15 | } |
| 16 | 16 | if(strlen($namespace)) |
| 17 | 17 | { |
| 18 | - $namespace.=DIRECTORY_SEPARATOR; |
|
| 18 | + $namespace .= DIRECTORY_SEPARATOR; |
|
| 19 | 19 | } |
| 20 | 20 | $filename = __DIR__.'/../libs/mongofill/src/'.$namespace.$classname.'.php'; |
| 21 | 21 | if(is_readable($filename)) |
@@ -65,11 +65,11 @@ discard block |
||
| 65 | 65 | $ret = $this->dataset->read($this->tablename, $where, 'COUNT(*)'); |
| 66 | 66 | if($ret === false || !isset($ret[0]) || !isset($ret[0]['COUNT(*)'])) |
| 67 | 67 | { |
| 68 | - return false; |
|
| 68 | + return false; |
|
| 69 | 69 | } |
| 70 | 70 | else |
| 71 | 71 | { |
| 72 | - return $ret[0]['COUNT(*)']; |
|
| 72 | + return $ret[0]['COUNT(*)']; |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | function update($filter, $data) |
| 95 | 95 | { |
| 96 | - $where = $filter->to_sql_string(); |
|
| 97 | - return $this->dataset->update($this->tablename, $where, $data); |
|
| 96 | + $where = $filter->to_sql_string(); |
|
| 97 | + return $this->dataset->update($this->tablename, $where, $data); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | function create($data) |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - function count($filter=false) |
|
| 54 | + function count($filter = false) |
|
| 55 | 55 | { |
| 56 | 56 | if($this->data !== null) |
| 57 | 57 | { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - function search($filter=false, $select=false, $count=false, $skip=false, $sort=false, $params=false) |
|
| 76 | + function search($filter = false, $select = false, $count = false, $skip = false, $sort = false, $params = false) |
|
| 77 | 77 | { |
| 78 | 78 | if($this->data !== null) |
| 79 | 79 | { |
@@ -59,239 +59,239 @@ |
||
| 59 | 59 | |
| 60 | 60 | global $jsArray; |
| 61 | 61 | $jsArray = array( |
| 62 | - JS_JQUERY => array( |
|
| 63 | - 'no' => array( |
|
| 64 | - 'no' => '/js/common/jquery.js', |
|
| 65 | - 'min' => '/js/common/jquery.min.js' |
|
| 66 | - ), |
|
| 67 | - 'cdn' => array( |
|
| 68 | - 'no' => '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js', |
|
| 69 | - 'min' => '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js' |
|
| 70 | - ) |
|
| 71 | - ), |
|
| 72 | - JS_JQUERY_UI => array( |
|
| 73 | - 'no' => array( |
|
| 74 | - 'no' => '/js/common/jquery-ui.js', |
|
| 75 | - 'min' => '/js/common/jquery-ui.min.js' |
|
| 76 | - ), |
|
| 77 | - 'cdn' => array( |
|
| 78 | - 'no' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.js', |
|
| 79 | - 'min' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js' |
|
| 80 | - ) |
|
| 81 | - ), |
|
| 82 | - JS_BOOTSTRAP => array( |
|
| 83 | - 'no' => array( |
|
| 84 | - 'no' => '/js/common/bootstrap.js', |
|
| 85 | - 'min' => '/js/common/bootstrap.min.js' |
|
| 86 | - ), |
|
| 87 | - 'cdn' => array( |
|
| 88 | - 'no' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.js', |
|
| 89 | - 'min' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js' |
|
| 90 | - ) |
|
| 91 | - ), |
|
| 92 | - JQUERY_VALIDATE => array( |
|
| 93 | - 'no' => array( |
|
| 94 | - 'no' => '/js/common/jquery.validate.js', |
|
| 95 | - 'min' => '/js/common/jquery.validate.min.js' |
|
| 96 | - ), |
|
| 97 | - 'cdn' => array( |
|
| 98 | - 'no' => '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.js', |
|
| 99 | - 'min' => '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js' |
|
| 100 | - ) |
|
| 101 | - ), |
|
| 102 | - JQUERY_TOUCH => array( |
|
| 103 | - 'no' => array( |
|
| 104 | - 'no' => '/js/common/jquery.ui.touch-punch.min.js', |
|
| 105 | - 'min' => '/js/common/jquery.ui.touch-punch.min.js' |
|
| 106 | - ), |
|
| 107 | - 'cdn' => array( |
|
| 108 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js', |
|
| 109 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js' |
|
| 110 | - ) |
|
| 111 | - ), |
|
| 112 | - JS_TINYNAV => array( |
|
| 113 | - 'no' => array( |
|
| 114 | - 'no' => '/js/common/tinynav.js', |
|
| 115 | - 'min' => '/js/common/tinynav.min.js' |
|
| 116 | - ), |
|
| 117 | - 'cdn' => array( |
|
| 118 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/TinyNav.js/1.2.0/tinynav.js', |
|
| 119 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/TinyNav.js/1.2.0/tinynav.min.js' |
|
| 120 | - ) |
|
| 121 | - ), |
|
| 122 | - JS_BOOTSTRAP_FH => array( |
|
| 123 | - 'no' => array( |
|
| 124 | - 'no' => '/js/common/bootstrap-formhelpers.js', |
|
| 125 | - 'min' => '/js/common/bootstrap-formhelpers.min.js' |
|
| 126 | - ), |
|
| 127 | - 'cdn' => array( |
|
| 128 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.js', |
|
| 129 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.min.js' |
|
| 130 | - ) |
|
| 131 | - ), |
|
| 132 | - JS_BOOTSTRAP_SW => array( |
|
| 133 | - 'no' => array( |
|
| 134 | - 'no' => '/js/common/bootstrap-switch.js', |
|
| 135 | - 'min' => '/js/common/bootstrap-switch.min.js' |
|
| 136 | - ), |
|
| 137 | - 'cdn' => array( |
|
| 138 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/js/bootstrap-switch.js', |
|
| 139 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/js/bootstrap-switch.min.js' |
|
| 140 | - ) |
|
| 141 | - ), |
|
| 142 | - JS_DATATABLE => array( |
|
| 143 | - 'no' => array( |
|
| 144 | - 'no' => '/js/common/jquery.dataTables.js', |
|
| 145 | - 'min' => '/js/common/jquery.dataTables.min.js' |
|
| 146 | - ), |
|
| 147 | - 'cdn' => array( |
|
| 148 | - 'no' => '//cdn.datatables.net/1.10.7/js/jquery.dataTables.js', |
|
| 149 | - 'min' => '//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js' |
|
| 150 | - ) |
|
| 151 | - ), |
|
| 152 | - JS_CHART => array( |
|
| 153 | - 'no' => array( |
|
| 154 | - 'no' => '/js/common/Chart.js', |
|
| 155 | - 'min' => '/js/common/Chart.min.js' |
|
| 156 | - ), |
|
| 157 | - 'cdn' => array( |
|
| 158 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js', |
|
| 159 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js' |
|
| 160 | - ) |
|
| 161 | - ), |
|
| 162 | - JS_METISMENU => array( |
|
| 163 | - 'no' => array( |
|
| 164 | - 'no' => '/js/common/metisMenu.js', |
|
| 165 | - 'min' => '/js/common/metisMenu.min.js' |
|
| 166 | - ), |
|
| 167 | - 'cdn' => array( |
|
| 168 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.js', |
|
| 169 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.min.js' |
|
| 170 | - ) |
|
| 171 | - ), |
|
| 172 | - JS_BOOTBOX => array( |
|
| 173 | - 'no' => array( |
|
| 174 | - 'no' => '/js/common/bootbox.js', |
|
| 175 | - 'min' => '/js/common/bootbox.min.js' |
|
| 176 | - ), |
|
| 177 | - 'cdn' => array( |
|
| 178 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.3.0/bootbox.js', |
|
| 179 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.3.0/bootbox.min.js' |
|
| 180 | - ) |
|
| 181 | - ), |
|
| 182 | - JS_DATATABLE_ODATA => array( |
|
| 183 | - 'no' => array( |
|
| 184 | - 'no' => '/js/common/jquery.dataTables.odata.js', |
|
| 185 | - 'min' => '/js/common/jquery.dataTables.odata.js', |
|
| 186 | - ), |
|
| 187 | - 'cdn' => array( |
|
| 188 | - 'no' => '/js/common/jquery.dataTables.odata.js', |
|
| 189 | - 'min' => '/js/common/jquery.dataTables.odata.js', |
|
| 190 | - ) |
|
| 191 | - ), |
|
| 192 | - JS_CRYPTO_MD5_JS => array( |
|
| 193 | - 'no' => array( |
|
| 194 | - 'no' => '/js/common/md5.js', |
|
| 195 | - 'min' => '/js/common/md5.js', |
|
| 196 | - ), |
|
| 197 | - 'cdn' => array( |
|
| 198 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js', |
|
| 199 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js', |
|
| 200 | - ) |
|
| 201 | - ), |
|
| 202 | - JS_JCROP => array( |
|
| 203 | - 'no' => array( |
|
| 204 | - 'no' => '/js/common/jquery.Jcrop.min.js', |
|
| 205 | - 'min' => '/js/common/jquery.Jcrop.min.js' |
|
| 206 | - ), |
|
| 207 | - 'cdn' => array( |
|
| 208 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.12/js/jquery.Jcrop.min.js', |
|
| 209 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.12/js/jquery.Jcrop.min.js' |
|
| 210 | - ) |
|
| 211 | - ), |
|
| 212 | - JS_TYPEAHEAD => array( |
|
| 213 | - 'no' => array( |
|
| 214 | - 'no' => '/js/common/typeahead.bundle.js', |
|
| 215 | - 'min' => '/js/common/typeahead.bundle.min.js' |
|
| 216 | - ), |
|
| 217 | - 'cdn' => array( |
|
| 218 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.js', |
|
| 219 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js' |
|
| 220 | - ) |
|
| 221 | - ), |
|
| 222 | - JS_FLIPSIDE => array( |
|
| 223 | - 'no' => array( |
|
| 224 | - 'no' => '/js/common/flipside.js', |
|
| 225 | - 'min' => '/js/common/flipside.min.js' |
|
| 226 | - ), |
|
| 227 | - 'cdn' => array( |
|
| 228 | - 'no' => '/js/common/flipside.js', |
|
| 229 | - 'min' => '/js/common/flipside.min.js' |
|
| 230 | - ) |
|
| 231 | - ), |
|
| 232 | - JS_LOGIN => array( |
|
| 233 | - 'no' => array( |
|
| 234 | - 'no' => '/js/common/login.js', |
|
| 235 | - 'min' => '/js/common/login.min.js' |
|
| 236 | - ), |
|
| 237 | - 'cdn' => array( |
|
| 238 | - 'no' => '/js/common/login.js', |
|
| 239 | - 'min' => '/js/common/login.min.js' |
|
| 240 | - ) |
|
| 241 | - ) |
|
| 62 | + JS_JQUERY => array( |
|
| 63 | + 'no' => array( |
|
| 64 | + 'no' => '/js/common/jquery.js', |
|
| 65 | + 'min' => '/js/common/jquery.min.js' |
|
| 66 | + ), |
|
| 67 | + 'cdn' => array( |
|
| 68 | + 'no' => '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js', |
|
| 69 | + 'min' => '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js' |
|
| 70 | + ) |
|
| 71 | + ), |
|
| 72 | + JS_JQUERY_UI => array( |
|
| 73 | + 'no' => array( |
|
| 74 | + 'no' => '/js/common/jquery-ui.js', |
|
| 75 | + 'min' => '/js/common/jquery-ui.min.js' |
|
| 76 | + ), |
|
| 77 | + 'cdn' => array( |
|
| 78 | + 'no' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.js', |
|
| 79 | + 'min' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js' |
|
| 80 | + ) |
|
| 81 | + ), |
|
| 82 | + JS_BOOTSTRAP => array( |
|
| 83 | + 'no' => array( |
|
| 84 | + 'no' => '/js/common/bootstrap.js', |
|
| 85 | + 'min' => '/js/common/bootstrap.min.js' |
|
| 86 | + ), |
|
| 87 | + 'cdn' => array( |
|
| 88 | + 'no' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.js', |
|
| 89 | + 'min' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js' |
|
| 90 | + ) |
|
| 91 | + ), |
|
| 92 | + JQUERY_VALIDATE => array( |
|
| 93 | + 'no' => array( |
|
| 94 | + 'no' => '/js/common/jquery.validate.js', |
|
| 95 | + 'min' => '/js/common/jquery.validate.min.js' |
|
| 96 | + ), |
|
| 97 | + 'cdn' => array( |
|
| 98 | + 'no' => '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.js', |
|
| 99 | + 'min' => '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js' |
|
| 100 | + ) |
|
| 101 | + ), |
|
| 102 | + JQUERY_TOUCH => array( |
|
| 103 | + 'no' => array( |
|
| 104 | + 'no' => '/js/common/jquery.ui.touch-punch.min.js', |
|
| 105 | + 'min' => '/js/common/jquery.ui.touch-punch.min.js' |
|
| 106 | + ), |
|
| 107 | + 'cdn' => array( |
|
| 108 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js', |
|
| 109 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js' |
|
| 110 | + ) |
|
| 111 | + ), |
|
| 112 | + JS_TINYNAV => array( |
|
| 113 | + 'no' => array( |
|
| 114 | + 'no' => '/js/common/tinynav.js', |
|
| 115 | + 'min' => '/js/common/tinynav.min.js' |
|
| 116 | + ), |
|
| 117 | + 'cdn' => array( |
|
| 118 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/TinyNav.js/1.2.0/tinynav.js', |
|
| 119 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/TinyNav.js/1.2.0/tinynav.min.js' |
|
| 120 | + ) |
|
| 121 | + ), |
|
| 122 | + JS_BOOTSTRAP_FH => array( |
|
| 123 | + 'no' => array( |
|
| 124 | + 'no' => '/js/common/bootstrap-formhelpers.js', |
|
| 125 | + 'min' => '/js/common/bootstrap-formhelpers.min.js' |
|
| 126 | + ), |
|
| 127 | + 'cdn' => array( |
|
| 128 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.js', |
|
| 129 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/js/bootstrap-formhelpers.min.js' |
|
| 130 | + ) |
|
| 131 | + ), |
|
| 132 | + JS_BOOTSTRAP_SW => array( |
|
| 133 | + 'no' => array( |
|
| 134 | + 'no' => '/js/common/bootstrap-switch.js', |
|
| 135 | + 'min' => '/js/common/bootstrap-switch.min.js' |
|
| 136 | + ), |
|
| 137 | + 'cdn' => array( |
|
| 138 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/js/bootstrap-switch.js', |
|
| 139 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/js/bootstrap-switch.min.js' |
|
| 140 | + ) |
|
| 141 | + ), |
|
| 142 | + JS_DATATABLE => array( |
|
| 143 | + 'no' => array( |
|
| 144 | + 'no' => '/js/common/jquery.dataTables.js', |
|
| 145 | + 'min' => '/js/common/jquery.dataTables.min.js' |
|
| 146 | + ), |
|
| 147 | + 'cdn' => array( |
|
| 148 | + 'no' => '//cdn.datatables.net/1.10.7/js/jquery.dataTables.js', |
|
| 149 | + 'min' => '//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js' |
|
| 150 | + ) |
|
| 151 | + ), |
|
| 152 | + JS_CHART => array( |
|
| 153 | + 'no' => array( |
|
| 154 | + 'no' => '/js/common/Chart.js', |
|
| 155 | + 'min' => '/js/common/Chart.min.js' |
|
| 156 | + ), |
|
| 157 | + 'cdn' => array( |
|
| 158 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js', |
|
| 159 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js' |
|
| 160 | + ) |
|
| 161 | + ), |
|
| 162 | + JS_METISMENU => array( |
|
| 163 | + 'no' => array( |
|
| 164 | + 'no' => '/js/common/metisMenu.js', |
|
| 165 | + 'min' => '/js/common/metisMenu.min.js' |
|
| 166 | + ), |
|
| 167 | + 'cdn' => array( |
|
| 168 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.js', |
|
| 169 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.2/metisMenu.min.js' |
|
| 170 | + ) |
|
| 171 | + ), |
|
| 172 | + JS_BOOTBOX => array( |
|
| 173 | + 'no' => array( |
|
| 174 | + 'no' => '/js/common/bootbox.js', |
|
| 175 | + 'min' => '/js/common/bootbox.min.js' |
|
| 176 | + ), |
|
| 177 | + 'cdn' => array( |
|
| 178 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.3.0/bootbox.js', |
|
| 179 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.3.0/bootbox.min.js' |
|
| 180 | + ) |
|
| 181 | + ), |
|
| 182 | + JS_DATATABLE_ODATA => array( |
|
| 183 | + 'no' => array( |
|
| 184 | + 'no' => '/js/common/jquery.dataTables.odata.js', |
|
| 185 | + 'min' => '/js/common/jquery.dataTables.odata.js', |
|
| 186 | + ), |
|
| 187 | + 'cdn' => array( |
|
| 188 | + 'no' => '/js/common/jquery.dataTables.odata.js', |
|
| 189 | + 'min' => '/js/common/jquery.dataTables.odata.js', |
|
| 190 | + ) |
|
| 191 | + ), |
|
| 192 | + JS_CRYPTO_MD5_JS => array( |
|
| 193 | + 'no' => array( |
|
| 194 | + 'no' => '/js/common/md5.js', |
|
| 195 | + 'min' => '/js/common/md5.js', |
|
| 196 | + ), |
|
| 197 | + 'cdn' => array( |
|
| 198 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js', |
|
| 199 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js', |
|
| 200 | + ) |
|
| 201 | + ), |
|
| 202 | + JS_JCROP => array( |
|
| 203 | + 'no' => array( |
|
| 204 | + 'no' => '/js/common/jquery.Jcrop.min.js', |
|
| 205 | + 'min' => '/js/common/jquery.Jcrop.min.js' |
|
| 206 | + ), |
|
| 207 | + 'cdn' => array( |
|
| 208 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.12/js/jquery.Jcrop.min.js', |
|
| 209 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.12/js/jquery.Jcrop.min.js' |
|
| 210 | + ) |
|
| 211 | + ), |
|
| 212 | + JS_TYPEAHEAD => array( |
|
| 213 | + 'no' => array( |
|
| 214 | + 'no' => '/js/common/typeahead.bundle.js', |
|
| 215 | + 'min' => '/js/common/typeahead.bundle.min.js' |
|
| 216 | + ), |
|
| 217 | + 'cdn' => array( |
|
| 218 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.js', |
|
| 219 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js' |
|
| 220 | + ) |
|
| 221 | + ), |
|
| 222 | + JS_FLIPSIDE => array( |
|
| 223 | + 'no' => array( |
|
| 224 | + 'no' => '/js/common/flipside.js', |
|
| 225 | + 'min' => '/js/common/flipside.min.js' |
|
| 226 | + ), |
|
| 227 | + 'cdn' => array( |
|
| 228 | + 'no' => '/js/common/flipside.js', |
|
| 229 | + 'min' => '/js/common/flipside.min.js' |
|
| 230 | + ) |
|
| 231 | + ), |
|
| 232 | + JS_LOGIN => array( |
|
| 233 | + 'no' => array( |
|
| 234 | + 'no' => '/js/common/login.js', |
|
| 235 | + 'min' => '/js/common/login.min.js' |
|
| 236 | + ), |
|
| 237 | + 'cdn' => array( |
|
| 238 | + 'no' => '/js/common/login.js', |
|
| 239 | + 'min' => '/js/common/login.min.js' |
|
| 240 | + ) |
|
| 241 | + ) |
|
| 242 | 242 | ); |
| 243 | 243 | |
| 244 | 244 | global $cssArray; |
| 245 | 245 | $cssArray = array( |
| 246 | 246 | CSS_JQUERY_UI => array( |
| 247 | 247 | 'no' => array( |
| 248 | - 'no' => '/css/common/jquery-ui.css', |
|
| 249 | - 'min' => '/css/common/jquery-ui.min.css' |
|
| 250 | - ), |
|
| 251 | - 'cdn' => array( |
|
| 252 | - 'no' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css', |
|
| 253 | - 'min' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css' |
|
| 254 | - ) |
|
| 248 | + 'no' => '/css/common/jquery-ui.css', |
|
| 249 | + 'min' => '/css/common/jquery-ui.min.css' |
|
| 250 | + ), |
|
| 251 | + 'cdn' => array( |
|
| 252 | + 'no' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css', |
|
| 253 | + 'min' => '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css' |
|
| 254 | + ) |
|
| 255 | 255 | ), |
| 256 | 256 | CSS_BOOTSTRAP => array( |
| 257 | - 'no' => array( |
|
| 258 | - 'no' => '/css/common/bootstrap.css', |
|
| 259 | - 'min' => '/css/common/bootstrap.min.css' |
|
| 260 | - ), |
|
| 261 | - 'cdn' => array( |
|
| 262 | - 'no' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css', |
|
| 263 | - 'min' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' |
|
| 264 | - ) |
|
| 257 | + 'no' => array( |
|
| 258 | + 'no' => '/css/common/bootstrap.css', |
|
| 259 | + 'min' => '/css/common/bootstrap.min.css' |
|
| 260 | + ), |
|
| 261 | + 'cdn' => array( |
|
| 262 | + 'no' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css', |
|
| 263 | + 'min' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' |
|
| 264 | + ) |
|
| 265 | 265 | ), |
| 266 | 266 | CSS_BOOTSTRAP_FH => array( |
| 267 | 267 | 'no' => array( |
| 268 | - 'no' => '/css/common/bootstrap-formhelpers.css', |
|
| 269 | - 'min' => '/css/common/bootstrap-formhelpers.min.css' |
|
| 270 | - ), |
|
| 271 | - 'cdn' => array( |
|
| 272 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/css/bootstrap-formhelpers.css', |
|
| 273 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/css/bootstrap-formhelpers.min.css' |
|
| 274 | - ) |
|
| 268 | + 'no' => '/css/common/bootstrap-formhelpers.css', |
|
| 269 | + 'min' => '/css/common/bootstrap-formhelpers.min.css' |
|
| 270 | + ), |
|
| 271 | + 'cdn' => array( |
|
| 272 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/css/bootstrap-formhelpers.css', |
|
| 273 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-formhelpers/2.3.0/css/bootstrap-formhelpers.min.css' |
|
| 274 | + ) |
|
| 275 | 275 | ), |
| 276 | 276 | CSS_BOOTSTRAP_SW => array( |
| 277 | - 'no' => array( |
|
| 278 | - 'no' => '/css/common/bootstrap-switch.css', |
|
| 279 | - 'min' => '/css/common/bootstrap-switch.min.css' |
|
| 280 | - ), |
|
| 281 | - 'cdn' => array( |
|
| 282 | - 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.css', |
|
| 283 | - 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.min.css' |
|
| 284 | - ) |
|
| 277 | + 'no' => array( |
|
| 278 | + 'no' => '/css/common/bootstrap-switch.css', |
|
| 279 | + 'min' => '/css/common/bootstrap-switch.min.css' |
|
| 280 | + ), |
|
| 281 | + 'cdn' => array( |
|
| 282 | + 'no' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.css', |
|
| 283 | + 'min' => '//cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.min.css' |
|
| 284 | + ) |
|
| 285 | 285 | ), |
| 286 | 286 | CSS_DATATABLE => array( |
| 287 | 287 | 'no' => array( |
| 288 | - 'no' => '/css/common/jquery.dataTables.css', |
|
| 289 | - 'min' => '/css/common/jquery.dataTables.min.css' |
|
| 290 | - ), |
|
| 291 | - 'cdn' => array( |
|
| 292 | - 'no' => '//cdn.datatables.net/1.10.7/css/jquery.dataTables.css', |
|
| 293 | - 'min' => '//cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css' |
|
| 294 | - ) |
|
| 288 | + 'no' => '/css/common/jquery.dataTables.css', |
|
| 289 | + 'min' => '/css/common/jquery.dataTables.min.css' |
|
| 290 | + ), |
|
| 291 | + 'cdn' => array( |
|
| 292 | + 'no' => '//cdn.datatables.net/1.10.7/css/jquery.dataTables.css', |
|
| 293 | + 'min' => '//cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css' |
|
| 294 | + ) |
|
| 295 | 295 | ), |
| 296 | 296 | CSS_JCROP => array( |
| 297 | 297 | 'no' => array( |
@@ -30,32 +30,32 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | require_once('class.WebPage.php'); |
| 32 | 32 | |
| 33 | -define('JS_JQUERY', 0); |
|
| 34 | -define('JS_JQUERY_UI', 1); |
|
| 35 | -define('JS_BOOTSTRAP', 2); |
|
| 33 | +define('JS_JQUERY', 0); |
|
| 34 | +define('JS_JQUERY_UI', 1); |
|
| 35 | +define('JS_BOOTSTRAP', 2); |
|
| 36 | 36 | define('JQUERY_VALIDATE', 3); |
| 37 | -define('JQUERY_TOUCH', 4); |
|
| 38 | -define('JS_TINYNAV', 5); |
|
| 37 | +define('JQUERY_TOUCH', 4); |
|
| 38 | +define('JS_TINYNAV', 5); |
|
| 39 | 39 | define('JS_BOOTSTRAP_FH', 6); |
| 40 | 40 | define('JS_BOOTSTRAP_SW', 7); |
| 41 | -define('JS_DATATABLE', 8); |
|
| 42 | -define('JS_CHART', 9); |
|
| 43 | -define('JS_METISMENU', 10); |
|
| 44 | -define('JS_BOOTBOX', 11); |
|
| 41 | +define('JS_DATATABLE', 8); |
|
| 42 | +define('JS_CHART', 9); |
|
| 43 | +define('JS_METISMENU', 10); |
|
| 44 | +define('JS_BOOTBOX', 11); |
|
| 45 | 45 | define('JS_DATATABLE_ODATA', 12); |
| 46 | -define('JS_CRYPTO_MD5_JS', 13); |
|
| 47 | -define('JS_JCROP', 14); |
|
| 48 | -define('JS_TYPEAHEAD', 15); |
|
| 49 | -define('JS_FLIPSIDE', 20); |
|
| 50 | -define('JS_LOGIN', 21); |
|
| 51 | - |
|
| 52 | -define('CSS_JQUERY_UI', 0); |
|
| 53 | -define('CSS_BOOTSTRAP', 1); |
|
| 46 | +define('JS_CRYPTO_MD5_JS', 13); |
|
| 47 | +define('JS_JCROP', 14); |
|
| 48 | +define('JS_TYPEAHEAD', 15); |
|
| 49 | +define('JS_FLIPSIDE', 20); |
|
| 50 | +define('JS_LOGIN', 21); |
|
| 51 | + |
|
| 52 | +define('CSS_JQUERY_UI', 0); |
|
| 53 | +define('CSS_BOOTSTRAP', 1); |
|
| 54 | 54 | define('CSS_BOOTSTRAP_FH', 2); |
| 55 | 55 | define('CSS_BOOTSTRAP_SW', 3); |
| 56 | -define('CSS_DATATABLE', 4); |
|
| 57 | -define('CSS_JCROP', 5); |
|
| 58 | -define('CSS_FONTAWESOME', 6); |
|
| 56 | +define('CSS_DATATABLE', 4); |
|
| 57 | +define('CSS_JCROP', 5); |
|
| 58 | +define('CSS_FONTAWESOME', 6); |
|
| 59 | 59 | |
| 60 | 60 | global $jsArray; |
| 61 | 61 | $jsArray = array( |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | * |
| 350 | 350 | * @SuppressWarnings("StaticAccess") |
| 351 | 351 | */ |
| 352 | - function __construct($title, $header=true) |
|
| 352 | + function __construct($title, $header = true) |
|
| 353 | 353 | { |
| 354 | 354 | parent::__construct($title); |
| 355 | 355 | $this->setupVars(); |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | * |
| 448 | 448 | * @deprecated 2.0.0 Please use addJSByURI() instead |
| 449 | 449 | */ |
| 450 | - function add_js_from_src($src, $async=true) |
|
| 450 | + function add_js_from_src($src, $async = true) |
|
| 451 | 451 | { |
| 452 | 452 | $this->addJSByURI($src, $async); |
| 453 | 453 | } |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | * @param string $uri The webpath to the JavaScript file |
| 459 | 459 | * @param boolean $async Can the JavaScript be loaded asynchronously? |
| 460 | 460 | */ |
| 461 | - public function addJSByURI($uri, $async=true) |
|
| 461 | + public function addJSByURI($uri, $async = true) |
|
| 462 | 462 | { |
| 463 | 463 | $attributes = array('src'=>$uri, 'type'=>'text/javascript'); |
| 464 | 464 | if($async === true) |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | * |
| 480 | 480 | * @deprecated 2.0.0 Please use addCSSByURI() instead |
| 481 | 481 | */ |
| 482 | - function add_css_from_src($src, $import=false) |
|
| 482 | + function add_css_from_src($src, $import = false) |
|
| 483 | 483 | { |
| 484 | 484 | $this->addCSSByURI($src, $import); |
| 485 | 485 | } |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | * @param string $src The webpath to the Cascading Style Sheet file |
| 491 | 491 | * @param boolean $async Can the CSS be loaded asynchronously? |
| 492 | 492 | */ |
| 493 | - public function addCSSByURI($uri, $async=false) |
|
| 493 | + public function addCSSByURI($uri, $async = false) |
|
| 494 | 494 | { |
| 495 | 495 | $attributes = array('rel'=>'stylesheet', 'href'=>$uri, 'type'=>'text/css'); |
| 496 | 496 | if($async === true && $this->importSupport === true) |
@@ -509,12 +509,12 @@ discard block |
||
| 509 | 509 | * |
| 510 | 510 | * @deprecated 2.0.0 Please use addWellKnownJS() instead |
| 511 | 511 | */ |
| 512 | - function addJS($type, $async=true) |
|
| 512 | + function addJS($type, $async = true) |
|
| 513 | 513 | { |
| 514 | 514 | $this->addWellKnownJS($type, $async); |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | - function add_js($type, $async=true) |
|
| 517 | + function add_js($type, $async = true) |
|
| 518 | 518 | { |
| 519 | 519 | $this->addWellKnownJS($type, $async); |
| 520 | 520 | } |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | * @param string $jsFileID the ID of the JS file |
| 526 | 526 | * @param boolean $async Can the JS file be loaded asynchronously? |
| 527 | 527 | */ |
| 528 | - public function addWellKnownJS($jsFileID, $async=true) |
|
| 528 | + public function addWellKnownJS($jsFileID, $async = true) |
|
| 529 | 529 | { |
| 530 | 530 | global $jsArray; |
| 531 | 531 | $this->setupVars(); |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | * |
| 542 | 542 | * @deprecated 2.0.0 Please use addWellKnownCSS() instead |
| 543 | 543 | */ |
| 544 | - function add_css($type, $import=false) |
|
| 544 | + function add_css($type, $import = false) |
|
| 545 | 545 | { |
| 546 | 546 | $this->addWellKnownCSS($type, $import); |
| 547 | 547 | } |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | * @param string $cssFileID the ID of the CSS file |
| 553 | 553 | * @param boolean $async Can the CSS file be loaded asynchronously? |
| 554 | 554 | */ |
| 555 | - public function addWellKnownCSS($cssFileID, $async=true) |
|
| 555 | + public function addWellKnownCSS($cssFileID, $async = true) |
|
| 556 | 556 | { |
| 557 | 557 | global $cssArray; |
| 558 | 558 | $this->setupVars(); |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | $ret = ''; |
| 578 | 578 | foreach($names as $name) |
| 579 | 579 | { |
| 580 | - $ret.='<li>'.$this->createLink($name, $sites[$name]).'</li>'; |
|
| 580 | + $ret .= '<li>'.$this->createLink($name, $sites[$name]).'</li>'; |
|
| 581 | 581 | } |
| 582 | 582 | return $ret; |
| 583 | 583 | } |
@@ -597,14 +597,14 @@ discard block |
||
| 597 | 597 | { |
| 598 | 598 | $ret = '<li class="dropdown">'; |
| 599 | 599 | $href = $this->getHrefForDropdown($link); |
| 600 | - $ret.= '<a href="'.$href.'" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">'.$name.' <span class="caret"></span></a>'; |
|
| 601 | - $ret.='<ul class="dropdown-menu">'; |
|
| 600 | + $ret .= '<a href="'.$href.'" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">'.$name.' <span class="caret"></span></a>'; |
|
| 601 | + $ret .= '<ul class="dropdown-menu">'; |
|
| 602 | 602 | $subNames = array_keys($link); |
| 603 | 603 | foreach($subNames as $subName) |
| 604 | 604 | { |
| 605 | - $ret.=$this->getLinkByName($subName, $link); |
|
| 605 | + $ret .= $this->getLinkByName($subName, $link); |
|
| 606 | 606 | } |
| 607 | - $ret.='</ul></li>'; |
|
| 607 | + $ret .= '</ul></li>'; |
|
| 608 | 608 | return $ret; |
| 609 | 609 | } |
| 610 | 610 | |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | $ret = ''; |
| 628 | 628 | foreach($names as $name) |
| 629 | 629 | { |
| 630 | - $ret.=$this->getLinkByName($name, $this->links); |
|
| 630 | + $ret .= $this->getLinkByName($name, $this->links); |
|
| 631 | 631 | } |
| 632 | 632 | return $ret; |
| 633 | 633 | } |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | { |
| 640 | 640 | $sites = $this->getSiteLinksForHeader(); |
| 641 | 641 | $links = $this->getLinksMenus(); |
| 642 | - $header ='<nav class="navbar navbar-default navbar-fixed-top"> |
|
| 642 | + $header = '<nav class="navbar navbar-default navbar-fixed-top"> |
|
| 643 | 643 | <div class="container-fluid"> |
| 644 | 644 | <!-- Brand and toggle get grouped for better mobile display --> |
| 645 | 645 | <div class="navbar-header"> |
@@ -668,7 +668,7 @@ discard block |
||
| 668 | 668 | </div> |
| 669 | 669 | </nav>'; |
| 670 | 670 | $this->body = $header.$this->body; |
| 671 | - $this->body_tags.='style="padding-top: 60px;"'; |
|
| 671 | + $this->body_tags .= 'style="padding-top: 60px;"'; |
|
| 672 | 672 | } |
| 673 | 673 | |
| 674 | 674 | /** Notification that is green for success */ |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | * |
| 690 | 690 | * @deprecated 2.0.0 Use the addNotification function instead |
| 691 | 691 | */ |
| 692 | - function add_notification($msg, $sev=self::NOTIFICATION_INFO, $dismissible=1) |
|
| 692 | + function add_notification($msg, $sev = self::NOTIFICATION_INFO, $dismissible = 1) |
|
| 693 | 693 | { |
| 694 | 694 | $notice = array('msg'=>$msg, 'sev'=>$sev, 'dismissible'=>$dismissible); |
| 695 | 695 | array_push($this->notifications, $notice); |
@@ -702,7 +702,7 @@ discard block |
||
| 702 | 702 | * @param string $sevity The severity of the notifcation |
| 703 | 703 | * @param boolean $dismissible Can the user dismiss the notificaton? |
| 704 | 704 | */ |
| 705 | - public function addNotification($message, $severity=self::NOTIFICATION_INFO, $dismissible=true) |
|
| 705 | + public function addNotification($message, $severity = self::NOTIFICATION_INFO, $dismissible = true) |
|
| 706 | 706 | { |
| 707 | 707 | array_push($this->notifications, array('msg'=>$message, 'sev'=>$severity, 'dismissible'=>$dismissible)); |
| 708 | 708 | } |
@@ -740,10 +740,10 @@ discard block |
||
| 740 | 740 | break; |
| 741 | 741 | } |
| 742 | 742 | $style = ''; |
| 743 | - if($i+1 < count($this->notifications)) |
|
| 743 | + if($i + 1 < count($this->notifications)) |
|
| 744 | 744 | { |
| 745 | 745 | //Not the last notification, remove the end margin |
| 746 | - $style='style="margin: 0px;"'; |
|
| 746 | + $style = 'style="margin: 0px;"'; |
|
| 747 | 747 | } |
| 748 | 748 | $this->body = ' |
| 749 | 749 | <div class="'.$class.'" role="alert" '.$style.'> |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | * @param boolean $header Draw the header |
| 794 | 794 | * @param boolean $analytics Include analytics on the page |
| 795 | 795 | */ |
| 796 | - public function printPage($header=true) |
|
| 796 | + public function printPage($header = true) |
|
| 797 | 797 | { |
| 798 | 798 | $this->renderNotifications(); |
| 799 | 799 | $this->addNoScript(); |
@@ -814,7 +814,7 @@ discard block |
||
| 814 | 814 | * |
| 815 | 815 | * @deprecated 1.0.0 Use addLink instead |
| 816 | 816 | */ |
| 817 | - function add_link($name, $url=false, $submenu=false) |
|
| 817 | + function add_link($name, $url = false, $submenu = false) |
|
| 818 | 818 | { |
| 819 | 819 | $this->addLink($name, $url, $submenu); |
| 820 | 820 | } |
@@ -826,7 +826,7 @@ discard block |
||
| 826 | 826 | * @param false|string $url The URL to link to |
| 827 | 827 | * @param false|array $subment Any submenu items for the dropdown |
| 828 | 828 | */ |
| 829 | - public function addLink($name, $url=false, $submenu=false) |
|
| 829 | + public function addLink($name, $url = false, $submenu = false) |
|
| 830 | 830 | { |
| 831 | 831 | if(is_array($submenu)) |
| 832 | 832 | { |
@@ -204,7 +204,7 @@ |
||
| 204 | 204 | |
| 205 | 205 | static function deleteSessionById($sid) |
| 206 | 206 | { |
| 207 | - return unlink(ini_get('session.save_path').'/sess_'.$sid); |
|
| 207 | + return unlink(ini_get('session.save_path').'/sess_'.$sid); |
|
| 208 | 208 | } |
| 209 | 209 | } |
| 210 | 210 | /* vim: set tabstop=4 shiftwidth=4 expandtab: */ |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $len = $pos - $offset; |
| 158 | 158 | $name = substr($sessionData, $offset, $len); |
| 159 | 159 | if($name === false) break; |
| 160 | - $offset += $len+1; |
|
| 160 | + $offset += $len + 1; |
|
| 161 | 161 | $data = @unserialize(substr($sessionData, $offset)); |
| 162 | 162 | $res[$name] = $data; |
| 163 | 163 | $offset += strlen(serialize($data)); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | else |
| 186 | 186 | { |
| 187 | 187 | $tmp = FlipSession::unserializePhpSession($sessionData); |
| 188 | - $tmp['sid' ] = $sessionId; |
|
| 188 | + $tmp['sid'] = $sessionId; |
|
| 189 | 189 | array_push($res, $tmp); |
| 190 | 190 | } |
| 191 | 191 | } |
@@ -247,15 +247,15 @@ |
||
| 247 | 247 | */ |
| 248 | 248 | protected function printIeCompatability($prefix='') |
| 249 | 249 | { |
| 250 | - //IE 8 doesn't support HTML 5. Install the shim... |
|
| 251 | - if($this->getBrowserMajorVer() < 9) |
|
| 252 | - { |
|
| 253 | - echo $prefix.'<script src="js/html5.js"></script>'; |
|
| 254 | - echo "\n"; |
|
| 255 | - } |
|
| 256 | - //Tell the browser not to use compatability mode... |
|
| 257 | - echo $prefix.'<meta http-equiv="X-UA-Compatible" content="IE=edge"/>'; |
|
| 258 | - echo "\n"; |
|
| 250 | + //IE 8 doesn't support HTML 5. Install the shim... |
|
| 251 | + if($this->getBrowserMajorVer() < 9) |
|
| 252 | + { |
|
| 253 | + echo $prefix.'<script src="js/html5.js"></script>'; |
|
| 254 | + echo "\n"; |
|
| 255 | + } |
|
| 256 | + //Tell the browser not to use compatability mode... |
|
| 257 | + echo $prefix.'<meta http-equiv="X-UA-Compatible" content="IE=edge"/>'; |
|
| 258 | + echo "\n"; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $browserName = $this->getBrowserName(); |
| 61 | 61 | if($browserName === 'IE' && $this->getBrowserMajorVer() <= 7) |
| 62 | 62 | { |
| 63 | - header( 'Location: /badbrowser.php' ) ; |
|
| 63 | + header('Location: /badbrowser.php'); |
|
| 64 | 64 | } |
| 65 | 65 | else if($browserName === 'Chrome' && $this->getBrowserMajorVer() >= 36) |
| 66 | 66 | { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | private function getBrowser() |
| 91 | 91 | { |
| 92 | - static $browser;//No accident can arise from depending on an unset variable. |
|
| 92 | + static $browser; //No accident can arise from depending on an unset variable. |
|
| 93 | 93 | if(!isset($browser)) |
| 94 | 94 | { |
| 95 | 95 | $browser = $this->browscap->getBrowser(); |
@@ -190,16 +190,16 @@ discard block |
||
| 190 | 190 | * |
| 191 | 191 | * @return string The tag as a string |
| 192 | 192 | */ |
| 193 | - protected function createOpenTag($tagName, $attribs=array(), $selfClose=false) |
|
| 193 | + protected function createOpenTag($tagName, $attribs = array(), $selfClose = false) |
|
| 194 | 194 | { |
| 195 | 195 | $tag = '<'.$tagName; |
| 196 | 196 | $attribNames = array_keys($attribs); |
| 197 | 197 | foreach($attribNames as $attribName) |
| 198 | 198 | { |
| 199 | - $tag.=' '.$attribName; |
|
| 199 | + $tag .= ' '.$attribName; |
|
| 200 | 200 | if($attribs[$attribName]) |
| 201 | 201 | { |
| 202 | - $tag.='="'.$attribs[$attribName].'"'; |
|
| 202 | + $tag .= '="'.$attribs[$attribName].'"'; |
|
| 203 | 203 | } |
| 204 | 204 | } |
| 205 | 205 | if($selfClose) |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | * |
| 230 | 230 | * @return string The link |
| 231 | 231 | */ |
| 232 | - public function createLink($linkName, $linkTarget='#') |
|
| 232 | + public function createLink($linkName, $linkTarget = '#') |
|
| 233 | 233 | { |
| 234 | 234 | $startTag = $this->createOpenTag('a', array('href'=>$linkTarget)); |
| 235 | 235 | $endTag = $this->createCloseTag('a'); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | * |
| 246 | 246 | * @param string $prefix The prefix to append to each line |
| 247 | 247 | */ |
| 248 | - protected function printIeCompatability($prefix='') |
|
| 248 | + protected function printIeCompatability($prefix = '') |
|
| 249 | 249 | { |
| 250 | 250 | //IE 8 doesn't support HTML 5. Install the shim... |
| 251 | 251 | if($this->getBrowserMajorVer() < 9) |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | * |
| 264 | 264 | * @param string $prefix The prefix to append to each line |
| 265 | 265 | */ |
| 266 | - protected function printHead($prefix='') |
|
| 266 | + protected function printHead($prefix = '') |
|
| 267 | 267 | { |
| 268 | 268 | echo $prefix.'<HEAD>'; |
| 269 | 269 | if($this->getBrowserName() === 'IE') |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | * |
| 285 | 285 | * @param string $prefix The prefix to append to each line |
| 286 | 286 | */ |
| 287 | - protected function printBody($prefix='') |
|
| 287 | + protected function printBody($prefix = '') |
|
| 288 | 288 | { |
| 289 | 289 | echo $prefix.'<BODY '.$this->body_tags.'>'; |
| 290 | 290 | echo $prefix.$prefix.$this->body."\n"; |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | { |
| 322 | 322 | $requestURI = substr($requestURI, 1); |
| 323 | 323 | } |
| 324 | - return 'http'.(isset($_SERVER['HTTPS'])?'s':'').'://'.$_SERVER['HTTP_HOST'].'/'.$requestURI; |
|
| 324 | + return 'http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/'.$requestURI; |
|
| 325 | 325 | } |
| 326 | 326 | } |
| 327 | 327 | /* vim: set tabstop=4 shiftwidth=4 expandtab: */ |