<?php
/*
script: upgrade.php
purpose: displays the upgrade to a paid account form.
copyright: copyright 2004 Php Image Host. All Rights Reserved. You may modify this file for use on your
					site running a licenced copy of the Php Image Host scripts.
					You must not distribute this file or derivations of it.
Nullified By CrAcKlOvE

*/

// include general configuration options

require_once(dirname(__FILE__).'/includes/config.inc.php');

// include the site header

require_once(dirname(__FILE__).'/header.php');

// display the introductory text for the upgrade page

$pagecontent->display('Upgrade');

if( !$loggedin ){
	// if not logged in, display the content telling the user they need to create
	// a free account and login to it in order to upgrade

	$pagecontent->display('Upgrade - Not Logged In');

}elseif( $user->account_type == 'free' ){

	// the user is logged in and currently has a free account.
	// display relevant message.
	
	$pagecontent->display('Upgrade - Logged In');
?>
<div class="memberform">
<table class="membertable" cellspacing="1" cellpadding="0" border="0" align="center">
<tr>
	<td colspan="2" class="memberheading">Upgrade To A <?php echo htmlspecialchars($plans['paid']->type_name);?> Account</td>
</tr>
<tr>
	<td class="memberlabel">Username:</td>
	<td class="memberfield"><?php echo $user->username;?></td>
</tr>
<tr>
	<td class="memberlabel">1 Month @ $<?php echo number_format($config->price_1,2);?></td>
	<td class="memberfield">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="<?php echo $config->paypal_email;?>">
<input type="hidden" name="item_name" value="<?php echo htmlspecialchars($config->sitename);?>">
<input type="hidden" name="item_number" value="<?php echo htmlspecialchars($user->username);?>">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="<?php echo $config->siteurl;?>upgrade.php">
<input type="hidden" name="cancel_return" value="<?php echo $config->siteurl;?>upgrade.php">
<input type="hidden" name="notify_url" value="<?php echo $config->siteurl;?>notify.php" />
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="<?php echo number_format($config->price_1,2);?>">
<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">
</form>
<!-- end paypal form code -->
	</td>
</tr>

<tr>
	<td class="memberlabel">3 Months @ $<?php echo number_format($config->price_3,2);?></td>
	<td class="memberfield">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="<?php echo $config->paypal_email;?>">
<input type="hidden" name="item_name" value="<?php echo htmlspecialchars($config->sitename);?>">
<input type="hidden" name="item_number" value="<?php echo htmlspecialchars($user->username);?>">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="<?php echo $config->siteurl;?>upgrade.php">
<input type="hidden" name="cancel_return" value="<?php echo $config->siteurl;?>upgrade.php">
<input type="hidden" name="notify_url" value="<?php echo $config->siteurl;?>notify.php" />
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="<?php echo number_format($config->price_3,2);?>">
<input type="hidden" name="p3" value="3">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>
<!-- end paypal form code -->
	</td>
</tr>

<tr>
	<td class="memberlabel">6 Months @ $<?php echo number_format($config->price_6,2);?></td>
	<td class="memberfield">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="<?php echo $config->paypal_email;?>">
<input type="hidden" name="item_name" value="<?php echo htmlspecialchars($config->sitename);?>">
<input type="hidden" name="item_number" value="<?php echo htmlspecialchars($user->username);?>">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="<?php echo $config->siteurl;?>upgrade.php">
<input type="hidden" name="cancel_return" value="<?php echo $config->siteurl;?>upgrade.php">
<input type="hidden" name="notify_url" value="<?php echo $config->siteurl;?>notify.php" />
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="<?php echo number_format($config->price_6,2);?>">
<input type="hidden" name="p3" value="6">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>
<!-- end paypal form code -->
	</td>
</tr>

<tr>
	<td class="memberlabel">12 Months: $<?php echo number_format($config->price_12,2);?></td>
	<td class="memberfield">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="<?php echo $config->paypal_email;?>">
<input type="hidden" name="item_name" value="<?php echo htmlspecialchars($config->sitename);?>">
<input type="hidden" name="item_number" value="<?php echo htmlspecialchars($user->username);?>">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="<?php echo $config->siteurl;?>upgrade.php">
<input type="hidden" name="cancel_return" value="<?php echo $config->siteurl;?>upgrade.php">
<input type="hidden" name="notify_url" value="<?php echo $config->siteurl;?>notify.php" />
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="<?php echo number_format($config->price_12,2);?>">
<input type="hidden" name="p3" value="12">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>
<!-- end paypal form code -->
	</td>
</tr>


</table>
</div>
<?php

}else{

	// the user is logged in and already has a paid account.
	// they can't upgrade again

	$pagecontent->display('Upgrade - Already Upgraded');

}

// include the site footer.

require_once(dirname(__FILE__).'/footer.php');

?>
