function privmess_display() { // http://getbootstrap.com/javascript/#tabs echo ' <div class="row"> <div class="col-lg-12"> <!-- Nav tabs --> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"><a href="' . SITE_URL . '?p=user&s=privmess" >' . _("Inbox") . '</a></li> <li role="presentation"><a href="#sent" aria-controls="sent" role="tab" data-toggle="tab">' . _("Sent messages") . '</a></li> <li role="presentation"><a href="#compose" aria-controls="compose" role="tab" data-toggle="tab">' . _("Compose") . '</a></li> <span style="display:none"> <li role="presentation"><a href="#single" aria-controls="single" role="tab" data-toggle="tab">' . _("Single") . '</a></li> </span> </ul> <!-- Tab panes --> <div class="tab-content"> <div role="tabpanel" class="tab-pane fade in active" id="inbox">'; if (login_check_logged_in_mini() > 0) { privmess_display_inbox($_SESSION[PREFIX . 'user_id']); } echo '</div> <div role="tabpanel" class="tab-pane fade" id="sent">'; if (login_check_logged_in_mini() > 0) { privmess_display_outbox($_SESSION[PREFIX . 'user_id']); } echo '</div> <div role="tabpanel" class="tab-pane fade" id="compose">'; privmess_display_compose(); echo '</div>'; // below does not have tab, but can be shown by links echo ' <div role="tabpanel" class="tab-pane fade" id="reply">'; if (isset($_GET['message_id'])) { privmess_display_reply($_GET['message_id']); } echo '</div> <div role="tabpanel" class="tab-pane fade" id="single">'; if (isset($_GET['message_id'])) { privmess_display_single_message($_GET['message_id']); } echo '</div> </div> </div> </div>'; }
<?php require_once "op_includer.php"; $connection = db_connect(db_host, db_name, db_user, db_pass); privmess_receive(); if (login_check_logged_in_mini() > 0) { privmess_display_inbox($_SESSION[PREFIX . 'user_id']); } db_close($connection);