public function initialize()
 {
     $ci =& get_instance();
     if (empty($ci->db->hostname) || empty($ci->db->database) || empty($ci->db->username)) {
         show_error('Missing Database Configurations, Please configure your <strong>/app/config/database.php</strong>, <br />Set your database, <strong>Base Url</strong> details and then come back here again & Refresh for Instant Boot Setup.', 500, "Setup Database Configuration");
     }
     if (!$ci->db->table_exists('access') || !$ci->db->table_exists('users') || !$ci->db->table_exists('languages') || !$ci->db->table_exists('contents')) {
         if ($this->_install_dump()) {
             $ci->setting->setSetting('site_url', site_url());
             AZ::flashMSG('Your First Credential for login is <strong>admin/123456</strong>');
             AZ::redirectSuccess('administrator', 'Your Bootigniter Package Setup Successfully');
         }
     } else {
         return true;
     }
 }
Esempio n. 2
0
 private function saveBoolenOptions($field_id, $options, $default = '', $edit = false)
 {
     if (!count($options) || !(int) $field_id) {
         AZ::flashMSG(__('no_option'));
         return FALSE;
     }
     if ($edit) {
         $this->db->delete('content_field_options', array('field_id' => (int) $field_id));
     }
     foreach ($options['title'] as $key => $title) {
         $value = isset($options['value'][$key]) ? $options['value'][$key] : '';
         $is_default = $default == $value ? 1 : 0;
         $field_options[] = array('field_id' => $field_id, 'value' => $value, 'title' => $title, 'is_default' => $is_default);
     }
     $this->db->insert_batch('content_field_options', $field_options);
     return TRUE;
 }