$dbpass = @mysql_connect("localhost","root","root"); if ($dbpass) $dbconnect = mysql_select_db("autoreply"); echo "
\n"; echo "\n"; if (isset($_POST['op']) && $_POST['op']=="newsequence") { $value = '0'; $result2 = mysql_db_query("autoreply","select ID from rules order by ID desc"); $rekord2 = mysql_fetch_row($result2); if ($rekord2 != '') { $value = $rekord2[0] + 1; } mysql_query ("insert into rules (ID,DB) VALUES('$value','$rekord2[0]')"); echo "\n"; } if (isset($_POST['op']) && $_POST['op']=="delsequence") { mysql_query ("delete from rules where ID='".$_POST['id']."'"); mysql_query ("delete from actions where ID='".$_POST['id']."'"); echo "\n"; } if (isset($_POST['op']) && $_POST['op']=="delrule") { mysql_query ("delete from rules where RuleID='".$_POST['ruleid']."'"); echo "\n"; } if (isset($_POST['op']) && $_POST['op']=="editrule") { mysql_query ("update rules set User='".$_POST['user']."',Pass='".$_POST['pass']."',PC='".$_POST['pc']."',SQL='".$_POST['sql']."',DB='".$_POST['db']."' WHERE RuleID='".$_POST['ruleid']."';"); echo "\n"; } if (isset($_POST['op']) && $_POST['op']=="addrule") { mysql_query ("insert into rules (User,Pass,PC,ID,DB,SQL) VALUES('".$_POST['user']."','".$_POST['pass']."','".$_POST['pc']."','".$_POST['id']."','".$_POST['db']."','".$_POST['sql']."')"); echo "\n"; } if (isset($_POST['op']) && $_POST['op']=="delaction") { mysql_query ("delete from actions where ActionID='".$_POST['actionid']."'"); echo "\n"; } if (isset($_POST['op']) && $_POST['op']=="editaction") { mysql_query ("update actions set User='".$_POST['user']."',User2='".$_POST['user2']."',User3='".$_POST['user3']."',Pass='".$_POST['pass']."',Pass2='".$_POST['pass2']."',Pass3='".$_POST['pass3']."',DB='".$_POST['db']."',DB2='".$_POST['db2']."',DB3='".$_POST['db3']."',PC='".$_POST['pc']."',PC2='".$_POST['pc2']."',PC3='".$_POST['pc3']."',SQL='".$_POST['sql']."' WHERE ActionID='".$_POST['actionid']."';"); echo "\n"; } if (isset($_POST['op']) && $_POST['op']=="addaction") { mysql_query ("insert into actions (ID,User,User2,User3,Pass,Pass2,Pass3,DB,DB2,DB3,PC,PC2,PC3,SQL) VALUES('".$_POST['id']."','".$_POST['user']."','".$_POST['user2']."','".$_POST['user3']."','".$_POST['pass']."','".$_POST['pass2']."','".$_POST['pass3']."','".$_POST['db']."','".$_POST['db2']."','".$_POST['db3']."','".$_POST['pc']."','".$_POST['pc2']."','".$_POST['pc3']."','".$_POST['sql']."')"); echo "\n"; } echo ""; echo "\n"; $result = mysql_db_query("autoreply","select ID from rules group by ID "); while($rekord = mysql_fetch_row($result)) { echo "
Existing rule | ||
"; echo " | ";
echo "MySQL SQL text | ";
echo "Actions "; if ($count != 0) { echo " "; } echo " |
New rule | ||
"; echo " | ";
echo "MySQL SQL text | ";
echo "Actions |
Existing action | ||
"; echo " | MySQL SQL text "; echo " | ";
echo "Actions "; if ($count != 0) { echo ""; } echo " |
New action | ||
"; echo " | "; echo "MySQL SQL text | ";
echo "Actions |