\plan_admin

Plan admin backend

Summary

Methods
Properties
Constants
__construct()
check_table_exist()
install()
get_new_record_id()
num2alpha()
main()
checkUniquety()
get_app_title_bar()
mass_delete_data()
mass_change_param()
load_by_id()
delete_data()
grid()
add_data()
set_imgs()
get_imgs()
edit_data()
check_data()
getTopMenu()
get_form()
set_apps_template()
getSteps()
_preload()
SiteBill()
getCurrentLang()
getRealtyHREF()
_getGridConstructor()
getAttachments()
appendAttachments()
escape()
getAdminTplFolder()
get_breadcrumbs()
get_ajax_functions()
get_apps_template_full_path()
getPageByURI()
get_session_key()
delete_session_key()
getSessionUserId()
load_uploadify_images()
editImageMulti()
setExternalUploadifyImageArray()
getExternalUploadifyImageArray()
appendDocUploads()
appendUploads()
editFileMulti()
clear_uploadify_table()
clear_captcha_session_table()
clear_session_table()
delete_uploadify_images()
delete_uploadify_image()
get_ajax_auth_form()
get_simple_auth_form()
add_image_records()
add_table_image_record()
getPluploaderPlugin()
getUploadifyPlugin()
getDropzonePlugin()
getUploadifyFilePlugin()
isDemo()
demo_function_disabled()
loadConfig()
deleteImage()
makeImageMain()
rotateImage2()
rotateImage()
reorderImage()
reorderTopics()
deleteImageFiles()
getConfigValue()
getAllConfigArray()
getDebugMode()
setDebugMode()
htmlspecialchars()
htmlspecialchars_decode()
getRequestValue()
setRequestValue()
riseError()
clearError()
getError()
GetErrorMessage()
writeLog()
getImageListAdmin()
getFileListAdmin()
get_page_links_list()
get_image_array()
get_category_breadcrumbs()
get_category_breadcrumbs_string()
set_breadcrumbs_array()
get_breadcrumbs_array()
go301()
makePreview()
makeMove()
getAdminUserId()
getVendorInfoById()
getUnregisteredUserId()
growCounter()
validateEmailFormat()
validateMobilePhoneNumberFormat()
getAttachmentsBlock()
modelSimplification()
iconv()
removeDirectory()
transliteMe()
setLangSession()
getClearRequestURI()
sendFirmMail()
check_access()
need_check_access()
get_check_access_user_id()
get_plan_model()
$table_name
$primary_key
$action
$data_model
$app_title
$error_message
$uploadify_dir
$storage_dir
$_grid_constructor_local
$_grid_viewer_local
MEDIA_SAVE_FOLDER
_helpAction()
_help()
_installAction()
_before_edit_done_action()
_before_add_done_action()
_before_check_action()
_after_edit_done_action()
_after_add_done_action()
_edit_doneAction()
attachAvatars()
clearAvatarElement()
_editAction()
_deleteAction()
_new_doneAction()
_newAction()
_mass_deleteAction()
_gridAction()
_batch_updateAction()
_change_paramAction()
_defaultAction()
_formatgridAction()
_structureAction()
_importAction()
_exportAction()
createTranslitAliasByFields()
makeUniqueAlias()
saveTranslitAlias()
removeTemporaryFields()
batch_update()
getServerFullUrl()
initLocalComponents()
parseLocalSettings()
_setGridConstructor()
restoreFavorites()
$imgs
$config_loaded
$config_array
$storage
$Heaps
$localSettings
$_grid_constructor
N/A
xssProtect()
getSafeValue()
$new_record_id
$external_uploadify_image_array
N/A

Constants

MEDIA_SAVE_FOLDER

MEDIA_SAVE_FOLDER

Properties

$table_name

$table_name : string

Table name

Type

string

$primary_key

$primary_key : string

Primary key

Type

string

$action

$action : string

Action name

Type

string

$data_model

$data_model : array

Data model

Type

array

$app_title

$app_title : 

Type

$error_message

$error_message : 

Error message

Type

$uploadify_dir

$uploadify_dir : 

Type

$storage_dir

$storage_dir : 

Type

$_grid_constructor_local

$_grid_constructor_local : 

Type

$_grid_viewer_local

$_grid_viewer_local : 

Type

$imgs

$imgs : 

Type

$config_loaded

$config_loaded : 

Type

$config_array

$config_array : 

Type

$storage

$storage : 

Type

$Heaps

$Heaps : 

Type

$localSettings

$localSettings : 

Type

$_grid_constructor

$_grid_constructor : 

Type

$new_record_id

$new_record_id : 

Type

$external_uploadify_image_array

$external_uploadify_image_array : 

Type

Methods

__construct()

__construct() 

Constructor

check_table_exist()

check_table_exist(  $table_name) 

Parameters

$table_name

install()

install() 

get_new_record_id()

get_new_record_id() 

num2alpha()

num2alpha(  $n) 

Parameters

$n

main()

main() : string

Main

Returns

string

checkUniquety()

checkUniquety(  $form_data) 

Parameters

$form_data

get_app_title_bar()

get_app_title_bar() 

mass_delete_data()

mass_delete_data(  $table_name,   $primary_key,   $ids) 

Parameters

$table_name
$primary_key
$ids

mass_change_param()

mass_change_param(  $table_name,   $primary_key,   $ids,   $param_name,   $param_value) 

Parameters

$table_name
$primary_key
$ids
$param_name
$param_value

load_by_id()

load_by_id(integer  $record_id) : array

Load record by id

Parameters

integer $record_id

Returns

array

delete_data()

delete_data(string  $table_name, string  $primary_key, integer  $primary_key_value) 

Delete data

Parameters

string $table_name
string $primary_key
integer $primary_key_value

grid()

grid(  $params = array(),   $default_params = array()) : string

Grid

Parameters

$params
  • здесь задаем параметры для того чтобы полностью переопределить структуру грида
$default_params
  • здесь указываем параметры для вывода колонок по-умолчанию, если нет пользовательских и нет $params тогда рисуем колонки из $default_params

Returns

string

add_data()

add_data(array  $form_data, integer  $language_id) : boolean

Add data

Parameters

array $form_data

form data

integer $language_id

Returns

boolean

set_imgs()

set_imgs(  $imgs = false) 

Parameters

$imgs

get_imgs()

get_imgs() 

edit_data()

edit_data(array  $form_data, integer  $language_id,   $primary_key_value = false) : boolean

Edit data

Parameters

array $form_data

form data

integer $language_id

language id

$primary_key_value

Returns

boolean

check_data()

check_data(array  $form_data) : boolean

Check data

Parameters

array $form_data

Returns

boolean

getTopMenu()

getTopMenu() : string

Get top menu

Returns

string

get_form()

get_form(array  $form_data = array(), string  $do = 'new', integer  $language_id, string  $button_title = '',   $action = 'index.php') : string

Get form for edit or new record

Parameters

array $form_data
string $do
integer $language_id
string $button_title
$action

Returns

string

set_apps_template()

set_apps_template(string  $apps_name, string  $theme, string  $template_key, string  $template_value) : boolean

Set apps template

Parameters

string $apps_name
string $theme
string $template_key
string $template_value

Returns

boolean

getSteps()

getSteps(  $form_data,   $step) 

Parameters

$form_data
$step

_preload()

_preload() 

SiteBill()

SiteBill() 

Constructor

getCurrentLang()

getCurrentLang() 

getRealtyHREF()

getRealtyHREF(  $rid,   $external = false,   $params = array()) 

Parameters

$rid
$external
$params

_getGridConstructor()

_getGridConstructor() 

getAttachments()

getAttachments(  $object_type,   $object_id) 

Parameters

$object_type
$object_id

appendAttachments()

appendAttachments(  $object_type,   $object_id,   $attachments) 

Parameters

$object_type
$object_id
$attachments

escape()

escape(  $text) 

Parameters

$text

getAdminTplFolder()

getAdminTplFolder() 

get_breadcrumbs()

get_breadcrumbs(array  $items) : string

Get breadcrumbs

Parameters

array $items

Returns

string

get_ajax_functions()

get_ajax_functions() 

get_apps_template_full_path()

get_apps_template_full_path(string  $apps_name, string  $theme, string  $template_value) : boolean

Get apps template full path

Parameters

string $apps_name
string $theme
string $template_value

Returns

boolean

getPageByURI()

getPageByURI(string  $uri) : array

Get page by URI

Parameters

string $uri

uri

Returns

array

get_session_key()

get_session_key() : string

Get session key

Returns

string

delete_session_key()

delete_session_key(string  $session_key) : void

Delete session by key

Parameters

string $session_key

getSessionUserId()

getSessionUserId() : integer

Get session user ID

Returns

integer

load_uploadify_images()

load_uploadify_images(string  $session_code = '',   $element_name = '') : array

Load uploadify images

Parameters

string $session_code

session code

$element_name

Returns

array

editImageMulti()

editImageMulti(string  $action, string  $table_name, string  $key, integer  $record_id,   $name_template = '') : boolean

Edit image

Parameters

string $action

action

string $table_name

table name

string $key

key

integer $record_id

record ID

$name_template

Returns

boolean

setExternalUploadifyImageArray()

setExternalUploadifyImageArray(  $_image_array) : void

Эта функция устанавливает массив с картинками для эмитации загрузки картинок в UPLOADIFY Используется в APPS.API для загрузки картинок из мобильного приложения

Parameters

$_image_array
  • массив с картинками

getExternalUploadifyImageArray()

getExternalUploadifyImageArray() 

appendDocUploads()

appendDocUploads(  $table,   $field,   $pk_field,   $record_id) 

Parameters

$table
$field
$pk_field
$record_id

appendUploads()

appendUploads(  $table,   $field,   $pk_field,   $record_id,   $name_template = '') 

Parameters

$table
$field
$pk_field
$record_id
$name_template

editFileMulti()

editFileMulti(string  $action, string  $table_name, string  $key, integer  $record_id) : boolean

Edit file

Parameters

string $action

action

string $table_name

table name

string $key

key

integer $record_id

record ID

Returns

boolean

clear_uploadify_table()

clear_uploadify_table(  $session_code = '',   $anyway = false) 

Parameters

$session_code
$anyway

clear_captcha_session_table()

clear_captcha_session_table() 

clear_session_table()

clear_session_table() 

delete_uploadify_images()

delete_uploadify_images(string  $session_code,   $element = '') : array

Delete uploadify images

Parameters

string $session_code

session code

$element

Returns

array

delete_uploadify_image()

delete_uploadify_image(string  $image_name) : array

Delete uploadify image

Parameters

string $image_name

image_name

Returns

array

get_ajax_auth_form()

get_ajax_auth_form() 

get_simple_auth_form()

get_simple_auth_form(string  $action = '/login/', boolean  $register = true, boolean  $remind = true) : string

Get simple auth form

Parameters

string $action
boolean $register
boolean $remind

Returns

string

add_image_records()

add_image_records(array  $images, string  $table_name, string  $key, integer  $record_id) : boolean

Add image data records

Parameters

array $images

images

string $table_name

table name

string $key

key

integer $record_id

record id

Returns

boolean

add_table_image_record()

add_table_image_record(  $table_name,   $key, integer  $record_id, integer  $image_id) : boolean

Add table_image record

Parameters

$table_name
$key
integer $record_id

record id

integer $image_id

image id

Returns

boolean

getPluploaderPlugin()

getPluploaderPlugin(string  $session_code) : string

Get Plupload plugin (http://www.plupload.com/) Only html4 version available (not attached files for others)

Parameters

string $session_code

session code

Returns

string

getUploadifyPlugin()

getUploadifyPlugin(string  $session_code,   $params = array()) : string

Get uploadify plugin

Parameters

string $session_code

session code

$params

Returns

string

getDropzonePlugin()

getDropzonePlugin(  $session_code,   $params = array()) 

Parameters

$session_code
$params

getUploadifyFilePlugin()

getUploadifyFilePlugin(string  $session_code,   $params = array()) : string

Get uploadify plugin

Parameters

string $session_code

session code

$params

Returns

string

isDemo()

isDemo() : boolean

Is demo

Returns

boolean

demo_function_disabled()

demo_function_disabled() : string

Demo function disabled

Returns

string

loadConfig()

loadConfig() : 

Load config

Returns

deleteImage()

deleteImage(string  $table_name, integer  $image_id) : boolean

Delete image

Parameters

string $table_name

table name

integer $image_id

image id

Returns

boolean

makeImageMain()

makeImageMain(  $action,   $image_id,   $key,   $key_value) 

Parameters

$action
$image_id
$key
$key_value

rotateImage2()

rotateImage2(  $thisimage,   $isWatermark,   $degree,   $parameters) 

Parameters

$thisimage
$isWatermark
$degree
$parameters

rotateImage()

rotateImage(  $action,   $image_id,   $key,   $key_value,   $rot_dir) 

Parameters

$action
$image_id
$key
$key_value
$rot_dir

reorderImage()

reorderImage(  $action,   $image_id,   $key,   $key_value,   $direction) 

Parameters

$action
$image_id
$key
$key_value
$direction

reorderTopics()

reorderTopics(  $orderArray) 

Parameters

$orderArray

deleteImageFiles()

deleteImageFiles(  $image_id) : boolean

Delete image files

Parameters

$image_id

image id

Returns

boolean

getConfigValue()

getConfigValue(string  $key) : string

Get config value

Parameters

string $key

key

Returns

string

getAllConfigArray()

getAllConfigArray() 

getDebugMode()

getDebugMode() : boolean

Get debug mode

Returns

boolean

setDebugMode()

setDebugMode(  $debug_mode) : void

Set debug mode

Parameters

$debug_mode

htmlspecialchars()

htmlspecialchars(  $value,   $flags = '') 

Parameters

$value
$flags

htmlspecialchars_decode()

htmlspecialchars_decode(  $value,   $flags = '') 

Parameters

$value
$flags

getRequestValue()

getRequestValue(string  $key,   $type = '',   $from = '') : string

Get value

Parameters

string $key

key

$type
$from

Returns

string

setRequestValue()

setRequestValue(string  $key, string  $value) : void

Set request value

Parameters

string $key

key

string $value

value

riseError()

riseError(  $error_message) : void

Rise error

Parameters

$error_message

clearError()

clearError() 

getError()

getError() : boolean

Get error

Returns

boolean

GetErrorMessage()

GetErrorMessage() : string

Get error message

Returns

string

writeLog()

writeLog(string  $message) : void

Write log message

Parameters

string $message

message

getImageListAdmin()

getImageListAdmin(string  $action, string  $table_name, string  $key, integer  $record_id,   $callback_count = NULL,   $no_controls = false) : string

Get image list admin

Parameters

string $action

action

string $table_name

table name

string $key

key

integer $record_id

record id

$callback_count
$no_controls

Returns

string

getFileListAdmin()

getFileListAdmin(string  $action, string  $table_name, string  $key, integer  $record_id) : string

Get file list admin

Parameters

string $action

action

string $table_name

table name

string $key

key

integer $record_id

record id

Returns

string

get_page_links_list()

get_page_links_list(  $page, integer  $total, integer  $per_page, array  $params) : array

Get page links list

Parameters

$page
integer $total
integer $per_page
array $params

Returns

array

get_image_array()

get_image_array(string  $action, string  $table_name, string  $key, integer  $record_id, integer  $limit) : string

Get image list admin

Parameters

string $action

action

string $table_name

table name

string $key

key

integer $record_id

record id

integer $limit

limit value

Returns

string

get_category_breadcrumbs()

get_category_breadcrumbs(array  $params, array  $category_structure, string  $url = '') : string

Get category breadcrumbs

Parameters

array $params
array $category_structure
string $url

Returns

string

get_category_breadcrumbs_string()

get_category_breadcrumbs_string(array  $params, array  $category_structure, string  $url = '') : string

Get category breadcrumbs

Parameters

array $params
array $category_structure
string $url

Returns

string

set_breadcrumbs_array()

set_breadcrumbs_array(  $breadcrumbs_array = array()) 

Parameters

$breadcrumbs_array

get_breadcrumbs_array()

get_breadcrumbs_array() 

go301()

go301(  $new_location) 

Parameters

$new_location

makePreview()

makePreview(  $src,   $dst,   $width,   $height,   $ext = 'jpg',   $md) : 

Make preview

Parameters

$src
$dst
$width
$height
$ext
$md

Returns

makeMove()

makeMove(  $src,   $dst) : 

Make move

Parameters

$src
$dst

Returns

getAdminUserId()

getAdminUserId() : integer

return id of Admininstrator

Returns

integer

getVendorInfoById()

getVendorInfoById(  $id) : string

return Vendor info

Parameters

$id

Returns

string

getUnregisteredUserId()

getUnregisteredUserId() 

growCounter()

growCounter(  $table_name,   $primary_key_name,   $primary_key_value,   $user_id) 

Parameters

$table_name
$primary_key_name
$primary_key_value
$user_id

validateEmailFormat()

validateEmailFormat(  $email) 

Parameters

$email

validateMobilePhoneNumberFormat()

validateMobilePhoneNumberFormat(  $phone_number,   $mask = '') 

Parameters

$phone_number
$mask

getAttachmentsBlock()

getAttachmentsBlock() 

modelSimplification()

modelSimplification(  $model) 

Parameters

$model

iconv()

iconv(  $in_charset,   $out_charset,   $string) 

Parameters

$in_charset
$out_charset
$string

removeDirectory()

removeDirectory(  $dir,   $msg = array()) 

Parameters

$dir
$msg

transliteMe()

transliteMe(  $str) 

Parameters

$str

setLangSession()

setLangSession() 

getClearRequestURI()

getClearRequestURI() 

sendFirmMail()

sendFirmMail(  $to,   $from,   $subject,   $body) 

Parameters

$to
$from
$subject
$body

check_access()

check_access(\type  $table_name, \type  $user_id, \type  $control_name, \type  $primary_key_name, \type  $primary_key_value) : boolean

Проверка владельца записи в таблице по USER_ID, если владелец совпадает с $table_name.user_id тогда возвращаем TRUE иначе FALSE

Parameters

\type $table_name
  • название таблицы
\type $user_id
  • идентификатор пользователя для проверки
\type $control_name
  • тип действия (edit, delete...)
\type $primary_key_name
  • название PRIMARY KEY в таблице
\type $primary_key_value
  • значение PRIMARY KEY

Returns

boolean

need_check_access()

need_check_access(  $table_name) 

Parameters

$table_name

get_check_access_user_id()

get_check_access_user_id(  $table_name) 

Parameters

$table_name

get_plan_model()

get_plan_model() : 

Get plan model

Returns

_helpAction()

_helpAction() 

_help()

_help() 

_installAction()

_installAction() 

_before_edit_done_action()

_before_edit_done_action(  $form_data) 

Parameters

$form_data

_before_add_done_action()

_before_add_done_action(  $form_data) 

Parameters

$form_data

_before_check_action()

_before_check_action(  $form_data,   $type = 'new') 

Parameters

$form_data
$type

_after_edit_done_action()

_after_edit_done_action(  $form_data) 

Parameters

$form_data

_after_add_done_action()

_after_add_done_action(  $form_data) 

Parameters

$form_data

_edit_doneAction()

_edit_doneAction() 

attachAvatars()

attachAvatars(  $model,   $table,   $key_name,   $key_val) 

Parameters

$model
$table
$key_name
$key_val

clearAvatarElement()

clearAvatarElement(  $table,   $el,   $key_name,   $key_val) 

Parameters

$table
$el
$key_name
$key_val

_editAction()

_editAction() 

_deleteAction()

_deleteAction() 

_new_doneAction()

_new_doneAction() 

_newAction()

_newAction() 

_mass_deleteAction()

_mass_deleteAction() 

_gridAction()

_gridAction() 

_batch_updateAction()

_batch_updateAction() 

_change_paramAction()

_change_paramAction() 

_defaultAction()

_defaultAction() 

_formatgridAction()

_formatgridAction() 

_structureAction()

_structureAction() 

_importAction()

_importAction() 

_exportAction()

_exportAction(  $input_params = array()) 

Parameters

$input_params

createTranslitAliasByFields()

createTranslitAliasByFields(  $id,   $fields_for_alias) 

Parameters

$id
$fields_for_alias

makeUniqueAlias()

makeUniqueAlias(  $alias,   $id) 

Parameters

$alias
$id

saveTranslitAlias()

saveTranslitAlias(  $id) 

Parameters

$id

removeTemporaryFields()

removeTemporaryFields(  $model,   $remove_this_names = array()) 

Parameters

$model
$remove_this_names

batch_update()

batch_update(  $table_name,   $primary_key) 

Parameters

$table_name
$primary_key

getServerFullUrl()

getServerFullUrl(  $domain_only = false) 

Parameters

$domain_only

initLocalComponents()

initLocalComponents() 

parseLocalSettings()

parseLocalSettings() 

_setGridConstructor()

_setGridConstructor(  $newGridConstructor) 

Parameters

$newGridConstructor

restoreFavorites()

restoreFavorites(  $user_id) 

Parameters

$user_id

xssProtect()

xssProtect(  $value) 

Parameters

$value

getSafeValue()

getSafeValue(  $value) 

Parameters

$value