appaddappdel!

git-svn-id: http://www.observium.org/svn/observer/trunk@1971 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-03-24 17:28:13 +00:00
parent 58f2828d87
commit b6418c4231
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?php
$updated = '1';
$sql = "INSERT INTO `applications` (`device_id`, `app_type`)
VALUES ('" . mres($_POST['device']). "','" . mres($_POST['type']) . "')";
$query = mysql_query($sql);
$affected = mysql_affected_rows() . "records affected";
$message .= $message_break . "application added!";
$message_break .= "<br />"
?>

View File

@@ -0,0 +1,15 @@
<?php
$updated = '1';
$sql = "DELETE FROM `applications` WHERE app_id = '" . mres($_POST['app']). "'";
$query = mysql_query($sql);
$rows = mysql_affected_rows();
$affected = $rows . " records affected";
$message .= $message_break . $rows . " application deleted!";
$message_break .= "<br />"
?>