********************************************************************************/
// ITS4YOU TT0093 VlMe N
require_once 'Smarty_setup.php';
require_once 'data/Tracker.php';
require_once 'include/utils/UserInfoUtil.php';
require_once 'include/database/PearDatabase.php';
global $adb;
global $log;
global $mod_strings;
global $app_strings;
global $current_language, $current_user;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$log->info("Inside Email Template Detail View");
$smarty = new vtigerCRM_smarty();
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("MOD", $mod_strings);
$smarty->assign("MODULE", 'Tools');
$smarty->assign("IMAGE_PATH", $image_path);
if (isset($_REQUEST['templateid']) && $_REQUEST['templateid'] != '') {
    $log->info("The templateid is set");
    $tempid = $_REQUEST['templateid'];
    $sql = "SELECT vtiger_pdfmaker.*, vtiger_pdfmaker_settings.*\n              FROM vtiger_pdfmaker \n              LEFT JOIN vtiger_pdfmaker_settings\n                ON vtiger_pdfmaker_settings.templateid = vtiger_pdfmaker.templateid\n             WHERE vtiger_pdfmaker.templateid=?";
    $result = $adb->pquery($sql, array($tempid));
    $pdftemplateResult = $adb->fetch_array($result);
    $smarty->assign("FILENAME", $pdftemplateResult["filename"]);
    $smarty->assign("DESCRIPTION", $pdftemplateResult["description"]);
    $smarty->assign("TEMPLATEID", $pdftemplateResult["templateid"]);
    $smarty->assign("MODULENAME", getTranslatedString($pdftemplateResult["module"]));
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
global $log, $default_charset;
$mode = 'create';
if (isset($_REQUEST['templateid']) && $_REQUEST['templateid'] != '') {
    $mode = 'edit';
    $templateid = $_REQUEST['templateid'];
    $log->debug("the templateid is set to the value " . $templateid);
}
$sql = "select * from vtiger_emailtemplates where templateid=?";
$result = $adb->pquery($sql, array($templateid));
$emailtemplateResult = str_replace('"', '"', $adb->fetch_array($result));
$smod_strings = return_module_language($current_language, 'Settings');
//To get Email Template variables -- Pavani
$allOptions = getEmailTemplateVariables();
$smarty = new vtigerCRM_smarty();
$smarty->assign("UMOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme_path);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MOD", $smod_strings);
$smarty->assign("FOLDERNAME", $emailtemplateResult["foldername"]);
$smarty->assign("TEMPLATENAME", $emailtemplateResult["templatename"]);
$smarty->assign("TEMPLATEID", $emailtemplateResult["templateid"]);
$smarty->assign("DESCRIPTION", $emailtemplateResult["description"]);
$smarty->assign("SUBJECT", $emailtemplateResult["subject"]);
$smarty->assign("BODY", $emailtemplateResult["body"]);
$smarty->assign("MODULE", 'Settings');
$smarty->assign("PARENTTAB", getParentTab());
$smarty->assign("EMODE", $mode);
$smarty->assign("ALL_VARIABLES", $allOptions);
示例#3
0
require_once 'data/Tracker.php';
require_once 'include/utils/UserInfoUtil.php';
require_once 'include/database/PearDatabase.php';
global $adb;
global $log;
global $mod_strings;
global $app_strings;
global $current_language, $current_user;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$record = $_REQUEST["record"];
$sql = "SELECT setype FROM vtiger_crmentity WHERE crmid = '" . $record . "'";
$relmodule = $adb->getOne($sql, 0, "setype");
$log->info("Inside Email Template Detail View");
$smarty = new vtigerCRM_smarty();
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("MOD", $mod_strings);
$smarty->assign("MODULE", $relmodule);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("ID", $_REQUEST["record"]);
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
if (is_dir("modules/PDFMaker/mpdf")) {
    if ($is_admin == true || $profileGlobalPermission[2] == 0 || $profileGlobalPermission[1] == 0 || $profileTabsPermission[getTabId("PDFMaker")] == 0) {
        $smarty->assign("ENABLE_PDFMAKER", 'true');
    }
}
$smarty->assign('PDFMAKER_MOD', return_module_language($current_language, "PDFMaker"));
if (!isset($_SESSION["template_languages"]) || $_SESSION["template_languages"] == "") {
    $temp_res = $adb->query("SELECT label, prefix FROM vtiger_language WHERE active=1");
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
*
 ********************************************************************************/
require_once 'Smarty_setup.php';
require_once 'include/utils/utils.php';
require_once 'data/Tracker.php';
require_once 'include/utils/UserInfoUtil.php';
require_once 'include/CustomFieldUtil.php';
global $app_strings;
global $mod_strings;
global $current_language, $default_charset;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smod_strings = return_module_language($current_language, 'Settings');
//To get Email Template variables -- Pavani
$allOptions = getEmailTemplateVariables();
$smarty = new vtigerCRM_smarty();
$smarty->assign("APP", $app_strings);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("THEME", $theme);
$smarty->assign("THEME_PATH", $theme_path);
$smarty->assign("UMOD", $mod_strings);
$smarty->assign("PARENTTAB", getParentTab());
$smarty->assign("ALL_VARIABLES", $allOptions);
$smarty->assign("MOD", $smod_strings);
$smarty->assign("MODULE", 'Settings');
$smarty->display("CreateEmailTemplate.tpl");
*
 ********************************************************************************/
require_once 'Smarty_setup.php';
require_once 'data/Tracker.php';
require_once 'include/utils/UserInfoUtil.php';
require_once 'include/database/PearDatabase.php';
global $adb;
global $log;
global $mod_strings;
global $app_strings;
global $current_language;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$log->info("Inside Email Template Detail View");
$smarty = new vtigerCRM_smarty();
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("UMOD", $mod_strings);
$smod_strings = return_module_language($current_language, 'Settings');
$smarty->assign("MOD", $smod_strings);
$smarty->assign("MODULE", 'Settings');
$smarty->assign("IMAGE_PATH", $image_path);
if (isset($_REQUEST['templateid']) && $_REQUEST['templateid'] != '') {
    $log->info("The templateid is set");
    $tempid = vtlib_purify($_REQUEST['templateid']);
    $sql = "select * from vtiger_emailtemplates where templateid=?";
    $result = $adb->pquery($sql, array($tempid));
    $emailtemplateResult = $adb->fetch_array($result);
}
$smarty->assign("FOLDERNAME", $emailtemplateResult["foldername"]);