public function content() { if (isset($_GET['user_id'])) { $user_id = $_GET['user_id']; } else { $user_id = Oedipus_LogInHelper::get_current_user_id(); } $user = Oedipus_UsersHelper::get_user($user_id); if (Oedipus_LogInHelper::compare_user_id_to_currently_logged_in_id($user_id)) { echo '<h2>Your Account</h2>'; $other_teams_heading = 'Your teams'; echo '<p>Welcome to <em>Oedipus: Decision Maker</em>, '; echo stripcslashes($user['first_name'] . ' ' . $user['last_name']); echo "!</p>\n"; } else { echo '<h2>' . stripcslashes($user['first_name'] . ' ' . $user['last_name']) . "'s Page</h2>\n"; $other_teams_heading = 'Teams'; } DBPages_PageRenderer::render_page_section('users', 'welcome'); /* * Show the teams that this user already a user of. */ #$team_root_url = $this->get_current_url_just_file(); # #$team_root_url->set_get_variable('oo-page'); #$team_root_url->set_get_variable('page-class', 'Oedipus_TeamPage'); }
public function render_body_div_footer() { echo '<div id="footer">'; Navigation_1DULRenderer::render_ul('Footer Nav'); DBPages_PageRenderer::render_page_section('all', 'footer'); echo '</div>'; }
/** * Renders the page that has been set in the get variable. * * This is the function that should be called in the content * method of classes that used to render DB pages for a project. */ public static function render_current_page_content() { if (isset($_GET['page'])) { DBPages_PageRenderer::render_page_section($_GET['page'], 'content'); } else { echo "<p class=\"error\">Please set the page name!</p>\n"; } }
public function content() { DBPages_PageRenderer::render_page_section('my-dramas', 'title'); /* * Get current user */ $this->user_id = Oedipus_LogInHelper::get_current_user_id(); // $user = Oedipus_UsersHelper::get_user($user_id); $drama_page_div = $this->get_my_dramas_page_div(); echo $drama_page_div->get_as_string(); }
public function content() { DBPages_PageRenderer::render_page_section('mailing-list-sign-up', 'content-explanation'); MailingList_SignUpRenderer::render_body_div_email_adding(); }
public function content() { /* * Find out if currently logged in user created the drama * Or has permission to view the drama * Or the drama is public */ if (Oedipus_LogInHelper::is_logged_in()) { $user_id = Oedipus_LogInHelper::get_current_user_id(); // $user = Oedipus_UsersHelper::get_user($user_id); if (Oedipus_UsersHelper::is_user_id_drama_creator($user_id, $this->get_drama())) { /* * Set Edit Priviliges */ $this->get_drama()->make_drama_editable(); } if ($this->get_drama()->is_public() || $this->get_drama()->is_editable() || Oedipus_UsersHelper::is_user_id_allowed_to_view_drama($user_id, $this->get_drama())) { /* * Render the Drama Div */ $drama_div = $this->get_drama_div(); echo $drama_div->get_as_string(); } } elseif ($this->get_drama()->is_public()) { /* * Render the Drama Div */ $drama_div = $this->get_drama_div(); echo $drama_div->get_as_string(); } else { /* *Drama creator id not same as logged in user */ DBPages_PageRenderer::render_page_section('drama', 'title'); DBPages_PageRenderer::render_page_section('drama', 'drama-unavailable'); } }
public function content() { DBPages_PageRenderer::render_current_page_content(); }
public function content() { #print_r($_SESSION); ?> <h2>Log In to <em>Oedipus: Decision Maker</em></h2> <?php DBPages_PageRenderer::render_page_section('log-in', 'general-explanation'); $log_in_redirect_script_url = Oedipus_LogInHelper::get_log_in_redirect_script_url(); ?> <form id="basic-form" name="frmRegistration" method="post" action="<?php echo $log_in_redirect_script_url->get_as_string(); ?> " > <fieldset> <legend class="txtFormLegend">Your Details</legend> <ol> <li> <!-- Email address --> <label for="email">Your Email:</label> <input id="email" name="email" type="text" value="<?php echo $_SESSION['values']['email']; ?> " /> <span id="email_failed" class="<?php echo $_SESSION['errors']['email']['class']; ?> " ><?php echo $_SESSION['errors']['email']['message']; ?> </span> </li> <li> <!-- Password --> <label for="password">Password:</label> <input id="password" name="password" type="password" value="" /> <span id="login_failed" class="<?php echo $_SESSION['errors']['login']['class']; ?> " ><?php echo $_SESSION['errors']['login']['message']; ?> </span> </li> </ol> </fieldset> <div class="submit_buttons_div"> <input type="submit" name="submitbutton" value="Log in" class="left button" /> </div> </form> <?php /* * Link to reset the password. */ $prp_url = new HTMLTags_URL(); $prp_url->set_file('/haddock/public-html/public-html/index.php'); $prp_url->set_get_variable('oo-page'); $prp_url->set_get_variable('page-class', 'Oedipus_PasswordResetPage'); if (isset($_SESSION['values']['email'])) { $prp_url->set_get_variable('email', urlencode($_SESSION['values']['email'])); } ?> <ul> <li> <a href="<?php echo $prp_url->get_as_string(); ?> ">Forgotten your password?</a> </li> </ul> <?php }