[Vtigercrm-commits] [vtiger-commits] r6501 - /vtigercrm/trunk/include/utils/CommonUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri May 26 17:02:45 EDT 2006
Author: saraj
Date: Fri May 26 15:02:42 2006
New Revision: 6501
Log:
Added function getTemplateDetails for Emails - Ahmed
Modified:
vtigercrm/trunk/include/utils/CommonUtils.php
Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Fri May 26 15:02:42 2006
@@ -2232,5 +2232,24 @@
return $saveimage;
}
+/**
+ * This function is used to get the Email Template Details like subject and content for particular template.
+ * @param integer $templateid - Template Id for an Email Template
+ * return array $returndata - Returns Subject, Body of Template of the the particular email template.
+*/
+
+function getTemplateDetails($templateid)
+{
+ global $adb,$log;
+ $log->debug("Entering into getTemplateDetails($templateid) method ...");
+ $returndata = Array();
+ $result = $adb->query("select * from emailtemplates where templateid=$templateid");
+ $returndata[] = $templateid;
+ $returndata[] = $adb->query_result($result,0,'body');
+ $returndata[] = $adb->query_result($result,0,'subject');
+ $log->debug("Exiting from getTemplateDetails($templateid) method ...");
+ return $returndata;
+}
+
?>
More information about the vtigercrm-commits
mailing list