blob: d84701fd7d32e33f67c6442c21828635bbd1a979 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<?php
abstract class Db_Abstract implements Db_Interface
{
private $dbconn;
protected static $instance;
private function __construct() { }
public static function instance()
{
if (is_null(static::$instance)) {
static::$instance = new static();
}
return static::$instance;
}
public function connect($host, $user, $pass, $db) { }
public function getLink()
{
return $this->dbconn;
}
public function init() { }
public function escape_string($s, $strip_tags = true) { }
public function query($query, $die_on_error = true) { }
public function fetch_assoc($result) { }
public function num_rows($result) { }
public function fetch_result($result, $row, $param) { }
public function unescape_string($str)
{
$tmp = str_replace("\\\"", "\"", $str);
$tmp = str_replace("\\'", "'", $tmp);
return $tmp;
}
public function close() { }
public function affected_rows($result) { }
public function last_error() { }
public function quote($str)
{
return("'$str'");
}
}
|