} // Build path vars // $MW->add_temp_confs( array( 'site_href' => str_replace( '//', '/', str_replace( '\\', '/', dirname( $_SERVER['SCRIPT_NAME'] ) . '/' ) ) ) ) ; $MW->add_temp_confs( array( 'site_domain' => $_SERVER['HTTP_HOST'], 'email_href' => $_SERVER['HTTP_HOST'] ) ) ; $MW->add_temp_confs( array( 'base_href' => 'http://' . $MW->getConfig->temp->email_href . '' . $MW->getConfig->temp->site_href, ) ) ; // Check lang ====================================== if ( isset( $_COOKIE['Language'] ) ) $GLOBALS['user_cur_lang'] = $_COOKIE['Language'] ; loadLanguages() ; // ================================================ // Load auth system // $auth = new AUTH( $DB, $MW->getConfig ) ; $user = $auth->user ; // ================== // //Determine Current Template if ( $user['id'] == -1 ) { $currtmp = "templates/".( string ) $MW->getConfig->generic->default_template; }else{ $currtmp = $DB->selectCell( "SELECT theme FROM `account_extend` WHERE account_id=?d", $user['id'] ) ; foreach ( $MW->getConfig->templates->template as $template ) { $currtmp2[] = $template ;
function initData($_internal = false, $_groups = false, $_visitors = false, $_filters = false, $_events = false, $_languages = false, $_countries = false) { global $INTERNAL, $GROUPS, $LANGUAGES, $COUNTRIES, $FILTERS, $EVENTS, $VISITORS; if ($_internal && empty($INTERNAL)) { loadInternals(); } if ($_groups && empty($GROUPS)) { loadGroups(); } if ($_languages && empty($LANGUAGES)) { loadLanguages(); } if ($_countries && empty($COUNTRIES)) { loadCountries(); } if ($_filters && empty($FILTERS)) { loadFilters(); } if ($_events && empty($EVENTS)) { loadEvents(); } if ($_visitors && empty($VISITORS)) { loadVisitors(); } }
<html> <body> <b>Insert Language Preference Of User</b> <br> <form action = "language.php" method = "POST"> <input type = "text" name = "userId"> <input type = "search" list = "Languages" name = "pref_language"> <? // Insert all languages retreived to a <datalist> element $data = loadLanguages(); echo '<datalist id= "Languages">'; for ($i=0; $i < count($data); $i++) { echo '<option value = "' . $data[$i][0] . '">'; } echo "</datalist>"; ?> <input type = "submit"> </form> <br><br> <b>Retreive Language Preference Of User</b> <br> <form action = "language.php" method = "POST">
function initData($_fields) { global $INTERNAL, $LANGUAGES, $COUNTRIES, $FILTERS, $EVENTS, $VISITOR, $INPUTS; if ((in_array("INTERNAL", $_fields) || in_array("GROUPS", $_fields)) && empty($INTERNAL)) { loadInternals(); } if (in_array("LANGUAGES", $_fields) && empty($LANGUAGES)) { loadLanguages(); } if (in_array("COUNTRIES", $_fields) && empty($COUNTRIES)) { loadCountries(); } if (in_array("INPUTS", $_fields) && empty($INPUTS)) { DataInput::Build(); } if (in_array("FILTERS", $_fields) && empty($FILTERS)) { loadFilters(); } if (is("DB_CONNECTION")) { if (in_array("EVENTS", $_fields) && empty($EVENTS)) { loadEvents(); } if (in_array("VISITOR", $_fields) && empty($VISITOR)) { Visitor::Build(); } } }