Changeset 3636 for branches/2.2/filemanager/inc/class.uiconfig.inc.php
- Timestamp:
- 12/28/10 10:09:59 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/inc/class.uiconfig.inc.php
r3632 r3636 9 9 10 10 require_once("load_lang.php"); 11 require_once("class.notifications.inc.php"); 11 12 12 13 class uiconfig … … 259 260 $GLOBALS['phpgw']->common->phpgw_header(); 260 261 261 if( $_POST['button_add'] ) 262 $notify = new notifications(); 263 $value_email_to = ""; 264 265 if( $_POST['button_add'] || $_GET['editUser'] ) 262 266 { 267 if( $_GET['editUser'] ) 268 { 269 $result = $notify->SearchId($_GET['editUser']); 270 $emails_to = explode(",", $result[0]['email_to']); 271 272 for( $i = 0 ; $i < count($emails_to); $i++ ) 273 { 274 $value_email_to .= "<tr>"; 275 $value_email_to .= "<td>".$emails_to[$i]."</td>"; 276 $value_email_to .= "<td align='center'>"; 277 $value_email_to .= "<a href='javascript:void();' onclick='notify.deleteEmail(\"".$emails_to[$i]."\",this);'>Remover</a>"; 278 $value_email_to .= "</td>"; 279 $value_email_to .= "</tr>"; 280 } 281 } 282 263 283 $vars = array( 264 284 'action_url_back' => "./index.php?menuaction=filemanager.uiconfig.notifyUploads", 285 'attr_readonly' => ( $result[0]['email_from'] ) ? 'readonly="readonly"' : "", 265 286 'lang_Add' => lang("Add"), 266 287 'lang_Back' => lang("Back"), … … 272 293 'lang_from' => lang("From"), 273 294 'lang_to' => lang("To"), 274 'value_conf_email' => "", 275 ); 295 'value_email_from' => ( $result[0]['email_from'] ) ? $result[0]['email_from'] : "", 296 'value_email_to' => $value_email_to 297 ); 276 298 277 299 $handle = "AddEmail"; … … 279 301 else 280 302 { 281 $value_config = ""; 282 283 if( trim($_POST['search_email']) != "" ) 303 if( trim( $_POST['search_email'] ) != "" ) 284 304 { 285 require_once("class.notifications.inc.php"); 286 $notify = new notifications(); 287 $result = $notify->SearchEmail( $_POST['search_email'] ); 305 $limit = 10; 306 $offset = 1; 307 308 if( $_POST['bt_next'] ) 309 $offset = $_POST['button_next'] + 1 ; 310 311 if( $_POST['bt_previous'] && $_POST['button_next'] > 1) 312 { 313 $offset = $_POST['button_next'] - 1; 314 } 315 316 $result = $notify->SearchEmail( $_POST['search_email'], $limit, $offset ); 288 317 289 318 foreach( $result as $tmp ) 290 319 { 291 $value_ config.= '<tr>';292 $value_ config.= '<td align="left" width="40%">'.$tmp['email_from'].'</td>';293 $value_ config.= '<td align="left" width="40%">'.str_replace(",", "<br/>", $tmp['email_to']).'</td>';294 $value_ config .= '<td align="center" width="10%">Editar</td>';295 $value_ config .= '<td align="center" width="10%"><a href="javascript:void();" onclick="notify.deleteEmailUser(\''.$tmp['filemanager_id'].'\', this);">Excluir</a></td>';296 $value_ config.= '</tr>';320 $value_email_to .= '<tr>'; 321 $value_email_to .= '<td align="left" width="40%">'.$tmp['email_from'].'</td>'; 322 $value_email_to .= '<td align="left" width="40%">'.str_replace(",", "<br/>", $tmp['email_to']).'</td>'; 323 $value_email_to .= '<td align="center" width="10%"><a href="./index.php?menuaction=filemanager.uiconfig.notifyUploads&editUser='.$tmp['filemanager_id'].'">'.lang("Edit").'</a></td>'; 324 $value_email_to .= '<td align="center" width="10%"><a href="javascript:void();" onclick="notify.deleteEmailUser(\''.$tmp['filemanager_id'].'\', this);">'.lang("Delete").'</a></td>'; 325 $value_email_to .= '</tr>'; 297 326 } 298 327 } 299 328 300 329 $vars = array( 301 'action_url' => "./index.php?menuaction=filemanager.uiconfig.notifyUploads", 302 'action_url_back' => "./admin", 303 'bt_previous' => "<input type='submit' name='bt_previous' value='Anterior' />", 304 'bt_next' => "<input type='submit' name='bt_next' value='Proximo' />", 305 'lang_search' => lang("Search"), 306 'value_config' => $value_config 330 'action_url' => "./index.php?menuaction=filemanager.uiconfig.notifyUploads", 331 'action_url_back' => "./admin", 332 'display_bt_previous' => ( $offset > 1 ) ? "line" : "none", 333 'display_bt_next' => ( count($result) < $limit ) ? "none" : "line", 334 'lang_Add' => lang("Add"), 335 'lang_Back' => lang("Back"), 336 'lang_Delete' => lang("Delete"), 337 'lang_Edit' => lang("Edit"), 338 'lang_From' => lang("From"), 339 'lang_To' => lang("To"), 340 'lang_search' => lang("Search"), 341 'lang_next' => lang("Next"), 342 'lang_previous' => lang("Previous"), 343 'value_search_email' => $_POST['search_email'], 344 'value_email_to' => $value_email_to, 345 'value_next' => $offset, 346 'value_previous' => $limit 307 347 ); 308 348
Note: See TracChangeset
for help on using the changeset viewer.