summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/profiles.inc.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-31 16:09:35 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-31 16:09:35 +0000
commitd07f777ed2cf0103ed550166f9b0e783db064255 (patch)
treefb331ae19aff60bdf2cea11bd99e34a99f45bc1d /frontends/php/include/profiles.inc.php
parent78776cf62621df9e12f0b791753174e638440efe (diff)
downloadzabbix-d07f777ed2cf0103ed550166f9b0e783db064255.tar.gz
zabbix-d07f777ed2cf0103ed550166f9b0e783db064255.tar.xz
zabbix-d07f777ed2cf0103ed550166f9b0e783db064255.zip
Getting rid of addslashes.
git-svn-id: svn://svn.zabbix.com/trunk@2592 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/profiles.inc.php')
-rw-r--r--frontends/php/include/profiles.inc.php28
1 files changed, 2 insertions, 26 deletions
diff --git a/frontends/php/include/profiles.inc.php b/frontends/php/include/profiles.inc.php
index db66663a..e94ff270 100644
--- a/frontends/php/include/profiles.inc.php
+++ b/frontends/php/include/profiles.inc.php
@@ -38,19 +38,7 @@
return 0;
}
- $devicetype=addslashes($devicetype);
- $name=addslashes($name);
- $os=addslashes($os);
- $serialno=addslashes($serialno);
- $tag=addslashes($tag);
- $macaddress=addslashes($macaddress);
- $hardware=addslashes($hardware);
- $software=addslashes($software);
- $contact=addslashes($contact);
- $location=addslashes($location);
- $notes=addslashes($notes);
-
- $sql="insert into hosts_profiles (hostid,devicetype,name,os,serialno,tag,macaddress,hardware,software,contact,location,notes) values ($hostid,'$devicetype','$name','$os','$serialno','$tag','$macaddress','$hardware','$software','$contact','$location','$notes')";
+ $sql="insert into hosts_profiles (hostid,devicetype,name,os,serialno,tag,macaddress,hardware,software,contact,location,notes) values (".zbx_ads($hostid).",'".zbx_ads($devicetype)."','".zbx_ads($name)."','".zbx_ads($os)."','".zbx_ads($serialno)."','".zbx_ads($tag)."','".zbx_ads($macaddress)."','".zbx_ads($hardware)."','".zbx_ads($software)."','".zbx_ads($contact)."','".zbx_ads($location)."','".zbx_ads($notes)."')";
$result=DBexecute($sql);
return $result;
@@ -75,19 +63,7 @@
return 0;
}
- $devicetype=addslashes($devicetype);
- $name=addslashes($name);
- $os=addslashes($os);
- $serialno=addslashes($serialno);
- $tag=addslashes($tag);
- $macaddress=addslashes($macaddress);
- $hardware=addslashes($hardware);
- $software=addslashes($software);
- $contact=addslashes($contact);
- $location=addslashes($location);
- $notes=addslashes($notes);
-
- $sql="update hosts_profiles set devicetype='$devicetype',name='$name',os='$os',serialno='$serialno',tag='$tag',macaddress='$macaddress',hardware='$hardware',software='$software',contact='$contact',location='$location',notes='$notes' where hostid=$hostid";
+ $sql="update hosts_profiles set devicetype='".zbx_ads($devicetype)."',name='".zbx_ads($name)."',os='".zbx_ads($os)."',serialno='".zbx_ads($serialno)."',tag='".zbx_ads($tag)."',macaddress='".zbx_ads($macaddress)."',hardware='".zbx_ads($hardware)."',software='".zbx_ads($software)."',contact='".zbx_ads($contact)."',location='".zbx_ads($location)."',notes='".zbx_ads($notes)."' where hostid=".zbx_ads($hostid);
$result=DBexecute($sql);
return $result;