// All rights reserved. This script is part of PHPWCMS. The PHPWCMS web content management system is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html A copy is found in the textfile GPL.txt and important notices to the license from the author is found in LICENSE.txt distributed with these scripts. This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This copyright notice MUST APPEAR in all copies of the script! *************************************************************************************/ ?>

3. MySQL database settings

40100) { $_collation = array(); $_collation_selected = false; echo ''; // make db connect if(empty($db)) { $db = @mysql_connect($phpwcms["db_host"], $phpwcms["db_user"], $phpwcms["db_pass"]); @mysql_select_db($phpwcms["db_table"], $db); } if($result = mysql_query("SHOW COLLATION", $db)) { while($row = mysql_fetch_assoc($result)) { if(in_array($row['Charset'], $mysql_charset_map)) { if($phpwcms['db_collation']==$row['Collation']) { $_collation_selected = true; $_collation[ $row['Charset'] ][ $row['Collation'] ] = true; } else { $_collation[ $row['Charset'] ][ $row['Collation'] ] = false; } } } ksort($_collation); } // warn again if(isset($_collation_warning) && $_collation_warning === true) { echo ''; $_SESSION['admin_set'] = false; } ?> \n"; $_SESSION['admin_set'] = false; } if(isset($db_create_err) && count($db_create_err)) { echo '\n"; $_SESSION['admin_set'] = false; $sql_data = false; $db_sql = false; } elseif(isset($db_create_err) || !empty($db_no_create)) { // OK fine - initial tables were created without error $_db_prepend = ($phpwcms["db_prepend"] ? $phpwcms["db_prepend"].'_' : ''); $check = _dbQuery("SHOW TABLES LIKE '".$_db_prepend."phpwcms_%'"); if($check && count($check)) { $sql_data = false; $db_sql = false; $db_fine = true; ?> \n"; } } if(empty($db_fine)) { // show info ?> $value) { $value = trim($value); if(empty($value)) { unset($sql_data[$key]); continue; } $value = html_specialchars($value); $value = str_replace(' ', ' ', $value); $value = nl2br($value); $sql_data[$key] = '

'.$value; if($phpwcms['db_version'] > 40100 && strpos(strtoupper(trim($value)), 'INSERT') !== 0) { $sql_data[$key] .= ' DEFAULT'; $sql_data[$key] .= ' CHARACTER SET '.$phpwcms['db_charset']; $sql_data[$key] .= ' COLLATE '.$phpwcms['db_collation']; } $sql_data[$key] .= ' ;

'; $c++; } $sql_data = implode("\n", $sql_data); echo '\n"; } } // OK now lets create superuser if(!empty($_SESSION['admin_set'])) { ?> \n"; } ?> '; } } ?>
MySQL host:  " size="30" style="width:250px" /> default: localhost
DB user:  " size="30" />  
DB password:  " size="30" />  
DB database:  " size="30" maxlength="255" /> you have to create it before setup!!!
DB table prefix:  default: none (""), if filled in it will be prefix+_
 
/>
recommend setting is to enable it

4. Charset & MySQL (v) collation settings Info

InfoCharset (recommend: UTF8): 
 '.errorWarning('Proof collation again!').'
MySQL Collation (recommend: utf8_general_ci): 

5. Default phpwcms database schema

 '; echo errorWarning('phpwcms tables still exists in choosen database. Rename table prefix might help!'); echo "
 '; echo errorWarning('Errors while creating initial phpwcms tables. Solve it manually:

'.html_specialchars(implode(";\n\n", $db_create_err).';').'

'); echo "

  JuchuFine! All initial phpwcms tables were created or still exists.
 '; echo errorWarning('No phpwcms database table exists. Check before you continue!'); echo ''; echo "
 
/>
 
 '; if(empty($_db_prepend_error) && isset($_POST['db_sql_hidden'])) { echo ''; } echo ''; echo '
'; echo $sql_data; echo "

6. Superuser settings

Name:  " size="30" />  default: Webmaster
Admin login:  " size="30" />  default: admin
 '; echo errorWarning('Invalid password! Password is case senitive, empty password not allowed.'); echo "
Admin password:   default: phpwcms
Repeat password:   
Admin email:  " size="30" />  is used site wide
 '; if(!empty($create_user)) { // update echo 'Juchu'; echo 'Done! Account for user '.html_specialchars($phpwcms['admin_user']).' was created.'; echo ''; } if(!empty($update_user)) { // update echo 'Juchu'; echo 'Done! Account of user '.html_specialchars($phpwcms['admin_user']).' was updated.'; echo ''; } if($user_check === false) { // db error echo errorWarning('There is a database problem!'); echo '

Account for user '.html_specialchars($phpwcms['admin_user']).' was not created or updated.
Click continue to try again.

'; $_SESSION['admin_save'] = false; } echo '