[ 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 require_once ("include/database/PearDatabase.php"); 12 13 global $current_user; 14 $displayname=$_REQUEST['displayname']; 15 $userid = $current_user->id; 16 $email=$_REQUEST['email']; 17 $account_name=$_REQUEST['account_name']; 18 $mailprotocol=$_REQUEST['mailprotocol']; 19 $server_username = $_REQUEST['server_username']; 20 $server_password = $_REQUEST['server_password']; 21 $mail_servername = $_REQUEST['mail_servername']; 22 $box_refresh = $_REQUEST['box_refresh']; 23 $mails_per_page = $_REQUEST['mails_per_page']; 24 $ssltype = $_REQUEST["ssltype"]; 25 $sslmeth = $_REQUEST["sslmeth"]; 26 27 if(isset($_REQUEST['record']) && $_REQUEST['record']!='') 28 { 29 $id=$_REQUEST['record']; 30 } 31 #$sql="select * from vtiger_systems where server_type = '".$server_type."'"; 32 #$id=$adb->query_result($adb->query($sql),0,"id"); 33 34 if(isset($_REQUEST['edit']) && $_REQUEST['edit'] && $_REQUEST['record']!='') 35 { 36 $sql="update vtiger_mail_accounts set display_name = '".$displayname."', mail_id = '".$email."', account_name = '".$account_name."', mail_protocol = '".$mailprotocol."', mail_username = '".$server_username."', mail_password='".$server_password."', mail_servername='".$mail_servername."', box_refresh='".$box_refresh."', mails_per_page='".$mails_per_page."', ssltype='".$ssltype."' , sslmeth='".$sslmeth."', int_mailer='".$_REQUEST["int_mailer"]."' where user_id = '".$id."'"; 37 } 38 else 39 { 40 $account_id = $adb->getUniqueID("vtiger_mail_accounts"); 41 $sql="insert into vtiger_mail_accounts(account_id, user_id, display_name, mail_id, account_name, mail_protocol, mail_username, mail_password, mail_servername, box_refresh, mails_per_page, ssltype, sslmeth, int_mailer, status, set_default) values(" .$account_id .",'".$current_user->id."','".$displayname."','".$email."','".$account_name."','".$mailprotocol."','".$server_username."','".$server_password."','".$mail_servername."','".$box_refresh."','".$mails_per_page."', '".$ssltype."', '".$sslmeth."', '".$_REQUEST["int_mailer"]."','1','0')"; 42 } 43 44 $adb->query($sql); 45 46 header("Location:index.php?module=Emails&action=index&parenttab=My Home Page"); 47 ?>
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 |