Update edit user base, config template, class basic

Class.Basic
add general 8 char hash wrapper function (for adler32, fnv, jooa)

Edit Users
add first/last name to the basic user info

Config template
Update config template from current working template
This commit is contained in:
Clemens Schwaighofer
2016-07-12 10:44:53 +09:00
parent 1c5bb8aebe
commit fa246dcfeb
5 changed files with 87 additions and 32 deletions

View File

@@ -230,6 +230,8 @@
$elements[] = $form->form_create_element("password"); $elements[] = $form->form_create_element("password");
$elements[] = $form->form_create_element("password_change_interval"); $elements[] = $form->form_create_element("password_change_interval");
$elements[] = $form->form_create_element("email"); $elements[] = $form->form_create_element("email");
$elements[] = $form->form_create_element("last_name");
$elements[] = $form->form_create_element("first_name");
$elements[] = $form->form_create_element("edit_group_id"); $elements[] = $form->form_create_element("edit_group_id");
$elements[] = $form->form_create_element("edit_access_right_id"); $elements[] = $form->form_create_element("edit_access_right_id");
$elements[] = $form->form_create_element("strict"); $elements[] = $form->form_create_element("strict");

View File

@@ -104,6 +104,16 @@
"output_name" => "E-Mail", "output_name" => "E-Mail",
"type" => "text" "type" => "text"
), ),
"last_name" => array (
"value" => $GLOBALS["last_name"],
"output_name" => "Last Name",
"type" => "text"
),
"first_name" => array (
"value" => $GLOBALS["first_name"],
"output_name" => "First Name",
"type" => "text"
),
"edit_language_id" => array ( "edit_language_id" => array (
"value" => $GLOBALS["edit_language_id"], "value" => $GLOBALS["edit_language_id"],
"output_name" => "Language", "output_name" => "Language",

View File

@@ -279,5 +279,4 @@
} }
return false; return false;
} }
?> ?>

View File

@@ -1,10 +1,5 @@
<? <?
/******************************************************************** /********************************************************************
* $HeadURL: svn://svn/development/core_data/php/www/configs/config.template.inc $
* $LastChangedBy: gullevek $
* $LastChangedDate: 2013-02-18 16:27:24 +0900 (Mon, 18 Feb 2013) $
* $LastChangedRevision: 4382 $
*********************************************************************
* AUTHOR: Clemens "Gullevek" Schwaighofer (www.gullevek.org) * AUTHOR: Clemens "Gullevek" Schwaighofer (www.gullevek.org)
* CREATED: 2003/06/10 * CREATED: 2003/06/10
* SHORT DESCRIPTION: * SHORT DESCRIPTION:
@@ -24,6 +19,17 @@
DEFINE('DEFAULT_ENCODING', "UTF-8"); DEFINE('DEFAULT_ENCODING', "UTF-8");
/************* PATHS *********************/ /************* PATHS *********************/
// ** NEW/BETTER DIR DECLARATIONS **
// path to original file (if symlink)
DEFINE('DIR', __DIR__."/");
// libs base path based on DIR
DEFINE('LIBDIR', DIR.'libs/');
// SMARTY path based on DIR
DEFINE('SMARTYDIR', DIR.'Smarty/');
// table arrays for Class Form
DEFINE('TABLEARRAYDIR', DIR.'table_arrays/');
// ** OLD DIR DECLARATIONS **
// path to document root // path to document root
DEFINE('ROOT', getcwd()."/"); DEFINE('ROOT', getcwd()."/");
// libs path // libs path
@@ -231,5 +237,30 @@
// any other global definitons here // any other global definitons here
// DEFINE('SOME_ID', <SOME VALUE>); // DEFINE('SOME_ID', <SOME VALUE>);
// $Id: config.template.inc 4382 2013-02-18 07:27:24Z gullevek $ // function that will be called on top of each class include to load the class
function _spl_autoload($include_file)
{
// where to search for the files to include
$dirs = array (
LIBDIR,
SMARTYDIR,
TABLEARRAYDIR,
'',
LIBS,
SMARTY,
TABLE_ARRAYS,
__DIR__.'/'.LIBS,
__DIR__.'/'.SMARTY
);
// try to find and load the class ifle
foreach ($dirs as $folder)
{
if (file_exists($folder.$include_file))
{
require_once($folder.$include_file);
return true;
}
}
return false;
}
?> ?>

View File

@@ -1442,6 +1442,19 @@
return $this->_crc32b($string); return $this->_crc32b($string);
} }
// METHOD: _hash
// PARAMS: string, type of hash to use
// RETURN: hashed string
// DESC : replacemend for _crc32b call (alternate)
// defaults to adler 32, fnv132, fnv1a32, joaat
// all that create 8 char long hashes
public function _hash($string, $hash_type = 'adler32')
{
if (!in_array($hash_type, array('adler32', 'fnv132', 'fnv1a32', 'joaat')))
$hash_type = 'adler32';
return hash($hash_type, $string);
}
// METHOD: checkPHPVersion // METHOD: checkPHPVersion
// PARAMS: $min_version: minimum version. in format x, x.y or x.y.z // PARAMS: $min_version: minimum version. in format x, x.y or x.y.z
// $max_version: default empty, else in same format as min version // $max_version: default empty, else in same format as min version