$i18nfiles = FileFolderList("./lang/", $depth = 1, $current = '', $level = 0); $available_languages = available_languages($i18nfiles); foreach ($available_languages as $null => $language) { $options_languages[$language[file]] = "{$language['langinternational']} ({$language['langnational']})"; } $options_yesno = array("yes" => i18n("generic_yes"), "no" => i18n("generic_no")); $options_storage = array("mysql" => "mySQL Database", "flat" => "Flat file (var_dump) DB"); $options_comment_requirepreview = array("yes" => "Require preview before posting", "no" => "Do not require preview"); $options_mysql_info = array(makeField("text", "config[storage][mysqluser]", "mysqluser", $Settings->co[storage][mysqluser], i18n("options_mysql_username", "MySQL"), "inshort"), makeField("text", "config[storage][mysqlpass]", "mysqlpass", $Settings->co[storage][mysqlpass], i18n("options_mysql_password", "MySQL,<small>,</small>"), "inshort"), makeField("text", "config[storage][mysqlhost]", "mysqlhost", $Settings->co[storage][mysqlhost], i18n("options_mysql_host", "MySQL,<small>,</small>"), "inshort"), makeField("text", "config[storage][mysqldatabase]", "mysqldb", $Settings->co[storage][mysqldatabase], i18n("options_mysql_database", "MySQL"), "inshort")); $settingfields = array("general" => array("name" => i18n("options_general"), makeField("text", "config[general][uniquekey]", "uniquekey", $Settings->co[general][uniquekey], i18n("options_d_unique", "<small>,</small>"), "inlong", "top"), makeField("text", "config[general][adminmail]", "adminmail", $Settings->co[general][adminmail], "Administrator email", "inmedium", "top"), makeField("text", "config[general][dateoffset]", "dateoffset", $Settings->co[general][dateoffset], i18n("options_dateoffset"), "inshort"), formGroup($options_mysql_info, i18n("options_mysql_info")), radioGroup($options_yesno, "emailspam", "config[general][emailspam]", i18n("options_emailspam"), $Settings->co[general][emailspam]), radioGroup($options_languages, "defaultlanguage", "config[general][defaultlanguage]", i18n("options_default_lang"), $Settings->co[general][defaultlanguage])), "articles" => array("name" => i18n("dashboard_Articles"), makeField("text", "config[articles][dateformat]", "articledateformat", $Settings->co[articles][dateformat], "Articles date format", $group)), "comments" => array("name" => i18n("dashboard_Comments"), radioGroup($options_yesno, "requireregister", "config[comments][requireregister]", i18n("options_requireregister"), $Settings->co[comments][requireregister]), makeField("text", "config[comments][dateformat]", "commentdateformat", $Settings->co[comments][dateformat], "Comments date format"), makeField("text", "config[comments][avatar][size]", "gravatarsize", $Settings->co[comments][avatar][size], "Gravatar size (in pixels)"), makeField("text", "config[comments][avatar][defaulturl]", "gravatardefault", $Settings->co[comments][avatar][defaulturl], "Default gravatar (url)", "inlong"), radioGroup($options_yesno, "requireemail", "config[comments][requiremail]", "Require email?", $Settings->co[comments][requiremail]))); $main_content .= '<form id="config" method="post" action="">'; $main_content .= '<div id="storage_select" class="div_extended">'; $main_content .= radioGroup($options_storage, "storage", "config[storage][backend]", "Database backend", $Settings->co[storage][backend]); $main_content .= '</div><div class="div_normal">'; foreach ($settingfields as $class => $fields) { $main_content .= formGroup($fields, $fields[name]); } $main_content .= '<p><input class="save" type="submit" value="Save" name="configsave" /></p></div>'; $main_content .= '</form>'; } } # # Add / List categories # if ($_GET[screen] == "categories" && !$_POST[addcat]) { $moduletitle = i18n("dashboard_categories"); $statusmessage = i18n("dashboard_categories"); $main_content = ' <div id="manage_cats_wrapper"> <div class="div_normal options_categorylist"> <fieldset>
$am_message = $langCompulsory; } else { $am_message = $langOptional; } formGroup('am_form', $langAm, "<input class='form-control' id='am_form' type='text' name='am_form'" . getValue('am_form', $pam) . " placeholder='" . q($am_message) . "'>"); } formGroup('language_form', $langLanguage, lang_select_options('language_form', "class='form-control'", Session::has('language_form')? Session::get('language_form'): $language)); if (isset($_GET['id'])) { formGroup('comments', $langComments, q($pcom)); formGroup('date', $langDate, q($pdate)); $tool_content .= "<input type='hidden' name='rid' value='$id'>"; } if (isset($pstatus)) { $tool_content .= "<input type='hidden' name='pstatus' value='$pstatus'>"; } //add custom profile fields input $tool_content .= render_profile_fields_form($cpf_context, true); $tool_content .= " <div class='col-sm-offset-2 col-sm-10'> <input class='btn btn-primary' type='submit' name='submit' value='$langRegistration'> </div> </fieldset> </form>