Commit Graph
100 Commits
Author SHA1 Message Date
Clemens Schwaighofer 9086196f7d Base transfer to namespace complete
All libraries have been transformed to namespace layout
2018-03-23 19:10:58 +09:00
Clemens Schwaighofer 5474ae2dda Namespace changes initial setup
* move all the libs into the correct folders
* libs folder is now called lib
* Smarty update to 3.1.30
* main config update with / is now set via core variable (dynamic)
2018-03-23 13:43:22 +09:00
Clemens Schwaighofer 5226fbcfc3 error reporting test 2018-03-14 15:36:42 +09:00
Clemens Schwaighofer 87b9af9786 PHP Notice warning fixes 2018-03-13 18:37:04 +09:00
Clemens Schwaighofer 7981e3ab51 Fix Class DB not init for dbh check on close db handler 2018-03-13 13:42:25 +09:00
Clemens Schwaighofer 21b9b99197 Minor white space clean up in login class and DB Array IO 2018-02-19 10:44:25 +09:00
Clemens Schwaighofer d9df0d64b8 Class DB IO, fix for trailing ; with RETURNING
If an INSERT query has no RETURNING but ; at the end, the RETURNING was
added after the ;

The ; is now stripped before adding RETURNING
2018-02-08 10:58:53 +09:00
Clemens Schwaighofer 73cdbe27c0 Fix JavaScript SetCenter 2018-02-08 10:45:48 +09:00
Clemens Schwaighofer 57b1aae9b4 Remove Smarty 3.1.21 folder 2017-12-07 14:23:49 +09:00
Clemens Schwaighofer 717962edc5 Bug fix for session name set in basic class, add info methods for l10n
The session name was never set correctly because it was not checked for
the define var, but for a normal variable in the basic session name
settings flow

The l10n class has two new return methods for lang and mofile to check
if the correct ones are set
2017-11-28 12:01:15 +09:00
Clemens Schwaighofer dc692f14e4 white space fixes 2017-11-24 16:49:45 +09:00
Clemens Schwaighofer 7a8fdcdf07 white space fixes for Form class 2017-11-24 13:22:20 +09:00
Clemens Schwaighofer a06320c42b white space fixes for Class DB IO 2017-11-24 13:20:28 +09:00
Clemens Schwaighofer f0ba8c3c50 email regex check update, remove warning surpress in pgsql wrapper, l10n
- l10n class has better mo file load check
- fix email regex for last part is now only on minimum 2 char check
- remove all @ warning surpress in the pgsql wrapper
2017-11-24 13:06:14 +09:00
Clemens Schwaighofer 2e85bf5ee8 Bug fix in DB IO for wrong db debug check
Some debug print checks were done wrong
2017-11-02 18:42:41 +09:00
Clemens Schwaighofer ff94efee8d Fix in class db io returning on insert
Skip add RETURNING on auto set if 'NULL' is set as a primary key.
On return, also run if count of returned ids is > 0 (so it actually runs
the extended return flow)
2017-11-02 17:04:43 +09:00
Clemens Schwaighofer 93f2cf9b73 DB IO Class: if not PK auto found, set to NULL to skip return
In case no primary key is set and the auto detect does not return a
primary key, set the primary key variable to 'NULL' string to trigger
skip in returning insert id flow.
2017-11-02 16:05:06 +09:00
Clemens Schwaighofer c39e48a709 Bug fix Class DB IO data write function
The data write function did not write data correctly if it was empty or
null. Especially for boolean ones when set 0 was set NULL and not 'f'.

This is fixed now.
Also filles MUST set not null fields with 0/'' but does not add missing
column to list yet
2017-10-24 16:51:21 +09:00
Clemens Schwaighofer 1cc010818d Fix DB IO write array method
Data was not written correctly in connection with boolean field types as
the "has default" was used as if a default value, but it is just a flag
IF it has a default value
2017-09-26 13:33:52 +09:00
Clemens Schwaighofer 1e164f3b93 Delete wrong symlink, remove create_function call
create_function call is deprecated with PHP 7.2, so creat_function is
replaced by the correct anonymous function call for it
2017-09-11 14:28:47 +09:00
Clemens Schwaighofer 9f7ab65a15 Update Basic, DB IO, Login class
- DB IO: update the write data method to update data that is empty (aka
null) and not skip it (aka never unset data)
- Basic: add date time compare method based on strtotime
- Login: ACL for page level check if array is set before setting
anything
2017-09-07 18:24:52 +09:00
Clemens Schwaighofer c69607323a Class DB IO update for db write
on UPDATE check if field is bool and then force write for unfilled (not
set) data
2017-09-04 19:02:20 +09:00
Clemens Schwaighofer 13a7900bd6 fix globals set check 2017-07-28 18:08:17 +09:00
Clemens Schwaighofer dc94fa1cd5 PG class updates, basic class updates
In basic class, do SET_SESSION_NAME check with isset to avoid notice log
entries.

Change log/error return for execute data error

base postgresql calss calls set the last run query on error if no result
is returned for prepare and execute
2017-07-28 15:52:37 +09:00
Clemens Schwaighofer fd191877cd Fix for not showing progress bar with single progress bar 2017-06-05 16:48:19 +09:00
Clemens Schwaighofer 65a5785ce5 Changed progress bar buffer clear
- send initial big buffer clear
- then do just flush/ob_flush
2017-04-13 14:52:07 +09:00
Clemens Schwaighofer adcfaf5fa0 Progress bar class: centralize buffer clear method
Because browsers buffer size increased again I centralized the buffer
clear flow.

It now sends a 1024*256 bytes empty string before it runs an ob_flush
and flush call.

This should work with most browsers out there. Tested on macOS
firefox/safari/chrome
2017-04-13 14:28:43 +09:00
Clemens Schwaighofer f7685463b4 error log ID settings added via global define
A global define for LOG_FILE_ID before any class is initialized (or any
place later allowed too) will add a sub id to the error_msg log file
before any other (level, class, etc) id.

This can be used to easily split between frontend and backend logs or
logs for a certain page without using pagename (eg to group all ajax
logs into one)
2017-04-11 10:25:07 +09:00
Clemens Schwaighofer dd92fa6031 Do not auto return PK for edit log insert in Admin Backend class 2017-04-07 11:07:05 +09:00
Clemens Schwaighofer 6606f30ceb Basic date compare fix
The date compare now uses correct preg_split for splitting with - and /
as date separators
2017-04-03 17:52:49 +09:00
Clemens Schwaighofer e1255e0872 DB IO: prepare pk null fix, split -> explode in Basic
- Basic class still had a "split" call -> change that to explode
- The prepare DB IO part missed setting pk name for the cursor to null
so no returning is assumed
2017-04-03 17:46:06 +09:00
Clemens Schwaighofer 5c53621f96 Update DB IO to skip returning on prepare statements
Same as normal exec if pk name is set to NULL
2017-04-03 17:38:33 +09:00
Clemens Schwaighofer 581518963b Fix bug in prepared statement returning ID
The wrong direct insert id primary key was used, not the statement based
one
2017-04-03 14:58:10 +09:00
Clemens Schwaighofer 23735eba92 add datepickr, update frontend default templates 2017-03-31 15:32:27 +09:00
Clemens Schwaighofer 9eb78f40fd Warning in DB IO if we couldn't get any return PK 2017-03-31 15:28:36 +09:00
Clemens Schwaighofer f599033a38 Bug fixes for unique per run logging 2017-03-17 14:50:58 +09:00
Clemens Schwaighofer 61f1b92bad Make per run log flag in Class Basic 2017-03-17 14:24:48 +09:00
Clemens Schwaighofer 1dfe246e0f Remove print_r on multiple returning data warning 2017-03-15 14:04:25 +09:00
Clemens Schwaighofer d64e40ca2c Second fix for returning with multiple entries in DB IO
- all data stored in array (size contrain needs to be checked)
- allows any returning data
- only named rows are returned (no numbers for column access)
- if multiple rows then insert_id is an array with the return data
- if single row the insert_id holds the PK, and insert_id_ext holds
extended data if exists
2017-03-14 15:19:31 +09:00
Clemens Schwaighofer 6810c030e8 Removed not needed insert_id_r array 2017-03-14 13:35:35 +09:00
Clemens Schwaighofer d7a6abd5b9 Class DB IO: multiple insert returning now works
If an INSERT had multiple inserts (values) the returning only returned
the first one and never the other ones.

This is fxed now.

If only ONE. then insert_id is scalar, else it is an array with all the
data in a flat array
2017-03-14 13:33:04 +09:00
Clemens Schwaighofer 2a2221af31 Remove old not used max_filesize var for log split 2017-03-07 15:01:06 +09:00
Clemens Schwaighofer 03be3a317f Change the logging file name set
The date part is not set external, but internal via a flag.
The file name extension cannot be set anymore and the file_name_ext has
been removed and is now log_file_name_ext and privte.

This is a drop in solution and can be used with previous settings.

Changes that should be done:
Class.Login: remove the file name ext and replace it with log_per_class
= 1
Remove all file_name_ext entries as they area not needed anymore
2017-02-22 10:18:53 +09:00
Clemens Schwaighofer bdcd83c579 Generic table update 2017-02-16 10:29:50 +09:00
Clemens Schwaighofer f4f84bdd67 Bug fixes for l10 and login 2016-12-01 16:54:51 +09:00
Clemens Schwaighofer 86535c23f1 Bug fixes for Thumbnail PDF creation part 2016-10-21 23:18:30 +09:00
Clemens Schwaighofer 5d146c1dfd toggle db debug flag after general setting 2016-10-17 12:07:54 +09:00
Clemens Schwaighofer 82ca78d8b3 Thumbnail create: pre-work for PDF file convert 2016-10-14 10:25:28 +09:00
Clemens Schwaighofer 55f35868bd Add clear cache override to CreateThumbenail method 2016-09-28 18:19:46 +09:00
Clemens Schwaighofer e0805c9dc6 Update jquery to 3.x release 2016-09-21 17:07:44 +09:00
Clemens Schwaighofer a2129f91c5 White space fixes 2016-08-31 15:20:40 +09:00
Clemens Schwaighofer adf46f620b Update class basic, bug fixes for acl unit set in login class
class basic has a simple date string format method. returns Y-m-d h:i:s
for a trimestring, optional microseconds too
bug fix for unit/edit access id check in login class
2016-08-27 13:28:42 +09:00
Clemens Schwaighofer 31bef7a531 Add default space in byte string format, only read enable ea data
read only enabled edit access data fields
add default space between the converted byte data and the label
2016-08-02 14:38:23 +09:00
Clemens Schwaighofer 20b134231e Update description for edit access data return method 2016-07-20 10:57:29 +09:00
Clemens Schwaighofer 236a415fb4 Add get edit access data value for edit access id/key pair 2016-07-20 10:56:36 +09:00
Clemens Schwaighofer 1551df058d Bug fix for Login class and read sub data for edit access block 2016-07-19 16:44:21 +09:00
Clemens Schwaighofer f980b1e76a Bug fix: did not add new sub data entries if there are no entries
If we load data that has no sub data referenced the list was not created
2016-07-19 16:14:41 +09:00
Clemens Schwaighofer 8de868fe4a Add new direct reference data element list to edit page
An edit page can have a new type of reference data type that is not a
link between table A and main table, but a sub table to main table with
several text fields + enable field.
This sub field list can have a max set, that adds empty rows to keep max
empty list available.
The sub table filed does not need a read_data element as the read is
directly connected to the master table (uses the elemen list key name
for table and the elements as read fields).
This sub elements need to have at least one as type = text and can have
error check addded (currently unique and alphanumeric work).

Also fix all old addslashes to correct db_escape_string

Read in for reference list also can have multiple elements (read data ->
name | seperated)

All sub reads have element prefixes

Inline documentation update
2016-07-19 15:12:43 +09:00
Clemens Schwaighofer a20df16c2c Add enable field to edit access data 2016-07-15 17:31:40 +09:00
Clemens Schwaighofer 939ff2e4a5 Update Login Class with correct acl method and edit access data read
edit access data is read and put into the unit (edit access) array
the base acl method is adjusted to the current simple flat array one
- base acl only
- no max anymore (never needed)
- page acl
- unit (edit access) acl list + detail data
2016-07-15 16:17:40 +09:00
Clemens Schwaighofer 1c3cc95fdb Update form class and edit access table array
Form class has new check part for alpha numeric with spaces called
"alphanumericspace".

edit access table array gets update for making color no longer mandatory
(almost never used).
And adds alpha numeric with spaces and unique check for the name.
2016-07-15 11:40:42 +09:00
Clemens Schwaighofer 115e9ad700 Add edit access automatic UID set psql function
Trigger that gets called when edit access table is insert or update
called.

UID is set by removing all white spaces.
Original name set is already checked for Alphanumeric with spaces and
unique check.

On Insert always set UID.
On Update only set if UID is not set yet.
2016-07-15 11:37:45 +09:00
Clemens Schwaighofer 3aaa9b3f0d Remove old SVN $id$, add edit_access_data table
edit_access_data table can hold name/value pairs for additional info in
the access group
2016-07-15 10:13:29 +09:00
Clemens Schwaighofer 799cff4e00 Update config base files 2016-07-12 17:55:10 +09:00
Clemens Schwaighofer 72ef4a24c5 Check in neutral config.inc file before we set it to update ignore 2016-07-12 17:42:54 +09:00
Clemens Schwaighofer 0f44aaf3e4 Update config.inc file 2016-07-12 17:37:58 +09:00
Clemens Schwaighofer 795f69050a 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
2016-07-12 10:44:53 +09:00
Clemens Schwaighofer 1c5bb8aebe Make db debug var public 2016-06-14 13:22:08 +09:00
Clemens Schwaighofer 36f19e64d0 Add new correct mobile email detect 2016-05-17 12:22:36 +09:00
Clemens Schwaighofer 19a1081197 Add missing mobile domains, fixup pc naming
PC type is now pc_html
pc is only for simple
2016-05-16 15:46:26 +09:00
Clemens Schwaighofer 45974a9e30 Set detailed japanese mobile phone carrier types 2016-05-12 14:20:51 +09:00
Clemens Schwaighofer f1247efd34 Fix class declarations
old class declarations for constructors replaced with correct
"__construct" part.
2016-03-14 11:59:42 +09:00
Clemens Schwaighofer c38346b97c Comment update 2016-02-22 11:03:09 +09:00
Clemens Schwaighofer 3c26adb493 Smarty 3.1 fix for options html 2016-01-25 16:16:36 +09:00
Clemens Schwaighofer 4458f366f9 Bug fixes for data insert with interval fields in form generate
- if interval is emtpy set NULL
- do some clean up for pk return data from the form/db array io part
2016-01-07 13:06:47 +09:00
Clemens Schwaighofer 805330638a Bug fix in DB IO for setting _db_error public
_db_error method was private, but was called in DB.Array.IO, so it had
to be set public again.

removed debug message from Form Generate class
2016-01-07 12:44:05 +09:00
Clemens Schwaighofer 86cd04f862 Fix bug in regex check in form generate 2016-01-07 12:40:05 +09:00
Clemens Schwaighofer a182834985 Remove old SVN $id from edit new template 2016-01-06 11:19:05 +09:00
Clemens Schwaighofer 0ce1432513 Bug fix for spl autoload table array part
arrays cannot be loaded with the auto load method, fallback to old load
method
2016-01-05 18:36:26 +09:00
Clemens Schwaighofer a447fc2ef6 Update auto set for HTML title, PHP 7.0 class fixes
Auto append current page file name to the HTML auto title.

Fix class declaration in gettext reader for PHP 7.0
2015-12-16 11:08:51 +09:00
Clemens Schwaighofer 8160d05d25 Add HTML print date+time method
Function prints out HTML date time method with auto javacsript adjust
for leap years, month day length, etc.
2015-11-16 10:17:55 +09:00
Clemens Schwaighofer 647dd52c92 Remove all include/require parts from classes and use autoload function
Any include or require call is removed and now we use only _spl_autoload
in any class external file include call.
There are three new _DIR vars: LIBDIR, SMARTYDIR, TABLEARRAYDIR that are
based on the __DIR__ and not current working directory.
2015-11-11 14:19:25 +09:00
Clemens Schwaighofer b2fdbc0571 Better autoload for required files
Add autoload function to main config file.
Add better DIR declarations in config file based on __DIR__ for libs &
smarty classes.
Load all class files with the new autoload function in header & direct
file calls.
2015-11-11 14:14:06 +09:00
Clemens Schwaighofer 5a1c9f87c2 Update core class include style and smarty test page
All libs/classes have an loop to find the needed previous class file.
Smarty test page included.
2015-11-11 11:08:41 +09:00
Clemens Schwaighofer aa73634d95 Update Smarty to 3.1.27 2015-11-09 18:22:56 +09:00
Clemens Schwaighofer b831924f58 Add override string for sha1 short function to use sha1 instead of crc32b wrapper 2015-11-06 16:53:55 +09:00
Clemens Schwaighofer ae1ef182ef Update Core libs to avoid notice errors, add debug override switch
$DEBUG_ALL_OVERRIDE added to not override the set
$DEBUG_ALL/$PRINT_ALL/etc switches on one script.

Fix various notice bugs on very strict PHP setups.
2015-11-06 11:43:01 +09:00
Clemens Schwaighofer d67a4231c3 Add README file 2015-10-29 18:18:32 +09:00
Clemens Schwaighofer 64dbe31898 TimeString function: remove leading 0 for microseconds 2015-10-28 18:41:12 +09:00
Clemens Schwaighofer 75c809381a TimeString format: Return micro time if all other data is emtpy
If micro time is off, but we have no other data, then return the micro
time or 0 ms if none
2015-10-21 16:26:31 +09:00
Clemens Schwaighofer 6e81dc5f33 Add soba.tokyo.tequila.jp as db connect host 2015-09-18 10:41:19 +09:00
Clemens Schwaighofer c4c3b68ec7 Update core SQL tables with correct default time
now() has been replaced with clock_timestamp() to get accurarte create
date and update date on multiple updates
2015-09-09 13:52:50 +09:00
Clemens Schwaighofer b4d9b061af Check that db execute data is in array format
For prepared query, check that the data is in array format
2015-06-16 13:44:05 +09:00
Clemens Schwaighofer 947497767d Update to debug javascript
Set debug javascript flag in header inc and then set the variable in the
main body templates
2015-04-24 11:06:16 +09:00
Clemens Schwaighofer 57fb0b808d Add debug and firebug javascript to all main templates
debug has flag to turn off all console.* methods
firebug has override if console.* are missing
2015-04-24 10:16:48 +09:00
Clemens Schwaighofer 2f27bd1537 Add proper sync file template 2015-03-26 11:34:01 +09:00
Clemens Schwaighofer 474d6810f4 JQuery library update, class test update
Add test for time to string and string to time convert functions
2015-03-26 11:26:39 +09:00
Clemens Schwaighofer 54521c0e2d Add missing documentation for new string to time method 2015-03-12 10:32:17 +09:00
Clemens Schwaighofer 0dc53ee214 Add reverse time string convert method
StringTime converts a TimeStringFormat string back to a timestamp
2015-03-12 10:30:15 +09:00
Clemens Schwaighofer c1dca67176 Update to core classes, see detail below
- config.inc: add define for show/not show all errors when parsning
  through Error.Handling.inc with SHOW_ALL_ERRORS
- Error.Handling.inc: check php error level and do not show ones that
  are not flagged unless SHOW_ALL_ERRORS is set to true
- db_pgsql.inc for fetch array, call the internal wrapper method, not
  the pg method directly
- db_pgsql_pdo.inc: test insert for alternative with pdo lib instead of
  php internal postgresql interface
- Class.DB.IO.inc: on prepared check if cursor exist before returing
  inserted id in INSERT queries. fail if no insert id could be aquired
  if there was no cursor (or other error)
- Class.Basic.inc: rewrite Time to string method for speed up and
  removal of old php microtime format
2015-03-05 16:59:05 +09:00