echo "<script language='javascript'>alert('" . $app_strings["already_approved_noedit"] . "');"; $url = "index.php?module=" . $return_module . "&action=" . $return_action . "&record=" . $return_id . "&return_viewname=" . $return_viewname . "&parenttab=" . $category; echo "document.location.href='" . $url . "';"; echo "</script>"; die; } } $focus = new Memdays(); $smarty = new CRMSmarty(); if (isset($module_enable_product) && $module_enable_product) { $smarty->assign("MODULE_ENABLE_PRODUCT", "true"); } if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') { $focus->id = $_REQUEST['record']; $focus->mode = 'edit'; $focus->retrieve_entity_info($_REQUEST['record'], "Memdays"); $focus->name = $focus->column_fields['memdayname']; if (isset($module_enable_product) && $module_enable_product) { $associated_prod = $focus->getAssociatedProducts(); $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); $smarty->assign("AVAILABLE_PRODUCTS", 'true'); } if (isset($module_enable_approve) && $module_enable_approve) { $approveProcess = getApproveStatus($focus->id); if ($approveProcess == $app_strings['CONSTANTS_APPIN']) { $smarty->assign("APPIN_PROCESS", $approveProcess); } } } $old_id = ''; if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$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);