Ejemplo n.º 1
0
    print "\n</div>";
}
//end while
if (level($username) == 'admin' || level($username) == 'mod') {
    // blocca/chiudi topic
    if (check_block_topic($id) == 0 || check_block_topic($id) == NULL) {
        $block_topic = "\n<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "\" />" . "\n<input type=\"hidden\" value=\"1\" name=\"block\" />" . "\n<input type=\"submit\" value=\"Chiudi Topic\" />" . "\n</form>\n";
    } else {
        $block_topic = "\n<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "\" />" . "\n<input type=\"hidden\" value=\"1\" name=\"block\" />" . "\n<input type=\"submit\" value=\"Ri-Apri Topic\" />" . "\n</form>\n";
    }
    // setta topic come annuncio o importante (deselezionato annulla il set)
    if (check_important_topic($id) == 0 && check_announcement_topic($id) == 0) {
        $set_topic = "\n<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "&set_topic=1\" />" . "\n<input type=\"radio\" name=\"set_topic\" value=\"null\" checked> Topic Normale" . "\n<input type=\"radio\" name=\"set_topic\" value=\"announcement\"> Setta il topic in forma Annuncio" . "\n<input type=\"radio\" name=\"set_topic\" value=\"important\" > Setta il topic in forma Importante" . "\n<input type=\"submit\" value=\"Setta topic\" />" . "\n</form>";
    } elseif (check_important_topic($id) == 1 && check_announcement_topic($id) == 0) {
        $set_topic = "\n<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "&set_topic=1\" />" . "\n<input type=\"radio\" name=\"set_topic\" value=\"null\"> Topic Normale" . "\n<input type=\"radio\" name=\"set_topic\" value=\"announcement\"> Setta il topic in forma Annuncio" . "\n<input type=\"radio\" name=\"set_topic\" value=\"important\" checked> Setta il topic in forma Importante" . "\n<input type=\"submit\" value=\"Setta topic\" />" . "\n</form>";
    } elseif (check_important_topic($id) == 0 && check_announcement_topic($id) == 1) {
        $set_topic = "\n<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "&set_topic=1\" />" . "\n<input type=\"radio\" name=\"set_topic\" value=\"null\"> Topic Normale" . "\n<input type=\"radio\" name=\"set_topic\" value=\"announcement\" checked> Setta il topic in forma Annuncio" . "\n<input type=\"radio\" name=\"set_topic\" value=\"important\"> Setta il topic in forma Importante" . "\n<input type=\"submit\" value=\"Setta topic\" />" . "\n</form>";
    }
    // cancella topic
    $delete_topic = "<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "\" />" . "\n<input type=\"hidden\" value=\"1\" name=\"delete_topic\" />" . "\n<input type=\"submit\" value=\"Rimuovi Topic\" />" . "\n</form>\n";
    // sposta topic
    $move_topic = "<form method=\"POST\" action=\"viewtopic.php?id=" . $id . "&move_topic=1\" />" . "\n<select name=\"to_forum\">";
    $list_forum = mysql_query("SELECT id, title \n\t\t\t\t\t\t\t\t\t FROM " . __PREFIX__ . "forum \n\t\t\t\t\t\t\t\t ORDER BY position");
    while ($row = mysql_fetch_array($list_forum)) {
        $move_topic .= "\n<option value=\"" . $row['id'] . "\">" . $row['title'] . "</option>";
    }
    $move_topic .= "\n</select>" . "\n<br />" . "\n<br />" . "\n<input type=\"hidden\" value=\"" . check_t_id($id) . "\" name=\"move_t_id\" />" . "\n<input type=\"submit\" value=\"Sposta Topic\" />" . "\n</form>\n";
} else {
    $block_topic = '';
    $delete_topic = '';
    $move_topic = '';
Ejemplo n.º 2
0
function check_graphic_important_topic($id)
{
    $check = check_important_topic($id);
    $graphic = NULL;
    if ($check == 1) {
        $graphic = "<i>[Importante]</i>";
    }
    return $graphic;
}