This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function($, window, document, undefined) { | |
| $.fn.lazyload = function(options) { | |
| var $window = $(window), | |
| elements = this, | |
| settings = { | |
| threshold : 0, | |
| fadein_speed : "200", | |
| container : window, | |
| data_attribute : "src", | |
| appear : null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (array_key_exists("lang", $_COOKIE)) | |
| { | |
| $view->lang = $_COOKIE['lang']; | |
| } | |
| else | |
| { | |
| $lang = (substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) === "ja")? 'ja' : 'en'; | |
| setcookie("lang", $lang, 0, "/"); | |
| $view->lang = "ja"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ////////////////////// public_html/controllers/IndexController ////////////////////// | |
| <?php | |
| class IndexController extends Zend_Controller_Action | |
| { | |
| public function loadTemplate($name) | |
| { | |
| if (!array_key_exists("isAjax", $_POST)) | |
| { | |
| $this->view->action = $name; | |
| $this->_forward('container'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var domain = (location.origin)? location.origin : (location.protocol + "//" + location.host); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -moz-transition-property: all; | |
| -webkit-transition-property: all; | |
| -o-transition-property: all; | |
| transition-property: all; | |
| -moz-transition-timing-function: cubic-bezier(0,1,.9,1); | |
| -webkit-transition-timing-function: cubic-bezier(0,1,.9,1); | |
| -o-transition-timing-function: cubic-bezier(0,1,.9,1); | |
| transition-timing-function: cubic-bezier(0,1,.9,1); | |
| -moz-transition-duration: .3s; | |
| -webkit-transition-duration: .3s; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!window.requestAnimationFrame) { | |
| window.requestAnimationFrame = (function() { | |
| return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { | |
| window.setTimeout(callback, 1000 / 60); | |
| }; | |
| })(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //html | |
| <div class="uiTabList clearfix"> | |
| <p class="nav"> | |
| <a href="javascript: void 0;" onclick="_self.changeTab(this);" class="active">Menu Title 1</a> | |
| <a href="javascript: void 0;" onclick="_self.changeTab(this);">Menu Title 2</a> | |
| </p> | |
| <div class="tabs"> | |
| <div class="tab active"> | |
| </div> | |
| <div class="tab"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isValidInetAddress($data) | |
| { | |
| $regex = '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i'; | |
| if (preg_match($regex, trim($data), $matches)) | |
| { | |
| return array($matches[1], $matches[2]); | |
| } | |
| else | |
| { | |
| return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function escapeAllInArray($array) | |
| { | |
| foreach ($array as $key => $value) | |
| { | |
| $array[$key] = htmlspecialchars($value, ENT_QUOTES, $charset); | |
| } | |
| return $array; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.event.add(window, "load", function() | |
| { | |
| }); |