Хранилища Subversion ant

Редакция

Редакция 308 | Редакция 312 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 308 Редакция 309
Строка 13... Строка 13...
13
 */
13
 */
14
14
15
class Core {
15
class Core {
16
    protected $db       = NULL;
16
    protected $db       = NULL;
17
    protected $prefix   = NULL;
17
    protected $prefix   = NULL;
-
 
18
    protected $secure   = NULL;
-
 
19
    protected $owner    = NULL;
18
20
-
 
21
19
    function __constructor($database,$prefix) {
22
    function __constructor($database,$prefix,$secure,$owner) {
20
        $this->db       = $database;
23
        $this->db       = $database;
21
        $this->prefix   = $prefix;
24
        $this->prefix   = $prefix;
-
 
25
        $this->secure   = $secure;
-
 
26
        $this->owner    = $owner;
22
    }
27
    }
23
28
24
    function getSetting($attr) {
29
    function getSetting($attr) {
25
        $db = $this->db;
30
        $db = $this->db;
26
        $result = array();
31
        $result = array();
Строка 37... Строка 42...
37
        return $result;
42
        return $result;
38
    }
43
    }
39
44
40
}
45
}
41
46
42
class Security extends Core {
-
 
43
    function __constructor() {
-
 
44
    }
-
 
45
-
 
46
    function checkInt($value) {
-
 
47
        return abs(intval($value));
-
 
48
    }
-
 
49
-
 
50
    function checkStr($value, $mode = 0) {
-
 
51
        // mode - 0 -> wrap; mode - 1 -> strip;
-
 
52
        if ($mode == 0) {
-
 
53
            $result = mysql_real_escape_string($value);
-
 
54
        } else {
-
 
55
            $result = stripslashes($value);
-
 
56
        }
-
 
57
        return $result;
-
 
58
    }
-
 
59
}
-
 
60
-
 
61
class Owner extends Core {
-
 
62
    function __constructor() {
-
 
63
-
 
64
    }
-
 
65
}
-
 
66
-
 
67
?>
47
?>