Changeset 717129
- Timestamp:
- 05/23/2013 06:57:43 AM (13 years ago)
- Location:
- soldpress/branches/0.9.5A
- Files:
-
- 2 edited
-
license.php (modified) (2 diffs)
-
single-sp_property.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
soldpress/branches/0.9.5A/license.php
r715843 r717129 1 1 2 2 <?php 3 4 5 // Our Intention here is not create a sophistcard licsening model. 6 // We a build a number of extention that will help enchance your delivery to end client. 7 // The plugin still does excatly what it is inteneded for. 8 $domain = "www.sanskript.com"; 9 10 //WP Function Like: get_option('stpopup-license');, Joomla! Function Like: $this->params->get('license');, OR $_POST['key'];. 11 //$licensekey = $_POST['key']; 3 4 function CheckLic(){ 5 6 $domain = "beta.sanskript.com"; 7 12 8 $licensekey = get_option('sp-license'); 13 9 //Must same with product registered stored on DataBase 14 10 $prod_id = "SOLDPRESS-BETA"; 15 11 16 if (substr($domain, 0, 4) == "www.") { $domain = substr($domain, 4);} 12 if (substr($domain, 0, 4) == "www.") { 13 $domain = substr($domain, 4); 14 } 17 15 $userip = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR']; 18 16 $validdir = dirname(__FILE__); … … 26 24 $key_info['product'] = $prod_id; 27 25 28 $serverurl = "http://www.sanskript.com/"; // Your Blog URL Where WLS Installed 26 $content = json_encode($key_info); 27 //var_dump($content); 29 28 $ch = curl_init(); 30 curl_setopt($ch, CURLOPT_URL, $serverurl."wp-content/plugins/wp-licensing/auth/verify.php"); 29 curl_setopt($ch, CURLOPT_URL,"http://www.sanskript.com/svc/twistoid/1/api/license"); 30 curl_setopt($ch, CURLOPT_HTTPHEADER,array("Content-type: application/json")); 31 31 curl_setopt($ch, CURLOPT_POST, 1); 32 curl_setopt($ch, CURLOPT_POSTFIELDS, $ key_info);32 curl_setopt($ch, CURLOPT_POSTFIELDS, $content); 33 33 curl_setopt($ch, CURLOPT_TIMEOUT, 30); 34 34 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 35 35 $result = curl_exec($ch); 36 36 curl_close($ch); 37 38 $result = json_decode($result, true); 39 40 if($result['valid'] == "true"){ 41 // key is valid so run it 42 echo "<p>Your license key is valid,<br>Thank you"; // Place your protected code function here 37 var_dump($result); 38 $result = json_decode($result, true); 43 39 44 //If Beta Enable The Beta Flag and Debug Flag 45 set_option('sp-license-valid',"asdfhjasldfalsdfj29349023jasldfj"); 46 } else { 47 // key is not valid so stop it 48 echo '<div class="updated"><p>Your license key is Invalid! Test of the license server</p></div>'; 40 if($result['valid'] == "true"){ 41 // key is valid so run it 42 echo "<p>Your license key is valid,<br>Thank you"; // Place your protected code function here 43 44 //If Beta Enable The Beta Flag and Debug Flag 45 set_option('sp-license-valid',"asdfhjasldfalsdfj29349023jasldfj"); 46 } else { 47 // key is not valid so stop it 48 echo '<div class="updated"><p>Your license key is Invalid! Test of the license server</p></div>'; 49 } 49 50 } 50 51 -
soldpress/branches/0.9.5A/single-sp_property.php
r716478 r717129 60 60 <div class="row"> 61 61 <div class="span4"><img src="<?php echo plugins_url( 'images/realtor.jpg' , __FILE__ ); ?>"> <img src="<?php echo plugins_url( 'images/mls.jpg' , __FILE__ ); ?>"> </div> 62 <div class="span4 pull-right"> <div class="pull-right" style="position: relative; width:160px; height: 40px; background: url(http://cdn2.walk.sc/images/widget/back-blue3.gif) top left no-repeat;overflow:hidden;border:0;outline:0;margin:0;padding:0;"> <h1 style="position: absolute; left: 125px; top: 4px;border:0;outline:0;margin:0;padding:0;text-align: left; text-decoration:none; font-style: normal; vertical-align: baseline; background: none;font:16px 'trebuchet ms', Geneva, Arial, Helvetica, sans-serif; font-weight: bold; color:#4b76c6;">33</h1> <p style="position: absolute; left: 8px; top: 25px;border:0;outline:0;margin:0;padding:0;text-align: left; text-decoration:none; font-style: normal; vertical-align: baseline; background: none;font: 11px/11px Verdana, Arial, Helvetica, sans-serif; font-weight: normal; color: #666; vertical-align: top;width: 152px; text-align: center;"><span style="background-color: #eff4ff; padding:0 2px;">Car-Dependent</span></p> <a href="http://www.walkscore.com/score/<?php echo get_post_meta($post->ID,'dfd_UnparsedAddress',true); ?> , <?php echo get_post_meta($post->ID,'dfd_StateOrProvince',true); ?> <?php echo get_post_meta($post->ID,'dfd_PostalCode',true); ?>?utm_medium=overlay_link&utm_campaign=widget3" target="_blank" style="position:absolute;top:0;left:0;display:block;background:url(http://www.walkscore.com/images/fulltrans.png) 0 0 repeat;z-index:5;text-indent:-999999px;width:160px;height:40px;border:0;outline:0;margin:0;padding:0;">Walk Score</a></div></div> 63 </div> 64 65 <?php 66 /* function getWalkScore($lat, $lon, $address) { 62 <div class="span4 pull-right"> <?php 63 function getWalkScore($lat, $lon, $address) { 64 65 //Call Google To Get Lat and Long 67 66 $address=urlencode($address); 68 $url = "http://api.walkscore.com/score?format=json&address=$address"; 69 $url .= '&lat=$lat&lon=$lon&wsapikey="'. get_option('sc-layout-walkscore',true).'"'; 70 $str = @file_get_contents($url); 71 return $str; 67 $googleapiurl = "http://maps.googleapis.com/maps/api/geocode/json?address=$address&sensor=false"; 68 $geo = @file_get_contents($googleapiurl); 69 70 $result = json_decode($geo, true); 71 //var_dump($result); 72 if($result['status'] == 'OK'){ 73 74 $location = $result['results'][0]['geometry']['location']; 75 $lat = $location['lat']; 76 $lon = $location['lng']; 77 //Let Record Lat and Long For Future Requests 78 79 80 $url = "http://api.walkscore.com/score?format=json&address=$address"; 81 $url .= '&lat=' . $lat . '&lon=' . $lon . '&wsapikey='. get_option('sc-layout-walkscore',true); 82 // echo $url; 83 $str = @file_get_contents($url); 84 return $str; 85 } 72 86 } 73 87 74 88 $lat = $_GET['lat']; 75 89 $lon = $_GET['lon']; … … 77 91 $json = getWalkScore($lat,$lon,$address); 78 92 79 echo $json;*/ 80 ?> 93 94 $result = json_decode($json, true); 95 if($result["status"] == '1') 96 { 97 $walkscore = '<div id="walkscore-div pull-right"><p><a target="_blank" href="'. $result["ws_link"].'"><img src="'. $result["logo_url"].'"><span class="walkscore-scoretext">'. $result["walkscore"].'</span></a><span id="ws_info"><a href=". $result["more_info_link"]." target="_blank"><img src="'. $result["more_info_icon"].'" width="13" height="13" "=""></a></span></p></div>'; 98 echo $walkscore; 99 } 100 101 ?></div> 102 </div> 103 104 81 105 82 106 </div>
Note: See TracChangeset
for help on using the changeset viewer.