<?php

$accessControl = array("Admin" => true);
require_once '../../AccessControl.php';
?>

						<div class="response">

							<div class="callout-danger-template callout callout-danger" style="display:none;">								
								<h4></h4>								
							</div>

							<div class="callout-success-template callout callout-success" style="display:none;">								
								<h4></h4>								
							</div>

						</div>

                    	<div class="box box-solid box-primary dbinfo">
                            <div class="box-header">
                                <h3 class="box-title"><?php echo _DATAMANAGER_SETTINGS; ?></h3>
                                
                            </div><!-- /.box-header -->

                            <div class="box-body table-responsive">
								
                            		<form id="datamanform" action="#">
									<div class="form-group">
                                        <label for="datamanagerMonthLimit"><?php echo _DATAMAN_MAX_DATE_RANGE; ?>:</label>
                                        
                                        <?php
											$currentSetting = getGlobalSetting("datamanagersettings",0);	
											echo "<select name='datamanagerMonthLimit' class='form-control'>";
												if($currentSetting == 0){ $sel = "selected='selected'"; } else { $sel = "";  }
												echo "<option value='0' {$sel}>". _NO_LIMIT ."</option>";
												if($currentSetting == 1){ $sel = "selected='selected'"; } else { $sel = "";  }
												echo "<option value='1' {$sel}>1 ". _MONTH ."</option>";
												if($currentSetting == 2){ $sel = "selected='selected'"; } else { $sel = "";  }
												echo "<option value='2' {$sel}>2 ". _MONTH ."</option>";
												if($currentSetting == 3){ $sel = "selected='selected'"; } else { $sel = "";  }
												echo "<option value='3' {$sel}>3 ". _MONTH ."</option>";
												if($currentSetting == 4){ $sel = "selected='selected'"; } else { $sel = "";  }
												echo "<option value='4' {$sel}>4 ". _MONTH ."</option>";
												if($currentSetting == 5){ $sel = "selected='selected'"; } else { $sel = "";  }
												echo "<option value='5' {$sel}>5 ". _MONTH ."</option>";
												if($currentSetting == 6){ $sel = "selected='selected'"; } else { $sel = "";  }
												echo "<option value='6' {$sel}>6 ". _MONTH ."</option>";
												if($currentSetting == 12){ $sel = "selected='selected'"; } else { $sel = "";  }
												echo "<option value='12' {$sel}>12 ". _MONTH ."</option>";					
											echo "</select>";
											?>
                                    </div>

                                    <div class="form-group datadir">

										<label for="datamanagerDir"><?php echo _DATADIR; ?>:</label>
                                        <?php $dataManDir = getGlobalSetting("datamanagerDirectory",logaholic_dir()."data/"); ?>											
										<div class="input-group">	                                        
	                                        <span class="input-group-addon"><i class="fa fa-check green"></i></span>
	                                        <input type=text name="datamanagerDir" value="<?php echo $dataManDir; ?>" class='form-control'>
	                                    </div>
                                        

                                    </div>

                                    <div class="form-group">
                                    	<label for="maxManagerStorage"><?php echo _DATAMAN_MAX_STORAGE; ?>:</label>
                                        <?php $maxManagerStorage = getGlobalSetting("datamanagerStorageSize",5000); ?>	
                                        <input id="maxManagerStorage" class="form-control" type="text" name="maxManagerStorage" value="<?php echo $maxManagerStorage; ?>"/>
                                    </div>

								<button class="btn btn-primary"><?php echo _SAVE; ?></button>
                            	</form>

 								<div style="clear:both">
                                    &nbsp;<br />&nbsp;
                                </div>

								<div class="alert alert-info" style=""><i class="fa fa-info"></i><?php echo _DATAMAN_DATADIR_DESC; ?></div>
								
								

                            </div><!-- /.box-body -->
                        </div><!-- /.box -->   	
