示例#1
0
                                    return new Error($threads->message, $template);
                                } else {
                                    $template->threads = $threads;
                                }
                                $template['total_posts'] = $row['threads'];
                                $template['forum_id'] = $row['id'];
                                $template['postlimit'] = $row['threadsperpage'];
                                $template['pag_start'] = isset($request['start']) ? intval(@$request['start']) : 0;
                            } else {
                                return new Error($template['L_PERMCANTVIEW'], $template);
                            }
                        }
                    } else {
                        DBA::Open()->Execute("UPDATE " . FORUMS . " SET referals = referals+1 WHERE id = " . $row['id']);
                        header("Location: " . $row['link_href']);
                    }
                } else {
                    return new Error($template['L_ERRORVIEWFORUM'], $template);
                }
            }
        } else {
            return new Error($template['L_INVALIDFORUM'], $template);
        }
        /* Set the number of queries */
        $template['num_queries'] = $session->dba->num_queries;
        return TRUE;
    }
}
$app = new Forum_Controller('forum_base.html');
$app->AddAction('a_postthread', new Action('posting.php', 'post_thread&id=' . intval(@$_GET['id'])));
$app->ExecutePage();
示例#2
0
                        /* Set the thread action */
                        $template['a_add_thread'] = new Action('posting.php', 'update_post');
                        /* Set the post id */
                        $template['post_id'] = $post['id'];
                    } else {
                        return new Error($template['L_PERMSEDITPOST'], $template);
                    }
                } else {
                    return new Error($template['L_INVALIDPOSTID'], $template);
                }
            } else {
                return new Error($template['L_INVALIDPOSTID'], $template);
            }
        } else {
            return new Error($template['L_NEEDLOGGEDIN'], $template);
        }
        /* Set the number of queries */
        $template['num_queries'] = $session->dba->num_queries;
        return TRUE;
    }
}
$app = new Forum_Controller('forum_base.html');
//$app->AddAction('a_add_thread', new Action('posting.php', 'add_thread'));
$app->AddAction('a_add_reply', new Action('posting.php', 'add_reply'));
$app->AddEvent('post_reply', new PostReply());
$app->AddEvent('add_reply', new AddReply());
$app->AddEvent('add_thread', new AddThread());
$app->AddEvent('edit', new EditPost());
$app->AddEvent('update_post', new UpdatePost());
$app->AddEvent('vote', new VoteOnPoll());
$app->ExecutePage();
示例#3
0
$app->AddEvent('settings', new MemberSettings());
$app->AddEvent('update_settings', new MemberUpdateSettings());
$app->AddEvent('avatar', new MemberAvatar());
$app->AddEvent('update_avatar', new MemberUpdateAvatar());
$app->AddEvent('password', new MemberPassword());
$app->AddEvent('update_password', new MemberUpdatePassword());
/* Private Messaging */
$app->AddEvent('view_folder', new ListMessages());
$app->AddEvent('send_message', new SendMessage());
$app->AddEvent('send_pm', new SaveMessage());
$app->AddEvent('reply_msg', new SaveReplyMessage());
$app->AddEvent('view_msg', new ViewMessage());
$app->AddEvent('buddy_list', new BuddyList());
$app->AddEvent('add_buddy', new AddBuddyToList());
$app->AddEvent('remove_buddy', new RemoveBuddyFromList());
$app->AddEvent('delete_pm', new DeleteMessage());
$app->AddEvent('list', new ForumMemberList());
$app->AddEvent('register_user', new RegisterEvent());
$app->AddEvent('usergroups', new ForumUserGroups());
$app->AddEvent('lookup', new LookupUserGroup());
$app->AddEvent('add_user_to_group', new AddUserToGroup());
$app->AddEvent('dufg', new DeleteUserFromGroup());
$app->AddAction('a_login', new Action('member.php', 'login_user'));
$app->AddAction('a_register', new Action('member.php', 'register_user'));
$app->AddEvent('login_user', new LoginEvent());
$app->AddEvent('logout', new LogoutEvent());
$app->AddEvent('remindme', new RemindMeEvent());
$app->AddEvent('forgotpw', new RestorePwEvent());
$app->AddEvent('resetpw', new ResetPassword());
$app->AddFilter(new MemberSortMenu());
$app->ExecutePage();