Documentation TYPO3 par Ameos

db_details_links.php

00001 <?php
00002 /* $Id: db_details_links.php,v 2.16 2005/08/16 17:49:57 lem9 Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00005 
00010 if (empty($sub_part)) {
00011     $sub_part = '_structure';
00012 }
00013 
00014 
00018 // Export link if there is at least one table
00019 if ($num_tables > 0) {
00020     $tab_export['link'] = 'db_details_export.php';
00021     $tab_search['link'] = 'db_search.php';
00022     $tab_qbe['link']    = 'db_details_qbe.php';
00023 }
00024 $tab_structure['link'] = 'db_details_structure.php';
00025 $tab_sql['link']       = 'db_details.php';
00026 $tab_sql['args']['db_query_force'] = 1;
00027 $tab_operation['link'] = 'db_operations.php';
00028 
00029 // Drop link if allowed
00030 if (!$GLOBALS['cfg']['AllowUserDropDatabase']) {
00031     // Check if the user is a Superuser
00032     $GLOBALS['cfg']['AllowUserDropDatabase'] = PMA_DBI_select_db('mysql');
00033     PMA_DBI_select_db($db);
00034 }
00035 // rabus: Don't even try to drop information_schema. You won't be able to.
00036 // Believe me. You won't.
00037 $GLOBALS['cfg']['AllowUserDropDatabase'] = $GLOBALS['cfg']['AllowUserDropDatabase'] && !(PMA_MYSQL_INT_VERSION >= 50000 && $db == 'information_schema');
00038 if ($GLOBALS['cfg']['AllowUserDropDatabase']) {
00039     $tab_drop['link'] = 'sql.php';
00040     $tab_drop['args']['sql_query']  = 'DROP DATABASE ' . PMA_backquote($db);
00041     $tab_drop['args']['zero_rows']  = sprintf($GLOBALS['strDatabaseHasBeenDropped'], htmlspecialchars(PMA_backquote($db)));
00042     $tab_drop['args']['goto']       = 'main.php';
00043     $tab_drop['args']['back']       = 'db_details' . $sub_part . '.php';
00044     $tab_drop['args']['reload']     = 1;
00045     $tab_drop['args']['purge']      = 1;
00046     $tab_drop['attr'] = 'onclick="return confirmLinkDropDB(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"';
00047     $tab_drop['class'] = 'caution';
00048 }
00049 
00050 // text
00051 $tab_structure['text']  = $GLOBALS['strStructure'];
00052 $tab_sql['text']        = $GLOBALS['strSQL'];
00053 $tab_export['text']     = $GLOBALS['strExport'];
00054 $tab_search['text']     = $GLOBALS['strSearch'];
00055 $tab_drop['text']       = $GLOBALS['strDrop'];
00056 $tab_qbe['text']        = $GLOBALS['strQBE'];
00057 $tab_operation['text']  = $GLOBALS['strOperations'];
00058 
00059 // icons
00060 $tab_structure['icon']  = 'b_props.png';
00061 $tab_sql['icon']        = 'b_sql.png';
00062 $tab_export['icon']     = 'b_export.png';
00063 $tab_search['icon']     = 'b_search.png';
00064 $tab_drop['icon']       = 'b_deltbl.png';
00065 $tab_qbe['icon']        = 's_db.png';
00066 $tab_operation['icon']  = 'b_tblops.png';
00067 
00071 $tabs = array();
00072 $tabs[] =& $tab_structure;
00073 $tabs[] =& $tab_sql;
00074 $tabs[] =& $tab_search;
00075 $tabs[] =& $tab_qbe;
00076 $tabs[] =& $tab_export;
00077 $tabs[] =& $tab_operation;
00078 if ($GLOBALS['cfg']['AllowUserDropDatabase']) {
00079     $tabs[] =& $tab_drop;
00080 }
00081 
00082 echo PMA_getTabs( $tabs );
00083 unset( $tabs );
00084 
00088 require_once('./libraries/relation.lib.php');
00089 $cfgRelation = PMA_getRelationsParam();
00090 
00091 // Get additional information about tables for tooltip is done in db_details_db_info.php only once
00092 if ($cfgRelation['commwork']) {
00093     $comment = PMA_getComments($db);
00094 
00098     if (is_array($comment)) {
00099         ?>
00100     <!-- DB comment -->
00101     <p id="dbComment"><i>
00102         <?php echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?>
00103     </i></p>
00104         <?php
00105     } // end if
00106 }
00107 
00111 if (!empty($message)) {
00112     PMA_showMessage($message);
00113     unset($message);
00114 }
00115 ?>
00116 <br />


Généré par L'expert TYPO3 avec  doxygen 1.4.6