/trunk/libraries/url_generating.lib.php

Description

URL/hidden inputs generating.

  • version: $Id: url_generating.lib.php 10685 2007-10-02 07:28:48Z cybot_tm $
Functions
PMA_generate_common_hidden_inputs (line 31)

Generates text with hidden inputs.

string PMA_generate_common_hidden_inputs ([string $db = ''], [string $table = ''], [int $indent = 0], [ $skip = array()])
  • string $db: optional database name
  • string $table: optional table name
  • int $indent: indenting level
  • $skip
PMA_generate_common_url (line 187)

Generates text with URL parameters.

  1.  // OLD derepecated style
  2.  // note the ?
  3.  echo 'script.php?' PMA_generate_common_url('mysql''rights');
  4.  // produces with cookies enabled:
  5.  // script.php?db=mysql&table=rights
  6.  // with cookies disabled:
  7.  // script.php?server=1&lang=en-utf-8&db=mysql&table=rights
  8.  
  9.  // NEW style
  10.  $params['myparam''myvalue';
  11.  $params['db']      'mysql';
  12.  $params['table']   'rights';
  13.  // note the missing ?
  14.  echo 'script.php' PMA_generate_common_url($params);
  15.  // produces with cookies enabled:
  16.  // script.php?myparam=myvalue&db=mysql&table=rights
  17.  // with cookies disabled:
  18.  // script.php?server=1&lang=en-utf-8&myparam=myvalue&db=mysql&table=rights
  19.  
  20.  // note the missing ?
  21.  echo 'script.php' PMA_generate_common_url();
  22.  // produces with cookies enabled:
  23.  // script.php
  24.  // with cookies disabled:
  25.  // script.php?server=1&lang=en-utf-8

string PMA_generate_common_url (mixed 0, string 1, string 2)
  • mixed 0: assoc. array with url params or optional string with database name if first param is an array there is also an ? prefixed to the url
  • string 1: optional table name only if first param is array
  • string 2: character to use instead of '&' for deviding multiple URL parameters from each other
PMA_getHiddenFields (line 112)

create hidden form fields from array with name => value

  1.  $values array(
  2.      'aaa' => aaa,
  3.      'bbb' => array(
  4.           'bbb_0',
  5.           'bbb_1',
  6.      ),
  7.      'ccc' => array(
  8.           'a' => 'ccc_a',
  9.           'b' => 'ccc_b',
  10.      ),
  11.  );
  12.  echo PMA_getHiddenFields($values);
  13.  
  14.  // produces:
  15.  <input type="hidden" name="aaa" Value="aaa" />
  16.  <input type="hidden" name="bbb[0]" Value="bbb_0" />
  17.  <input type="hidden" name="bbb[1]" Value="bbb_1" />
  18.  <input type="hidden" name="ccc[a]" Value="ccc_a" />
  19.  <input type="hidden" name="ccc[b]" Value="ccc_b" />

string PMA_getHiddenFields (array $values, [string $pre = ''])
  • array $values
  • string $pre
PMA_get_arg_separator (line 278)

Returns url separator

string PMA_get_arg_separator ([string $encode = 'none'])
  • string $encode: whether to encode separator or not, currently 'none' or 'html'

Documentation generated on Thu, 25 Oct 2007 14:23:15 +0200 by phpDocumentor 1.4.0