- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
class MYSQL_ACTIONS
{
public $arguments = array();
public $values;
public $rows;
public $check = true;
public $list_array = array();
function __construct ()
{
$this->arguments = func_get_args();
$z = '';
foreach ($this->arguments as $value)
{
$y ="$value,";
$z .= $y;
}
$this->rows = substr("$z",0,-1);
}
function check_isset()
{
$argument = func_get_args();
for ($i = 0; $i < count($argument); $i++)
{
foreach ($argument as $value)
{
${$value} = $this->list_array[$i++];
}
}
for($i = 0; $i < count($argument); $i++)
{
$x = ${$argument[$i]};
if (empty($x))
{
$this->check = false;
break;
}
}
}
function mysql_action($table)
{
$processing = new GET_(processing);
$date = date("Y-m-d H:i:s");
for ($i = 0; $i < count($this->arguments); $i++)
{
foreach ($this->arguments as $value)
{
${$value} = $this->list_array[$i++];
}
}
$x ='';
foreach ($this->arguments as $value)
{
$y =" '${$value}',";
$x .= $y;
}
$this->values = substr("$x",0,-1);
if ($processing->variable == "add")
{
if ($this->check == true)
{
$result = mysql_query("INSERT INTO {$table} ({$this->rows}) VALUES ({$this->values})");
if ($result == true)
{
echo "";
}
else
{
echo "";
}
}
else
{
echo "";
}
}
}
}