<?PHP
include "../inc/var.php";
include "../inc/connect.php";
include $server_inc."/whm_functions.php";
include $server_inc."/client_functions.php";
include $server_inc."/login_functions.php";

if(phpversion()<="4.0.6") { $_POST=$HTTP_POST_VARS; }
if (isset($_POST['submit']))
	{
	if (trim($profile_name)=="") { $e0=true; }
	else
		{
		# build ACL list
		$acl_list="";
		while (list($key, $value)=each($_POST)) { if (strcmp(substr($key, 0, 3), "acl")==0) { $acl_list.=$value."|"; } }

		# manage options
		if ($limit_type==0)
			{
			# value 1
			$resnumlimitamt=0;
			
			# value 2
			$rslimit_disk=0;
			$rsolimit_disk=0;
			$rslimit_bw=0;
			$rsolimit_bw=0;
			}
		else if ($limit_type==1)
			{
			# value 2
			$rslimit_disk=0;
			$rsolimit_disk=0;
			$rslimit_bw=0;
			$rsolimit_bw=0;
			}
		else if ($limit_type==2) { $resnumlimitamt=0; }

		if (isset($rid)) { $query="update "; }
		else { $query="insert into "; $insert=true; }
		$query.="reseller_profile ";
		$query.="set ";
		$query.="profile_name='".addslashes(trim($profile_name))."', ";
		if (isset($edit_ns)) { $query.="edit_ns='".addslashes(trim($edit_ns))."', "; }
		else { $query.="edit_ns='0', "; }
		$query.="limit_type='".addslashes(trim($limit_type))."', ";
		$query.="resnumlimitamt='".addslashes(trim($resnumlimitamt))."', ";
		$query.="rslimit_disk='".addslashes(trim($rslimit_disk))."', ";
		$query.="rsolimit_disk='".addslashes(trim($rsolimit_disk))."', ";
		$query.="rslimit_bw='".addslashes(trim($rslimit_bw))."', ";
		$query.="rsolimit_bw='".addslashes(trim($rsolimit_bw))."', ";
		$query.="acl_list='".base64_encode(addslashes(trim($acl_list)))."'";
		if (isset($rid)) { $query.=" where rid='".addslashes(trim($rid))."' "; }

		mysql_query($query);

		if (!isset($rid)) { $rid=mysql_insert_id(); }

		$done=true;
		}
	}

include $server_admin_inc."/header.php";

if (isset($rid))
	{
	$query0="select ";
	$query0.="profile_name, ";		// 0
	$query0.="edit_ns, ";			// 1
	$query0.="limit_type, ";		// 2
	$query0.="resnumlimitamt, ";	// 3
	$query0.="rslimit_disk, ";		// 4
	$query0.="rsolimit_disk, ";		// 5
	$query0.="rslimit_bw, ";		// 6
	$query0.="rsolimit_bw, ";		// 7
	$query0.="acl_list ";			// 8
	$query0.="from ";
	$query0.="reseller_profile ";
	$query0.="where rid='".addslashes(trim($rid))."'";

	$rs0=mysql_fetch_row(mysql_query($query0));

	$profile_name=stripslashes(trim($rs0[0]));
	$edit_ns=stripslashes(trim($rs0[1]));
	$limit_type=stripslashes(trim($rs0[2]));
	$resnumlimitamt=stripslashes(trim($rs0[3]));
	$rslimit_disk=stripslashes(trim($rs0[4]));
	$rsolimit_disk=stripslashes(trim($rs0[5]));
	$rslimit_bw=stripslashes(trim($rs0[6]));
	$rsolimit_bw=stripslashes(trim($rs0[7]));
	$xacl_list=base64_decode(stripslashes(trim($rs0[8])));
	
	$act_ct=substr_count($xacl_list, "|");
	$ex=explode("|", $xacl_list);
	for ($i=0; $i<=$act_ct; $i++)
		{
		${$ex[$i]}=$ex[$i];
		}

	}

echo("
	<table width='725' cellpadding='0' cellspacing='0' border='0'>
		<tr>
			<td width='1%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='375'></td>
			<td width='99%' align='left' valign='top'>
	");

if (isset($done))
	{
	echo("
			<table width='100%' cellpadding='2' cellspacing='0' border='0'>
				<tr>
					<td align='left' valign='middle'><img src='".$http_images."/menu_arrow.gif'><b>The reseller profile was <font color='#990000'>".((isset($insert))?"added":"updated")." successfully!</font><b></td>
				</tr>
				<tr>
					<td align='left' valign='middle'><hr color='#F3F3F3'></td>
				</tr>
				<tr>
					<td align='left' valign='middle'><img src='".$http_images."/error_arrow.gif'><a href='".$http_admin."/reseller_profile.php?sid=".$sid."&rid=".$rid."'>Continue with edits</a></td>
				</tr>
				<tr>
					<td align='left' valign='middle'><img src='".$http_images."/error_arrow.gif'><a href='".$http_admin."/reseller_profile_edit.php?sid=".$sid."'>Work with another reseller profile</a></td>
				</tr>
				<tr>
					<td align='left' valign='middle'><img src='".$http_images."/error_arrow.gif'><a href='".$http_admin."/reseller_profile.php?sid=".$sid."'>Add a new reseller profile</a></td>
				</tr>
			</table>
			</td>
			</tr>
		</table>
		");

	include $server_admin_inc."/footer.php";
	mysql_close($dblink);
	die();
	}

echo("
			<form action='".$PHP_SELF."' method='POST'>
			<input type='hidden' name='sid' value='".$sid."'>
			".((isset($rid))?"<input type='hidden' name='rid' value='".$rid."'>":"")."
			".((isset($back))?"<input type='hidden' name='back' value='5'>":"")."
			<table width='100%' cellpadding='2' cellspacing='0' border='0'>
				<tr>
					<td align='left' valign='middle'><img src='".$http_images."/menu_arrow.gif'><b>Reseller Profile Manager</b>".((isset($back))?"&nbsp;&nbsp;[<a href='".$http_admin."/reseller_profile_edit.php?sid=".$sid."'>go back to profile edit</a>]":"")."</td>
				</tr>
				<tr>
					<td align='left' valign='middle'><hr color='#F3F3F3'></td>
				</tr>
			</table>
	");

if (isset($e0))
	{
	echo("
			<table width='100%' cellpadding='2' cellspacing='0' border='0'>
				<tr>
					<td align='left' valign='middle'><img src='".$http_images."/error_arrow.gif'><font color='#990000'><b>ERROR:</b> Please enter a profile name to continue.</font></td>
				</tr>
			</table>
		");
	}

if (isset($e0))
	{
	echo("
			<table width='100%' cellpadding='2' cellspacing='0' border='0'>
				<tr>
					<td align='left' valign='middle'><hr color='#F3F3F3'></td>
				</tr>
			</table>
		");
	}

echo("
			<table width='100%' cellpadding='4' cellspacing='0' border='0'>
				<tr>
					<td width='25%' align='left' valign='top'>Reseller Profile Name:</td>
					<td width='75%' align='left' valign='top'><input ".$input_style." size='40' maxlength='255' type='text' name='profile_name' value='".((isset($profile_name))?"".$profile_name."":"")."'></td>
				</tr>
				<tr>
					<td colspan='2' align='left' valign='middle'><hr color='#F3F3F3'></td>
				</tr>
				<tr>
					<td width='25%' align='left' valign='top'>Reseller Account Creation Limits:</td>
					<td width='75%' align='left' valign='top'><input type='radio' name='limit_type' value='0'".((isset($limit_type))?"".(($limit_type==0)?" checked":"")."":" checked")." id='opt1'> <label for='opt1'>Limit the reseller to a fixed number of accounts per individual package.</label></td>
				</tr>
				<tr>
					<td width='25%' align='left' valign='top'></td>
					<td width='75%' align='left' valign='top'>
					<table width='100%' cellpadding='0' cellspacing='0' border='0'>
						<tr>
							<td width='1%'></td>
							<td width='1%'><img src='".$http_images."/drop_arrow.gif'> <font color='#990000'>Choosing this option requires completion the following steps for new signups:<br>
							<img src='".$http_images."/space.gif' width='16' height='1'> 1. Log into Web Host Manager<br>
							<img src='".$http_images."/space.gif' width='16' height='1'> 2. Click Reseller Center<br>
							<img src='".$http_images."/space.gif' width='16' height='1'> 3. Edit Reseller Privileges/Nameservers<br>
							<img src='".$http_images."/space.gif' width='16' height='1'> 4. Choose a reseller to edit, click \"OK\"<br>
							<img src='".$http_images."/space.gif' width='16' height='1'> 5. Enter the number of accounts that the reseller can create for each package.<br>
							<img src='".$http_images."/space.gif' width='16' height='1'> 6. Click the \"Save\" button on the bottom of this page.						
							</font></td>
							<td width='99%'></td>
						</tr>
						<tr>
							<td width='1%'><img src='".$http_images."/space.gif' width='25' height='1'></td>
							<td width='1%'><img src='".$http_images."/space.gif' width='400' height='1'></td>
							<td width='99%'><img src='".$http_images."/space.gif' width='75' height='1'></td>
						</tr>
					</table>
					</td>
				</tr>
				<tr>
					<td width='25%' align='left' valign='top'></td>
					<td width='75%' align='left' valign='top'><input type='radio' name='limit_type' value='1'".((isset($limit_type))?"".(($limit_type==1)?" checked":"")."":"")." id='opt2'> <label for='opt2'>Limit the reseller to <input size='3' maxlength='4' ".$input_style." type='text' name='resnumlimitamt' value='".((isset($resnumlimitamt))?"".$resnumlimitamt."":"0")."'> accounts.</label></td>
				</tr>
				<tr>
					<td width='25%' align='left' valign='top'></td>
					<td width='75%' align='left' valign='top'><input type='radio' name='limit_type' value='2'".((isset($limit_type))?"".(($limit_type==2)?" checked":"")."":"")." id='opt3'> <label for='opt3'>Limit the reseller by the resource usage below:</label></td>
				</tr>
				<tr>
					<td width='25%' align='left' valign='top'></td>
					<td width='75%' align='left' valign='top'>
					<table width='100%' cellpadding='0' cellspacing='0' border='0'>
						<tr>
							<td width='1%'></td>
							<td width='14%'>Disk Space:</td>
							<td width='20%'><input ".$input_style." size='20' maxlength='20' type='text' name='rslimit_disk' value='".((isset($rslimit_disk))?"".(($rslimit_disk==0)?"":"".$rslimit_disk."")."":"")."'> MB</td>
							<td width='65%'>&nbsp;<input type='checkbox' name='rsolimit_disk' value='1'".((isset($rsolimit_disk))?"".(($rsolimit_disk==1)?" checked":"")."":"")."> Check here to allow Disk Space overselling.</td>
						</tr>
						<tr>
							<td width='1%'></td>
							<td width='14%'>Bandwidth:</td>
							<td width='20%'><input ".$input_style." size='20' maxlength='20' type='text' name='rslimit_bw' value='".((isset($rslimit_bw))?"".(($rslimit_bw==0)?"":"".$rslimit_bw."")."":"")."'> MB</td>
							<td width='65%'>&nbsp;<input type='checkbox' name='rsolimit_bw' value='1'".((isset($rsolimit_bw))?"".(($rsolimit_bw==1)?" checked":"")."":"")."> Check here to allow Bandwidth overselling.</td>
						</tr>
						<tr>
							<td width='1%'><img src='".$http_images."/space.gif' width='25' height='1'></td>
							<td width='14%'><img src='".$http_images."/space.gif' width='60' height='1'></td>
							<td width='20%'><img src='".$http_images."/space.gif' width='40' height='1'></td>
							<td width='65%'><img src='".$http_images."/space.gif' width='75' height='1'></td>
						</tr>
					</table>
					</td>
				</tr>
				<tr>
					<td colspan='2' align='left' valign='middle'><hr color='#F3F3F3'></td>
				</tr>
				<tr>
					<td width='25%' align='left' valign='top'>Nameserver Options:</td>
					<td width='75%' align='left' valign='top'><input type='checkbox' name='edit_ns' value='1'".((isset($edit_ns))?"".(($edit_ns==1)?" checked":"")."":"")." id='ns0'>&nbsp;<label for='ns0'>Check to allow the reseller to choose their own nameserver prefix. (ex. <b>NS1</b>.servername.net)</label></td>
				</tr>
				<tr>
					<td colspan='2' align='left' valign='middle'><hr color='#F3F3F3'></td>
				</tr>
				<tr>
					<td width='25%' align='left' valign='top'>Assign Reseller Permissions:</td>
					<td width='75%' align='left' valign='top'>
					<table width='100%' cellpadding='2' cellspacing='0' border='1' bordercolor='#F3F3F3'>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_allow_unlimited_disk_pkgs' value='acl_allow_unlimited_disk_pkgs'".((isset($acl_allow_unlimited_disk_pkgs))?"".(($acl_allow_unlimited_disk_pkgs=="acl_allow_unlimited_disk_pkgs")?" checked":"")."":"")." id='r0'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r0'>Allow creation of packages with unlimited diskspace</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_allow_unlimited_pkgs' value='acl_allow_unlimited_pkgs'".((isset($acl_allow_unlimited_pkgs))?"".(($acl_allow_unlimited_pkgs=="acl_allow_unlimited_pkgs")?" checked":"")."":"")." id='r1'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r1'>Allow creation of packages with unlimited features (ie. unlimited emails)</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_edit_pkg' value='acl_edit_pkg'".((isset($acl_edit_pkg))?"".(($acl_edit_pkg=="acl_edit_pkg")?" checked":"")."":"")." id='r2'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r2'>Allow package edits</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_create_acct' value='acl_create_acct'".((isset($acl_create_acct))?"".(($acl_create_acct=="acl_create_acct")?" checked":"")."":"")." id='r3'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r3'>Account creation</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_edit_account' value='acl_edit_account'".((isset($acl_edit_account))?"".(($acl_edit_account=="acl_edit_account")?" checked":"")."":"")." id='r4'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r4'>Account modification<br>&nbsp;<img src='".$http_images."/drop_arrow.gif'><font color='#990000'><b>Warning:</b> allows circumvention of account creation limits, give shell access, dedicated ips, etc.</font></label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_suspend_acct' value='acl_suspend_acct'".((isset($acl_suspend_acct))?"".(($acl_suspend_acct=="acl_suspend_acct")?" checked":"")."":"")." id='r5'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r5'>Account suspension</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_kill_acct' value='acl_kill_acct'".((isset($acl_kill_acct))?"".(($acl_kill_acct=="acl_kill_acct")?" checked":"")."":"")." id='r6'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r6'>Account termination</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_upgrade_account' value='acl_upgrade_account'".((isset($acl_upgrade_account))?"".(($acl_upgrade_account=="acl_upgrade_account")?" checked":"")."":"")." id='r7'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r7'>Account upgrades</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_create_dns' value='acl_create_dns'".((isset($acl_create_dns))?"".(($acl_create_dns=="acl_create_dns")?" checked":"")."":"")." id='r8'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r8'>Add domains</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_add_pkg' value='acl_add_pkg'".((isset($acl_add_pkg))?"".(($acl_add_pkg=="acl_add_pkg")?" checked":"")."":"")." id='r9'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r9'>Add / Remove packages</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_all' value='acl_all'".((isset($acl_all))?"".(($acl_all=="acl_all")?" checked":"")."":"")." id='r10'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r10'>All features<br>&nbsp;<img src='".$http_images."/drop_arrow.gif'><font color='#990000'><b>Warning:</b> choosing this option enables root access</font></label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_add_pkg_shell' value='acl_add_pkg_shell'".((isset($acl_add_pkg_shell))?"".(($acl_add_pkg_shell=="acl_add_pkg_shell")?" checked":"")."":"")." id='r11'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r11'>Allow creation of packages with shell access</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_add_pkg_ip' value='acl_add_pkg_ip'".((isset($acl_add_pkg_ip))?"".(($acl_add_pkg_ip=="acl_add_pkg_ip")?" checked":"")."":"")." id='r12'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r12'>Allow creation of packages with a dedicated IP</label></td>
						</tr>
						<tr>  
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_allow_addoncreate' value='acl_allow_addoncreate'".((isset($acl_allow_addoncreate))?"".(($acl_allow_addoncreate=="acl_allow_addoncreate")?" checked":"")."":"")." id='r13'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r13'>Allow creation of packages with Addon Domains</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_allow_parkedcreate' value='acl_allow_parkedcreate'".((isset($acl_allow_parkedcreate))?"".(($acl_allow_parkedcreate=="acl_allow_parkedcreate")?" checked":"")."":"")." id='r13'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r13'>Allow creation of packages with parked domains</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_limit_bandwidth' value='acl_limit_bandwidth'".((isset($acl_limit_bandwidth))?"".(($acl_limit_bandwidth=="acl_limit_bandwidth")?" checked":"")."":"")." id='r14'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r14'>Bandwidth limiting modification<br>&nbsp;<img src='".$http_images."/drop_arrow.gif'><font color='#990000'><b>Warning:</b> choosing this option will allow circumvention of account package limits.</font></label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_clustering' value='acl_clustering'".((isset($acl_clustering))?"".(($acl_clustering=="acl_clustering")?" checked":"")."":"")." id='r15'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r15'>Clustering</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_kill_dns' value='acl_kill_dns'".((isset($acl_kill_dns))?"".(($acl_kill_dns=="acl_kill_dns")?" checked":"")."":"")." id='r16'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r16'>Delete domains</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_onlyselfandglobalpkgs' value='acl_onlyselfandglobalpkgs'".((isset($acl_onlyselfandglobalpkgs))?"".(($acl_onlyselfandglobalpkgs=="acl_onlyselfandglobalpkgs")?" checked":"")."":"")." id='r17'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r17'>Disallow creation of accounts with packages that are not global or not owned by this user</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_edit_dns' value='acl_edit_dns'".((isset($acl_edit_dns))?"".(($acl_edit_dns=="acl_edit_dns")?" checked":"")."":"")." id='r18'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r18'>Edit DNS entries</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_edit_mx' value='acl_edit_mx'".((isset($acl_edit_mx))?"".(($acl_edit_mx=="acl_edit_mx")?" checked":"")."":"")." id='r19'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r19'>Edit MX entries</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_frontpage' value='acl_frontpage'".((isset($acl_frontpage))?"".(($acl_frontpage=="acl_frontpage")?" checked":"")."":"")." id='r20'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r20'>Enabling / Disabling FrontPage Extensions</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_ssl' value='acl_ssl'".((isset($acl_ssl))?"".(($acl_ssl=="acl_ssl")?" checked":"")."":"")." id='r21'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r21'>Enabling / Disabling SSL support</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_mod_subdomains' value='acl_mod_subdomains'".((isset($acl_mod_subdomains))?"".(($acl_mod_subdomains=="acl_mod_subdomains")?" checked":"")."":"")." id='r22'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r22'>Enabling / Disabling Sub Domains</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_list_accts' value='acl_list_accts'".((isset($acl_list_accts))?"".(($acl_list_accts=="acl_list_accts")?" checked":"")."":"")." id='r23'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r23'>List accounts</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_mailcheck' value='acl_mailcheck'".((isset($acl_mailcheck))?"".(($acl_mailcheck=="acl_mailcheck")?" checked":"")."":"")." id='r24'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r24'>Mail Troubleshooter</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_disallow_shell' value='acl_disallow_shell'".((isset($acl_disallow_shell))?"".(($acl_disallow_shell=="acl_disallow_shell")?" checked":"")."":"")." id='r25'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r25'>Never allow creation of accounts with shell access</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_news' value='acl_news'".((isset($acl_news))?"".(($acl_news=="acl_news")?" checked":"")."":"")." id='r26'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r26'>News Modification</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_park_dns' value='acl_park_dns'".((isset($acl_park_dns))?"".(($acl_park_dns=="acl_park_dns")?" checked":"")."":"")." id='r27'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r27'>Park Domain</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_passwd' value='acl_passwd'".((isset($acl_passwd))?"".(($acl_passwd=="acl_passwd")?" checked":"")."":"")." id='r28'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r28'>Password modification</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_quota' value='acl_quota'".((isset($acl_quota))?"".(($acl_quota=="acl_quota")?" checked":"")."":"")." id='r29'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r29'>Quota Modification<br>&nbsp;<img src='".$http_images."/drop_arrow.gif'><font color='#990000'><b>Warning:</b> choosing this option will allow circumvention of account package limits.</font></label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_rearrange_accts' value='acl_rearrange_accts'".((isset($acl_rearrange_accts))?"".(($acl_rearrange_accts=="acl_rearrange_accts")?" checked":"")."":"")." id='r30'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r30'>Free up disk space by rearranging accounts</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_res_cart' value='acl_res_cart'".((isset($acl_res_cart))?"".(($acl_res_cart=="acl_res_cart")?" checked":"")."":"")." id='r31'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r31'>Reset shopping cart</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_restart' value='acl_restart'".((isset($acl_restart))?"".(($acl_restart=="acl_restart")?" checked":"")."":"")." id='r32'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r32'>Restart services</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_resftp' value='acl_resftp'".((isset($acl_resftp))?"".(($acl_resftp=="acl_resftp")?" checked":"")."":"")." id='r33'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r33'>Resync FTP passwords</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_demo_setup' value='acl_demo_setup'".((isset($acl_demo_setup))?"".(($acl_demo_setup=="acl_demo_setup")?" checked":"")."":"")." id='r34'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r34'>Turn an account into a demo account</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_show_bandwidth' value='acl_show_bandwidth'".((isset($acl_show_bandwidth))?"".(($acl_show_bandwidth=="acl_show_bandwidth")?" checked":"")."":"")." id='r35'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r35'>View account bandwidth usage</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_stats' value='acl_stats'".((isset($acl_stats))?"".(($acl_stats=="acl_stats")?" checked":"")."":"")." id='r36'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r36'>View account statistics</label></td>
						</tr>
						<tr>
							<td width='5%' align='center' valign='middle'><input type='checkbox' name='acl_status' value='acl_status'".((isset($acl_status))?"".(($acl_status=="acl_status")?" checked":"")."":"")." id='r37'></td>
							<td width='95%' align='left' valign='middle'>&nbsp;<label for='r37'>View server statistics</label></td>
						</tr>
					</table>
					</td>
				</tr>
				<tr>
					<td colspan='2' align='left' valign='middle'><img src='".$http_images."/space.gif' width='1' height='4'></td>
				</tr>
				<tr>
					<td width='25%' align='left' valign='middle'></td>
					<td width='75%' align='left' valign='middle'><input ".$button_style." type='submit' name='submit' value='Save Profile'></td>
				</tr>
				<tr>
					<td colspan='2' align='left' valign='middle'><img src='".$http_images."/space.gif' width='1' height='12'></td>
				</tr>
			</table>
			</form>
			</td>
			</tr>
		</table>
		");

include $server_admin_inc."/footer.php";
mysql_close($dblink);
?>