From 6eb7271d43339ea3a889f247902115efdbbef525 Mon Sep 17 00:00:00 2001 From: Maurits van der Schee Date: Tue, 3 Nov 2015 00:22:51 +0100 Subject: [PATCH] improved examples --- auth.php | 31 ------------------- auth_example.php => examples/auth.php | 11 +++++++ core.php => extras/core.php | 0 .../php_crud_api_transform.js | 0 .../php_crud_api_transform.php | 0 5 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 auth.php rename auth_example.php => examples/auth.php (64%) rename core.php => extras/core.php (100%) rename php_crud_api_transform.js => lib/php_crud_api_transform.js (100%) rename php_crud_api_transform.php => lib/php_crud_api_transform.php (100%) diff --git a/auth.php b/auth.php deleted file mode 100644 index b7be86c..0000000 --- a/auth.php +++ /dev/null @@ -1,31 +0,0 @@ -'(local)', - 'username'=>'', - 'password'=>'', - 'database'=>'xxx', - 'charset'=>'UTF-8' -)); -$api->executeCommand(); - diff --git a/auth_example.php b/examples/auth.php similarity index 64% rename from auth_example.php rename to examples/auth.php index 8fe3ade..aeb3e9d 100644 --- a/auth_example.php +++ b/examples/auth.php @@ -9,3 +9,14 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) { } else { header('HTTP/1.0 403 Forbidden'); } + +include "api.php"; + +$api = new SQLSRV_CRUD_API(array( + 'hostname'=>'(local)', + 'username'=>'', + 'password'=>'', + 'database'=>'xxx', + 'charset'=>'UTF-8' +)); +$api->executeCommand(); \ No newline at end of file diff --git a/core.php b/extras/core.php similarity index 100% rename from core.php rename to extras/core.php diff --git a/php_crud_api_transform.js b/lib/php_crud_api_transform.js similarity index 100% rename from php_crud_api_transform.js rename to lib/php_crud_api_transform.js diff --git a/php_crud_api_transform.php b/lib/php_crud_api_transform.php similarity index 100% rename from php_crud_api_transform.php rename to lib/php_crud_api_transform.php