Changeset 1660 in ExiteCMS
- Timestamp:
- 08/21/08 16:07:21 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
-
administration/members.php (modified) (3 diffs)
-
administration/tools/language_pack_English.php (modified) (8 diffs)
-
administration/tools/language_pack_Nederlands.php (modified) (7 diffs)
-
files/locales/en.main.global.php (modified) (1 diff)
-
files/locales/en.main.setup.php (modified) (3 diffs)
-
files/locales/nl.main.global.php (added)
-
files/locales/nl.main.setup.php (added)
-
includes/core_functions.php (modified) (1 diff)
-
includes/dbsetup_include.php (modified) (18 diffs)
-
includes/dns_functions.php (modified) (1 diff)
-
includes/templates/admin.members.tpl (modified) (3 diffs)
-
includes/templates/main.members.tpl (modified) (3 diffs)
-
includes/templates/main.setup.tpl (modified) (16 diffs)
-
members.php (modified) (4 diffs)
-
setup.php (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/members.php
r1195 r1660 30 30 // parameter validation 31 31 if (isset($user_id) && !isNum($user_id)) fallback("index.php"); 32 if (!isset($step)) $step = ""; 33 if (!isset($user_id)) $user_id= 0; 32 34 if (!isset($country) || strlen($country) != 2) $country = ""; 33 35 if (!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");36 if (!isset($order)) $order = "username"; 37 if (!isset($field)) $field = "username"; 38 39 if (isset($_POST['cancel_delete'])) fallback(FUSION_SELF.$aidlink."&order=$order&sortby=$sortby&field=$field&rowstart=$rowstart"); 38 40 39 41 if ($step == "add") { … … 144 146 $rows = 0; 145 147 if (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 160 185 // get the list of members 161 186 $variables['members'] = array(); 162 187 if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; 163 $result = dbquery("SELECT * FROM ".$db_prefix."users".($ orderby==""?"":" WHERE").$orderby." ORDER BY user_level DESC, user_nameLIMIT ".$rowstart.", ".$settings['numofthreads']);188 $result = dbquery("SELECT * FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY ".$sortfield." LIMIT ".$rowstart.", ".$settings['numofthreads']); 164 189 $rows = dbrows($result); 165 190 $variables['members'] = array(); … … 197 222 // starting characters to filter on. Make sure there are an even number! 198 223 $variables['search'] = array(); 199 $result = dbquery("SELECT DISTINCT(UPPER(SUBSTRING(user_name,1,1))) AS letter FROM ".$db_prefix."usersORDER BY letter");224 $result = dbquery("SELECT ".$letterfilter." AS letter FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY letter"); 200 225 while ($data = dbarray($result)) { 201 226 // get rid of unwanted characters. Need to find a beter solution for this 202 227 $variables['search'][] = str_replace(array('&', '?'), array('',''), $data['letter']); 203 228 } 204 if (count($variables['search']) %2) $variables['search'][] = "";229 if (count($variables['search']) > 1 && count($variables['search'])%2) $variables['search'][] = ""; 205 230 $variables['sortby'] = $sortby; 206 $variables['rows'] = dbcount("(*)", "users", $ orderby);231 $variables['rows'] = dbcount("(*)", "users", $where); 207 232 $variables['rowstart'] = $rowstart; 208 233 $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&"); 210 235 } 211 236 212 237 $variables['step'] = $step; 213 238 $variables['user_id'] = $user_id; 239 $variables['field'] = $field; 240 $variables['order'] = $order; 214 241 $template_panels[] = array('type' => 'body', 'name' => 'admin.members', 'template' => 'admin.members.tpl', 'locale' => array("admin.members", "main.user_fields")); 215 242 $template_variables['admin.members'] = $variables; -
trunk/administration/tools/language_pack_English.php
r1654 r1660 525 525 $localestrings['402'] = "User Type"; 526 526 $localestrings['403'] = "Add a new user"; 527 $localestrings['404'] = " Show All";527 $localestrings['404'] = "Filter on %s"; 528 528 $localestrings['405'] = "Options"; 529 529 $localestrings['406'] = "Country"; … … 535 535 $localestrings['412'] = "%u members"; 536 536 $localestrings['413'] = "Undelete this user"; 537 $localestrings['414'] = "Reset filter"; 537 538 $localestrings['415'] = "Edit this user's profile"; 538 539 $localestrings['416'] = "Activate this account"; … … 2818 2819 $localestrings['402'] = "User Type"; 2819 2820 $localestrings['403'] = "There are no user names found"; 2820 $localestrings['404'] = " Show All";2821 $localestrings['404'] = "Filter on %s"; 2821 2822 $localestrings['405'] = "Last visit"; 2822 2823 $localestrings['406'] = "Country"; … … 2827 2828 $localestrings['411'] = "%u member"; 2828 2829 $localestrings['412'] = "%u members"; 2830 $localestrings['414'] = "Reset filter"; 2829 2831 $localestrings['420'] = "Member Profile"; 2830 2832 $localestrings['422'] = "Statistics"; … … 3188 3190 $localestrings = array(); 3189 3191 $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."; 3192 3201 $localestrings['410'] = "Welcome to ExiteCMS Setup"; 3193 3202 $localestrings['411'] = "Write permissions check passed"; … … 3195 3204 $localestrings['413'] = "Please ensure that your webserver has write<br />access (chmod) on these folders."; 3196 3205 $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"; 3197 3211 $localestrings['420'] = "MySQL Database access settings"; 3198 3212 $localestrings['421'] = "Database Hostname:"; … … 3202 3216 $localestrings['425'] = "Table Prefix:"; 3203 3217 $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"; 3204 3221 $localestrings['430'] = "Unable to write to config<br>\nPlease check write permissions and restart setup."; 3205 3222 $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>"; 3206 3223 $localestrings['432'] = "The config has been written successfully.<br><br>\n"; 3207 3224 $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'."; 3208 3227 $localestrings['440'] = "Super Admin login details"; 3209 3228 $localestrings['441'] = "Username:"; … … 3403 3422 if (!defined('LP_CHARSET')) define('LP_CHARSET', "iso-8859-1"); 3404 3423 if (!defined('LP_VERSION')) define('LP_VERSION', "7.10"); 3405 if (!defined('LP_DATE')) define('LP_DATE', "121 8989654");3406 $lp_date = "121 8989654";3424 if (!defined('LP_DATE')) define('LP_DATE', "1219327583"); 3425 $lp_date = "1219327583"; 3407 3426 3408 3427 /*---------------------------------------------------+ -
trunk/administration/tools/language_pack_Nederlands.php
r1654 r1660 525 525 $localestrings['402'] = "Gebruikerstype"; 526 526 $localestrings['403'] = "Nieuwe gebruiker toevoegen"; 527 $localestrings['404'] = " Toon alles";527 $localestrings['404'] = "filter op %s"; 528 528 $localestrings['405'] = "Opties"; 529 529 $localestrings['406'] = "Land"; … … 535 535 $localestrings['412'] = "%u gebruikers"; 536 536 $localestrings['413'] = "Heractiveer deze gebruiker"; 537 $localestrings['414'] = "Filter wissen"; 537 538 $localestrings['415'] = "Wijzig het profiel van deze gebruiker"; 538 539 $localestrings['416'] = "Activeer deze gebruiker"; … … 2818 2819 $localestrings['402'] = "Type gebruiker"; 2819 2820 $localestrings['403'] = "Er zijn geen gebruikersnamen gevonden"; 2820 $localestrings['404'] = " Alles";2821 $localestrings['404'] = "Filter op %s"; 2821 2822 $localestrings['405'] = "Laatste bezoek"; 2822 2823 $localestrings['406'] = "Land"; … … 2827 2828 $localestrings['411'] = "%u lid"; 2828 2829 $localestrings['412'] = "%u leden"; 2830 $localestrings['414'] = "Filter wissen"; 2829 2831 $localestrings['420'] = "Lid profiel"; 2830 2832 $localestrings['422'] = "Statistieken"; … … 3188 3190 $localestrings = array(); 3189 3191 $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"; 3193 3202 $localestrings['411'] = "Controle op schrijfrechten succesvol"; 3194 3203 $localestrings['412'] = "De webserver heeft geen schrijfrechten op:"; 3195 3204 $localestrings['413'] = "Zorg er voor dat de webserver schrijfrechten heeft<br />op deze folders."; 3196 3205 $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."; 3197 3211 $localestrings['420'] = "MySQL Database parameters"; 3198 3212 $localestrings['421'] = "Database systeemnaam:"; … … 3202 3216 $localestrings['425'] = "Tabel voorvoegsel:"; 3203 3217 $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."; 3204 3221 $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>"; 3206 3223 $localestrings['432'] = "De configuratie is succesvol weggeschreven.<br><br>\n"; 3207 3224 $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."; 3208 3227 $localestrings['440'] = "Webmaster aanmeld gegevens"; 3209 3228 $localestrings['441'] = "Gebruikersnaam:"; … … 3403 3422 if (!defined('LP_CHARSET')) define('LP_CHARSET', "iso-8859-1"); 3404 3423 if (!defined('LP_VERSION')) define('LP_VERSION', "7.10"); 3405 if (!defined('LP_DATE')) define('LP_DATE', "121 8989657");3406 $lp_date = "121 8989657";3424 if (!defined('LP_DATE')) define('LP_DATE', "1219327586"); 3425 $lp_date = "1219327586"; 3407 3426 3408 3427 /*---------------------------------------------------+ -
trunk/files/locales/en.main.global.php
r1654 r1660 3 3 // locale : English 4 4 // locale name : main.global 5 // generated on : Mon Aug 18 2008, 22:18:00CEST5 // generated on : Thu Aug 21 2008, 16:06:37 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- -
trunk/files/locales/en.main.setup.php
r1599 r1660 3 3 // locale : English 4 4 // locale name : main.setup 5 // generated on : Sun Aug 3 2008, 23:27:40CEST5 // generated on : Thu Aug 21 2008, 16:06:23 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- 8 8 $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."; 11 18 $locale['410'] = "Welcome to ExiteCMS Setup"; 12 19 $locale['411'] = "Write permissions check passed"; … … 14 21 $locale['413'] = "Please ensure that your webserver has write<br />access (chmod) on these folders."; 15 22 $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"; 16 28 $locale['420'] = "MySQL Database access settings"; 17 29 $locale['421'] = "Database Hostname:"; … … 21 33 $locale['425'] = "Table Prefix:"; 22 34 $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"; 23 38 $locale['430'] = "Unable to write to config<br>\nPlease check write permissions and restart setup."; 24 39 $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>"; 25 40 $locale['432'] = "The config has been written successfully.<br><br>\n"; 26 41 $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'."; 27 44 $locale['440'] = "Super Admin login details"; 28 45 $locale['441'] = "Username:"; -
trunk/includes/core_functions.php
r1648 r1660 100 100 define("INIT_CMS_OK", TRUE); 101 101 102 // loadthe config file102 // get the full filename of the config file 103 103 @include_once PATH_ROOT."configpath.php"; 104 104 if (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")); 108 106 } 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 } 109 if(is_file(CONFIG_FILE)) { 110 @include_once CONFIG_FILE; 112 111 } 113 112 114 113 // 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'); 114 if (!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 } 116 117 117 118 // load the database functions, and establish a database connection -
trunk/includes/dbsetup_include.php
r1502 r1660 2 2 //---------------------------------------------------------- 3 3 // ExiteCMS file : dbsetup_include.php 4 // Date generated : ` 02/07/2008 08:40`4 // Date generated : `21/08/2008 15:52` 5 5 //---------------------------------------------------------- 6 6 7 7 define('CMS_VERSION', '7.10'); 8 define('CMS_REVISION', '1 500');8 define('CMS_REVISION', '1650'); 9 9 10 10 if ($step == 1) { … … 59 59 $fail = "1"; 60 60 $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')"); 61 99 } 62 100 … … 195 233 } else { 196 234 $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')"); 198 236 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('attachmax', '10485760')"); 199 237 $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')"); 201 244 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('bad_words', '')"); 202 245 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('bad_words_enabled', '0')"); … … 204 247 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('blogs_indexage', '90')"); 205 248 $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')"); 208 253 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('debug_querylog', '')"); 209 254 $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, wri tten 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')"); 211 256 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('display_validation', '1')"); 212 257 $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')"); 214 259 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('email_verification', '1')"); 215 260 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('enable_registration', '1')"); … … 220 265 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('forum_edit_timeout', '1')"); 221 266 $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')"); 222 268 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('forum_max_h', '600')"); 223 269 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('forum_max_w', '600')"); 224 270 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('guestposts', '1')"); 225 271 $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')"); 226 273 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('keywords', 'ExiteCMS, CMS, Smarty, MySQL, PHP, Open-Source')"); 227 274 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('locale', 'English')"); 228 275 $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')"); 230 277 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('longdate', '%m/%d/%Y %H:%M:%S')"); 231 278 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('maintenance', '0')"); 232 279 $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')"); 236 283 $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@ex ample.com')");284 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('newsletter_email', 'noreply@exite.eu')"); 238 285 $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')"); 243 290 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('numofshouts', '5')"); 244 291 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('numofthreads', '20')"); 245 292 $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')"); 247 294 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('photo_h', '300')"); 248 295 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('photo_max_b', '150000')"); … … 258 305 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('pm_sentbox', '25')"); 259 306 $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', '1 500')");307 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('revision', '1650')"); 261 308 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('session_gc_divisor', '100')"); 262 309 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('session_gc_maxlifetime', '604800')"); … … 264 311 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('session_name', 'ExiteCMSid')"); 265 312 $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 ©2008Exite 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')"); 270 317 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteurl', '/')"); 271 318 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES('siteusername', 'webmaster')"); … … 342 389 `download_version` varchar(50) NOT NULL default '', 343 390 `download_filesize` varchar(20) NOT NULL default '', 344 `download_bar` tinyint(1) unsigned NOT NULL default 0,345 391 `download_datestamp` int(10) unsigned NOT NULL default 0, 346 392 `download_count` smallint(5) unsigned NOT NULL default 0, 393 `download_external` tinyint(1) NOT NULL default 0, 347 394 PRIMARY KEY (`download_id`) 348 395 ) ENGINE=MyISAM;"); … … 411 458 `attach_count` mediumint(8) unsigned NOT NULL default 0, 412 459 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`) 414 463 ) ENGINE=MyISAM;"); 415 464 if (!$result) { … … 628 677 `news_breaks` char(1) NOT NULL default 'n', 629 678 `news_name` mediumint(8) unsigned NOT NULL default 1, 679 `news_locale` varchar(8) NOT NULL default '', 630 680 `news_datestamp` int(10) unsigned NOT NULL default 0, 631 681 `news_start` int(10) unsigned NOT NULL default 0, … … 633 683 `news_visibility` tinyint(3) unsigned NOT NULL default 0, 634 684 `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,637 685 `news_allow_comments` tinyint(1) unsigned NOT NULL default 1, 638 686 `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`) 640 691 ) ENGINE=MyISAM;"); 641 692 if (!$result) { … … 657 708 $fail = "1"; 658 709 $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;"); 724 if (!$result) { 725 $fail = "1"; 726 $failed[] = "news_frontpage : ".mysql_error(); 659 727 } 660 728 … … 805 873 KEY `thread_id` (`thread_id`), 806 874 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`) 808 877 ) ENGINE=MyISAM;"); 809 878 if (!$result) { … … 855 924 `report_id` smallint(5) unsigned NOT NULL auto_increment, 856 925 `report_mod_id` smallint(5) unsigned NOT NULL default 0, 926 `report_mod_core` tinyint(1) unsigned NOT NULL default 0, 857 927 `report_name` varchar(100) NOT NULL default '', 858 928 `report_title` varchar(100) NOT NULL default '', … … 868 938 869 939 // 870 // Code to create table `search es`871 // 872 $result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."search es");873 $result = dbquery("CREATE TABLE IF NOT EXISTS ".$db_prefix."search es(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 ( 874 944 `search_id` smallint(5) unsigned NOT NULL auto_increment, 875 945 `search_mod_id` smallint(5) unsigned NOT NULL default 0, 946 `search_mod_core` tinyint(1) unsigned NOT NULL default 0, 876 947 `search_name` varchar(100) NOT NULL default '', 877 948 `search_title` varchar(100) NOT NULL default '', 949 `search_fulltext` tinyint(1) unsigned NOT NULL default 0, 878 950 `search_version` varchar(10) NOT NULL default '0', 951 `search_active` tinyint(1) unsigned NOT NULL default 0, 879 952 `search_visibility` tinyint(3) NOT NULL default 0, 880 953 PRIMARY KEY (`search_id`) … … 882 955 if (!$result) { 883 956 $fail = "1"; 884 $failed[] = "search es: ".mysql_error();957 $failed[] = "search : ".mysql_error(); 885 958 } 886 959 … … 1017 1090 `user_location` varchar(50) NOT NULL default '', 1018 1091 `user_birthdate` date NOT NULL default '0000-00-00', 1092 `user_gender` enum('M','F','') NOT NULL default '', 1019 1093 `user_aim` varchar(16) NOT NULL default '', 1020 1094 `user_icq` varchar(15) NOT NULL default '', … … 1043 1117 `user_posts_unread` tinyint(1) NOT NULL default 1, 1044 1118 `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, 1045 1121 PRIMARY KEY (`user_id`) 1046 1122 ) ENGINE=MyISAM;"); -
trunk/includes/dns_functions.php
r1416 r1660 54 54 // for non-windows platforms, use the internal function 55 55 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 } 57 69 } 58 70 -
trunk/includes/templates/admin.members.tpl
r1186 r1660 183 183 <td class='tbl2'> 184 184 <div style='float:right;'><a href='{$smarty.const.FUSION_SELF}{$aidlink}&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}&order=username&field={$field}&sortby={$sortby}&country={$country}'><b>{$locale.401}</b></a> 189 {/if} 186 190 </td> 187 191 {if $userdata.user_level >= 102 || $settings.forum_flags} 188 192 <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}&order=country&field={$field}&sortby={$sortby}&country={$country}'><b>{$locale.406}</b></a> 197 {/if} 198 </td> 199 {/if} 200 {if $smarty.const.iADMIN} 193 201 <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}&order=email&field={$field}&sortby={$sortby}&country={$country}'><b>{$locale.409}</b></a> 206 {/if} 195 207 </td> 196 208 {/if} … … 209 221 {if $userdata.user_level >= 102 || $settings.forum_flags} 210 222 <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}& sortby={$sortby}&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}&order={$order}&sortby={$sortby}&field={$field}&country={$members[id].user_cc_code}'>{$members[id].cc_name}</a>{/if} 212 224 </td> 213 225 {/if} … … 243 255 </tr> 244 256 {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}&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}&sortby={$letter}{if $country !=""}&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}&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}&field={$field}&sortby={$letter}&order={$order}{if $country !=""}&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:"&field=username"|cat:"&order="|cat:$order|cat:"&sortby=all&country="|cat:$country} 280 281 {buttonlink name=$locale.404|sprintf:$locale.409 link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&field=email"|cat:"&order="|cat:$order|cat:"&sortby=all&country="|cat:$country} 282 {if $sortby != "all" || $country != ""} 283 284 {buttonlink name=$locale.414 link=$smarty.const.FUSION_SELF|cat:$aidlink|cat:"&field="|cat:$field|cat:"&order="|cat:$order|cat:"&sortby=all"} 285 {/if} 286 </div> 267 287 {/if} 268 {/foreach}269 </tr>270 </table>271 288 {/if} 272 289 {sectionelse} -
trunk/includes/templates/main.members.tpl
r1186 r1660 33 33 <tr> 34 34 <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&field={$field}&sortby={$sortby}&country={$country}'><b>{$locale.401}</b></a> 39 {/if} 36 40 </td> 37 41 {if $userdata.user_level >= 102 || $settings.forum_flags} 38 42 <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&field={$field}&sortby={$sortby}&country={$country}'><b>{$locale.406}</b></a> 47 {/if} 40 48 </td> 41 49 {/if} 42 50 {if $smarty.const.iSUPERADMIN} 43 51 <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&field={$field}&sortby={$sortby}&country={$country}'><b>{$locale.409}</b></a> 56 {/if} 45 57 </td> 46 58 <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&field={$field}&sortby={$sortby}&country={$country}'><b>{$locale.405}</b></a> 63 {/if} 48 64 </td> 49 65 {/if} … … 59 75 {if $userdata.user_level >= 102 || $settings.forum_flags} 60 76 <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}&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}&sortby={$sortby}&field={$field}&country={$members[id].user_cc_code}'>{$members[id].cc_name}</a>{/if} 62 78 </td> 63 79 {/if} … … 76 92 {if $smarty.section.id.last} 77 93 </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}&sortby={$letter}{if $country !=""}&country={$country}{/if}'>{$letter}</a> 104 </div> 105 </td> 106 {if !$smarty.foreach.search.last && $smarty.foreach.search.index==$break} 107 </tr> 108 <tr> 87 109 {/if} 88 <td align='center' class='tbl1'> 89 <div class='small'> 90 <a href='{$smarty.const.FUSION_SELF}?sortby={$letter}{if $country !=""}&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:"&order="|cat:$order|cat:"&sortby=all&country="|cat:$country} 115 116 {buttonlink name=$locale.404|sprintf:$locale.409 link=$smarty.const.FUSION_SELF|cat:"?field=email"|cat:"&order="|cat:$order|cat:"&sortby=all&country="|cat:$country} 117 {if $sortby != "all"} 118 119 {buttonlink name=$locale.414 link=$smarty.const.FUSION_SELF|cat:"?field="|cat:$field|cat:"&order="|cat:$order|cat:"&sortby=all"} 120 {/if} 121 </div> 103 122 {/if} 104 123 {sectionelse} -
trunk/includes/templates/main.setup.tpl
r1081 r1660 15 15 {* *} 16 16 {***************************************************************************} 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"> 18 18 <html> 19 19 <head> … … 22 22 {literal}<style type="text/css"> 23 23 <!-- 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; } 24 a { color:#003D71; text-decoration:none; } 25 a: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; } 28 td { font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:11px; } 42 29 .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; } 48 35 --> 49 36 </style>{/literal} … … 53 40 <tr> 54 41 <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'> 56 43 <tr> 57 44 <td align='center' class='tbl1'> … … 63 50 </table> 64 51 <br> 65 <table align='center' cellpadding='0' cellspacing='0' width=' 450'>52 <table align='center' cellpadding='0' cellspacing='0' width='600'> 66 53 <tr> 67 54 <td align='center'> … … 72 59 <br> 73 60 {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'> 75 62 <tr> 76 63 <td align='center' class='tbl4'> … … 82 69 {/if} 83 70 {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'> 85 72 <tr> 86 73 <td align='center' class='tbl3'> … … 92 79 {/if} 93 80 {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'> 95 82 <tr> 96 83 <td align='center' class='tbl2' colspan='4'> … … 120 107 <br /> 121 108 {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'> 123 110 <tr> 124 111 <td align='center' class='tbl4'> … … 133 120 <br> 134 121 <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'> 136 123 <tr> 137 124 <td align='center' colspan='2' class='tbl2'> … … 144 131 </td> 145 132 <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' /> 147 134 </td> 148 135 </tr> … … 152 139 </td> 153 140 <td class='tbl1'> 154 <input type='text' value='' name=' db_user' class='textbox' />141 <input type='text' value='' name='{$db_user}' class='textbox' /> 155 142 </td> 156 143 </tr> … … 160 147 </td> 161 148 <td class='tbl1'> 162 <input type='password' value='' name=' db_pass' class='textbox'>149 <input type='password' value='' name='{$db_pass}' class='textbox'> 163 150 </td> 164 151 </tr> … … 168 155 </td> 169 156 <td class='tbl1'> 170 <input type='text' value='' name=' db_name' class='textbox' />157 <input type='text' value='' name='{$db_name}' class='textbox' /> 171 158 </td> 172 159 </tr> … … 176 163 </td> 177 164 <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' /> 179 166 </td> 180 167 </tr> … … 189 176 {/if} 190 177 {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'> 192 179 <tr> 193 180 <td align='center' colspan='2' class='tbl4'> … … 199 186 <br /> 200 187 <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'> 202 189 <tr> 203 190 <td align='center' colspan='2' class='tbl2'> -
trunk/members.php
r1195 r1660 28 28 if (!isset($country) || strlen($country) != 2) $country = ""; 29 29 if (!isset($sortby) || strlen($sortby) != 1) $sortby = "all"; 30 if (!isset($order)) $order = "username"; 31 if (!isset($field)) $field = "username"; 30 32 31 33 // get the name of the country requested … … 35 37 $rows = 0; 36 38 if (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; 49 54 } 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 50 84 // get the list of members 51 85 $variables['members'] = array(); 52 86 if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; 53 $result = dbquery("SELECT * FROM ".$db_prefix."users ".($filter==""?"":("WHERE ".$filter))." ORDER BY user_level DESC, user_nameLIMIT ".$rowstart.", ".$settings['numofthreads']);87 $result = dbquery("SELECT * FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY ".$sortfield." LIMIT ".$rowstart.", ".$settings['numofthreads']); 54 88 $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 } 55 96 $variables['members'] = array(); 56 97 if ($rows != 0) { … … 83 124 // starting characters to filter on. Make sure there are an even number! 84 125 $variables['search'] = array(); 85 $result = dbquery("SELECT DISTINCT(UPPER(SUBSTRING(user_name,1,1))) AS letter FROM ".$db_prefix."usersORDER BY letter");126 $result = dbquery("SELECT ".$letterfilter." AS letter FROM ".$db_prefix."users".($where == ""?"":(" WHERE ".$where))." ORDER BY letter"); 86 127 while ($data = dbarray($result)) { 87 128 // get rid of unwanted characters. Need to find a beter solution for this … … 89 130 } 90 131 if (count($variables['search'])%2) $variables['search'][] = ""; 132 $variables['field'] = $field; 133 $variables['order'] = $order; 91 134 $variables['sortby'] = $sortby; 92 $variables['rows'] = dbcount("(*)", "users", $ filter);135 $variables['rows'] = dbcount("(*)", "users", $where); 93 136 $variables['rowstart'] = $rowstart; 94 137 $variables['items_per_page'] = $settings['numofthreads']; 95 $variables['pagenav_url'] = FUSION_SELF."?sortby=$sortby& ".($country==""?"":"country=$country&");138 $variables['pagenav_url'] = FUSION_SELF."?sortby=$sortby&field=$field&".($country==""?"":"country=$country&"); 96 139 } 97 140 -
trunk/setup.php
r1502 r1660 18 18 +----------------------------------------------------*/ 19 19 function dbconnect($db_host, $db_user, $db_pass, $db_name) { 20 global $locale; 21 20 22 $db_connect = @mysql_connect($db_host, $db_user, $db_pass); 21 23 $db_select = @mysql_select_db($db_name); 22 24 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()); 24 26 } 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()); 26 28 } 27 29 } 28 30 29 31 function dbquery($query) { 32 30 33 $result = @mysql_query($query); 31 34 if (!$result) { 32 echo mysql_error();33 35 return false; 34 36 } else { … … 38 40 39 41 function dbarray($resource) { 42 40 43 $result = @mysql_fetch_assoc($resource); 41 44 if (!$result) { … … 72 75 +----------------------------------------------------*/ 73 76 function stripinput($text) { 77 74 78 if (ini_get('magic_quotes_gpc')) $text = stripslashes($text); 75 79 $search = array("\"", "'", "\\", '\"', "\'", "<", ">", " "); … … 83 87 +----------------------------------------------------*/ 84 88 function makefilelist($folder, $filter, $sort=true, $type="files") { 89 85 90 $res = array(); 86 91 $filter = explode("|", $filter); … … 104 109 +----------------------------------------------------*/ 105 110 function locale_load($locale_name) { 106 107 111 global $settings, $locale, $db_prefix; 108 112 109 113 $locales_file = PATH_ROOT."files/locales/".(defined('LP_LOCALE')?LP_LOCALE:"en").".".$locale_name.".php"; 110 114 if (file_exists($locales_file)) { 111 require $locales_file;115 require_once $locales_file; 112 116 } 113 117 return; 118 } 119 120 /*---------------------------------------------------+ 121 | load a locale file 122 +----------------------------------------------------*/ 123 function 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); 114 138 } 115 139 … … 124 148 define("PATH_THEMES", PATH_ROOT."themes/"); 125 149 define("PATH_THEME", PATH_ROOT."themes/ExiteCMS/"); 126 define("PATH_PHOTOS", PATH_ROOT."images/photoalbum/");127 150 define("PATH_IMAGES", PATH_ROOT."images/"); 128 151 define("PATH_IMAGES_A", PATH_IMAGES."articles/"); … … 141 164 define('CMS_SETUP', true); 142 165 143 // error tracking 166 // temp storage for template variables 167 $variables = array(); 168 169 // used for error tracking 144 170 $error = ""; 145 171 146 // verify the locale172 // verify the selected locale 147 173 $localeset = isset($_GET['localeset']) ? $_GET['localeset'] : ""; 148 174 if (!file_exists(PATH_ADMIN."tools/language_pack_".$localeset.".php")) { … … 151 177 if (!file_exists(PATH_ADMIN."tools/language_pack_".$localeset.".php")) { 152 178 // 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 156 183 // load the language pack file, to get some initial info about the language 157 184 require PATH_ADMIN."tools/language_pack_".$localeset.".php"; 158 185 186 // load the locale for this module 187 locale_load("main.setup"); 188 159 189 // define some of the website settings for the template engine 160 190 $settings = array("locale" => LP_LOCALE, "theme" => "ExiteCMS"); 161 162 // temp storage for template variables163 $variables = array();164 165 191 $variables['localeset'] = LP_LANGUAGE; 166 $variables['charset'] = "iso-8859-1";192 $variables['charset'] = LP_CHARSET; 167 193 168 194 // parameter validation … … 172 198 // check if the cache directories are writeable 173 199 if (!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); 175 201 } 176 202 if (!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 } 205 if (!is_writable(PATH_FILES."locales")) { 206 terminate($locale['416'], $locale['406'], true); 207 } 208 209 // get the FQFN of the config file 180 210 @include_once PATH_ROOT."configpath.php"; 181 211 if (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")); 185 213 } 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 218 if ($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 192 230 if ($step == "1") { 231 // verify the user input: hostname 193 232 $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 194 238 $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 195 245 $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 196 252 $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 197 259 $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 199 291 // global database settings 200 292 "."$"."db_host="."\"".$_POST['db_host']."\""."; … … 211 303 "."$"."user_db_prefix="."\"".$_POST['db_prefix']."\""."; 212 304 ?>"; 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 } 224 312 } 225 313 } 226 314 227 315 require_once PATH_ROOT."includes/theme_functions.php"; 228 229 // load the locale for this module230 locale_load("main.setup");231 316 232 317 // process the different setup steps … … 251 336 } else { 252 337 $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>"; 254 339 } 255 340 break; 256 341 case "1": 257 342 if ($error == "") { 258 require_once "config.php";343 require_once CONFIG_FILE; 259 344 $link = dbconnect($db_host, $db_user, $db_pass, $db_name); 260 345 require_once PATH_INCLUDES."dbsetup_include.php"; … … 272 357 break; 273 358 case "2": 274 require_once "config.php";359 require_once CONFIG_FILE; 275 360 $link = dbconnect($db_host, $db_user, $db_pass, $db_name); 276 361 $basedir = substr($_SERVER['PHP_SELF'], 0, -9); … … 288 373 $error .= $locale['453']."<br /><br />\n"; 289 374 } 375 // double-hash the password to prevent hash table lookups 290 376 $password = md5(md5($password1)); 291 377 … … 294 380 if ($error == "") { 295 381 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 336 383 $result = dbquery("SELECT admin_rights FROM ".$db_prefix."admin"); 337 384 $adminrights = ""; … … 398 445 $result = dbcommands($commands, $db_prefix); 399 446 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 400 457 // add the default forum poll settings 401 458 $commands = array();
Note: See TracChangeset
for help on using the changeset viewer.
