Add the following to the top of your root file:
require_once('device_detect.php');
device_detect(false,false,false,false,false,false,false,'MOBILE URL or false if none','DESKTOP URL or false if none');
| <?php | |
| // Get Signed Request | |
| $signed_request = $_REQUEST['signed_request']; | |
| // Parse Signed Request | |
| function parsePageSignedRequest() { | |
| if(isset($_REQUEST['signed_request'])) { | |
| $encoded_sig = null; | |
| $payload = null; | |
| list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2); |
| SELECT *,(((acos(sin((".$latitude."*pi()/180)) * sin((`Latitude`*pi()/180))+cos((".$latitude."*pi()/180)) * cos((`Latitude`*pi()/180)) * cos(((".$longitude."- `Longitude`)*pi()/180))))*180/pi())*60*1.1515) as distance FROM `TABLE` HAVING distance <= ".$distance; |
| <?php | |
| // Configuration | |
| $myEmail = 'YOUR EMAIL HERE'; | |
| $error = ''; | |
| // To send HTML mail, the Content-type header must be set | |
| $headers = 'MIME-Version: 1.0' . "\r\n"; | |
| $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; | |
| // Additional headers |
| <?php | |
| class MCAPI { | |
| var $version = "1.3"; | |
| var $errorMessage; | |
| var $errorCode; | |
| /** | |
| * Cache the information on the API location on the server | |
| */ | |
| var $apiUrl; |
| <?php | |
| // Your twitter username. | |
| $username = "twitter user name"; | |
| // Prefix - Display something before the tweet | |
| $prefix = ""; | |
| // Suffix - Display something after the tweet | |
| $suffix = ""; | |
| <?php | |
| /* | |
| Plugin Name: Twitter Widget | |
| Plugin URI: http://labs.aliasproject.com/wp_twitter_widget | |
| Description: A simple widget for Wordpress that displays the most recent tweet of a twitter account | |
| Author: Michael Aguiar | |
| Version: 1.0 | |
| Author URI: http://cv.michaelaguiar.com | |
| */ | |
| <?php | |
| class Encryption { | |
| var $skey = 'UNIQUE KEY'; | |
| public function safe_b64encode($string) | |
| { | |
| $data = base64_encode($string); | |
| $data = str_replace(array('+','/','='),array('-','_',''),$data); | |
| return $data; | |
| } |
| $('SELECTOR').click(function(e) { | |
| e.preventDefault(); | |
| if(confirm("MESSAGE TO DISPLAY TO USER") === true) { | |
| window.location.href = $(this).attr('href'); | |
| } else { | |
| // User Cancelled | |
| } | |
| }); |
| php -i | grep php.ini |