Contents

 
Home
PHPRunner 6.1 manual
Prev Page Next Page
 
 

Common event parameters

 

You can use the following common parameters in your event code:

$conn - database connection handle.

$dal - DAL object. For more information about using Data Access Layer (DAL), see Data Access Layer.

$pageObject - use this object to save, move and delete uploaded files instead of the parameters $files_move, $files_save и $files_delete that are not longer supported. $pageObject includes the following arrays:

$pageObject->filesToSave

$pageObject->filesToMove

$pageObject->filesToDelete

Each of these arrays contains the object described in the file source\classes\files.php. You can access the filename of uploaded file, the path to the uploaded file, new file name (for example if 'add timestamp to the filename' option is turned on) with these objects.

Here are some examples:

//Filename of uploaded file

$pageObject->filesToMove[..]->sourceFilename;

//Path to the file

$pageObject->filesToSave[..]->destPath;

//Filename of saved file

$pageObject->filesToSave[..]->destFilename;

$pageObject->filesToSave is used only if the Create thumbnail option is turned on.

$strTableName - name of the currently selected table.

$strWhereClause - WHERE clause to be applied to the SQL query. Not defined in the BeforeProcess event. Defined in the BeforeQuery and subsequent events.

Example:

// retrieve a record to be deleted or edited

global $TableName;

$data = $TableName->Query($strWhereClause,"");

echo $data["field1"];

echo $data["field2"];

$values - array with the fields values from Add/Edit form.

Example:

echo $values["Field1"];

$keys - array with the key columns.

Example:

echo $keys["ID"];

$templatefile - template file name.

$xt - template processor object.

Example:

$xt->assign("variable name",$value);

$xt->assign("message",$message);

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)