Changeset 19706 for branches/version-2_5-dev/data/class/SC_Display.php
- Timestamp:
- 2010/12/03 12:29:57 (16 years ago)
- bzr:base-revision:
- [email protected]
- bzr:committer:
- Kentaro Ohkouchi <[email protected]>
- bzr:file-ids:
data/class/SC_Display.php 18986@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-E%2Fdata%2Fclass%2FSC_Display.php
data/mtb_constants_init.php 16505@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fmtb_constants_init.php
html/install/sql/create_table_mysql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_mysql.sql
html/install/sql/create_table_pgsql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_pgsql.sql
html/install/sql/drop_table.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fdrop_table.sql
html/install/sql/insert_data.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Finsert_data.sql- bzr:mapping-version:
- v4
- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- [email protected]
- bzr:revno:
- 2435
- bzr:revprop:branch-nick:
- branches/version-2_5-dev
- bzr:root:
- branches/version-2_5-dev
- bzr:timestamp:
- 2010-12-03 12:29:53.193000078 +0900
- bzr:user-agent:
- bzr2.2.1+bzr-svn1.0.4
- svn:original-date:
- 2010-12-03T03:29:53.193000Z
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_Display.php
r19705 r19706 45 45 * const('MOBILE',1); 46 46 * const('SMARTPHONE',2); 47 * const('PC', 4);48 * const('ADMIN', 8);47 * const('PC',10); 48 * const('ADMIN',99); 49 49 */ 50 50 … … 72 72 function prepare($page, $is_admin = false){ 73 73 if(!$this->deviceSeted || !is_null($this->view)){ 74 $device = ($is_admin) ? 8: $this->detectDevice();74 $device = ($is_admin) ? DEVICE_TYPE_ADMIN : $this->detectDevice(); 75 75 $this->setDevice($device); 76 76 } … … 112 112 * Enter description here ... 113 113 */ 114 function setDevice($device =4){114 function setDevice($device = DEVICE_TYPE_PC){ 115 115 116 116 switch ($device){ 117 case 1:117 case DEVICE_TYPE_MOBILE: 118 118 $this->response->setContentType("text/html"); 119 119 $this->setView(new SC_MobileView()); 120 120 break; 121 case 2:121 case DEVICE_TYPE_SMARTPHONE: 122 122 $this->setView(new SC_SmartphoneView()); 123 123 break; 124 case 4:124 case DEVICE_TYPE_PC: 125 125 $this->setView(new SC_SiteView()); 126 126 break; 127 case 8:127 case DEVICE_TYPE_ADMIN: 128 128 $this->setView(new SC_AdminView()); 129 129 } … … 142 142 * SC_Display::MOBILE = ガラケー = 1 143 143 * SC_Display::SMARTPHONE = スマホ = 2 144 * SC_Display::PC = PC = 4144 * SC_Display::PC = PC = 10 145 145 * ※PHP4の為にconstは使っていません。 1がガラケーで、2がスマホで4がPCです。 146 146 * @return … … 151 151 $retDevice = 0; 152 152 if($nu->isMobile()){ 153 $retDevice = 1;153 $retDevice = DEVICE_TYPE_MOBILE; 154 154 }elseif ($su->isSmartphone()){ 155 $retDevice = 2;155 $retDevice = DEVICE_TYPE_SMARTPHONE; 156 156 }else{ 157 $retDevice = 4;157 $retDevice = DEVICE_TYPE_PC; 158 158 } 159 159
Note: See TracChangeset
for help on using the changeset viewer.
