function readWebValue(&$avalues, &$blobfields, $legacy1, $legacy2, &$filename_values) { $this->getPostValueAndType(); if (FieldSubmitted($this->goodFieldName . "_" . $this->id)) { $this->webValue = prepare_for_db($this->field, $this->webValue, $this->webType); } else { $this->webValue = false; } if ($this->pageObject->pageType == PAGE_EDIT && $this->pageObject->pSetEdit->isReadonly($this->field)) { if ($this->pageObject->pSetEdit->getAutoUpdateValue($this->field)) { $this->webValue = $this->pageObject->pSetEdit->getAutoUpdateValue($this->field); } else { if ($this->pageObject->pSetEdit->getOwnerTable($this->field) != $this->pageObject->pSetEdit->getStrOriginalTableName()) { $this->webValue = false; } } } if (!($this->webValue === false)) { if ($this->connection->dbType == nDATABASE_Informix) { if (IsTextType($this->pageObject->pSetEdit->getFieldType($this->field))) { $blobfields[] = $this->field; } } $avalues[$this->field] = $this->webValue; } }
$value = false; } if (!($value === false)) { if (0 && "Serial Num" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Serial Num"] = $value; } } // processibng Serial Num - end // processing Entry Date - start $inlineAddOption = true; if ($inlineAddOption) { $value = postvalue("value_Entry_Date_" . $id); $type = postvalue("type_Entry_Date_" . $id); if (FieldSubmitted("Entry Date_" . $id)) { $value = prepare_for_db("Entry Date", $value, $type); } else { $value = false; } if (!($value === false)) { if (0 && "Entry Date" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Entry Date"] = $value; } } // processibng Entry Date - end // insert masterkey value if exists and if not specified if (@$_SESSION[$sessionPrefix . "_mastertable"] == "dbo.LU_Module Condition") { if (postvalue("masterkey1")) {
if ($inlineadd == ADD_SIMPLE || $inlineadd == ADD_MASTER || $inlineadd == ADD_POPUP) { if ($pageObject->captchaExists()) { $pageObject->doCaptchaCode(); } } // insert new record if we have to if (@$_POST["a"] == "added") { $afilename_values = array(); $avalues = array(); $blobfields = array(); // processing Type - start $inlineAddOption = true; if ($inlineAddOption) { $value = postvalue("value_Type_" . $id); $type = postvalue("type_Type_" . $id); if (FieldSubmitted("Type_" . $id)) { $value = prepare_for_db("Type", $value, $type); } else { $value = false; } if (!($value === false)) { if (0 && "Type" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Type"] = $value; } } // processibng Type - end $failed_inline_add = false; // add filenames to values foreach ($afilename_values as $akey => $value) {
function readWebValue(&$avalues, &$blobfields, $strWhereClause, $oldValuesRead, &$filename_values) { $filename = ""; $this->getPostValueAndType(); if (FieldSubmitted($this->goodFieldName . "_" . $this->id)) { $fileNameForPrepareFunc = securityCheckFileName(postvalue("filename_" . $this->goodFieldName . "_" . $this->id)); if ($this->pageObject->pageType != PAGE_EDIT) { $prepearedFile = prepare_file($this->webValue, $this->field, "file2", $fileNameForPrepareFunc, $this->id); if ($prepearedFile !== false) { $this->webValue = $prepearedFile["value"]; $filename = $prepearedFile["filename"]; } else { $this->webValue = false; } } else { if (substr($this->webType, 0, 4) == "file") { $prepearedFile = prepare_file($this->webValue, $this->field, $this->webType, $fileNameForPrepareFunc, $this->id); if ($prepearedFile !== false) { $this->webValue = $prepearedFile["value"]; $filename = $prepearedFile["filename"]; } else { $this->webValue = false; } } else { if (substr($this->webType, 0, 6) == "upload") { if ($this->webType == "upload1") { // file deletion, read filename from the database if (!$oldValuesRead) { $rsold = db_query($this->pageObject->gQuery->gSQLWhere($strWhereClause), $this->conn); $dataold = db_fetch_array($rsold); $oldValuesRead = true; } $fileNameForPrepareFunc = $dataold[$this->field]; } $this->webValue = prepare_upload($this->field, $this->webType, $fileNameForPrepareFunc, $this->webValue, "", $this->id, $this->pageObject); } } } } else { $this->webValue = false; } if (!($this->webValue === false)) { if ($this->webValue) { if ($this->pageObject->pSetEdit->getCreateThumbnail($this->field)) { $ext = CheckImageExtension(GetUploadedFileName("value_" . $this->goodFieldName . "_" . $this->id)); $thumb = CreateThumbnail($this->webValue, $this->pageObject->pSetEdit->getThumbnailSize($this->field), $ext); $blobfields[] = $this->pageObject->pSetEdit->getStrThumbnail($this->field); $avalues[$blobfields[count($blobfields) - 1]] = $thumb; } if ($this->pageObject->pSetEdit->getResizeOnUpload($this->field)) { $ext = CheckImageExtension(GetUploadedFileName("value_" . $this->goodFieldName . "_" . $this->id)); $this->webValue = CreateThumbnail($this->webValue, $this->pageObject->pSetEdit->getNewImageSize($this->field), $ext); } } else { if ($this->pageObject->pageType == PAGE_EDIT && $this->pageObject->pSetEdit->getCreateThumbnail($this->field)) { $blobfields[] = $this->pageObject->pSetEdit->getStrThumbnail($this->field); $avalues[$blobfields[count($blobfields) - 1]] = ""; } } $blobfields[] = $this->field; $avalues[$this->field] = $this->webValue; } if ($filename && $this->pageObject->pSetEdit->getStrFilename($this->field)) { $filename_values[$this->pageObject->pSetEdit->getStrFilename($this->field)] = $filename; } }
if (@$_POST["a"] == "edited") { $strWhereClause = whereAdd($strWhereClause, KeyWhere($keys)); $oldValuesRead = false; if ($eventObj->exists("AfterEdit") || $eventObj->exists("BeforeEdit") || $auditObj) { // read old values $rsold = db_query(gSQLWhere($strWhereClause), $conn); $dataold = db_fetch_array($rsold); $oldValuesRead = true; } $evalues = $efilename_values = $blobfields = array(); // processing Location - begin $condition = 1; if ($condition) { $value = postvalue("value_Location_" . $id); $type = postvalue("type_Location_" . $id); if (FieldSubmitted("Location_" . $id)) { $value = prepare_for_db("Location", $value, $type); } else { $value = false; } if ($value !== false) { if (0 && "Location" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["Location"] = $value; } } // processing Location - end foreach ($efilename_values as $ekey => $value) { $evalues[$ekey] = $value; }
$value = false; } if ($value !== false) { if (0 && "Location" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["Location"] = $value; } } // processing Location - end // processing Customer Type - begin $condition = 1; if ($condition) { $value = postvalue("value_Customer_Type_" . $id); $type = postvalue("type_Customer_Type_" . $id); if (FieldSubmitted("Customer Type_" . $id)) { $value = prepare_for_db("Customer Type", $value, $type); } else { $value = false; } if ($value !== false) { if (0 && "Customer Type" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["Customer Type"] = $value; } } // processing Customer Type - end foreach ($efilename_values as $ekey => $value) { $evalues[$ekey] = $value; }
$value = false; } if (!($value === false)) { if (0 && "Customer ID" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Customer ID"] = $value; } } // processibng Customer ID - end // processing Module ID - start $inlineAddOption = true; if ($inlineAddOption) { $value = postvalue("value_Module_ID_" . $id); $type = postvalue("type_Module_ID_" . $id); if (FieldSubmitted("Module ID_" . $id)) { $value = prepare_for_db("Module ID", $value, $type); } else { $value = false; } if (!($value === false)) { if (0 && "Module ID" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Module ID"] = $value; } } // processibng Module ID - end // insert masterkey value if exists and if not specified if (@$_SESSION[$sessionPrefix . "_mastertable"] == "dbo.Customers") { if (postvalue("masterkey1")) {
if (@$_POST["a"] == "edited") { $strWhereClause = whereAdd($strWhereClause, KeyWhere($keys)); $oldValuesRead = false; if ($eventObj->exists("AfterEdit") || $eventObj->exists("BeforeEdit") || $auditObj) { // read old values $rsold = db_query(gSQLWhere($strWhereClause), $conn); $dataold = db_fetch_array($rsold); $oldValuesRead = true; } $evalues = $efilename_values = $blobfields = array(); // processing Tamper Type - begin $condition = 1; if ($condition) { $value = postvalue("value_Tamper_Type_" . $id); $type = postvalue("type_Tamper_Type_" . $id); if (FieldSubmitted("Tamper Type_" . $id)) { $value = prepare_for_db("Tamper Type", $value, $type); } else { $value = false; } if ($value !== false) { if (0 && "Tamper Type" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["Tamper Type"] = $value; } } // processing Tamper Type - end foreach ($efilename_values as $ekey => $value) { $evalues[$ekey] = $value; }
/** * */ function readWebValue(&$avalues, &$blobfields, $legacy1, $legacy2, &$filename_values) { $this->getPostValueAndType(); if (FieldSubmitted($this->goodFieldName . "_" . $this->id)) { $fileNameForPrepareFunc = securityCheckFileName(postvalue("filename_" . $this->goodFieldName . "_" . $this->id)); if ($this->pageObject->pageType != PAGE_EDIT) { $this->webValue = prepare_upload($this->field, "upload2", $fileNameForPrepareFunc, $fileNameForPrepareFunc, "", $this->id, $this->pageObject); } else { if (substr($this->webType, 0, 4) == "file") { $prepearedFile = prepare_file($this->webValue, $this->field, $this->webType, $fileNameForPrepareFunc, $this->id); if ($prepearedFile !== false) { $this->webValue = $prepearedFile["value"]; $filename = $prepearedFile["filename"]; } else { $this->webValue = false; } } else { if (substr($this->webType, 0, 6) == "upload") { if ($fileNameForPrepareFunc) { $this->webValue = $fileNameForPrepareFunc; } if ($this->webType == "upload1") { // file deletion, read filename from the database $oldValues = $this->pageObject->getOldRecordData(); $fileNameForPrepareFunc = $oldValues[$this->field]; } $this->webValue = prepare_upload($this->field, $this->webType, $fileNameForPrepareFunc, $this->webValue, "", $this->id, $this->pageObject); } } } } else { $this->webValue = false; } if (!($this->webValue === false)) { if ($this->webValue && $this->pageObject->pSetEdit->getCreateThumbnail($this->field)) { $contents = GetUploadedFileContents("value_" . $this->goodFieldName . "_" . $this->id); $ext = CheckImageExtension(GetUploadedFileName("value_" . $this->goodFieldName . "_" . $this->id)); $thumb = CreateThumbnail($contents, $this->pageObject->pSetEdit->getThumbnailSize($this->field), $ext); $this->pageObject->filesToSave[] = new SaveFile($thumb, $this->pageObject->pSetEdit->GetStrThumbnail($this->field) . $this->webValue, $this->pageObject->pSetEdit->getUploadFolder($this->field), $this->pageObject->pSetEdit->isAbsolute($this->field)); } $avalues[$this->field] = $this->webValue; } }
if (@$_POST["a"] == "edited") { $strWhereClause = whereAdd($strWhereClause, KeyWhere($keys)); $oldValuesRead = false; if ($eventObj->exists("AfterEdit") || $eventObj->exists("BeforeEdit") || $auditObj) { // read old values $rsold = db_query(gSQLWhere($strWhereClause), $conn); $dataold = db_fetch_array($rsold); $oldValuesRead = true; } $evalues = $efilename_values = $blobfields = array(); // processing Condition - begin $condition = 1; if ($condition) { $value = postvalue("value_Condition_" . $id); $type = postvalue("type_Condition_" . $id); if (FieldSubmitted("Condition_" . $id)) { $value = prepare_for_db("Condition", $value, $type); } else { $value = false; } if ($value !== false) { if (0 && "Condition" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["Condition"] = $value; } } // processing Condition - end foreach ($efilename_values as $ekey => $value) { $evalues[$ekey] = $value; }
$value = false; } if ($value !== false) { if (0 && "IsSync" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["IsSync"] = $value; } } // processing IsSync - end // processing Currunt Readings - begin $condition = 1; if ($condition) { $value = postvalue("value_Currunt_Readings_" . $id); $type = postvalue("type_Currunt_Readings_" . $id); if (FieldSubmitted("Currunt Readings_" . $id)) { $value = prepare_for_db("Currunt Readings", $value, $type); } else { $value = false; } if ($value !== false) { if (0 && "Currunt Readings" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["Currunt Readings"] = $value; } } // processing Currunt Readings - end foreach ($efilename_values as $ekey => $value) { $evalues[$ekey] = $value; }
if (@$_POST["a"] == "edited") { $strWhereClause = whereAdd($strWhereClause, KeyWhere($keys)); $oldValuesRead = false; if ($eventObj->exists("AfterEdit") || $eventObj->exists("BeforeEdit") || $auditObj) { // read old values $rsold = db_query(gSQLWhere($strWhereClause), $conn); $dataold = db_fetch_array($rsold); $oldValuesRead = true; } $evalues = $efilename_values = $blobfields = array(); // processing Module Type - begin $condition = 1; if ($condition) { $value = postvalue("value_Module_Type_" . $id); $type = postvalue("type_Module_Type_" . $id); if (FieldSubmitted("Module Type_" . $id)) { $value = prepare_for_db("Module Type", $value, $type); } else { $value = false; } if ($value !== false) { if (0 && "Module Type" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["Module Type"] = $value; } } // processing Module Type - end foreach ($efilename_values as $ekey => $value) { $evalues[$ekey] = $value; }
function readWebValue(&$avalues, &$blobfields, $strWhereClause, $oldValuesRead, &$filename_values) { $this->getPostValueAndType(); if (FieldSubmitted($this->goodFieldName."_".$this->id)) $this->webValue = prepare_for_db($this->field, $this->webValue, $this->webType); else $this->webValue = false; if($this->pageObject->pageType == PAGE_EDIT && $this->pageObject->pSetEdit->isReadonly($this->field)) { if( $this->pageObject->pSetEdit->getAutoUpdateValue($this->field) ) $this->webValue = $this->pageObject->pSetEdit->getAutoUpdateValue($this->field); else if($this->pageObject->pSetEdit->getOwnerTable($this->field) != $this->pageObject->pSetEdit->getStrOriginalTableName()) $this->webValue = false; } if(!($this->webValue===false)) { $avalues[$this->field] = $this->webValue; } }
function readWebValue(&$avalues, &$blobfields, $strWhereClause, $oldValuesRead, &$filename_values = null) { $this->getPostValueAndType(); if (FieldSubmitted($this->goodFieldName . "_" . $this->id)) { $fileNameForPrepareFunc = securityCheckFileName(postvalue("filename_" . $this->goodFieldName . "_" . $this->id)); if ($this->pageObject->pageType != PAGE_EDIT) { $this->webValue = prepare_upload($this->field, "upload2", $fileNameForPrepareFunc, $fileNameForPrepareFunc, "", $this->id, $this->pageObject); } else { if (substr($this->webType, 0, 4) == "file") { $prepearedFile = prepare_file($this->webValue, $this->field, $this->webType, $fileNameForPrepareFunc, $this->id); if ($prepearedFile !== false) { $this->webValue = $prepearedFile["value"]; $filename = $prepearedFile["filename"]; } else { $this->webValue = false; } } else { if (substr($this->webType, 0, 6) == "upload") { if ($fileNameForPrepareFunc) { $this->webValue = $fileNameForPrepareFunc; } if ($this->webType == "upload1") { // file deletion, read filename from the database if (!$oldValuesRead) { $rsold = db_query($this->pageObject->gQuery->gSQLWhere($strWhereClause), $this->conn); $dataold = db_fetch_array($rsold); $oldValuesRead = true; } $fileNameForPrepareFunc = $dataold[$this->field]; } $this->webValue = prepare_upload($this->field, $this->webType, $fileNameForPrepareFunc, $this->webValue, "", $this->id, $this->pageObject); } } } } else { $this->webValue = false; } if (!($this->webValue === false)) { if ($this->pageObject->pSet->getResizeOnUpload($this->field) || $this->pageObject->pSet->getCreateThumbnail($this->field)) { $contents = GetUploadedFileContents("value_" . $this->goodFieldName . "_" . $this->id); } if ($this->webValue && $this->pageObject->pSet->getCreateThumbnail($this->field)) { $ext = CheckImageExtension(GetUploadedFileName("value_" . $this->goodFieldName . "_" . $this->id)); $thumb = CreateThumbnail($contents, $this->pageObject->pSet->getThumbnailSize($this->field), $ext); $this->pageObject->filesToSave[] = new SaveFile($thumb, $this->pageObject->pSet->GetStrThumbnail($this->goodFieldName) . $this->webValue, $this->pageObject->pSet->getUploadFolder($this->field), $this->pageObject->pSet->isAbsolute($this->field)); } $avalues[$this->field] = $this->webValue; } }
$value = false; } if (!($value === false)) { if (0 && "User Name" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["User Name"] = $value; } } // processibng User Name - end // processing Role - start $inlineAddOption = true; if ($inlineAddOption) { $value = postvalue("value_Role_" . $id); $type = postvalue("type_Role_" . $id); if (FieldSubmitted("Role_" . $id)) { $value = prepare_for_db("Role", $value, $type); } else { $value = false; } if (!($value === false)) { if (0 && "Role" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Role"] = $value; } } // processibng Role - end // insert masterkey value if exists and if not specified if (@$_SESSION[$sessionPrefix . "_mastertable"] == "dbo.User Roles") { if (postvalue("masterkey1")) {
if (@$_POST["a"] == "edited") { $strWhereClause = whereAdd($strWhereClause, KeyWhere($keys)); $oldValuesRead = false; if ($eventObj->exists("AfterEdit") || $eventObj->exists("BeforeEdit") || $auditObj) { // read old values $rsold = db_query(gSQLWhere($strWhereClause), $conn); $dataold = db_fetch_array($rsold); $oldValuesRead = true; } $evalues = $efilename_values = $blobfields = array(); // processing PerUnit Price - begin $condition = 1; if ($condition) { $value = postvalue("value_PerUnit_Price_" . $id); $type = postvalue("type_PerUnit_Price_" . $id); if (FieldSubmitted("PerUnit Price_" . $id)) { $value = prepare_for_db("PerUnit Price", $value, $type); } else { $value = false; } if ($value !== false) { if (0 && "PerUnit Price" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $evalues["PerUnit Price"] = $value; } } // processing PerUnit Price - end foreach ($efilename_values as $ekey => $value) { $evalues[$ekey] = $value; }
$value = false; } if (!($value === false)) { if (0 && "Bill Amount" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Bill Amount"] = $value; } } // processibng Bill Amount - end // processing Due Date - start $inlineAddOption = true; if ($inlineAddOption) { $value = postvalue("value_Due_Date_" . $id); $type = postvalue("type_Due_Date_" . $id); if (FieldSubmitted("Due Date_" . $id)) { $value = prepare_for_db("Due Date", $value, $type); } else { $value = false; } if (!($value === false)) { if (0 && "Due Date" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Due Date"] = $value; } } // processibng Due Date - end $failed_inline_add = false; // add filenames to values foreach ($afilename_values as $akey => $value) {
if ($inlineadd == ADD_SIMPLE || $inlineadd == ADD_MASTER || $inlineadd == ADD_POPUP) { if ($pageObject->captchaExists()) { $pageObject->doCaptchaCode(); } } // insert new record if we have to if (@$_POST["a"] == "added") { $afilename_values = array(); $avalues = array(); $blobfields = array(); // processing Action - start $inlineAddOption = true; if ($inlineAddOption) { $value = postvalue("value_Action_" . $id); $type = postvalue("type_Action_" . $id); if (FieldSubmitted("Action_" . $id)) { $value = prepare_for_db("Action", $value, $type); } else { $value = false; } if (!($value === false)) { if (0 && "Action" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Action"] = $value; } } // processibng Action - end $failed_inline_add = false; // add filenames to values foreach ($afilename_values as $akey => $value) {
function readWebValue(&$avalues, &$blobfields, $legacy1, $legacy2, &$filename_values) { $this->getPostValueAndType(); $this->formStamp = postvalue("formStamp_" . $this->goodFieldName . "_" . $this->id); if (FieldSubmitted($this->goodFieldName . "_" . $this->id) && $this->formStamp != "") { $filesArray = my_json_decode($this->webValue); if (!is_array($filesArray) || count($filesArray) == 0) { $this->webValue = ""; } else { if (count($_SESSION["mupload_" . $this->formStamp]) > 0) { foreach ($_SESSION["mupload_" . $this->formStamp] as $fileArray) { $fileArray["deleted"] = true; } } $result = array(); $uploadDir = $this->pageObject->pSetEdit->getLinkPrefix($this->field); $searchStr = ""; foreach ($filesArray as $file) { if (isset($_SESSION["mupload_" . $this->formStamp][$file["name"]])) { $sessionFile = $_SESSION["mupload_" . $this->formStamp][$file["name"]]["file"]; $searchStr .= $file["name"] . ",!"; $result[] = array("name" => $sessionFile["name"], "usrName" => $file["name"], "size" => $sessionFile["size"], "type" => $sessionFile["type"]); if ($this->pageObject->pSetEdit->getCreateThumbnail($this->field) && $sessionFile["thumbnail"] != "") { $lastIndex = count($result) - 1; $result[$lastIndex]["thumbnail"] = $sessionFile["thumbnail"]; $result[$lastIndex]["thumbnail_type"] = $sessionFile["thumbnail_type"]; $result[$lastIndex]["thumbnail_size"] = $sessionFile["thumbnail_size"]; } $_SESSION["mupload_" . $this->formStamp][$file["name"]]["deleted"] = false; } } if (count($result) > 0) { $result[0]["searchStr"] = $searchStr . ":sStrEnd"; $this->webValue = my_json_encode_unescaped_unicode($result); } else { $this->webValue = ""; } } } else { $this->webValue = false; } if (!($this->webValue === false)) { if ($this->connection->dbType == nDATABASE_Informix) { if (IsTextType($this->pageObject->pSetEdit->getFieldType($this->field))) { $blobfields[] = $this->field; } } $avalues[$this->field] = $this->webValue; } }
if ($inlineadd == ADD_SIMPLE || $inlineadd == ADD_MASTER || $inlineadd == ADD_POPUP) { if ($pageObject->captchaExists()) { $pageObject->doCaptchaCode(); } } // insert new record if we have to if (@$_POST["a"] == "added") { $afilename_values = array(); $avalues = array(); $blobfields = array(); // processing Status - start $inlineAddOption = true; if ($inlineAddOption) { $value = postvalue("value_Status_" . $id); $type = postvalue("type_Status_" . $id); if (FieldSubmitted("Status_" . $id)) { $value = prepare_for_db("Status", $value, $type); } else { $value = false; } if (!($value === false)) { if (0 && "Status" == "Password" && $url_page == "admin_users_") { $value = md5($value); } $avalues["Status"] = $value; } } // processibng Status - end $failed_inline_add = false; // add filenames to values foreach ($afilename_values as $akey => $value) {