[Vtigercrm-commits] [vtiger-commits] r4207 - /vtigercrm/trunk/modules/Users/listemailtemplates.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 15 10:26:11 EST 2006


Author: saraj
Date: Wed Mar 15 08:26:07 2006
New Revision: 4207

Log:
Smartification of ListView Email Templates done with modifications in the corr php file

Modified:
    vtigercrm/trunk/modules/Users/listemailtemplates.php

Modified: vtigercrm/trunk/modules/Users/listemailtemplates.php
==============================================================================
--- vtigercrm/trunk/modules/Users/listemailtemplates.php (original)
+++ vtigercrm/trunk/modules/Users/listemailtemplates.php Wed Mar 15 08:26:07 2006
@@ -10,52 +10,49 @@
 *
  ********************************************************************************/
 
+require_once('Smarty_setup.php'); 
 require_once('include/database/PearDatabase.php');
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html lang="en">
-<head>
-<title>Roles List</title>
-<!--meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"-->
-</head>
-<body>
-<!--c:out value="${locale}"/-->
-<!--fmt:setLocale value="ja_JP"/--><form action="index.php">
-<input type="hidden" name="module" value="Users">
-<input type="hidden" name="action" value="createemailtemplate">
-<?php echo get_module_title($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_EMAIL_TEMPLATES'],false);?>
-<br>
-<input type="submit" class="button" name="Submit" value="<?php echo $mod_strings['LBL_NEW_TEMPLATE']; ?>">
-<br>
-<br>
-<table width="65%" border="0" cellspacing="1" cellpadding="5" class="FormBorder">
-  <tr>
-    <td width="40%" class="moduleListTitle" height="20" style="padding:0px 3px 0px 3px;"><b><?php echo $mod_strings['LBL_TEMPLATE_NAME']; ?></b></td>
-    <td class="moduleListTitle" style="padding:0px 3px 0px 3px;"><b><?php echo $mod_strings['LBL_DESCRIPTION']; ?></b></td>
-  </tr>
-  <?php
+ 
    $sql = "select * from emailtemplates order by templateid DESC";
    $result = $adb->query($sql);
    $temprow = $adb->fetch_array($result);
+  //echo '<pre>'; print_r($temprow); echo '</pre>';	
+
+   
 $edit="Edit  ";
 $del="Del  ";
 $bar="  | ";
 $cnt=1;
 
 require_once('include/utils/UserInfoUtil.php');
+global $app_strings;
+global $app_list_strings;
+global $mod_strings;
+global $theme;
+$theme_path="themes/".$theme."/";
+$image_path=$theme_path."images/";
+
+
+$smarty = new vtigerCRM_Smarty;
+$smarty->assign("UMOD", $mod_strings);
+global $current_language;
+$smod_strings = return_module_language($current_language,'Settings');
+$smarty->assign("MOD", $smod_strings);
+$smarty->assign("MODULE", 'Settings');
+$smarty->assign("IMAGE_PATH", $image_path);
+
+$return_data=array();
 do
 {
-  $name=$temprow["name"];
-  if ($cnt%2==0)
-  printf("<tr class='evenListRow'> <td height='21' style='padding:0px 3px 0px 3px;'>");
-  else
-  printf("<tr class='oddListRow'> <td height='21' style='padding:0px 3px 0px 3px;'>");
- $templatename = $temprow["templatename"]; 
-  printf("<a href=index.php?module=Users&action=detailviewemailtemplate&templateid=".$temprow["templateid"].">%s</a></td>",$temprow["templatename"]);
-  printf("<td height='21' style='padding:0px 3px 0px 3px;' nowrap>%s</td>",$temprow["description"]);
+  $templatearray=array();
+  $templatearray['templatename'] = $temprow["templatename"];
+  $templatearray['templateid'] = $temprow["templateid"];
+  $templatearray['description'] = $temprow["description"];
+  $templatearray['foldername'] = $temprow["foldername"];
+  $return_data[]=$templatearray;
   $cnt++;
 }while($temprow = $adb->fetch_array($result));
+$smarty->assign("TEMPLATES",$return_data);
+$smarty->display("ListEmailTemplates.tpl");
+
 ?>
-</table>
-</body>
-</html>





More information about the vtigercrm-commits mailing list