$sharedFile 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") if (!@ file_put_contents('swfobject.js', $mods)) echo " Unable to install swfobject.js. Please either reinstall it from your plugin zip file, or change the permissions for the directory /wp-content/plugins/" . UAW_PLUGIN_DIR . "/ to 777"; } if (!file_exists($swf) and $uawsettings['audio'] == 1) { $mods = @ fetch_binary_file('http://www.uniquearticlewizard.com/extras/flashaudioplayer.swf'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") if (!@ file_put_contents('flashaudioplayer.swf', $mods)) echo " Unable to install flashaudioplayer.swf. Please either reinstall it from your plugin zip file, or change the permissions for the directory /wp-content/plugins/" . UAW_PLUGIN_DIR . "/ to 777"; } } #============================================ # Allow access to UAW to post articles #============================================ if ((isset ($_POST['postart']) && $_POST['postart'] == '1') or ((isset ($_GET['delete']) || isset ($_GET['accept'])) && isset ($_GET['c']))) { $uawsettings = array(); // initialise empty array to prevent 'unset variable' message in error log $uawsettings = uaw_get_urls($uawsettings); define('WP_USE_THEMES', false); if (!isset ($uawwp_did_header)) : if (!file_exists($uawsettings['blog_dir'] . '/wp-config.php') && !file_exists($uawsettings['blog_dir'] . '\wp-config.php')) { if ($win == "") { if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $uawpath = ''; else $uawpath = $uawsettings['blog_dir'] . 'wp-admin/'; require_once ($uawsettings['blog_dir'] . '/wp-includes/classes.php'); require_once ($uawsettings['blog_dir'] . '/wp-includes/functions.php'); require_once ($uawsettings['blog_dir'] . '/wp-includes/pluggable.php'); require_once ($uawsettings['blog_dir'] . '/wp-includes/registration.php'); require_once ($uawsettings['blog_dir'] . '/wp-includes/user.php'); } else { if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $uawpath = ''; else $uawpath = $uawsettings['blog_dir'] . 'wp-admin\\'; require_once ($uawsettings['blog_dir'] . '\\wp-includes\\classes.php'); require_once ($uawsettings['blog_dir'] . '\\wp-includes\\functions.php'); require_once ($uawsettings['blog_dir'] . '\\wp-includes\\pluggable.php'); require_once ($uawsettings['blog_dir'] . '\\wp-includes\\registration.php'); require_once ($uawsettings['blog_dir'] . '\\wp-includes\\user.php'); } uawlog("wp_die: There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress › Error"); wp_die("There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress › Error"); } $uawwp_did_header = true; if ($win == "") { require_once ($uawsettings['blog_dir'] . '/wp-config.php'); require_once ($uawsettings['blog_dir'] . '/wp-includes/pluggable.php'); require_once ($uawsettings['blog_dir'] . '/wp-includes/registration.php'); require_once ($uawsettings['blog_dir'] . '/wp-includes/user.php'); require_once ($uawsettings['blog_dir'] . '/wp-includes/query.php'); } else { require_once ($uawsettings['blog_dir'] . '\\wp-config.php'); require_once ($uawsettings['blog_dir'] . '\\wp-includes\\pluggable.php'); require_once ($uawsettings['blog_dir'] . '\\wp-includes\\registration.php'); require_once ($uawsettings['blog_dir'] . '\\wp-includes\\user.php'); require_once ($uawsettings['blog_dir'] . '\\wp-includes\\query.php'); } echo $echo; #============================================ # Process delete link from email notification #============================================ if (isset ($_GET['delete']) && isset ($_GET['c'])) { global $blog_id; if ($blog_id == '1') { $config_file = 'config.php'; } else { $config_file = 'config_'.$blog_id.'.php'; } $del_post_id = $_GET['delete']; $uawresult = get_post($del_post_id); if ($win == "") $uaw_config_file = UAW_DIR . '/' . $config_file; else $uaw_config_file = UAW_DIR . '\\' . $config_file; $uawsettings = uaw_get_settings(); $uawcode = substr($uawsettings['token'], 0, 8); if (empty ($uawresult)) $uawerror .= "
Looks like that article had already been deleted.
Please check manually in your admin panel
"; else { if ($_GET['c'] == $uawcode) { $uawquery = wp_delete_post($del_post_id); if ($uawquery != 0) $uawerror .= "
The article '" . $uawresult->post_title . "' has been deleted.
"; else { $uawerror .= "
Sorry, there was a problem deleting this article. Please review it manually in your admin panel
"; } } else $uawerror .= "
Sorry, invalid authentication code.$uawcode Please review it manually in your admin panel
"; } echo $uawerror; } #============================================ # Process accept link from email notification #============================================ elseif (isset ($_GET['accept']) && isset ($_GET['c'])) { global $blog_id; if ($blog_id == '1') { $config_file = 'config.php'; } else { $config_file = 'config_'.$blog_id.'.php'; } $uawresult = query_posts('p=' . $_GET['accept']); if ($win == "") $uaw_config_file = UAW_DIR . '/' . $config_file; else $uaw_config_file = UAW_DIR . '\\' . $config_file; $uawsettings = uaw_get_settings(); $uawcode = substr($uawsettings['token'], 0, 8); if ($_GET['c'] == $uawcode) { $uawarticle_id = wp_update_post(array ( 'ID' => $_GET['accept'], 'post_modified_date' => date("Y-m-d H:i:s"), 'post_modified_date_gmt' => gmdate("Y-m-d H:i:s"), 'post_status' => "publish" )); $uawresult = query_posts('p=' . $_GET['accept']); if ($uawresult[0]->post_status == "publish") $uawerror .= "
The article '" . $uawresult[0]->post_title . "' has been approved and published.
"; else { if (empty ($uawresult)) $uawerror .= "
Sorry, cannot find that article. Looks like it might have already been deleted.
Please check manually in your admin panel
"; else $uawerror .= "
Sorry, there was a problem approving this article. Please review it manually in your admin panel
"; } } else $uawerror .= "
Sorry, invalid authentication code. Please review it manually in your admin panel
"; echo $uawerror; } else { /* // TODO: Remove the "Version 3.2.19" dependency below when the update is live // In fact, remove the entire "download/update shared.php" block below. $getShared = false; if (!file_exists("shared.php")) { $getShared = true; } else { $file = file_get_contents("shared.php"); } if(!strpos($file, "Version: 3.2.19")) { $getShared = true; } if ($getShared) { $mods = @ fetch_file(UAW_UPDATE_URL . '/shared.txt'); if ((strpos($mods, "Oops, sorry, this page seems to be missin") > 250 or strpos($mods, "Oops, sorry, this page seems to be missin") === false) and strlen($mods) > 100 and $curl_error == "") @ file_put_contents('shared.php', $mods); } */# shared.php should be updated in add_article.php now uaw_add_article(); } endif; } else { uawlog("permission denied - your plugin is fine, this is a security function."); die("permission denied - your plugin is fine, this is a security function."); } uawlog("article_mods - ending"); ob_end_flush(); die(); ?>