$ajaxaction = $_REQUEST["ajxaction"]; if ($ajaxaction == "DETAILVIEW") { $crmid = $_REQUEST["recordid"]; $tablename = $_REQUEST["tableName"]; $fieldname = $_REQUEST["fldName"]; $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); if ($crmid != "") { if ((!isset($is_disable_approve) || isset($is_disable_approve) && !$is_disable_approve) && (isset($module_enable_approve) && $module_enable_approve)) { $sql = "select approved from ec_memdays where deleted=0 and memdaysid='" . $crmid . "'"; $result = $adb->query($sql); $approved = $adb->query_result($result, 0, "approved"); if ($approved == 1) { echo ":#:FAILURE"; die; } } $modObj = new Memdays(); $modObj->retrieve_entity_info($crmid, "Memdays"); $modObj->column_fields[$fieldname] = $fieldvalue; $modObj->id = $crmid; $modObj->mode = "edit"; $modObj->save("Memdays"); if ($modObj->id != "") { echo ":#:SUCCESS"; } else { echo ":#:FAILURE"; } } else { echo ":#:FAILURE"; } }
$return_action = $_REQUEST['return_action']; global $rstart; //Added to fix 4600 $url = getBasic_Advance_SearchURL(); if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') { $rstart = "&start=" . $_REQUEST['start']; } $quickedit_field = $_REQUEST['quickedit_field']; $quickedit_value = $_REQUEST['quickedit_value']; global $log; $log->info("quickedit_field=" . $quickedit_field . ",quickedit_value=" . $quickedit_value); if (isset($idlist)) { $recordids = explode(';', $idlist); $_REQUEST['ajxaction'] = "DETAILVIEW"; for ($index = 0; $index < count($recordids); ++$index) { $recordid = $recordids[$index]; $log->info("recordid=" . $recordid); if ($recordid == '') { continue; } // Save each module record with update value. $focus = new Memdays(); $focus->retrieve_entity_info($recordid, 'Memdays'); $focus->mode = 'edit'; $focus->id = $recordid; $focus->column_fields[$quickedit_field] = $quickedit_value; $focus->save('Memdays'); // END } } redirect("index.php?module={$return_module}&action=" . $return_module . "Ajax&file=ListView&ajax=changestate" . $rstart . "&viewname=" . $viewid . "&errormsg=" . $errormsg . $url);