Initial Commit of AgileBill Open Source
This commit is contained in:
527
modules/email_template/email_template.inc.php
Normal file
527
modules/email_template/email_template.inc.php
Normal file
@@ -0,0 +1,527 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AgileBill - Open Billing Software
|
||||
*
|
||||
* This body of work is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Open AgileBill License
|
||||
* License as published at http://www.agileco.com/agilebill/license1-4.txt
|
||||
*
|
||||
* For questions, help, comments, discussion, etc., please join the
|
||||
* Agileco community forums at http://forum.agileco.com/
|
||||
*
|
||||
* @link http://www.agileco.com/
|
||||
* @copyright 2004-2008 Agileco, LLC.
|
||||
* @license http://www.agileco.com/agilebill/license1-4.txt
|
||||
* @author Tony Landis <tony@agileco.com>
|
||||
* @package AgileBill
|
||||
* @version 1.4.93
|
||||
*/
|
||||
|
||||
/**
|
||||
* include_once(PATH_MODULES.'email_template/email_template.inc.php');
|
||||
* $my = new email_template;
|
||||
* $my->send('newsletter_subscribe', '4d1800b401f5d340f022688de0ac2687', 'f1714072da3c05a220ac3b60a3a57d88', '2', '3');
|
||||
*/
|
||||
class email_template
|
||||
{
|
||||
var $debug=false;
|
||||
|
||||
# Open the constructor for this mod
|
||||
function construct()
|
||||
{
|
||||
# name of this module:
|
||||
$this->module = "email_template";
|
||||
|
||||
# location of the construct XML file:
|
||||
$this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml";
|
||||
|
||||
# open the construct file for parsing
|
||||
$C_xml = new CORE_xml;
|
||||
$construct = $C_xml->xml_to_array($this->xml_construct);
|
||||
|
||||
$this->method = $construct["construct"]["method"];
|
||||
$this->trigger = $construct["construct"]["trigger"];
|
||||
$this->field = $construct["construct"]["field"];
|
||||
$this->table = $construct["construct"]["table"];
|
||||
$this->module = $construct["construct"]["module"];
|
||||
$this->cache = $construct["construct"]["cache"];
|
||||
$this->order_by = $construct["construct"]["order_by"];
|
||||
$this->limit = $construct["construct"]["limit"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
##############################
|
||||
## ADD ##
|
||||
##############################
|
||||
function add($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "add";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->add($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## VIEW ##
|
||||
##############################
|
||||
function view($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "view";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->view($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## UPDATE ##
|
||||
##############################
|
||||
function update($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "update";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->update($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## DELETE ##
|
||||
##############################
|
||||
function delete($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$this->associated_DELETE[] = Array( 'table' => 'email_template_translate',
|
||||
'field' => 'email_template_id');
|
||||
|
||||
$db = new CORE_database;
|
||||
$db->mass_delete($VAR, $this, "");
|
||||
}
|
||||
|
||||
##############################
|
||||
## SEARCH FORM ##
|
||||
##############################
|
||||
function search_form($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "search";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search_form($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## SEARCH ##
|
||||
##############################
|
||||
function search($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "search";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search($VAR, $this, $type);
|
||||
}
|
||||
|
||||
##############################
|
||||
## SEARCH SHOW ##
|
||||
##############################
|
||||
|
||||
function search_show($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "search";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search_show($VAR, $this, $type);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
##############################
|
||||
## SEND EMAIL TEMPLATE ##
|
||||
##############################
|
||||
|
||||
function send($template, $acct, $sql1, $sql2, $sql3, $queue=true)
|
||||
{
|
||||
global $VAR, $C_debug;
|
||||
$db = &DB();
|
||||
|
||||
# Send to admin only?
|
||||
$admin_only = false;
|
||||
if(eregi('admin->', $template)) {
|
||||
$admin_only = true;
|
||||
$template = eregi_replace('admin->', '', $template);
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
### Get the template settings
|
||||
|
||||
$q = "SELECT * FROM ".AGILE_DB_PREFIX."email_template WHERE
|
||||
site_id = ".$db->qstr(DEFAULT_SITE)." AND
|
||||
name = ".$db->qstr($template);
|
||||
$template = $db->Execute($q);
|
||||
if($template->fields['status'] != '1')
|
||||
return;
|
||||
|
||||
$E['priority'] = $template->fields["priority"];
|
||||
|
||||
############################################################
|
||||
### Get the setup_email settings
|
||||
|
||||
if(empty($template->fields["setup_email_id"]))
|
||||
$setup_email_id = DEFAULT_SETUP_EMAIL;
|
||||
else
|
||||
$setup_email_id = $template->fields["setup_email_id"];
|
||||
|
||||
$q = "SELECT * FROM ".AGILE_DB_PREFIX."setup_email WHERE
|
||||
site_id = ".$db->qstr(DEFAULT_SITE)." AND
|
||||
id = ".$db->qstr($setup_email_id);
|
||||
$setup_email = $db->Execute($q);
|
||||
|
||||
### E-mail queue?
|
||||
if($setup_email->fields['queue'] == 1 && $queue)
|
||||
{
|
||||
# Set sql vars
|
||||
if(is_array($sql1)) $sql1 = serialize($sql1);
|
||||
if(is_array($sql2)) $sql2 = serialize($sql2);
|
||||
if(is_array($sql3)) $sql3 = serialize($sql3);
|
||||
if(is_array($VAR)) $var = serialize($VAR);
|
||||
if(@$admin_only)
|
||||
$sql_template = "admin->".$template->fields['name'];
|
||||
else
|
||||
$sql_template = $template->fields['name'];
|
||||
|
||||
# Check that this email is not already in the queue:
|
||||
$q = "SELECT id FROM ".AGILE_DB_PREFIX."email_queue WHERE
|
||||
site_id = ".$db->qstr(DEFAULT_SITE)." AND
|
||||
status = 0 AND
|
||||
account_id = '$acct' AND
|
||||
email_template= ".$db->qstr($sql_template)." AND
|
||||
sql1 = ".$db->qstr(@$sql1)." AND
|
||||
sql2 = ".$db->qstr(@$sql2)." AND
|
||||
sql3 = ".$db->qstr(@$sql3);
|
||||
$duplicates = $db->Execute($q);
|
||||
if($duplicates != false && $duplicates->RecordCount() > 0)
|
||||
return;
|
||||
|
||||
# queue this e-mail:
|
||||
$id = $db->GenID(AGILE_DB_PREFIX.'email_queue_id');
|
||||
$sql = "INSERT INTO ".AGILE_DB_PREFIX."email_queue SET
|
||||
id = $id,
|
||||
site_id = ".DEFAULT_SITE.",
|
||||
date_orig = ".time().",
|
||||
date_last = ".time().",
|
||||
status = 0,
|
||||
account_id = '$acct',
|
||||
email_template= ".$db->qstr($sql_template).",
|
||||
sql1 = ".$db->qstr(@$sql1).",
|
||||
sql2 = ".$db->qstr(@$sql2).",
|
||||
sql3 = ".$db->qstr(@$sql3).",
|
||||
var = ".$db->qstr(@$var);
|
||||
$db->Execute($sql);
|
||||
return;
|
||||
}
|
||||
|
||||
if($setup_email->fields['type'] == 0) {
|
||||
$type = 0;
|
||||
} else {
|
||||
$type = 1;
|
||||
$E['server'] = $setup_email->fields['server'];
|
||||
$E['account'] = $setup_email->fields['username'];
|
||||
$E['password'] = $setup_email->fields['password'];
|
||||
}
|
||||
|
||||
$E['from_name'] = $setup_email->fields['from_name'];
|
||||
$E['from_email'] = $setup_email->fields['from_email'];
|
||||
|
||||
if($setup_email->fields['cc_list'] != '')
|
||||
$E['cc_list'] = split(',', $setup_email->fields['cc_list']);
|
||||
|
||||
if($setup_email->fields['bcc_list'] != '')
|
||||
$E['bcc_list'] = split(',', $setup_email->fields['bcc_list']);
|
||||
|
||||
|
||||
|
||||
############################################################
|
||||
### Get the account settings
|
||||
|
||||
$q = "SELECT * FROM ".AGILE_DB_PREFIX."account WHERE
|
||||
site_id = ".$db->qstr(DEFAULT_SITE)." AND
|
||||
(
|
||||
email = ".$db->qstr($acct)." OR
|
||||
id = ".$db->qstr($acct). "
|
||||
)";
|
||||
$account = $db->Execute($q);
|
||||
if($account == false)
|
||||
{
|
||||
$C_debug->error('email_template.inc.php','send1', $db->ErrorMsg() . " " . $sql);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($admin_only == false)
|
||||
{
|
||||
if($account->RecordCount() > 0) {
|
||||
$E['to_email'] = $account->fields['email'];
|
||||
$E['to_name'] = $account->fields['first_name'] . ' ' . $account->fields['last_name'];
|
||||
$this->ab_account = true;
|
||||
} else {
|
||||
$E['to_email'] = $acct;
|
||||
$E['to_name'] = $acct;
|
||||
$this->ab_account = false;
|
||||
}
|
||||
} else {
|
||||
$E['to_email'] = $setup_email->fields['from_email'];
|
||||
$E['to_name'] = $setup_email->fields['from_name'];
|
||||
$this->ab_account = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
### Get the template translation for the specified account for text/htm
|
||||
|
||||
if(@$this->ab_account && @$account->fields["language_id"] != "")
|
||||
$language_id = $account->fields["language_id"];
|
||||
else
|
||||
$language_id = DEFAULT_LANGUAGE;
|
||||
|
||||
$q = "SELECT * FROM ".AGILE_DB_PREFIX."email_template_translate WHERE
|
||||
site_id = ".$db->qstr(DEFAULT_SITE)." AND
|
||||
language_id = ".$db->qstr($language_id)." AND
|
||||
email_template_id = ".$db->qstr($template->fields["id"]);
|
||||
$setup_email = $db->Execute($q);
|
||||
|
||||
if(!$setup_email || !$setup_email->RecordCount()) {
|
||||
# get the default translation for this email:
|
||||
$q = "SELECT * FROM ".AGILE_DB_PREFIX."email_template_translate WHERE
|
||||
site_id = ".$db->qstr(DEFAULT_SITE)." AND
|
||||
language_id = ".$db->qstr(DEFAULT_LANGUAGE)." AND
|
||||
email_template_id = ".$db->qstr($template->fields["id"]);
|
||||
$setup_email = $db->Execute($q);
|
||||
}
|
||||
|
||||
if(!$setup_email || !$setup_email->RecordCount()) {
|
||||
# unable to locate translation!
|
||||
global $C_debug;
|
||||
$message = 'Unable to locate translation for Email Template "'.$template->fields['name'].'" and Language "'. $language_id .'" OR "' . DEFAULT_LANGUAGE . '"';
|
||||
$C_debug->error('email_template.inc.php','send', $message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
# set the subject:
|
||||
$E['subject'] = $setup_email->fields['subject'];
|
||||
|
||||
# determine whether to send HTML or not...
|
||||
if(@$this->ab_account && $account->fields['email_type'] == 1) {
|
||||
if(!empty($setup_email->fields['message_html'])) {
|
||||
$E['body_html'] = $setup_email->fields['message_html'];
|
||||
$E['html'] = '1';
|
||||
} else {
|
||||
$E['body_html'] = false;
|
||||
$E['html'] = '0';
|
||||
}
|
||||
} else {
|
||||
$E['html'] = '0';
|
||||
}
|
||||
|
||||
$E['body_text'] = $setup_email->fields['message_text'];
|
||||
|
||||
### Get the date-time
|
||||
include_once(PATH_CORE.'list.inc.php');
|
||||
$C_list = new CORE_list;
|
||||
$date = $C_list->date_time(time());
|
||||
|
||||
### Url formatting...
|
||||
if($admin_only) {
|
||||
$site_url = URL.'admin.php';
|
||||
$site_ssl_url = SSL_URL.'admin.php';
|
||||
} else {
|
||||
$site_url = URL;
|
||||
$site_ssl_url = SSL_URL;
|
||||
}
|
||||
|
||||
### Get the replace vars from the email template:
|
||||
$replace = Array('%site_name%' => $E['from_name'],
|
||||
'%site_email%' => $E['from_email'],
|
||||
'%url%' => $site_url,
|
||||
'%date%' => $date,
|
||||
'%ssl_url%' => $site_ssl_url);
|
||||
|
||||
### Get the replace vars from the $VAR variable:
|
||||
reset($VAR);
|
||||
while(list($key, $value) = each($VAR))
|
||||
{
|
||||
$re_this = "%var_".$key."%";
|
||||
$replace[$re_this] = $value;
|
||||
}
|
||||
|
||||
### Get the replace vars from the account:
|
||||
$replace['%acct_id%'] = $acct;
|
||||
if(@$this->ab_account) {
|
||||
while(list($key, $value) = each($account->fields)) {
|
||||
$re_this = "%acct_".$key."%";
|
||||
$replace[$re_this] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
############################################################
|
||||
### Get the SQL1 Query/Arrays
|
||||
if(!empty($template->fields["sql_1"]) && !empty($sql1) &&!is_array($sql1))
|
||||
{
|
||||
$sql = eregi_replace('%DB_PREFIX%', AGILE_DB_PREFIX, $template->fields["sql_1"]);
|
||||
$sql = eregi_replace('%SQL1%', $db->qstr($sql1), $sql);
|
||||
if(!is_array($sql2))
|
||||
$sql = eregi_replace('%SQL2%', $db->qstr($sql2), $sql);
|
||||
if(!is_array($sql3))
|
||||
$sql = eregi_replace('%SQL3%', $db->qstr($sql3), $sql);
|
||||
$sql .= " AND site_id = ". $db->qstr(DEFAULT_SITE);
|
||||
$SQL_1 = $db->Execute($sql);
|
||||
|
||||
if($SQL_1 == false)
|
||||
{
|
||||
### return the error message
|
||||
global $C_debug;
|
||||
$C_debug->error('email_template.inc.php','send', $db->ErrorMsg() . " " . $sql);
|
||||
}
|
||||
else if($SQL_1->RecordCount() > 0)
|
||||
{
|
||||
### Get the replace vars from the sql results:
|
||||
while(list($key, $value) = each($SQL_1->fields))
|
||||
{
|
||||
$re_this = "%sql1_".$key."%";
|
||||
$replace[$re_this] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (is_array($sql1))
|
||||
{
|
||||
while(list($key, $value) = each($sql1[$i]))
|
||||
$replace[$key] = $value;
|
||||
}
|
||||
elseif (!empty($sql1))
|
||||
{
|
||||
$replace['%sql1%'] = $sql3;
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
### Get the SQL2 Query/Arrays
|
||||
if(!empty($template->fields["sql_2"]) && !empty($sql2) &&!is_array($sql2))
|
||||
{
|
||||
$sql = eregi_replace('%DB_PREFIX%', AGILE_DB_PREFIX, $template->fields["sql_2"]);
|
||||
$sql = eregi_replace('%SQL1%', $db->qstr($sql1), $sql);
|
||||
if(!is_array($sql2))
|
||||
$sql = eregi_replace('%SQL2%', $db->qstr($sql2), $sql);
|
||||
if(!is_array($sql3))
|
||||
$sql = eregi_replace('%SQL3%', $db->qstr($sql3), $sql);
|
||||
$sql .= " AND site_id = ".$db->qstr(DEFAULT_SITE);
|
||||
$SQL_2 = $db->Execute($sql);
|
||||
if($SQL_2 == false)
|
||||
{
|
||||
### return the error message
|
||||
global $C_debug;
|
||||
$C_debug->error('email_template.inc.php','send', $db->ErrorMsg() . " " . $sql);
|
||||
}
|
||||
else if($SQL_2->RecordCount() > 0)
|
||||
{
|
||||
### Get the replace vars from the sql results:
|
||||
while(list($key, $value) = each($SQL_2->fields))
|
||||
{
|
||||
$re_this = "%sql2_".$key."%";
|
||||
$replace[$re_this] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (is_array($sql2))
|
||||
{
|
||||
while(list($key, $value) = each($sql2[$i]))
|
||||
$replace[$key] = $value;
|
||||
}
|
||||
elseif (!empty($sql2))
|
||||
{
|
||||
$replace['%sql2%'] = $sql2;
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
### Get the SQL3 Query/Arrays
|
||||
if(!empty($template->fields["sql_3"]) && !empty($sql3) &&!is_array($sql3))
|
||||
{
|
||||
$sql = eregi_replace('%DB_PREFIX%', AGILE_DB_PREFIX, $template->fields["sql_3"]);
|
||||
$sql = eregi_replace('%SQL1%', $db->qstr($sql1), $sql);
|
||||
if(!is_array($sql2))
|
||||
$sql = eregi_replace('%SQL2%', $db->qstr($sql2), $sql);
|
||||
if(!is_array($sql3))
|
||||
$sql = eregi_replace('%SQL3%', $db->qstr($sql3), $sql);
|
||||
$sql .= " AND site_id = ".$db->qstr(DEFAULT_SITE);
|
||||
$SQL_3 = $db->Execute($sql);
|
||||
if($SQL_3 == false)
|
||||
{
|
||||
### return the error message
|
||||
global $C_debug;
|
||||
$C_debug->error('email_template.inc.php','send', $db->ErrorMsg() . " " . $sql);
|
||||
}
|
||||
else if($SQL_3->RecordCount() > 0)
|
||||
{
|
||||
### Get the replace vars from the sql results:
|
||||
while(list($key, $value) = each($SQL_3->fields))
|
||||
{
|
||||
$re_this = "%sql3_".$key."%";
|
||||
$replace[$re_this] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (is_array($sql3))
|
||||
{
|
||||
while(list($key, $value) = each($sql3))
|
||||
$replace[$key] = $value;
|
||||
}
|
||||
elseif (!empty($sql3))
|
||||
{
|
||||
$replace['%sql3%'] = $sql3;
|
||||
}
|
||||
|
||||
### Replace the $replace vars in the body and subject
|
||||
while(list($key, $value) = each($replace))
|
||||
{
|
||||
$E['subject'] = eregi_replace($key, $value, $E['subject']);
|
||||
$E['body_text'] = eregi_replace($key, $value, $E['body_text']);
|
||||
if(!empty($E['body_html']))
|
||||
$E['body_html'] = eregi_replace($key, $value, $E['body_html']);
|
||||
}
|
||||
|
||||
### Remove any unparsed vars from the body text and html:
|
||||
if(!empty($E['body_html']) && ereg('%',$E['body_html']))
|
||||
@$E['body_html'] = ereg_replace("%[a-zA-Z0-9_]{1,}%", '', $E['body_html']);
|
||||
if(!empty($E['body_text']) && ereg("%",$E['body_text']))
|
||||
@$E['body_text'] = ereg_replace("%[a-zA-Z0-9_]{1,}%", '', $E['body_text']);
|
||||
|
||||
### Set any attachments (not currently supported)
|
||||
$E['attatchments'] = '';
|
||||
|
||||
/* email log? */
|
||||
global $C_list;
|
||||
if(is_object($C_list) && $C_list->is_installed('email_log')) {
|
||||
include_once(PATH_MODULES.'email_log/email_log.inc.php');
|
||||
$log = new email_log;
|
||||
$log->add($acct, $E['subject'], $E['body_text'], $E['to_email'], false, $E['priority']);
|
||||
}
|
||||
|
||||
### Call the mail class
|
||||
require_once(PATH_CORE . 'email.inc.php');
|
||||
$email = new CORE_email;
|
||||
$email->debug=$this->debug;
|
||||
if($type == 0)
|
||||
return $email->PHP_Mail($E);
|
||||
else
|
||||
return $email->SMTP_Mail($E);
|
||||
}
|
||||
}
|
||||
?>
|
74
modules/email_template/email_template_construct.xml
Normal file
74
modules/email_template/email_template_construct.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<construct>
|
||||
<!-- define the module name -->
|
||||
<module>email_template</module>
|
||||
<!-- define the module table name -->
|
||||
<table>email_template</table>
|
||||
<!-- define the module dependancy(s) -->
|
||||
<dependancy/>
|
||||
<!-- define the DB cache in seconds -->
|
||||
<cache>0</cache>
|
||||
<!-- define the default order_by field for SQL queries -->
|
||||
<order_by>name</order_by>
|
||||
<!-- define the methods -->
|
||||
<limit>25</limit>
|
||||
<!-- define database indexes -->
|
||||
<index>
|
||||
<name>name</name>
|
||||
</index>
|
||||
<!-- define the fields -->
|
||||
<field>
|
||||
<id>
|
||||
<type>I8</type>
|
||||
<unique>1</unique>
|
||||
<index>1</index>
|
||||
</id>
|
||||
<site_id>
|
||||
<type>I4</type>
|
||||
<index>1</index>
|
||||
</site_id>
|
||||
<setup_email_id>
|
||||
<type>I4</type>
|
||||
<asso_table>setup_email</asso_table>
|
||||
<asso_field>name</asso_field>
|
||||
<index>1</index>
|
||||
</setup_email_id>
|
||||
<name>
|
||||
<type>C(128)</type>
|
||||
<min_len>4</min_len>
|
||||
<max_len>128</max_len>
|
||||
<validate>any</validate>
|
||||
</name>
|
||||
<priority>
|
||||
<type>L</type>
|
||||
</priority>
|
||||
<shortcuts>
|
||||
<type>X2</type>
|
||||
</shortcuts>
|
||||
<notes>
|
||||
<type>X2</type>
|
||||
</notes>
|
||||
<sql_1>
|
||||
<type>X2</type>
|
||||
</sql_1>
|
||||
<sql_2>
|
||||
<type>X2</type>
|
||||
</sql_2>
|
||||
<sql_3>
|
||||
<type>X2</type>
|
||||
</sql_3>
|
||||
<status>
|
||||
<type>L</type>
|
||||
</status>
|
||||
</field>
|
||||
<!-- define all the methods for this class, and the fields they have access to, if applicable. -->
|
||||
<method>
|
||||
<add>id,site_id,setup_email_id,name,priority,shortcuts,notes,sql_1,sql_2,sql_3,status</add>
|
||||
<update>id,site_id,setup_email_id,priority,shortcuts,notes,sql_1,sql_2,sql_3,status</update>
|
||||
<delete>id,site_id,setup_email_id,name,priority,shortcuts,notes,sql_1,sql_2,sql_3,status</delete>
|
||||
<view>id,site_id,setup_email_id,name,priority,shortcuts,notes,sql_1,sql_2,sql_3,status</view>
|
||||
<search>id,site_id,setup_email_id,name,priority,shortcuts,notes,sql_1,sql_2,sql_3,status</search>
|
||||
</method>
|
||||
<!-- define the method triggers -->
|
||||
<trigger>0</trigger>
|
||||
</construct>
|
35
modules/email_template/email_template_install.xml
Normal file
35
modules/email_template/email_template_install.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<install>
|
||||
<module_properties>
|
||||
<name>email_template</name>
|
||||
<parent>setup</parent>
|
||||
<notes><![CDATA[This module controls the various email templates]]></notes>
|
||||
<menu_display>1</menu_display>
|
||||
</module_properties>
|
||||
<sql_inserts>
|
||||
<module_method>
|
||||
<search>
|
||||
<name>search</name>
|
||||
</search>
|
||||
<view>
|
||||
<name>view</name>
|
||||
<notes><![CDATA[Allow users to view records]]></notes>
|
||||
<page><![CDATA[core:search&module=%%&_escape=1&_next_page_one=view]]></page>
|
||||
<menu_display>1</menu_display>
|
||||
</view>
|
||||
<search_show>
|
||||
<name>search_show</name>
|
||||
</search_show>
|
||||
<add>
|
||||
<name>add</name>
|
||||
<notes><![CDATA[Allow users to add records]]></notes>
|
||||
<menu_display>1</menu_display>
|
||||
</add>
|
||||
<delete>
|
||||
<name>delete</name>
|
||||
</delete>
|
||||
<update>
|
||||
<name>update</name>
|
||||
</update>
|
||||
</module_method>
|
||||
</sql_inserts>
|
||||
</install>
|
611
modules/email_template/email_template_install_data.xml
Normal file
611
modules/email_template/email_template_install_data.xml
Normal file
@@ -0,0 +1,611 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<install>
|
||||
<email_template>
|
||||
<id>11</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>account_reset_password</name>
|
||||
<priority>1</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This email is sent to the user when they use the password retrieval program</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>12</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>account_registration_active</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes><![CDATA[This email is sent out when the user registers for a new account & the store is set to automatically activate their account for login without email verification first.]]></notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>14</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>account_registration_inactive</name>
|
||||
<priority>1</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This email is sent to the user after account registration, if email verification is required.</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>15</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>account_add_staff_active</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This is the email a user recieves when the staff adds their new account as active</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>16</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>account_add_staff_inactive</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This email is sent to users when a staff-member creates their account as inactive</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>17</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>password_change_instructions</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This email is sent by the administrator / staff to resend the change password instructions...</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>18</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>affiliate_staff_add</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>*</shortcuts>
|
||||
<notes>This e-mail template is sent when staff/admin adds a new affiliate account.</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>19</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>affiliate_user_add_active</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>*</shortcuts>
|
||||
<notes>This e-mail template is sent when the user signs up for an affiliate account and is automatically approved.</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>20</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>affiliate_user_add_pending</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>*</shortcuts>
|
||||
<notes>This e-mail template is sent when an affiliate signs up for an account and it requires admin approval.</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>21</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>affiliate_user_add_staff_notify</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>*</shortcuts>
|
||||
<notes>This e-mail template is sent to the staff when a pending affiliate application is received.</notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>22</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_confirm_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes><![CDATA[Email sent to users confirming order placed, billing & account details, and products/services ordered.]]></notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<sql_2>SELECT email_template FROM %DB_PREFIX%checkout WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>23</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_confirm_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sends the admin an new invoice alert.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<sql_2>SELECT email_template FROM %DB_PREFIX%checkout WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>24</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_due_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sends the user a due invoice alert when new invoice is created or they pay via a 3rd party method.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>25</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_due_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Alert sent to admin when manual payment needs processed.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>26</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_paid_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Notify user of payment recieved for an invoice.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<sql_2>SELECT * FROM %DB_PREFIX%currency WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>27</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_paid_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Notify admin of payment recieved for an invoice.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<sql_2>SELECT * FROM %DB_PREFIX%currency WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>28</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_resend</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Resends payment due alert....</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>29</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_manual_auth_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sends admin alert that an invoice requires manual approval</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<sql_2>SELECT checkout_plugin FROM %DB_PREFIX%checkout WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>30</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_approved_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sent to user when invoice status is updated to approved</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>31</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>registrar_manual_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>All</shortcuts>
|
||||
<notes>Sends selected staff member an alert to manually renew, register, transfer, or park a domain name.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%account WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>32</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>registrar_bulkregister_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>All</shortcuts>
|
||||
<notes><![CDATA[Sent to staff member for PGP encryption & forwarding to BulkRegister]]></notes>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>33</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>registrar_nominet_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>35</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_recur_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sends the user notification of new invoice created for a recurring service</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>36</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_recur_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sends the admin notification of new invoice created for a recurring service</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>37</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>service_suspend_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sends the user notice that service(s) have been suspended due to non-payment.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>38</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>service_suspend_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sends the admin notice that service(s) have been suspended due to non-payment.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>39</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>host_new_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This e-mail is sent to the user when their hosting account is provisioned</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>40</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>host_edit_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This e-mail is sent to the user when their hosting account is edited</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>41</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>host_new_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Email sent to admin to notify of new manual provisioning required.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>42</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>host_edit_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Email sent to admin to notify that edit of manual provisioning required.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>43</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>host_inactive_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Email sent to admin to notify that edit of manual suspend required.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>44</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>host_active_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Email sent to admin to notify that edit of manual activation required.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>45</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>host_delete_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Email sent to admin to notify that edit of manual deletion required.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>46</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>service_cancel_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Notify user of service cancelation</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>47</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>service_cancel_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Notify admin of service cancelation</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>48</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>service_changeschedule_admin</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>Sends admin notice that user has selected a different billing schedule.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>638</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>login_share_ban_user</name>
|
||||
<priority>1</priority>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>639</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>login_share_ban_admin</name>
|
||||
<priority>0</priority>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>640</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>account_billing_exp_soon</name>
|
||||
<priority>0</priority>
|
||||
<notes>Sent when a credit card is set to expire soon, triggered by the account_billing::task</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%account_billing WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>651</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name> net_term_suspend</name>
|
||||
<priority>0</priority>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>652</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name> net_term_late_notice</name>
|
||||
<priority>0</priority>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>653</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name> voip_balance_prepaid</name>
|
||||
<priority>0</priority>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%voip_prepaid WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>654</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name> voip_manual</name>
|
||||
<priority>0</priority>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<sql_2><![CDATA[SELECT * FROM %DB_PREFIX%voip_sip WHERE keyword='secret' AND sip=%SQL2%]]></sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>655</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name> voip_new_prepaid_ani</name>
|
||||
<priority>0</priority>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%voip_prepaid WHERE id=%SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>656</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name> voip_new_prepaid_pin</name>
|
||||
<priority>0</priority>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%voip_prepaid WHERE id=%SQL1%</sql_1>
|
||||
<sql_2><![CDATA[SELECT * FROM %DB_PREFIX%voip_prepaid WHERE did='%SQL2%']]></sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>657</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name> voip_new_service</name>
|
||||
<priority>0</priority>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1%</sql_1>
|
||||
<sql_2><![CDATA[SELECT * FROM %DB_PREFIX%voip_sip WHERE keyword='secret' AND sip=%SQL2%]]></sql_2>
|
||||
<sql_3>SELECT * FROM %DB_PREFIX%voip_vm WHERE mailbox=%SQL3%</sql_3>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>658</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>3</setup_email_id>
|
||||
<name>ticket_piping_add_user</name>
|
||||
<priority>0</priority>
|
||||
<notes>This e-mail is set to the user when a e-mail message is successfully piped to a new ticket.</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>659</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>3</setup_email_id>
|
||||
<name>ticket_piping_add_user_pending</name>
|
||||
<priority>0</priority>
|
||||
<notes>This e-mail is set to the user when a e-mail message is piped to a new ticket and requires further authorization...</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>660</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>3</setup_email_id>
|
||||
<name>ticket_piping_add_user_unauth</name>
|
||||
<priority>0</priority>
|
||||
<notes>This e-mail is set to the user when a e-mail message is piped to a new ticket and requires further authorization...</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>661</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>ticket_staff_add</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This template is sent to all applicable staff members (except the staff member who added the ticket) when a staff member adds a new ticket</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<sql_2>SELECT * FROM %DB_PREFIX%ticket_department WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>662</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>ticket_staff_add_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This template is sent to the user when a staff member adds a new ticket to their account</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>663</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>ticket_staff_update_user</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This template is sent out to the user when a staff member updates one of their tickets...</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>664</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>ticket_user_add</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This template is sent out when a new ticket is added</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>665</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>ticket_user_add_staff</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This email is sent to all ticket staff members who are set to recieve new ticket notices</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<sql_2>SELECT * FROM %DB_PREFIX%ticket_department WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>666</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>ticket_user_update</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>All</shortcuts>
|
||||
<notes>This is sent to the user when they respond to a ticket</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>667</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>ticket_user_update_staff</name>
|
||||
<priority>0</priority>
|
||||
<shortcuts>all</shortcuts>
|
||||
<notes>This email is sent to all ticket staff members who are set to recieve updated ticket notices</notes>
|
||||
<sql_1>SELECT * FROM %DB_PREFIX%ticket WHERE id = %SQL1%</sql_1>
|
||||
<sql_2>SELECT * FROM %DB_PREFIX%ticket_department WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template>
|
||||
<id>668</id>
|
||||
<site_id>1</site_id>
|
||||
<setup_email_id>1</setup_email_id>
|
||||
<name>invoice_pregen_notice</name>
|
||||
<priority>0</priority>
|
||||
<notes>Sends out a notice to user prior to generating invoices</notes>
|
||||
<sql_1>SELECT sum(price) as price FROM %DB_PREFIX%service WHERE id in (%SQL1%)</sql_1>
|
||||
<sql_2>SELECT symbol,three_digit FROM %DB_PREFIX%currency WHERE id = %SQL2%</sql_2>
|
||||
<status>1</status>
|
||||
</email_template>
|
||||
<email_template_id>
|
||||
<id>668</id>
|
||||
</email_template_id>
|
||||
<email_template_id>
|
||||
<id>668</id>
|
||||
</email_template_id>
|
||||
</install>
|
Reference in New Issue
Block a user