'; foreach($userlist as $row) echo "\n"; echo ""; } /** * Displays info stating that the message is sent successfully. */ function display_success_message($uid) { $success= "

". get_lang('MessageSentTo'). " ". GetFullUserName($uid). "". "
". get_lang('BackToInbox'). ""; Display::display_normal_message($success); } /** * @todo this function seems no longer user * but is still mentioned in comments, what can be the use? */ function validate_text($texto) { $MAX_SIZE = 60; /*Tama� m�imo de caracteres por l�ea*/ $i=0; $lines = array(); /*Arreglo que contendr�las l�eas del texto*/ $token = strtok($texto, "\n"); while($token) { $lines[$i]= $token; $token = strtok("\n"); $i++; } $modificado= ""; for($i=0; $i$MAX_SIZE + 1) { $modificado2= substr($lines[$i], 0, $MAX_SIZE); for($j=$MAX_SIZE; $j", ">", $modificado); // �em return $modificado; } /** * Displays the wysiwyg html editor. */ function display_html_editor_area($name,$resp) { api_disp_html_area($name, 'Type your message here.', '', '100%'); } /** * Get the new messages for the current user from the database. */ function get_new_messages() { if (! isset($_SESSION['_uid'])) return false; $i=0; $query = "SELECT * FROM `".MESSAGES_DATABASE."` WHERE id_receiver=".$_SESSION['_uid']." AND status=1;"; $result = api_sql_query($query,__FILE__,__LINE__); while ($result_row = mysql_fetch_array($result)) $i++; return $i; } /** * Get the list of user_ids of users who are online. */ function users_connected_by_id() { global $statsDbName, $_uid; $MINUTE=30; $user_connect = WhoIsOnline($_uid,$statsDbName,$MINUTE); for ($i=0; $i".GetFullUserName($result[1]).""; $message[2] = $result[2]; //date stays the same $message[3] = ''.get_lang('; $message_list[] = $message; $i++; } return $message_list; } /** * Displays the inbox of a user, listing all messages. * In the process of moving towards sortable table. */ function inbox_display() { //delete messages if delete action was chosen if (isset ($_POST['action'])) { switch ($_POST['action']) { case 'delete' : $number_of_selected_messages = count($_POST['id']); foreach ($_POST['id'] as $index => $message_id) { $query = "DELETE FROM ".MESSAGES_DATABASE." WHERE id_receiver=".$_SESSION['_uid']." AND id='$message_id'"; api_sql_query($query,__FILE__,__LINE__); } Display :: display_normal_message(get_lang('SelectedMessagesDeleted')); break; } } // display sortable table with messages of the current user $table = new SortableTable('messages', 'get_number_of_messages', 'get_message_data', 1); $table->set_header(0, '', false); $table->set_header(1, get_lang('From')); $table->set_header(2, get_lang('Date')); $table->set_header(3, get_lang("ReplyToMessage"), false); $table->set_form_actions(array ('delete' => get_lang('DeleteSelectedMessages'))); $table->display(); } ?>