[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 <?php 2 3 /********************************************************************************* 4 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 5 * ("License"); You may not use this file except in compliance with the License 6 * The Original Code is: vtiger CRM Open Source 7 * The Initial Developer of the Original Code is vtiger. 8 * Portions created by vtiger are Copyright (C) vtiger. 9 * All Rights Reserved. 10 * 11 ********************************************************************************/ 12 13 require_once ('include/database/PearDatabase.php'); 14 require_once ('modules/Settings/Forms.php'); 15 16 global $app_strings; 17 global $mod_strings; 18 global $theme; 19 $theme_path="themes/".$theme."/"; 20 $image_path=$theme_path."images/"; 21 22 echo '<br>'; 23 echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].' : '.$mod_strings['LBL_ADD_MAIL_ACCOUNT'], true); 24 echo '<br><br>'; 25 26 27 if($_REQUEST['problem']) 28 { 29 echo '<font color=red><b>Error in incoming mail server configuration! </b></font>'; 30 } 31 32 ?> 33 34 <form action="index.php" name="massdelete"> 35 <input type="hidden" name="module" value="Settings"> 36 <input type="hidden" name="action" value=""> 37 <input type="hidden" name="idlist"> 38 39 <input title="<?php echo $mod_strings['LBL_NEW_MAIL_ACCOUNT_TITLE'];?>" accessKey="<?php echo $mod_strings['LBL_NEW_MAIL_ACCOUNT_KEY'];?>" class="button" onclick="this.form.action.value='AddMailAccount'" type="submit" name="button" value=" <?php echo $mod_strings['LBL_NEW_MAIL_ACCOUNT_LABEL'];?> " > 40 41 <input title="<?php echo $app_strings['LBL_DELETE_BUTTON_TITLE'];?>" accessKey="<?php echo $app_strings['LBL_DELETE_BUTTON_KEY'];?>" class="button" onclick="this.form.action.value='DeleteMailAccount'; return massDelete()" type="submit" name="button" value=" <?php echo $app_strings['LBL_DELETE_BUTTON_LABEL'];?> " > 42 <br><br> 43 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="FormBorder"> 44 <tbody> 45 <tr><td COLSPAN="12"></td></tr> 46 <tr> 47 <td WIDTH="1" class="moduleListTitle" style="padding:0px 3px 0px 3px;"><input type="checkbox" name="selectall" onClick=toggleSelect(this.checked,"selected_id")></td> 48 <td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="<?php echo $image_path;?>blank.gif"></td> 49 <td width="25%"class="moduleListTitle" height="25"> <b><?php echo $mod_strings['LBL_DISPLAY_NAME']; ?></b></td> 50 <td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="<?php echo $image_path;?>blank.gif"></td> 51 <td width="30%" class="moduleListTitle"> <b><?php echo $mod_strings['LBL_MAIL_SERVER_NAME']; ?></b></td> 52 <td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="<?php echo $image_path;?>blank.gif"></td> 53 <td width="25%" class="moduleListTitle"> <b><?php echo $mod_strings['LBL_EMAIL_ADDRESS']; ?></b></td> 54 55 <td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="<?php echo $image_path;?>blank.gif"></td> 56 <td width="25%" class="moduleListTitle"> <b><?php echo $mod_strings['LBL_MAIL_PROTOCOL']; ?></b></td> 57 58 <td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="<?php echo $image_path;?>blank.gif"></td> 59 <td width="25%" class="moduleListTitle"> <b><?php echo $mod_strings['LBL_MAIL_UNAME']; ?></b></td> 60 61 <td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="<?php echo $image_path;?>blank.gif"></td> 62 <td width="10%" class="moduleListTitle"> <b><?php echo $mod_strings['LBL_DEFAULT']; ?></b></td> 63 <td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="<?php echo $image_path;?>blank.gif"></td> 64 <td width="10%" class="moduleListTitle"> <b><?php echo $mod_strings['Edit']; ?></b></td> 65 <td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="<?php echo $image_path;?>blank.gif"></td> 66 </tr> 67 <tr><td COLSPAN="12" class="blackLine"><IMG SRC="<?php echo $image_path;?>blank.gif"></td></tr> 68 <?php 69 global $current_user; 70 require_once ('include/utils/UserInfoUtil.php'); 71 72 $result = getMailServerInfo($current_user); 73 $temprow = $adb->fetch_array($result); 74 $rowcount = $adb->num_rows($result); 75 $edit="Edit "; 76 $del="Del "; 77 $bar=" | "; 78 $cnt=1; 79 80 if($rowcount!=0) 81 { 82 do 83 { 84 85 if ($cnt%2==0) 86 printf('<tr class="evenListRow"> <td height="25"> <input type="checkbox" name="selected_id" value='.$temprow['account_id'].'></td>'); 87 else 88 printf('<tr class="oddListRow"> <td height="25"> <input type="checkbox" name="selected_id" value='.$temprow['account_id'].'></td>'); 89 printf('<td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="'.$image_path.'%s"></td>','blank.gif'); 90 printf("<td height='25'> %s</td>",$temprow["display_name"]); 91 printf('<td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="'.$image_path.'%s"></td>','blank.gif'); 92 printf("<td height='25'> %s</td>",$temprow["mail_servername"]); 93 printf('<td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="'.$image_path.'%s"></td>','blank.gif'); 94 printf("<td height='25'> %s</td>",$temprow["mail_id"]); 95 96 printf('<td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="'.$image_path.'%s"></td>','blank.gif'); 97 printf("<td height='25'> %s</td>",$temprow["mail_protocol"]); 98 99 100 printf('<td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="'.$image_path.'%s"></td>','blank.gif'); 101 printf("<td height='25'> %s</td>",$temprow["mail_username"]); 102 103 printf('<td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="'.$image_path.'%s"></td>','blank.gif'); 104 if($temprow["set_default"]==1); 105 $DEFAULT="Selected"; 106 printf('<td align=center><input type="radio" name="set_default" value="%s" '.$DEFAULT.'></td>',$temprow["account_id"]); 107 printf('<td WIDTH="1" class="blackLine" NOWRAP><IMG SRC="'.$image_path.'%s"></td>','blank.gif'); 108 printf('<td> <a href="index.php?module=Settings&action=AddMailAccount&record=%s">'.$mod_strings["Edit"].'</a></td>',$temprow["account_id"]); 109 $cnt++; 110 printf("</tr>"); 111 $DEFAULT=''; 112 } 113 while($temprow = $adb->fetch_array($result)); 114 } 115 ?> 116 </tbody> 117 </table> 118 <script> 119 function massDelete() 120 { 121 x = document.massdelete.selected_id.length; 122 idstring = ""; 123 124 if ( x == undefined) 125 { 126 127 if (document.massdelete.selected_id.checked) 128 { 129 document.massdelete.idlist.value=document.massdelete.selected_id.value; 130 //alert(document.massdelete.idlist.value); 131 } 132 else 133 { 134 alert("Please select at least one entity"); 135 return false; 136 } 137 } 138 else 139 { 140 xx = 0; 141 for(i = 0; i < x ; i++) 142 { 143 if(document.massdelete.selected_id[i].checked) 144 { 145 idstring = document.massdelete.selected_id[i].value +";"+idstring 146 xx++ 147 } 148 } 149 if (xx != 0) 150 { 151 document.massdelete.idlist.value=idstring; 152 //alert(document.massdelete.idlist.value); 153 } 154 else 155 { 156 alert("Please select at least one entity"); 157 return false; 158 } 159 } 160 document.massdelete.action="index.php?module=Settings&action=DeleteMailAccount&return_module=Settings&return_action=ListMailAccount" 161 } 162 </script>
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 |