# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . global $_USER; global $db; if(!$_USER) die; $extra = EXTRA; if (!$extra) $extra = 'all'; $unread_privates = $db->countNotes('unread_private', $_USER['username']); echo '
'; echo ''.__('Archive').' | '.__('Private').' '; if($unread_privates) echo '('.$unread_privates.') '; echo '| '.__('Replies').''; if (!empty($_USER['twitter_password']) && $_USER['show_twits']) $friends_link = 'all'; else $friends_link = 'friends'; echo ' | '.__('Friends').''; if(!empty($_USER['twitter_password'])) echo ' | '.__('Twitter').''; echo '
'; if (isset($_GET['page'])) $page = $_GET['page']; else $page = 1; $start = getStart($page); if($_USER['ignored']) $ignored = $_USER['ignored']; else $ignored = false; switch ($extra) { case 'private': $update = $db->updateUnreadPrivates($_USER['username']); $name = __('Private'); $result = $db->getNotes('private', $start, NOTES_PER_PAGE, $_USER['ID'], $_USER['username']); $count = $db->countNotes('private', $_USER['username']); break; case 'replies': $name = __('Replies'); $result = $db->getNotes('replies', $start, NOTES_PER_PAGE, $_USER['ID'], $_USER['username'], $ignored); $count = $db->countNotes('reply', $_USER['username'], $ignored); break; case 'twitter': case 'archive': if ($extra == 'archive') $name = __('Archive'); elseif ($extra == 'twitter') $name = __('Twitter (Following)'); $result = $db->getNotes($extra, $start, NOTES_PER_PAGE, $_USER['ID'], false); $count = $db->countNotes($extra, $_USER['ID']); if ($extra == 'twitter') setUpdate(); break; case 'all': case 'friends': default: if ($extra == 'all') $name = __('Friends + Twitter'); elseif ($extra == 'friends') $name = __('Friends'); else $name = __('Friends'); $result = $db->getNotes($extra, $start, NOTES_PER_PAGE, $_USER['ID'], false, $ignored); $count = $db->countNotes($extra, $_USER['ID'], $ignored); if ($extra == 'all') setUpdate(); break; } doNoteFormMobile(); echo ''; echo getPaginationStringMobile(MBASE.'notes/'.$extra.$params, $count, $page); ?>