* * MAKE SURE you remove this script after the domain change is complete. */ sleep(5); if (md5($_POST['auth_password']) == md5(DDWPDC_PASSWORD)) { $expire = time() + DDWPDC_COOKIE_LIFETIME; setcookie(DDWPDC_COOKIE_NAME_AUTH, md5(DDWPDC_PASSWORD), $expire); setcookie(DDWPDC_COOKIE_NAME_EXPIRE, $expire, $expire); die('<a href="' . basename(__FILE__) . '">Click Here</a><script type="text/javascript">window.location = "' . basename(__FILE__) . '";</script>'); } } // Authenticate $is_authenticated = isset($_COOKIE[DDWPDC_COOKIE_NAME_AUTH]) && $_COOKIE[DDWPDC_COOKIE_NAME_AUTH] == md5(DDWPDC_PASSWORD) ? true : false; // Check if user is authenticated if ($is_authenticated) { $DDWPDC = new DDWordPressDomainChanger(); try { // Start change process if (isset($_POST) && is_array($_POST) && count($_POST) > 0) { // Clean up data & check for empty fields $POST = array(); foreach ($_POST as $key => $value) { $value = trim($value); // if(strlen($value) <= 0) throw new Exception('One or more of the fields was blank; all are required.'); if (get_magic_quotes_gpc()) { $value = stripslashes($value); } $POST[$key] = $value; } // Check for "http://" in the new domain if (stripos($POST['new_domain'], 'http://') !== false) {
* * MAKE SURE you remove this script after the domain change is complete. */ sleep(5); if (md5($_POST['auth_password']) == md5(DDWPDC_PASSWORD)) { $expire = time() + DDWPDC_COOKIE_LIFETIME; setcookie(DDWPDC_COOKIE_NAME_AUTH, md5(DDWPDC_PASSWORD), $expire); setcookie(DDWPDC_COOKIE_NAME_EXPIRE, $expire, $expire); die('<a href="' . basename(__FILE__) . '">Click Here</a><script type="text/javascript">window.location = "' . basename(__FILE__) . '";</script>'); } } // Authenticate $is_authenticated = isset($_COOKIE[DDWPDC_COOKIE_NAME_AUTH]) && $_COOKIE[DDWPDC_COOKIE_NAME_AUTH] == md5(DDWPDC_PASSWORD) ? true : false; // Check if user is authenticated if ($is_authenticated) { $DDWPDC = new DDWordPressDomainChanger(); try { // Start change process if (isset($_POST) && is_array($_POST) && count($_POST) > 0) { // Clean up data & check for empty fields $POST = array(); foreach ($_POST as $key => $value) { $value = trim($value); if (strlen($value) <= 0) { throw new Exception('One or more of the fields was blank; all are required.'); } if (get_magic_quotes_gpc()) { $value = stripslashes($value); } $POST[$key] = $value; }