function editgen()
 {
     global $wgOut, $awc, $member_default_forum_options;
     Set_AWC_Forum_SubTitle(get_awcsforum_word('mem_memCP'), $this->membername);
     Set_AWC_Forum_BreadCrumbs(get_awcsforum_word('mem_edit_gen_option'), true);
     $Config_Settings['cf_displaysmiles'] = array('thread', 'yesno', '1');
     # 2.3.5
     $mem_forumoptions = isset($this->mem_info['m_forumoptions']) ? $this->mem_info['m_forumoptions'] : null;
     $m_viewaadv = isset($this->mem_info['m_viewaadv']) ? $this->mem_info['m_viewaadv'] == '1' ? 'checked' : '' : '';
     $m_displaysig = isset($this->mem_info['m_displaysig']) ? $this->mem_info['m_displaysig'] == '1' ? 'checked' : '' : '';
     $m_displysigonce = isset($this->mem_info['m_displaysigonce']) ? $this->mem_info['m_displaysigonce'] == '1' ? 'checked' : '' : '';
     $html = '<form action="' . awc_url . $this->todo_url . 'miscusersettings" method="post">';
     $html .= '<input name="mem_name" type="hidden" value="' . $this->membername . '">';
     $html .= '<input name="m_id" type="hidden" value="' . $this->m_id . '">';
     #$html .= '<INPUT TYPE=CHECKBOX NAME="m_viewaadv" '. $m_viewaadv.'> ' .get_awcsforum_word('mem_showAdv') . "<br />" ;
     #$html .= '<INPUT TYPE=CHECKBOX NAME="m_displaysig" '.$m_displaysig.'> ' .get_awcsforum_word('mem_showsigs') . "<br />" ;
     #$html .= '<INPUT TYPE=CHECKBOX NAME="m_displaysigonce" '.$m_displysigonce.'> ' .get_awcsforum_word('mem_showsigsonlyonce') . "<br />" ;
     # if($mem_forumoptions != null){
     // awcsforum_funcs::get_page_lang(array('lang_txt_admin'));
     foreach ($member_default_forum_options as $name => $vName) {
         foreach ($member_default_forum_options[$name] as $type => $v) {
             if ($type != 'options') {
                 $val = isset($mem_forumoptions[$name]) ? $mem_forumoptions[$name] : $v;
                 $displayname = get_awcsforum_word($name);
                 # $name = str_replace('a href=', 'a target="blank" href=', $out);
                 $out[$name]['text'] = '' . $displayname . '<hr>';
                 if ($type == 'yesno') {
                     $out[$name]['option'] = awcsf_CheckYesNo($name, $val) . ' ';
                 } else {
                     if ($type == 'drop') {
                         if ($name == 'css_id') {
                             $out[$name]['option'] = self::show_active_dropdown();
                         }
                     } else {
                         $out[$name]['option'] = '<input name="' . $name . '" type="text" value="' . $val . '" size="50">  ';
                     }
                 }
                 $out[$name]['option'] .= '<br /><br />';
             }
         }
     }
     if ($this->send_thread_body_in_email == '0') {
         unset($out['mem_send_thread_body_in_email']);
     }
     if ($this->send_post_body_in_email == '0') {
         unset($out['mem_send_post_body_in_email']);
     }
     if ($this->send_pm_body_in_email == '0') {
         unset($out['mem_send_pm_body_in_email']);
     }
     if ($this->cf_css_mem_select == '0') {
         unset($out['css_id']);
     }
     if ($this->cf_FCKeditor == '0') {
         unset($out['cf_FCKeditor']);
     }
     if ($this->cf_extrawikitoolbox == '0') {
         unset($out['cf_extrawikitoolbox']);
     }
     foreach ($out as $id => $info) {
         $html .= $out[$id]['text'];
         $html .= $out[$id]['option'];
     }
     $html .= '<br /><hr><input type="submit" value="' . get_awcsforum_word('submit') . '"></form><br /><hr>';
     self::display_memcp($html);
 }
 function admin_GetConfig($todo)
 {
     global $awc, $wgOut;
     # die($todo);
     $dbr = wfGetDB(DB_SLAVE);
     $table_1 = $dbr->tableName('awc_f_config');
     $sql = "SELECT * FROM {$table_1} WHERE section='{$todo}' ORDER BY q DESC ";
     $res = $dbr->query($sql);
     #$chr_selected = null;
     $cf_dropdown['cf_chrset'] = '<br />
                     <select name="cf_chrset">
                       <option value="iso-8859-1">ISO-8859-1 (Western European, Latin-1)</option>
                       <option value="iso-8859-2">ISO-8859-2 (Latin-2)</option>
                       <option value="iso-8859-15">ISO8859-15 (Western European, Latin-9. Adds the Euro sign, French and Finnish letters missing in Latin-1(ISO-8859-1).)</option>
                       <option value="UTF-8">UTF-8 (ASCII compatible multi-byte 8-bit Unicode.)</option>
                       <option value="cp866">cp866 (DOS-specific Cyrillic charset. This charset is supported in 4.3.2.)</option>
                       <option value="cp1251">cp1251 (Windows-specific Cyrillic charset. This charset is supported in 4.3.2.)</option>
                       <option value="cp1252">cp1252 (Windows specific charset for Western European.)</option>
                       <option value="KOI8-R">KOI8-R (Russian. This charset is supported in 4.3.2.)</option>
                       <option value="BIG5">BIG5 (Traditional Chinese, mainly used in Taiwan.)</option>
                       <option value="GB2312">GB2312 (Simplified Chinese, national standard character set.)</option>
                       <option value="BIG5-HKSCS">BIG5-HKSCS (Big5 with Hong Kong extensions, Traditional Chinese.)</option>
                       <option value="Shift_JIS">Shift_JIS (Japanese)</option>
                       <option value="EUC-JP">EUC-JP (Japanese)</option>
                     </select>';
     $html = '<form id="config" name="config " action="' . awc_url . 'admin/config_forum" method="post">';
     $html .= '<table width="100%" class="dl_maintable" cellpadding="0" cellspacing="0"><tr>';
     $html .= '<td width="100%" class="dl_maintable_head" nowrap colspan="1"><br /></td>';
     $html .= '</tr><tr>';
     $help = get_awcsforum_word('word_help');
     while ($r = $dbr->fetchObject($res)) {
         if ($r->q != 'cf_forumversion' and $r->q != 'cf_forumlang' and $r->q != 'cf_css_active_ids' and $r->q != 'cf_css_default') {
             #die($r->typeis);
             $html .= '<tr><td width="100%" align="left" nowrap>';
             $out = get_awcsforum_word($r->q);
             $out = str_replace('a href=', 'a target="blank" href=', $out);
             $html .= "(<a target='blank' href='http://wiki.anotherwebcom.com/{$r->q} (AdminCP Setting)'>{$help}</a>) " . $out;
             if ($r->q == 'cf_chrset') {
                 /*  Need to do something here wiht an array for furture dropdown menus  */
                 $option_selected[$r->q] = '<option value="' . $r->a . '" SELECTED>';
                 $html .= '<dropdown-placeholder_' . $r->q . '>';
             } elseif ($r->q == 'cf_css_default') {
                 # css
                 $css_id = unserialize($r->a);
                 $html .= '<hr /><select name="cf_css_default">';
                 $html .= self::css_getdropdown($css_id['Default']);
                 #
                 $html .= '</select>';
             } elseif ($r->typeis == 'yesno') {
                 $html .= '<hr />' . awcsf_CheckYesNo($r->q, $r->a);
             } else {
                 $html .= '<br /><input name="' . $r->q . '" type="text" value="' . $r->a . '" size="50"> ';
             }
             $html .= '<br /><br /></td></tr>';
         }
     }
     $dbr->freeResult($res);
     $html .= '</table>';
     $html .= ' <input type="submit" value="' . get_awcsforum_word('submit') . '"></form>';
     if (isset($option_selected)) {
         foreach ($option_selected as $k => $v) {
             $option_selected_find_replace = str_replace(' SELECTED', '', $option_selected[$k]);
             $selected = str_replace($option_selected_find_replace, $option_selected[$k], $cf_dropdown[$k]);
             $html = str_replace('<dropdown-placeholder_' . $k . '>', $selected, $html);
         }
         unset($option_selected);
         unset($cf_dropdown);
     }
     /*  Funcky find and replace for chr-set SELECTED dropdown  */
     # $chr_find_replace = str_replace(' SELECTED', '', $chr_selected);
     #  $chr_selected = str_replace($chr_find_replace, $chr_selected, $cf_chrset_drop);
     # $html = str_replace('<chr-set-placeholder>', $chr_selected, $html);
     return $html;
 }
 function create_forum()
 {
     global $wgOut;
     self::get_all_cats();
     $this->forum_info = parent::forums_get_all_array();
     // use to get number of current cats to create the 'cat_order' drop-down
     $skin = array();
     $skin['todo'] = "do_create_forum";
     $skin['f_id'] = null;
     $skin['f_name'] = null;
     $skin['f_desc'] = null;
     $skin['f_passworded'] = awcsf_CheckYesNo('f_passworded', '0');
     $skin['f_password'] = null;
     $skin['f_top_tmplt'] = null;
     $skin['f_posting_mesage_tmpt'] = null;
     $skin['f_parentid'] = self::cat_drop();
     $skin['f_wiki_read_perm'] = parent::wikigroup_get_checkboxs('f_wiki_read_perm');
     $skin['f_wiki_write_perm'] = parent::wikigroup_get_checkboxs('f_wiki_write_perm');
     $skin['f_order'] = self::order_by();
     $skin['move_to_drop'] = null;
     $wgOut->addHTML($this->skin_form($skin));
 }