コード例 #1
0
 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;
 }
コード例 #2
0
 protected function checkUser($uid)
 {
     $Models_Googleauth = new Models_Googleauth();
     $user = $Models_Googleauth->getUser($uid);
     if (empty($user)) {
         throw new Exception('User not found');
     }
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 public function add($data = array())
 {
     $Models_Googleauth = new Models_Googleauth();
     $user = $Models_Googleauth->getUser($data['uid']);
     if (empty($user)) {
         throw new Exception('User not found');
     }
     $insertSQL = $this->_connMain->AutoExecute('jobs', $data, 'INSERT');
     //$jobs_id = $this->_connMain->Insert_ID();
     return true;
 }
コード例 #5
0
 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;
 }
コード例 #6
0
ファイル: main.php プロジェクト: manishkhanchandani/mkgxy
<?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'])) {
コード例 #7
0
ファイル: login.php プロジェクト: manishkhanchandani/mkgxy
     // Authenticate
     $_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']);