Beispiel #1
0
     } else {
         $male = " selected";
     }
     $birthday = date("d", $login[user_birth]);
     $birthmonth = date("m", $login[user_birth]);
     $birthyear = date("Y", $login[user_birth]);
     eval("\$inc[action] = \"" . gettemplate("profil.userdetails") . "\";");
 }
 #############
 if ($show == "password") {
     $user_name = mkuser("user_name", $login[id], $NULL);
     eval("\$inc[action] \t= \"" . gettemplate("profil.changepassword") . "\";");
 }
 #############
 if ($show == "signatur") {
     $smilies = getsmiliesbit("profil.smilie.bit");
     eval("\$inc[action] \t= \"" . gettemplate("profil.signatur") . "\";");
 }
 #############
 if ($show == "privacy") {
     $query = $db->query_str("SELECT * FROM {$tab['useroption']} WHERE userid='{$login['id']}'");
     while ($result = $db->fetch_array($query)) {
         if ($result[value]) {
             ${"{$result['name']}"} = " checked";
         }
         if (!$result[value]) {
             ${"{$result['name']}"} = " unchecked";
         }
     }
     $dir = dir($style[templatefolder] . "/profil/");
     while ($f = $dir->read()) {
Beispiel #2
0
            $blocked = "blocked";
        }
        if (!$news[activated]) {
            $activated = "inactiv";
        }
        $countcoms = $db->query("SELECT COUNT(*) FROM {$tab['news_comment']} WHERE newsid='{$news['id']}'");
        $comments = $countcoms[0];
        eval("\$inc[newsselect] .= \"" . gettemplate("news.edit.selectnews.bit") . "\";");
    }
    eval("\$inc[action] = \"" . gettemplate("news.edit.selectnews") . "\";");
}
############################
if ($adminaction == "news_new" || $fail_new) {
    if (!$login) {
        eval("\$inc[action] = \"" . gettemplate("fail.access.notloggedin") . "\";");
    } else {
        $fail = $fail_new;
        $user = getuser($login[id]);
        $smilies = getsmiliesbit("news.newsform.smilie.bit");
        $user_name = mkuser("user_name", 0, $login);
        $thisaction = "new_new_save";
        eval("\$admin \t= \"" . gettemplate("news.newsform.admin") . "\";");
        eval("\$inc[action] = \t\"" . gettemplate("news.admin.newsform") . "\";");
    }
}
################
if ($adminaction == "news_config" || $fail_config) {
    $fail = $fail_config;
    eval("\$inc[action] = \"" . gettemplate("news.admin.config.main") . "\";");
}
################
    if ($action == "editpost" || $fail_edit) {
        $post = getpost($postid);
        if ($post[aut_id] != $login[id] && !is_allowed($sec[forum][id], $boardid)) {
            eval("\$incf[action] = \"" . gettemplate("fail.access.noaccess") . "\";");
        } else {
            $notifybox = list($a) = $db->query("SELECT id FROM {$tab['forum_notify']} WHERE userid='{$post['aut_id']}' AND threadid='{$threadid}'") ? " checked" : " unchecked";
            if ($post[smilies]) {
                $schecked = " checked";
            }
            $fail = $fail_edit;
            $actionsave = "save_edit_thread";
            $th_title = "Post bearbeiten";
            $user_name = mkuser("user_name", $post[aut_id], $NULL);
            $form[title] = $post[post_title];
            $form[text] = $post[post_text];
            $smilies = getsmiliesbit("forum.smilies.bit");
            eval("\$incf[action] = \"" . gettemplate("forum.new.post") . "\";");
        }
    }
    ###########################
} else {
    ##########################
    if (!$start) {
        $start = "0";
    }
    if (!$showpp) {
        $showpp = $config[forum_show_postspp];
    }
    $countposts = $db->query("SELECT COUNT(*) FROM {$tab['forum_post']} WHERE parent_boardid='{$boardid}' AND parent_postid='{$threadid}'");
    $countposts = $countposts[0];
    if ($countposts > $config[forum_show_postspp]) {