[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 <?php 2 /********************************************************************************* 3 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 * 10 ********************************************************************************/ 11 12 require_once ('Smarty_setup.php'); 13 require_once ('modules/Settings/Forms.php'); 14 15 global $mod_strings; 16 global $app_strings; 17 global $app_list_strings; 18 global $current_user; 19 20 global $adb; 21 global $theme; 22 $theme_path="themes/".$theme."/"; 23 $image_path=$theme_path."images/"; 24 require_once ($theme_path.'layout_utils.php'); 25 26 $smarty = new vtigerCRM_Smarty; 27 $smarty->assign("MOD", $mod_strings); 28 $smarty->assign("APP", $app_strings); 29 $smarty->assign("IMAGE_PATH", $image_path); 30 31 if(isset($_REQUEST['record']) && $_REQUEST['record']!='') 32 { 33 $sql = "select * from vtiger_mail_accounts where user_id=".$_REQUEST['record']; 34 $result = $adb->query($sql); 35 $rowcount = $adb->num_rows($result); 36 37 if ($rowcount!=0) 38 { 39 while($temprow = $adb->fetchByAssoc($result)) 40 { 41 $smarty->assign("DISPLAYNAME", $temprow['display_name']); 42 $smarty->assign("ID", $temprow['user_id']); 43 $smarty->assign("EMAIL", $temprow['mail_id']); 44 $smarty->assign("ACCOUNTNAME", $temprow['account_name']); 45 $smarty->assign($temprow['mail_protocol'],$temprow['mail_protocol']); 46 $smarty->assign("SERVERUSERNAME", $temprow['mail_username']); 47 $smarty->assign("SERVERPASSWORD", $temprow['mail_password']); 48 $smarty->assign("SERVERNAME", $temprow['mail_servername']); 49 $smarty->assign("RECORD_ID", $temprow['account_id']); 50 $smarty->assign("BOX_REFRESH", $temprow['box_refresh']); 51 $smarty->assign("MAILS_PER_PAGE", $temprow['mails_per_page']); 52 $smarty->assign("EDIT", "TRUE"); 53 54 if(strtolower($temprow['mail_protocol']) == "imap") 55 $smarty->assign("IMAP", "CHECKED"); 56 if(strtolower($temprow['mail_protocol']) == "imap2") 57 $smarty->assign("IMAP2", "CHECKED"); 58 if(strtolower($temprow['mail_protocol']) == "imap4") 59 $smarty->assign("IMAP4", "CHECKED"); 60 if(strtolower($temprow['mail_protocol']) == "imap4rev1") 61 $smarty->assign("IMAP4R1", "CHECKED"); 62 if(strtolower($temprow['mail_protocol']) == "pop3") 63 $smarty->assign("POP3", "CHECKED"); 64 65 if(strtolower($temprow['ssltype']) == "notls") 66 $smarty->assign("NOTLS", "CHECKED"); 67 if(strtolower($temprow['ssltype']) == "tls") 68 $smarty->assign("TLS", "CHECKED"); 69 70 if(strtolower($temprow['sslmeth']) == "validate-cert") 71 $smarty->assign("VALIDATECERT", "CHECKED"); 72 if(strtolower($temprow['sslmeth']) == "novalidate-cert") 73 $smarty->assign("NOVALIDATECERT", "CHECKED"); 74 75 if($temprow['int_mailer'] == "1") 76 $smarty->assign("INT_MAILER_USE", "CHECKED"); 77 else 78 $smarty->assign("INT_MAILER_NOUSE", "CHECKED"); 79 80 } 81 } 82 } 83 84 $smarty->assign("RETURN_MODULE","Settings"); 85 $smarty->assign("RETURN_ACTION","index"); 86 $smarty->assign("JAVASCRIPT", get_validate_record_js()); 87 $smarty->assign("USERID", $current_user->id); 88 89 $smarty->display('AddMailAccount.tpl'); 90 91 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |