Changeset 4972
- Timestamp:
- 08/22/11 10:00:54 (13 years ago)
- Location:
- sandbox/expressoMail1_2/MailArchiver/2.2
- Files:
-
- 2 deleted
- 27 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
sandbox/expressoMail1_2/MailArchiver/2.2/admin/inc/class.bovoip.inc.php
r395 r4972 38 38 $group = "<groups>"; 39 39 40 if( (trim($groups) != '') && (is_array($groups)))40 if(is_array($groups)) 41 41 { 42 42 foreach($groups as $tmp) -
sandbox/expressoMail1_2/MailArchiver/2.2/calendar/inc/class.bocalendar.inc.php
r4427 r4972 804 804 } 805 805 806 // TODO: Levar em considera ção no cálculo das ocorrências o parâmetro806 // TODO: Levar em consideracao no calculo das ocorrencias o parametro 807 807 // $event['recur_interval'] 808 808 function expand_repetition($event){ … … 1245 1245 $this->so->set_recur_weekly((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval'],$l_cal['recur_data']); 1246 1246 break; 1247 case MCAL_RECUR_MONTHLY_WDAY: 1248 $var_wday = true; 1247 1249 case MCAL_RECUR_MONTHLY_MDAY: 1248 $this->so->set_recur_monthly_mday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']); 1249 1250 if ($var_wday) 1251 { 1252 $this->so->set_recur_monthly_wday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']); 1253 } 1254 else 1255 { 1256 $this->so->set_recur_monthly_mday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']); 1257 } 1258 1250 1259 $repetido = (int)$l_cal['recur_type']; // recebe o tipo de repeticao; 1251 1260 $this->so->add_attribute('recur_type',(@isset($repetido) && $repetido?$repetido:0)); … … 1264 1273 $end_rept = 0; // variavel recebe zero e nao sera adicionado nenhum alarme para o agendamento; 1265 1274 } 1266 break;1267 case MCAL_RECUR_MONTHLY_WDAY:1268 $this->so->set_recur_monthly_wday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']);1269 1275 break; 1270 1276 case MCAL_RECUR_YEARLY: … … 2985 2991 2986 2992 //set to GMT 2987 //Aqui estou pegando o hor ário do evento e setando para GMT de acordo com o fuso horário estabelecido nas configurações do expresso.2993 //Aqui estou pegando o horario do evento e setando para GMT de acordo com o fuso horario estabelecido nas configuracoes do expresso. 2988 2994 $start_time = mktime($event['start']['hour'],$event['start']['min'],$event['start']['sec'],$event['start']['month'],$event['start']['mday'],$event['start']['year']) - $GLOBALS['phpgw']->datetime->tz_offset; 2989 2995 $end_time = mktime($event['end']['hour'],$event['end']['min'],$event['end']['sec'],$event['end']['month'],$event['end']['mday'],$event['end']['year']) - $GLOBALS['phpgw']->datetime->tz_offset; … … 2992 2998 $end_time = date("Ymd\THis\Z", $end_time); 2993 2999 2994 // Necess ário espaços após quebra-de-linha, na descrição, caso contrário2995 // ocorrer áerro ao importar o agendamento no Outlook (erro lunar).3000 // Necessario espacos apos quebra-de-linha, na descricao, caso contrario 3001 // ocorrera erro ao importar o agendamento no Outlook (erro lunar). 2996 3002 $description = str_replace("\n","\n ", $event['description']); 2997 3003 … … 3433 3439 } 3434 3440 3435 //Inicializa vari ï¿œvel de retorno.3441 //Inicializa variavel de retorno. 3436 3442 $returncode=true; 3437 3443 if(count($mail->to)) { … … 3532 3538 $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] = $temp_dateformat; 3533 3539 3534 // Notifica por email o criador do compromisso, com as poss ï¿œveis falhas.3540 // Notifica por email o criador do compromisso, com as posseveis falhas. 3535 3541 if($errorInfo) { 3536 3542 $tmpbody = "<font color='red'>".lang("The following commitment had problems for DELIVERING the NOTIFICATION messages.").".</font><br>"; -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ScriptS.inc.php
r4644 r4972 254 254 $continue = 1; 255 255 $tmpSubject = ""; 256 257 $a = 0;258 259 256 260 257 // Recebe os valores das regras; … … 281 278 $rule['unconditional'] = 0; 282 279 283 if( $a < 2 )284 {285 error_log( print_r($tmp, true), 3, "/tmp/log" );286 287 error_log( print_r($rule, true), 3, "/tmp/log" );288 289 $a++;290 }291 292 293 280 if (!$rule['from'] && !$rule['to'] && !$rule['subject'] && !$rule['field'] && empty($rule['size']) && $rule['action']) { 294 281 $rule['unconditional'] = 1; -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.dynamic_contacts.inc.php
r4644 r4972 79 79 { 80 80 foreach($this->contacts as $item => $valor) 81 $contact .= str_replace("#",";",$this->contacts[$item]['email']) . ','; 81 // 82 if (strstr($this->contacts[$item]['email'], '#')){ 83 $contact .= str_replace("#",";",$this->contacts[$item]['email']) . ','; 84 }else{ 85 $contact .= ';'.$this->contacts[$item]['email'] . ','; 86 } 87 82 88 //Retira ultima virgula. 83 89 $contact = substr($contact,0,(strlen($contact) - 1)); … … 106 112 { 107 113 // Trim all whitespaces and duplicated commas from full_email_address 108 $full_email_address = preg_replace('{(,)\1+}',',',ereg_replace( ' +', '', $full_email_address));114 //$full_email_address = preg_replace('{(,)\1+}',',',ereg_replace( ' +', '', $full_email_address)); 109 115 $parse_address = imap_rfc822_parse_adrlist($full_email_address, ""); 110 116 $new_contacts = array(); … … 118 124 if(!$this->contacts) // Used one time to insert the first contact in database 119 125 { 120 $this->db->insert_contact( $val->personal."#".$val->mailbox."@".$val->host);126 $this->db->insert_contact(ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host); 121 127 // Just new contact added. 122 $new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host;128 $new_contacts[] = ltrim(rtrim($val->personal)).";".$val->mailbox."@".$val->host; 123 129 $this->contacts = $this->db->get_dynamic_contacts(); 124 130 } … … 129 135 foreach($this->contacts as $item => $valor) 130 136 { 131 if($this->contacts[$item]['email'] == $val->personal."#".$val->mailbox."@".$val->host) // check if email already exists137 if($this->contacts[$item]['email'] == ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host) // check if email already exists 132 138 { 133 139 $this->contacts[$item]['timestamp'] = time(); //update timestamp of email … … 143 149 { 144 150 // Just new contact added. 145 $new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host;151 $new_contacts[] = ltrim(rtrim($val->personal)).";".$val->mailbox."@".$val->host; 146 152 if($this->number_of_contacts > count($this->contacts)) 147 153 { 148 154 $this->contacts[] = array( 'timestamp' => time(), 149 'email' => $val->personal."#".$val->mailbox."@".$val->host);155 'email' => ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host); 150 156 } 151 157 if($this->number_of_contacts <= count($this->contacts)) 152 158 { 153 159 $this->contacts[$older_contact] = array( 'timestamp' => time(), 154 'email' => $val->personal."#".$val->mailbox."@".$val->host);160 'email' => ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host); 155 161 } 156 162 } -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php
r4778 r4972 129 129 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid", "employeeNumber", "ou"); 130 130 else 131 $justthese = array("cn", "mail", "telephoneNumber", " mobile", "phpgwAccountVisible", "uid");131 $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible", "uid"); 132 132 } 133 133 else … … 137 137 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible","jpegPhoto", "uid", "employeeNumber", "ou"); 138 138 else 139 $justthese = array("cn", "mail", "telephoneNumber", " mobile", "phpgwAccountVisible","jpegPhoto", "uid");139 $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible","jpegPhoto", "uid"); 140 140 } 141 141 $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result + 1); … … 191 191 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid","employeeNumber", "ou"); 192 192 else 193 $justthese = array("cn", "mail", "telephoneNumber", " mobile", "phpgwAccountVisible", "uid");193 $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible", "uid"); 194 194 $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result+1); 195 195 if(!$sr) … … 834 834 $justthese = array("cn","uid","telephoneNumber","jpegPhoto","mobile","ou","employeeNumber"); 835 835 else 836 $justthese = array("cn","uid","telephoneNumber","jpegPhoto" ,"mobile");836 $justthese = array("cn","uid","telephoneNumber","jpegPhoto"); 837 837 838 838 // Follow the referral -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.rss.inc.php
r4778 r4972 1 1 <?php 2 3 include('../header.inc.php'); 2 4 3 5 class rss 4 6 { 5 6 function rss (){7 }8 7 // BEGIN of functions. 9 function getContent($param){ 8 function getContent($param) 9 { 10 10 $daurl=$param['url']; 11 11 12 if (preg_match('/http(s)?:\/\//i',$daurl,$matches) == 0) 12 13 $daurl = 'http://'.$daurl; … … 34 35 } 35 36 36 private function createTableRSS()37 {38 $query = 'CREATE TABLE phpgw_userrss( uid INT NOT NULL,rss_url VARCHAR(1000),name varchar(50), PRIMARY KEY (uid,rss_url) );';39 40 $GLOBALS['phpgw']->db->query($query);41 42 if ( $GLOBALS['phpgw']->db->Error )43 return false;44 else45 return true;46 }47 48 37 function getChannels() 49 38 { 50 include('../header.inc.php');39 $query = "SELECT config_value FROM phpgw_config WHERE config_name = 'expressoMail_enabled_read_rss';"; 51 40 52 $flag = false; 53 $tableQuery = "select relname from pg_stat_user_tables order by relname;"; 54 55 if( $GLOBALS['phpgw']->db->query( $tableQuery ) ) 41 if( $GLOBALS['phpgw']->db->query( $query ) ) 56 42 { 57 43 while( $GLOBALS['phpgw']->db->next_record() ) 58 44 { 59 $tables[] = $GLOBALS['phpgw']->db->row(); 60 } 61 62 foreach( $tables as $tableName ) 63 { 64 if( strtolower( $tableName['relname'] ) === 'phpgw_userrss' ) 65 { 66 $flag = true; 67 } 45 $result = $GLOBALS['phpgw']->db->row(); 68 46 } 69 47 } 70 48 71 if( !$flag)49 if( $result['config_value'] === 'true' ) 72 50 { 73 $flag = $this->createTableRSS(); 51 $query = "SELECT * FROM phpgw_config WHERE config_name = 'expressoMail_list_rss';"; 52 53 if( $GLOBALS['phpgw']->db->query($query) ) 54 { 55 while( $GLOBALS['phpgw']->db->next_record() ) 56 { 57 $result = $GLOBALS['phpgw']->db->row(); 58 } 59 } 60 61 if( $result['config_value'] ) 62 { 63 $i = 0; 64 $rss = unserialize($result['config_value']); 65 66 foreach( $rss as $item ) 67 { 68 $tmp = explode( "|", $item ); 69 $return[$i]['rss_url'] = $tmp[0]; 70 $return[$i++]['name'] = $tmp[1]; 71 } 72 73 return $return; 74 } 75 else 76 return ""; 74 77 } 75 76 $query = 'SELECT rss_url,name FROM phpgw_userrss WHERE uid = '.$_SESSION['phpgw_session']['account_id'];77 78 if( $GLOBALS['phpgw']->db->query($query) )79 {80 while( $GLOBALS['phpgw']->db->next_record() )81 {82 $return[] = $GLOBALS['phpgw']->db->row();83 }84 }85 86 if( count($return) > 0 )87 return $return;88 else89 return "";90 78 } 91 79 92 function addChannel($param)80 /*function addChannel($param) 93 81 { 94 include('../header.inc.php'); 95 $name = $GLOBALS['phpgw']->db->db_addslashes(htmlentities($param['name'])); 96 $url = $GLOBALS['phpgw']->db->db_addslashes($param['url']); 97 $GLOBALS['phpgw']->db->query('INSERT INTO phpgw_userrss values('.$_SESSION['phpgw_session']['account_id'].',\''.$url.'\',\''.$name.'\');',__LINE__,__FILE__); 82 83 $name = $GLOBALS['phpgw']->db->db_addslashes(htmlentities($param['name'])); 84 $url = $GLOBALS['phpgw']->db->db_addslashes($param['url']); 85 $query = 'INSERT INTO phpgw_userrss values('.$_SESSION['phpgw_session']['account_id'].',\''.$url.'\',\''.$name.'\');'; 86 87 error_log( print_r( $query, true ), 3, "/tmp/log" ); 88 89 $GLOBALS['phpgw']->db->query( $query ,__LINE__,__FILE__ ); 98 90 if ($GLOBALS['phpgw']->db->Error) 99 91 return "Error"; 100 92 else 101 93 return "Success"; 102 94 103 95 } … … 105 97 function removeChannel($param) 106 98 { 107 include('../header.inc.php');108 99 $url = $GLOBALS['phpgw']->db->db_addslashes($param['url']); 109 100 $GLOBALS['phpgw']->db->query('DELETE FROM phpgw_userrss where rss_url = \''.$url.'\';',__LINE__,__FILE__); … … 112 103 else 113 104 return "Success"; 114 } 105 }*/ 115 106 116 107 } -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/hook_admin.inc.php
r1040 r4972 26 26 $file = Array( 27 27 'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), 28 'RSS Reader' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoMail1_2.uiconfigRSS.editRss') 28 29 ); 30 29 31 //Do not modify below this line 30 32 display_section($appname,$title,$file); -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/abas.js
r4202 r4972 34 34 if (spanD) 35 35 spanD.style.display = (openTab.type[ID] == 0 ? '' : 'none'); 36 36 37 if( document.getElementById('divScrollMain_0') != null ) 38 { 39 var _RSS = document.getElementById('divScrollMain_0'); 40 } 41 37 42 var footer_menu = Element("footer_menu"); 38 43 if (footer_menu) { 39 footer_menu.style.display = (openTab.type[ID] != 4 ? '' : 'none'); 44 45 var attrRSS = _RSS.getAttribute("rss"); 46 47 if( attrRSS == "rss" ) 48 { 49 footer_menu.style.display = "none"; 50 } 51 else 52 { 53 footer_menu.style.display = (openTab.type[ID] != 4 ? '' : 'none'); 54 } 55 56 var options_search = Element('span_options'); 57 if (options_search){ 58 var spans_search = options_search.getElementsByTagName("span"); 59 var span_search; 60 for (i = 0; i < spans_search.length; i++){ 61 span_search = spans_search[i]; 62 span_search.className == 'message_options_export'?span_search.style.display = (openTab.type[ID] != 1 ? '' : 'none'):''; 63 span_search.className == 'message_options_import'?span_search.style.display = (openTab.type[ID] == 0 ? '' : 'none'):''; 64 (span_search.title == get_lang("Archive") || span_search.title == get_lang("Unarchive"))?span_search.style.display = (openTab.type[ID] == 0 ? '' : 'none'):''; 65 } 66 } 67 40 68 } 41 69 … … 122 150 } 123 151 124 function create_border(borderTitle, id_value) 125 { 152 function create_border(borderTitle, id_value, border_type) 153 { 154 if (borderTitle == get_lang("Server Results")) 155 id_value = "search_" + parseInt(BordersArray.length-1) + 1; 156 126 157 borderTitle = ( ( borderTitle && borderTitle.constructor == String && borderTitle.length > 0 ) ? borderTitle : ' ' ); 127 158 … … 195 226 196 227 Element("exmail_main_body").insertBefore(div,Element("footer_menu")); 228 229 if(border_type) 230 openTab.type[ID] = border_type; 197 231 alternate_border(ID); 198 232 return ID; … … 318 352 } 319 353 if(j == 1) 320 Element("footer_menu").style.display = ''; 354 { 355 if( document.getElementById('divScrollMain_0') != null ) 356 { 357 var _RSS = document.getElementById('divScrollMain_0'); 358 } 359 360 var attrRSS = _RSS.getAttribute("rss"); 361 362 if( attrRSS == "rss" ) 363 { 364 Element("footer_menu").style.display = 'none'; 365 } 366 else 367 { 368 Element("footer_menu").style.display = ''; 369 } 370 } 371 321 372 BordersArray = new_BordersArray; 322 373 -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/doiMenuData.js
r4778 r4972 10 10 if (!expresso_offline) 11 11 { 12 if( eval(enabledReadRSS ) == true ) 13 { 14 var itens = new Array( "preferences_mail()|" + get_lang("Preferences") + "|preferences.png", 15 "search_emails(\"\")|" + get_lang("Search") + "|search.png", 16 "filterbox()|" + get_lang("Edit filters") + "|filters.png", 17 "folderbox()|" + get_lang("Edit folders") + "|editfolders.png", 18 "sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png", 19 "editrss()|" + get_lang("Edit my news") + "|rss.png", 20 "empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png"); 21 } 22 else 23 { 24 var itens = new Array( "preferences_mail()|" + get_lang("Preferences") + "|preferences.png", 25 "search_emails(\"\")|" + get_lang("Search") + "|search.png", 26 "filterbox()|" + get_lang("Edit filters") + "|filters.png", 27 "folderbox()|" + get_lang("Edit folders") + "|editfolders.png", 28 "sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png", 29 "empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png"); 30 31 } 12 var itens = new Array( "preferences_mail()|" + get_lang("Preferences") + "|preferences.png", 13 "search_emails(\"\")|" + get_lang("Search") + "|search.png", 14 "filterbox()|" + get_lang("Edit filters") + "|filters.png", 15 "folderbox()|" + get_lang("Edit folders") + "|editfolders.png", 16 "sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png", 17 "empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png"); 32 18 33 19 if(window.google && google.gears && preferences.use_local_messages==1) -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/draw_api.js
r4968 r4972 165 165 } 166 166 else{ 167 if (!expresso_offline) { 168 tree_folders = new dFTree({name: 'tree_folders'}); 167 if (!expresso_offline) 168 { 169 tree_folders = new dFTree({name: 'tree_folders'}); 169 170 170 171 var n_root = new dNode({id:'root', caption: get_lang("My Folders")}); … … 233 234 } 234 235 235 var handlerChannel = function(data) 236 var handlerChannel = function(data) 237 { 238 239 if ( data == null || typeof(data) == 'string') 240 { 241 return false; 242 } 243 244 var nodeParent = document.getElementById('content_folders'); 245 var treeRss = new dFTree({name: 'treeRss'}); 246 var root_rss = new dNode({id:'news_root', caption: get_lang("News")}); 247 248 treeRss.add(root_rss,'anything'); 249 250 for( i=0; i < data.length; i++ ) 236 251 { 237 238 if ( data == null || typeof(data) == 'string') 239 { 240 return false; 241 } 242 243 var nodeParent = document.getElementById('content_folders'); 244 var treeRss = new dFTree({name: 'treeRss'}); 245 var root_rss = new dNode({id:'news_root', caption: get_lang("News")}); 246 247 treeRss.add(root_rss,'anything'); 248 249 for( i=0; i < data.length; i++ ) 252 var nodeNews = new dNode( 250 253 { 251 var nodeNews = new dNode(252 {253 254 id: "NEWS/"+data[i].name, 254 255 caption: data[i].name, 255 256 onClick: "open_rss('"+data[i].rss_url+"')", 256 257 plusSign: 0 257 258 259 258 }); 259 treeRss.add(nodeNews,"news_root"); 260 } 260 261 261 262 treeRss.draw( nodeParent ); 262 263 263 264 265 266 267 268 269 270 271 272 264 with ( document.getElementById('lnews_roottreeRss') ) 265 { 266 style.backgroundImage = "url(templates/"+template+"/images/menu/rss.png)"; 267 style.marginLeft = "2px"; 268 } 269 270 if( nodeParent.firstChild.id != ("dftree_" + treeRss.name ) ) 271 { 272 var _folder = Element(nodeParent.firstChild.id); 273 var _rssNews = Element("dftree_" + treeRss.name ); 273 274 274 275 275 nodeParent.insertBefore( _rssNews, _folder ); 276 } 276 277 277 } 278 279 if( eval(enabledReadRSS ) == true ) 280 cExecute('$this.rss.getChannels',handlerChannel); 281 278 } 279 280 if( eval(enabledReadRSS ) == true ) 281 { 282 setTimeout(function() 283 { 284 cExecute('$this.rss.getChannels',handlerChannel); 285 }, 2000); 286 } 287 282 288 tree_folders.draw(Element('content_folders')); 283 289 if (!expresso_offline) { -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/messages_controller.js
r4971 r4972 74 74 if (folder == 'null') 75 75 folder = get_current_folder(); 76 if (msgs_number == 'selected') 77 msgs_number = get_selected_messages(); 78 76 if (msgs_number == 'selected'){ 77 if (openTab.type[currentTab] > 1){ 78 msgs_number = currentTab.substring(0,currentTab.length-2,currentTab); 79 }else{ 80 msgs_number = get_selected_messages(); 81 } 82 } 79 83 if (!this.is_local_folder(folder)) 80 84 delete_msgs(folder, msgs_number, border_ID); -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/news_edit.js
r4778 r4972 9 9 cnews_edit.prototype.read_rss = function(val) 10 10 { 11 Element("border_id_0").innerHTML = get_lang('News')+' <font face="Verdana" size="1" color="#505050">[ <span id="tot_m"></span> ]</font>';12 11 document.getElementById("border_id_0").innerHTML = get_lang('News')+' <font face="Verdana" size="1" color="#505050">[ <span id="tot_m"></span> ]</font>'; 12 13 13 current_folder = "NEWS/"+val; 14 14 openTab.imapBox[0] = "NEWS/"+val; … … 23 23 'lang_size' : get_lang('size') 24 24 }; 25 25 26 // Div 26 27 var _div = document.getElementById("content_id_0"); 27 28 _div.innerHTML = this.xtools.parse( this.rssXml, 'stylesheet/news_read.xsl' , langs ); 28 29 30 resizeWindow(); 31 32 var footerMenu = document.getElementById("footer_menu"); 33 34 // footer Menu; 35 if( footerMenu ) 36 { 37 footerMenu.style.display = "none"; 38 } 39 29 40 update_menu(); 30 var box = Element("tbody_box"); 41 42 var box = document.getElementById("tbody_box"); 31 43 32 44 if(box.childNodes.length > 1) … … 41 53 } 42 54 43 Element("tot_m").innerHTML = box.childNodes.length - 1 ;55 document.getElementById("tot_m").innerHTML = box.childNodes.length - 1 ; 44 56 } 45 57 … … 55 67 } 56 68 57 var title = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('title')[0].firstChild.nodeValue; 58 var pubDate = this.dateString(this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('pubDate')[0].firstChild.nodeValue); 59 var link = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('link')[0].firstChild.nodeValue; 60 var owner = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('owner')[0]; 61 if (currentTab.toString().indexOf('news_') != -1) 69 var title = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('title')[0].firstChild.nodeValue; 70 var pubDate = this.dateString(this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('pubDate')[0].firstChild.nodeValue); 71 var link = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('link')[0].firstChild.nodeValue; 72 var owner = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('owner')[0]; 73 74 if ( currentTab.toString().indexOf('news_') != -1 ) 62 75 delete_border(currentTab); 63 var border_id = create_border(title, 'news_'+item_number); 76 77 var border_id = create_border(title, 'news_'+item_number, "RSS" ); 78 64 79 if(!border_id) 65 80 return false; … … 68 83 69 84 var toolbarCode = "<div style='background-color: #FFF; font-size: larger;'>"+ 70 "<table class='table_message' style='width:100%;'><tr><td>"+(owner != undefined?owner.firstChild.nodeValue:get_lang('nobody'))+", "+pubDate+"</td>"+ 71 '<td width="30%" align="left"></td>'+ 72 '<td nowrap="true" width="30%" align="right"><a target="_blank" href="'+link+'" style class="message_options">'+get_lang('Complete news')+'</a>'; 73 if ( owner != undefined ) 74 toolbarCode += '<span> | </span><span class="message_options">'+get_lang('forward')+'</span><span> | </span>'+ 75 '<span class="message_options">Responder</span></td>'; 76 toolbarCode += '<td nowrap="true" width="40px" align="right">'+ 77 ( item_number == 1 ? '<img style="cursor: default;" src="./templates/default/images/up.gray.button.png">' : 78 '<img onclick="news_edit.read_item('+(parseInt(item_number)-1)+')" style="cursor: default;" src="./templates/default/images/up.button.png">')+ 79 '<span> </span>'+ 85 "<table class='table_message' style='width:100%;'><tr><td>"+pubDate+"</td>"+ 86 "<td width='30%' align='left'></td>"+ 87 "<td nowrap='true' width='30%' align='right'><a target='_blank' href='"+link+"' style class='message_options'>"+get_lang("Complete news")+"</a>"; 88 89 90 toolbarCode += '<td nowrap="true" width="40px" align="right">'+ 91 ( item_number == 1 ? '<img style="cursor: default;" src="./templates/default/images/up.gray.button.png">' : 92 '<img onclick="news_edit.read_item('+(parseInt(item_number)-1)+')" style="cursor: default;" src="./templates/default/images/up.button.png">')+ 93 '<span> </span>'+ 80 94 (this.rssXml.getElementsByTagName('item')[parseInt(item_number)] == undefined ? '<img style="cursor: default;" src="./templates/default/images/down.gray.button.png">' : 81 95 '<img onclick="news_edit.read_item('+(parseInt(item_number)+1)+')" style="cursor: pointer;" src="./templates/default/images/down.button.png">')+ 82 96 "</td></tr></table><h2>"+title+"</h2><br>"+description+"</div>"; 83 Element('content_id_'+border_id).innerHTML = toolbarCode; 97 98 document.getElementById('content_id_'+border_id).innerHTML = toolbarCode; 99 84 100 resizeWindow(); 101 102 var footerMenu = document.getElementById("footer_menu"); 103 104 // footer Menu; 105 if( footerMenu ) 106 { 107 footerMenu.style.display = "none"; 108 } 85 109 } 86 110 … … 99 123 } 100 124 101 cnews_edit.prototype.makeWindow = function(options) 102 { 103 _this = this; 104 105 var params = 106 { 107 'lang_label1' : get_lang('Enter the URL of RSS service'), 108 'lang_label2' : get_lang('List of registered RSS'), 109 'lang_subscribe' : get_lang('Subscribe') 110 }; 111 112 var el = document.createElement("DIV"); 113 el.style.visibility = "hidden"; 114 el.style.position = "absolute"; 115 el.style.left = "0px"; 116 el.style.top = "0px"; 117 el.style.width = "0px"; 118 el.style.height = "0px"; 119 el.id = 'dJSWin_newswin'; 120 el.innerHTML = this.xtools.parse( this.xtools.xml('make_window'), 'stylesheet/makeWindow.xsl', params ); 121 122 document.body.appendChild(el); 123 124 var butt = Element('dJSWin_wfolders_bok'); 125 126 if ( !butt ) 127 { 128 butt = document.createElement('INPUT'); 129 butt.style.margin = "3px"; 130 butt.id = 'dJSWin_wfolders_bok'; 131 butt.type = 'button'; 132 butt.value = get_lang('Close'); 133 el.appendChild(butt); 134 } 135 136 butt.onclick = function () 137 { 138 news_edit.arrayWin[el.id].close(); 139 } 140 141 _this.showWindow(el); 142 } 143 144 cnews_edit.prototype.showWindow = function (div) 145 { 146 if(! this.arrayWin[div.id]) 147 { 148 div.style.height = "280px"; 149 div.style.width = "340px"; 150 var title = "<label style='margin-left:5px;'>:: "+get_lang("News edit")+" ::</label> "; 151 var wHeight = div.offsetHeight + "px"; 152 var wWidth = div.offsetWidth + "px"; 153 div.style.width = div.offsetWidth - 5; 154 155 win = new dJSWin({ 156 id: 'win_'+div.id, 157 content_id: div.id, 158 width: wWidth, 159 height: wHeight, 160 title_color: '#3978d6', 161 bg_color: '#eee', 162 title: title, 163 title_text_color: 'white', 164 button_x_img: '../phpgwapi/images/winclose.gif', 165 border: true 166 }); 167 this.arrayWin[div.id] = win; 168 win.draw(); 169 } 170 else 171 { 172 win = this.arrayWin[div.id]; 173 } 174 175 win.open(); 176 177 var handlerChannel = function( data ) 178 { 179 var _listRss = document.getElementById("listRSS"); 180 181 if( data != null ) 182 { 183 for( var i = 0 ; i < data.length; i++) 184 { 185 _listRss.innerHTML += "<div>" + 186 "<img onclick='news_edit.unsubscribe(\""+data[i].rss_url+"\",this);' style='width:16px; height:16px; cursor: pointer;' src='../phpgwapi/templates/default/images/foldertree_trash.png' />" + 187 "<label style='margin-right: 2px'>"+data[i].name+"</label>" + 188 "</div>"; 189 } 190 } 191 } 192 193 cExecute('$this.rss.getChannels',handlerChannel); 194 } 125 cnews_edit.prototype.trim = function(inputString) 126 { 127 if (typeof inputString != "string") 128 return inputString; 129 130 var retValue = inputString; 131 var ch = retValue.substring(0, 1); 132 133 while (ch == " ") 134 { 135 retValue = retValue.substring(1, retValue.length); 136 ch = retValue.substring(0, 1); 137 } 138 ch = retValue.substring(retValue.length-1, retValue.length); 139 140 while ( ch == " ") 141 { 142 retValue = retValue.substring(0, retValue.length-1); 143 ch = retValue.substring(retValue.length-1, retValue.length); 144 } 145 146 while (retValue.indexOf(" ") != -1) 147 { 148 retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ")+1, retValue.length); 149 } 150 151 return retValue; 152 } 153 154 195 155 cnews_edit.prototype.unsubscribe = function(url,el) 196 156 { 197 var rem_handler = function (data) 198 { 199 if ( data != "Success" ) 200 { 201 if (data == "Error") 202 alert(get_lang("Database Error")); 203 else 204 alert(get_lang("Invalid entry")); 205 } 206 else 207 { 208 el.parentNode.parentNode.removeChild( el.parentNode ); 209 } 210 }; 211 212 cExecute('$this.rss.removeChannel&url='+escape(url),rem_handler); 213 } 157 var _select = document.getElementById("list_rss"); 158 159 for( var i = 0 ; i < _select.options.length; i++ ) 160 { 161 if( _select.options[i].selected == true ) 162 { 163 _select.removeChild(_select.options[i]); 164 i--; 165 } 166 } 167 } 168 214 169 cnews_edit.prototype.subscribe = function() 215 170 { 216 var newTableEl = document.getElementById("listRSS"); 217 var val = trim( Element('rssEnter').value ); 218 219 if( val != "" ) 220 { 221 this.rssXml = this.xtools.load('controller.php?action=$this.rss.getContent&url='+escape(val)); 222 223 var params = 224 { 225 'linkURL' : val 226 }; 227 228 var _div = document.createElement("div"); 229 _div.innerHTML = this.xtools.parse( this.rssXml, 'stylesheet/news_add.xsl', params ); 230 231 var add_handler = function (data) 232 { 233 if ( data != "Success" ) 234 { 235 if ( data == "Error" ) 236 alert( get_lang("Database Error") ); 237 else 238 alert( get_lang("Invalid entry") ); 239 } 240 else 241 { 242 newTableEl.appendChild(_div); 243 } 244 }; 245 246 try 247 { 248 if( _div.childNodes[2].getAttribute("titleRss") ) 249 { 250 var name = _div.childNodes[2].getAttribute("titleRss"); 251 252 cExecute('$this.rss.addChannel&url='+escape(val)+'&name='+name,add_handler); 253 } 254 } 255 catch(e){ } 256 } 257 171 var _select = document.getElementById("list_rss"); 172 173 var _rssUrl = this.trim( document.getElementById('rssEnter').value ); 174 175 if( _rssUrl != "" ) 176 { 177 var _lang = document.getElementById('lang_can_not_access_this_rss').value 178 179 try 180 { 181 this.rssXml = this.xtools.load('expressoMail1_2/controller.php?action=$this.rss.getContent&url='+escape(_rssUrl)); 182 183 title = this.rssXml.getElementsByTagName("title"); 184 185 if( title.length > 0 && this.trim(title[0].childNodes[0].nodeValue) != "" ) 186 { 187 var flag = false; 188 189 for( var i = 0; i < _select.options.length; i++ ) 190 { 191 if( this.trim( _select.options[i].value ) == this.trim( _rssUrl ) ) 192 { 193 flag = true; 194 } 195 } 196 197 if( !flag ) 198 { 199 var _value = _rssUrl + "|" + title[0].childNodes[0].nodeValue; 200 _select.options[_select.length] = new Option( title[0].childNodes[0].nodeValue, _value , false, true ); 201 } 202 203 document.getElementById('rssEnter').value = ""; 204 } 205 else 206 { 207 alert( _lang + "!!" ); 208 } 209 } 210 catch(e) 211 { 212 alert( _lang + "!!" ); 213 } 214 } 258 215 }; 259 216 -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/search.js
r4644 r4972 375 375 numBox++; 376 376 377 if( Data['data'] )378 var border_id = create_border(get_lang("Server Results"), "search_" + numBox );377 if( Data['data'] ) 378 var border_id = create_border(get_lang("Server Results"), "search_" + numBox,1); 379 379 380 380 if( Data['data_gears']) 381 var border_id = create_border(get_lang("Local Results"), "search_local_msg" + numBox );381 var border_id = create_border(get_lang("Local Results"), "search_local_msg" + numBox,1); 382 382 383 383 if (!border_id) … … 387 387 openTab.content_id[currentTab] = Element('content_id_search_' + numBox); 388 388 openTab.type[currentTab] = 1; 389 389 390 390 var table = document.createElement("TABLE"); 391 391 table.id = "table_resultsearch_" + numBox; -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/setup.inc.php
r4876 r4972 16 16 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_expressomail_contacts'; 17 17 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_certificados'; 18 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_userrss';19 18 $setup_info['expressoMail1_2']['enable'] = 1; 20 19 -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/tables_current.inc.php
r4778 r4972 33 33 'ix' => array(), 34 34 'uc' => array() 35 ),36 'phpgw_userrss' => array(37 'fd' => array(38 'uid' => array('type' => 'int', 'nullable' => false ),39 'rss_url' => array('type' => 'varchar', 'precision' => 1000 ),40 'name' => array('type' => 'varchar', 'precision' => 50)41 ),42 'pk' => array('uid','rss_url'),43 'fk' => array(),44 'ix' => array(),45 'uc' => array()46 35 ) 47 36 ); -
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/config.tpl
r4778 r4972 147 147 </td> 148 148 </tr> 149 <tr bgcolor="{th_bg}">150 <td colspan="2">151 152 </td>153 </tr>154 <tr bgcolor="{row_on}">155 <td>156 <label style="font-weight:bold;">Habilitar leitor de RSS</label>157 </td>158 <td>159 <select id="enabledReadRSS" name="newsettings[expressoMail_enabled_read_rss]">160 <option value="false" {selected_expressoMail_enabled_read_rss_false}>{lang_No}</option>161 <option value="true" {selected_expressoMail_enabled_read_rss_true}>{lang_Yes}</option>162 </select>163 </td>164 </tr>165 149 <!-- END body --> 166 150 <!-- BEGIN footer --> -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/after_upload.php
r3610 r4972 21 21 include_once("../../header.inc.php"); 22 22 23 24 function convert_char( $String ) 25 { 26 $String = trim( str_replace( "\'", "", $String) ); 27 $String = str_replace( "'", "", $String ); 28 $String = str_replace( "ç", "c", $String ); 29 $String = str_replace( "Ã", "C", $String ); 30 $String = ereg_replace( "[áà âã]", "a", $String ); 31 $String = ereg_replace( "[ÃÃÃÃ]", "A", $String ); 32 $String = ereg_replace( "[éÚê]", "e", $String ); 33 $String = ereg_replace( "[ÃÃÃ]", "E", $String ); 34 $String = ereg_replace( "[Ãìîï]", "i", $String ); 35 $String = ereg_replace( "[ÃÃÃ]", "I", $String ); 36 $String = ereg_replace( "[óòÎõ]", "o", $String ); 37 $String = ereg_replace( "[ÃÃÃÃ]", "O", $String ); 38 $String = ereg_replace( "[úùû]", "u", $String ); 39 $String = ereg_replace( "[ÃÃÃ]", "U", $String ); 40 41 return $String; 42 } 43 23 44 $bo = CreateObject('filemanager.bofilemanager'); 24 45 25 foreach ($files as $f) { 26 if ($bo->vfs->cp(array( 27 'from'=> $f['fullName'], 28 'to'=> $f['name'], 29 'relatives' => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 30 ))) 46 foreach ($files as $f) 47 { 48 $newName = convert_char( $f['name'] ); 49 50 $_array = array( 51 'from' => $f['fullName'], 52 'to' => $newName, 53 'relatives' => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 54 ); 55 56 if ( $bo->vfs->cp($_array) ) 57 { 58 $bo->vfs->set_attributes(array( 59 'string' => $newName, 60 'relatives' => array( RELATIVE_ALL ), 61 'attributes' => array( 'mime_type' => $f['mimetype'] ) 62 )); 63 64 $fullName = $f['fullName']; 65 66 if( file_exists($fullName) ) 31 67 { 32 $bo->vfs->set_attributes(array( 33 'string'=> $f['name'], 34 'relatives' => array(RELATIVE_ALL), 35 'attributes'=> array( 36 'mime_type' => $f['mimetype'] 37 ) 38 )); 39 exec("rm -f ".escapeshellcmd(escapeshellarg($f['fullName']))); 68 exec("rm -f ".escapeshellcmd(escapeshellarg($fullName))); 40 69 } 70 } 41 71 } 42 72 -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/class.uifilemanager.inc.php
r4228 r4972 582 582 $return['files'] = $output; 583 583 $return['quota']['quotaSize'] = ($quota * 1024 * 1024); 584 //echo serialize(htmlspecialchars_decode(htmlentities($return))); 584 585 echo serialize($return); 585 586 } … … 609 610 $return[] = $dir['directory'] . $dir['name']; 610 611 sort(&$return, SORT_STRING); 612 611 613 echo serialize($return); 612 614 } … … 752 754 } 753 755 754 function createdir() { 756 function createdir() 757 { 755 758 if ($this->bo->badchar = $this->bo->bad_chars($this->filename, True, True)) { 756 759 echo lang('Error:') . $this->bo->html_encode(lang('Directory names cannot contain "%1"', $badchar), 1); … … 771 774 $fileinfo = $ls_array[0]; 772 775 773 if ($fileinfo['name']) { 776 if ($fileinfo['name']) 777 { 774 778 if ($fileinfo['mime_type'] != 'Directory') { 775 779 echo lang('Error:') . lang('%1 already exists as a file', $fileinfo['name']); … … 777 781 echo lang('Error:') . lang('Directory %1 already exists', $fileinfo['name']); 778 782 } 779 } else { 783 } 784 else 785 { 780 786 $this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 781 787 782 if ($this->bo->vfs->mkdir(array('string' => $this->filename))) { 783 echo lang('Created directory %1', $this->disppath . '/' . $this->filename); 784 } else { 788 if ($this->bo->vfs->mkdir(array('string' => $this->filename))) 789 { 790 echo "True"; 791 //echo lang('Created directory %1', $this->disppath . '/' . $this->filename); 792 } 793 else 794 { 785 795 echo lang('Error:') . lang('Could not create %1', $this->disppath . '/' . $this->filename); 786 796 } 787 797 } 788 echo lang('Directory created');798 789 799 } 790 800 -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/load_lang.php
r3873 r4972 25 25 } 26 26 27 echo "var array_lang = new Array(); \n$script";27 echo "var array_lang = new Array();\n{$script}"; 28 28 29 29 ?> -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/upload.php
r3897 r4972 33 33 $path = $_POST['path']; 34 34 $notifUser = $_POST['notifTo']; 35 $show_upload_boxes = count($_FILES['upload_file']['name']);36 $filesUpload 35 $show_upload_boxes = count($_FILES['upload_file']['name']); 36 $filesUpload = $_FILES['upload_file']; 37 37 38 38 function create_summaryImage($file) … … 121 121 { 122 122 $badchar = $bo->bad_chars( $_FILES['upload_file']['name'][$i], True, True ); 123 123 124 124 if( $badchar ) 125 125 { … … 165 165 $bo->vfs->cp($tmp_arr); 166 166 $tmp_arr=array( 167 'string' => $_FILES['upload_file']['name'][$i],168 'relatives' => array(RELATIVE_ALL),167 'string' => $_FILES['upload_file']['name'][$i], 168 'relatives' => array(RELATIVE_ALL), 169 169 'attributes' => array( 170 'owner_id'=> $bo->userinfo['username'],171 172 'size'=> $_FILES['upload_file']['size'][$i],173 'mime_type'=> $_FILES['upload_file']['type'][$i],174 'deleteable'=> 'Y',175 'comment'=> stripslashes($_POST['upload_comment'][$i])170 'owner_id' => $bo->userinfo['username'], 171 'modifiedby_id' => $bo->userinfo['username'], 172 'size' => $_FILES['upload_file']['size'][$i], 173 'mime_type' => $_FILES['upload_file']['type'][$i], 174 'deleteable' => 'Y', 175 'comment' => stripslashes($_POST['upload_comment'][$i]) 176 176 ) 177 177 ); … … 191 191 ))) 192 192 { 193 193 $bo->vfs->set_attributes(array( 194 194 'string' => $_FILES['upload_file']['name'][$i], 195 195 'relatives' => array(RELATIVE_ALL), 196 196 'attributes' => array( 197 198 197 'mime_type' => $_FILES['upload_file']['type'][$i], 198 'comment' => stripslashes($_POST['upload_comment'][$i]) 199 199 ) 200 200 )); … … 218 218 $bo->vfs->set_attributes(array( 219 219 'string' => $_FILES['upload_file']['name'][$i], 220 'relatives' => array(RELATIVE_ALL),220 'relatives' => array(RELATIVE_ALL), 221 221 'attributes' => array( 222 223 222 'mime_type' => $_FILES['upload_file']['type'][$i], 223 'comment' => stripslashes($_POST['upload_comment'][$i]) 224 224 ) 225 225 )); -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/uploadApp.php
r3894 r4972 34 34 'maxFileSize' => $maxFileSize, 35 35 'maxChunkSize' => $maxChunkSize, 36 'archive' 37 'afterUploadURL' 36 'archive' => '../tp/juploader/wjhk.jupload.jar', 37 'afterUploadURL' => 'after_upload.php', 38 38 'sendMD5Sum' => 'true', 39 'showLogWindow' => 'false',40 'debugLevel' 39 'showLogWindow' => 'false', 40 'debugLevel' => 0 41 41 ); 42 42 43 43 $classParameters = array( 44 'demo_mode' => false,44 'demo_mode' => false, 45 45 'allow_subdirs' => true, 46 'destdir' 46 'destdir' => '/tmp' //Where to store the files on the webserver 47 47 ); 48 48 -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/drag_area.js
r3436 r4972 19 19 20 20 counter = 0; 21 DragArea.prototype.dragObj = function(e){ 21 DragArea.prototype.dragObj = function(e) 22 { 22 23 var _event = is_ie ? window.event : e; 23 24 var _target = is_ie ? _event.srcElement : _event.target; -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/draw_api.js
r3936 r4972 410 410 var contentQuota = document.getElementById('content_quota'); 411 411 if (contentQuota != null) 412 contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background=". ./phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>';412 contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="./phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>'; 413 413 } 414 414 } … … 820 820 821 821 var parentDir_en = base64_encode( parentDir ); 822 cExecute_('./index.php?menuaction=filemanager.uifilemanager.createdir&path=' 823 + parentDir_en+'&filename='+base64_encode(name), handler.refreshDir); 822 var _action = './index.php?menuaction=filemanager.uifilemanager.createdir&path='+ parentDir_en+'&filename='+base64_encode(name); 823 824 cExecute_( _action , handler.refreshDir ); 824 825 825 826 currentPath = parentDir + '/' + name; … … 836 837 Dfolder.replace(my_home_filemanager, get_lang("My folder"))), '') ) 837 838 { 839 838 840 var Dfolder_en = base64_encode( Dfolder ); 839 840 cExecute_( './index.php?menuaction=filemanager.uifilemanager.removedir&path=' + Dfolder_en ,handler.refreshDir );841 var _action = './index.php?menuaction=filemanager.uifilemanager.removedir&path=' + Dfolder_en; 842 cExecute_( _action , handler.refreshDir ); 841 843 var lastIndex = Dfolder.lastIndexOf('/'); 842 844 currentPath = Dfolder.substr(0,lastIndex); … … 871 873 { 872 874 'lang_new_folder' : get_lang('new folder'), 873 'lang_remove_folder' 875 'lang_remove_folder' : get_lang('remove folder'), 874 876 'path_filemanager' : path_filemanager, 875 'onclick_new_folder' 877 'onclick_new_folder' : 'editFolders("new")', 876 878 'onclick_remove_folder' : 'editFolders("remove")' 877 879 }; -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/handler.js
r3924 r4972 12 12 13 13 if (returnVal[0] == 'wpasswd') 14 {15 write_error(get_lang('Wrong password'));16 return;17 }18 else19 write_msg(get_lang('Your operation was successfully executed'));20 21 toolbar.control('reload');14 { 15 write_error(get_lang('Wrong password')); 16 return; 17 } 18 else 19 write_msg(get_lang('Your operation was successfully executed')); 20 21 toolbar.control('reload'); 22 22 } 23 23 … … 79 79 function draw_folders_list(data) 80 80 { 81 var contentFolders = document.getElementById('content_folders'); 82 81 83 toolbar.control('reload'); 82 84 folders_tree = new dFTree({name: 'main'}); 83 84 85 folders = unserialize(data); 85 86 87 contentFolders.innerHTML = ""; 88 86 89 var rootFold = new dNode({id:'root', caption: get_lang("Directories")}); 90 87 91 folders_tree.add(rootFold,'root'); 88 92 … … 118 122 } 119 123 120 document.getElementById('content_folders').innerHTML = ""; 121 122 folders_tree.draw(document.getElementById('content_folders')); 124 folders_tree.draw(contentFolders); 123 125 124 126 folders_tree.openTo(currentPath); 125 127 126 128 folders_tree.getNodeById(currentPath)._select(); 129 127 130 } 128 131 129 132 function moveto(data) 130 133 { 131 returnVal = data.split('|'); 134 var returnVal = data.split('|'); 135 132 136 if (returnVal[0] == 'NODIR') 137 { 133 138 write_error(get_lang('Could not copy file because no destination directory is given')); 134 else if(returnVal[0] == 'SOMEERROR'){ 135 write_error(get_lang('Could not move %1 file(s)',returnVal[1])); 136 } 137 else if(returnVal[0] == 'MOVED'){ 138 if (returnVal[1] == 1) 139 write_msg(get_lang('File moved successfuly')); 140 else 141 write_msg(get_lang('%1 files moved successfuly', returnVal[1])); 142 } 143 handler.refreshDir(); 139 } 140 else if( returnVal[0] == 'SOMEERROR' ) 141 { 142 write_error( get_lang('Could not move %1 file(s)',returnVal[1]) ); 143 } 144 else if( returnVal[0] == 'MOVED') 145 { 146 if ( returnVal[1] == 1 ) 147 { 148 write_msg( get_lang('File moved successfuly') ); 149 toolbar.control('reload'); 150 } 151 else 152 { 153 write_msg( get_lang('%1 files moved successfuly', returnVal[1]) ); 154 } 155 } 144 156 } 145 157 146 158 function refreshDir(data) 147 159 { 148 cExecute_('./index.php?menuaction=filemanager.uifilemanager.get_folders_list', handler.draw_folders_list); 160 if( data.toString() === "True" ) 161 { 162 var _action = './index.php?menuaction=filemanager.uifilemanager.get_folders_list'; 163 164 cExecute_( _action , draw_folders_list ); 165 } 166 else 167 { 168 write_msg( data ); 169 } 149 170 } 150 171 … … 342 363 handler.prototype.draw_folders_list = draw_folders_list; 343 364 handler.prototype.moveto = moveto; 344 handler.prototype.refreshDir 365 handler.prototype.refreshDir = refreshDir; 345 366 handler.prototype.rename = rename; 346 handler.prototype.restricted 347 handler.prototype.updateComment = updateComment;367 handler.prototype.restricted = restricted; 368 handler.prototype.updateComment = updateComment; 348 369 handler.prototype.upload = upload; 349 370 -
sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/main.js
r3019 r4972 1 2 -
sandbox/expressoMail1_2/MailArchiver/2.2/phpgwapi/inc/class.vfs_dav.inc.php
r3863 r4972 2002 2002 function delete ($data) 2003 2003 { 2004 error_log("Aqui", 3, "/tmp/log");2005 2006 2004 return $this->rm ($data); 2007 2005 }
Note: See TracChangeset
for help on using the changeset viewer.