<?php if (isset($_COOKIE['NSH:member']) && $_COOKIE['NSH:member'] == get_member_email() || $_SESSION['loggedin'] == 1) { if (person_exists()) { include template('scripts_top'); include template('member/person_dob_form'); } else { include template('member/avatar'); include template('scripts_top'); include template('member/profile_form'); include template('member/dob_form'); } include template('proverb'); include template('time'); if (has_dob()) { //include template('news'); include template('results'); } include template('keyboard'); echo list_persons(); include template('explanation'); include template('feed_blog'); //include template('feed_forum'); include template('install_app'); include template('comments'); echo list_user_same_birthday_links('same-birthday-links'); echo list_user_birthday_links('birthday-links'); echo list_user_links('user-birthdates'); } else { header('Location: http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://nhipsinhhoc.vn/member/login/'); }
function insert_db_row($dbh, $row) { $name = $row['Name']; $email = $row['E-mail']; # check if they are in the people table first $pid = person_exists($dbh, $name, $email); if (is_null($pid)) { $pid = insert_person($dbh, $name, $email); $oid = insert_order($dbh, $pid, $row['Spaces'], '', 1, $pid); } # check number of tickets $tickets = get_tickets($dbh, $pid); if (count($tickets) != $row['Spaces']) { # Delete and regenerate all tickets delete_tickets($dbh, $pid); generate_tickets_pdf($dbh, $pid, $pid, $row); } # Return something useful to indicate what we just did }
function get_member_dob() { $member = load_member(); return person_exists() ? load_person($_GET['pid'])['dob'] : (!person_exists() && isset($member) ? $member['dob'] : ''); }