Пример #1
0
<?php

require_once 'include/CRMSmarty.php';
require_once 'modules/Maillists/Maillists.php';
require_once 'include/utils/utils.php';
//Redirecting Header for single page layout
require_once 'user_privileges/default_module_view.php';
global $singlepane_view;
if ($singlepane_view == 'true' && $_REQUEST['action'] == 'CallRelatedList') {
    redirect("index.php?action=DetailView&module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "&parenttab=" . $_REQUEST['parenttab']);
} else {
    $focus = new Maillists();
    $currentmodule = $_REQUEST['module'];
    $RECORD = $_REQUEST['record'];
    if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
        $focus->retrieve_entity_info($_REQUEST['record'], "Maillists");
        $focus->id = $_REQUEST['record'];
        $focus->maillistname = $focus->column_fields['maillistname'];
        $log->debug("id is " . $focus->id);
        $log->debug("name is " . $focus->name);
    }
    global $mod_strings;
    global $app_strings;
    global $theme;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    require_once $theme_path . 'layout_utils.php';
    $smarty = new CRMSmarty();
    if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
        $focus->id = "";
    }
Пример #2
0
$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_maillists where deleted=0 and maillistsid='" . $crmid . "'";
            $result = $adb->query($sql);
            $approved = $adb->query_result($result, 0, "approved");
            if ($approved == 1) {
                echo ":#:FAILURE";
                die;
            }
        }
        $modObj = new Maillists();
        $modObj->retrieve_entity_info($crmid, "Maillists");
        $modObj->column_fields[$fieldname] = $fieldvalue;
        $modObj->id = $crmid;
        $modObj->mode = "edit";
        $modObj->save("Maillists");
        if ($modObj->id != "") {
            echo ":#:SUCCESS";
        } else {
            echo ":#:FAILURE";
        }
    } else {
        echo ":#:FAILURE";
    }
}