eaDB eaDB(
array
&$conf, [boolean
$debug = false]
)
|
|
constructor of database wrapper
defines the environmental db settings and starts session if not already done
Parameters:
array |
&$conf: |
configuration data |
boolean |
$debug: |
enable adobdb debug (false) |
boolean addUserToClient(
integer
$client, string
$user
)
|
|
add user to client
Parameters:
integer |
$client: |
client ID |
string |
$user: |
email address |
API Tags:
login validation
Parameters:
API Tags:
Return: | user data | false |
boolean createClient(
array
&$data, [array
$user = false], [
$demo = false]
)
|
|
create client
Parameters:
array |
&$data: |
client data |
array |
$user: |
optional user data |
|
$demo: |
|
API Tags:
boolean createUser(
string/array
$user, [string
$pw = '']
)
|
|
create user
Parameters:
string/array |
$user: |
username/userdata |
string |
$pw: |
password (optional if userdata) |
API Tags:
string decrypt(
string
$string, [string
$key = false]
)
|
|
decrypt string
Parameters:
string |
$string: |
string to decrypt |
string |
$key: |
key [dsn] |
API Tags:
boolean delete(
string
$table, [string/array
$where = '']
)
|
|
delete datasets
Parameters:
string |
$table: |
table |
string/array |
$where: |
conditions |
API Tags:
boolean deleteClient(
integer
$id
)
|
|
delete client
Parameters:
API Tags:
boolean deleteUser(
string
$user
)
|
|
delete user
Parameters:
API Tags:
boolean delUserClient(
integer
$client, integer
$user
)
|
|
remove user from client
Parameters:
integer |
$client: |
clientID |
integer |
$user: |
userID |
API Tags:
boolean drop(
string
$table
)
|
|
drop table
Parameters:
API Tags:
string encrypt(
string
$string, [string
$key = false]
)
|
|
encrypt string
Parameters:
string |
$string: |
string to encrypt |
string |
$key: |
key [dsn] |
API Tags:
checks for database error
API Tags:
string escape(
string
$string, [
$noQuote = false]
)
|
|
escape value string
Parameters:
string |
$string: |
string to escape |
|
$noQuote: |
|
API Tags:
string escapeKey(
string
$string
)
|
|
escape key string
Parameters:
string |
$string: |
string to escape |
API Tags:
array getClientConf(
integer
$id
)
|
|
get client configuration variables
Parameters:
API Tags:
Return: | configuration data |
get assigned clients
Parameters:
API Tags:
array getClientUsers(
integer
$id
)
|
|
get client users
Parameters:
API Tags:
array getSysConf(
string
0
)
|
|
get system configuration variables
Parameters:
API Tags:
Return: | configuration data |
get user configuration variables
API Tags:
Return: | configuration data |
boolean insert(
array
$what, string
$table
)
|
|
insert array into table
Parameters:
array |
$what: |
key => value |
string |
$table: |
table |
API Tags:
boolean isOwner(
integer
$id
)
|
|
checks if user is owner
Parameters:
API Tags:
boolean/string isUser(
string
$name, [
$get = 'name']
)
|
|
checks if user exists
Parameters:
string |
$name: |
username |
|
$get: |
|
API Tags:
get last inserted id
API Tags:
integer loadClientConf(
integer
$id
)
|
|
load client configuration into configuration variables
Parameters:
API Tags:
logout function
deletes session data
generate sql time string for current time
Parameters:
integer |
0: |
unix time stamp |
API Tags:
array select(
string
$what, [string
$table = ''], [string/array
$where = ''], [string
$order = ''], [integer
$rows = -1], [integer
$offset = -1], [string
$group = '']
)
|
|
select database rows
Parameters:
string |
$what: |
columns |
string |
$table: |
table |
string/array |
$where: |
conditions |
string |
$order: |
sorting |
integer |
$rows: |
number of rows |
integer |
$offset: |
offset |
string |
$group: |
group by |
API Tags:
array selectOne(
string
$what, [string
$table = ''], [string/array
$where = ''], [string
$order = '']
)
|
|
select one single database row
Parameters:
string |
$what: |
columns |
string |
$table: |
table |
string/array |
$where: |
conditions |
string |
$order: |
sorting |
API Tags:
boolean setPW(
string
$user, string
$pw
)
|
|
set password for user
Parameters:
string |
$user: |
username |
string |
$pw: |
password |
API Tags:
boolean switchToClientDB(
integer
$client
)
|
|
switch to client database - if necessary
Parameters:
integer |
$client: |
clientID |
API Tags:
string table(
string
$string
)
|
|
return real table name
Parameters:
string |
$string: |
preliminary table name |
API Tags:
string time(
integer
$time
)
|
|
generate sql time string from unix timestamp
Parameters:
integer |
$time: |
unix time stamp |
API Tags:
boolean update(
string/array
$what, string
$table, [string/array
$where = '']
)
|
|
update table
Parameters:
string/array |
$what: |
sql string / key => value |
string |
$table: |
table |
string/array |
$where: |
conditions |
API Tags:
boolean updateClient(
integer
$id, array
$data
)
|
|
update client
Parameters:
integer |
$id: |
clientID |
array |
$data: |
new client data |
API Tags:
boolean updateClientConf(
integer
$id, array
$changed
)
|
|
update client configuration
Parameters:
integer |
$id: |
client ID |
array |
$changed: |
changed configruration |
API Tags:
boolean updateSysConf(
array
$changed
)
|
|
update system configuration
Parameters:
array |
$changed: |
changed configruration |
API Tags:
boolean updateUser(
string
$oldUser, array
$userData, [boolean
$session = false]
)
|
|
update user
Parameters:
string |
$oldUser: |
old user |
array |
$userData: |
new userdata |
boolean |
$session: |
change session |
API Tags:
boolean updateUserConf(
integer
$userID, array
$changed
)
|
|
update user configuration
Parameters:
integer |
$userID: |
user ID |
array |
$changed: |
changed configruration |
API Tags: