Documentation TYPO3 par Ameos

db_details_common.php

00001 <?php
00002 /* $Id: db_details_common.php,v 2.3 2003/12/30 18:24:10 rabus Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00008 require_once('./libraries/grab_globals.lib.php');
00009 require_once('./libraries/common.lib.php');
00010 require_once('./libraries/bookmark.lib.php');
00011 
00012 PMA_checkParameters(array('db'));
00013 
00017 $err_url_0 = 'main.php?' . PMA_generate_common_url();
00018 $err_url   = $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db);
00019 
00020 
00025 if (!isset($is_db) || !$is_db) {
00026     // Not a valid db name -> back to the welcome page
00027     if (!empty($db)) {
00028         $is_db = @PMA_mysql_select_db($db);
00029     }
00030     if (empty($db) || !$is_db) {
00031         header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php?' . PMA_generate_common_url('', '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
00032         exit;
00033     }
00034 } // end if (ensures db exists)
00035 
00039 if (isset($submitcharset) && PMA_MYSQL_INT_VERSION >= 40101) {
00040     $sql_query     = 'ALTER DATABASE ' . PMA_backquote($db) . ' DEFAULT CHARACTER SET ' . $db_charset;
00041     $result        = PMA_mysql_query($sql_query, $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), $sql_query, '', $err_url);
00042     $message       = $strSuccess;
00043 }
00044 
00045 // Displays headers
00046 if (!isset($message)) {
00047     $js_to_run = 'functions.js';
00048     require_once('./header.inc.php');
00049     // Reloads the navigation frame via JavaScript if required
00050     if (isset($reload) && $reload) {
00051         echo "\n";
00052         ?>
00053 <script type="text/javascript" language="javascript1.2">
00054 <!--
00055 window.parent.frames['nav'].location.replace('./left.php?<?php echo PMA_generate_common_url($db, '', '&'); ?>&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>);
00056 //-->
00057 </script>
00058         <?php
00059     }
00060     echo "\n";
00061 } else {
00062     PMA_showMessage($message);
00063 }
00064 
00068 $url_query = PMA_generate_common_url($db);
00069 
00070 ?>


Généré par Le spécialiste TYPO3 avec  doxygen 1.4.6