", "$username", $subject); $subject = str_replace("", "$password", $subject); $subject = str_replace("", $fname, $subject); $subject = str_replace("", $lname, $subject); $message = htmlspecialchars_decode($admin_info[user_password_email], ENT_QUOTES); $message = str_replace("", "$username", $message); $message = str_replace("", "$password", $message); $message = str_replace("", $fname, $message); $message = str_replace("", $lname, $message); $message = $message; mail("$email", "$subject", "$message", "MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\nFrom: $admin_info[fname] $admin_info[lname] <$admin_info[email]>\nReturn-Path: $admin_info[email]\nReply-To: $admin_info[email]"); } // SEND NOTIFICATION EMAIL TO ADMIN IF TURNED ON if($admin_info[signup_notify] == 1) { $notify_subject = "$signup1 $username"; $notify_message = "$signup2\n\n$signup3 $username\n$signup5 $fname\n$signup6 $lname"; //$notify_headers = "MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\nFrom: $admin_info[fname] $admin_info[lname] <$admin_info[email]>\nReturn-Path: $admin_info[email]\nReply-To: $admin_info[email]"; // mail($admin_info[email], $notify_subject, $notify_message, $notify_headers); $message_headers = "MIME-Version: 1.0\n" . "From: \"Rivblog.com - support\" <{$admin_info[email]}>\n" . "Content-Type: text/plain; charset=\"utf-8\"\n"; $message = $verify_message; // TODO: Don't hard code activation link. $subject = '[' . $from_name . '] ' . $verify_subject; wp_mail($admin_info[email], $notify_subject, $notify_message, $message_headers); } // SEND WELCOME EMAIL TO USER IF TURNED ON if($admin_info[signup_sendemail] == 1) { $welcome_subject = htmlspecialchars_decode($admin_info[welcome_subject], ENT_QUOTES); $welcome_subject = str_replace("", $fname, $welcome_subject); $welcome_subject = str_replace("", $lname, $welcome_subject); $welcome_subject = str_replace("", url("index", "$weblog"), $welcome_subject); $welcome_subject = str_replace("", $username, $welcome_subject); $welcome_subject = str_replace("", $password, $welcome_subject); $welcome_message = htmlspecialchars_decode($admin_info[welcome_message], ENT_QUOTES); $welcome_message = str_replace("", $fname, $welcome_message); $welcome_message = str_replace("", $lname, $welcome_message); $welcome_message = str_replace("", url("index", "$weblog"), $welcome_message); $welcome_message = str_replace("", $username, $welcome_message); $welcome_message = str_replace("", $password, $welcome_message); $welcome_message = $welcome_message; //$welcome_headers = "MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\nFrom: $admin_info[fname] $admin_info[lname] <$admin_info[email]>\nReturn-Path: $admin_info[email]\nReply-To: $admin_info[email]"; //mail($email, $welcome_subject, $welcome_message, $welcome_headers); $message_headers = "MIME-Version: 1.0\n" . "From: \"Rivblog.com - support\" <{$admin_info[email]}>\n" . "Content-Type: text/plain; charset=\"utf-8\"\n"; $message = $verify_message; // TODO: Don't hard code activation link. $subject = '[' . $from_name . '] ' . $verify_subject; wp_mail($email, $welcome_subject, $welcome_message, $message_headers); } // SEND VERIFICATION EMAIL TO USER IF TURNED ON if($admin_info[signup_emailverify] == 1) { $server_array = explode("/", $_SERVER['PHP_SELF']); $server_array_mod = array_pop($server_array); $server_info = implode("/", $server_array); $server = "http://".$_SERVER['HTTP_HOST'].$server_info; $verify_subject = htmlspecialchars_decode($admin_info[verify_subject], ENT_QUOTES); $verify_subject = str_replace("", $fname, $verify_subject); $verify_subject = str_replace("", $lname, $verify_subject); $verify_subject = str_replace("", "$server/verify.php?u=$user_info[u_id]", $verify_subject); $verify_message = htmlspecialchars_decode($admin_info[verify_message], ENT_QUOTES); $verify_message = str_replace("", $fname, $verify_message); $verify_message = str_replace("", $lname, $verify_message); $verify_message = str_replace("", "$server/verify.php?u=$user_info[u_id]&c=$user_info[code]", $verify_message); $verify_message = $verify_message; // $verify_headers = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\nFrom: $admin_info[fname] $admin_info[lname] <$admin_info[email]>\r\n"; //echo mail($email, $verify_subject, $verify_message, $verify_headers); $message_headers = "MIME-Version: 1.0\n" . "From: \"Rivblog.com - support\" <{$admin_info[email]}>\n" . "Content-Type: text/plain; charset=\"utf-8\"\n"; // TODO: Don't hard code activation link. $subject = '[' . $from_name . '] ' . "Attivazione blog"; wp_mail($email, $verify_subject, $verify_message, $message_headers); } if($admin_info[allow_password] == 1 & $admin_info[signup_emailverify] != "1") { $username_cookie = crypt($user_info[username], $user_info[code]); $date = time(); $ipaddress = $_SERVER['REMOTE_ADDR']; mysql_query("UPDATE bhost_users SET last_login='$date' WHERE u_id='$user_info[u_id]'"); mysql_query("INSERT INTO bhost_log (date, username, password, ipaddress, result) VALUES ('$date', '$user_info[username]', '$password', '$ipaddress', '1')"); bumplog(); setcookie("username", "$username_cookie", time()+60*999999, "/"); setcookie("password", "$user_info[password]", time()+60*999999, "/"); setcookie("u_id", "$user_info[u_id]", time()+60*999999, "/"); $action = "manager/index.php"; } else { $action = "login.php"; } echo $head; echo "

$signup7

$signup8
"; if($admin_info[allow_password] != 1) { echo "$signup9
"; } if($admin_info[signup_emailverify] == 1) { echo "$signup10
"; } echo "
"; echo $foot; exit(); exit(); } // STEP THREE if($task == "step_three") { $password = base64_encode($password1); echo $head; echo "

$signup12

$signup13
"; $group = mysql_query("SELECT * FROM bhost_groups WHERE g_id='$g_id' LIMIT 1"); if(mysql_num_rows($group) == 0) { $group = mysql_query("SELECT * FROM bhost_groups WHERE default_group='1' LIMIT 1"); } $default_group = mysql_fetch_assoc($group); $template_array = explode(",", $default_group[templates]); $tempcount = 0; $templates = mysql_query("SELECT * FROM bhost_templates"); while($template = mysql_fetch_assoc($templates)) { if(in_array($template[t_id], $template_array)) { $tempcount++; if($template[image] != "" AND $template[image] != "http://") { $imageurl = $template[image]; if(strstr($imageurl, "..") != false) { $imagepath = realpath($imageurl); if(!file_exists($imagepath)) { $imageurl = str_replace("..", ".", $imageurl); } if(!file_exists(realpath($imageurl))) { $imageurl = "./images/noimage.gif"; } } $image = ""; } else { $image = ""; } $image = "$image"; echo "
$image
"; } } echo "

"; $customfieldlist = ""; $custom_fields = mysql_query("SHOW COLUMNS FROM bhost_profile FROM `$mysql_database`"); while($custom = mysql_fetch_assoc($custom_fields)) { if($custom[Field] != "p_id" & $custom[Field] != "u_id") { $custom_field = $custom[Field]; $customfieldlist .= ""; } } echo " $customfieldlist
"; echo $foot; exit(); } // STEP TWO if($task == "step_two") { $password = base64_encode($password1); if($is_error[2] != "yes") { $fname = ""; $lname = ""; $display_name = ""; $website = ""; $screenname = ""; $screenname_type = ""; $birthday_month = ""; $birthday_day = ""; $birthday_year = ""; $birthday = ""; $city = ""; $state = ""; $country = ""; $custom_fields = mysql_query("SHOW COLUMNS FROM bhost_profile FROM `$mysql_database`"); while($custom = mysql_fetch_assoc($custom_fields)) { if($custom[Field] != "p_id" & $custom[Field] != "u_id") { $custom_field = $custom[Field]; ${"$custom_field"} = ""; } } } echo $head; echo "

$signup47

$signup48

"; if($admin_info[field_fname] == "3" | $admin_info[field_fname] == "2") { echo " "; } else { echo ""; } if($admin_info[field_lname] == "3" | $admin_info[field_lname] == "2") { echo " "; } else { echo ""; } if($admin_info[field_display_name] == "3" | $admin_info[field_display_name] == "2") { echo " "; } else { echo ""; } if($admin_info[field_website] == "3" | $admin_info[field_website] == "2") { echo " "; } else { echo ""; } if($admin_info[field_screenname] == 3 | $admin_info[field_screenname] == 2) { echo " "; } else { echo " "; } if($admin_info[field_gender] == 3 | $admin_info[field_gender] == 2) { echo " "; } else { echo ""; } if($admin_info[field_birthday] == 3 | $admin_info[field_birthday] == 2) { if($birthday != "") { $thism = $birthday_month; $thisd = $birthday_day; $thisy = $birthday_year; } else { $thism = 0; $thisd = 0; $thisy = 0; } // DETERMINE ORDER OF TABS if($admin_info[signup_format_date] == "n/j/Y" OR $admin_info[signup_format_date] == "n.j.Y" OR $admin_info[signup_format_date] == "n-j-Y" OR $admin_info[signup_format_date] == "M. j, Y" OR $admin_info[signup_format_date] == "F j, Y" OR $admin_info[signup_format_date] == "l, F j, Y" OR $admin_info[signup_format_date] == "l, F j" OR $admin_info[signup_format_date] == "l, F j" OR $admin_info[signup_format_date] == "l") { $mbox_tabindex = "8"; $dbox_tabindex = "9"; $ybox_tabindex = "10"; } elseif($admin_info[signup_format_date] == "Y/n/j" OR $admin_info[signup_format_date] == "Y-n-j" OR $admin_info[signup_format_date] == "Y-m-d" OR $admin_info[signup_format_date] == "Ynj" OR $admin_info[signup_format_date] == "Y-M-j") { $ybox_tabindex = "8"; $mbox_tabindex = "9"; $dbox_tabindex = "10"; } elseif($admin_info[signup_format_date] == "j/n/Y" OR $admin_info[signup_format_date] == "j.n.Y" OR $admin_info[signup_format_date] == "j F Y" OR $admin_info[signup_format_date] == "D-j-M-Y" OR $admin_info[signup_format_date] == "D j M Y" OR $admin_info[signup_format_date] == "D j F Y" OR $admin_info[signup_format_date] == "l j F Y" OR $admin_info[signup_format_date] == "j-M-Y") { $dbox_tabindex = "8"; $mbox_tabindex = "9"; $ybox_tabindex = "10"; } // MONTHBOX if($admin_info[signup_format_date] == "n/j/Y" OR $admin_info[signup_format_date] == "n.j.Y" OR $admin_info[signup_format_date] == "n-j-Y" OR $admin_info[signup_format_date] == "Y/n/j" OR $admin_info[signup_format_date] == "Y-n-j" OR $admin_info[signup_format_date] == "Ynj" OR $admin_info[signup_format_date] == "j/n/Y" OR $admin_info[signup_format_date] == "j.n.Y") { $mf = "n"; } elseif($admin_info[signup_format_date] == "Y-m-d") { $mf = "m"; } elseif($admin_info[signup_format_date] == "M. j, Y" OR $admin_info[signup_format_date] == "l" OR $admin_info[signup_format_date] == "Y-M-j" OR $admin_info[signup_format_date] == "D-j-M-Y" OR $admin_info[signup_format_date] == "D j M Y" OR $weblog_info[date_format] == "j-M-Y") { $mf = "M"; } elseif($admin_info[signup_format_date] == "F j, Y" OR $admin_info[signup_format_date] == "l, F j, Y" OR $admin_info[signup_format_date] == "l, F j" OR $admin_info[signup_format_date] == "j F Y" OR $admin_info[signup_format_date] == "l j F Y") { $mf = "F"; } $mbox = " "; // DAYBOX if($admin_info[signup_format_date] == "Y-m-d") { $z = "0"; } else { $z = ""; } $dbox = ""; // YEARBOX $ybox = " "; } else { $thism = cdate("n", $user_info[birthday]); $thisd = cdate("j", $user_info[birthday]); $thisy = cdate("Y", $user_info[birthday]); echo " "; } if($admin_info[field_city] == 3 | $admin_info[field_city] == 2) { echo " "; } else { echo ""; } if($admin_info[field_state] == 3 | $admin_info[field_state] == 2) { echo " "; } else { echo ""; } if($admin_info[field_country] == 3 | $admin_info[field_country] == 2) { $c = $country; include "countries.php"; echo " "; } else { echo ""; } if($admin_info[field_interests] == 3 | $admin_info[field_interests] == 2) { echo " "; } else { echo ""; } $custom_fields = mysql_query("SHOW COLUMNS FROM bhost_profile FROM `$mysql_database`"); $tabindex = 15; while($custom = mysql_fetch_assoc($custom_fields)) { if($custom[Field] != "p_id" & $custom[Field] != "u_id") { $custom_name = str_replace("_", " ", substr($custom[Field], 0, -3)); $custom_required = substr($custom[Field], -3, 2); $custom_type = $custom[Type]; $custom_field = $custom[Field]; $custom_field_value = ${"$custom_field"}; $required = ""; if($custom_required == "_3") { $required = "*"; } if($custom_required == "_3" | $custom_required == "_2") { $tips = mysql_fetch_assoc(mysql_query("SELECT * FROM bhost_profile WHERE u_id='0'")); if($custom_type == "text") { echo " "; } else { echo " "; } $tabindex++; } else { echo ""; } } } echo "
$signup49"; if($admin_info[field_fname] == "3") { echo "*"; } echo "
"; show_error($error[fname]); echo "
$signup50"; if($admin_info[field_lname] == "3") { echo "*"; } echo "
"; show_error($error[lname]); echo "
$signup51"; if($admin_info[field_display_name] == "3") { echo "*"; } echo "
"; show_error($error[display_name]); echo "
$signup52"; if($admin_info[field_website] == "3") { echo "*"; } echo "
"; show_error($error[website]); echo "
$signup53"; if($admin_info[field_screenname] == "3") { echo "*"; } echo "
"; show_error($error[screenname]); echo "
$signup54"; if($admin_info[field_gender] == "3") { echo "*"; } echo " "; show_error($error[gender]); echo "
$signup57"; if($admin_info[field_birthday] == "3") { echo "*"; } echo "
$boxes
"; show_error($error[birthday]); echo "
$signup58"; if($admin_info[field_city] == "3") { echo "*"; } echo " "; show_error($error[city]); echo "
$signup59"; if($admin_info[field_state] == "3") { echo "*"; } echo " "; show_error($error[state]); echo "
$signup60"; if($admin_info[field_country] == "3") { echo "*"; } echo " "; show_error($error[country]); echo "
$signup61"; if($admin_info[field_interests] == "3") { echo "*"; } echo " "; show_error($error[interests]); echo "
$custom_name$required "; tip($tips[$custom_field]); echo "
"; show_error($error[$custom_field]); echo "
$custom_name$required "; tip($tips[$custom_field]); echo "
"; show_error($error[$custom_field]); echo "

"; echo $foot; exit(); } // STEP ONE if($task == "step_one") { if($is_error[1] != "yes") { $g_id = ""; $weblog = ""; $title = ""; $wc_id = ""; $description = ""; $username = ""; $password1 = ""; $password2 = ""; $secure_question = ""; $secure_answer = ""; $email = ""; } if(isset($_POST['weblog_name']) AND $_POST['weblog_name'] != "") { $weblog = $_POST['weblog_name']; } $path = url("index", "PATH"); $path = str_replace("PATH", "  ", $path); if(substr($path, -1) == "/") { $path = substr($path, 0, -1); } echo $head; echo "

$signup62

$signup63

"; if($error[general] != "") { show_error($error[general]); echo "

"; } echo " "; $groups = mysql_query("SELECT * FROM bhost_groups WHERE show_group='1' ORDER BY g_id"); if(mysql_num_rows($groups) != 0) { echo " "; $num_weblogs = 1; } else { $default = mysql_fetch_assoc(mysql_query("SELECT g_id, num_weblogs FROM bhost_groups WHERE default_group='1' LIMIT 1")); $num_weblogs = $default[num_weblogs]; echo ""; } if($num_weblogs != "0") { if($admin_info[field_address] != "1") { echo " "; } if($admin_info[field_title] == "3" | $admin_info[field_title] == "2") { echo " "; } else { echo ""; } $categories = mysql_query("SELECT * FROM bhost_categories ORDER BY name"); if($admin_info[categories_on] != 0 & mysql_num_rows($categories) != 0) { echo " "; } else { echo ""; } if($admin_info[field_description] == "3" | $admin_info[field_description] == "2") { echo " "; } else { echo ""; } } echo " "; if($admin_info[allow_password] == 1) { echo " "; } else { $password = randomcode(); echo " "; } echo " "; // SHOW IMAGE CODE VERIFICATION ROW IF ENABLED AND GD IS INSTALLED if($admin_info[signup_image] AND function_exists('gd_info')) { echo " "; } else { echo " "; } // SHOW TERMS AND CONDITIONS ROW IF ENABLED if($admin_info[signup_terms] == 1) { echo " "; } else { echo ""; } echo "
$signup64*
$signup65"; if($admin_info[field_address] == "3") { echo "*"; } echo " $path"; tip2("68", "69"); echo "
$signup75
"; show_error($error[weblog]); echo "
$signup66"; if($admin_info[field_title] == "3") { echo "*"; } echo " "; tip2("5", "6"); echo "
"; show_error($error[title]); echo "
$signup67"; if($admin_info[categories_on] == "2") { echo "*"; } echo "
"; show_error($error[wc_id]); echo "
$signup68"; if($admin_info[field_description] == "3") { echo "*"; } echo "
"; show_error($error[description]); echo "
$signup69* "; tip2("11", "12"); echo "
"; show_error($error[username]); echo "
$signup70* "; tip2("13", "14"); echo "
"; show_error($error[password1]); echo "
$signup71* "; tip2("15", "16"); echo "
"; show_error($error[password2]); echo "
$signup78* "; tip2("9", "10"); echo "
"; show_error($error[secure_question]); echo "
$signup79* "; tip2("70", "71"); echo "
"; show_error($error[secure_answer]); echo "
$signup72*
"; show_error($error[email]); echo "
$signup73*
"; tip2("17", "18"); echo " 
"; show_error($error[code]); echo "
 
"; show_error($error[agree]); echo "

"; echo $foot; exit(); } ?>