-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_mysql.php
executable file
·159 lines (55 loc) · 2.13 KB
/
db_mysql.php
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?php
/*
EvoGB written by neiller at evobb dot com (neiller@evobb.com)
Also available EvoBB and EvoNews co-producer with Xavic and fod
available for download @ http://www.evobb.com...
Note: you can edit below this but its not advised unless asked to do so
No nead to delete install.php after an install
Make sure to edit the connect.php before you start installing your EvoGB :)
NB : once logged in change your password :)
If you wish to make contributions / changes to the Evolution Products
do so and send what you have done with explanations to webmaster@evobb.com
*/
global $stream, $declared_class_db;
if (!$stream && $declared_class_db!="yes"){
class db {
function graberrordesc() {
$this->error=mysql_error();
return $this->error;
}
function graberrornum() {
$this->errornum=mysql_errno();
return $this->errornum;
}
function connect(){
global $fcwhost, $fcwusername, $fcwpassword2, $fcwdb_name;
$this->db = @mysql_connect($fcwhost,$fcwusername,$fcwpassword2);
@mysql_select_db($fcwdb_name, $this->db);
}
function do_query($query, $ret) {
$this->result = @mysql_query($query, $this->db);
if (!$this->result || !$ret) {
//echo "<script language=javascript>\n<!--\nalert(\"There was an error in the sql statement.\\nmysql said: ".ereg_replace('"', """, $this->graberrordesc())."\");\n//-->\n</script>";
return "bad";
} else {
if ($ret=="array"){
$this->return = array();
while ($row = @mysql_fetch_row($this->result)){
$this->return[] = $row;
}
} elseif ($ret=="one"){
$this->return = @mysql_result($this->result,0,0);
} elseif ($ret=="row"){
$this->return = @mysql_fetch_row($this->result);
} else {
$this->return = "bad";
}
return $this->return;
}
}
function close(){
@mysql_close($this->db);
}
}
$declared_class_db = "yes";
}