Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /sitemap/config.php
sitemap - Richy's Site Map

MainPages::config

"config" module.

 

public module config

"config" module.
Can parse the config.inc.php file and change the values of the variables in_that file. Because of course this whole set of script files that compose_Richy's Site Map, RELY on config.inc.php and config.php SETS config.inc.php,_it CANNOT RELY on the settings of config.inc.php and so needs its own_(hard-coded) values. Furthermore, it cannot rely on the other scripts_because config.inc.php (probably) isn't set correctly (that's what this_module is for!), so it has to do everything by itself, upto generating the_right HTML._Warning: after setting the right values in config.inc.php (I guess because_you're just starting with Richy's Site Map), you have to do something to_secure this file, because you don't want just anyone coming to your web site_to change any of the settings in config.inc.php, just because he/she guesses_right there is a config.php! So either secure it with a password (I can't_give you clues on that one, you have to figure it out yourself) or_delete/move this file to a secure place where visitors of your web site_can't touch it.

Version$Revision: 1.4 $
Copyright(c)2002 R.J. Vrijhof

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Magic$Id: config.php,v 1.4 2002/01/28 14:22:16 richy Exp $

 

Public Method Summary

string

parse(string $path)

Parse the config.inc.php file and return the parsed content as an array.
mixed

checkvars(array $parsed, array $preset)

Check for all variables.
array

chg_val(string $input, string $var, string $type, string $val)

Change the value of a variable in config.inc.php.
string

display_val(string $var, string $type, string $val)

Display the value of a variable in config.inc.php as an HTML input tag.
void

hidden_input(string $var, string $val)

Display a hidden input item if POST variable is defined.
void

sec_form()

Display the security (logon) form.

Included files Summary, Type: require_once

./config/config_sec.inc.php

Public Method Details

parse

public string parse( string $path )

  Parse the config.inc.php file and return the parsed content as an array.
Note that this function is VERY slow!

Parameter
string $path
full path to the config.inc.php file
Returns string $file

parsed content of config.inc.php file

Author(s) Richard Vrijhof <R.J.Vrijhof@bigfoot.com>

checkvars

public mixed checkvars( array $parsed, array $preset )

  Check for all variables.

Parameter
array $parsed
array produced by parse()
array $preset
array preset in $all_vars
Returns mixed

-255 if all variables in config.inc.php (and
no extra variables not defined in $all_vars)
array if failed, following this format:
"not_in_config" => array("var1", "var2"),
"not_in_all_vars" => array("var1", "var2")

See Also parse()
Author(s) Richard Vrijhof <R.J.Vrijhof@bigfoot.com>

chg_val

public array chg_val( string $input, string $var, string $type, string $val )

  Change the value of a variable in config.inc.php.

Parameter
string $input
content of the config.inc.php file
string $var
name of the variable
string $type
type of the variable (supported are: all
scalars, so not "array" or "object")
string $val
value of the variable
Returns array

as follows:
0 => return code (true or false)
1 => changed content (or not, if [0] == false)

Author(s) Richard Vrijhof <R.J.Vrijhof@bigfoot.com>

display_val

public string display_val( string $var, string $type, string $val )

  Display the value of a variable in config.inc.php as an HTML input tag.

Parameter
string $var
name of the variable
string $type
type of the variable
string $val
value of the variable
Returns string

HTML code to produce the input tag

Required global variables
array $string_set
Author(s) Richard Vrijhof <R.J.Vrijhof@bigfoot.com>

hidden_input

public void hidden_input( string $var, string $val )

  Display a hidden input item if POST variable is defined.

Parameter
string $var
name of POST variable
string $val
value of POST variable
Returns void

Author(s) Richard Vrijhof <R.J.Vrijhof@bigfoot.com>

sec_form

public void sec_form( )

  Display the security (logon) form.

Returns void

Required global variables
array $HTTP_POST_VARS
Author(s) Richard Vrijhof <R.J.Vrijhof@bigfoot.com>

Included Files, Type: require_once

./config/config_sec.inc.php

require_once( ./config/config_sec.inc.php )




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta