Common
notes
You must use only php files here, it means that you must enter file names of
your php scripts into all fields.
They will be included like @include($fcss_form
["AA"]
["CSS"]
["Before"]
);
CSS - error checking stage
CFM - confirmation page output stage
MailPRC - mailing stage
MySQLPRC - work on MySQL table stage
Forms array is $FS_form and looks like:
| |
Array
(
[cfmfile] =>
[cfmstnc] => Submit
[errmsg] => y
[MySQLPRC] => y
[DBHost] => localhost
[DBName] => tes
[DBLogin] => test
[DBPass] => test
[DBTable] => test
[InsertField] => none
[InsertFieldValue] =>
[UpdateField] => none
[UpdateFieldValue] =>
[FillField] => none
[FillFieldValue] =>
[TableField] => none
[TableFieldValue] =>
[action] =>
[onsubmit] =>
[CheckServerSide] => y
[CheckClientSide] => y
[translation] => english
[inputs] => Array
(
[text] => Array
(
[name] => text
[type] => text
[description] =>
[class] => butt_menu
[SType] => CHAR
[size] => 50
[values] =>
[required] => y
[emptyval] =>
[min] =>
[max] =>
[email] => y
[regexp] =>
)
[radio] => Array
(
[name] => radio
[type] => radio
[description] =>
[class] =>
[SType] => ENUM
[size] => 2
[values] => 'r1','r2'
)
[combobox] => Array
(
[name] => combobox
[type] => select
[description] =>
[class] =>
[SType] => CHAR
[size] => 4
[values] =>
[emptyval] =>
)
[pass] => Array
(
[name] => pass
[type] => password
[description] =>
[class] => butt_menu
[SType] => CHAR
[size] => 50
[values] =>
[required] => y
[emptyval] =>
[numeric] => y
[min] =>
[max] => 2
[regexp] =>
)
[picture] => Array
(
[name] => picture
[type] => file
[description] =>
[class] =>
[SType] => FILE
[size] => 0
[values] =>
[emptyval] =>
[IMG] => Array
(
[gif] => y
[jpg] => y
[png] => y
[X] =>
[Y] =>
)
[min] =>
[max] => 64000
)
[textarea] => Array
(
[name] => textarea
[type] => textarea
[description] =>
[class] =>
[SType] => TEXT
[size] => 150
[values] =>
[emptyval] =>
[min] =>
[max] =>
[regexp] =>
)
[check] => Array
(
[name] => check
[type] => checkbox
[description] =>
[class] => butt_menu
[SType] => BOOL
[size] => 1
[values] =>
[emptyval] =>
)
[listbox] => Array
(
[name] => listbox
[type] => select
[description] =>
[class] =>
[SType] => CHAR
[size] => 3
[values] =>
[emptyval] =>
)
[submit] => Array
(
[name] => submit
[type] => submit
[description] =>
[class] =>
[SType] => NO MySQL
[size] => 1
[values] => submit
[emptyval] =>
[min] =>
[max] =>
[regexp] =>
)
)
[Fields] => text.radio.combobox.pass.picture.textarea.check.listbox.submit
[Mail] => Array
(
[service@formparser.com] => Array
(
[From] => [[text]]
[Subject] => [[pass]]
[Body] => Mail body
[[text]]
[[radio]]
[[combobox]]
[[pass]]
[[textarea]]
[[check]]
[[listbox]]
[[picture]]
)
)
[Link] => Array
(
[test1] => Array
(
[Link] => test.com
[Term] => '[[text]]'=='test'
)
)
[KF] => Array
(
[ID] => Array
(
[Type] => COUNTER
[Size] => 10
[Insert] =>
[InsVal] =>
[Update] => No
[UpdVal] =>
)
)
[PRIMARY_KEY] => ID
[AA] => Array
(
[CSS] => Array
(
[Before] => precss.php
[After] => extracheck.php
)
[CFM] => Array
(
[Before] => precfm.php
)
[Mail] => Array
(
[Before] => premail.php
[After] => checkmail.php
)
[MySQL] => Array
(
[Before] => premysql.php
[After] => add_mysql.php
)
)
[Confirm] => n
[MailPRC] => y
)
|
All vars inside SP.DE defines like $FS_varname, so you could use any varnames
into your action scripts but $FS_
There are also several variables available in any action
$FS_STATE - can be "cgi" or "inside", depends on SP.DE running
model
$FS_form_file - a name of file that calls SP.DE
$FS_vars_file - variables file name relative to form file
$FS_action_form - a name of form that was posted by user
$FS_action_stage - current SP.DE stage, can be
"CSS" - error checking
"CFM" - confirmation page output
"
MailPRC" - mailing
"
MySQLPRC" - work on MySQL table
All "before" actions will be included right
on before calling of corresponding procedure, before any procedure code execution
For example, you can use before action to change $FS_form array:
| |
$FS_form["inputs"]["info"]["max"] = $listing_dscr_max_len[$_SESSION["status"]];
if ($_SESSION["status"]=='Free')
$FS_form["inputs"]["bid"]["min"]=0; |
or $_POST array with forms values
| |
if (!isset($_POST["status"]))
$_POST["status"] = 2;
$_POST["site_part"] = 0;
foreach($df_ebpages as $cb => $name) {
if (isset($_POST["sp_$cb"]))
$_POST["site_part"] |= $_POST["sp_$cb"];
} |
In MySQL case, when your table has some field that can't be filled from form
fields but depends of them, you should add such field in Key
fields
editor and
set value source like $_ADDVALUE['table_field']. Then fill $_ADDVALUE['table_field']
in pre MySQL action script and set its name in MySQL "before" stage.
|