Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if(!isset($_COOKIE['handshow'])){ ?>
- <script type="text/javascript" src="static/js/exit.js"></script>
- <script type="text/javascript" src="static/js/exit2.js"></script>
- <?php if($lang=="en"){ ?>
- <div style="display: none; padding: 10px;" id="exit_content">
- <img src="images/stop.png"><br /><br />
- <h11>Do you really want to leave our website ?</h11><br><br>
- <h11>Click to close window,</h11><br><br>
- <h11>to stay on our website.</h11><br>
- </div>
- <?php }elseif($lang=="ru"){ ?>
- <div style="display: none; padding: 10px;" id="exit_content">
- <img src="images/stop.png"><br /><br />
- <h11>Вы действительно хотите покинуть наш сайт ?</h11><br><br>
- <h11>Нажмите закрыть окно,</h11><br><br>
- <h11>чтоб остаться на нашем сайте.</h11><br>
- </div>
- <?php }elseif($lang=="ua"){ ?>
- <div style="display: none; padding: 10px;" id="exit_content">
- <img src="images/stop.png"><br /><br />
- <h11>Ви дійсно хочете залишити наш веб-сайт ?</h11><br><br>
- <h11>Натисніть закрити вікно,</h11><br><br>
- <h11>щоб залишитись на нашому сайті.</h11><br>
- </div>
- <?php }elseif($lang=="de"){ ?>
- <div style="display: none; padding: 10px;" id="exit_content">
- <img src="images/stop.png"><br /><br />
- <h11>DO YOU REALLY WANT TO LEAVE OUR WEBSITE ?</h11><br><br>
- <h11>CLICK TO CLOSE WINDOW,</h11><br><br>
- <h11>TO STAY ON OUR WEBSITE.</h11><br>
- </div>
- <?php }} ?>
- var is_showed = false;
- $(document).ready(function() {
- $(document).mousemove(function(e) {
- if(e.pageY <= 10 && is_showed == false)
- {
- is_showed = true;
- var date = new Date( new Date().getTime() + 60*60*24*30*1000 );
- setCookie("handshow", 1, { expires: date.toUTCString() });
- $('#exit_content').modal({onOpen: modalOpen, onClose: simplemodal_close});
- }
- });
- });
- function modalOpen (dialog) {
- dialog.overlay.fadeIn('fast', function () {
- dialog.container.fadeIn('fast', function () {
- dialog.data.hide().slideDown('fast');
- });
- });
- }
- function simplemodal_close (dialog) {
- dialog.data.fadeOut('fast', function () {
- dialog.container.hide('fast', function () {
- dialog.overlay.slideUp('fast', function () {
- $.modal.close();
- });
- });
- });
- }
- function setCookie(name, value, options)
- {
- options = options || {};
- var expires = options.expires;
- if (typeof expires == "number" && expires) {
- var d = new Date();
- d.setTime(d.getTime() + expires*1000);
- expires = options.expires = d;
- }
- if (expires && expires.toUTCString) {
- options.expires = expires.toUTCString();
- }
- value = encodeURIComponent(value);
- var updatedCookie = name + "=" + value;
- for(var propName in options) {
- updatedCookie += "; " + propName;
- var propValue = options[propName];
- if (propValue !== true) {
- updatedCookie += "=" + propValue;
- }
- }
- document.cookie = updatedCookie;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement