function css_import($for_new_css = false, $xml_string = null, $fresh_install = false)
 {
     global $wgRequest, $awcs_forum_config;
     if (!$for_new_css) {
         if ($_FILES["new_css_file"]["error"] == '0') {
             $css_Path = $_FILES["new_css_file"]["tmp_name"];
             // $css_name = $_FILES["new_css_file"]["name"] ;
             $css_type = $_FILES["new_css_file"]["type"];
         } else {
             return awcs_forum_error('word_cssfile');
         }
         if (!file_exists($css_Path)) {
             return awcs_forum_error('word_cssfile');
         }
         if ($css_type != 'text/xml') {
             return awcs_forum_error('word_cssfile');
         }
     }
     if (!$for_new_css) {
         $css = simplexml_load_file($css_Path);
     } else {
         $css = simplexml_load_string($xml_string);
     }
     if ($fresh_install) {
         $css = simplexml_load_file($for_new_css);
     }
     $css_info = $css->attributes();
     $title = html_entity_decode($css_info['title'], ENT_QUOTES, 'UTF-8');
     $css_ver = $css_info['css_ver'];
     $who = html_entity_decode($css_info['who'], ENT_QUOTES, 'UTF-8');
     $where = html_entity_decode($css_info['where'], ENT_QUOTES, 'UTF-8');
     $css_name_count = html_entity_decode($css_info['count'], ENT_QUOTES, 'UTF-8');
     $info = array('who' => $who, 'where' => $where);
     $dbw = wfGetDB(DB_MASTER);
     # $theme_names_CSS_id = $dbw->nextSequenceValue( 'awc_f_theme_names_thmn_id_seq' );
     $dbw->insert('awc_f_theme_names', array('thmn_title' => $title, 'thmn_when' => $dbw->timestamp(), 'thmn_who' => $who, 'thmn_what' => 'css', 'thmn_where' => $where, 'thmn_item_count' => $css_name_count));
     $theme_names_CSS_id = awcsforum_funcs::lastID($dbw, 'awc_f_theme_names', 'thmn_id');
     # print('>thmn_css_id=' . $theme_names_CSS_id . '<br>');
     $css_code_count = 0;
     foreach ($css as $obj) {
         $att_attributes = $obj->attributes();
         $css_section = $att_attributes['css_section'];
         $css_att = $att_attributes['css_att'];
         $css_att = html_entity_decode($css_att, ENT_QUOTES, 'UTF-8');
         $css_forumver = $att_attributes['forum_ver'];
         $css_ver = $att_attributes['css_ver'];
         $css_custom = $att_attributes['custom'];
         $css_date = $att_attributes['css_date'];
         $css_code = html_entity_decode($obj, ENT_QUOTES, 'UTF-8');
         $dbw->insert('awc_f_theme_css', array('css_section' => $css_section, 'css_att' => $css_att, 'css_thmn_id' => $theme_names_CSS_id, 'css_code' => $css_code, 'css_thm_id' => $this->thm_id, 'css_custom' => $css_custom, 'css_ver' => $css_ver, 'css_date' => $dbw->timestamp(), 'css_forumver' => $css_forumver));
     }
     if ($fresh_install) {
         $dbw->begin();
         $dbw->update('awc_f_theme', array('thm_css_id' => $theme_names_CSS_id), array('thm_id' => $this->thm_id), '');
         $dbw->commit();
     }
     if (!$fresh_install) {
         awc_admin_css_cls::add_new_values(awc_dir . "updates/{$awcs_forum_config->cf_forumversion}/css.xml");
     }
     return true;
 }