Ejemplo n.º 1
0
$moderator = explode(" ", get_moderator($myrow['forum_moderator']));
for ($i = 0; $i < count($moderator); $i++) {
    if ($userdata[1] == $moderator[$i]) {
        if (user_is_moderator($userdata[0], $userdata[2], $myrow['forum_access'])) {
            $Mmod = true;
        }
        break;
    }
}
if (!$Mmod and $adminforum == 0) {
    forumerror('0007');
}
if (isset($submit) and $mode == "move") {
    $sql = "UPDATE " . $NPDS_Prefix . "forumtopics SET forum_id='{$newforum}' WHERE topic_id='{$topic}'";
    if (!($r = sql_query($sql))) {
        forumerro('0010');
    }
    $sql = "UPDATE " . $NPDS_Prefix . "posts SET forum_id='{$newforum}' WHERE topic_id='{$topic}' AND forum_id='{$forum}'";
    if (!($r = sql_query($sql))) {
        forumerror('0010');
    }
    $sql = "DELETE FROM " . $NPDS_Prefix . "forum_read where topicid='{$topic}'";
    if (!($r = sql_query($sql))) {
        forumerror('0001');
    }
    $sql = "UPDATE {$upload_table} SET forum_id='{$newforum}' WHERE apli='forum_npds' AND topic_id='{$topic}' AND forum_id='{$forum}'";
    sql_query($sql);
    $sql = "SELECT arbre FROM " . $NPDS_Prefix . "forums WHERE forum_id='{$newforum}'";
    $arbre = sql_fetch_assoc(sql_query($sql));
    if ($arbre['arbre']) {
        $url_ret = "viewtopicH.php";
Ejemplo n.º 2
0
function MergeForumAction($oriforum, $destforum)
{
    global $upload_table;
    global $NPDS_Prefix;
    $sql = "UPDATE " . $NPDS_Prefix . "forumtopics SET forum_id='{$destforum}' WHERE forum_id='{$oriforum}'";
    if (!($r = sql_query($sql))) {
        forumerro('0010');
    }
    $sql = "UPDATE " . $NPDS_Prefix . "posts SET forum_id='{$destforum}' WHERE forum_id='{$oriforum}'";
    if (!($r = sql_query($sql))) {
        forumerror('0010');
    }
    $sql = "UPDATE " . $NPDS_Prefix . "forum_read SET forum_id='{$destforum}' WHERE forum_id='{$oriforum}'";
    if (!($r = sql_query($sql))) {
        forumerror('0001');
    }
    $sql = "UPDATE {$upload_table} SET forum_id='{$destforum}' WHERE apli='forum_npds' and forum_id='{$oriforum}'";
    sql_query($sql);
    sql_free_result;
    Q_Clean();
    header("location: admin.php?op=MaintForumAdmin");
}