Source for file OCSP_FRMCONTR_FORM.phpclass
Documentation is available at OCSP_FRMCONTR_FORM.phpclass
* Class file OCSP_FRMCONTR_FORM.phpclass
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: OCSP_FRMCONTR_FORM.phpclass,v 1.51 2008/12/17 16:28:51 peterkrebs Exp $
require_once dirname(__FILE__
).
_OCSP_DIRSEP_ .
"OCSP_FRMCONTR.phpclass";
* class OCSP_FRMCONTR_FORM
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: OCSP_FRMCONTR_FORM.phpclass,v 1.51 2008/12/17 16:28:51 peterkrebs Exp $
/*** class constants --------------------------------------------- */
* @constant string CLASS_SRC_FILE
* if $this->myNextUrl starts with js: a javascript code will be evaluated else it is assumed to be a norm link
* js events for 'fldName' and 'fldValue
* @var array $rmFldEvents
* returns an array with js required
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* if next url is not set tries to get it from $_REQUEST
* the url is parsed with $this->curRow
* @param boolean $parseTmpl
if (isset
($_REQUEST[$this->myForm->getName().
'_NEXT']) &&
!empty($_REQUEST[$this->myForm->getName().
'_NEXT']))
if ($debug) echoDebugMethod(__FILE__
,__LINE__
,"using request: " .
$str_ret);
$str_ret=
$_SERVER['SCRIPT_NAME'];
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* sets the database values of the forms tableobject
if ($obj_tblObj =
$this->getMyForm()->getMyTblObj(True))
if ($obj_tblObj->populateFromValues($this->curRow,$debug))
if ($obj_tblObj->hasObjVals())
$obj_tblObj->populateObjVals($debug);
//if ($arr_fields = $this->myForm->getFields($obj_tblObj->getMyTable()))
if ($arr_fields =
$this->myForm->getFields("",False,$this->myForm->getFrmMode())) // <pk-08-03-31 /> <pk-08-11-06 />
$arr_tblObjVals =
array();
foreach($this->curRow as $str_col =>
$mix_val)
if ($obj_fld =
$this->myForm->getField($str_col,$obj_tblObj->getMyTable(),-
1))
$arr_tblObjVals[$str_col] =
$this->curRow[$str_col];
unset
($arr_fields[$obj_fld->getKey()]);
echoDebugLine(__FILE__
,__LINE__
,"<strong>" .
$str_col .
"</strong> not in form");
$obj_tblObj->setDBVal($arr_tblObjVals,$debug);
//$obj_tblObj->setDBRow()
if (($arr_frmTables =
$this->myForm->getTables()) &&
(sizeof($arr_frmTables) >
1))
switch($this->myForm->getFrmMode())
foreach($arr_frmTables as $str_table)
if ($str_table !=
$obj_tblObj->getMyTable())
if ($arr_fields =
$this->myForm->getFields($str_table))
foreach($arr_fields as $obj_fld)
if (isset
($this->curRow[$obj_fld->getName()]))
$arr_subTblVals[$obj_fld->getName()] =
$this->curRow[$obj_fld->getName()];
$obj_tblObj->setLinkedTableRow($str_table,$cmd_lnkTbl,$arr_subTblVals,$debug);
* sets $this->myFilter from the values
if ($arr_tblKeys=
$this->myForm->getKeyFields())
foreach($arr_tblKeys as $str_tbl =>
$arr_keys)
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p>Table: $str_tbl</p>");
foreach($arr_keys as &$obj_fld)
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p>Col: ".
$obj_fld->getDBColName(False).
"</p>");
if (!isset
($this->myFilter[$obj_fld->getDBColName(False)]))
if (isset
($this->curRow[$obj_fld->getDBColName(False)]))
$this->myFilter[$obj_fld->getDBColName(False)]=
$this->curRow[$obj_fld->getDBColName(False)];
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns the javas script to load jOCSP framework
* @global array $OCSP_CONF
// ---------------------------------------------
// OCSP_FRMCONTR_FORM::jOCSP_getFormInitCmd
// ---------------------------------------------
frmId: " .
$this->myForm->getId() .
",
if (typeof(window.jOCSP.ocspFormObj) == \"undefined\")
jOCSP.requestScript('" .
self::getConf('SYSTEMURL') .
"jOCSP/jOCSP_form.js',true,0);
if (typeof(window.jQuery.fn.ajaxSubmit) == \"undefined\")
jOCSP.requestScript('" .
self::getConf('SYSTEMURL') .
"javascript/jquery/jquery.form.js',false,1000);
$arr_fields =
$this->myForm->getFields();
$arr_requirements =
array();
foreach($arr_fields as &$obj_fld)
$obj_fld->setMyForm($this->myForm);
$obj_fld->setControll($this);
if (($arr_jsReq =
$obj_fld->jOCSP_getRequiredModules()) &&
sizeof($arr_jsReq))
foreach($arr_jsReq as $arr_req)
if (is_array($arr_req) && isset
($arr_req['CLASS']))
if (!isset
($arr_requirements[$arr_req['CLASS']]))
$arr_requirements[$arr_req['CLASS']] =
$arr_req['SRC'];
echoDebugLine(__FILE__
,__LINE__
,"<p>Field:" .
$obj_fld->getName() .
"(" .
get_class($obj_fld) .
")</p><pre>" .
print_r($arr_jsReq,True) .
"</pre>");
$str_js .=
"\n\n// form requirements ---------------------------\n";
foreach($arr_requirements as $str_class =>
$str_src)
if (typeof({$str_class}) == 'undefined')
jOCSP.requestScript('{$str_src}');
$str_js .=
"// done form requirements ---------------------------\n\n";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// javascript to add (after </form>);
* returns the form html id/name
* @return string the form id
return $this->myForm->getHTMLname();
$this->myForm->setFrmMode($aMode);
$str_ret.=
" action=\"".
$str_aURL.
"\"";
$str_ret.=
" method=\"".
$this->myMethod.
"\"";
$str_ret.=
" method=\"post\"";
$str_ret.=
" target=\"".
$this->myTarget.
"\"";
$str_ret .=
" accept-charset=\"utf-8\"";
* returns if the form has button commands
* checks $this->myCommands['_FORM_'] for values and the form mode
switch($this->myForm->getFrmMode())
* @global array $OCSP_OBJ
* @global array $OCSP_CONF
if (!empty($this->myBackCmd))
$str_ret.=
"<a onClick=\"".
$this->myBackCmd.
"\">";
$str_ret.=
$this->myView->getButton('BACK');
switch($this->myForm->getFrmMode())
if (!isset
($this->myCommands['_FORM_']['DELETE']))
foreach($this->myCommands['_FORM_'] as $str_cmd =>
$arr_settings)
switch($arr_settings['TYPE'])
$str_ret.=
$this->myView->getButton($str_cmd);
$str_ret.=
$this->myView->getButton($str_cmd);
$str_ret.=
" <a href=\"" .
OCSP_OBJ::getConf('ADMINURL') .
"dbms/form.php?FRM_ID=".
$this->myForm->getId().
"\" target=\"_blank\">
<img src=\"{$OCSP_CONF['SYSIMGURL']}/icons-22x22/editConstruct.gif\" class=\"button\" /></a>";
$str_ret=
$this->myView->getButtonOuterDiv($debug).
$str_ret.
"</div>\n";
$str_ret=
$this->myView->getButtonOuterDiv($debug);
$str_ret.=
"<a href=\"#\" onClick=\"document.forms['".
$this->getFormHTMLId().
"'].submit();\">";
$str_ret.=
$this->myView->getButton('SAVE');
$str_ret.=
"</a></div>\n";
$str_ret=
$this->myView->getButtonOuterDiv($debug);
$str_ret.=
"<a href=\"#\" onClick=\"document.forms['".
$this->getFormHTMLId().
"'].reset();\">";
$str_ret.=
$this->myView->getButton('RESET');
$str_ret.=
"</a></div>\n";
* returns hiddenfields identifying the form and the tableobject
$this->populateRow(NULL,$debug); // ensure the row is populated
) // empty filter -> try to get it from primary keys
$arr_ocspFormSettings=
array(
'ID' =>
$this->myForm->getId(),
'MODE' =>
$this->myForm->getFrmMode(),
$str_ret.=
"\n\n<!-- ".
get_class($this).
"::getFormCmdFields() -->\n";
$str_ret.=
"<input type=\"hidden\" name=\"FRMHTMLNAME\" value=\"".
$this->myForm->getHTMLname().
"\" />\n";
$str_ret.=
"<input type=\"hidden\" name=\"DBMSFORMID\" value=\"".
$this->myForm->getId().
"\" />\n";
$str_ret.=
"<input type=\"hidden\" name=\"FRMMODE\" value=\"".
$this->myForm->getFrmMode().
"\" />\n";
$str_ret.=
"<input type=\"hidden\" name=\"FRMARRAYNAME\" value=\"".
$this->myForm->getDataArrName().
"\" />\n";
$str_ret.=
"<input type=\"hidden\" name=\"".
$this->myForm->getName().
"_REQUEST\" value=\"".
OCSP_SESSION::getInstance()->encrypt($_SERVER['REQUEST_URI']).
"\" />\n";
$str_ret.=
"<input type=\"hidden\" name=\"SESSID\" value=\"".
session_id().
"\" />\n";
//$str_ret.="<input type=\"hidden\" name=\"RELOAD\" value=\"0\" />\n";
$this->populateRow(NULL,$debug); // ensure we have DB values for deletekey
if ($obj_tblObj=
$this->myForm->getMyTblObj(False,$debug))
$str_serKey =
print_r($obj_tblObj->getDBRow(),True);;
if ($debug) $str_ret.=
"<p>" .
basename(__FILE__
) .
" Line: " . __LINE__ .
"</p><p>DeleteKey " .
md5($str_serKey) .
"</p><pre>{$str_serKey}</pre>";
$str_ret.=
"<input type=\"hidden\" name=\"DELKEY\" value=\"" .
md5($str_serKey) .
"\" />\n";
$str_ret.=
"<input type=\"hidden\" name=\"DELKEY\" value=\"".
md5(serialize($this->curRow)).
"\" />\n";
//$debug=True;echoDebugLine(__FILE__,__LINE__,"debug on");
if (($obj_tblObj=
$this->myForm->getMyTblObj(False,$debug)) &&
$this->myForm->getTblObjClass())
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"class: " .
$this->myForm->getTblObjClass() .
" include: " .
$this->myForm->getTblObjInc());
$str_ret.=
"<input type=\"hidden\" name=\"OCSP_FORM_TBLOBJCLASS\" value=\"".
OCSP_SESSION::getInstance()->encrypt($this->myForm->getTblObjClass()).
"\" />\n";
$str_ret.=
"<input type=\"hidden\" name=\"OCSP_FORM_TBLOBJINC\" value=\"".
OCSP_SESSION::getInstance()->encrypt($this->myForm->getTblObjInc()).
"\" />\n";
$str_ret.=
"<input type=\"hidden\" name=\"OCSP_FORM_INC\" value=\"".
OCSP_SESSION::getInstance()->encrypt($this->myForm->get_mySourceFile()).
"\" />\n";
if ($arr_formCmds =
$this->myForm->getFormCmdFields($debug))
//$str_ret .= dirname(__FILE__) . " Line: " . __LINE__ . "<p>PassThrough:</p><pre>" . print_r($this->myForm->getPassThroughFields(),True) . "</pre>";
if ($arr_passThrough =
$this->myForm->getPassThroughFields())
foreach($arr_passThrough as $str_col =>
$mix_value);
// -------------------------------------------
// -------------------------------------------
* returns the field value set in $this->curRow
* @param DBMS_FIELD $aField
// seting curRow to global array
// enableing the fields to access other row values
$str_dataArrName =
$this->getMyForm()->getDataArrName();
global $
{$str_dataArrName};
$
{$str_dataArrName} =
$this->curRow;
$aField->setDataArrName($str_dataArrName);
$aField->setControl($this);
$fldMode=
$this->myForm->getFrmMode();
if (isset
($this->curRow[$aField->getName()]))
$m_val=
$this->curRow[$aField->getName()];
if ($debug) ocsp_logError(__FILE__
,__LINE__
,"Object: ".
get_class($this).
" value for ".
$aField->getName().
" not set",E_NOTICE);
* returns the html tag of a field
* @param DBMS_FIELD $aField
* @global ${$this->myForm->getDataArrName()}
* @version pk-07-11-29 $fldMode added
* @version pk-08-02-06 jOCSP
function getFieldTag(&$aField,$debug=
False,$fldMode=-
1)
$str_dataArrName =
$this->getMyForm()->getDataArrName();
global $
{$str_dataArrName};
$
{$str_dataArrName} =
$this->curRow;
$aField->setDataArrName($str_dataArrName);
$aField->setControll($this);
// note order of commands important for group fields
$str_js =
"jOCSP.addFieldObjToFormByHash('" .
$this->jOCSP_getfrmHash() .
"',".
$aField->jOCSP_getFieldObj($debug).
");";
$str_ret =
$aField->getFormFieldTag($fldMode,$m_val,$debug);
if ($obj_ajax =
$this->myForm->ajax_getObj(False))
$obj_ajax->addJsCode($str_js);
<script type=\"text/javascript\" language=\"javascript\">
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// field event methods methods
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Note: don't use unescaped " in $jsCmd
* $jsCmd can be a template which is parsed with the current form values
* @param string $fldType (fldName | fldValue)
* @param string $jsEvent (js event like onClick)
* @param string $jsCmd (js to execute on the event)
* @requires pcf_templates.phpinc
foreach($this->frmFldEvents[$fldType] as $str_event =>
$str_jsCmd)
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns an arry with the database and form default values
* if $asCurRow the default values are merged with none empty values in $this->curRow
* $this->rowPopulateTS is set
* @param boolean $asCurRow
if ($obj_tblObj =
$this->myForm->getMyTblObj(True))
$arr_defaults =
$obj_tblObj->getDefaults();
// set values which are set in table object
$arr_objVals =
$obj_tblObj->getDBVal();
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p>table object set values:</p><pre>" .
print_r($arr_objVals,True) .
"</pre>");
foreach($arr_objVals as $str_colName =>
$mix_value)
$arr_defaults[$str_colName] =
$mix_value;
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p><strong>DB Defaults:</strong></p><pre>" .
print_r($arr_defaults,True) .
"</pre>");
$arr_flds=
$this->myForm->getFields();
foreach($arr_flds as &$obj_fld)
if ($m_default=
$obj_fld->getDefaultValue())
//if ($debug) echoDebugLine(__FILE__,__LINE__,"Field: " . $obj_fld->getName() . " Default: >" . $m_default . "<");
$arr_defaults[$obj_fld->getName()]=
$m_default;
//if ($debug) echoDebugLine(__FILE__,__LINE__,"<p><strong>\$arr_defaults:</strong> with Form Field defaults</p><pre>" . print_r($arr_defaults,True) . "</pre>");
foreach($arr_defaults as $s_key =>
$m_val)
if (!isset
($this->curRow[$s_key]) ||
empty($this->curRow[$s_key]))
$this->curRow[$s_key]=
$arr_defaults[$s_key];
//if ($debug) echoDebugLine(__FILE__,__LINE__,"<p><strong>\${".get_class($this)."}->curRow:</strong> with set</p><pre>" . print_r($this->curRow,True) . "</pre>");
foreach($this->myFilter as $str_col =>
$mix_value)
if (!isset
($this->curRow[$str_col]) ||
empty($this->curRow[$str_col]))
$this->curRow[$str_col] =
$mix_value;
global $
{$this->myForm->getDataArrName()};
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<p>Defaults:</p><pre>" .
print_r($arr_defaults,true) .
"</pre>");
* populates one row from the database
* if a tableobject is set it is populated (if not already done)
* @param array $filterAdd
* @todo for more than one table
* @global {$this->myForm->getDataArrName()}
global $
{$this->myForm->getDataArrName()};
if ($obj_tblObj =
$this->myForm->getMyTblObj(True,$debug))
if (!$obj_tblObj->isPopulated())
if ($debug) echoDebugMethod(__FILE__
,__LINE__
,"table object is not populated");
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h3>NO FILTER SET</h3>");
$this->myForm->setError($this->myForm->getLangTxt('NO_FILTER_SET'));
foreach($this->myFilter as $str_col =>
$m_val)
$obj_tblObj->db_SetKey($str_col,$m_val);
foreach($filterAdd as $str_col =>
$m_val)
$obj_tblObj->db_SetKey($str_col,$m_val);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"setting default values as populated");
if (!$obj_tblObj->dbPopulate())
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"\$obj_tblObj is populated");
$this->curRow=
$obj_tblObj->dbGetDataArray($this->myForm->getTables(),$arr_filter,True,$debug);
if ($arr_keys=
$obj_tblObj->getKeyArr())
foreach($arr_keys as $str_col =>
$arr_desc)
if (isset
($this->curRow[$str_col]))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"\n\n-------------could not populate row-------------------\n\n\n\n");
* sets the form row values from an array
foreach($valArr as $str_key =>
$str_val)
if ($obj_field =
$this->myForm->getField($str_key))
$this->curRow[$str_key] =
$obj_field->getValue($str_val,$arr_dummy);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$this->getMyForm(); // ensure $this->myForm is set.
$this->myForm->setFrmMode($mode); // to be sure it's set in case the method is not called from $this->myForm
if ($obj_tblObj=
$this->myForm->getMyTblObj(True,$debug))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"\n\n\n\n\n\nTable object found: " .
get_class($obj_tblObj) .
"\n\n\n\n\n\n");
// error handling should be done in populateRow
// error handling should be done in populateRow
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h2>could not populate row</h2>");
$str_serKey =
print_r($obj_tblObj->getDBRow(),True);
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<strong>delete key:</strong>".
$data['DELKEY'] .
"<br />" .
md5($str_serKey) .
" class: " .
get_class($obj_tblObj) .
"<pre>{$str_serKey}</pre>");
return ($data['DELKEY'] ==
md5($str_serKey));
throw
new Exception('UNKNOWN FORM MODE');
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<hr><h2>\$data: </h2><pre>".
print_r($data,true).
"</pre>");
$GLOBALS[$this->myForm->getDataArrName()]=
&$data;
if ($arr_blocks=
$this->myForm->getBlocks())
foreach($arr_blocks as $int_blockId =>
&$obj_block)
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h1>Checking Block: ".
$obj_block->getName().
"</h1>");
if ($obj_block->isToShow($this->myForm->getFrmMode()))
$b_return=
($b_return &&
$b_blockOk);
echoDebugLine(__FILE__
,__LINE__
,"<p>Block is not to show in mode: ".
$this->myForm->getFrmMode());
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h3>calling parent::vaildateSubmit()</h3>");
* save the row to the database
* @version pk-08-06-26 passthrough fields
if ($arr_passthrough =
$this->myForm->getPassThroughFields()) // <pk-06-08-26>
foreach($arr_passthrough as $str_col =>
$mix_val)
$this->curRow[$str_col] =
$mix_val;
if ($obj_tblObj=
$this->myForm->getMyTblObj(True,$debug))
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"<h3>using tableobject <strong>" .
get_class($obj_tblObj) .
"</strong> to save</h3>");
switch($this->myForm->getFrmMode())
$this->myForm->setError($this->myForm->getLangTxt('CAN_NOT_UPDATE_ROW').
":".
$this->myForm->getLangTxt('ROW_IS_NOT_POPULATED'));
if ($debug) echoDebugLine(__FILE__
,__LINE__
,"VALUES: <pre>".
print_r($obj_tblObj->getDBVal(),True).
"</pre>");
if ($mix_ret =
$obj_tblObj->dbReplace($debug))
// merge curRow with dbValues to get the values
// manipulated on replace
// <<<<<<<<<<<<<<<<<<<<<<<<<
// <<<<<<<<<<<<<<<<<<<<<<<<<
if ($mix_ret =
$obj_tblObj->dbInsert($debug))
// <<<<<<<<<<<<<<<<<<<<<<<<<
// <<<<<<<<<<<<<<<<<<<<<<<<<
$obj_tblObj->dbDelete(true,$debug);
// <<<<<<<<<<<<<<<<<<<<<<<<<
// <<<<<<<<<<<<<<<<<<<<<<<<<
// <<<<<<<<<<<<<<<<<<<<<<<<<
// <<<<<<<<<<<<<<<<<<<<<<<<<
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* returns if the current user can save the form in the current mode
if ($obj_tblObj=
$this->myForm->getMyTblObj(True,$debug))
//$obj_tblObj->setDBVal($this->getCurRow(),$debug); // <pk-08-01-14> ensure the object has dataset.
switch($this->myForm->getFrmMode())
if (!$obj_tblObj->curUserCanInsert()) return False;
if (!$obj_tblObj->curUserCanEdit()) return False;
if (!$obj_tblObj->curUserCanDelete()) return False;
return $this->checkRights($this->myForm->getFrmMode(),$GLOBALS['OCSP_OBJ']['USER'],$debug);
} // end of OCSP_FRMCONTR_FORM
Documentation generated on Thu, 08 Jan 2009 17:46:23 +0100 by phpDocumentor 1.4.0a2