aboutsummaryrefslogtreecommitdiff
path: root/scripts/vendorid/functions.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-04-16 23:20:01 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-04-16 23:20:01 +0000
commit891d0f86a6b3c17e5625979a5030727a73412e8d (patch)
tree44ec5305baa9c5b9aca86f15a87cbc72bfc823ba /scripts/vendorid/functions.php
parent51c194e1c1ba0c5beadcf1e72187894a177d1b71 (diff)
added the scripts to fill the database with the vendorid codes from pci.ids
Diffstat (limited to 'scripts/vendorid/functions.php')
-rw-r--r--scripts/vendorid/functions.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/scripts/vendorid/functions.php b/scripts/vendorid/functions.php
new file mode 100644
index 0000000..d50925b
--- /dev/null
+++ b/scripts/vendorid/functions.php
@@ -0,0 +1,36 @@
+<?php
+
+//created by Antonio Gallo (tonicucoz@yahoo.com)
+// this script is in the Public Domain
+
+function decode($url)
+{
+ $url = str_replace(' ','-',$url);
+ $url = str_replace(',','',$url);
+ $url = str_replace('\'','',$url);
+ $url = str_replace('"','',$url);
+ $url = str_replace('#','-',$url);
+ $url = str_replace('[','',$url);
+ $url = str_replace(']','',$url);
+ $url = str_replace('(','',$url);
+ $url = str_replace(')','',$url);
+ $url = str_replace('/','-',$url);
+ $url = str_replace('@','-at-',$url);
+ $url = str_replace('?','-',$url);
+ $url = str_replace('&','-',$url);
+ return $url;
+}
+
+function decode_soft($url)
+{
+ $url = str_replace('\'','',$url);
+ $url = str_replace('"','',$url);
+ return $url;
+}
+
+function sanitizeDb($string) {
+
+ $string = DB::$instance->real_escape_string($string);
+ return $string;
+
+}