SHARE
TWEET

freihat disable for mobile users

a guest Oct 31st, 2013 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $user_agent = strtolower ( $_SERVER['HTTP_USER_AGENT'] );
  4. if ( !preg_match ( "/phone|iphone|itouch|ipod|symbian|android|htc_|htc-|palmos|blackberry|opera mini|iemobile|windows ce|nokia|fennec|hiptop|kindle|mot |mot-|webos\/|samsung|sonyericsson|^sie-|nintendo/", $user_agent ) )
  5. {
  6.  
  7. ?>
  8.  
  9. <!--===========================FreiChatX=======START=========================-->
  10. <!--    For uninstalling ME , first remove/comment all FreiChatX related code i.e below code
  11.          Then remove FreiChatX tables frei_session & frei_chat if necessary
  12.          The best/recommended way is using the module for installation                         -->
  13.  
  14. <?php
  15.  
  16. if(isset($_SESSION["guid"])==true) {$ses=$_SESSION["guid"]; } else {$ses=0;}
  17. if(!function_exists("freichatx_get_hash")){
  18. function freichatx_get_hash($ses){
  19.  
  20.        if(is_file("/home/demyx.com/public_html/freichat/hardcode.php")){
  21.  
  22.                require "/home/demyx.com/public_html/freichat/hardcode.php";
  23.  
  24.                $temp_id =  $ses . $uid;
  25.  
  26.                return md5($temp_id);
  27.  
  28.        }
  29.        else
  30.        {
  31.                echo "<script>alert('module freichatx says: hardcode.php file not
  32. found!');</script>";
  33.        }
  34.  
  35.        return 0;
  36. }
  37. }
  38. ?><script type="text/javascript" language="javascipt"src="http://demyx.com/freichat/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>
  39.         <link rel="stylesheet" href="http://demyx.com/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
  40. <!--===========================FreiChatX=======END=========================-->
  41.  
  42. <?php } ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top