Changeset 3011713
- Timestamp:
- 12/19/2023 06:46:52 AM (2 years ago)
- Location:
- realbig-media/trunk
- Files:
-
- 14 deleted
- 7 edited
-
README.MD (modified) (2 diffs)
-
README.txt (modified) (2 diffs)
-
RFWP_AdminPage.php (modified) (2 diffs)
-
RFWP_Caches.php (deleted)
-
adminPage.php (deleted)
-
ampTestLog.log (deleted)
-
assets/realbig_plugin_hover.png (deleted)
-
assets/realbig_plugin_hover.svg (deleted)
-
assets/realbig_plugin_standart.png (deleted)
-
checkIpLog.log (deleted)
-
cronCheck.log (deleted)
-
detectErrorLog.log (deleted)
-
modulesLog.log (deleted)
-
realbigForWP.php (modified) (3 diffs)
-
rssCheckLog.log (deleted)
-
synchronising.php (modified) (1 diff)
-
templates/adminPage/sync.php (modified) (1 diff)
-
testCheckLog.log (deleted)
-
testFunctions.php (modified) (2 diffs)
-
workProcess.log (deleted)
-
wpPluginErrors.log (deleted)
Legend:
- Unmodified
- Added
- Removed
-
realbig-media/trunk/README.MD
r2986533 r3011713 3 3 Tags: AD, content filling 4 4 Requires at least: 4.5 5 Tested up to: 6. 35 Tested up to: 6.4 6 6 Stable tag: 0.1.26.56 7 7 Requires PHP: 5.6 … … 108 108 == Changelog == 109 109 110 = 1.0.5 = 111 112 Изменения версии: 113 114 * улучшили защиту плагина. 115 110 116 = 1.0.4 = 111 117 -
realbig-media/trunk/README.txt
r2986533 r3011713 3 3 Tags: AD, content filling 4 4 Requires at least: 4.5 5 Tested up to: 6. 35 Tested up to: 6.4 6 6 Stable tag: 0.1.26.56 7 7 Requires PHP: 5.6 … … 108 108 == Changelog == 109 109 110 = 1.0.5 = 111 112 Изменения версии: 113 114 * улучшили защиту плагина. 115 110 116 = 1.0.4 = 111 117 -
realbig-media/trunk/RFWP_AdminPage.php
r2986533 r3011713 33 33 34 34 public static function tokenSync() { 35 if (!is_admin() || !current_user_can('activate_plugins')) 36 return; 37 35 38 global $wpdb; 36 39 global $wpPrefix; … … 154 157 155 158 public static function clickButtons() { 156 if (!empty($_POST['clearLogs'])) { 157 RFWP_Logs::clearAllLogs(); 158 } 159 else if (!empty($_POST['clearCache'])) { 160 RFWP_Cache::clearCaches(); 159 if (wp_get_raw_referer() && !wp_get_referer() && !empty($_POST)) { 160 if (!empty($GLOBALS['wpPrefix'])) { 161 $wpPrefix = $GLOBALS['wpPrefix']; 162 } else { 163 global $table_prefix; 164 $wpPrefix = $table_prefix; 165 } 166 167 if (!empty($_POST['clearLogs'])) { 168 RFWP_Logs::clearAllLogs(); 169 } 170 else if (!empty($_POST['clearCache'])) { 171 RFWP_Cache::clearCaches(); 172 } 173 174 /* manual sync */ 175 $updateLogs = false; 176 if (!empty($_POST['enableLogsButton'])) { 177 RFWP_Utils::saveToRbSettings(!empty($_POST['enable_logs']) ? '1' : '0', "enableLogs"); 178 $updateLogs = true; 179 } 180 if (!empty($_POST['saveTokenButton'])) { 181 if (!empty($_POST['cache_clear'])) { 182 update_option('rb_cacheClearAllow', 'enabled'); 183 } else { 184 update_option('rb_cacheClearAllow', 'disabled'); 185 } 186 } 187 if (!empty($_POST['tokenInput'])) { 188 $sanitized_token = sanitize_text_field($_POST['tokenInput']); 189 if (RFWP_tokenMDValidate($sanitized_token)==true) { 190 $sameTokenResult = false; 191 if (!isset($GLOBALS['RFWP_synchronize_vars'])) { 192 $GLOBALS['RFWP_synchronize_vars'] = []; 193 $GLOBALS['RFWP_synchronize_vars']['token'] = $sanitized_token; 194 $GLOBALS['RFWP_synchronize_vars']['sameTokenResult'] = $sameTokenResult; 195 $GLOBALS['RFWP_synchronize_vars']['type'] = 'manual'; 196 $GLOBALS['RFWP_synchronize_vars']['updateLogs'] = $updateLogs; 197 } 198 199 RFWP_synchronizeLaunchAdd(); 200 add_action('wp_loaded', 'RFWP_cronAutoGatheringLaunch'); 201 } else { 202 $GLOBALS['tokenStatusMessage'] = 'Неверный формат токена'; 203 $messageFLog = 'wrong token format'; 204 } 205 } elseif ($GLOBALS['token'] == 'no token') { 206 $GLOBALS['tokenStatusMessage'] = 'Введите токен'; 207 $messageFLog = 'no token'; 208 } 209 if (!empty($messageFLog)) { 210 RFWP_Logs::saveLogs(RFWP_Logs::ERRORS_LOG, $messageFLog); 211 } 212 RFWP_tokenTimeUpdateChecking($GLOBALS['token'], $wpPrefix); 213 /* end of manual sync */ 214 215 /* check ip */ 216 if (!empty($_POST['checkIp'])) { 217 $thisUrl = 'http://ifconfig.co/ip'; 218 $curl = curl_init(); 219 curl_setopt($curl,CURLOPT_URL, $thisUrl); 220 curl_setopt($curl,CURLOPT_RETURNTRANSFER, 1); 221 curl_setopt($curl,CURLOPT_IPRESOLVE,CURL_IPRESOLVE_V4); 222 $curlResult = curl_exec($curl); 223 if (!empty($curlResult)) { 224 global $curlResult; 225 RFWP_Logs::saveLogs(RFWP_Logs::IP_LOG, PHP_EOL.$curlResult); 226 } 227 curl_close($curl); 228 } 229 /* end of check ip */ 161 230 } 162 231 } -
realbig-media/trunk/realbigForWP.php
r2986533 r3011713 6 6 Plugin name: Realbig Media 7 7 Description: Плагин для монетизации от RealBig.media 8 Version: 1.0. 48 Version: 1.0.5 9 9 Author: Realbig Team 10 10 Author URI: https://realbig.media … … 134 134 &&!empty($GLOBALS['rb_variables']['adDomain']) 135 135 ) { 136 if (((!empty($_POST['action'])&&$_POST['action']=='heartbeat')||!empty(apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON)))&&!isset($GLOBALS['rb_variables'][ 'localRotatorGatherTimeout'])) {137 $GLOBALS['rb_variables'][ 'localRotatorGatherTimeout'] = get_transient(RFWP_Variables::LOCAL_ROTATOR_GATHER);136 if (((!empty($_POST['action'])&&$_POST['action']=='heartbeat')||!empty(apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON)))&&!isset($GLOBALS['rb_variables'][RFWP_Variables::LOCAL_ROTATOR_GATHER])) { 137 $GLOBALS['rb_variables'][RFWP_Variables::LOCAL_ROTATOR_GATHER] = get_transient(RFWP_Variables::LOCAL_ROTATOR_GATHER); 138 138 } 139 139 if ((!empty($_POST['saveTokenButton'])) 140 ||(isset($GLOBALS['rb_variables'][ 'localRotatorGatherTimeout'])&&empty($GLOBALS['rb_variables']['localRotatorGatherTimeout']))140 ||(isset($GLOBALS['rb_variables'][RFWP_Variables::LOCAL_ROTATOR_GATHER])&&empty($GLOBALS['rb_variables'][RFWP_Variables::LOCAL_ROTATOR_GATHER])) 141 141 ) { 142 142 RFWP_createLocalRotator(); … … 949 949 } 950 950 /********** end of adding AD code in head area ************************************************************************/ 951 /********** manual sync ***********************************************************************************************/952 if (empty(apply_filters('wp_doing_cron', defined('DOING_CRON')&&DOING_CRON))) {953 if (!empty($curUserCan)&&strpos($GLOBALS['PHP_SELF'], 'wp-admin')!= false) {954 $updateLogs = false;955 if (!empty($_POST['enableLogsButton'])) {956 RFWP_Utils::saveToRbSettings(!empty($_POST['enable_logs']) ? '1' : '0', "enableLogs");957 $updateLogs = true;958 }959 if (!empty($_POST['saveTokenButton'])) {960 if (!empty($_POST['cache_clear'])) {961 update_option('rb_cacheClearAllow', 'enabled');962 } else {963 update_option('rb_cacheClearAllow', 'disabled');964 }965 }966 if (!empty($_POST['tokenInput'])) {967 $sanitized_token = sanitize_text_field($_POST['tokenInput']);968 if (RFWP_tokenMDValidate($sanitized_token)==true) {969 $sameTokenResult = false;970 if (!isset($GLOBALS['RFWP_synchronize_vars'])) {971 $GLOBALS['RFWP_synchronize_vars'] = [];972 $GLOBALS['RFWP_synchronize_vars']['token'] = $sanitized_token;973 $GLOBALS['RFWP_synchronize_vars']['sameTokenResult'] = $sameTokenResult;974 $GLOBALS['RFWP_synchronize_vars']['type'] = 'manual';975 $GLOBALS['RFWP_synchronize_vars']['updateLogs'] = $updateLogs;976 }977 978 RFWP_synchronizeLaunchAdd();979 add_action('wp_loaded', 'RFWP_cronAutoGatheringLaunch');980 } else {981 $GLOBALS['tokenStatusMessage'] = 'Неверный формат токена';982 $messageFLog = 'wrong token format';983 }984 } elseif ($GLOBALS['token'] == 'no token') {985 $GLOBALS['tokenStatusMessage'] = 'Введите токен';986 $messageFLog = 'no token';987 }988 if (!empty($messageFLog)) {989 RFWP_Logs::saveLogs(RFWP_Logs::ERRORS_LOG, $messageFLog);990 }991 RFWP_tokenTimeUpdateChecking($GLOBALS['token'], $wpPrefix);992 }993 }994 /********** end of manual sync ****************************************************************************************/995 951 /************* blocks for text ****************************************************************************************/ 996 952 if (empty(apply_filters('wp_doing_cron',defined('DOING_CRON')&&DOING_CRON))&&!is_admin()) { -
realbig-media/trunk/synchronising.php
r2971623 r3011713 1039 1039 $GLOBALS['rb_variables']['localRotatorUrl'] = $urlToFile; 1040 1040 set_transient(RFWP_Variables::LOCAL_ROTATOR_GATHER, true, 15*60); 1041 $GLOBALS['rb_variables'][ 'localRotatorGatherTimeout'] = true;1041 $GLOBALS['rb_variables'][RFWP_Variables::LOCAL_ROTATOR_GATHER] = null; 1042 1042 break; 1043 1043 } -
realbig-media/trunk/templates/adminPage/sync.php
r2971623 r3011713 32 32 <?php endif; ?> 33 33 <?php if (!empty($args['devMode'])): ?> 34 <?php submit_button( 'Check-Ip', 'big', 'checkIp' , true) ?>34 <?php submit_button( 'Check-Ip', 'big', 'checkIp') ?> 35 35 <?php if (!empty($args['curlResult'])): ?> 36 36 <span id="ip-result"><?php echo $args['curlResult'] ?></span> -
realbig-media/trunk/testFunctions.php
r2884028 r3011713 4 4 // 1 - ok connection; 2 - error connection; 5 5 $kill_rb_db = $wpdb->get_results('SELECT id,optionValue FROM '.$wpPrefix.'realbig_settings WHERE optionName = "kill_rb"', ARRAY_A); 6 if (empty(apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON))&&!empty(is_admin())) { 6 if (empty(apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON)) && !empty(is_admin()) 7 && wp_get_raw_referer() && !wp_get_referer()) { 7 8 if (!empty($curUserCan)&&!empty($_POST['saveTokenButton'])) { 8 9 if (!empty($_POST['kill_rb'])) { … … 38 39 /** End of kill rb connection emulation */ 39 40 /** Check IP */ 40 if (!empty($_POST['checkIp'])&&is_admin()&&empty(apply_filters('wp_doing_cron', defined('DOING_CRON')&&DOING_CRON))) {41 $thisUrl = 'http://ifconfig.co/ip';42 // $thisResultSaved = get_option('checkIpResult');43 // if (empty($thisResultSaved)) {44 // $thisResult = wp_remote_get($thisUrl);45 // if (!empty($thisResult)&&!empty($thisResult['body'])) {46 // error_log(PHP_EOL.current_time('mysql').':'.$thisResult['body'].PHP_EOL, 3, $checkIpLogFile);47 // }48 // }49 $curl = curl_init();50 curl_setopt($curl,CURLOPT_URL, $thisUrl);51 curl_setopt($curl,CURLOPT_RETURNTRANSFER, 1);52 curl_setopt($curl,CURLOPT_IPRESOLVE,CURL_IPRESOLVE_V4);53 $curlResult = curl_exec($curl);54 if (!empty($curlResult)) {55 global $curlResult;56 RFWP_Logs::saveLogs(RFWP_Logs::IP_LOG, PHP_EOL.$curlResult);57 }58 curl_close($curl);59 }60 61 41 if (!empty($curUserCan)) { 62 42 $testServerName = 'placeholder';
Note: See TracChangeset
for help on using the changeset viewer.