<?
/*
Website Settings Manager Plugin (General Use)
Build Date 2.7.2003
*/
?>				

					<table>
					
						<tr>
						
							<td colspan="2">&nbsp;</td>
						
						</tr>
						
						<? if($saved == "1"){ ?>
						<tr>
						
							<td align="right" valign="middle"><img src="images/floppy.icon.gif"></td>
							<td valign="middle"><font face="verdana" size="2" color="red">Your settings have been saved.</td>
						
						</tr>
						
						<tr>
						
							<td colspan="2">&nbsp;</td>
						
						</tr>
						<? } ?>
						
						<script language="javascript">
						function save_np() {
							var agree=confirm("Are you sure you want to add a new plan?");
							if (agree) {
								document.settings.action = "actions.php?a_mode=save_new_plan";
								document.settings.submit();
							}
							else {
								false
							}
						}
						</script>
						
						<form action="actions.php?a_mode=save_settings" name="settings" method="post">
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Site Title: </b></font></td>
							<td><input type="text" name="title" value="<? echo $setup->title ; ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Site URL: </b></font></td>
							<td><input type="text" name="site_url" value="<? echo $setup->url ; ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Tagline: </b></font></td>
							<td><input type="text" name="tagline" value="<? echo $setup->tagline ; ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Support Email: </b></font></td>
							<td><input type="text" name="support_email" value="<? echo $setup->support_email ; ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Personal Email: </b></font></td>
							<td><input type="text" name="personal_email" value="<? echo $setup->personal_email ; ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<!--
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Control Panel: </b></font></td>
							<td><input type="text" name="cpanel" value="<? echo $setup->cpanel ; ?>" maxlength="200" style="font-size: 10; width: 300"></td>
							
						</tr>
						-->
						
						<tr>
						
							<td align="right" valign="top"><font face="verdana" size="2" color="#8C8E91"><b>Keywords: </b></font></td>
							<td><textarea name="keywords" style="height: 100; width: 300"><? echo $setup->meta_keywords ; ?></textarea></td>
							
						</tr>
						
						<tr>
						
							<td align="right" valign="top"><font face="verdana" size="2" color="#8C8E91"><b>Site Description: </b></font></td>
							<td><textarea name="description" style="height: 100; width: 300"><? echo $setup->meta_description ; ?></textarea></td>
							
						</tr>
						<!--
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Limit Uploads To: </b></font></td>
							<td><font face="verdana" size="2" color="#8C8E91"><input type="text" name="max_fs" value="<? echo $setup->max_fs; ?>" maxlength="200" style="font-size: 10; width: 100"> kb</td>
							
						</tr>
						-->
												
						<tr>
						
							<td colspan="2"><hr color="#8C8E91" size="1"></td>
							
						</tr>
						
						<?
							$plan_result = mysql_query("SELECT * FROM plans order by 'display_order'");
							$x_rows = mysql_num_rows($plan_result);
							while($plan = mysql_fetch_object($plan_result)){
						?>
						<input type="hidden" value="<? echo $plan->plan_id; ?>" name="plan_id[]">
						<tr>
						
							<td bgcolor="#eeeeee" colspan="2">
							
								<table width="100%">
						
									<tr>
									
										<td align="left" colspan="2" bgcolor="#D7D6D6"><font face="verdana" size="2" color="#333333"><b><? echo $plan->name; ?> Plan</b></font></td>
										
									</tr>						
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Subscription Price: </b></font></td>
										<td><input type="text" name="price[]" value="<? echo $plan->price ; ?>" style="font-size: 10; width: 100"> <font face="verdana" size="2" color="#8C8E91"><b>Per Month</b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right" valign="top"><font face="verdana" size="2" color="#8C8E91"><b>Bandwidth: </b></font></td>
										<td><input type="text" name="bandwidth[]" value="<? echo $plan->bandwidth; ?>" style="font-size: 10; width: 100"> <font face="verdana" size="2" color="#8C8E91"><b>MB Per Month</b><br><font size="1" face="verdana">(enter 99999 for unlimited)</font></td>
										
									</tr>
									
									<tr>
									
										<td align="right" valign="top"><font face="verdana" size="2" color="#8C8E91"><b>Disk Space: </b></font></td>
										<td><input type="text" name="disk_space[]" value="<? echo $plan->space; ?>" style="font-size: 10; width: 100"> <font face="verdana" size="2" color="#8C8E91"><b>MB</b><br><font size="1" face="verdana">(enter 99999 for unlimited)</font></td>
										
									</tr>
									
									<tr>
									
										<td align="right" valign="top"><font face="verdana" size="2" color="#8C8E91"><b>Display Order: </b></font></td>
										<td><input type="text" name="display_order[]" value="<? echo $plan->display_order; ?>" style="font-size: 10; width: 100"> </td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Branding: </b></font></td>
										<td><input type="radio" name="branding_<? echo $plan->plan_id; ?>" value="1" <? if($plan->branding == "1"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="branding_<? echo $plan->plan_id; ?>" value="0" <? if($plan->branding == "0"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Portfolio: </b></font></td>
										<td><input type="radio" name="portfolio_<? echo $plan->plan_id; ?>" value="1" <? if($plan->portfolio == "1"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="portfolio_<? echo $plan->plan_id; ?>" value="0" <? if($plan->portfolio == "0"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Spins: </b></font></td>
										<td><input type="radio" name="spin_<? echo $plan->plan_id; ?>" value="1" <? if($plan->spin == "1"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="spin_<? echo $plan->plan_id; ?>" value="0" <? if($plan->spin == "0"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Slideshow: </b></font></td>
										<td><input type="radio" name="slideshow_<? echo $plan->plan_id; ?>" value="1" <? if($plan->slideshow == "1"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="slideshow_<? echo $plan->plan_id; ?>" value="0" <? if($plan->slideshow == "0"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right" colspan="2"><font face="verdana" size="2" color="#8C8E91"><? if($mgr_login_type == "demo"){ ?>Delete Plan<? } else { ?><b><a href="actions.php?a_mode=delete_plan&pid=<? echo $plan->plan_id; ?>">Delete This Plan</a><? } ?></b></font></td>
										
									</tr>
									
								</table>
								
							</td>
							
						</tr>
						
						<?
							} 
						?>
						<tr>
						
							<td bgcolor="#eeeeee" colspan="2">
							
								<table width="100%">
						
									<tr>
									
										<td align="left" colspan="2" bgcolor="#D7D6D6"><font face="verdana" size="2" color="#333333"><b>Add A New Plan</b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Plan Name: </b></font></td>
										<td><input type="text" name="np_name" style="font-size: 10; width: 100"> <font face="verdana" size="2" color="#8C8E91"></font></td>
										
									</tr>					
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Subscription Price: </b></font></td>
										<td><input type="text" name="np_price" style="font-size: 10; width: 100"> <font face="verdana" size="2" color="#8C8E91"><b>Per Month</b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right" valign="top"><font face="verdana" size="2" color="#8C8E91"><b>Bandwidth: </b></font></td>
										<td><input type="text" name="np_bw" style="font-size: 10; width: 100"> <font face="verdana" size="2" color="#8C8E91"><b>MB Per Month</b><br><font size="1" face="verdana">(enter 99999 for unlimited)</font></td>
										
									</tr>
									
									<tr>
									
										<td align="right" valign="top"><font face="verdana" size="2" color="#8C8E91"><b>Disk Space: </b></font></td>
										<td><input type="text" name="np_disk_space" style="font-size: 10; width: 100"> <font face="verdana" size="2" color="#8C8E91"><b>MB</b><br><font size="1" face="verdana">(enter 99999 for unlimited)</font></td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Branding: </b></font></td>
										<td><input type="radio" name="np_branding" value="1" checked><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="np_branding" value="0"><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Portfolio: </b></font></td>
										<td><input type="radio" name="np_portfolio" value="1" checked><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="np_portfolio" value="0"><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Spin: </b></font></td>
										<td><input type="radio" name="np_spin" value="1" checked><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="np_slideshow" value="0"><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
										
									</tr>
									
									<tr>
									
										<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Slideshow: </b></font></td>
										<td><input type="radio" name="np_slideshow" value="1" checked><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="np_spin" value="0"><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
										
									</tr>
									
									
									<tr>
									
										<td colspan="2" align="right"><? if($mgr_login_type == "demo"){ ?><img src="images/b.submit.gif" onclick="demo_mode()"><? } else { ?><input type="button" onclick="save_np();" value="Add This Plan"><? } ?></td>
										
									</tr>
									
								</table>
								
							</td>
							
						</tr>
						
						<tr>
							
							<td colspan="2" height="4"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Paypal Email: </b></font></td>
							<td><input type="text" name="paypal_email" value="<? echo $setup->paypal_email ; ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td colspan="2"><hr color="#8C8E91" size="1"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Manager Username: </b></font></td>
							<td><input type="text" name="mgr_username" value="<? if($mgr_login_type == "demo"){ ?>*******<? } else { ?><? echo $setup->mgr_username ; ?><? } ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Manager Password: </b></font></td>
							<td><input type="text" name="mgr_password" value="<? if($mgr_login_type == "demo"){ ?>*******<? } else { ?><? echo $setup->mgr_password ; ?><? } ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td colspan="2"><hr color="#8C8E91" size="1"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Manager Style: </b></font></td>
							<td>
							<select name="mgr_style" style="font-size: 10; width: 300">
							<?
							$sel_style_result = mysql_query("SELECT * FROM mgr_styles", $db);
							while($sel_style = mysql_fetch_object($sel_style_result)){
							?>
								<option value="<? echo $sel_style->style_id ; ?>" <? if($sel_style->style_id == $setup->mgr_style){ echo "selected"; } ?>><? echo $sel_style->name ; ?></option>
							<?
								}
							?>
							</select>							
							</td>
							
						</tr>
												
						<? if($mgr_login_type == "administrator"){ ?>
						<input type="hidden" name="admin_status" value="1">
						
						<tr>
						
							<td colspan="2"><hr color="#8C8E91" size="1"></td>
							
						</tr>
											
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Access ID: </b></font></td>
							<td><input type="text" name="access_id" value="<? echo $setup->access_id; ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td align="right" valign="top"><font face="verdana" size="2" color="#8C8E91"><b>Error Message: </b></font></td>
							<td><textarea name="errormsg" style="width: 300; height: 100;"><? echo $setup->error; ?></textarea></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Public BgColor: </b></font></td>
							<td><input type="text" name="public_bgcolor" value="<? echo $setup->public_bgcolor ; ?>" style="font-size: 10; width: 300"></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Quick Stats: </b></font></td>
							<td><input type="radio" name="quick_stats" value="1" <? if($setup->quick_stats == "1"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="quick_stats" value="0" <? if($setup->quick_stats == "0"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Demo Mode: </b></font></td>
							<td><input type="radio" name="demo_mode" value="1" <? if($setup->demo_mode == "1"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="demo_mode" value="0" <? if($setup->demo_mode == "0"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Author Branding: </b></font></td>
							<td><input type="radio" name="branding" value="1" <? if($setup->branding == "1"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="branding" value="0" <? if($setup->branding == "0"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
							
						</tr>
						
						<tr>
						
							<td align="right"><font face="verdana" size="2" color="#8C8E91"><b>Website Status: </b></font></td>
							<td><input type="radio" name="website_status" value="<? echo MD5("1"); ?>" <? if($setup->website_status == MD5("1")){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>On </b></font><input type="radio" name="website_status" value="0" <? if($setup->website_status == "0"){ echo "checked"; } ?>><font face="verdana" size="2" color="#8C8E91"><b>Off </b></font></td>
							
						</tr>
										
						<? } ?>
						
						<tr>
							
							<td colspan="2" align="right"><? if($mgr_login_type == "demo"){ ?><img src="images/b.submit.gif" onclick="demo_mode()"><? } else { ?><input type="image" src="images/b.submit.gif"><? } ?></td>
							
						</tr>
						
						<tr>
						
							<td colspan="2"><hr color="#8C8E91" size="1"></td>
							
						</tr>
						
						<tr>
							
							<td colspan="2" align="left">
								
								<table cellpadding="0" cellspacing="0">
								
									<tr>
										
										<td><a href="_server.info.php"><img src="images/server.info.icon.gif" border="0" valign="absmiddle"></a></td><td><font face="verdana" size="2">&nbsp;<a href="_server.info.php">Server Info</a></td>
										
										<? if($setup->cpanel != ""){ ?>
										
										<td>&nbsp;&nbsp;</td><td><a href="<? echo $setup->cpanel; ?>"><img src="images/cpanel.icon.gif" border="0" valign="absmiddle"></a></td><td><font face="verdana" size="2">&nbsp;<a href="<? echo $setup->cpanel; ?>">Control Panel</a></td>
										
										<? } ?>
										
									</tr>
									
								</table>
								
							</td>
							
						</tr>
						
						<input type="hidden" name="return" value="mgr.index.php?n=<? echo $n; ?>&p_mode=<? echo $p_mode; ?>&saved=1">
						</form>
						
					</table>