/**
 * 数値を数字絵文字に変換する。
 *
 * 入力が0〜9ではない場合、または、携帯端末からのアクセスではない場合は、
 * 入力を [ と ] で囲んだ文字列を返す。
 *
 * @param string $value 入力
 * @return string 出力
 */
function smarty_modifier_numeric_emoji($value)
{
    // 数字絵文字 (0〜9) の絵文字番号
    static $numeric_emoji_index = array('134', '125', '126', '127', '128', '129', '130', '131', '132', '133');
    if (SC_MobileUserAgent::isMobile() && isset($numeric_emoji_index[$value])) {
        return '[emoji:' . $numeric_emoji_index[$value] . ']';
    } else {
        return '[' . $value . ']';
    }
}
 /**
  * Page のプロセス。
  *
  * @return void
  */
 function process()
 {
     require_once CLASS_PATH . 'SC_MobileUserAgent.php';
     $objView = null;
     if (SC_MobileUserAgent::isMobile() && $this->adminPage == false) {
         $objView = new SC_InstallView(MOBILE_TEMPLATE_DIR, MOBILE_COMPILE_DIR);
     } elseif ($this->adminPage) {
         $objView = new SC_InstallView(TEMPLATE_ADMIN_DIR, COMPILE_ADMIN_DIR);
     } else {
         $objView = new SC_InstallView(TEMPLATE_DIR, COMPILE_DIR);
     }
     $this->tpl_error = "システムエラーが発生しました。<br />大変お手数ですが、サイト管理者までご連絡ください。";
     $objView->assignobj($this);
     $objView->display($this->flame);
 }
Esempio n. 3
0
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
$require_php_dir = realpath(dirname(__FILE__));
require_once $require_php_dir . "/define.php";
require_once $require_php_dir . HTML2DATA_DIR . "require_base.php";
// 携帯端末の場合は mobile 以下へリダイレクトする。
if (SC_MobileUserAgent::isMobile()) {
    $url = "";
    if (SC_Utils_Ex::sfIsHTTPS()) {
        $url = MOBILE_SSL_URL;
    } else {
        $url = MOBILE_SITE_URL;
    }
    if (preg_match('|^' . URL_DIR . '(.*)$|', $_SERVER['REQUEST_URI'], $matches)) {
        $path = $matches[1];
    } else {
        $path = '';
    }
    header("Location: " . SC_Utils_Ex::sfRmDupSlash($url . $path));
    exit;
}
Esempio n. 4
0
 /**
  * EC-CUBE がサポートする携帯キャリアかどうかを判別する。
  *
  * @return boolean 携帯端末ではない場合は true、それ以外の場合は false を返す。
  */
 function isNonMobile()
 {
     return !SC_MobileUserAgent::isMobile();
 }