<?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 = "";
    }
Exemple #2
0
<?php

require_once 'include/utils/utils.php';
require_once 'modules/Maillists/Maillists.php';
require_once 'modules/Fenzu/Fenzu.php';
require_once 'modules/Accounts/Accounts.php';
require_once "modules/Webmails/inc/class.smtp.php";
global $adb, $current_user;
global $currentModule;
$focus = new Maillists();
$oFenzu = new Fenzu("Maillists");
$focus_acc = new Accounts();
$nowdate = date("Y-m-d");
$nowdatetime = date("Y-m-d H:i:s");
$sjid = $_REQUEST["sjid"];
$subject = $_REQUEST["subject"];
$mailcontent = $_REQUEST["mailcontent"];
$from_name = $_REQUEST['from_name'];
$from_email = $_REQUEST['from_email'];
if (preg_match("/[\$a-zA-Z0-9\$]{1}/", $mailcontent)) {
    $msflag = 0;
    $messinfos = explode('$', $mailcontent);
} else {
    $msflag = 1;
}
$accountidstr = $_REQUEST["accountidstr"];
if (preg_match("/\\,/", $accountidstr)) {
    $accountidstr = substr($accountidstr, 0, -1);
}
$accountidarr = explode(',', $accountidstr);
foreach ($accountidarr as $accountinfostr) {
Exemple #3
0
<?php

require_once 'data/Tracker.php';
require_once 'include/CRMSmarty.php';
require_once 'modules/Maillists/Maillists.php';
require_once 'modules/Maillists/ModuleConfig.php';
require_once 'include/utils/utils.php';
global $app_strings;
global $mod_strings;
global $currentModule;
$focus = new Maillists();
if (isset($_REQUEST['record'])) {
    $focus->retrieve_entity_info($_REQUEST['record'], "Maillists");
    $focus->id = $_REQUEST['record'];
    $focus->name = $focus->column_fields['maillistname'];
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
}
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$log->info("Maillist detail view");
//客户处理
$acc_arr = array();
$accountidstr = $focus->column_fields['accountid'];
$accountidarr = explode(",", $accountidstr);
if (is_array($accountidarr)) {
    foreach ($accountidarr as $accountid) {
        if (!empty($accountid)) {
Exemple #4
0
if (isset($_REQUEST['return_viewname'])) {
    $return_viewname = $_REQUEST['return_viewname'];
}
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='" . $_REQUEST['record'] . "'";
    $result = $adb->query($sql);
    $approved = $adb->query_result($result, 0, "approved");
    if ($approved == 1) {
        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 Maillists();
$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'], "Maillists");
    $focus->name = $focus->column_fields['maillistname'];
    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) {
$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";
    }
}