<?php
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//   Program Name         : ProPhotoHost                                     //
//   Release Version      : 1.0                                              //
//   Home Page            : http://www.prophotohost.com                      //
//   Program Author       : Jake P                                           //
//   Supplied by          : drew010                                          //
//   Nullified by         : CyKuH [WTN]                                      //
//   Distribution         : via WebForum, ForumRU and associated file dumps  //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
session_start();
include('i.setup.php');
include('i.connection.php');
include('i.function.php');
?>

<html>

<head>
<title><?php print($page_title); ?></title>

<?php include('i.style.php'); ?>

<script language="javascript">
	
	function js_gotopaypal() {
		document.paypal.submit();
	}
	
</script>

</head>

<body <?php if($session_access == false) { ?>onload="document.login.email.focus();"<?php } ?> marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0">
	
	<table width="100%" cellpadding="0" cellspacing="0">
		
		<?php include('i.header.php'); ?>
		
		<tr>
			
			<td valign="top">
				
				<table cellpadding="0" cellspacing="0">
					
					<tr>
						
						<td><font face="verdana" size="1">&nbsp;&nbsp;&nbsp;</font></td>
						
					</tr>
					
				<tr>
					
					<td><font face="verdana" size="1">&nbsp;&nbsp;&nbsp;</font></td>
					
					<td valign="top">
						
						<table cellpadding="0" cellspacing="0">
							
							<?php include('i.tab.php'); ?>
							
						</table>
						
					</td>
					
					<td><font face="verdana" size="1">&nbsp;&nbsp;</font></td>
					
					<td valign="top" width="100%">
						
						<table width="100%" cellpadding="0" cellspacing="0">
							
							<tr>
								
								<td><font face="verdana" size="1">&nbsp;</font></td>
								
								<td width="100%">
									
									<table width="100%" cellpadding="0" cellspacing="0">
										
										<tr>
											
											<td><img src="./images/heading.confirm.gif"></td>
											
										</tr>
										
										<tr>
											
											<td height="8" background="images/hr.gif"></td>
											
										</tr>
										
										<tr>
											
											<td><font face="verdana" size="1">&nbsp;</font></td>
											
										</tr>
										
										<tr>
											
											<td valign="top">
												
												<table height="250">
													
													<?php
													switch($confirm) {
														case "signup":
														?>
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">Thank you for signing up with <?php print($page_name); ?>, an e-mail has been sent to you with your activation information.</font></td>
															
														</tr>
														
														<?php
															break;
														case "logout";
														
														$session_access = false;
														$session_admin = false;
														?>
														
														<meta http-equiv="refresh" content="2;url=./index.php">
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">You have been successfully logged out.<br><a href="./index.php">Click here</a> to login.</font></td>
															
														</tr>
														
														<?php
															break;
														case "cancel";
														
														$query = mysql_query("SELECT member_name, member_email FROM member WHERE member_id = '$session_member_id'");
														$data = mysql_fetch_object($query, $db);
														
														$sql = "UPDATE member SET member_status='D', updated_on='$date' WHERE member_id = '$session_member_id'";
														$result = mysql_query($sql);
														
														$message .= "Member removal process\n\n";
														$message .= "Name: " . $data->member_name . "\n";
														$message .= "E-mail: " . $data->member_email . "\n\n";
														$message .= "Your account has been removed successfully at your request.\n";
														$message .= "Please visit https://www.paypal.com/cgi-bin/webscr?cmd=_subscr-find&alias=" . $data->member_email . " to cancel your subscription to " . $page_name . "\n";
														
														mail($data->member_email, $page_name . " removal notice", $message, "From: " . $page_support_email);
														
														$session_access = false;
														$session_admin = false;
														?>
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">Your membership has now been cancelled please go to paypal via the link below to cancel your subscription.<br><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_subscr-find&alias=<?php print($data->member_email); ?>">https://www.paypal.com/cgi-bin/webscr?cmd=_subscr-find&alias=<?php print($data->member_email); ?></a></font></td>
															
														</tr>
														
														<?php
															break;
														case "contactus";
														?>
														
														<meta http-equiv="refresh" content="5;url=./index.php">
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">Thank you, your question/comment has been sent.</font></td>
															
														</tr>
														
														<?php
															break;
														case "preference";
														?>
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">Your preferences have been updated.<br><a href="./home.php">Click here</a> to go home.</font></td>
															
														</tr>
														
														<?php
															break;
														case "forgot";
														?>
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">Your new password has been e-mailed to you.<br><a href="./index.php">Click here</a> to login.</font></td>
															
														</tr>
														
														<?php
															break;
														case "paypalpayment";
														
														$query = mysql_query("SELECT member_email FROM member WHERE member_key = '$signup_member_key'", $db);
														$data = mysql_fetch_object($query, $db);
														
														$message .= "Thank you for taking the time to signup with " . $page_name . "\n\n";
														$message .= "Please follow the link below or copy and paste it into your address bar to complete your membership\n";
														$message .= $page_url . "/verify.php?member_key=" . $signup_member_key . "\n\n";
														
														mail($data->member_email, "Welcome to " . $page_name, $message, "From: " . $page_signup_email);
														?>
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">Thank you for signing up with <?php print($page_name); ?>.  Your registration is now complete, please check your email for activation instructions.</font></td>
															
														</tr>
														
														<?php
															break;
														case "change";
														?>
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">Your password has been successfully changed.<br><br><a href="./home.php">Click here</a> to go home</font></td>
															
														</tr>
														
														<?php
															break;
														case "gotopaypal";
														?>
														
														<meta http-equiv="refresh" content="3;url=javascript:js_gotopaypal();">
														
														<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="paypal">
															<input type="hidden" name="cmd" value="_xclick-subscriptions">
															<input type="hidden" name="business" value="<?php print($paypal_email); ?>">
															<input type="hidden" name="item_name" value="<?php print($page_name); ?>">
															<input type="hidden" name="item_number" value="<?php print($signup_member_key); ?>">
															<input type="hidden" name="no_shipping" value="1">
															<input type="hidden" name="return" value="<?php print($page_url); ?>/confirmation.php?confirm=paypalpayment&memebr_key=<?php print($signup_member_key); ?>">
															<input type="hidden" name="cancel_return" value="<?php print($page_url); ?>">
															<input type="hidden" name="no_note" value="1">
															<input type="hidden" name="a3" value="<?php print($service_pricing); ?>">
															<input type="hidden" name="p3" value="1">
															<input type="hidden" name="t3" value="M">
															<input type="hidden" name="src" value="1">
															<input type="hidden" name="sra" value="1">
															
															<tr>
																
																<td valign="top"><font face="verdana" size="1">Signup is almost complete.  To finish signup please make payment on the following page.<br>You will be sent to paypal in a few seconds, otherwise <a href="javascript:js_gotopaypal();">click here</a>.</font></td>
																
															</tr>
															
														</form>
														
														<?php
															break;
														default:
														?>
														
														<tr>
															
															<td valign="top"><font face="verdana" size="1">Confirmed</font></td>
															
														</tr>
														
														<?php
															break;
													}
													?>
													
												</table>
												
											</td>
											
										</tr>
										
										<tr>
										
										<tr>
											
											<td><font face="verdana" size="1">&nbsp;</font></td>
											
										</tr>
										
										<tr>
											
											<td height="8" background="images/hr.gif"></td>
											
										</tr>
										
									</table>
									
								</td>
								
								<td><font face="verdana" size="1">&nbsp;</font></td>
								
							</tr>
							
						</table>
						
					</td>
					
				</tr>
				
			</table>
			
		</td>
		
	</tr>
	
	<?php include('i.footer.php'); ?>
	
	</table>
	
</body>

</html>