Changeset 1454072
- Timestamp:
- 07/13/2016 12:53:55 PM (10 years ago)
- Location:
- wsecure/trunk
- Files:
-
- 5 edited
-
includes.php (modified) (4 diffs)
-
js/basic.js (modified) (1 diff)
-
params.php (modified) (1 diff)
-
wsecure-authentication.php (modified) (1 diff)
-
wsecure-config.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wsecure/trunk/includes.php
r1454020 r1454072 7 7 8 8 //Checking for authenticate key value. 9 10 function wse_up(){11 12 13 if ($_POST[opt]=="basic" && $_POST[Save]=="Save" )14 {15 /* Code to Save wSecure Config */16 17 include(dirname(__FILE__).'/params.php');18 $WSecureConfig = new WSecureConfig();19 $newkey = $_POST["key"]=="" ? $WSecureConfig->key : md5(base64_encode($_POST["key"])) ;20 $string = '<?php21 class WSecureConfig {22 var $publish = "'. $_POST["publish"]. '";23 var $passkeytype = "'. $_POST["passkeytype"] . '";24 var $key = "'. $newkey . '";25 var $options = "'. $_POST["options"]. '";26 var $custom_path = "'. $_POST["custom_path"]. '";27 }28 ?>';29 if (is_writable(dirname(__FILE__).'/params.php'))30 {31 $fp = fopen(dirname(__FILE__).'/params.php', "w+");32 fwrite($fp, $string);33 fclose($fp);34 wp_redirect(get_site_url()."/wp-admin/options-general.php?page=wsecure-configuration&w_action=save&opt=config");35 36 }37 38 /* Code to Save wSecure Config */39 40 }41 }42 43 9 44 10 function ja_checkUrlKey() … … 104 70 { 105 71 unset($_SESSION['jSecureAuthentication']); 106 //wp_redirect( $reditect_option ); 107 wp_redirect("http://$custom_path"); 72 wp_redirect( $reditect_option ); 108 73 } 109 74 else … … 118 83 $home = get_bloginfo('home'); 119 84 unset($_SESSION['jSecureAuthentication']); 120 //wp_redirect( $reditect_option ); 121 wp_redirect("http://$custom_path"); 85 wp_redirect( $reditect_option ); 122 86 endif; 123 87 } … … 165 129 </div> 166 130 <?php 167 } 131 } 132 133 function wse_up(){ 134 135 136 if($_POST[opt]=="basic" and $_POST[Save]=="Save" ) 137 { 138 /* Code to SAve wSecure Config */ 139 140 include(dirname(__FILE__).'/params.php'); 141 $WSecureConfig = new WSecureConfig(); 142 $newkey = $_POST["key"]=="" ? $WSecureConfig->key : md5(base64_encode($_POST["key"])) ; 143 $string = '<?php 144 class WSecureConfig { 145 var $publish = "'. $_POST["publish"]. '"; 146 var $passkeytype = "'. $_POST["passkeytype"] . '"; 147 var $key = "'. $newkey . '"; 148 var $options = "'. $_POST["options"]. '"; 149 var $custom_path = "'. $_POST["custom_path"]. '"; 150 } 151 ?>'; 152 if (is_writable(dirname(__FILE__).'/params.php')) 153 { 154 $fp = fopen(dirname(__FILE__).'/params.php', "w+"); 155 fwrite($fp, $string); 156 fclose($fp); 157 wp_redirect(get_site_url()."/wp-admin/options-general.php?page=wsecure-configuration&w_action=save&opt=config"); 158 159 } 160 161 162 163 164 /* // Code to SAve wSecure Config */ 165 } 166 167 } 168 169 168 170 ?> -
wsecure/trunk/js/basic.js
r1454020 r1454072 1 1 function hideCustomPath(optionsValue){ 2 3 2 if(optionsValue.value == "1"){ 4 3 document.getElementById("custom_path").style.display = ""; -
wsecure/trunk/params.php
r985162 r1454072 2 2 class WSecureConfig { 3 3 var $publish = "1"; 4 var $passkeytype = " form";4 var $passkeytype = "url"; 5 5 var $key = "eb65e642486eb36f78a33e3783f18074"; 6 6 var $options = "0"; -
wsecure/trunk/wsecure-authentication.php
r1454020 r1454072 17 17 add_action('wp_logout', 'ja_logout'); 18 18 add_action('init', 'ja_checkUrlKey'); 19 add_action('admin_menu','wse_up'); 19 20 20 add_action('admin_menu','wse_up');21 21 function wsecure_menu() 22 22 { -
wsecure/trunk/wsecure-config.php
r1454020 r1454072 9 9 if(trim($_REQUEST['opt']) =='' ) 10 10 { 11 11 /* echo "<pre>"; 12 print_r( $_REQUEST ); 13 */ 12 14 $_REQUEST['opt'] = 'adv' ; 13 15 /* Redirect to Basic COnfiguration after Save */ … … 20 22 $opt = trim($_REQUEST['opt']); 21 23 24 22 25 $flag_saved = 0; 23 26 … … 81 84 <div class="wsecure_container" > 82 85 <form name="save" id="save" method="post" action="options-general.php?page=wsecure-configuration" autocomplete="off"> 83 <input type="hidden" name="opt" value="basic"/>86 <input type="hidden" name="opt" value="basic"/> 84 87 <?php wp_nonce_field( $action ); ?> 85 88 … … 149 152 150 153 <input type="submit" name="Save" class="button-primary" value="Save" style="padding: 0px 18px;margin: 13px 0px;" /> 151 154 152 155 </form> 153 <script type="text/javascript"> 156 157 <script type="text/javascript"> 154 158 hideCustomPath(document.getElementById('redirect_options')); 155 159 </script> … … 289 293 'url' => 'http://www.joomlaserviceprovider.com/extensions/wordpress/commercial/wsecure-authentication.html', 290 294 'title' => 'wSecure Authentication', 295 /* translators: %1$s expands to Yoast SEO */ 291 296 'desc' => sprintf( __('Protect you Wordpress site! wSecure hides your Wordpress admin page from public access making it invisible helping protect your website from hackers.')), 292 297 … … 300 305 301 306 <?php 302 303 304 307 305 308 foreach($extensions as $extn){
Note: See TracChangeset
for help on using the changeset viewer.