<?php include_once $BL->props->get_page("templates/alp_admin/html/header.php"); ?>
<div id="content">
	<div id="display_list">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list_table">
					<tr> 
                      <td colspan="2" class="tdheading">
					  <b>&nbsp;<?php echo $BL->props->lang['~geoip']; ?></b>
					  </td>
                    </tr>
					<tr> 
                      <td colspan="2" 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; ?>spacer.gif" alt="" width="100%" height="1" /></td>
                    </tr>
				<tr>
					<td class="text_grey" colspan="2">
					<form name='form1' id='form1' method='POST' action='<?php echo $PHP_SELF; ?>'>
					<table width='100%' border='0' cellspacing='0' cellpadding='0'>
		    			<tr> 
                        <td class='text_grey' width='1%'>
						<div 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; ?>menu_icon_dot.gif' width='32' height='18'>
						</div>
                        </td>
                        <td class='text_grey'>
						<div id="form1_label">
						<?php echo  $BL->props->lang['data_feed']; ?>
						</div>
						<div id="form1_field">
						<script language="JavaScript" type="text/JavaScript">
						<!--
						function MM_jumpMenu(targ,selObj,restore){
							eval(targ+".location='<?php echo $PHP_SELF; ?>?cmd=geoip&feed="+restore.feed.value+"'");
						}
						//-->
						</script>
						<?php
						$feed=1;
						if(!empty($geoip['feed']))$feed=$geoip['feed'];
						if(!empty($REQUEST['feed'])) $feed=$REQUEST['feed'];	
						?>						
                        <select name='feed' id='feed' class='search' onChange="javascript:MM_jumpMenu('parent',this,this.form);">
						<option value='1' <?php if($feed=="1")echo "selected=\"selected\""; ?>><?php echo  $BL->props->lang['use_XML_hostip']; ?></option>
						<option value='2' <?php if($feed=="2")echo "selected=\"selected\""; ?>><?php echo  $BL->props->lang['use_CSV_max']; ?></option>
						<option value='3' <?php if($feed=="3")echo "selected=\"selected\""; ?>><?php echo  $BL->props->lang['use_CSV_directi']; ?></option>
						</select>
						</div>
						</td>
                      </tr>
                      <tr> 
                        <td colspan='2' 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>
					<?php if(!empty($geoip['updated_on']) && $geoip['updated_on']!="0000-00-00 00:00:00"){ ?>
                      <tr> 
                        <td class='text_grey'>
                        <div 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; ?>menu_icon_dot.gif' width='32' height='18'>
                        </div>
                        </td>
                        <td class='text_grey'>
							<div id="form1_label">
							<?php echo  $BL->props->lang['last_update']; ?>
							</div>
							<div id="form1_field">
                            <?php echo $geoip['updated_on']; ?>
                          </div>
                         </td>
                      </tr>
                      <tr> 
                        <td colspan='2' 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>
					<?php
					}
					?>
                      <tr> 
                        <td class='text_grey'>
                        <div 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; ?>menu_icon_dot.gif' width='32' height='18'>
                        </div>
                        </td>
                        <td class='text_grey'>
						<?php 
						if($feed == 1)
						{
							echo  $BL->props->lang['exp_XML_hostip'];
						}
						elseif($feed == 2)
						{
							echo  $BL->utils->url2link($BL->props->lang['exp_CSV_max']).$conf['path_abs'].PATH_SEP."elements".PATH_SEP."default".PATH_SEP."sysvar".PATH_SEP;
						} 
						elseif($feed == 3)
						{
							echo  $BL->utils->url2link($BL->props->lang['exp_CSV_directi']).$conf['path_abs'].PATH_SEP."elements".PATH_SEP."default".PATH_SEP."sysvar".PATH_SEP;
						} 
						?>
                          </td>
                      </tr>
                      <tr> 
                        <td colspan='2' 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>    					
					<?php
					if($feed!="1"){
					?>
                      <tr> 
                        <td class='text_grey'>
                        <div 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; ?>menu_icon_dot.gif' width='32' height='18'>
                        </div>
                        </td>
                        <td class='text_grey'>
						<div id="form1_label">
						<?php echo  $BL->props->lang['GeoIP_CSV']; ?>
						</div>
						<div id="form1_field">
                         <input type="text" name="csv_file" class="search" size="40"  value="<?php echo isset($csv_file)?$csv_file:""; ?>" />
                          </div>
                          </td>
                      </tr>
                      <tr> 
                        <td colspan='2' 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>                      
                      <?php
					  }
					  ?>         
                      <tr> 
                        <td class='text_grey'><div align='center'></div></td>
                        <td class='text_grey'>
						<div id="form1_label">
						&nbsp;
						</div>
						<div id="form1_field">
                        	<input type='hidden' name='cmd' value='<?php echo $cmd; ?>' />
                            <input type='submit' name='submit' class='search1' value='<?php echo $BL->props->lang['Update']; ?>' />
                          </div></td>
                      </tr>
                    </table>
				  </form>
					</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"); ?>