f('db_user'),$ses->f('db_pass'), $ses->f('db_host'),$ses->f('db_name')); # On vérifie si les tables existent $strReq = 'SHOW TABLES LIKE \''.$ses->f('db_prefix').'%s\' '; $rs = $con->select(sprintf($strReq,'categorie')); $installed['categorie'] = !$rs->isEmpty(); $rs = $con->select(sprintf($strReq,'comment')); $installed['comment'] = !$rs->isEmpty(); $rs = $con->select(sprintf($strReq,'post')); $installed['post'] = !$rs->isEmpty(); $rs = $con->select(sprintf($strReq,'user')); $installed['user'] = !$rs->isEmpty(); $installed = $installed['categorie'] && $installed['comment'] && $installed['post'] && $installed['user']; if ($installed) { $ses->reg('step',20); } else { $sql_check = new checklist(); $xsql = new xmlsql($con,implode('',file(dirname(__FILE__).'/db-create.xml'))); $xsql->replace('{{PREFIX}}',$ses->f('db_prefix')); $xsql->execute($sql_check); $con->close(); if ($sql_check->checkAll()) { $ses->reg('step',5); } } require dirname(__FILE__).'/__top.php'; if ($installed) { echo '
'.__('DotClear seems to be present on your site. '. 'You may want to upgrade.').'
'. ''.__('Don\'t forget to upload your old dotclear.ini '. 'in conf/ directory before upgrade.').'
'. ''; } else { echo ''. __('Unable to create all tables. Please check if the tables don\'t exist yet.').'
'; } else { echo ''.__('Tables successfully created.').'
'; if ($sql_check->checkWarnings()) { echo ''.__('DotClear will run properly even if warnings are issued.').'
'; } echo ''; } } ?>