function store() { global $mainframe, $db, $user; $tourID = Request::getVar('tourID', 0); $post = $_POST; $model = Matches::getInstance(); global $user; if (!$user->isSuperAdmin()) { YiiMessage::raseNotice("Your account not have permission to change Tournament"); $this->redirect(Router::buildLink("gamesport", array('view' => 'tournament'))); } $tourID = Request::getVar('tourID', 0); $db = Yii::app()->db; $matches_data_table = json_decode($post['matches_data_table']); $matches_make_first_data = $post['matches_make_first_data']; if ($matches_make_first_data == 1) { $model->make_matches($tourID, $matches_data_table); } return true; }
$sect = $_REQUEST['sect']; $marital_status = $_REQUEST['marital_status'] ? $_REQUEST['marital_status'] : ''; $marriage_plan = $_REQUEST['marriage_plan'] . '-01-01'; $grew_up = $_REQUEST['grew_up'] ? $_REQUEST['grew_up'] : ''; $lives_in = $_REQUEST['lives_in'] ? $_REQUEST['lives_in'] : ''; $residency_status = $_REQUEST['residency_status'] ? $_REQUEST['residency_status'] : ''; $occupation = $_REQUEST['occupation']; $education = $_REQUEST['education']; $height = $_REQUEST['height'] ? $_REQUEST['height'] : ''; $emp_status = $_REQUEST['emp_status'] ? $_REQUEST['emp_status'] : ''; $body_type = $_REQUEST['body_type'] ? $_REQUEST['body_type'] : ''; $first_lang = $_REQUEST['first_lang'] ? $_REQUEST['first_lang'] : ''; $spoken_lang = $_REQUEST['spoken_lang'] ? $_REQUEST['spoken_lang'] : ''; $smoker = $_REQUEST['smoker'] ? $_REQUEST['smoker'] : ''; $user = new Users(); $match = new Matches(); $message = new Messages(); if ($user_id) { $res = $user->registerStep2($user_id, $ethnic_origin, $sect, $marital_status, $marriage_plan, $grew_up, $lives_in, $residency_status, $occupation, $education, $height, $emp_status, $body_type, $first_lang, $spoken_lang, $smoker); if ($res) { $profile = $user->getUserProfile($user_id); $messages = $message->getUserMessages($user_id); $matches = $match->getUserMatches($user_id); $profile_2 = $user->getStep2RegisterData($user_id); $basic_info = $user->getUserBasicInfo($user_id); $partner_pref = $user->getPartnerPref($user_id); $user_appearance = $user->getUserAppearance($user_id); $education = $user->getUserEducation($user_id); $religion = $user->getUserReligion($user_id); $family = $user->getUserFamilyInfo($user_id); $health = $user->getUserHealthInfo($user_id);
public function __construct() { parent::__construct(self::email_pattern); }
/** * Build the token container, parsed from the provided document * * @param string $document Document to parse * @return array Container of nested tokens */ public function buildContainer($document) { // Find the start and end tokens $startRegex = '/(' . $this->delimiters['variable'][0] . '|' . $this->delimiters['block'][0] . ')+/'; $endRegex = '/(' . $this->delimiters['variable'][1] . '|' . $this->delimiters['block'][1] . ')+/'; preg_match_all($startRegex, $document, $start, PREG_OFFSET_CAPTURE + PREG_SET_ORDER); preg_match_all($endRegex, $document, $end, PREG_OFFSET_CAPTURE + PREG_SET_ORDER); // Walk through our matches $match = new Matches($start, $end, $this->delimiters); $result = $match->walk($document); $container = $this->nest($result); return $container; }
function getMatches() { $matches = new Matches(); echo $matches->getMatches(); }
<?php require_once '../phpInclude/db_connection.php'; //error_reporting(E_ALL); require_once '../classes/AllClasses.php'; $user_id1 = $_REQUEST['user_id1']; $user_id2 = $_REQUEST['user_id2']; $action = $_REQUEST['action']; //possible values (y,n,m) $match = new Matches(); if (!empty($user_id1) && !empty($user_id2) && !empty($action)) { switch ($action) { case 'y': $match->actionYes($user_id1, $user_id2); break; case 'm': $match->actionMatch($user_id1, $user_id2); break; default: # code... break; } $success = '1'; $msg = 'action performed'; } else { $success = '0'; $msg = 'Incomplete Parameters'; } echo json_encode(array('success' => $success, 'msg' => $msg));
<?php require_once '../phpInclude/db_connection.php'; error_reporting(E_ALL); require_once '../classes/AllClasses.php'; $user_id = $_REQUEST['user_id']; $user_id2 = $_REQUEST['user_id2']; $user_matches = array(); $user = new Users(); $matches = new Matches(); if (!empty($user_id)) { $matches->removeMatch($user_id, $user_id2); $success = '1'; $msg = 'success'; } else { $success = '0'; $msg = 'Incomplete Parameters'; } echo json_encode(array('success' => $success, 'msg' => $msg));
<?php require_once '../phpInclude/db_connection.php'; //error_reporting(E_ALL); require_once '../classes/AllClasses.php'; $my_id = $_REQUEST['my_id']; $user_id = $_REQUEST['user_id']; $user = new Users(); $match = new Matches(); $profile = $basic_info = $partner_pref = $user_appearance = $education = $religion = $family = $health = $location = $hobbies = ''; if (!empty($user_id)) { $profile = $user->getUserProfile($user_id); $basic_info = $user->getUserBasicInfo($user_id); $partner_pref = $user->getPartnerPref($my_id); $partner_pref_1 = $user->getPartnerPref($user_id); $profile_2 = $user->getStep2RegisterData($user_id); $user_appearance = $user->getUserAppearance($user_id); $education = $user->getUserEducation($user_id); $religion = $user->getUserReligion($user_id); $family = $user->getUserFamilyInfo($user_id); $health = $user->getUserHealthInfo($user_id); $location = $user->getUserLocationInfo($user_id); $hobbies = $user->getUserHobbyAndInterest($user_id); $status = $match->getMatchStatus($my_id, $user_id); //calculate match criteria// $match_criteria = array(); strpos($partner_pref['ancestral_origin'], $family['fam_anct_origin']) ? $match_criteria[] = 'y' : ($match_criteria[] = 'n'); strpos($partner_pref['rel_sect'], $religion['rel_sect']) ? $match_criteria[] = 'y' : ($match_criteria[] = 'n'); strpos($partner_pref['marital_status'], $basic_info['marital_status']) ? $match_criteria[] = 'y' : ($match_criteria[] = 'n'); $partner_pref['age'] <= $profile['age'] && $partner_pref['max_age'] >= $profile['age'] ? $match_criteria[] = 'y' : ($match_criteria[] = 'n'); strpos($partner_pref['marriage_plan'], $basic_info['marriage_plan']) ? $match_criteria[] = 'y' : ($match_criteria[] = 'n');
<?php include_once '../matches.php'; $game = new Matches(); $gameAll = json_decode($game->getMatches()); $games = $gameAll->matches; ?> <?php foreach ($games as $row) { ?> <div class="row"> <div class="col s3"> <div class="team1_image"> </div> </div>