[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 3 if (isset($CMS_INSTALL_CREATE_TABLES)) { 4 5 $table_ids = array( 6 'additional_users' => array('id' => 'additional_users_id'), 7 'admin_bookmarks' => array('id' => 'bookmark_id'), 8 'admin_recent_pages' => array('id' => 'id'), 9 'content' => array('id' => 'content_id'), 10 'content_props' => array('id' => 'content_id'), 11 'css' => array('id' => 'css_id'), 12 'events' => array('id' => 'event_id'), 13 'event_handlers' => array('id' => 'handler_id', 'seq' => 'event_handler_seq'), 14 'group_perms' => array('id' => 'group_perm_id'), 15 'groups' => array('id' => 'group_id'), 16 'htmlblobs' => array('id' => 'htmlblob_id'), 17 'additional_htmlblob_users' => array('id' => 'additional_htmlblob_users_id'), 18 'permissions' => array('id' => 'permission_id'), 19 'templates' => array('id' => 'template_id'), 20 'users' => array('id' => 'user_id'), 21 'userplugins' => array('id' => 'userplugin_id') 22 ); 23 24 foreach ($table_ids as $tablename => $tableinfo) 25 { 26 echo "<p>Creating $tablename table sequence..."; 27 $max = $db->Execute( 28 'SELECT max(' . $tableinfo['id'] . ') AS maxid FROM '.$db_prefix.$tablename 29 ); 30 $max = ($max && $row = $max->FetchRow()) ? $row['maxid']+1 : 1; 31 $tableinfo['seq'] = isset($tableinfo['seq']) ? $tableinfo['seq'] : $tablename . '_seq'; 32 $db->CreateSequence($db_prefix.$tableinfo['seq'], $max); 33 echo "[done]</p>"; 34 } 35 36 } 37 38 # vim:ts=4 sw=4 noet 39 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |