Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
799cff4e00 | ||
|
|
72ef4a24c5 | ||
|
|
0f44aaf3e4 | ||
|
|
795f69050a | ||
|
|
1c5bb8aebe | ||
|
|
36f19e64d0 | ||
|
|
19a1081197 | ||
|
|
45974a9e30 | ||
|
|
f1247efd34 | ||
|
|
c38346b97c | ||
|
|
3c26adb493 | ||
|
|
4458f366f9 | ||
|
|
805330638a | ||
|
|
86cd04f862 |
@@ -230,6 +230,8 @@
|
||||
$elements[] = $form->form_create_element("password");
|
||||
$elements[] = $form->form_create_element("password_change_interval");
|
||||
$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_access_right_id");
|
||||
$elements[] = $form->form_create_element("strict");
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
$edit_users = array (
|
||||
"table_array" => array (
|
||||
"edit_user_id" => array (
|
||||
"value" => $GLOBALS["edit_user_id"],
|
||||
"value" => $GLOBALS["edit_user_id"],
|
||||
"type" => "hidden",
|
||||
"pk" => 1,
|
||||
"int" => 1
|
||||
),
|
||||
"username" => array (
|
||||
"value" => $GLOBALS["username"],
|
||||
"output_name" => "Username",
|
||||
"mandatory" => 1,
|
||||
"value" => $GLOBALS["username"],
|
||||
"output_name" => "Username",
|
||||
"mandatory" => 1,
|
||||
"error_check" => "unique|alphanumericextended",
|
||||
"type" => "text"
|
||||
),
|
||||
"password" => array (
|
||||
"value" => $GLOBALS["password"],
|
||||
"value" => $GLOBALS["password"],
|
||||
"HIDDEN_value" => $GLOBALS["HIDDEN_password"],
|
||||
"CONFIRM_value" => $GLOBALS["CONFIRM_password"],
|
||||
"output_name" => "Password",
|
||||
"mandatory" => 1,
|
||||
"output_name" => "Password",
|
||||
"mandatory" => 1,
|
||||
"type" => "password", // later has to be password for encryption in database
|
||||
'update' => array ( // connected field updates, and update data
|
||||
'password_change_date' => array ( // db row to update
|
||||
@@ -34,17 +34,18 @@
|
||||
'output_name' => 'Password change interval',
|
||||
'error_check' => 'intervalshort', // can be any date length format. n Y/M/D [not H/M/S], only one set, no combination
|
||||
'type' => 'text',
|
||||
'interval' => 1, // interval needs NULL write for empty
|
||||
'size' => 5, // make it 5 chars long
|
||||
'length' => 5
|
||||
),
|
||||
// password reset force interval, if set, user needs to reset password after X time period
|
||||
"enabled" => array (
|
||||
"value" => $GLOBALS["enabled"],
|
||||
"output_name" => "Enabled",
|
||||
"type" => "binary",
|
||||
"value" => $GLOBALS["enabled"],
|
||||
"output_name" => "Enabled",
|
||||
"type" => "binary",
|
||||
"int" => 1,
|
||||
"element_list" => array (
|
||||
"1" => "Yes",
|
||||
"1" => "Yes",
|
||||
"0" => "No"
|
||||
)
|
||||
),
|
||||
@@ -79,28 +80,38 @@
|
||||
)
|
||||
),
|
||||
"debug" => array (
|
||||
"value" => $GLOBALS["debug"],
|
||||
"output_name" => "Debug",
|
||||
"type" => "binary",
|
||||
"value" => $GLOBALS["debug"],
|
||||
"output_name" => "Debug",
|
||||
"type" => "binary",
|
||||
"int" => 1,
|
||||
"element_list" => array (
|
||||
"1" => "Yes",
|
||||
"1" => "Yes",
|
||||
"0" => "No"
|
||||
)
|
||||
),
|
||||
"db_debug" => array (
|
||||
"value" => $GLOBALS["db_debug"],
|
||||
"output_name" => "DB Debug",
|
||||
"type" => "binary",
|
||||
"value" => $GLOBALS["db_debug"],
|
||||
"output_name" => "DB Debug",
|
||||
"type" => "binary",
|
||||
"int" => 1,
|
||||
"element_list" => array (
|
||||
"1" => "Yes",
|
||||
"1" => "Yes",
|
||||
"0" => "No"
|
||||
)
|
||||
),
|
||||
"email" => array (
|
||||
"value" => $GLOBALS["email"],
|
||||
"output_name" => "E-Mail",
|
||||
"value" => $GLOBALS["email"],
|
||||
"output_name" => "E-Mail",
|
||||
"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 (
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
/************* SESSION NAMES *************/
|
||||
// backend
|
||||
DEFINE('EDIT_SESSION_NAME', "ADMIN_SESSION_NAME");
|
||||
DEFINE('EDIT_SESSION_NAME', "<ADMIN SESSION NAME>");
|
||||
// frontend
|
||||
DEFINE('SESSION_NAME', "SESSION_NAME");
|
||||
DEFINE('SESSION_NAME', "<SESSION NAME>");
|
||||
|
||||
/************* LANGUAGE / ENCODING *******/
|
||||
DEFINE('DEFAULT_LANG', "en_utf8");
|
||||
@@ -34,7 +34,7 @@
|
||||
DEFINE('ROOT', getcwd()."/");
|
||||
// libs path
|
||||
DEFINE('LIBS', "libs/");
|
||||
// includes (strings, arrays for stati, etc)
|
||||
// includes (strings, arrays for static, etc)
|
||||
DEFINE('INCLUDES', "includes/");
|
||||
// layout base path
|
||||
DEFINE('LAYOUT', 'layout/');
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
/************* HASH / ACL DEFAULT / ERROR SETTINGS / SMARTY *************/
|
||||
// default hash type
|
||||
DEFINE('DEFAULT_HASH', 'ripemd160');
|
||||
DEFINE('DEFAULT_HASH', 'sha256');
|
||||
// default acl level
|
||||
DEFINE('DEFAULT_ACL_LEVEL', 80);
|
||||
// default levels for certain actions
|
||||
@@ -97,7 +97,7 @@
|
||||
DEFINE('DEFAULT_ACL_DEL', 80);
|
||||
DEFINE('DEFAULT_ACL_ADMIN', 100); */
|
||||
// SSL host name
|
||||
// DEFINE('SSL_HOST', "www4.adidas.co.jp");
|
||||
// DEFINE('SSL_HOST', "ssl.host.name");
|
||||
// error page strictness, Default is 3
|
||||
// 1: only show error page as the last mesure if really no mid & aid can be loaded and found at all
|
||||
// 2: if template not found, do not search, show error template
|
||||
@@ -106,7 +106,7 @@
|
||||
// DEFINE('ERROR_STRICT', 3);
|
||||
// allow page caching in general, set to "FALSE" if you do debugging or development!
|
||||
// DEFINE('ALLOW_SMARTY_CACHE', FALSE);
|
||||
// cache life time, in second', default here is 2 days (172800s)
|
||||
// cache life time, in seconds, default here is 2 days (172800s)
|
||||
// -1 is never expire cache
|
||||
// DEFINE('SMARTY_CACHE_LIFETIME', -1);
|
||||
|
||||
@@ -135,17 +135,23 @@
|
||||
// live_queue is a global queue system
|
||||
// DEFINE('QUEUE', 'live_queue');
|
||||
|
||||
/************* DB PATHS (PostgreSQL) *****************/
|
||||
// schema names, can also be defined per <DB INFO>
|
||||
DEFINE('PUBLIC_SCHEMA', 'public');
|
||||
DEFINE('DEV_SCHEMA', 'public');
|
||||
DEFINE('TEST_SCHEMA', 'public');
|
||||
|
||||
// non constant part
|
||||
/************* DB ACCESS *****************/
|
||||
// please be VERY carefull only to change the right side
|
||||
$DB_CONFIG = array(
|
||||
"test" => array (
|
||||
"db_name" => "gullevek",
|
||||
"db_user" => "gullevek",
|
||||
"db_pass" => "gullevek",
|
||||
"db_host" => "db.tokyo.tequila.jp",
|
||||
"<db id>" => array (
|
||||
"db_name" => "<database>",
|
||||
"db_user" => "<user>",
|
||||
"db_pass" => "<password>",
|
||||
"db_host" => "<host>",
|
||||
"db_port" => "5432",
|
||||
"db_schema" => "public",
|
||||
"db_schema" => "public", // if not set, uses public
|
||||
"db_type" => "pgsql",
|
||||
"db_encoding" => '',
|
||||
"db_ssl" => 'disable' // allow, disable, require, prefer
|
||||
@@ -160,27 +166,19 @@
|
||||
|
||||
// each host has a different db_host
|
||||
// development host
|
||||
$DB_HOST['soba'] = "test";
|
||||
$DB_HOST['soba.tokyo.tequila.jp'] = "test";
|
||||
$DB_HOST['<host>'] = "<db id>";
|
||||
// target host (live)
|
||||
// $DB_TARGET_HOST['soba'] = "<DB ID>";
|
||||
// $DB_TARGET_HOST['<host>'] = "<DB ID>";
|
||||
// url redirect database
|
||||
// $DB_URL_REDIRECT_HOST['soba'] = "<DB ID>";
|
||||
// $DB_URL_REDIRECT_HOST['<host>'] = "<DB ID>";
|
||||
// location flagging
|
||||
// test/dev/live
|
||||
$LOCATION['soba'] = 'test';
|
||||
$LOCATION['soba.tokyo.tequila.jp'] = 'test';
|
||||
$LOCATION['<host>'] = '<test|live|remote|etc>';
|
||||
// show DEBUG override
|
||||
// true/false
|
||||
$DEBUG_FLAG['soba'] = true;
|
||||
$DEBUG_FLAG['soba.tokyo.tequila.jp'] = true;
|
||||
// schema names, can also be defined per <DB INFO>
|
||||
DEFINE('PUBLIC_SCHEMA', 'public');
|
||||
DEFINE('DEV_SCHEMA', 'public');
|
||||
DEFINE('TEST_SCHEMA', 'public');
|
||||
// and set to domain
|
||||
$DB_PATH['soba'] = PUBLIC_SCHEMA;
|
||||
$DB_PATH['soba.tokyo.tequila.jp'] = PUBLIC_SCHEMA;
|
||||
$DEBUG_FLAG['<host>'] = true;
|
||||
// set postgresql paths (schemas)
|
||||
$DB_PATH['<host>'] = PUBLIC_SCHEMA;
|
||||
|
||||
// set the USE_DATABASE var, if there is nothing set, we assume TRUE
|
||||
$USE_DATABASE = defined('USE_DATABASE') ? USE_DATABASE : true;
|
||||
@@ -206,7 +204,7 @@
|
||||
// DEFINE('TEST_SCHEMA', $DB_CONFIG[MAIN_DB]['db_schema']);
|
||||
// DEFINE('PUBLIC_SCHEMA', $DB_CONFIG[TARGET_DB]['db_schema']);
|
||||
DEFINE('LOGIN_DB_SCHEMA', 'public'); // where the edit* tables are
|
||||
DEFINE('GLOBAL_DB_SCHEMA', 'public'); // where global tables are that are used by all schemas (eg queue tables for online', etc)
|
||||
DEFINE('GLOBAL_DB_SCHEMA', 'public'); // where global tables are that are used by all schemas (eg queue tables for online, etc)
|
||||
DEFINE('TARGET', $LOCATION[$HOST_NAME]);
|
||||
// DEFINE('CSV_PATH', $PATHS[TARGET]['csv_path']);
|
||||
// DEFINE('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin']);
|
||||
@@ -258,12 +256,12 @@
|
||||
{
|
||||
// where to search for the files to include
|
||||
$dirs = array (
|
||||
LIBDIR,
|
||||
LIBDIR,
|
||||
SMARTYDIR,
|
||||
TABLEARRAYDIR,
|
||||
'',
|
||||
LIBS,
|
||||
SMARTY,
|
||||
LIBS,
|
||||
SMARTY,
|
||||
TABLE_ARRAYS,
|
||||
__DIR__.'/'.LIBS,
|
||||
__DIR__.'/'.SMARTY
|
||||
@@ -279,5 +277,4 @@
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -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)
|
||||
* CREATED: 2003/06/10
|
||||
* SHORT DESCRIPTION:
|
||||
@@ -24,11 +19,22 @@
|
||||
DEFINE('DEFAULT_ENCODING', "UTF-8");
|
||||
|
||||
/************* PATHS *********************/
|
||||
// path to document root
|
||||
// ** 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 of file called
|
||||
DEFINE('ROOT', getcwd()."/");
|
||||
// libs path
|
||||
DEFINE('LIBS', "libs/");
|
||||
// includes (strings', arrays for stati, etc)
|
||||
// includes (strings, arrays for static, etc)
|
||||
DEFINE('INCLUDES', "includes/");
|
||||
// layout base path
|
||||
DEFINE('LAYOUT', 'layout/');
|
||||
@@ -79,7 +85,7 @@
|
||||
|
||||
/************* HASH / ACL DEFAULT / ERROR SETTINGS / SMARTY *************/
|
||||
// default hash type
|
||||
DEFINE('DEFAULT_HASH', 'ripemd160');
|
||||
DEFINE('DEFAULT_HASH', 'sha256');
|
||||
// default acl level
|
||||
DEFINE('DEFAULT_ACL_LEVEL', 80);
|
||||
// default levels for certain actions
|
||||
@@ -91,7 +97,7 @@
|
||||
DEFINE('DEFAULT_ACL_DEL', 80);
|
||||
DEFINE('DEFAULT_ACL_ADMIN', 100); */
|
||||
// SSL host name
|
||||
// DEFINE('SSL_HOST', "www4.adidas.co.jp");
|
||||
// DEFINE('SSL_HOST', "ssl.host.name");
|
||||
// error page strictness, Default is 3
|
||||
// 1: only show error page as the last mesure if really no mid & aid can be loaded and found at all
|
||||
// 2: if template not found, do not search, show error template
|
||||
@@ -129,6 +135,12 @@
|
||||
// live_queue is a global queue system
|
||||
// DEFINE('QUEUE', 'live_queue');
|
||||
|
||||
/************* DB PATHS (PostgreSQL) *****************/
|
||||
// schema names, can also be defined per <DB INFO>
|
||||
DEFINE('PUBLIC_SCHEMA', 'public');
|
||||
DEFINE('DEV_SCHEMA', 'public');
|
||||
DEFINE('TEST_SCHEMA', 'public');
|
||||
|
||||
// non constant part
|
||||
/************* DB ACCESS *****************/
|
||||
// please be VERY carefull only to change the right side
|
||||
@@ -139,8 +151,9 @@
|
||||
"db_pass" => "<DB PASSWORD>",
|
||||
"db_host" => "<DB HOST>",
|
||||
"db_port" => "5432",
|
||||
"db_schema" => "<DB SCHEMA>",
|
||||
"db_schema" => "<DB SCHEMA>", // if not set, uses public
|
||||
"db_type" => "pgsql",
|
||||
"db_encoding" => '',
|
||||
"db_ssl" => 'disable' // allow, disable, require, prefer
|
||||
)
|
||||
);
|
||||
@@ -160,15 +173,11 @@
|
||||
// $DB_URL_REDIRECT_HOST['<HOST NAME>'] = "<DB ID>";
|
||||
// location flagging
|
||||
// test/dev/live
|
||||
$LOCATION['<HOST NAME>'] = 'test';
|
||||
$LOCATION['<HOST NAME>'] = '<test|live|remote|etc>';
|
||||
// show DEBUG override
|
||||
// true/false
|
||||
$DEBUG_FLAG['<HOST NAME>'] = true;
|
||||
// schema names, can also be defined per <DB INFO>
|
||||
DEFINE('PUBLIC_SCHEMA', 'public');
|
||||
DEFINE('DEV_SCHEMA', 'public');
|
||||
DEFINE('TEST_SCHEMA', 'public');
|
||||
// and set to domain
|
||||
// set postgresql paths (schemas)
|
||||
$DB_PATH['<HOST NAME>'] = PUBLIC_SCHEMA;
|
||||
|
||||
// set the USE_DATABASE var, if there is nothing set, we assume TRUE
|
||||
@@ -201,6 +210,7 @@
|
||||
// DEFINE('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin']);
|
||||
// DEFINE('REDIRECT_URL', $PATHS[TARGET]['redirect_url']);
|
||||
DEFINE('DEBUG', $DEBUG_FLAG[$HOST_NAME]);
|
||||
DEFINE('SHOW_ALL_ERRORS', false); // show all errors if debug_all & show_error_handling are enabled
|
||||
|
||||
/************* GENERAL PAGE TITLE ********/
|
||||
$G_TITLE = '<OVERALL PAGE TITLE>';
|
||||
@@ -228,8 +238,43 @@
|
||||
}
|
||||
}
|
||||
|
||||
// turn off debug if debug flag is OFF
|
||||
if (DEBUG == false)
|
||||
{
|
||||
$ECHO_ALL = 0;
|
||||
$DEBUG_ALL = 0;
|
||||
$PRINT_ALL = 0;
|
||||
$DB_DEBUG = 0;
|
||||
$ENABLE_ERROR_HANDLING = 0;
|
||||
}
|
||||
|
||||
// any other global definitons here
|
||||
// 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;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -247,23 +247,68 @@
|
||||
);
|
||||
// the array with the mobile types that are valid
|
||||
$this->mobile_email_type = array (
|
||||
'.*@docomo\.ne\.jp$' => 'docomo',
|
||||
'.*@([a-z0-9]{2}\.)?ezweb\.ne\.jp$' => 'kddi_ezweb', # correct are a[2-4], b2, c[1-9], e[2-9], h[2-4], t[1-9]
|
||||
'.*@(ez[a-j]{1}\.)?ido\.ne\.jp$' => 'kddi', # ez[a-j] or nothing
|
||||
'.*@([a-z]{2}\.)?sky\.tu-ka\.ne\.jp$' => 'kddi_tu-ka', # (sky group)
|
||||
'.*@([a-z]{2}\.)?sky\.tk[kc]{1}\.ne\.jp$' => 'kddi_sky', # (sky group) [tkk,tkc only]
|
||||
'.*@([a-z]{2}\.)?sky\.dtg\.ne\.jp$' => 'kddi', # dtg (sky group)
|
||||
'.*@[tkdhcrnsq]{1}\.vodafone\.ne\.jp$' => 'softbank', # old vodafone [t,k,d,h,c,r,n,s,q]
|
||||
'.*@jp-[dhtkrsnqc]{1}\.ne\.jp$' => 'softbank', # very old j-phone (pre vodafone) [d,h,t,k,r,s,n,q,c]
|
||||
'.*@([dhtcrknsq]{1}\.)?softbank\.ne\.jp$' => 'softbank', # add i for iphone also as keitai, others similar to the vodafone group
|
||||
'.*@i{1}\.softbank(\.ne)?\.jp$' => 'softbank_iphone', # add iPhone also as keitai and not as pc
|
||||
'.*@disney\.ne\.jp$' => 'softbank_disney', # (kids)
|
||||
'.*@willcom\.ne\.jp$' => 'willcom',
|
||||
'.*@willcom\.com$' => 'willcom', # new for pdx.ne.jp address
|
||||
'.*@pdx\.ne\.jp$' => 'willcom', # old pdx address for willcom
|
||||
'.*@bandai\.jp$' => 'willcom', # willcom paipo! (kids)
|
||||
'.*@pipopa\.ne\.jp$' => 'willcom', # willcom paipo! (kids)
|
||||
'.*@([a-z0-9]{2,4}\.)?pdx\.ne\.jp$' => 'willcom' # actually only di,dj,dk,wm -> all others are "wrong", but none also allowed?
|
||||
'.*@docomo\.ne\.jp$' => 'keitai_docomo',
|
||||
'.*@([a-z0-9]{2}\.)?ezweb\.ne\.jp$' => 'keitai_kddi_ezweb', # correct are a[2-4], b2, c[1-9], e[2-9], h[2-4], t[1-9]
|
||||
'.*@(ez[a-j]{1}\.)?ido\.ne\.jp$' => 'keitai_kddi_ido', # ez[a-j] or nothing
|
||||
'.*@([a-z]{2}\.)?sky\.tu-ka\.ne\.jp$' => 'keitai_kddi_tu-ka', # (sky group)
|
||||
'.*@([a-z]{2}\.)?sky\.tk[kc]{1}\.ne\.jp$' => 'keitai_kddi_sky', # (sky group) [tkk,tkc only]
|
||||
'.*@([a-z]{2}\.)?sky\.dtg\.ne\.jp$' => 'keitai_kddi_dtg', # dtg (sky group)
|
||||
'.*@[tkdhcrnsq]{1}\.vodafone\.ne\.jp$' => 'keitai_softbank_vodafone', # old vodafone [t,k,d,h,c,r,n,s,q]
|
||||
'.*@jp-[dhtkrsnqc]{1}\.ne\.jp$' => 'keitai_softbank_j-phone', # very old j-phone (pre vodafone) [d,h,t,k,r,s,n,q,c]
|
||||
'.*@([dhtcrknsq]{1}\.)?softbank\.ne\.jp$' => 'keitai_softbank', # add i for iphone also as keitai, others similar to the vodafone group
|
||||
'.*@i{1}\.softbank(\.ne)?\.jp$' => 'smartphone_softbank_iphone', # add iPhone also as keitai and not as pc
|
||||
'.*@disney\.ne\.jp$' => 'keitai_softbank_disney', # (kids)
|
||||
'.*@willcom\.ne\.jp$' => 'keitai_willcom',
|
||||
'.*@willcom\.com$' => 'keitai_willcom', # new for pdx.ne.jp address
|
||||
'.*@wcm\.ne\.jp$' => 'keitai_willcom', # old willcom wcm.ne.jp
|
||||
'.*@pdx\.ne\.jp$' => 'keitai_willcom_pdx', # old pdx address for willcom
|
||||
'.*@bandai\.jp$' => 'keitai_willcom_bandai', # willcom paipo! (kids)
|
||||
'.*@pipopa\.ne\.jp$' => 'keitai_willcom_pipopa', # willcom paipo! (kids)
|
||||
'.*@([a-z0-9]{2,4}\.)?pdx\.ne\.jp$' => 'keitai_willcom_pdx', # actually only di,dj,dk,wm -> all others are "wrong", but none also allowed?
|
||||
'.*@ymobile([1]{1})?\.ne\.jp$' => 'keitai_willcom_ymobile', # ymobile, ymobile1 techincally not willcom, but I group them there
|
||||
'.*@y-mobile\.ne\.jp$' => 'keitai_willcom_ymobile', # y-mobile techincally not willcom, but I group them there
|
||||
'.*@emnet\.ne\.jp$' => 'keitai_willcom_emnet', # e-mobile, group will willcom
|
||||
'.*@emobile\.ne\.jp$' => 'keitai_willcom_emnet', # e-mobile, group will willcom
|
||||
'.*@emobile-s\.ne\.jp$' => 'keitai_willcom_emnet' # e-mobile, group will willcom
|
||||
);
|
||||
// short list for mobile email types
|
||||
$this->mobile_email_type_short = array (
|
||||
'keitai_docomo' => 'docomo',
|
||||
'keitai_kddi_ezweb' => 'kddi',
|
||||
'keitai_kddi' => 'kddi',
|
||||
'keitai_kddi_tu-ka' => 'kddi',
|
||||
'keitai_kddi_sky' => 'kddi',
|
||||
'keitai_softbank' => 'softbank',
|
||||
'smartphone_softbank_iphone' => 'iphone',
|
||||
'keitai_softbank_disney' => 'softbank',
|
||||
'keitai_softbank_vodafone' => 'softbank',
|
||||
'keitai_softbank_j-phone' => 'softbank',
|
||||
'keitai_willcom' => 'willcom',
|
||||
'keitai_willcom_pdx' => 'willcom',
|
||||
'keitai_willcom_bandai' => 'willcom',
|
||||
'keitai_willcom_pipopa' => 'willcom',
|
||||
'keitai_willcom_ymobile' => 'willcom',
|
||||
'keitai_willcom_emnet' => 'willcom',
|
||||
'pc_html' => 'pc',
|
||||
// old sets -> to be removed later
|
||||
'docomo' => 'docomo',
|
||||
'kddi_ezweb' => 'kddi',
|
||||
'kddi' => 'kddi',
|
||||
'kddi_tu-ka' => 'kddi',
|
||||
'kddi_sky' => 'kddi',
|
||||
'softbank' => 'softbank',
|
||||
'keitai_softbank_iphone' => 'iphone',
|
||||
'softbank_iphone' => 'iphone',
|
||||
'softbank_disney' => 'softbank',
|
||||
'softbank_vodafone' => 'softbank',
|
||||
'softbank_j-phone' => 'softbank',
|
||||
'willcom' => 'willcom',
|
||||
'willcom_pdx' => 'willcom',
|
||||
'willcom_bandai' => 'willcom',
|
||||
'willcom_pipopa' => 'willcom',
|
||||
'willcom_ymobile' => 'willcom',
|
||||
'willcom_emnet' => 'willcom',
|
||||
'pc' => 'pc'
|
||||
);
|
||||
|
||||
// initial the session if there is no session running already
|
||||
@@ -1397,6 +1442,19 @@
|
||||
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
|
||||
// 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
|
||||
@@ -1792,10 +1850,11 @@
|
||||
}
|
||||
|
||||
// METHOD: getEmailType
|
||||
// PARAMS: email
|
||||
// PARAMS: email, short == false
|
||||
// RETURN: string for email type, eg "pc", "docomo", etc
|
||||
// DESC: guesses the email type (mostly for mobile) from the domain
|
||||
public function getEmailType($email)
|
||||
// if second is set to true, it will return short naming scheme (only provider)
|
||||
public function getEmailType($email, $short = false)
|
||||
{
|
||||
// trip if there is no email address
|
||||
if (!$email)
|
||||
@@ -1804,10 +1863,27 @@
|
||||
foreach ($this->mobile_email_type as $email_regex => $email_type)
|
||||
{
|
||||
if (preg_match("/$email_regex/", $email))
|
||||
return $email_type;
|
||||
{
|
||||
if ($short)
|
||||
return $this->getShortEmailType($email_type);
|
||||
else
|
||||
return $email_type;
|
||||
}
|
||||
}
|
||||
// if no previous return we assume this is a pc address
|
||||
return "pc";
|
||||
if ($short)
|
||||
return "pc";
|
||||
else
|
||||
return "pc_html";
|
||||
}
|
||||
|
||||
// METHOD: getShortEmailType
|
||||
// PARAMS: long email type (not email)
|
||||
// RETURN: short email type
|
||||
// DESC : gets the short email type from a long email type
|
||||
public function getShortEmailType($email_type)
|
||||
{
|
||||
return $this->mobile_email_type_short[$email_type];
|
||||
}
|
||||
|
||||
// METHOD: printDateTime
|
||||
|
||||
@@ -429,6 +429,13 @@ $this->debug('write_check', "[$column][".$this->table_array[$column]["value"]."]
|
||||
$_value = $this->table_array[$column]["value"];
|
||||
$q_data .= $_value;
|
||||
}
|
||||
elseif ($this->table_array[$column]["interval"])
|
||||
{
|
||||
// for interval we check if no value, then we set null
|
||||
if (!$this->table_array[$column]["value"])
|
||||
$_value = 'NULL';
|
||||
$q_data .= $_value;
|
||||
}
|
||||
else
|
||||
// normal string
|
||||
{
|
||||
@@ -500,7 +507,10 @@ $this->debug('write_check', "[$column][".$this->table_array[$column]["value"]."]
|
||||
}
|
||||
// set primary key
|
||||
if ($insert)
|
||||
$this->ok = $this->table_array[$this->pk_name]["value"] = $this->insert_id;
|
||||
{
|
||||
$this->table_array[$this->pk_name]["value"] = $this->insert_id;
|
||||
$this->ok = $this->insert_id;
|
||||
}
|
||||
// return the table if needed
|
||||
return $this->table_array;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
// only inside
|
||||
// basic vars
|
||||
private $dbh; // the dbh handler
|
||||
private $db_debug; // DB_DEBUG ... (if set prints out debug msgs)
|
||||
public $db_debug; // DB_DEBUG ... (if set prints out debug msgs)
|
||||
private $db_name; // the DB connected to
|
||||
private $db_user; // the username used
|
||||
private $db_pwd; // the password used
|
||||
@@ -523,7 +523,8 @@
|
||||
// msg -> optional message
|
||||
// RETURN none
|
||||
// DESC if error_id set, writes long error string into error_msg
|
||||
private function _db_error($cursor = '', $msg = '')
|
||||
// MARK: needed to make public so it can be called from DB.Array.IO too
|
||||
public function _db_error($cursor = '', $msg = '')
|
||||
{
|
||||
$where_called = $this->get_caller_method();
|
||||
if ($cursor)
|
||||
|
||||
@@ -927,13 +927,13 @@
|
||||
break;
|
||||
case "alphanumeric":
|
||||
//$this->debug('edit', 'IN Alphanumeric');
|
||||
if (!preg_match("/^[0-9A-Za-z_-]+$/", $this->table_array[$key]["value"]))
|
||||
if (!preg_match("/^[0-9A-Za-z_\-]+$/", $this->table_array[$key]["value"]))
|
||||
$this->msg .= sprintf($this->l->__("Please enter a valid alphanumeric (Numbers and Letters only also - and _, no spaces) value for the <b>%s</b> Field!<br>"), $this->table_array[$key]["output_name"]);
|
||||
break;
|
||||
// this one also allows @ and .
|
||||
case "alphanumericextended":
|
||||
//$this->debug('edit', 'IN Alphanumeric');
|
||||
if (!preg_match("/^[0-9A-Za-z_-@\.]+$/", $this->table_array[$key]["value"]))
|
||||
if (!preg_match("/^[0-9A-Za-z_\-@\.]+$/", $this->table_array[$key]["value"]))
|
||||
$this->msg .= sprintf($this->l->__("Please enter a valid alphanumeric extended (Numbers, Letters, -, _, @ and . only, no spaces) value for the <b>%s</b> Field!<br>"), $this->table_array[$key]["output_name"]);
|
||||
break;
|
||||
case "password":
|
||||
@@ -1211,7 +1211,7 @@
|
||||
{
|
||||
// if a where was given, set this key also [dangerous!]
|
||||
|
||||
// posgres compatible insert
|
||||
// postgreSQL compatible insert
|
||||
$q = "INSERT INTO ".$this->table_array[$key]["table_name"]." (".$this->table_array[$key]["input_name"].") VALUES ('".addslashes($this->table_array[$key]["input_value"])."')";
|
||||
$this->db_exec($q);
|
||||
if ($this->table_array[$key]["where"])
|
||||
|
||||
@@ -49,7 +49,7 @@ class StringReader {
|
||||
var $_pos;
|
||||
var $_str;
|
||||
|
||||
function StringReader($str='') {
|
||||
function __construct($str='') {
|
||||
$this->_str = $str;
|
||||
$this->_pos = 0;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ class FileReader {
|
||||
var $_fd;
|
||||
var $_length;
|
||||
|
||||
function FileReader($filename) {
|
||||
function __construct($filename) {
|
||||
if (file_exists($filename)) {
|
||||
|
||||
$this->_length=filesize($filename);
|
||||
@@ -143,7 +143,7 @@ class FileReader {
|
||||
// Preloads entire file in memory first, then creates a StringReader
|
||||
// over it (it assumes knowledge of StringReader internals)
|
||||
class CachedFileReader extends StringReader {
|
||||
function CachedFileReader($filename) {
|
||||
function __construct($filename) {
|
||||
if (file_exists($filename)) {
|
||||
|
||||
$length=filesize($filename);
|
||||
|
||||
@@ -183,7 +183,7 @@ function smarty_function_html_options_optoutput($key, $value, $selected, $id, $c
|
||||
$idx ++;
|
||||
} else {
|
||||
$_idx = 0;
|
||||
$_html_result = smarty_function_html_options_optgroup($key, $value, $selected, !empty($id) ? ($id . '-' . $idx) : null, $class, $_idx);
|
||||
$_html_result = smarty_function_html_options_optgroup($key, $value, $selected, !empty($id) ? ($id . '-' . $idx) : null, $class, $label, $_idx);
|
||||
$idx ++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user