							<!--
							**************************
							***** BEGIN RIGHT NAV ****
							**************************
							-->						
							<table cellpadding="0" cellspacing="0" border="0">
								<tr>
									<td><img src="./images/NavHeader.gif"></td>
								</tr>
								<tr>
									<td><a href="upload.images.php" onmouseover="UploadImages.src='./images/ButtonUploadImagesOn.gif';" onmouseout="UploadImages.src='./images/ButtonUploadImages.gif';"><img src="./images/ButtonUploadImages.gif" name="UploadImages" border="0"></td>
								</tr>
								<tr>
									<td><a href="image.manager.php" onmouseover="ImageManager.src='./images/ButtonImageManagerOn.gif';" onmouseout="ImageManager.src='./images/ButtonImageManager.gif';"><img src="./images/ButtonImageManager.gif" name="ImageManager" border="0"></td>
								</tr>
								
								<tr>
									<td><a href="make.gallery.php" onmouseover="gallery.src='./images/nav_gallery_on.gif';" onmouseout="gallery.src='./images/nav_gallery_off.gif';"><img src="./images/nav_gallery_off.gif" name="gallery" border="0"></td>
								</tr>
								<?
									$member_result = mysql_query("SELECT custom_plan,custom_slideshow,custom_portfolio,plan,custom_spin FROM members WHERE member_id = '$mid'");
									$member = mysql_fetch_object($member_result);
									
									if($member->custom_plan == 1){
										$slideshow = $member->custom_slideshow;
										$portfolio = $member->custom_portfolio;
										$spin = $member->custom_spin;
									}
									else{
										$plan_result = mysql_query("SELECT slideshow,portfolio,spin FROM plans WHERE plan_id = '$member->plan'");
										$plan = mysql_fetch_object($plan_result);
										$slideshow = $plan->slideshow;
										$portfolio = $plan->portfolio;
										$spin = $plan->spin;
										
									}
									
									if($slideshow == "1"){
								?>
								<tr>
									<td><a href="make.slideshow.php" onmouseover="slideshow.src='./images/nav_slide_on.gif';" onmouseout="slideshow.src='./images/nav_slide_off.gif';"><img src="./images/nav_slide_off.gif" name="slideshow" border="0"></td>
								</tr>
								<?
									}
									if($portfolio == "1"){
								?>
								<tr>
									<td><a href="make.portfolio.php" onmouseover="portfolio.src='./images/nav_port_on.gif';" onmouseout="portfolio.src='./images/nav_port_off.gif';"><img src="./images/nav_port_off.gif" name="portfolio" border="0"></td>
								</tr>
								<?
									}
								?>
								<?
									if($spin == "1"){
								?>
								<tr>
									<td><a href="make.spin.php" onmouseover="spin.src='./images/nav_spin_on.gif';" onmouseout="spin.src='./images/nav_spin_off.gif';"><img src="./images/nav_spin_off.gif" name="spin" border="0"></td>
								</tr>
								<?
									}
								?>
								<tr>
									<td><a href="preferences.php" onmouseover="Preferences.src='./images/ButtonPreferencesOn.gif';" onmouseout="Preferences.src='./images/ButtonPreferences.gif';"><img src="./images/ButtonPreferences.gif" name="Preferences" border="0"></td>
								</tr>
								<tr>
									<td><a href="upgrade.php" onmouseover="upgrade.src='./images/nav_upgrade_on.gif';" onmouseout="upgrade.src='./images/nav_upgrade_off.gif';"><img src="./images/nav_upgrade_off.gif" name="upgrade" border="0"></td>
								</tr>
								<tr>
									<td><a href="actions.php?pmode=logout" onmouseover="Logout.src='./images/ButtonLogoutOn.gif';" onmouseout="Logout.src='./images/ButtonLogout.gif';"><img src="./images/ButtonLogout.gif" name="Logout" border="0"></td>
								</tr>
								<tr>
									<td align="center" valign="top" background="./images/RightNavBG.gif">
										<table cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td>&nbsp;</td>
											</tr>
											<tr>
												<td align="center">
												<?
												$member_result = mysql_query("SELECT * FROM members WHERE member_id = '$mid'", $db);						
												$member = mysql_fetch_object($member_result);
												
												$used_space = "0";
												$image_result = mysql_query("SELECT image_id,file_size FROM images WHERE mid = '$mid'", $db);
												$image_count = mysql_num_rows($image_result);
												while($img = mysql_fetch_object($image_result)){
													$used_space = $used_space + ($img->file_size/1000);
												}
													//$s_date = substr($member->signup_date, 4, 2) . "/" . substr($member->signup_date, 6, 2) . "/" . substr($member->signup_date, 0, 4);
													//$l_date = substr($member->login_date, 4, 2) . "/" . substr($member->login_date, 6, 2) . "/" . substr($member->login_date, 0, 4);
														
														$renew_days = $member->renew - date("z");
														
														
														
														if($member->custom_plan == 1){
															$ratio = $member->used_bandwidth / $member->custom_bandwidth;
															$space_ratio = $used_space / $member->custom_space;
															
															if($member->custom_bandwidth == "99999"){
																$bw_show = "U";
																$bw_available == "99999";
															}
															else{
																$bw_show = "L";
																$bw_available = $member->custom_bandwidth;																
															}
															
															if($member->custom_space == "99999"){
																$space_show = "U";
																$space_available == "99999";
															}
															else{
																$space_show = "L";
																$space_available = $member->custom_space;																
															}
															$pname = "Custom";
															//$space_available = $member->custom_space;
														}
														else {
															$plan_result = mysql_query("SELECT * FROM plans WHERE plan_id = '$member->plan'");
															$plan = mysql_fetch_object($plan_result);
																$ratio = $member->used_bandwidth / $plan->bandwidth;
																$space_ratio = $used_space / $plan->space;
																
																if($plan->bandwidth == "99999"){
																	$bw_show = "U";
																	$bw_available == "99999";
																}
																else{
																	$bw_show = "L";
																	$bw_available = $plan->bandwidth;																
																}
																
																if($plan->space == "99999"){
																	$space_show = "U";
																	$space_available == "99999";
																}
																else{
																	$space_show = "L";
																	$space_available = $plan->space;																
																}
																
																//$bw_available = $plan->bandwidth;
																//$space_available = $plan->space;
																$pname = $plan->name;
														}
														
														$used_bw_w = round(175 * $ratio);
														$free_bw_w = 175 - $used_bw_w;
														
														$used_space_w = round(175 * $space_ratio);
														$free_space_w = 175 - $used_space_w;
												?>											
												<table cellpadding="0" cellspacing="0" width="90%" bgcolor="#345367" style="border: 1px solid #507F9B;">
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Your Plan:</b></td>
														<td><font face="verdana" size="1" color="#8AD2F9"><b><?php echo $pname; ?></b></td>
													<tr>
													
													
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Disk Space Used:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b><?php echo round($used_space, 2); ?>mb</b></td>
													</tr>
													<? if($space_show == "U"){ ?>
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Disk Space Allowed:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b>Unlimited</b></td>
													</tr>
													<?
														}
														else{
													?>
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Disk Space Allowed:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b><?php echo $space_available; ?>mb</b></td>
													</tr>
													<tr>
														<td colspan="2" style="padding: 5px;" nowrap><img src="./images/Bar.gif" width="<?php echo $used_space_w; ?>" height="15"><img src="./images/Bar2.gif" width="<?php echo $free_space_w; ?>" height="15"></td>
													</td>
													<?
														}
													?>
													
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Bandwidth Used:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b><?php echo round($member->used_bandwidth, 2); ?>mb</b></td>
													</tr>
													<? if($bw_show == "U"){ ?>
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Bandwidth Allowed:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b>Unlimited</b></td>
													</tr>
													<?
														}
														else{
													?>
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Bandwidth Allowed:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b><?php echo $bw_available; ?>mb</b></td>
													</tr>
													<tr>
														<td colspan="2" style="padding: 5px;" nowrap><img src="./images/Bar.gif" width="<?php echo $used_bw_w; ?>" height="15"><img src="./images/Bar2.gif" width="<?php echo $free_bw_w; ?>" height="15"></td>
													</td>
													<?
														}
													?>
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Images Hosted:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b><?php echo $image_count; ?></b></td>
													</tr>
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Total Image Views:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b><?php echo $member->total_views; ?></b></td>
													</tr>
													<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Views This Period:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b><?php echo $member->cycle_views; ?></b></td>
													</tr>
												<!--	<tr>
														<td style="padding: 5px;" nowrap><font face="verdana" size="1" color="#ffffff"><b>Bandwidth Renews In:</b></td>
														<td nowrap><font face="verdana" size="1" color="#8AD2F9"><b><?php echo $renew_days; ?> Days</b></td>
													</tr>-->
													
												</table>
												</td>
											</tr>
											<tr>
												<td>&nbsp;</td>
											</tr>
											<tr>
												<td><img src="./images/RightNavDivider2.gif"></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
							<!--
							**************************
							****** END RIGHT NAV *****
							**************************
							-->