<script type="text/javascript" src="<?php echo base_url();?>assets/js/settings.js"></script>
 
 <style>
    .form_group_div > select, input[type=file] {
        width: 61%;
    }
    .colorpicker:after, .colorpicker:before{
        content:none;
    }
 </style>
<aside class="right-side">
    <section class="content-header">
        <div class="title_bar">
            <h1 class="major_txt_color">Design Settings Edit</h1>
            <div class="breadcrumb_container"><?php echo breadcrumb_links();?></div>
        </div>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box-header">
                    <div class="box-body table-responsive">
                        <?php if(!empty($success)) {?>
                            <div class="alert alert-success alert-dismissable" style="padding-left: 80px !important;">
                                <i class="fa fa-thumbs-o-up" style="left: 23px; top: 8px;"></i>
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <h4><?php echo $success;?></h4>
                            </div>
                        <?php }
                        else if(!empty($error)) {?>
                            <div class="alert alert-danger alert-dismissable" style="padding-left: 80px !important;">
                                <i class="fa fa-thumbs-o-down" style="left: 23px; top: 8px;"></i>
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <h4 style="padding-top: 4px; font-size: 18px !important;"><?php echo $error;?></h4>
                            </div>
                        <?php }?>
                    </div>
                    <!-- .box-tools -->
                </div>
            </div>
            
            <div class="col-xs-12">
                <h3 style="margin-top: 0; margin-right: 5px; width: 100%; display: inline-block;">
                    <a class="label btn btn-primary float-rht edit" href="<?php echo $view_link?>"><span>View</span></a>
                </h3>
                 <form name="design_settings" action="<?php echo $form_action;?>" method="post" enctype="multipart/form-data">
                    <div class="box box-danger">
                        <div class="box-body">
                            <ul class="error_container"></ul>
                            <div class="col-xs-12">
                                <div class="col-md-6">
                                    <div class="form-group form_group_div">
                                        <label>Font Family</label>
                                        <select name="font_family" class="form-control select2">
                                            <option value="">Select Font Family</option>
                                            <?php foreach ($fonts as $key=>$font) { ?>
                                                <option value="<?php echo $key;?>" <?php echo ($key == $setting->font_family) ? 'selected' : '';?>><?php echo $font;?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                    <div class="form-group form_group_div">
                                        <label>Font Size</label>
                                        <select name="font_size" class="form-control select2">
                                            <option value="">Select Font Size</option>
                                            <?php foreach ($sizes as $key=>$size) { ?>
                                                <option value="<?php echo $key;?>" <?php echo ($size == $setting->font_size) ? 'selected' : '';?>><?php echo $size;?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                    <div class="form-group form_group_div">
                                        <label>Heading Font Family</label>
                                        <select name="head_font_family" class="form-control select2">
                                            <option value="">Select Font Family</option>
                                            <?php foreach ($fonts as $key=>$font) { ?>
                                                <option value="<?php echo $key;?>" <?php echo ($key == $setting->head_font_family) ? 'selected' : '';?>><?php echo $font;?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                    <div class="form-group form_group_div">
                                        <label>Heading Font Size</label>
                                        <select name="head_font_size" class="form-control select2">
                                            <option value="">Select Font Size</option>
                                            <?php foreach ($sizes as $key=>$size) { ?>
                                                <option value="<?php echo $key;?>" <?php echo ($size == $setting->head_font_size) ? 'selected' : '';?>><?php echo $size;?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Keyboard Color(T)</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="t_key_board" value="<?php echo form_prep($setting->keyboard_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Login Page / Header Color</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="login_page_color" value="<?php echo form_prep($setting->login_page_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <!--<div class="form-group">
                                        <label>Color picker with addon:</label>
                                        <div class="input-group my-colorpicker2">
                                            <input type="text" class="form-control"/>
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div>
                                    </div>-->
                                    
                                    
                                    <div class="form-group form_group_div">
                                        <label>Service Menu Color</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="service_menu_color" value="<?php echo form_prep($setting->service_menu_color);?>" />
                                            <div class="input-group-addon"><i></i></div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <!--<div class="form-group">
                                        <label>Color 1</label>
                                        <div class="input-group my-colorpicker2" style="width: 61% !important;">
                                            <input type="text" class="form-control my-colorpicker1" name="color1" value="<?php echo form_prep($setting->color1);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Color 2</label>
                                        <div class="input-group my-colorpicker2" style="width: 61% !important;">
                                            <input type="text" class="form-control my-colorpicker1" name="color2" value="<?php echo form_prep($setting->color2);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div>
                                    </div>-->
                                    
                                     <div class="form-group form_group_div">
                                        <label>Title Color(Archanai)</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="title_color" value="<?php echo form_prep($setting->archanai_title_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>   
                                </div>
                                
                                <div class="col-md-6">
                                                                
                                    <div class="form-group form_group_div">
                                        <label>Logo<span class="required">*</span></label>
                                        <input type="file" class="form-control img_file" name="logo" data-value="<?php echo $setting->logo;?>" name="image" data-allowed_size="2" data-allowed_width="150" data-allowed_height="94" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->logo)) && (file_exists(FCPATH . DIR_COMPANY_LOGO . $setting->logo))) {
                                                $image_url = base_url() . DIR_COMPANY_LOGO . $setting->logo;
                                                $alt = $setting->logo;
                                            }
                                            else {
                                                $image_url = base_url() . NO_IMG;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b> file format</span>  
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Favicon</label>
                                        <input type="file" class="form-control img_file" name="favicon" data-allowed_width="16" data-allowed_height="16" data-file_exetnsions="ico" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->favicon)) && (file_exists(FCPATH . DIR_FAVICON . $setting->favicon))) {
                                                $image_url = base_url() . DIR_FAVICON . $setting->favicon;
                                                $alt = $setting->favicon;
                                            }
                                            else {
                                                $image_url = base_url() . DEFAULT_FAVICON;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" style="width: 16px; height: 16px;" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i>ico</i></b> file format</span>  
                                    </div>
                                
                                    <div class="form-group form_group_div">
                                        <label>Login Image<span class="required">*</span></label>
                                        <input type="file" class="form-control img_file" name="login_image" data-value="<?php echo $setting->login_image;?>" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->login_image)) && (file_exists(FCPATH . DIR_LOGIN_IMG . $setting->login_image))) {
                                                $image_url = base_url() . DIR_LOGIN_IMG . $setting->login_image;
                                                $alt = $setting->login_image;
                                            }
                                            else {
                                                $image_url = base_url() . NO_IMG;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b> file format</span>  
                                    </div>
                                    
                                    
                                    <div class="form-group form_group_div">
                                        <label>Login Image<span class="required">*</span>
                                            <span style="font-size: 12px; float: left; color: #999; padding-left: 2px;">(Kiosk - Scan)</span>
                                        </label>
                                        <input type="file" class="form-control img_file" name="scan_login_image" data-value="<?php echo $setting->scan_login_image;?>" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->scan_login_image)) && (file_exists(FCPATH . DIR_LOGIN_IMG . $setting->scan_login_image))) {
                                                $image_url = base_url() . DIR_LOGIN_IMG . $setting->scan_login_image;
                                                $alt = $setting->scan_login_image;
                                            }
                                            else {
                                                $image_url = base_url() . NO_IMG;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b> file format</span>  
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Main Image<span class="required">*</span>
                                            <span style="font-size: 12px; float: left; color: #999; padding-left: 2px;">(Kiosk - Scan)</span>
                                        </label>
                                        <input type="file" class="form-control img_file" name="scan_main_image" data-value="<?php echo $setting->scan_main_image;?>" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->scan_main_image)) && (file_exists(FCPATH . DIR_LOGIN_IMG . $setting->scan_main_image))) {
                                                $image_url = base_url() . DIR_LOGIN_IMG . $setting->scan_main_image;
                                                $alt = $setting->scan_main_image;
                                            }
                                            else {
                                                $image_url = base_url() . NO_IMG;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b> file format</span>  
                                    </div>
                                    
                                    
                                </div>
                            </div>
                            
                            <div class="col-xs-12">
                                <div class="col-md-6">
                                    <h3 class="major_txt_color">Administrator Setting</h3><br/>
                                    <div class="form-group form_group_div">
                                        <label>Menu Background</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="admin_menu_bg_color" value="<?php echo form_prep($setting->admin_menu_bg_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Menu Label</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="admin_menu_lbl_color" value="<?php echo form_prep($setting->admin_menu_lbl_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Menu Selection</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="admin_menu_select_color" value="<?php echo form_prep($setting->admin_menu_select_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    
                                    <div class="form-group form_group_div">
                                        <label>Admin Menu Background</label>
                                        <input type="file" class="form-control img_file" name="admin_menu_bg" data-allowed_size="2" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->admin_menu_bg)) && (file_exists(FCPATH . DIR_ADMIN_MENU_BG . $setting->admin_menu_bg))) {
                                                $image_url = base_url() . DIR_ADMIN_MENU_BG . $setting->admin_menu_bg;
                                                $alt = $setting->admin_menu_bg;
                                            }
                                            else {
                                                $image_url = base_url() . NO_IMG;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b> file format</span>  
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Administrator Background</label>
                                        <input type="file" class="form-control img_file" name="admin_bg" data-allowed_size="2" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->admin_bg)) && (file_exists(FCPATH . DIR_ADMIN_BG . $setting->admin_bg))) {
                                                $image_url = base_url() . DIR_ADMIN_BG . $setting->admin_bg;
                                                $alt = $setting->admin_bg;
                                            }
                                            else {
                                                $image_url = base_url() . NO_IMG;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b> file format</span>  
                                    </div>
                                    
                                </div>
                           
                                <div class="col-md-6">
                                    <h3 class="major_txt_color">User Setting</h3><br/>
                                    <div class="form-group form_group_div">
                                        <label>Menu Background</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="user_menu_bg_color" value="<?php echo form_prep($setting->user_menu_bg_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Menu Label</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="user_menu_lbl_color" value="<?php echo form_prep($setting->user_menu_lbl_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>Menu Selection</label>
                                        <div class="input-group colorpicker">
                                            <input type="text" class="form-control my-colorpicker1" name="user_menu_select_color" value="<?php echo form_prep($setting->user_menu_select_color);?>" />
                                            <div class="input-group-addon">
                                                <i></i>
                                            </div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>User Menu Background</label>
                                        <input type="file" class="form-control img_file" name="user_menu_bg" data-allowed_size="2" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->user_menu_bg)) && (file_exists(FCPATH . DIR_USER_MENU_BG . $setting->user_menu_bg))) {
                                                $image_url = base_url() . DIR_USER_MENU_BG . $setting->user_menu_bg;
                                                $alt = $setting->user_menu_bg;
                                            }
                                            else {
                                                $image_url = base_url() . NO_IMG;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b> file format</span> 
                                    </div>
                                    
                                    <div class="form-group form_group_div">
                                        <label>User Background</label>
                                        <input type="file" class="form-control img_file" name="user_bg" data-allowed_size="2" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview">
                                            <?php
                                            if ((!empty($setting->user_bg)) && (file_exists(FCPATH . DIR_USER_BG . $setting->user_bg))) {
                                                $image_url = base_url() . DIR_USER_BG . $setting->user_bg;
                                                $alt = $setting->user_bg;
                                            }
                                            else {
                                                $image_url = base_url() . NO_IMG;
                                                $alt = 'No image not found!';
                                            }
                                            ?>
                                            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" />
                                        </div>
                                        <span class="allowed_type condition_span">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b> file format</span>  
                                    </div>
                                </div>
                            </div>
                            
                        </div>
                        
                        <div class="box-footer form-actions float-clear" style="text-align:center;">
                            <input class="btn reset" type="reset" value="Reset" />
                            <input type="submit" name="submit" value="Update" class="btn btn-success btn-primary" />
                        </div>
                    </div><!-- /.box -->
                </form>
            </div><!-- /.col-xs-12 -->
        </div><!-- /.row -->
    </section><!-- /.content -->
</aside>