コード例 #1
0
ファイル: Mobile.class.php プロジェクト: kimkucheol/xe-core
 /**
  * Set mobile mode
  *
  * @param bool $ismobile
  * @return void
  */
 function setMobile($ismobile)
 {
     $oMobile = Mobile::getInstance();
     $oMobile->ismobile = $ismobile;
 }
コード例 #2
0
 /**
  * @brief mobile comment delete
  **/
 function triggerMobileexDeleteComment(&$comment)
 {
     $oMobileexModel =& getModel('mobileex');
     $oMobile =& Mobile::getInstance();
     $is_mobile = $oMobile->ismobile;
     $args = $comment;
     $output = $oMobileexModel->getMobileComment($args->comment_srl);
     if ($output->data) {
         executeQuery('mobileex.deleteMobileComment', $args);
     }
     return new Object();
 }
コード例 #3
0
ファイル: Mobile.class.php プロジェクト: jominhyun/rhymix
 /**
  * Detect mobile device by user agent
  *
  * @return bool Returns true on mobile device or false.
  */
 public static function isMobileCheckByAgent()
 {
     static $UACheck;
     if (isset($UACheck)) {
         return $UACheck;
     }
     $oMobile = Mobile::getInstance();
     $mobileAgent = array('iPod', 'iPhone', 'Android', 'BlackBerry', 'SymbianOS', 'Bada', 'Tizen', 'Kindle', 'Wii', 'SCH-', 'SPH-', 'CANU-', 'Windows Phone', 'Windows CE', 'POLARIS', 'Palm', 'Dorothy Browser', 'Mobile', 'Opera Mobi', 'Opera Mini', 'Minimo', 'AvantGo', 'NetFront', 'Nokia', 'LGPlayer', 'SonyEricsson', 'HTC');
     if ($oMobile->isMobilePadCheckByAgent()) {
         $UACheck = TRUE;
         return TRUE;
     }
     foreach ($mobileAgent as $agent) {
         if (stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE) {
             $UACheck = TRUE;
             return TRUE;
         }
     }
     $UACheck = FALSE;
     return FALSE;
 }