hpdl
|
1284
|
1
|
<?php
|
|
2
|
/*
|
|
3
|
$Id: $
|
|
4
|
|
|
5
|
osCommerce, Open Source E-Commerce Solutions
|
|
6
|
http://www.oscommerce.com
|
|
7
|
|
|
8
|
Copyright (c) 2007 osCommerce
|
|
9
|
|
hpdl
|
1498
|
10
|
This program is free software; you can redistribute it and/or modify
|
|
11
|
it under the terms of the GNU General Public License v2 (1991)
|
|
12
|
as published by the Free Software Foundation.
|
hpdl
|
1284
|
13
|
*/
|
|
14
|
|
|
15
|
class osC_WhosOnline_Admin {
|
|
16
|
function getData($id) {
|
|
17
|
global $osC_Database;
|
|
18
|
|
|
19
|
$Qwho = $osC_Database->query('select * from :table_whos_online where session_id = :session_id');
|
|
20
|
$Qwho->bindTable(':table_whos_online', TABLE_WHOS_ONLINE);
|
|
21
|
$Qwho->bindValue(':session_id', $id);
|
|
22
|
$Qwho->execute();
|
|
23
|
|
|
24
|
$data = $Qwho->toArray();
|
|
25
|
|
|
26
|
$Qwho->freeResult();
|
|
27
|
|
|
28
|
return $data;
|
|
29
|
}
|
|
30
|
|
|
31
|
function delete($id) {
|
|
32
|
global $osC_Session, $osC_Database;
|
|
33
|
|
hpdl
|
1859
|
34
|
$osC_Session->delete($id);
|
hpdl
|
1284
|
35
|
|
|
36
|
$Qwho = $osC_Database->query('delete from :table_whos_online where session_id = :session_id');
|
|
37
|
$Qwho->bindTable(':table_whos_online', TABLE_WHOS_ONLINE);
|
|
38
|
$Qwho->bindValue(':session_id', $id);
|
|
39
|
$Qwho->execute();
|
|
40
|
|
|
41
|
if ( !$osC_Database->isError() ) {
|
|
42
|
return true;
|
|
43
|
}
|
|
44
|
|
|
45
|
return false;
|
|
46
|
}
|
|
47
|
}
|
|
48
|
?>
|