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
|
<?php require_once("DataFeeder.php"); class DbFeeder extends DataFeeder { var $db = NULL; function DbFeeder($name_, $specific_) { parent::DataFeeder($name_, $specific_); } function Exploit() { global $LIBPATH; global $db_name; global $db_host; global $db_password; global $db_usrName; $tableName = $this->specific[0]; global $$tableName; $test = parent::ParseGetPost($this->specific[3]); if($test) return $test; if($this->db == NULL) { $this->db = new DbMysql($db_host, $db_usrName, $db_password, $db_name); if(!$this->db->bConnected) return 2; } $values = $this->specific[3]; $fields = $this->specific[2]; // parser for filter if($this->specific[2] == null) { // no select criteria specified check for post rq global $gagets; if(in_array("filter", $gagets)) { // check what selection was specified $values = array(); $fields = array(); foreach($$tableName->rows as $row_) { if(array_key_exists($row_->name, $_POST)) { $fields[]= $row_->name; $values[]= $_POST[$row_->name];// ."'"; } } } } // $this->db->query_echo =1; $this->resultArr = $this->db->Select($$tableName, $this->specific[1], $fields, $values, $this->specific[4], $this->specific[5], $this->specific[6], $this->specific[7]); return $this->resultArr; } } ?>
|