<?php
$langs_arr=get_langs();
foreach ($langs_arr as $l){
	$lang_opt["$l[LangCode]"]=$l["Name"];
}

$redir_opt = array(
        'cp'         => lang('cp'),
        'front'           => lang('front'),
        'welcome'           => lang('welcome_page'),
);

$yes_no_opt = array(
        '1'         => lang('yes'),
        '0'           => lang('no'),
        
);



?>


<?php if(isset($bc)):?>
<?=$this->view(sett('cp_view_dir').'/'.'breadcrumb', $bc,true)?>      
<?php endif;?>
<h1 class="uk-h3">&nbsp;<?=$title?></h1>
        <div class="uk-margin ">
		<div class=" uk-card  uk-card-body uk-card-default">
<div class="uk-grid" uk-grid>
<div class="uk-width-1-4@m ">
    <?= $this->load->view(sett('cp_view_dir').'/settings/tabs',null,true)?>
</div>

<div class="uk-width-expand ">

<?php if($ok_msg):?>
	<div class="uk-alert-success" uk-alert><p><i class='fa fa-save fa-lg uk-margin-small-left '></i><?=$ok_msg?></p></div>
<?php endif; ?>	
<?php if(is_right('settings_main')): ?>
<?php echo form_open(); ?>
    <fieldset class="uk-fieldset">

       <div class="uk-margin">
		<?=lang('settings.dflt_lang')?>: <br/>
		
		<?= form_dropdown('dflt_lang', $lang_opt,set_value('dflt_lang',$stt['dflt_lang']),'class="uk-select"')?>
          
        </div>
		<div class="uk-margin">
		<?=lang('settings.superuser_rediract_to')?>: <br/>	
		<?= form_dropdown('superuser_rediract_to', $redir_opt,set_value('superuser_rediract_to',$stt['superuser_rediract_to']),'class="uk-select"')?>
          
        </div>
		<div class="uk-margin">
		<?=lang('settings.admin_rediract_to')?>: <br/>	
		<?= form_dropdown('admin_rediract_to', $redir_opt,set_value('admin_rediract_to',$stt['admin_rediract_to']),'class="uk-select"')?>
          
        </div> 
       <div class="uk-margin">
		<?=lang('settings.allow_public_browsing')?> : <br/>	
		<?= form_dropdown('allow_public_browsing', $yes_no_opt,set_value('allow_public_browsing',$stt['allow_public_browsing']),'class="uk-select"')?>
          
        </div> 
		
		<div class="uk-margin">
		<?=lang('settings.item_limit')?> : <br/>	
		<input class="uk-input" min=1 max=1000 type="number"  name="item_limit"  value="<?=set_value('item_limit',$stt['item_limit'])?>">
          <span class="uk-text-muted uk-text-small">
			<?=lang('settings.item_limit_help')?>
			</span>
        </div> 
		
       <div class="uk-margin">
		<?=lang('settings.backup_notify')?>  : <?=is(APP_TYPE=='f','<span class="uk-badge">'.lang('khasia_madfoa').'</span>')?> <br/>	
		<?= form_dropdown('backup_notify', $yes_no_opt,set_value('backup_notify',$stt['backup_notify']),'class="uk-select"')?>
        </div> 
       
       <div class="uk-margin">
		<?=lang('settings.backup_notify_evry_days')?>  : <?=is(APP_TYPE=='f','<span class="uk-badge">'.lang('khasia_madfoa').'</span>')?><br/>	
		<input class="uk-input" min=1 max=1000 type="number"  name="backup_notify_evry_days"  value="<?=set_value('backup_notify_evry_days',$stt['backup_notify_evry_days'])?>">
        </div> 
 
       <div class="uk-margin">
             <button type="submit" class="uk-button uk-button-primary">  <i class='fa fa-save fa-lg uk-margin-small-left '></i> <?=lang('save')?> </button>
        </div>

    </fieldset>
</form>
<?php endif; ?>	

	


</div>

 </div>

</div>


</div>

  
    


