Changeset 3415 for branches/2.2/filemanager
- Timestamp:
- 10/26/10 15:40:00 (14 years ago)
- Location:
- branches/2.2/filemanager
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/inc/upload.php
r3019 r3415 18 18 $upload_max_size = $current_config['filemanager_Max_file_size']; 19 19 $path = $_POST['path']; 20 $notifUser = $_POST['notifTo']; 20 21 $show_upload_boxes = count($_FILES['upload_file']['name'])-1; 21 22 … … 183 184 } 184 185 } 186 187 if(count($notifUser) > 0) 188 { 189 define('PHPGW_INCLUDE_ROOT','../../'); 190 define('PHPGW_API_INC','../../phpgwapi/inc'); 191 include_once(PHPGW_API_INC.'/class.phpmailer.inc.php'); 192 $mail = new PHPMailer(); 193 $mail->IsSMTP(); 194 $boemailadmin = CreateObject('emailadmin.bo'); 195 $emailadmin_profile = $boemailadmin->getProfileList(); 196 $emailadmin = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']); 197 $mail->Host = $emailadmin['smtpServer']; 198 $mail->Port = $emailadmin['smtpPort']; 199 $mail->From = $GLOBALS['phpgw']->preferences->values['email']; 200 $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 201 $mail->IsHTML(true); 202 foreach ($notifUser as $userMail) 203 { 204 $mail->AddAddress($userMail); 205 $mail->Subject = lang("Filemanager notification"); 206 $mail->Body = lang("The user %1, sent the file \"%2\" (type %3) and asked to notify you.",$GLOBALS['phpgw_info']['user']['fullname'],$_FILES['upload_file']['name'][0],$_FILES['upload_file']['type'][0])."<br>"; 207 $mail->Body .= lang("Comments by user: %1",$_POST['upload_comment'][0])."<br>"; 208 $mail->Body .= lang("The file can be accessed by: %1","<a href=\"".$GLOBALS['phpgw']->link("index.php").">link</a><br>"); 209 // $mail->Body .= lang("The file can be accessed by: %1","<a href=\"".$GLOBALS['phpgw']->link("../index.php","menuaction=filemanager.uifilemanager.view&file=" . urlencode(base64_encode($_FILES['upload_file']['name'][0]))."&path=".urlencode(base64_encode($path)))."\">link</a><br>"); 210 if(!$mail->Send()) { 211 $return[] = $mail->ErrorInfo; 212 } 213 } 214 } 215 185 216 if (count($return) > 0){ 186 217 $_SESSION['response'] = serialize($return); -
branches/2.2/filemanager/js/common_functions.js
r3408 r3415 307 307 } 308 308 309 function sendNotification(){ 310 var winEl = document.getElementById('uploadOption').parentNode; 311 var emailTo = document.createElement("INPUT"); 312 emailTo.name="notifTo[]"; 313 emailTo.type="text"; 314 emailTo.size="38"; 315 var labelTo = document.createElement("SPAN"); 316 labelTo.innerHTML = get_lang("Send Notification email to:"); 317 winEl.insertBefore(labelTo,document.getElementById('uploadOption')); 318 winEl.insertBefore(emailTo,document.getElementById('uploadOption')); 319 } 320 309 321 function sendFiles(){ 310 322 cExecuteForm_(document.getElementById('form_up'),handler.upload); -
branches/2.2/filemanager/setup/phpgw_pt-br.lang
r3386 r3415 179 179 who filemanager pt-br Quem 180 180 you do not have access to %1 filemanager pt-br Você não tem acesso a %1 181 your home dir did not exist, created a new one. filemanager pt-br Seu Diretório Home não existia, foi criado um novo. 181 Your Home Dir did not exist, eGroupWare created a new one. filemanager pt-br Seu Diretório Home não existia, foi criado um novo. 182 Filemanager notification filemanager pt-br Gerenciador de arquivos notifica 183 The user %1, sent the file "%2" (type %3) and asked to notify you. filemanager pt-br O usuário %1, enviou o arquivo "%2" (tipo %3) e solicitou o notificar. 184 Comments by user: %1 filemanager pt-br Comentários do usuário: %1 185 The file can be accessed by: %1 filemanager pt-br O arquivo pode ser acessado pelo endereço: %1 186 Send Notification email to: filemanager pt-br Enviar email de notificação a: -
branches/2.2/filemanager/templates/default/upload.tpl
r3367 r3415 7 7 <td><strong>{lang_file}</strong></td> 8 8 <td><strong>{lang_comment}</strong></td> 9 <td></td> 9 10 </tr> 10 11 <!-- END upload_header --> … … 14 15 <td><input onchange="javascript:addNewInput();" maxlength="255" name="upload_file[]" type="file"></td> 15 16 <td><input name="upload_comment[]" type="text"></td> 17 <td><img src="filemanager/images/mail.png" alt="Send email" title="Send email" onclick="sendNotification();"></td> 16 18 </tr> 17 19 <!-- END row -->
Note: See TracChangeset
for help on using the changeset viewer.