public function getById($id) { parent::getById($id); // TODO: Change the autogenerated stub }
} $password = ''; for ($i = 0; $i <= 6; $i++) { if (rand(1, 2) == 1) { $password .= $letters[rand(1, 40)]; } else { $password .= rand(1, 9); } } $row['user_pass'] = md5($password); if (strtolower($_POST['user_email']) == strtolower($u['user_email']) && $_POST['user_login'] == $u['user_login']) { $row = array(); unset($password); $row['ID'] = $u['ID']; } $row['sdate'] = date('Y-m-d H:i:s'); $id = $model->insert($row); $user = $model->getById($id); require_once ROOT_DIR . 'mail_generator.php'; send($user['user_email'], 'Here are Your Next Steps', 'subscribe', $user, array('password' => $password)); $_SESSION['user_email'] = $_POST['user_email']; $_SESSION['user_id'] = $id; header('Location: challenge/success.php'); } } require_once ROOT_DIR . 'mobile_detect.php'; $detect = new mobile_detect(); if ($detect->isMobile() || $detect->isTablet()) { $mobile = true; } require_once ROOT_DIR . 'templates/index.php';
<?php /** * Created by PhpStorm. * User: novichkov * Date: 24.12.14 * Time: 21:58 */ session_start(); require_once 'model.php'; require_once 'mailing_data.php'; $model = new model('wp_users'); $user = $model->getById($_GET['uid']); if (!$user || !md5($user['user_email']) == $_GET['hash']) { echo 'wrong mail'; exit; // header('Location: http://1000lbschallenge.com/wp-login/'); // exit; } if ($_GET['day'] > $user['sent']) { echo 'wrong day'; // header('Location: http://1000lbschallenge.com/wp-login/'); // exit; } $subject = $data[$_GET['day']]['subject']; if (!$subject) { echo 'no subject'; exit; // header('Location: http://1000lbschallenge.com/404/'); // exit; }