Пример #1
0
            $("#messages-container, #btn-write-message, #message-top-buttons-container").show();
            $("#message-write").hide();
            e.stopPropagation();

            Messages.viewFolder('sent', 1);
            // TODO: notifica l'utente che il messaggio e' stato inviato
        }
    });
    
    $(function(){
        // Autocomplete
        Autocomplete.Bind("div#messages input[name='to']", "/restful/user/search.php", {
            params: {"num_records" : 5}
        });

        // Visualizza la cartella in arrivo
        Messages.viewFolder('inbox', 1);
    });
</script>

    <?php 
} else {
    $error_message = 'Devi effettuare il login per vedere questa pagina!';
    AlertMessage::Show($error_message, AlertMessage::WARN);
}
?>
</div>
    

<?php 
require_once ROOT_PATH . "footer.php";
Пример #2
0
<?php

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
require_once "__inc__.php";
$pagTitle = "Guide";
require_once ROOT_PATH . "header.php";
$navlist = GuideManager::getPublishedNavList();
if ($navlist == null) {
    AlertMessage::Show('Errore: nessuna guida trovata', AlertMessage::WARN);
} else {
    echo $navlist;
}
require_once ROOT_PATH . "footer.php";
Пример #3
0
            if ($next_chapter != NULL) {
                $back_next_button .= '<div style="float:right;">
            <button class="btn" onclick="location.href=\'' . $next_chapter->getLink() . '\';">&raquo;<span class="hide-phone"> Prossimo</span></button>
          </div>';
            }
            $back_next_button .= "</div>";
            $author = $chapter->getAuthor();
            echo $back_next_button;
            echo "<div id='chapter-context' class='left' style='margin: 1em 0;'>" . $chapter->getContent() . "</div>";
            if ($author == null) {
                echo "<div>A cura di: Membro non piu' appartenente alla Community </div>";
            } else {
                echo "<div>A cura di: <a href='" . $author->getProfileUrl() . "'>{$author['username']}</a></div>";
            }
            echo $back_next_button;
            echo "</div>";
        } else {
            AlertMessage::Show('Capitolo selezionato insesistente!', AlertMessage::WARN);
        }
    } else {
        require_once ROOT_PATH . "header.php";
        AlertMessage::Show('Guida selezionata insesistente!', AlertMessage::WARN);
    }
} else {
    require_once ROOT_PATH . "header.php";
    AlertMessage::Show('Nessuna guida/capitolo selezionato!', AlertMessage::WARN);
}
?>

<?php 
require_once ROOT_PATH . "footer.php";
Пример #4
0
<?php

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
require_once "__inc__.php";
validate_num($_GET['id']);
validate_num($_GET['p']);
$forum_info = Forum::GetForumInfo($_GET['id']);
$pagTitle = "Forum " . $forum_info['title'];
$backUrl = "/p/forum/";
require_once ROOT_PATH . "header.php";
if (!Forum::IsAccessGrantedTo($forum_info, $currentUser)) {
    AlertMessage::Show("Non hai i permessi per visualizzare questo forum.", AlertMessage::WARN);
    ndie();
}
// TODO: cerca topic
// argument e' l'id del canale del forum (Android, C++, Off-Topic, etc.)
$limit = DB::GetLimit($_GET['p'], Forum::TOPICS_PER_PAGE);
$q = exequery(DB::SelectCalcFoundRows(Topic::SELECT_SQL) . "\n\t\t\t\tWHERE p.argument = {$_GET['id']} AND p.type = " . Forum::TYPE_TOPIC . " \n\t\t\t\tORDER BY p.show_as DESC, p.last_post_date DESC\n\t\t\t\tLIMIT {$limit}");
$topics_count = DB::GetCalcFoundRows();
// TODO: aggiungi indice su show_as
?>

<div class="center" style="margin-bottom: 1em;"> <!-- nuovo post -->
	<?php 
$formBuilder = new FormBuilder("frm-forum-post", "/restful/forum/newtopic.php");
$fields = array();
$fields[] = array("id" => "subject", "type" => "textinput", "label" => "Oggetto:", "validation" => "required,Specifica un oggetto per il messaggio");
$fields[] = array("id" => "poll", "type" => "textarea", "label" => "Sondaggio:<br/><span class='small'>(1 domanda per linea)</span>", "attrs" => "style='height: 6em;'");
$fields[] = array("id" => "message", "type" => "textarea", "validation" => "required,Devi scrivere un messaggio");