Changeset 1660 in ExiteCMS


Ignore:
Timestamp:
08/21/08 16:07:21 (3 years ago)
Author:
hverton
Message:

updated the members list with better filters, and a sort option on username, email, last visit date and country.
Rewritten the setup procedure to make it more fail-safe
Fixed getmxxrr() function, to return the lowest MX record first
Added the compiled locale files for Dutch (setup/global)

Location:
trunk
Files:
2 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/members.php

    r1195 r1660  
    3030// parameter validation 
    3131if (isset($user_id) && !isNum($user_id)) fallback("index.php"); 
     32if (!isset($step)) $step = ""; 
     33if (!isset($user_id)) $user_id= 0; 
    3234if (!isset($country) || strlen($country) != 2) $country = ""; 
    3335if (!isset($sortby) || strlen($sortby) != 1) $sortby = "all"; 
    34 if (!isset($step)) $step = ""; 
    35 if (!isset($user_id)) $user_id= 0; 
    36  
    37 if (isset($_POST['cancel_delete'])) fallback(FUSION_SELF.$aidlink."&sortby=$sortby&rowstart=$rowstart"); 
     36if (!isset($order)) $order = "username"; 
     37if (!isset($field)) $field = "username"; 
     38 
     39if (isset($_POST['cancel_delete'])) fallback(FUSION_SELF.$aidlink."&order=$order&sortby=$sortby&field=$field&rowstart=$rowstart"); 
    3840 
    3941if ($step == "add") { 
     
    144146$rows = 0; 
    145147if (iMEMBER) { 
    146     // create the where clause 
    147     if ($sortby == "all") { 
    148         if ($country == "") { 
    149             $orderby = ""; 
    150         } else { 
    151             $orderby = " user_cc_code = '".$country."'"; 
    152         } 
    153     } else { 
    154         if ($country == "") { 
    155             $orderby = " user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'"; 
    156         } else { 
    157             $orderby = " user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
    158         } 
    159     } 
     148    // create the letter filter SQL clause and the selection sort SQL clause 
     149    switch($order) { 
     150        case "country": 
     151            $sortfield = "user_cc_code ASC, user_level DESC, user_name ASC"; 
     152            break; 
     153        case "email": 
     154            $sortfield = "user_email ASC, user_level DESC"; 
     155            break; 
     156        case "username": 
     157        default: 
     158            $sortfield = "user_level DESC, user_name ASC"; 
     159            break; 
     160    } 
     161    // create the query filter SQL clause 
     162    $where = ""; 
     163    switch($field) { 
     164        case "country": 
     165            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_cc_code,1,1)))"; 
     166            break; 
     167        case "email": 
     168            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_email,1,1)))"; 
     169            if ($sortby != "all") { 
     170                $where = "(user_email LIKE '".stripinput($sortby)."%' OR user_email LIKE '".strtolower(stripinput($sortby))."%')"; 
     171            } 
     172            break; 
     173        case "username": 
     174        default: 
     175            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_name,1,1)))"; 
     176            if ($sortby != "all") { 
     177                $where = "(user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
     178            } 
     179            break; 
     180    } 
     181    // add the country filter if requested 
     182    $where .= $country == "" ? "" : (($where == "" ? "" : " AND ").("user_cc_code = '$country'")); 
     183 
     184 
    160185    // get the list of members 
    161186    $variables['members'] = array(); 
    162187    if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; 
    163     $result = dbquery("SELECT * FROM ".$db_prefix."users".($orderby==""?"":" WHERE").$orderby." ORDER BY user_level DESC, user_name LIMIT ".$rowstart.", ".$settings['numofthreads']); 
     188    $result = dbquery("SELECT * FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY ".$sortfield." LIMIT ".$rowstart.", ".$settings['numofthreads']); 
    164189    $rows = dbrows($result); 
    165190    $variables['members'] = array(); 
     
    197222    // starting characters to filter on. Make sure there are an even number! 
    198223    $variables['search'] = array(); 
    199     $result = dbquery("SELECT DISTINCT(UPPER(SUBSTRING(user_name,1,1))) AS letter FROM ".$db_prefix."users ORDER BY letter"); 
     224    $result = dbquery("SELECT ".$letterfilter." AS letter FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY letter"); 
    200225    while ($data = dbarray($result)) { 
    201226        // get rid of unwanted characters. Need to find a beter solution for this 
    202227        $variables['search'][] = str_replace(array('&', '?'), array('',''), $data['letter']); 
    203228    } 
    204     if (count($variables['search'])%2) $variables['search'][] = ""; 
     229    if (count($variables['search']) > 1 && count($variables['search'])%2) $variables['search'][] = ""; 
    205230    $variables['sortby'] = $sortby; 
    206     $variables['rows'] = dbcount("(*)", "users", $orderby); 
     231    $variables['rows'] = dbcount("(*)", "users", $where); 
    207232    $variables['rowstart'] = $rowstart; 
    208233    $variables['items_per_page'] = $settings['numofthreads']; 
    209     $variables['pagenav_url'] = FUSION_SELF.$aidlink."&sortby=$sortby&".($country==""?"":"country=$country&"); 
     234    $variables['pagenav_url'] = FUSION_SELF.$aidlink."&sortby=$sortby&field=$field&order=$order&".($country==""?"":"country=$country&"); 
    210235} 
    211236 
    212237$variables['step'] = $step; 
    213238$variables['user_id'] = $user_id; 
     239$variables['field'] = $field; 
     240$variables['order'] = $order; 
    214241$template_panels[] = array('type' => 'body', 'name' => 'admin.members', 'template' => 'admin.members.tpl', 'locale' => array("admin.members", "main.user_fields")); 
    215242$template_variables['admin.members'] = $variables; 
  • trunk/administration/tools/language_pack_English.php

    r1654 r1660  
    525525        $localestrings['402'] = "User Type"; 
    526526        $localestrings['403'] = "Add a new user"; 
    527         $localestrings['404'] = "Show All"; 
     527        $localestrings['404'] = "Filter on %s"; 
    528528        $localestrings['405'] = "Options"; 
    529529        $localestrings['406'] = "Country"; 
     
    535535        $localestrings['412'] = "%u members"; 
    536536        $localestrings['413'] = "Undelete this user"; 
     537        $localestrings['414'] = "Reset filter"; 
    537538        $localestrings['415'] = "Edit this user's profile"; 
    538539        $localestrings['416'] = "Activate this account"; 
     
    28182819        $localestrings['402'] = "User Type"; 
    28192820        $localestrings['403'] = "There are no user names found"; 
    2820         $localestrings['404'] = "Show All"; 
     2821        $localestrings['404'] = "Filter on %s"; 
    28212822        $localestrings['405'] = "Last visit"; 
    28222823        $localestrings['406'] = "Country"; 
     
    28272828        $localestrings['411'] = "%u member"; 
    28282829        $localestrings['412'] = "%u members"; 
     2830        $localestrings['414'] = "Reset filter"; 
    28292831        $localestrings['420'] = "Member Profile"; 
    28302832        $localestrings['422'] = "Statistics"; 
     
    31883190        $localestrings = array(); 
    31893191        $localestrings['400'] = "Select your default locale"; 
    3190         $localestrings['401'] = "Unable to establish database connection.<br><br>\nPlease ensure you have entered the correct details."; 
    3191         $localestrings['402'] = "Unable to select the database table.<br><br>\nPlease ensure you have entered the correct details."; 
     3192        $localestrings['401'] = "Unable to establish database connection."; 
     3193        $localestrings['402'] = "Unable to select the database table."; 
     3194        $localestrings['403'] = "Unable to run the ExiteCMS Setup"; 
     3195        $localestrings['404'] = "Please consult the setup instructions on our <a href='%s'>support website</a>"; 
     3196        $localestrings['405'] = "The cache directory is not writeable."; 
     3197        $localestrings['406'] = "on how to define the proper file rights."; 
     3198        $localestrings['407'] = "The template cache directory is not writeable"; 
     3199        $localestrings['408'] = "The setup procedure has already run. You can't run the setup twice."; 
     3200        $localestrings['409'] = "on how to reset your installation."; 
    31923201        $localestrings['410'] = "Welcome to ExiteCMS Setup"; 
    31933202        $localestrings['411'] = "Write permissions check passed"; 
     
    31953204        $localestrings['413'] = "Please ensure that your webserver has write<br />access (chmod) on these folders."; 
    31963205        $localestrings['414'] = "Please complete the following form and click 'Next Step'."; 
     3206        $localestrings['415'] = "No rights to create the configuration file."; 
     3207        $localestrings['416'] = "The locales cache directory is not writeable"; 
     3208        $localestrings['417'] = "Database Hostname invalid. Please enter a host name, IP address, or 'localhost'"; 
     3209        $localestrings['418'] = "Database Username invalid. Please enter a valid username"; 
     3210        $localestrings['419'] = "Database Password invalid. Please enter a valid password"; 
    31973211        $localestrings['420'] = "MySQL Database access settings"; 
    31983212        $localestrings['421'] = "Database Hostname:"; 
     
    32023216        $localestrings['425'] = "Table Prefix:"; 
    32033217        $localestrings['426'] = "Next Step >>"; 
     3218        $localestrings['427'] = "Database Name invalid. Please enter a valid name"; 
     3219        $localestrings['428'] = "Table prefix invalid. Please enter a valid prefix"; 
     3220        $localestrings['429'] = "Please check your database hostname, username and password"; 
    32043221        $localestrings['430'] = "Unable to write to config<br>\nPlease check write permissions and restart setup."; 
    32053222        $localestrings['431'] = "Setup was unable to create one or more database tables:<br>%s<br><br>\nPlease restart setup and try again.<br><br>\nIf you are unable to resolve this problem please visit our<br>\nlocal support site at <a href='http://exitecms.exite.eu' target='blank'>http://exitecms.exite.eu</a>"; 
    32063223        $localestrings['432'] = "The config has been written successfully.<br><br>\n"; 
    32073224        $localestrings['433'] = "The database tables have been created.<br><br>\nPlease complete the following form and click 'Next Step'."; 
     3225        $localestrings['434'] = "The Database '%s' does not exist or the database user has no rights to access it."; 
     3226        $localestrings['435'] = "Insufficient rights to create new tables in database '%s'."; 
    32083227        $localestrings['440'] = "Super Admin login details"; 
    32093228        $localestrings['441'] = "Username:"; 
     
    34033422if (!defined('LP_CHARSET')) define('LP_CHARSET', "iso-8859-1"); 
    34043423if (!defined('LP_VERSION')) define('LP_VERSION', "7.10"); 
    3405 if (!defined('LP_DATE')) define('LP_DATE', "1218989654"); 
    3406 $lp_date = "1218989654"; 
     3424if (!defined('LP_DATE')) define('LP_DATE', "1219327583"); 
     3425$lp_date = "1219327583"; 
    34073426 
    34083427/*---------------------------------------------------+ 
  • trunk/administration/tools/language_pack_Nederlands.php

    r1654 r1660  
    525525        $localestrings['402'] = "Gebruikerstype"; 
    526526        $localestrings['403'] = "Nieuwe gebruiker toevoegen"; 
    527         $localestrings['404'] = "Toon alles"; 
     527        $localestrings['404'] = "filter op %s"; 
    528528        $localestrings['405'] = "Opties"; 
    529529        $localestrings['406'] = "Land"; 
     
    535535        $localestrings['412'] = "%u gebruikers"; 
    536536        $localestrings['413'] = "Heractiveer deze gebruiker"; 
     537        $localestrings['414'] = "Filter wissen"; 
    537538        $localestrings['415'] = "Wijzig het profiel van deze gebruiker"; 
    538539        $localestrings['416'] = "Activeer deze gebruiker"; 
     
    28182819        $localestrings['402'] = "Type gebruiker"; 
    28192820        $localestrings['403'] = "Er zijn geen gebruikersnamen gevonden"; 
    2820         $localestrings['404'] = "Alles"; 
     2821        $localestrings['404'] = "Filter op %s"; 
    28212822        $localestrings['405'] = "Laatste bezoek"; 
    28222823        $localestrings['406'] = "Land"; 
     
    28272828        $localestrings['411'] = "%u lid"; 
    28282829        $localestrings['412'] = "%u leden"; 
     2830        $localestrings['414'] = "Filter wissen"; 
    28292831        $localestrings['420'] = "Lid profiel"; 
    28302832        $localestrings['422'] = "Statistieken"; 
     
    31883190        $localestrings = array(); 
    31893191        $localestrings['400'] = "Selecteer de standaard taal voor uw site"; 
    3190         $localestrings['401'] = "Kan geen verbinding maken met de database.<br><br>\nControleer of de door u opgegeven parameters correct zijn."; 
    3191         $localestrings['402'] = "Kan de database niet selecteren.<br><br>\nControleer of de door u opgegeven parameters correct zijn."; 
    3192         $localestrings['410'] = "Welkom bij de ExiteCMS installatie"; 
     3192        $localestrings['401'] = "Kan geen verbinding maken met de database."; 
     3193        $localestrings['402'] = "Kan de database niet selecteren."; 
     3194        $localestrings['403'] = "Kan de ExiteCMS installatie niet uitvoeren"; 
     3195        $localestrings['404'] = "Raadpleeg a.u.b. de installatie instructies op onze <a href='%s'>support website</a>"; 
     3196        $localestrings['405'] = "Geen schrijfrechten op de cache folder."; 
     3197        $localestrings['406'] = "over how bestandsrechten te definieren."; 
     3198        $localestrings['407'] = "Geen schrijfrechten op de template cache folder"; 
     3199        $localestrings['408'] = "De installatie procedure is reeds uitgevoerd. U kunt dit niet nogmaals doen."; 
     3200        $localestrings['409'] = "over hoe u opnieuw kunt installeren."; 
     3201        $localestrings['410'] = "Welkom bij de ExiteCMS installatie procedure"; 
    31933202        $localestrings['411'] = "Controle op schrijfrechten succesvol"; 
    31943203        $localestrings['412'] = "De webserver heeft geen schrijfrechten op:"; 
    31953204        $localestrings['413'] = "Zorg er voor dat de webserver schrijfrechten heeft<br />op deze folders."; 
    31963205        $localestrings['414'] = "Vul a.u.b. dit formulier in, en klik daarna op 'Volgende Stap'."; 
     3206        $localestrings['415'] = "Geen rechten om het configuratie bestand aan te maken."; 
     3207        $localestrings['416'] = "Geen schrijfrechten op de locales cache folder"; 
     3208        $localestrings['417'] = "Database systeemnaam incorrect. Vul a.u.b. een correct systeemnaam, een IP adres, of 'localhost' in."; 
     3209        $localestrings['418'] = "Database gebruikersnaam incorrect. Vul a.u.b. een correct gebruikersnaam in."; 
     3210        $localestrings['419'] = "Database wachtwoord incorrect. Vul a.u.b. een corect wachtwoord in."; 
    31973211        $localestrings['420'] = "MySQL Database parameters"; 
    31983212        $localestrings['421'] = "Database systeemnaam:"; 
     
    32023216        $localestrings['425'] = "Tabel voorvoegsel:"; 
    32033217        $localestrings['426'] = "Volgende Stap >>"; 
     3218        $localestrings['427'] = "Database naam incorrect. Vul a.u.b. een correcte naam in."; 
     3219        $localestrings['428'] = "Tabel voorvoegsel incorrect. Vul a.u.b. een correct voorvoegsel in."; 
     3220        $localestrings['429'] = "Controleer de systeemnaam, gebruikersnaam en wachtwoord op juistheid."; 
    32043221        $localestrings['430'] = "Kan de configuratie niet wegschrijven<br \>\nControleer a.u.b. de schrijfpermissies en herstart daarna de installatie."; 
    3205         $localestrings['431'] = "De installatie kon één of meerder database tabellen niet aanmaken:<br />%s<b /r><br />\nCorrigeer het probleem, en herstart de installatie.<br><br>\nIndien u het probleem niet zelf op kunt lossen, kunt u ondersteuning vragen op onze website<br>\n<a href='http://exitecms.exite.eu' target='blank'>http://exitecms.exite.eu</a>"; 
     3222        $localestrings['431'] = "De installatie kon één of meerdere database tabellen niet aanmaken:<br />%s<b /r><br />\nCorrigeer het probleem, en herstart de installatie.<br><br>\nIndien u het probleem niet zelf op kunt lossen, kunt u ondersteuning vragen op onze website<br>\n<a href='http://exitecms.exite.eu' target='blank'>http://exitecms.exite.eu</a>"; 
    32063223        $localestrings['432'] = "De configuratie is succesvol weggeschreven.<br><br>\n"; 
    32073224        $localestrings['433'] = "De database tabellen zijn aangemaakt.<br><br>\nVul a.u.b. het volgende formulier in, en klik daarna op 'Volgende Stap'."; 
     3225        $localestrings['434'] = "De database '%s' bestaat niet of uw gebruiker heeft onvoldoende rechten op deze database."; 
     3226        $localestrings['435'] = "Uw database gebruiker heeft onvoldoende rechten op de database '%s' om tabellen aan te maken."; 
    32083227        $localestrings['440'] = "Webmaster aanmeld gegevens"; 
    32093228        $localestrings['441'] = "Gebruikersnaam:"; 
     
    34033422if (!defined('LP_CHARSET')) define('LP_CHARSET', "iso-8859-1"); 
    34043423if (!defined('LP_VERSION')) define('LP_VERSION', "7.10"); 
    3405 if (!defined('LP_DATE')) define('LP_DATE', "1218989657"); 
    3406 $lp_date = "1218989657"; 
     3424if (!defined('LP_DATE')) define('LP_DATE', "1219327586"); 
     3425$lp_date = "1219327586"; 
    34073426 
    34083427/*---------------------------------------------------+ 
  • trunk/files/locales/en.main.global.php

    r1654 r1660  
    33// locale       : English 
    44// locale name  : main.global 
    5 // generated on : Mon Aug 18 2008, 22:18:00 CEST 
     5// generated on : Thu Aug 21 2008, 16:06:37 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
  • trunk/files/locales/en.main.setup.php

    r1599 r1660  
    33// locale       : English 
    44// locale name  : main.setup 
    5 // generated on : Sun Aug 3 2008, 23:27:40 CEST 
     5// generated on : Thu Aug 21 2008, 16:06:23 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
    88$locale['400'] = "Select your default locale"; 
    9 $locale['401'] = "Unable to establish database connection.<br><br>\nPlease ensure you have entered the correct details."; 
    10 $locale['402'] = "Unable to select the database table.<br><br>\nPlease ensure you have entered the correct details."; 
     9$locale['401'] = "Unable to establish database connection."; 
     10$locale['402'] = "Unable to select the database table."; 
     11$locale['403'] = "Unable to run the ExiteCMS Setup"; 
     12$locale['404'] = "Please consult the setup instructions on our <a href='%s'>support website</a>"; 
     13$locale['405'] = "The cache directory is not writeable."; 
     14$locale['406'] = "on how to define the proper file rights."; 
     15$locale['407'] = "The template cache directory is not writeable"; 
     16$locale['408'] = "The setup procedure has already run. You can't run the setup twice."; 
     17$locale['409'] = "on how to reset your installation."; 
    1118$locale['410'] = "Welcome to ExiteCMS Setup"; 
    1219$locale['411'] = "Write permissions check passed"; 
     
    1421$locale['413'] = "Please ensure that your webserver has write<br />access (chmod) on these folders."; 
    1522$locale['414'] = "Please complete the following form and click 'Next Step'."; 
     23$locale['415'] = "No rights to create the configuration file."; 
     24$locale['416'] = "The locales cache directory is not writeable"; 
     25$locale['417'] = "Database Hostname invalid. Please enter a host name, IP address, or 'localhost'"; 
     26$locale['418'] = "Database Username invalid. Please enter a valid username"; 
     27$locale['419'] = "Database Password invalid. Please enter a valid password"; 
    1628$locale['420'] = "MySQL Database access settings"; 
    1729$locale['421'] = "Database Hostname:"; 
     
    2133$locale['425'] = "Table Prefix:"; 
    2234$locale['426'] = "Next Step >>"; 
     35$locale['427'] = "Database Name invalid. Please enter a valid name"; 
     36$locale['428'] = "Table prefix invalid. Please enter a valid prefix"; 
     37$locale['429'] = "Please check your database hostname, username and password"; 
    2338$locale['430'] = "Unable to write to config<br>\nPlease check write permissions and restart setup."; 
    2439$locale['431'] = "Setup was unable to create one or more database tables:<br>%s<br><br>\nPlease restart setup and try again.<br><br>\nIf you are unable to resolve this problem please visit our<br>\nlocal support site at <a href='http://exitecms.exite.eu' target='blank'>http://exitecms.exite.eu</a>"; 
    2540$locale['432'] = "The config has been written successfully.<br><br>\n"; 
    2641$locale['433'] = "The database tables have been created.<br><br>\nPlease complete the following form and click 'Next Step'."; 
     42$locale['434'] = "The Database '%s' does not exist or the database user has no rights to access it."; 
     43$locale['435'] = "Insufficient rights to create new tables in database '%s'."; 
    2744$locale['440'] = "Super Admin login details"; 
    2845$locale['441'] = "Username:"; 
  • trunk/includes/core_functions.php

    r1648 r1660  
    100100define("INIT_CMS_OK", TRUE); 
    101101 
    102 // load the config file 
     102// get the full filename of the config file 
    103103@include_once PATH_ROOT."configpath.php"; 
    104104if (substr(CONFIG_PATH,0,1) == "/") { 
    105     if(is_file(CONFIG_PATH."/config.php")) { 
    106         @include_once CONFIG_PATH."/config.php"; 
    107     } 
     105    define('CONFIG_FILE', str_replace("//", "/", CONFIG_PATH."/config.php")); 
    108106} else { 
    109     if(is_file(PATH_ROOT.CONFIG_PATH."/config.php")) { 
    110         @include_once PATH_ROOT.CONFIG_PATH."/config.php"; 
    111     } 
     107    define('CONFIG_FILE', str_replace("//", "/", PATH_ROOT.CONFIG_PATH."/config.php")); 
     108} 
     109if(is_file(CONFIG_FILE)) { 
     110    @include_once CONFIG_FILE; 
    112111} 
    113112 
    114113// if config.php is absent or empty, bail out with an error 
    115 if (!isset($db_name)) terminate('FATAL ERROR: config file is missing. Check our Wiki at http://exitecms.exite.eu on how to run the setup'); 
     114if (!isset($db_name)) { 
     115    terminate('FATAL ERROR: config file is missing. Did you run the setup?<br />Check our Wiki at http://exitecms.exite.eu on how to run the setup'); 
     116} 
    116117 
    117118// load the database functions, and establish a database connection 
  • trunk/includes/dbsetup_include.php

    r1502 r1660  
    22//---------------------------------------------------------- 
    33// ExiteCMS file : dbsetup_include.php 
    4 // Date generated  : `02/07/2008 08:40` 
     4// Date generated  : `21/08/2008 15:52` 
    55//---------------------------------------------------------- 
    66 
    77define('CMS_VERSION', '7.10'); 
    8 define('CMS_REVISION', '1500'); 
     8define('CMS_REVISION', '1650'); 
    99 
    1010if ($step == 1) { 
     
    5959    $fail = "1"; 
    6060    $failed[] = "admin : ".mysql_error(); 
     61} else { 
     62    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('NF', '404pages.gif', '227', '404pages.php', '1')"); 
     63    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('A', 'articles.gif', '203', 'articles.php', '1')"); 
     64    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('AC', 'article_cats.gif', '202', 'article_cats.php', '1')"); 
     65    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('BG', 'blogs.gif', '226', 'blogs.php', '1')"); 
     66    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('CP', 'c-pages.gif', '206', 'custom_pages.php', '1')"); 
     67    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('D', 'dl.gif', '209', 'downloads.php', '1')"); 
     68    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('DC', 'dl_cats.gif', '208', 'download_cats.php', '1')"); 
     69    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('FQ', 'faq.gif', '210', 'faq.php', '1')"); 
     70    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('F', 'forums.gif', '211', 'forums.php', '1')"); 
     71    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('PO', 'polls.gif', '220', 'forum_polls.php', '1')"); 
     72    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('N', 'frontpage.gif', '239', 'frontpage.php', '1')"); 
     73    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('IM', 'images.gif', '212', 'images.php', '1')"); 
     74    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('N', 'news.gif', '216', 'news.php', '1')"); 
     75    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('NC', 'news_cats.gif', '235', 'news_cats.php', '1')"); 
     76    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('FR', 'ranking.gif', '238', 'ranking.php', '1')"); 
     77    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('UR', 'submissions.gif', '218', 'redirects.php', '1')"); 
     78    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('UA', 'activation.gif', '221', 'activation.php', '2')"); 
     79    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('AD', 'admins.gif', '201', 'administrators.php', '2')"); 
     80    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('B', 'blacklist.gif', '204', 'blacklist.php', '2')"); 
     81    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('M', 'members.gif', '215', 'members.php', '2')"); 
     82    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('UG', 'user_groups.gif', '225', 'user_groups.php', '2')"); 
     83    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('DB', 'db_backup.gif', '207', 'db_backup.php', '3')"); 
     84    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('I', 'modules.gif', '213', 'modules.php', '3')"); 
     85    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('P', 'panels.gif', '217', 'panels.php', '3')"); 
     86    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('PI', 'phpinfo.gif', '219', 'phpinfo.php', '3')"); 
     87    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('R', 'reports.gif', '256', 'reports.php', '3')"); 
     88    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('S', 'searches.gif', '260', 'search.php', '3')"); 
     89    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('S3', 'settings_forum.gif', '230', 'settings_forum.php', '3')"); 
     90    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('S8', 'settings_lang.gif', '236', 'settings_languages.php', '3')"); 
     91    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('S1', 'settings.gif', '228', 'settings_main.php', '3')"); 
     92    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('S7', 'settings_pm.gif', '234', 'settings_messages.php', '3')"); 
     93    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('S6', 'settings_misc.gif', '233', 'settings_misc.php', '3')"); 
     94    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('S4', 'security.gif', '231', 'settings_security.php', '3')"); 
     95    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('S2', 'settings_time.gif', '229', 'settings_time.php', '3')"); 
     96    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('SL', 'site_links.gif', '222', 'site_links.php', '3')"); 
     97    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('T', 'tools.gif', '223', 'tools.php', '3')"); 
     98    $result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES('U', 'upgrade.gif', '224', 'upgrade.php', '3')"); 
    6199} 
    62100 
     
    195233} else { 
    196234    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('admin_activation', '0')"); 
    197     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('article_localisation', 'none')"); 
     235    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('article_localisation', 'multiple')"); 
    198236    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachmax', '10485760')"); 
    199237    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachments', '1')"); 
    200     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachtypes', '.exe,.com,.bat,.js,.htm,.html,.shtml,.php,.php3')"); 
     238    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachtypes', '.exe,.com,.bat,.js,.htm,.html,.shtml,.php,.php3,.esml,.psd,.mvi')"); 
     239    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('auth_ad_basedn', '')"); 
     240    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('auth_ad_suffix', '')"); 
     241    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('auth_ldap_basedn', '')"); 
     242    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('auth_ldap_suffix', '')"); 
     243    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('auth_type', 'local,openid')"); 
    201244    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('bad_words', '')"); 
    202245    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('bad_words_enabled', '0')"); 
     
    204247    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('blogs_indexage', '90')"); 
    205248    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('blogs_indexsize', '5')"); 
    206     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('counter', '0')"); 
    207     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('country', 'us')"); 
     249    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('browserlang', '1')"); 
     250    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('counter', '895')"); 
     251    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('country', 'nl')"); 
     252    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('debug_php_errors', '1')"); 
    208253    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('debug_querylog', '')"); 
    209254    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('debug_sql_explain', '1')"); 
    210     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('description', 'ExiteCMS, a light-weight CMS system, written in PHP, and using MySQL and the Smarty template engine')"); 
     255    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('description', 'ExiteCMS, a light-weight CMS system, wriiten in PHP, and using MySQL and the Smarty template engine')"); 
    211256    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('display_validation', '1')"); 
    212257    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('download_columns', '1')"); 
    213     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('download_localisation', 'none')"); 
     258    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('download_localisation', 'multiple')"); 
    214259    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('email_verification', '1')"); 
    215260    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('enable_registration', '1')"); 
     
    220265    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('forum_edit_timeout', '1')"); 
    221266    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('forum_flags', '1')"); 
     267    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('forum_guest_limit', '30')"); 
    222268    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('forum_max_h', '600')"); 
    223269    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('forum_max_w', '600')"); 
    224270    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('guestposts', '1')"); 
    225271    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('hide_webmaster', '0')"); 
     272    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('hoteditor_enabled', '1')"); 
    226273    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('keywords', 'ExiteCMS, CMS, Smarty, MySQL, PHP, Open-Source')"); 
    227274    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('locale', 'English')"); 
    228275    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('login_expire', '7200')"); 
    229     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('login_extended_expire', '84600')"); 
     276    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('login_extended_expire', '604800')"); 
    230277    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('longdate', '%m/%d/%Y %H:%M:%S')"); 
    231278    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance', '0')"); 
    232279    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance_color', '#83AF83')"); 
    233     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance_message', '')"); 
    234     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('max_users', '0')"); 
    235     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('max_users_datestamp', '0')"); 
     280    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance_message', 'Maintenance Mode Test')"); 
     281    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('max_users', '5')"); 
     282    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('max_users_datestamp', '1193029685')"); 
    236283    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('navbar_range', '5')"); 
    237     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('newsletter_email', 'noreply@example.com')"); 
     284    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('newsletter_email', 'noreply@exite.eu')"); 
    238285    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_columns', '1')"); 
    239     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_headline', '1')"); 
    240     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_items', '3')"); 
    241     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_latest', '0')"); 
    242     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_localisation', 'none')"); 
     286    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_headline', '2')"); 
     287    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_items', '6')"); 
     288    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_latest', '1')"); 
     289    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('news_localisation', 'multiple')"); 
    243290    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('numofshouts', '5')"); 
    244291    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('numofthreads', '20')"); 
    245292    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('opening_page', 'news.php')"); 
    246     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('panels_localisation', 'none')"); 
     293    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('panels_localisation', 'multiple')"); 
    247294    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('photo_h', '300')"); 
    248295    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('photo_max_b', '150000')"); 
     
    258305    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('pm_sentbox', '25')"); 
    259306    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('pm_sentbox_group', '103')"); 
    260     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('revision', '1500')"); 
     307    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('revision', '1650')"); 
    261308    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('session_gc_divisor', '100')"); 
    262309    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('session_gc_maxlifetime', '604800')"); 
     
    264311    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('session_name', 'ExiteCMSid')"); 
    265312    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('shortdate', '%m/%d/%Y')"); 
    266     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteemail', 'website@example.com')"); 
    267     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteintro', '<center>\r\n<b>This website is under construction at the moment!</b><br /><br />\r\nExiteCMS v7.2 ©2008 Exite BV.</center>')"); 
    268     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('sitelinks_localisation', 'none')"); 
    269     $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('sitename', 'ExiteCMS Website')"); 
     313    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteemail', 'exitecms@exite.eu')"); 
     314    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteintro', '<center>\r\n<b>This website is under construction at the moment!</b><br /><br />We are currently preparing the release of version 7.0. The release date has been set for October 27th, providing no last-minute showstoppers pop up.<br /><br />\r\nExiteCMS v7.0 ©2007 Exite BV.</center>')"); 
     315    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('sitelinks_localisation', 'multiple')"); 
     316    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('sitename', 'ExiteCMS Support Site')"); 
    270317    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteurl', '/')"); 
    271318    $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteusername', 'webmaster')"); 
     
    342389  `download_version` varchar(50) NOT NULL default '', 
    343390  `download_filesize` varchar(20) NOT NULL default '', 
    344   `download_bar` tinyint(1) unsigned NOT NULL default 0, 
    345391  `download_datestamp` int(10) unsigned NOT NULL default 0, 
    346392  `download_count` smallint(5) unsigned NOT NULL default 0, 
     393  `download_external` tinyint(1) NOT NULL default 0, 
    347394  PRIMARY KEY  (`download_id`) 
    348395) ENGINE=MyISAM;"); 
     
    411458  `attach_count` mediumint(8) unsigned NOT NULL default 0, 
    412459  PRIMARY KEY  (`attach_id`), 
    413   KEY `post_id` (`post_id`) 
     460  KEY `post_id` (`post_id`), 
     461  FULLTEXT KEY `attach_realname` (`attach_realname`), 
     462  FULLTEXT KEY `attach_comment` (`attach_comment`) 
    414463) ENGINE=MyISAM;"); 
    415464if (!$result) { 
     
    628677  `news_breaks` char(1) NOT NULL default 'n', 
    629678  `news_name` mediumint(8) unsigned NOT NULL default 1, 
     679  `news_locale` varchar(8) NOT NULL default '', 
    630680  `news_datestamp` int(10) unsigned NOT NULL default 0, 
    631681  `news_start` int(10) unsigned NOT NULL default 0, 
     
    633683  `news_visibility` tinyint(3) unsigned NOT NULL default 0, 
    634684  `news_reads` smallint(5) unsigned NOT NULL default 0, 
    635   `news_headline` tinyint(1) unsigned NOT NULL default 0, 
    636   `news_latest_news` tinyint(3) unsigned NOT NULL default 0, 
    637685  `news_allow_comments` tinyint(1) unsigned NOT NULL default 1, 
    638686  `news_allow_ratings` tinyint(1) unsigned NOT NULL default 1, 
    639   PRIMARY KEY  (`news_id`) 
     687  PRIMARY KEY  (`news_id`), 
     688  FULLTEXT KEY `news_subject` (`news_subject`), 
     689  FULLTEXT KEY `news_news` (`news_news`), 
     690  FULLTEXT KEY `news_extended` (`news_extended`) 
    640691) ENGINE=MyISAM;"); 
    641692if (!$result) { 
     
    657708    $fail = "1"; 
    658709    $failed[] = "news_cats : ".mysql_error(); 
     710} 
     711 
     712// 
     713// Code to create table `news_frontpage` 
     714// 
     715$result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."news_frontpage"); 
     716$result = dbquery("CREATE TABLE IF NOT EXISTS ".$db_prefix."news_frontpage ( 
     717  `frontpage_id` smallint(5) unsigned NOT NULL auto_increment, 
     718  `frontpage_locale` varchar(8) NOT NULL default '', 
     719  `frontpage_headline` tinyint(1) unsigned NOT NULL default 0, 
     720  `frontpage_order` smallint(5) unsigned NOT NULL default 0, 
     721  `frontpage_news_id` smallint(5) unsigned NOT NULL default 0, 
     722  PRIMARY KEY  (`frontpage_id`) 
     723) ENGINE=MyISAM;"); 
     724if (!$result) { 
     725    $fail = "1"; 
     726    $failed[] = "news_frontpage : ".mysql_error(); 
    659727} 
    660728 
     
    805873  KEY `thread_id` (`thread_id`), 
    806874  KEY `post_datestamp` (`post_datestamp`), 
    807   KEY `post_edittime` (`post_edittime`) 
     875  KEY `post_edittime` (`post_edittime`), 
     876  FULLTEXT KEY `subject_message` (`post_subject`,`post_message`) 
    808877) ENGINE=MyISAM;"); 
    809878if (!$result) { 
     
    855924  `report_id` smallint(5) unsigned NOT NULL auto_increment, 
    856925  `report_mod_id` smallint(5) unsigned NOT NULL default 0, 
     926  `report_mod_core` tinyint(1) unsigned NOT NULL default 0, 
    857927  `report_name` varchar(100) NOT NULL default '', 
    858928  `report_title` varchar(100) NOT NULL default '', 
     
    868938 
    869939// 
    870 // Code to create table `searches` 
    871 // 
    872 $result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."searches"); 
    873 $result = dbquery("CREATE TABLE IF NOT EXISTS ".$db_prefix."searches ( 
     940// Code to create table `search` 
     941// 
     942$result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."search"); 
     943$result = dbquery("CREATE TABLE IF NOT EXISTS ".$db_prefix."search ( 
    874944  `search_id` smallint(5) unsigned NOT NULL auto_increment, 
    875945  `search_mod_id` smallint(5) unsigned NOT NULL default 0, 
     946  `search_mod_core` tinyint(1) unsigned NOT NULL default 0, 
    876947  `search_name` varchar(100) NOT NULL default '', 
    877948  `search_title` varchar(100) NOT NULL default '', 
     949  `search_fulltext` tinyint(1) unsigned NOT NULL default 0, 
    878950  `search_version` varchar(10) NOT NULL default '0', 
     951  `search_active` tinyint(1) unsigned NOT NULL default 0, 
    879952  `search_visibility` tinyint(3) NOT NULL default 0, 
    880953  PRIMARY KEY  (`search_id`) 
     
    882955if (!$result) { 
    883956    $fail = "1"; 
    884     $failed[] = "searches : ".mysql_error(); 
     957    $failed[] = "search : ".mysql_error(); 
    885958} 
    886959 
     
    10171090  `user_location` varchar(50) NOT NULL default '', 
    10181091  `user_birthdate` date NOT NULL default '0000-00-00', 
     1092  `user_gender` enum('M','F','') NOT NULL default '', 
    10191093  `user_aim` varchar(16) NOT NULL default '', 
    10201094  `user_icq` varchar(15) NOT NULL default '', 
     
    10431117  `user_posts_unread` tinyint(1) NOT NULL default 1, 
    10441118  `user_cc_code` char(2) NOT NULL default '', 
     1119  `user_openid_url` varchar(255) NOT NULL default '', 
     1120  `user_hoteditor` tinyint(1) unsigned NOT NULL default 1, 
    10451121  PRIMARY KEY  (`user_id`) 
    10461122) ENGINE=MyISAM;"); 
  • trunk/includes/dns_functions.php

    r1416 r1660  
    5454    // for non-windows platforms, use the internal function 
    5555    if (CMS_getOS() != "Windows") { 
    56         return getmxrr($hostname, $mxhosts); 
     56        $result = getmxrr($hostname, $hosts, $weight); 
     57        if (!$result) { 
     58            return false; 
     59        } else { 
     60            // sort the result based on weight 
     61            $mxs = array(); 
     62            for ($i=0;$i<count($hosts);$i++) { 
     63                $mxs[$hosts[$i]] = $weight[$i]; 
     64            } 
     65            asort($mxs); 
     66            $mxhosts = array_keys($mxs); 
     67            return true; 
     68        } 
    5769    } 
    5870 
  • trunk/includes/templates/admin.members.tpl

    r1186 r1660  
    183183                    <td class='tbl2'> 
    184184                        <div style='float:right;'><a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;step=add'><img src='{$smarty.const.THEME}images/user_add.gif' alt='{$locale.403}' title='{$locale.403}' /></a></div> 
    185                         <b>{$locale.401}</b> 
     185                        {if $order == "username"} 
     186                             <b>{$locale.401}</b> <img src='{$smarty.const.THEME}images/panel_on.gif' alt='' /> 
     187                        {else} 
     188                            <a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;order=username&amp;field={$field}&amp;sortby={$sortby}&amp;country={$country}'><b>{$locale.401}</b></a> 
     189                        {/if} 
    186190                    </td> 
    187191                    {if $userdata.user_level >= 102 || $settings.forum_flags} 
    188192                    <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 
    189                         <b>{$locale.406}</b> 
    190                     </td> 
    191                     {/if} 
    192                     {if $userdata.user_level >= 102} 
     193                        {if $order == "country"} 
     194                             <b>{$locale.406}</b> <img src='{$smarty.const.THEME}images/panel_on.gif' alt='' /> 
     195                        {else} 
     196                            <a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;order=country&amp;field={$field}&amp;sortby={$sortby}&amp;country={$country}'><b>{$locale.406}</b></a> 
     197                        {/if} 
     198                    </td> 
     199                    {/if} 
     200                    {if $smarty.const.iADMIN} 
    193201                        <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 
    194                             <b>{$locale.409}</b> 
     202                            {if $order == "email"} 
     203                                 <b>{$locale.409}</b> <img src='{$smarty.const.THEME}images/panel_on.gif' alt='' /> 
     204                            {else} 
     205                                <a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;order=email&amp;field={$field}&amp;sortby={$sortby}&amp;country={$country}'><b>{$locale.409}</b></a> 
     206                            {/if} 
    195207                        </td> 
    196208                    {/if} 
     
    209221                    {if $userdata.user_level >= 102 || $settings.forum_flags} 
    210222                        <td align='left' width='1%' class='{cycle values='tbl1,tbl2' advance=no}' style='white-space:nowrap'> 
    211                             {$members[id].cc_flag}{if $members[id].user_cc_code == ""}{$members[id].cc_name}{else}<a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;sortby={$sortby}&amp;country={$members[id].user_cc_code}'>{$members[id].cc_name}</a>{/if} 
     223                            {$members[id].cc_flag}{if $members[id].user_cc_code == ""}{$members[id].cc_name}{else}<a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;order={$order}&amp;sortby={$sortby}&amp;field={$field}&amp;country={$members[id].user_cc_code}'>{$members[id].cc_name}</a>{/if} 
    212224                        </td> 
    213225                    {/if} 
     
    243255                </tr> 
    244256            {if $smarty.section.id.last} 
    245             </table> 
    246             <br /> 
    247             <table align='center' cellpadding='0' cellspacing='1' class='tbl-border'> 
    248                 <tr> 
    249                     <td rowspan='2' class='tbl2'> 
    250                         <a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;sortby=all'>{$locale.404}</a> 
    251                     </td> 
    252                     {foreach from=$search item=letter name=search} 
    253                     {if $smarty.foreach.search.first} 
    254                         {math equation="x/2-1" x=$smarty.foreach.search.total format="%u" assign='break'} 
    255                     {/if} 
    256                     <td align='center' class='tbl1'> 
    257                         <div class='small'> 
    258                             <a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;sortby={$letter}{if $country !=""}&amp;country={$country}{/if}'>{$letter}</a> 
    259                         </div> 
    260                     </td> 
    261                 {if $smarty.foreach.search.index==$break} 
    262                             <td rowspan='2' class='tbl2'> 
    263                         <a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;sortby=all'>{$locale.404}</a> 
    264                     </td> 
    265                 </tr> 
    266                 <tr> 
     257                </table> 
     258                {if $field == "username" || $field == "email"} 
     259                <br /> 
     260                <table align='center' cellpadding='0' cellspacing='1' class='tbl-border'> 
     261                    <tr> 
     262                        {foreach from=$search item=letter name=search} 
     263                        {if $smarty.foreach.search.first} 
     264                            {math equation="x/2-1" x=$smarty.foreach.search.total format="%u" assign='break'} 
     265                        {/if} 
     266                        <td align='center' class='tbl1'> 
     267                            <div class='small'> 
     268                                <a href='{$smarty.const.FUSION_SELF}{$aidlink}&amp;field={$field}&amp;sortby={$letter}&amp;order={$order}{if $country !=""}&amp;country={$country}{/if}'>{$letter}</a> 
     269                            </div> 
     270                        </td> 
     271                    {if !$smarty.foreach.search.last && $smarty.foreach.search.index==$break} 
     272                    </tr> 
     273                    <tr> 
     274                    {/if} 
     275                        {/foreach} 
     276                    </tr> 
     277                </table> 
     278                <div style='text-align:center'> 
     279                    {buttonlink name=$locale.404|sprintf:$locale.401 link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&amp;field=username"|cat:"&amp;order="|cat:$order|cat:"&amp;sortby=all&amp;country="|cat:$country} 
     280                    &nbsp; 
     281                    {buttonlink name=$locale.404|sprintf:$locale.409 link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&amp;field=email"|cat:"&amp;order="|cat:$order|cat:"&amp;sortby=all&amp;country="|cat:$country} 
     282                    {if $sortby != "all" || $country != ""} 
     283                        &nbsp; 
     284                        {buttonlink name=$locale.414 link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&amp;field="|cat:$field|cat:"&amp;order="|cat:$order|cat:"&amp;sortby=all"} 
     285                    {/if} 
     286                </div> 
    267287                {/if} 
    268                     {/foreach} 
    269                 </tr> 
    270             </table> 
    271288            {/if} 
    272289        {sectionelse} 
  • trunk/includes/templates/main.members.tpl

    r1186 r1660  
    3333            <tr> 
    3434                <td class='tbl2'> 
    35                     <b>{$locale.401}</b> 
     35                    {if $order == "username"} 
     36                         <b>{$locale.401}</b> <img src='{$smarty.const.THEME}images/panel_on.gif' alt='' /> 
     37                    {else} 
     38                        <a href='{$smarty.const.FUSION_SELF}?order=username&amp;field={$field}&amp;sortby={$sortby}&amp;country={$country}'><b>{$locale.401}</b></a> 
     39                    {/if} 
    3640                </td> 
    3741                {if $userdata.user_level >= 102 || $settings.forum_flags} 
    3842                <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 
    39                     <b>{$locale.406}</b> 
     43                    {if $order == "country"} 
     44                         <b>{$locale.406}</b> <img src='{$smarty.const.THEME}images/panel_on.gif' alt='' /> 
     45                    {else} 
     46                        <a href='{$smarty.const.FUSION_SELF}?order=country&amp;field={$field}&amp;sortby={$sortby}&amp;country={$country}'><b>{$locale.406}</b></a> 
     47                    {/if} 
    4048                </td> 
    4149                {/if} 
    4250                {if $smarty.const.iSUPERADMIN} 
    4351                    <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 
    44                         <b>{$locale.409}</b> 
     52                        {if $order == "email"} 
     53                             <b>{$locale.409}</b> <img src='{$smarty.const.THEME}images/panel_on.gif' alt='' /> 
     54                        {else} 
     55                            <a href='{$smarty.const.FUSION_SELF}?order=email&amp;field={$field}&amp;sortby={$sortby}&amp;country={$country}'><b>{$locale.409}</b></a> 
     56                        {/if} 
    4557                    </td> 
    4658                    <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 
    47                         <b>{$locale.405}</b> 
     59                        {if $order == "lastvisit"} 
     60                             <b>{$locale.409}</b> <img src='{$smarty.const.THEME}images/panel_on.gif' alt='' /> 
     61                        {else} 
     62                            <a href='{$smarty.const.FUSION_SELF}?order=lastvisit&amp;field={$field}&amp;sortby={$sortby}&amp;country={$country}'><b>{$locale.405}</b></a> 
     63                        {/if} 
    4864                    </td> 
    4965                {/if} 
     
    5975                {if $userdata.user_level >= 102 || $settings.forum_flags} 
    6076                    <td align='left' width='1%' class='{cycle values='tbl1,tbl2' advance=no}' style='white-space:nowrap'> 
    61                         {$members[id].cc_flag}{if $members[id].user_cc_code == ""}{$members[id].cc_name}{else}<a href='{$smarty.const.FUSION_SELF}?sortby={$sortby}&amp;country={$members[id].user_cc_code}'>{$members[id].cc_name}</a>{/if} 
     77                        {$members[id].cc_flag}{if $members[id].user_cc_code == ""}{$members[id].cc_name}{else}<a href='{$smarty.const.FUSION_SELF}?order={$order}&amp;sortby={$sortby}&amp;field={$field}&amp;country={$members[id].user_cc_code}'>{$members[id].cc_name}</a>{/if} 
    6278                    </td> 
    6379                {/if} 
     
    7692        {if $smarty.section.id.last} 
    7793        </table> 
    78         <br /> 
    79         <table align='center' cellpadding='0' cellspacing='1' class='tbl-border'> 
    80             <tr> 
    81                 <td rowspan='2' class='tbl2'> 
    82                     <a href='{$smarty.const.FUSION_SELF}?sortby=all'>{$locale.404}</a> 
    83                 </td> 
    84                 {foreach from=$search item=letter name=search} 
    85                 {if $smarty.foreach.search.first} 
    86                     {math equation="x/2-1" x=$smarty.foreach.search.total format="%u" assign='break'} 
     94            <br /> 
     95            <table align='center' cellpadding='0' cellspacing='1' class='tbl-border'> 
     96                <tr> 
     97                    {foreach from=$search item=letter name=search} 
     98                    {if $smarty.foreach.search.first} 
     99                        {math equation="x/2-1" x=$smarty.foreach.search.total format="%u" assign='break'} 
     100                    {/if} 
     101                    <td align='center' class='tbl1'> 
     102                        <div class='small'> 
     103                            <a href='{$smarty.const.FUSION_SELF}?field={$field}&amp;sortby={$letter}{if $country !=""}&amp;country={$country}{/if}'>{$letter}</a> 
     104                        </div> 
     105                    </td> 
     106                {if !$smarty.foreach.search.last && $smarty.foreach.search.index==$break} 
     107                </tr> 
     108                <tr> 
    87109                {/if} 
    88                 <td align='center' class='tbl1'> 
    89                     <div class='small'> 
    90                         <a href='{$smarty.const.FUSION_SELF}?sortby={$letter}{if $country !=""}&amp;country={$country}{/if}'>{$letter}</a> 
    91                     </div> 
    92                 </td> 
    93             {if $smarty.foreach.search.index==$break} 
    94                         <td rowspan='2' class='tbl2'> 
    95                     <a href='{$smarty.const.FUSION_SELF}?sortby=all'>{$locale.404}</a> 
    96                 </td> 
    97             </tr> 
    98             <tr> 
    99             {/if} 
    100                 {/foreach} 
    101             </tr> 
    102         </table> 
     110                    {/foreach} 
     111                </tr> 
     112            </table> 
     113            <div style='text-align:center'> 
     114                {buttonlink name=$locale.404|sprintf:$locale.401 link=$smarty.const.FUSION_SELF|cat:"?field=username"|cat:"&amp;order="|cat:$order|cat:"&amp;sortby=all&amp;country="|cat:$country} 
     115                &nbsp; 
     116                {buttonlink name=$locale.404|sprintf:$locale.409 link=$smarty.const.FUSION_SELF|cat:"?field=email"|cat:"&amp;order="|cat:$order|cat:"&amp;sortby=all&amp;country="|cat:$country} 
     117                {if $sortby != "all"} 
     118                    &nbsp; 
     119                    {buttonlink name=$locale.414 link=$smarty.const.FUSION_SELF|cat:"?field="|cat:$field|cat:"&amp;order="|cat:$order|cat:"&amp;sortby=all"} 
     120                {/if} 
     121            </div> 
    103122        {/if} 
    104123    {sectionelse} 
  • trunk/includes/templates/main.setup.tpl

    r1081 r1660  
    1515{*                                                                         *} 
    1616{***************************************************************************} 
    17 <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> 
     17<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    1818<html> 
    1919<head> 
     
    2222{literal}<style type="text/css"> 
    2323<!-- 
    24 a { color:#003D71; text-decoration:none; } 
    25 a:hover { color:#027AC6; text-decoration:underline; } 
    26 .button { 
    27     font-family:Tahoma,Arial,Verdana,Sans-Serif; 
    28     font-size:11px; 
    29     color:#000000;   
    30     background-color:#E5E5E8; 
    31     border:#7F98A7 1px solid; 
    32     margin-top:2px; 
    33 } 
    34 .textbox { 
    35     font-family:Verdana,Tahoma,Arial,Sans-Serif; 
    36     font-size:11px; 
    37     color:#000;  
    38     background-color:#FFFFFF; 
    39     border:1px #7F98A7 solid; 
    40 } 
    41 td { font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:11px; } 
     24a           { color:#003D71; text-decoration:none; } 
     25a:hover     { color:#027AC6; text-decoration:underline; } 
     26.button     { font-family:Tahoma,Arial,Verdana,Sans-Serif; font-size:11px; color:#000000; background-color:#E5E5E8; border:#7F98A7 1px solid; margin-top:2px; } 
     27.textbox    { font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:11px; color:#000; background-color:#FFFFFF; border:1px #7F98A7 solid; } 
     28td          { font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:11px; } 
    4229.tbl-border { background-color:#D1D8DD; } 
    43 .tbl { font-size:11px; color:#000; background-color:#E1E1E1; } 
    44 .tbl1 { font-size:11px; color:#000; background-color:#F1F1F1; padding:4px; } 
    45 .tbl2 { font-size:11px; color:#000; background-color:#E6E6E6; padding:4px; } 
    46 .tbl3 { font-size:11px; color:#000; background-color:#E65656; padding:4px; } 
    47 .tbl4 { font-size:11px; color:#000; background-color:#56E656; padding:4px; } 
     30.tbl        { font-size:11px; color:#000; background-color:#E1E1E1; } 
     31.tbl1       { font-size:11px; color:#000; background-color:#F1F1F1; padding:4px; } 
     32.tbl2       { font-size:11px; color:#000; background-color:#E6E6E6; padding:4px; } 
     33.tbl3       { font-size:11px; color:#000; background-color:#E65656; padding:4px; } 
     34.tbl4       { font-size:11px; color:#000; background-color:#56E656; padding:4px; } 
    4835--> 
    4936</style>{/literal} 
     
    5340    <tr> 
    5441        <td> 
    55         <table align='center' cellpadding='0' cellspacing='1' width='450' class='tbl-border'> 
     42        <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 
    5643            <tr> 
    5744                <td align='center' class='tbl1'> 
     
    6350        </table> 
    6451        <br> 
    65         <table align='center' cellpadding='0' cellspacing='0' width='450'> 
     52        <table align='center' cellpadding='0' cellspacing='0' width='600'> 
    6653            <tr> 
    6754                <td align='center'> 
     
    7259        <br> 
    7360        {if $message|default:"" != ""} 
    74         <table align='center' cellpadding='0' cellspacing='1' width='450' class='tbl-border'> 
     61        <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 
    7562            <tr> 
    7663                <td align='center' class='tbl4'> 
     
    8269        {/if} 
    8370        {if $error|default:"" != ""} 
    84         <table align='center' cellpadding='0' cellspacing='1' width='450' class='tbl-border'> 
     71        <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 
    8572            <tr> 
    8673                <td align='center' class='tbl3'> 
     
    9279        {/if} 
    9380        {if $step == "0" || $fail} 
    94             <table align='center' cellpadding='0' cellspacing='1' width='450' class='tbl-border'> 
     81            <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 
    9582                <tr> 
    9683                    <td align='center' class='tbl2' colspan='4'> 
     
    120107            <br /> 
    121108            {if $write_check} 
    122                 <table align='center' cellpadding='0' cellspacing='1' width='450' class='tbl-border'> 
     109                <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 
    123110                    <tr> 
    124111                        <td align='center' class='tbl4'> 
     
    133120                <br> 
    134121                <form name='setup' method='post' action='{$smarty.const.FUSION_SELF}?step=1&localeset={$localeset}'> 
    135                     <table align='center' width='450' cellpadding='0' cellspacing='1' class='tbl-border'> 
     122                    <table align='center' width='600' cellpadding='0' cellspacing='1' class='tbl-border'> 
    136123                        <tr> 
    137124                            <td align='center' colspan='2' class='tbl2'> 
     
    144131                            </td> 
    145132                            <td class='tbl1'> 
    146                                 <input type='text' value='localhost' name='db_host' class='textbox' /> 
     133                                <input type='text' value='{$db_host|default:"localhost"}' name='db_host' class='textbox' /> 
    147134                            </td> 
    148135                        </tr> 
     
    152139                            </td> 
    153140                            <td class='tbl1'> 
    154                                 <input type='text' value='' name='db_user' class='textbox' /> 
     141                                <input type='text' value='' name='{$db_user}' class='textbox' /> 
    155142                            </td> 
    156143                        </tr> 
     
    160147                            </td> 
    161148                            <td class='tbl1'> 
    162                                 <input type='password' value='' name='db_pass' class='textbox'> 
     149                                <input type='password' value='' name='{$db_pass}' class='textbox'> 
    163150                            </td> 
    164151                        </tr> 
     
    168155                            </td> 
    169156                            <td class='tbl1'> 
    170                                 <input type='text' value='' name='db_name' class='textbox' /> 
     157                                <input type='text' value='' name='{$db_name}' class='textbox' /> 
    171158                            </td> 
    172159                        </tr> 
     
    176163                            </td> 
    177164                            <td class='tbl1'> 
    178                                 <input type='text' value='exitecms_' name='db_prefix' class='textbox' /> 
     165                                <input type='text' value='{$db_prefix|default:"exitecms_"}' name='db_prefix' class='textbox' /> 
    179166                            </td> 
    180167                        </tr> 
     
    189176        {/if} 
    190177        {if $step == "1" && !$fail} 
    191             <table align='center' cellpadding='0' cellspacing='1' width='450' class='tbl-border'> 
     178            <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 
    192179                <tr> 
    193180                    <td align='center' colspan='2' class='tbl4'> 
     
    199186            <br /> 
    200187            <form name='setup' method='post' action='{$smarty.const.FUSION_SELF}?step=2&localeset={$localeset}'> 
    201                 <table align='center' cellpadding='0' cellspacing='1' width='450' class='tbl-border'> 
     188                <table align='center' cellpadding='0' cellspacing='1' width='600' class='tbl-border'> 
    202189                    <tr> 
    203190                        <td align='center' colspan='2' class='tbl2'> 
  • trunk/members.php

    r1195 r1660  
    2828if (!isset($country) || strlen($country) != 2) $country = ""; 
    2929if (!isset($sortby) || strlen($sortby) != 1) $sortby = "all"; 
     30if (!isset($order)) $order = "username"; 
     31if (!isset($field)) $field = "username"; 
    3032 
    3133// get the name of the country requested 
     
    3537$rows = 0; 
    3638if (iMEMBER) { 
    37     // create the where clause 
    38     $filter = "user_status = 0";    // only show activated accounts 
    39     if ($sortby == "all") { 
    40         if ($country != "") { 
    41             $filter .= " AND user_cc_code = '".$country."'"; 
    42         } 
    43     } else { 
    44         if ($country == "") { 
    45             $filter .= " AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
    46         } else { 
    47             $filter .= " AND (user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'))"; 
    48         } 
     39    // create the letter filter SQL clause and the selection sort SQL clause 
     40    switch($order) { 
     41        case "country": 
     42            $sortfield = "user_cc_code ASC, user_level DESC, user_name ASC"; 
     43            break; 
     44        case "email": 
     45            $sortfield = "user_email ASC, user_level DESC"; 
     46            break; 
     47        case "lastvisit": 
     48            $sortfield = "user_lastvisit DESC, user_name ASC"; 
     49            break; 
     50        case "username": 
     51        default: 
     52            $sortfield = "user_level DESC, user_name ASC"; 
     53            break; 
    4954    } 
     55    // create the query filter SQL clause 
     56    $where = ""; 
     57    switch($field) { 
     58        case "country": 
     59            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_cc_code,1,1)))"; 
     60            break; 
     61        case "email": 
     62            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_email,1,1)))"; 
     63            if ($sortby != "all") { 
     64                $where = "(user_email LIKE '".stripinput($sortby)."%' OR user_email LIKE '".strtolower(stripinput($sortby))."%')"; 
     65            } 
     66            break; 
     67        case "lastvisit": 
     68            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_name,1,1)))"; 
     69            if ($sortby != "all") { 
     70                $where = "(user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
     71            } 
     72            break; 
     73        case "username": 
     74        default: 
     75            $letterfilter = "DISTINCT(UPPER(SUBSTRING(user_name,1,1)))"; 
     76            if ($sortby != "all") { 
     77                $where = "(user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
     78            } 
     79            break; 
     80    } 
     81    // add the country filter if requested 
     82    $where .= $country == "" ? "" : (($where == "" ? "" : " AND ").("user_cc_code = '$country'")); 
     83 
    5084    // get the list of members 
    5185    $variables['members'] = array(); 
    5286    if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; 
    53     $result = dbquery("SELECT * FROM ".$db_prefix."users ".($filter==""?"":("WHERE ".$filter))." ORDER BY user_level DESC, user_name LIMIT ".$rowstart.", ".$settings['numofthreads']); 
     87    $result = dbquery("SELECT * FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY ".$sortfield." LIMIT ".$rowstart.", ".$settings['numofthreads']); 
    5488    $rows = dbrows($result); 
     89    if ($rows == 0 && !empty($where)) { 
     90        // no results? Try again without a filter 
     91        $result = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY ".$sortfield." LIMIT ".$rowstart.", ".$settings['numofthreads']); 
     92        $rows = dbrows($result); 
     93        $sortby="all"; 
     94        $where = ""; 
     95    }  
    5596    $variables['members'] = array(); 
    5697    if ($rows != 0) { 
     
    83124    // starting characters to filter on. Make sure there are an even number! 
    84125    $variables['search'] = array(); 
    85     $result = dbquery("SELECT DISTINCT(UPPER(SUBSTRING(user_name,1,1))) AS letter FROM ".$db_prefix."users ORDER BY letter"); 
     126    $result = dbquery("SELECT ".$letterfilter." AS letter FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY letter"); 
    86127    while ($data = dbarray($result)) { 
    87128        // get rid of unwanted characters. Need to find a beter solution for this 
     
    89130    } 
    90131    if (count($variables['search'])%2) $variables['search'][] = ""; 
     132    $variables['field'] = $field; 
     133    $variables['order'] = $order; 
    91134    $variables['sortby'] = $sortby; 
    92     $variables['rows'] = dbcount("(*)", "users", $filter); 
     135    $variables['rows'] = dbcount("(*)", "users", $where); 
    93136    $variables['rowstart'] = $rowstart; 
    94137    $variables['items_per_page'] = $settings['numofthreads']; 
    95     $variables['pagenav_url'] = FUSION_SELF."?sortby=$sortby&amp;".($country==""?"":"country=$country&amp;"); 
     138    $variables['pagenav_url'] = FUSION_SELF."?sortby=$sortby&amp;field=$field&amp;".($country==""?"":"country=$country&amp;"); 
    96139} 
    97140 
  • trunk/setup.php

    r1502 r1660  
    1818+----------------------------------------------------*/ 
    1919function dbconnect($db_host, $db_user, $db_pass, $db_name) { 
     20    global $locale; 
     21 
    2022    $db_connect = @mysql_connect($db_host, $db_user, $db_pass); 
    2123    $db_select = @mysql_select_db($db_name); 
    2224    if (!$db_connect) { 
    23         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to establish connection to MySQL</b><br />".mysql_errno()." : ".mysql_error()."</div>"); 
     25        terminate($locale['401'], mysql_errno()." : ".mysql_error()); 
    2426    } elseif (!$db_select) { 
    25         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to select MySQL database</b><br />".mysql_errno()." : ".mysql_error()."</div>"); 
     27        terminate($locale['402'], mysql_errno()." : ".mysql_error()); 
    2628    } 
    2729} 
    2830 
    2931function dbquery($query) { 
     32 
    3033    $result = @mysql_query($query); 
    3134    if (!$result) { 
    32         echo mysql_error(); 
    3335        return false; 
    3436    } else { 
     
    3840 
    3941function dbarray($resource) { 
     42 
    4043    $result = @mysql_fetch_assoc($resource); 
    4144    if (!$result) { 
     
    7275+----------------------------------------------------*/ 
    7376function stripinput($text) { 
     77 
    7478    if (ini_get('magic_quotes_gpc')) $text = stripslashes($text); 
    7579    $search = array("\"", "'", "\\", '\"', "\'", "<", ">", "&nbsp;"); 
     
    8387+----------------------------------------------------*/ 
    8488function makefilelist($folder, $filter, $sort=true, $type="files") { 
     89 
    8590    $res = array(); 
    8691    $filter = explode("|", $filter);  
     
    104109+----------------------------------------------------*/ 
    105110function locale_load($locale_name) { 
    106  
    107111    global $settings, $locale, $db_prefix; 
    108112 
    109113    $locales_file = PATH_ROOT."files/locales/".(defined('LP_LOCALE')?LP_LOCALE:"en").".".$locale_name.".php"; 
    110114    if (file_exists($locales_file)) { 
    111         require $locales_file; 
     115        require_once $locales_file; 
    112116    } 
    113117    return; 
     118} 
     119 
     120/*---------------------------------------------------+ 
     121| load a locale file 
     122+----------------------------------------------------*/ 
     123function terminate($error, $tip="", $wiki=0) { 
     124    global $locale; 
     125 
     126    $msg = "<div style='font-family:Verdana;font-size:14px;text-align:center;'><b>".(empty($locale['403'])?"Unable to run the ExiteCMS setup":$locale['403']).":<br /><br /><font style='color:red;'>"; 
     127    $msg .= $error."</font></b><br /><br />"; 
     128    $msg .= $error."</font></b><br /><br />"; 
     129    if ($wiki) { 
     130        if (empty($locale['404')) { 
     131            $msg .= "Please consult our <a href='http://exitecms.exite.eu/modules/wiki/index.php?wakka=Setup'>Wiki</a> "; 
     132        } else { 
     133            $msg = sprintf($locale['404'], "http://exitecms.exite.eu/modules/wiki/index.php?wakka=Setup"); 
     134        } 
     135    } 
     136    $msg .= $tip."</div>"; 
     137    die($msg); 
    114138} 
    115139 
     
    124148define("PATH_THEMES", PATH_ROOT."themes/"); 
    125149define("PATH_THEME", PATH_ROOT."themes/ExiteCMS/"); 
    126 define("PATH_PHOTOS", PATH_ROOT."images/photoalbum/"); 
    127150define("PATH_IMAGES", PATH_ROOT."images/"); 
    128151define("PATH_IMAGES_A", PATH_IMAGES."articles/"); 
     
    141164define('CMS_SETUP', true); 
    142165 
    143 // error tracking 
     166// temp storage for template variables 
     167$variables = array(); 
     168 
     169// used for error tracking 
    144170$error = ""; 
    145171 
    146 // verify the locale 
     172// verify the selected locale 
    147173$localeset = isset($_GET['localeset']) ? $_GET['localeset'] : ""; 
    148174if (!file_exists(PATH_ADMIN."tools/language_pack_".$localeset.".php")) { 
     
    151177    if (!file_exists(PATH_ADMIN."tools/language_pack_".$localeset.".php")) { 
    152178        // not found either? bail out! 
    153         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: No suitable language pack found.</b><br />Please consult the documentation on how to install a language pack.</div>"); 
    154     } 
    155 } 
     179        terminate("No suitable language pack found.", "Please consult the documentation on how to install a language pack."); 
     180    } 
     181} 
     182 
    156183// load the language pack file, to get some initial info about the language 
    157184require PATH_ADMIN."tools/language_pack_".$localeset.".php"; 
    158185 
     186// load the locale for this module 
     187locale_load("main.setup"); 
     188 
    159189// define some of the website settings for the template engine 
    160190$settings = array("locale" => LP_LOCALE, "theme" => "ExiteCMS"); 
    161  
    162 // temp storage for template variables 
    163 $variables = array(); 
    164  
    165191$variables['localeset'] = LP_LANGUAGE; 
    166 $variables['charset'] = "iso-8859-1"; 
     192$variables['charset'] = LP_CHARSET; 
    167193 
    168194// parameter validation 
     
    172198// check if the cache directories are writeable 
    173199if (!is_writable(PATH_FILES."cache")) { 
    174     die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: The cache directory is not writeable.</b><br />Please consult our <a href='http://exitecms.exite.eu'>Wiki</a> on how to define the proper file rights.</div>"); 
     200    terminate($locale['405'], $locale['406'], true); 
    175201} 
    176202if (!is_writable(PATH_FILES."tplcache")) { 
    177     die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: The template cache directory is not writeable.</b><br />Please consult our <a href='http://exitecms.exite.eu'>Wiki</a> on how to define the proper file rights.</div>"); 
    178 } 
    179 // get the location of the config file, check if the config file is writable 
     203    terminate($locale['407'], $locale['406'], true); 
     204} 
     205if (!is_writable(PATH_FILES."locales")) { 
     206    terminate($locale['416'], $locale['406'], true); 
     207} 
     208 
     209// get the FQFN of the config file 
    180210@include_once PATH_ROOT."configpath.php"; 
    181211if (substr(CONFIG_PATH,0,1) == "/") { 
    182     if(!is_writable(CONFIG_PATH."/config.php")) { 
    183         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: The config file can not be written.</b><br />Please consult our <a href='http://exitecms.exite.eu'>Wiki</a> on how to define the proper file rights.</div>"); 
    184     } 
     212    define('CONFIG_FILE', str_replace("//", "/", CONFIG_PATH."/config.php")); 
    185213} else { 
    186     if(!is_writable(PATH_ROOT.CONFIG_PATH."/config.php")) { 
    187         die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to run the ExiteCMS setup: The config file can not be written.</b><br />Please consult our <a href='http://exitecms.exite.eu'>Wiki</a> on how to define the proper file rights.</div>"); 
    188     } 
    189 } 
    190  
    191 // first part in step1: create config.php. We need it later 
     214    define('CONFIG_FILE', str_replace("//", "/", PATH_ROOT.CONFIG_PATH."/config.php")); 
     215} 
     216 
     217// first part in step0: check the config file 
     218if ($step == "0") { 
     219    // file MUST NOT exist... 
     220    if (file_exists(CONFIG_FILE)) { 
     221        terminate($locale['408'], $locale['409'], true); 
     222    } 
     223    // ... and the directory MUST be writeable! 
     224    if(!is_writable(dirname(CONFIG_FILE))) { 
     225        terminate($locale['415'], $locale['406'], true); 
     226    } 
     227} 
     228 
     229// first part in step1: validate the input, and create the config file 
    192230if ($step == "1") { 
     231    // verify the user input: hostname 
    193232    $db_host = stripinput($_POST['db_host']); 
     233    $variables['db_host'] = $db_host; 
     234    if ($empty($db_host) || !preg_match("/^[-0-9\.A-Z_@]+$/i", $db_host)) { 
     235        $error .= $locale['417']."<br />\n"; 
     236    } 
     237    // verify the user input: username 
    194238    $db_user = stripinput($_POST['db_user']); 
     239    $variables['db_user'] = $db_user; 
     240    if ($empty($db_user) || !preg_match("/^[-0-9A-Z_@]+$/i", $db_user)) { 
     241            $error .= $locale['418']."<br />\n"; 
     242        } 
     243    } 
     244    // verify the user input: password 
    195245    $db_pass = stripinput($_POST['db_pass']); 
     246    $variables['db_pass'] = $db_pass; 
     247    if ($empty($db_pass) || !preg_match("/^[-0-9A-Z_@]+$/i", $db_pass)) { 
     248            $error .= $locale['419']."<br />\n"; 
     249        } 
     250    } 
     251    // verify the user input: database name 
    196252    $db_name = stripinput($_POST['db_name']); 
     253    $variables['db_name'] = $db_name; 
     254    if ($empty($db_name) || !preg_match("/^[-0-9A-Z_@]$/i", $db_name)) { 
     255            $error .= $locale['427']."<br />\n"; 
     256        } 
     257    } 
     258    // verify the user input: table prefix 
    197259    $db_prefix = stripinput($_POST['db_prefix']); 
    198     $config = "<?php 
     260    $variables['db_prefix'] = $db_prefix; 
     261    if (!preg_match("/^[-0-9A-Z_@]*$/i", $db_prefix)) { 
     262            $error .= $locale['428']."<br />\n"; 
     263        } 
     264    } 
     265    // verify a connection to the database server can be made 
     266    if (empty($error)) { 
     267        $db_connect = @mysql_connect($db_host, $db_user, $db_pass); 
     268        if (!$db_connect) { 
     269            $error .= $locale['429']."<br />\n"; 
     270        } 
     271    } 
     272    // verify if the database exists on the server 
     273    if (empty($error)) { 
     274        $db_select = @mysql_select_db($db_name); 
     275        if (!$db_select) { 
     276            $error .= sprintf($locale['434'],$db_name)."<br />\n"; 
     277        } 
     278    } 
     279    // verify if the given user has create table on the database 
     280    if (empty($error)) { 
     281        $result = dbquery("CREATE TABLE ".$db_prefix."_test (test TINYINT(1) NOT NULL) ENGINE = MYISAM"); 
     282        if (!$result) { 
     283            $error .= sprintf($locale['435'],$db_name)."<br />\n"; 
     284        } else { 
     285            $result = dbquery("DROP TABLE ".$db_prefix."_test"); 
     286        } 
     287    } 
     288    // if no errors were detected, create the config file 
     289    if ($error == "") { 
     290        $config = "<?php 
    199291// global database settings 
    200292"."$"."db_host="."\"".$_POST['db_host']."\""."; 
     
    211303"."$"."user_db_prefix="."\"".$_POST['db_prefix']."\""."; 
    212304?>"; 
    213     if (substr(CONFIG_PATH,0,1) == "/") { 
    214         $cfg_path = CONFIG_PATH; 
    215     } else { 
    216         $cfg_path = PATH_ROOT.CONFIG_PATH; 
    217     } 
    218     $temp = fopen($cfg_path."config.php","w"); 
    219     if (!fwrite($temp, $config)) { 
    220         $error .= $locale['430']."<br /><br />"; 
    221         fclose($temp); 
    222     } else { 
    223         fclose($temp); 
     305        $temp = fopen(CONFIG_FILE,"w"); 
     306        if (!fwrite($temp, $config)) { 
     307            $error .= $locale['430']."<br /><br />"; 
     308            fclose($temp); 
     309        } else { 
     310            fclose($temp); 
     311        } 
    224312    } 
    225313} 
    226314 
    227315require_once PATH_ROOT."includes/theme_functions.php"; 
    228  
    229 // load the locale for this module 
    230 locale_load("main.setup"); 
    231316 
    232317// process the different setup steps 
     
    251336        } else {  
    252337            $variables['write_check'] = false; 
    253             $error = "<b>".$locale['412']."</b><br /><br />".$permissions."<br /><b>".$locale['413']."</b>"; 
     338            $error = "<b>".$locale['412']."</b><br /><br /><span style='text-align:left'>".$permissions."</span><br /><b>".$locale['413']."</b>"; 
    254339        } 
    255340        break; 
    256341    case "1": 
    257342        if ($error == "") { 
    258             require_once "config.php"; 
     343            require_once CONFIG_FILE; 
    259344            $link = dbconnect($db_host, $db_user, $db_pass, $db_name); 
    260345            require_once PATH_INCLUDES."dbsetup_include.php"; 
     
    272357        break; 
    273358    case "2": 
    274         require_once "config.php"; 
     359        require_once CONFIG_FILE; 
    275360        $link = dbconnect($db_host, $db_user, $db_pass, $db_name); 
    276361        $basedir = substr($_SERVER['PHP_SELF'], 0, -9); 
     
    288373            $error .= $locale['453']."<br /><br />\n"; 
    289374        } 
     375        // double-hash the password to prevent hash table lookups 
    290376        $password = md5(md5($password1)); 
    291377 
     
    294380        if ($error == "") { 
    295381 
    296             // add records to the admin table 
    297             $commands = array(); 
    298             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('A',  'articles.gif', '".addslashes($locale['462'])."', 'articles.php', 1)"); 
    299             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('AC', 'article_cats.gif', '".addslashes($locale['461'])."', 'article_cats.php', 1)"); 
    300             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('AD', 'admins.gif', '".addslashes($locale['460'])."', 'administrators.php', 2)"); 
    301             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('B',  'blacklist.gif', '".addslashes($locale['463'])."', 'blacklist.php', 2)"); 
    302             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('BG',  'blogs.gif', '".addslashes($locale['473'])."', 'blogs.php', 1)"); 
    303             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('C',  '', '".addslashes($locale['464'])."', 'reserved', 2)"); 
    304             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('CP', 'c-pages.gif', '".addslashes($locale['465'])."', 'custom_pages.php', 1)"); 
    305             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('D',  'dl.gif', '".addslashes($locale['468'])."', 'downloads.php', 1)"); 
    306             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('DB', 'db_backup.gif', '".addslashes($locale['466'])."', 'db_backup.php', 3)"); 
    307             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('DC', 'dl_cats.gif', '".addslashes($locale['467'])."', 'download_cats.php', 1)"); 
    308             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('F',  'forums.gif', '".addslashes($locale['470'])."', 'forums.php', 1)"); 
    309             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('FQ', 'faq.gif', '".addslashes($locale['469'])."', 'faq.php', 1)"); 
    310             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('I',  'modules.gif', '".addslashes($locale['472'])."', 'modules.php', 3)"); 
    311             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('IM', 'images.gif', '".addslashes($locale['471'])."', 'images.php', 1)"); 
    312             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('IP', '', '".addslashes($locale['473'])."', 'reserved', 3)"); 
    313             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('M',  'members.gif', '".addslashes($locale['474'])."', 'members.php', 2)"); 
    314             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('N',  'news.gif', '".addslashes($locale['475'])."', 'news.php', 1)"); 
    315             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('NC', 'news_cats.gif', '".addslashes($locale['494'])."', 'news_cats.php', 1)"); 
    316             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('P',  'panels.gif', '".addslashes($locale['476'])."', 'panels.php', 3)"); 
    317             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('PI', 'phpinfo.gif', '".addslashes($locale['478'])."', 'phpinfo.php', 3)"); 
    318             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('PO', 'polls.gif', '".addslashes($locale['479'])."', 'forum_polls.php', 1)"); 
    319             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S1', 'settings.gif', '".addslashes($locale['487'])."', 'settings_main.php', 3)"); 
    320             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S2', 'settings_time.gif', '".addslashes($locale['488'])."', 'settings_time.php', 3)"); 
    321             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S3', 'settings_forum.gif', '".addslashes($locale['489'])."', 'settings_forum.php', 3)"); 
    322             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S4', 'registration.gif', '".addslashes($locale['490'])."', 'settings_registration.php', 3)"); 
    323             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S6', 'settings_misc.gif', '".addslashes($locale['492'])."', 'settings_misc.php', 3)"); 
    324             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S7', 'settings_pm.gif', '".addslashes($locale['493'])."', 'settings_messages.php', 3)"); 
    325             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S8', 'settings_lang.gif', '".addslashes($locale['459'])."', 'settings_languages.php', 3)"); 
    326             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('SL', 'site_links.gif', '".addslashes($locale['481'])."', 'site_links.php', 3)"); 
    327             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('T',  'tools.gif', '".addslashes($locale['495'])."', 'tools.php', 3)"); 
    328             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('U',  'upgrade.gif', '".addslashes($locale['483'])."', 'upgrade.php', 3)"); 
    329             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('UG', 'user_groups.gif', '".addslashes($locale['484'])."', 'user_groups.php', 2)"); 
    330             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('UR', 'submissions.gif', '".addslashes($locale['496'])."', 'redirects.php', 1)"); 
    331             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('R',  'reports.gif', '".addslashes($locale['477'])."', 'reports.php', 3)"); 
    332             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S',  'searches.gif', '".addslashes($locale['480'])."', 'searches.php', 3)"); 
    333             $result = dbcommands($commands, $db_prefix); 
    334  
    335             // create the admin rights field for the webmaster, based on all admin modules just inserted 
     382            // create the admin rights field for the webmaster, based on all admin modules available 
    336383            $result = dbquery("SELECT admin_rights FROM ".$db_prefix."admin"); 
    337384            $adminrights = ""; 
     
    398445            $result = dbcommands($commands, $db_prefix); 
    399446 
     447            // add the ExiteCMS core search options 
     448            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'articles', 'src510', 1, '1.0.0', 1, 0)"); 
     449            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'news', 'src511', 1, '1.0.0', 1, 0)"); 
     450            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'forumposts', 'src512', 1, '1.0.0', 1, 0)"); 
     451            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'forumattachments', 'src513', 1, '1.0.0', 1, 0)"); 
     452            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'downloads', 'src514', 1, '1.0.0', 1, 0)"); 
     453            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##search (search_mod_id, search_mod_core, search_name, search_title, search_fulltext, search_version, search_active, search_visibility) VALUES(0, 1, 'members', 'src515', 0, '1.0.0', 1, 0)"); 
     454 
     455            // add the ExiteCMS core report options 
     456 
    400457            // add the default forum poll settings 
    401458            $commands = array(); 
Note: See TracChangeset for help on using the changeset viewer.