From f716e80360eebe3c4749809807dae8e4752d4506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVeLiTi=E2=80=9D?= <“info@veliti.nl”> Date: Fri, 15 Nov 2024 09:56:00 +0100 Subject: [PATCH] Remove development & test files --- dev.php | 81 -------------------------------------------------------- test.php | 30 --------------------- 2 files changed, 111 deletions(-) delete mode 100644 dev.php delete mode 100644 test.php diff --git a/dev.php b/dev.php deleted file mode 100644 index 0d27912..0000000 --- a/dev.php +++ /dev/null @@ -1,81 +0,0 @@ -setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - -//----------------------------------------- -//----------------------------------------- - -//GET DATA -$sql ="SELECT carbrand,cartype,header,questions,datapoints,created,createdby FROM cartest where createdby like '%r2r%'"; -$stmt = $pdo->prepare($sql); -//Excute Query -$stmt->execute(); -//Get results -$messages = $stmt->fetchAll(PDO::FETCH_ASSOC); - -$accounthierarchy = '{"salesid":"21-Total Safety Solutions B.V.","soldto":"48-TSS-Demo","shipto":"2854-R2R","location":"","section":"Demo TSS"}'; - -foreach ($messages as &$message ){ - //ADD ACCOUNTHIERARCHY - $message['accounthierarchy'] = $accounthierarchy; - - //default whereclause - $whereclause = ''; - - //CREATE EMPTY STRINGS - $clause = ''; - $clause_insert =''; - $input_insert = ''; - - $post_content = $message; - - //CREAT NEW ARRAY AND MAP TO CLAUSE - if(isset($post_content) && $post_content!=''){ - foreach ($post_content as $key => $var){ - if ($key == 'submit' || $key == 'delete' || $key == 'rowID'){ - //do nothing - } - else { - $criterias[$key] = $var; - $clause .= ' , '.$key.' = ?'; - $clause_insert .= ' , '.$key.''; - $input_insert .= ', ?'; // ? for each insert item - $execute_input[]= $var; // Build array for input - } - } - } - - //CLEAN UP INPUT - $clause = substr($clause, 2); //Clean clause - remove first comma - $clause_insert = substr($clause_insert, 2); //Clean clause - remove first comma - $input_insert = substr($input_insert, 1); //Clean clause - remove first comma - - //----------------------------------------- - //Connect to TARGET DATABASE - //----------------------------------------- - - $pdo2 = dbConnect($dbname); - - //----------------------------------------- - //----------------------------------------- - //SQL EXECUTION - $sql = 'INSERT INTO cartest ('.$clause_insert.') VALUES ('.$input_insert.')'; - $stmt = $pdo2->prepare($sql); - //$stmt->execute($execute_input); - -} - - diff --git a/test.php b/test.php deleted file mode 100644 index be30123..0000000 --- a/test.php +++ /dev/null @@ -1,30 +0,0 @@ -
'; - -foreach ($allviews as $view){ - - if (in_stir($view,$admin_profile)){ - $view .= ''; - } else { - $view .= ''; - } - -} -$view .= ''; -$view .= '
'; - -echo $view; \ No newline at end of file