<?php include_once $BL->props->get_page("templates/alp_admin/html/header.php"); ?>
<div id="content">
    <div id="display_list">
      <div class="tabs2" name='tt1' id='tt1' onmouseover="javascript:this.className='tabs1';" onmouseout="javascript:this.className='tabs2';" ><?php echo $BL->props->lang['~ips']; ?></div>
      <div class="tab_separator">&nbsp;</div>
      <div class="tabs" name='tt2' id='tt2' onmouseover="javascript:this.className='tabs1';" onmouseout="javascript:this.className='tabs';" ><a href="admin.php?cmd=add_ip" class="add_link"><?php echo $BL->props->lang['+add_ip']; ?></a></div>
      <div class="tab_separator">&nbsp;</div>
    </div>
	<div id="display_list">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list_table">
					<tr> 
                      <td class="tdheading" colspan="2">
					  <b>&nbsp;</b>
					  </td>
                    </tr>
					<tr> 
                      <td class="text_grey" colspan="2"><img src="elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>spacer.gif" alt="" width="100%" height="1" /></td>
                    </tr>
					  <tr>
					  <td class="text_grey" width="2%">&nbsp;</td>
					  <td class='text_grey'>                      
						<form name='form1' id='form1' method='POST' action='<?php echo $PHP_SELF; ?>' onsubmit="javascript:if(this.security_degree.value==0)return true;<?php if($BL->accessIPCheck(null,true)){echo "return true;";}else{ echo "if(confirm('".$BL->props->lang['current_ip_not_defined'].$BL->props->lang['detected_ip'].$BL->utils->realip()."'))return true;else return false;"; }; ?>">
                    	<?php echo $BL->props->lang['security_degree']; ?>
                            <select name='security_degree' class='search' id='security_degree'>
                              <option value='2' <?php if($conf['security_degree']==2) echo "selected=\"selected\""; ?>><?php echo $BL->props->lang['security_degree_2']; ?></option>
                              <option value='1' <?php if($conf['security_degree']==1) echo "selected=\"selected\""; ?>><?php echo $BL->props->lang['security_degree_1']; ?></option>
                              <option value='0' <?php if($conf['security_degree']==0) echo "selected=\"selected\""; ?>><?php echo $BL->props->lang['security_degree_0']; ?></option>
                          </select>
                          <input type='hidden' name='cmd' value='<?php echo $cmd; ?>'>
                          <input type='hidden' name='action' value='change_security_level'>
                          <input type='submit' name='submit' class='search1' value='<?php echo $BL->props->lang['Change']; ?>'>
						</form>
					  </td>
					  </tr>
					<tr> 
                      <td class="text_grey" colspan="2">&nbsp;</td>
                    </tr>		
                    </table>
                    <br />	
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="list_table">
                    <tr> 
                      <td class="tdheading" colspan="2">
                      <b>&nbsp;</b>
                      </td>
                    </tr>
                    <tr> 
                      <td class="text_grey" colspan="2"><img src="elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>spacer.gif" alt="" width="100%" height="1" /></td>
                    </tr>
                      <tr>
                      <td class="text_grey" width="2%">&nbsp;</td>
                      <td class='text_grey'>                      
                        <form name='form2' id='form2' method='POST' action='<?php echo $PHP_SELF; ?>'>
                        <?php echo $BL->props->lang['en_image_verification']; ?><br />
                        &nbsp;&nbsp;<input type='checkbox' value='1' name='image_verification_admin' id='image_verification_admin' <?php if(!empty($conf['image_verification_admin']))echo "checked"; ?> class='search' />&nbsp;<?php echo $BL->props->lang['for_admins']; ?><br />
                        &nbsp;&nbsp;<input type='checkbox' value='1' name='image_verification_customer' id='image_verification_customer' <?php if(!empty($conf['image_verification_customer']))echo "checked"; ?> class='search' />&nbsp;<?php echo $BL->props->lang['for_customers']; ?><br />
                          <input type='hidden' name='cmd' value='<?php echo $cmd; ?>'><br />
                          <input type='hidden' name='action' value='image_verification'>
                          <input type='submit' name='submit' class='search1' value='<?php echo $BL->props->lang['Change']; ?>'>
                        </form>
                      </td>
                      </tr>
                    <tr> 
                      <td class="text_grey" colspan="2">&nbsp;</td>
                    </tr>   
                    						
                  </table>
				  <br />	

			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list_table">
					<tr> 
                      <td colspan="4" class="text_grey">&nbsp;</td>
                    </tr>
		      <?php if (!count($access_ips)) { ?>
				<tr>
					<td class="text_grey" colspan="4">
                    	<div align='center'>
                    	<?php echo $BL->props->lang['IPS_No']; ?>
                    	</div>
					</td>
				</tr>
		      <?php } else { ?>
					<td class='text_grey' width="1%"></td>
                      <td class='text_grey'>
					  <b><?php echo $BL->props->lang['access_IP_address']; ?></b></td>
                      <td class='text_grey'>
                      <b><?php echo $BL->props->lang['admin_user']; ?></b></td>
                      <td class='text_grey' width='10%'></td>
                    </tr>		
					<?php foreach ($access_ips as $temp) { ?>
                    <tr> 
                      <td colspan='4' class='text_grey'>
                      <img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>menu_line_lightgreen-long.jpg' width='100%' height='1' />
                      </td>
                    </tr>							
					<tr>
					<td class='text_grey' width="1%"></td>
                      <td class='text_grey'>
					  <?php echo $temp['ip_address']; ?></td>
                      <td class='text_grey'>
                      <?php echo $users[$temp['admin_id']]['username']." (".$users[$temp['admin_id']]['email'].")"; ?></td>
                      <td class='text_grey' width='10%'><div align='right'>
                      <?php if($BL->getCmd("edit_ip")){ ?>
                      <a href='<?php echo $PHP_SELF; ?>?cmd=edit_ip&id=<?php echo $temp['id']; ?>' class='text_link'><img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>edit_all.gif' alt='<?php echo $BL->props->lang['Edit']; ?>' border='0'></a>
                      &nbsp;
                      <?php } ?>
                      
                      <?php if($BL->getCmd("delmaindomain")){ ?>
                      <a href="javascript:if(confirm('<?php echo $BL->props->lang['ip_DEL']; ?>'))document.location='<?php echo $PHP_SELF; ?>?cmd=del_ip&id=<?php echo $temp['id']; ?>'" class='text_link'><img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>delete.gif' alt='<?php echo $BL->props->lang['Delete']."?"; ?>' border='0'></a>
                      &nbsp;
                      <?php } ?>
                      </div></td>
                    </tr>
                    <?php } ?>
		      <?php } ?>
					<tr> 
                      <td colspan="4" class="text_grey">&nbsp;</td>
                    </tr>
                  </table>
				  <br />
					<table width="100%" border="0" cellspacing="2" cellpadding="2" class="list_table">				
					<tr> 
	                  <td class="text_grey" align="center">
					  <img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>edit_all.gif'> <?php echo $BL->props->lang['Edit']; ?>
					  &nbsp;
					  <img src='elements<?php echo PATH_SEP; ?>default<?php echo PATH_SEP; ?>templates<?php echo PATH_SEP; ?>alp_admin<?php echo PATH_SEP; ?>images<?php echo PATH_SEP; ?>delete.gif'> <?php echo $BL->props->lang['Delete']; ?>
	     			  </td>
                    </tr>
					</table>					  
	</div>
</div>
<!--end content -->
<div id="navBar">
<?php include_once $BL->props->get_page("templates/alp_admin/html/_sidepanel.php"); ?>
</div>
<!--end navbar -->
<?php include_once $BL->props->get_page("templates/alp_admin/html/footer.php"); ?>