mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
이름 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
946c14cc4f
commit
9913ffca17
4 changed files with 36 additions and 32 deletions
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
class iphoneXE {
|
||||
class smartphoneXE {
|
||||
var $module_info = null;
|
||||
var $content = null;
|
||||
var $oModule = null;
|
||||
var $menuList = null;
|
||||
|
||||
function isFromIPhone()
|
||||
function isFromSmartPhone()
|
||||
{
|
||||
$userAgent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$iphoneForce = Context::get('iphone');
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
static $instance = null;
|
||||
if($instnace == null)
|
||||
{
|
||||
$instance = new iphoneXE();
|
||||
$instance = new smartphoneXE();
|
||||
return $instance;
|
||||
}
|
||||
}
|
||||
|
|
@ -37,14 +37,14 @@
|
|||
$this->module_info = $module_info;
|
||||
}
|
||||
|
||||
function procIPhone()
|
||||
function procSmartPhone()
|
||||
{
|
||||
if(!$this->module_info) return;
|
||||
$oModule =& getModule($this->module_info->module, 'iphone');
|
||||
if(!$oModule || !method_exists($oModule, 'procIPhone') ) return;
|
||||
$oModule =& getModule($this->module_info->module, 'smartphone');
|
||||
if(!$oModule || !method_exists($oModule, 'procSmartPhone') ) return;
|
||||
$vars = get_object_vars($this->oModule);
|
||||
if(count($vars)) foreach($vars as $key => $val) $oModule->{$key} = $val;
|
||||
return $oModule->procIPhone($this);
|
||||
return $oModule->procSmartPhone($this);
|
||||
}
|
||||
|
||||
function getAllItems(&$menu_list, $node_srl = 0, $node_text= "Main Menu")
|
||||
|
|
@ -86,17 +86,17 @@
|
|||
$act = Context::get('act');
|
||||
if($act)
|
||||
{
|
||||
$content = $this->procIPhone();
|
||||
$content = $this->procSmartPhone();
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::set('module_info', $this->module_info);
|
||||
$this->setMenu();
|
||||
$oModule =& getModule($this->module_info->module, 'iphone');
|
||||
if($oModule && method_exists($oModule, 'procIPhone') ) Context::set('bHavePhoneMethod', true);
|
||||
$oModule =& getModule($this->module_info->module, 'smartphone');
|
||||
if($oModule && method_exists($oModule, 'procSmartPhone') ) Context::set('bHavePhoneMethod', true);
|
||||
$oTemplate = new TemplateHandler();
|
||||
$oContext = &Context::getInstance();
|
||||
$content = $oTemplate->compile(_XE_PATH_."addons/iphone/tpl", "layout");
|
||||
$content = $oTemplate->compile(_XE_PATH_."addons/smartphone/tpl", "layout");
|
||||
}
|
||||
print $content;
|
||||
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?PHP
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
if(Context::get('module')=='admin') return;
|
||||
|
||||
if($called_position != 'before_module_proc' && $called_position != 'after_module_proc' ) return;
|
||||
|
||||
require_once(_XE_PATH_.'addons/iphone/classes/iphone.class.php');
|
||||
if(!iphoneXE::isFromIPhone())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$iphoneXE = &iphoneXE::getInstance();
|
||||
$iphoneXE->setModuleInfo($this->module_info);
|
||||
$iphoneXE->setModuleInstance($this);
|
||||
$iphoneXE->display();
|
||||
?>
|
||||
22
addons/smartphone/smartphone.addon.php
Normal file
22
addons/smartphone/smartphone.addon.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?PHP
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
if(Context::get('module')=='admin') return;
|
||||
|
||||
if($called_position != 'before_module_proc' && $called_position != 'after_module_proc' ) return;
|
||||
|
||||
require_once(_XE_PATH_.'addons/smartphone/classes/smartphone.class.php');
|
||||
debugPrint("here");
|
||||
if(!smartphoneXE::isFromSmartPhone())
|
||||
{
|
||||
debugPrint("here");
|
||||
return;
|
||||
}
|
||||
debugPrint("here");
|
||||
|
||||
|
||||
$oSmartphoneXE = &smartphoneXE::getInstance();
|
||||
$oSmartphoneXE->setModuleInfo($this->module_info);
|
||||
$oSmartphoneXE->setModuleInstance($this);
|
||||
$oSmartphoneXE->display();
|
||||
?>
|
||||
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
|
||||
|
||||
<title>{Context::getBrowserTitle()}</title>
|
||||
<link rel="stylesheet" type="text/css" href="/addons/iphone/iui/iui.css" />
|
||||
<script type="application/x-javascript" src="/addons/iphone/iui/iuix.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/addons/smartphone/iui/iui.css" />
|
||||
<script type="application/x-javascript" src="/addons/smartphone/iui/iuix.js"></script>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var current_url = "{$current_url}";
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<!--@if($bHavePhoneMethod)-->
|
||||
<li><a href="{getUrl('act','default')}">View</a>
|
||||
<!--@else-->
|
||||
<li>이 모듈은 IphoneView를 지원하지 않습니다.</li>
|
||||
<li>이 모듈은 smartphoneView를 지원하지 않습니다.</li>
|
||||
<!--@end-->
|
||||
<li><a href="#menu0">Menu</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue