File: Api_model.php

package info (click to toggle)
kalkun 0.8.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,340 kB
  • sloc: php: 30,659; javascript: 30,443; sql: 961; sh: 766; xml: 105; makefile: 41
file content (23 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 *	@Author: bullshit "oskar@biglan.at"
 *	@Copyright: bullshit, 2010
 *	@License: GNU General Public License
*/

Class Api_model extends CI_Model {

	function Plugin_model()
	{
		$this->load->library('Remote_Messages');
	}

	function getAccount($token)
	{
		$sql = "select ip_address,id_remote_access,status from plugin_remote_access where token='".$token."'";
		$remote_ip = $this->db->query($sql)->row('ip_address');
		$remote_Id = $this->db->query($sql)->row('id_remote_access');
		$status = ($this->db->query($sql)->row('status') === 'false') ? FALSE : TRUE;
		return array ('ip' => $remote_ip, 'id' => $remote_Id, 'status' => $status);
	}
}