You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE name = ? AND section = ?", false, $bind);
127
+
$bind[2]["value"] = $this->lang;
128
+
$bind[2]["type"] = "s";
129
+
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE name = ? AND section = ? AND lang = ?", false, $bind);
123
130
if(is_array($ar)) {
124
131
if($overwrite) {
125
132
$bind[0]["value"] = $name;
@@ -134,7 +141,9 @@ public function setup($name, $subject, $content, $description = "", $overwrite =
134
141
$bind[4]["type"] = "s";
135
142
$bind[5]["type"] = "s";
136
143
$bind[5]["value"] = $this->section;
137
-
$this->mysql->query("UPDATE `".$this->table."` SET name = ?, subject = ?, content = ?, description = ? WHERE name = ? AND section = ?", $bind);
144
+
$bind[6]["type"] = "s";
145
+
$bind[6]["value"] = $this->lang;
146
+
$this->mysql->query("UPDATE `".$this->table."` SET name = ?, subject = ?, content = ?, description = ? WHERE name = ? AND section = ? AND lang = ?", $bind);
138
147
}
139
148
} else {
140
149
$bind[0]["value"] = $name;
@@ -147,7 +156,9 @@ public function setup($name, $subject, $content, $description = "", $overwrite =
@@ -169,7 +180,9 @@ public function change($id, $name, $subject, $content, $description = "") {
169
180
$bind[3]["value"] = $name;
170
181
$bind[4]["type"] = "s";
171
182
$bind[4]["value"] = $this->section;
172
-
$this->mysql->query("UPDATE `".$this->table."` SET subject = ?, content = ?, description = ?, name = ? WHERE id = '".$id."' AND section = ?", $bind);
183
+
$bind[5]["type"] = "s";
184
+
$bind[5]["value"] = $this->lang;
185
+
$this->mysql->query("UPDATE `".$this->table."` SET subject = ?, content = ?, description = ?, name = ? WHERE id = '".$id."' AND section = ? AND lang = ?", $bind);
173
186
}
174
187
}
175
188
@@ -178,9 +191,11 @@ public function name_exists($name) {
178
191
$bind[0]["type"] = "s";
179
192
$bind[1]["type"] = "s";
180
193
$bind[1]["value"] = $this->section;
181
-
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE name = ? AND section = ?", false, $bind);
194
+
$bind[2]["type"] = "s";
195
+
$bind[2]["value"] = $this->lang;
196
+
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE name = ? AND section = ? AND lang = ?", false, $bind);
182
197
if(is_array($ar)) {
183
-
returntrue;
198
+
return$ar["id"];
184
199
} else {
185
200
returnfalse;
186
201
}
@@ -190,7 +205,9 @@ public function get_name_by_id($id) {
190
205
if(!is_numeric($id)) { returnfalse; }
191
206
$b[0]["type"] = "s";
192
207
$b[0]["value"] = $this->section;
193
-
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE id = '".$id."' AND section = ?", false, $b);
208
+
$b[1]["type"] = "s";
209
+
$b[1]["value"] = $this->lang;
210
+
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE id = '".$id."' AND section = ? AND lang = ?", false, $b);
194
211
if(is_array($ar)) {
195
212
return$ar["name"];
196
213
} else {
@@ -202,7 +219,9 @@ public function id_exists($id) {
202
219
if(!is_numeric($id)) { returnfalse; }
203
220
$b[0]["type"] = "s";
204
221
$b[0]["value"] = $this->section;
205
-
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE id = '".$id."' AND section = ?", false, $b);
222
+
$b[1]["type"] = "s";
223
+
$b[1]["value"] = $this->lang;
224
+
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE id = '".$id."' AND section = ? AND lang = ?", false, $b);
206
225
if(is_array($ar)) {
207
226
returntrue;
208
227
} else {
@@ -214,14 +233,26 @@ public function id_delete($id) {
214
233
if(!is_numeric($id)) { returnfalse; }
215
234
$b[0]["type"] = "s";
216
235
$b[0]["value"] = $this->section;
217
-
return$this->mysql->query("DELETE FROM `".$this->table."` WHERE id = '".$id."' AND section = ?", $b);
236
+
$b[1]["type"] = "s";
237
+
$b[1]["value"] = $this->lang;
238
+
return$this->mysql->query("DELETE FROM `".$this->table."` WHERE id = '".$id."' AND section = ? AND lang = ?", $b);
239
+
}
240
+
241
+
publicfunctionname_delete($name) {
242
+
$b[0]["type"] = "s";
243
+
$b[0]["value"] = $name;
244
+
$b[1]["type"] = "s";
245
+
$b[1]["value"] = $this->section;
246
+
return$this->mysql->query("DELETE FROM `".$this->table."` WHERE name = ? AND id = '".$id."' AND section = ?", $b);
218
247
}
219
248
220
249
publicfunctionget_full($id) {
221
250
if(!is_numeric($id)) { returnfalse; }
222
251
$b[0]["type"] = "s";
223
252
$b[0]["value"] = $this->section;
224
-
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE id = '".$id."' AND section = ?", false, $b);
253
+
$b[1]["type"] = "s";
254
+
$b[1]["value"] = $this->lang;
255
+
$ar = $this->mysql->select("SELECT * FROM `".$this->table."` WHERE id = '".$id."' AND section = ? AND lang = ?", false, $b);
0 commit comments