<?php $this->load->view('site/layout'); ?>
<?php $this->load->view('site/navbar'); ?>
<style>
    .col-md-9{
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .col-md-2{
        padding-left: 0px !important;
        padding-right: 0px !important;
    }
    .active{
        color: #5867dd !important;
    }
</style>
<div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">
    <div class="kt-subheader  kt-grid__item" id="kt_subheader">
        <div class="kt-container  kt-container--fluid ">
            <div class="kt-subheader__main">
                <h3 class="kt-subheader__title"><a href="<?php echo base_url() ?>Dashboard/"><?php echo $this->lang->line('dashboard'); ?></a></h3>
                <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                <span class="kt-subheader__desc"><a href="<?= base_url('users/') ?>"><?php echo $this->lang->line('data') ?></a></span>
            </div>
        </div>
    </div>
    <?php if (isset($msg) || validation_errors() !== ''): ?>
        <div class="alert alert-warning alert-dismissible">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
            <h4><i class="icon fa-warning"></i> Alert!</h4>
            <?= validation_errors(); ?>
            <?= isset($msg) ? $msg : ''; ?>
        </div>
    <?php endif; ?> 
    <div class="d-inline-block" >
        <div class="col-md-2 d-inline-block settings-sidebar" >
            <div class="kt-portlet " style="margin: 0px ">
                <ul class="settings_sidebar_links">
                    <li><a class="active" href="<?= base_url('Dashboard/setting') ?>"><?= $this->lang->line('global_settings') ?></a></li>
                    <li><a href="<?= base_url('Dashboard/invoice_footer') ?>"><?= $this->lang->line('invoice') ?></a></li>
                    <li><a href="<?= base_url('Dashboard/social_links') ?>"><?= $this->lang->line('social_links') ?></a></li>
                    <li><a href="<?= base_url('Dashboard/sms_settings') ?>"><?= $this->lang->line('sms_settings') ?></a></li>
                    <!--<li><a href="<?//= base_url('Dashboard/update') ?>"><?//= $this->lang->line('update') ?></a></li>-->
                </ul>
            </div>
        </div>
        <div class="col-md-9 d-inline-block" >
            <div class="kt-portlet" >
                <div class="kt-portlet__head">
                    <div class="kt-portlet__head-label">
                        <h3 class="kt-portlet__head-title">
                            <?php echo $this->lang->line('data') ?>
                        </h3>
                    </div>
                </div>
                <!--begin::Form-->
                <?php echo form_open_multipart(base_url('' . $thispage . '/setting/')); ?>
                <!-- <form class="kt-form kt-form--label-right" method="post" action=""> -->
                <div class="kt-portlet__body">
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('name'); ?> <?php echo $this->lang->line('company'); ?> </label>
                        <div class="col-10">
                            <input type="text" class="form-control m-input" placeholder="" name="company_title" value="<?php echo set_value('company_title', $this->config->item('company_title')); ?>" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('address'); ?> <?php echo $this->lang->line('company'); ?> </label>
                        <div class="col-10">
                            <input type="text" class="form-control m-input" placeholder="" name="company_address"   value="<?php echo set_value('company_address', $this->config->item('company_address')); ?>" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"> <?php echo $this->lang->line('company'); ?> <?php echo $this->lang->line('email'); ?> </label>
                        <div class="col-10">
                            <input type="text" class="form-control m-input" placeholder="" name="company_email"   value="<?php echo set_value('company_email', $this->config->item('company_email')); ?>" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"> <?php echo $this->lang->line('company'); ?> <?php echo $this->lang->line('mobile'); ?></label>
                        <div class="col-10">
                            <input type="text" class="form-control m-input" placeholder="" name="company_mobile"   value="<?php echo set_value('company_mobile', $this->config->item('company_mobile')); ?>" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"> <?php echo $this->lang->line('admin_default_lang'); ?> </label>
                        <div class="col-10">
                            <select class="form-control" name="admin_default_lang" >
                                <option value="english" <?= $sett->admin_default_lang == 'english' ? 'selected' : '' ?>>English</option>
                                <option value="arabic" <?= $sett->admin_default_lang == 'arabic' ? 'selected' : '' ?>>عربى</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"> <?php echo $this->lang->line('student_default_lang'); ?> </label>
                        <div class="col-10">
                            <select class="form-control" name="student_default_lang" >
                                <option value="english" <?= $sett->student_default_lang == 'english' ? 'selected' : '' ?>>English</option>
                                <option value="arabic" <?= $sett->student_default_lang == 'arabic' ? 'selected' : '' ?>>عربى</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('currency'); ?> </label>
                        <div class="col-10">
                            <input type="text" class="form-control m-input" placeholder="" name="currency" value="<?php echo set_value('currency', $this->config->item('currency')); ?>" >
                        </div>
                    </div>

                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label">Timezone </label>
                        <div class="col-10">
                            <select name="timezone" class="form-control select2_plug" id="timezone" >
                                <option value=""><?= $this->lang->line('select') ?></option>
                                <option value="Etc/GMT+12">(GMT-12:00) International Date Line West</option>
                                <option value="Pacific/Midway">(GMT-11:00) Midway Island, Samoa</option>
                                <option value="Pacific/Honolulu">(GMT-10:00) Hawaii</option>
                                <option value="US/Alaska">(GMT-09:00) Alaska</option>
                                <option value="America/Los_Angeles">(GMT-08:00) Pacific Time (US & Canada)</option>
                                <option value="America/Tijuana">(GMT-08:00) Tijuana, Baja California</option>
                                <option value="US/Arizona">(GMT-07:00) Arizona</option>
                                <option value="America/Chihuahua">(GMT-07:00) Chihuahua, La Paz, Mazatlan</option>
                                <option value="US/Mountain">(GMT-07:00) Mountain Time (US & Canada)</option>
                                <option value="America/Managua">(GMT-06:00) Central America</option>
                                <option value="US/Central">(GMT-06:00) Central Time (US & Canada)</option>
                                <option value="America/Mexico_City">(GMT-06:00) Guadalajara, Mexico City, Monterrey</option>
                                <option value="Canada/Saskatchewan">(GMT-06:00) Saskatchewan</option>
                                <option value="America/Bogota">(GMT-05:00) Bogota, Lima, Quito, Rio Branco</option>
                                <option value="US/Eastern">(GMT-05:00) Eastern Time (US & Canada)</option>
                                <option value="US/East-Indiana">(GMT-05:00) Indiana (East)</option>
                                <option value="Canada/Atlantic">(GMT-04:00) Atlantic Time (Canada)</option>
                                <option value="America/Caracas">(GMT-04:00) Caracas, La Paz</option>
                                <option value="America/Manaus">(GMT-04:00) Manaus</option>
                                <option value="America/Santiago">(GMT-04:00) Santiago</option>
                                <option value="Canada/Newfoundland">(GMT-03:30) Newfoundland</option>
                                <option value="America/Sao_Paulo">(GMT-03:00) Brasilia</option>
                                <option value="America/Argentina/Buenos_Aires">(GMT-03:00) Buenos Aires, Georgetown</option>
                                <option value="America/Godthab">(GMT-03:00) Greenland</option>
                                <option value="America/Montevideo">(GMT-03:00) Montevideo</option>
                                <option value="America/Noronha">(GMT-02:00) Mid-Atlantic</option>
                                <option value="Atlantic/Cape_Verde">(GMT-01:00) Cape Verde Is.</option>
                                <option value="Atlantic/Azores">(GMT-01:00) Azores</option>
                                <option value="Africa/Casablanca">(GMT+00:00) Casablanca, Monrovia, Reykjavik</option>
                                <option value="Etc/Greenwich">(GMT+00:00) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London</option>
                                <option value="Europe/Amsterdam">(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option>
                                <option value="Europe/Belgrade">(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague</option>
                                <option value="Europe/Brussels">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris</option>
                                <option value="Europe/Sarajevo">(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb</option>
                                <option value="Africa/Lagos">(GMT+01:00) West Central Africa</option>
                                <option value="Asia/Amman">(GMT+02:00) Amman</option>
                                <option value="Europe/Athens">(GMT+02:00) Athens, Bucharest, Istanbul</option>
                                <option value="Asia/Beirut">(GMT+02:00) Beirut</option>
                                <option value="Africa/Cairo">(GMT+02:00) Cairo</option>
                                <option value="Africa/Harare">(GMT+02:00) Harare, Pretoria</option>
                                <option value="Europe/Helsinki">(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius</option>
                                <option value="Asia/Jerusalem">(GMT+02:00) Jerusalem</option>
                                <option value="Europe/Minsk">(GMT+02:00) Minsk</option>
                                <option value="Africa/Windhoek">(GMT+02:00) Windhoek</option>
                                <option value="Asia/Kuwait">(GMT+03:00) Kuwait, Riyadh, Baghdad</option>
                                <option value="Europe/Moscow">(GMT+03:00) Moscow, St. Petersburg, Volgograd</option>
                                <option value="Africa/Nairobi">(GMT+03:00) Nairobi</option>
                                <option value="Asia/Tbilisi">(GMT+03:00) Tbilisi</option>
                                <option value="Asia/Tehran">(GMT+03:30) Tehran</option>
                                <option value="Asia/Muscat">(GMT+04:00) Abu Dhabi, Muscat</option>
                                <option value="Asia/Baku">(GMT+04:00) Baku</option>
                                <option value="Asia/Yerevan">(GMT+04:00) Yerevan</option>
                                <option value="Asia/Kabul">(GMT+04:30) Kabul</option>
                                <option value="Asia/Yekaterinburg">(GMT+05:00) Yekaterinburg</option>
                                <option value="Asia/Karachi">(GMT+05:00) Islamabad, Karachi, Tashkent</option>
                                <option value="Asia/Calcutta">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</option>
                                <option value="Asia/Calcutta">(GMT+05:30) Sri Jayawardenapura</option>
                                <option value="Asia/Katmandu">(GMT+05:45) Kathmandu</option>
                                <option value="Asia/Almaty">(GMT+06:00) Almaty, Novosibirsk</option>
                                <option value="Asia/Dhaka">(GMT+06:00) Astana, Dhaka</option>
                                <option value="Asia/Rangoon">(GMT+06:30) Yangon (Rangoon)</option>
                                <option value="Asia/Bangkok">(GMT+07:00) Bangkok, Hanoi, Jakarta</option>
                                <option value="Asia/Krasnoyarsk">(GMT+07:00) Krasnoyarsk</option>
                                <option value="Asia/Hong_Kong">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option>
                                <option value="Asia/Kuala_Lumpur">(GMT+08:00) Kuala Lumpur, Singapore</option>
                                <option value="Asia/Irkutsk">(GMT+08:00) Irkutsk, Ulaan Bataar</option>
                                <option value="Australia/Perth">(GMT+08:00) Perth</option>
                                <option value="Asia/Taipei">(GMT+08:00) Taipei</option>
                                <option value="Asia/Tokyo">(GMT+09:00) Osaka, Sapporo, Tokyo</option>
                                <option value="Asia/Seoul">(GMT+09:00) Seoul</option>
                                <option value="Asia/Yakutsk">(GMT+09:00) Yakutsk</option>
                                <option value="Australia/Adelaide">(GMT+09:30) Adelaide</option>
                                <option value="Australia/Darwin">(GMT+09:30) Darwin</option>
                                <option value="Australia/Brisbane">(GMT+10:00) Brisbane</option>
                                <option value="Australia/Canberra">(GMT+10:00) Canberra, Melbourne, Sydney</option>
                                <option value="Australia/Hobart">(GMT+10:00) Hobart</option>
                                <option value="Pacific/Guam">(GMT+10:00) Guam, Port Moresby</option>
                                <option value="Asia/Vladivostok">(GMT+10:00) Vladivostok</option>
                                <option value="Asia/Magadan">(GMT+11:00) Magadan, Solomon Is., New Caledonia</option>
                                <option value="Pacific/Auckland">(GMT+12:00) Auckland, Wellington</option>
                                <option value="Pacific/Fiji">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</option>
                                <option value="Pacific/Tongatapu">(GMT+13:00) Nuku'alofa</option>
                            </select>
                        </div>
                    </div>


                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('meta-title'); ?> </label>
                        <div class="col-10">
                            <textarea class="form-control m-input" placeholder="<?php echo $this->lang->line('enter'); ?> <?php echo $this->lang->line('meta-title'); ?>" name="meta_title"  ><?php echo set_value('instrgram', $this->config->item('meta_title')); ?></textarea>

                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('meta-keyword'); ?> </label>
                        <div class="col-10">
                            <textarea class="form-control m-input" placeholder=" <?php echo $this->lang->line('enter'); ?>  <?php echo $this->lang->line('meta-keyword'); ?>" name="meta_keyword"  ><?php echo set_value('instrgram', $this->config->item('meta_keyword')); ?></textarea>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('meta-description'); ?> </label>
                        <div class="col-10"><textarea class="form-control m-input" placeholder="<?php echo $this->lang->line('enter'); ?> <?php echo $this->lang->line('meta-description'); ?>  " name="meta_description"  ><?php echo set_value('instrgram', $this->config->item('meta_description')); ?></textarea>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('browser_tab_logo'); ?> </label>
                        <div class="col-10">
                            <?php if ($sett && $sett->tab_logo) { ?>
                                <img src="<?= base_url() ?>public/upload/userimage/<?= $sett->tab_logo ?>" width="150px" />
                            <?php } ?>
                            <input type="file" name="profile" class="form-control" />
                        </div>
                    </div>

                    <div class="form-group row">
                        <label for="example-text-input" class="col-2 col-form-label"><?php echo $this->lang->line('company-logo'); ?> </label>
                        <div class="col-10">
                            <?php if ($sett && $sett->invoice_logo) { ?>
                                <img src="<?= base_url() ?>public/upload/userimage/<?= $sett->invoice_logo ?>" width="150px" />
                            <?php } ?>
                            <input type="file" name="logo" class="form-control" />
                        </div>
                    </div>


                </div>
                <?php if (get_ap('setting_edit', $this->operator_id) == 1) { ?>
                    <div class="kt-portlet__foot">
                        <div class="kt-form__actions">
                            <div class="row">
                                <div class="col-12">
                                    <button type="submit" class="btn btn-primary"><?php echo $this->lang->line('save') ?></button>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php } ?>
                </form>
            </div>
        </div>
    </div>


    <?php $this->load->view('site/footer_2'); ?>
    <script>
        $(".select2_plug").select2();

<?php if ($sett->timezone) { ?>
            $("#timezone").val('<?= $sett->timezone ?>');
            $("#timezone").select2();
<?php } ?>
    </script>