Documentation TYPO3 par Ameos

url_generating.lib.php

00001 <?php
00002 /* $Id: url_generating.lib.php,v 2.3 2004/07/17 22:58:31 rabus Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00005 
00031 function PMA_generate_common_hidden_inputs ($db = '', $table = '', $indent = 0, $skip = array())
00032 {
00033     global $lang, $convcharset, $collation_connection, $server;
00034     global $cfg, $allow_recoding;
00035     
00036     if (!is_array($skip)) {
00037         $skip = array($skip);
00038     }
00039 
00040     $spaces = '';
00041     for ($i = 0; $i < $indent; $i++) {
00042         $spaces .= '    ';
00043     }
00044 
00045     $result = $spaces . '<input type="hidden" name="lang" value="' . $lang . '" />' . "\n"
00046             . $spaces . '<input type="hidden" name="server" value="' . $server . '" />' . "\n";
00047     if (!in_array('convcharset', $skip) && isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)
00048         $result .= $spaces . '<input type="hidden" name="convcharset" value="' . $convcharset . '" />'  . "\n";
00049     if (!in_array('collation_connection', $skip) && isset($collation_connection))
00050         $result .= $spaces . '<input type="hidden" name="collation_connection" value="' . $collation_connection . '" />'  . "\n";
00051     if (!in_array('db', $skip) && !empty($db))
00052         $result .= $spaces . '<input type="hidden" name="db" value="'.htmlspecialchars($db).'" />' . "\n";
00053     if (!in_array('table', $skip) && !empty($table))
00054         $result .= $spaces . '<input type="hidden" name="table" value="'.htmlspecialchars($table).'" />' . "\n";
00055     return $result;
00056 }
00057 
00079 function PMA_generate_common_url ($db = '', $table = '', $amp = '&amp;')
00080 {
00081     global $lang, $convcharset, $collation_connection, $server;
00082     global $cfg, $allow_recoding;
00083 
00084     $result = 'lang=' . $lang
00085        . $amp . 'server=' . $server;
00086     if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)
00087         $result .= $amp . 'convcharset=' . urlencode($convcharset);
00088     if (isset($collation_connection))
00089         $result .= $amp . 'collation_connection=' . urlencode($collation_connection);
00090     if (!empty($db))
00091         $result .= $amp . 'db='.urlencode($db);
00092     if (!empty($table))
00093         $result .= $amp . 'table='.urlencode($table);
00094     return $result;
00095 }
00096 
00097 ?>


Généré par TYPO3 Ameos avec  doxygen 1.4.6