public function add($data = array()) { $Models_Googleauth = new Models_Googleauth(); $user = $Models_Googleauth->getUser($data['uid']); if (empty($user)) { throw new Exception('From User not found'); } $user2 = $Models_Googleauth->getUser($data['to_uid']); if (empty($user2)) { throw new Exception('To User not found'); } $insertSQL = $this->_connMain->AutoExecute('help_messages', $data, 'INSERT'); //$message_id = $this->_connMain->Insert_ID(); return true; }
public function edit($id, $data = array()) { $Models_Googleauth = new Models_Googleauth(); $user = $Models_Googleauth->getUser($data['uid'], false); $where = 'id = ' . $this->qstr($id); $insertSQL = $this->_connMain->AutoExecute('websites', $data, 'UPDATE', $where); return $id; }
protected function checkUser($uid) { $Models_Googleauth = new Models_Googleauth(); $user = $Models_Googleauth->getUser($uid); if (empty($user)) { throw new Exception('User not found'); } }
public function add($data = array()) { $Models_Googleauth = new Models_Googleauth(); echo $Models_Googleauth->getUser($data['uid']); exit; $insertSQL = $this->_connMain->AutoExecute('help_messages', $data, 'INSERT'); $message_id = $this->_connMain->Insert_ID(); return $message_id; }
public function execute() { if (empty($_GET['uid'])) { throw new Exception('Enter uid'); } $uid = $_GET['uid']; $cache = isset($_GET['cache']) ? $_GET['cache'] : 1; $Models_Googleauth = new Models_Googleauth(); $return = $Models_Googleauth->getUser($uid, $cache); $this->return = $return; }
<?php //check_login(); //include(SITEDIR.'/libraries/addresses/nearby.php'); $uid = ''; $uid = !empty($_GET['uid']) ? $_GET['uid'] : (!empty($_SESSION['user']['id']) ? $_SESSION['user']['id'] : ''); if (empty($uid)) { check_login(); } currentActivity('horo_page', $_SERVER['REQUEST_URI'], null, 'User has browsed the Horo Match page.'); $Models_Googleauth = new Models_Googleauth(); $userDetails = $Models_Googleauth->getUser($uid); $userSql = $Models_Googleauth->sql; //matching naks $Kundali = new Library_Kundali(); $horo = new Models_Horo(); $userHoroInfo = findHoroInfo($userDetails); if (!empty($userHoroInfo)) { $points = $Kundali->points(); $specific_points = $points[$userHoroInfo[9]]; arsort($specific_points); $matchingNaks = array(); foreach ($specific_points as $k => $v) { $matchingNaks[$k]['number'] = $k; $matchingNaks[$k]['nakshatra'] = $Kundali->getnaksfromnumber($k); $matchingNaks[$k]['points'] = $v; } } //matching naks ends $horo_cities = array(); if (!empty($userDetails['horo_cities'])) {
$_SESSION['access_token'] = $client->getAccessToken(); // get the access token here header('Location: ' . HTTPPATH . LOGINURL); exit; } if (isset($_SESSION['access_token'])) { $client->setAccessToken($_SESSION['access_token']); } $title = 'Title'; if ($client->getAccessToken()) { $pageTitle = 'Login Successfull'; $user = $oauth2->userinfo->get(); include ROOTDIR . '/api/googleauth/save.php'; save($user); $Models_Googleauth = new Models_Googleauth(); $details = $Models_Googleauth->getUser($user['id'], 0); if ($details['status'] != 1) { $error = 'User with id ' . $user['id'] . ' not active'; } else { $_SESSION['user'] = $user; $_SESSION['user']['member_type'] = $details['member_type']; $_SESSION['user']['member_expires'] = $details['member_expires']; $_SESSION['user']['fullname'] = $details['fullname']; $_SESSION['user']['access_level'] = !empty($details['access_level']) ? $details['access_level'] : 'member'; $generalMode = new Models_General(); $params = array(); $params['where'] = sprintf('AND uid = %s', $generalMode->qstr($user['id'])); $settings = $generalMode->getDetails('settings', 0, $params); if (empty($settings)) { $generalMode->addDetails('settings', array('uid' => $user['id']), $user['id']); $settings = $generalMode->getDetails('settings', 0, $params);