Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replaced the include of application_top.php with direct config files …

…and includes in incentibox_listener.php
  • Loading branch information...
commit 248036aab28bd1cb740af5fcd896d23cc7ed6996 1 parent 6f4ab05
Andrew Waage authored
Showing with 24 additions and 1 deletion.
  1. +24 −1 admin/incentibox_listener.php
View
25 admin/incentibox_listener.php
@@ -19,7 +19,30 @@
header("incentiBoxSuccess: FALSE");
exit();
}
-require('../includes/application_top.php');
+
+// require('../includes/application_top.php');
+
+// Include application configuration parameters
+require('includes/configure.php');
+define('DIR_FS_INCLUDES', DIR_FS_ADMIN . DIR_WS_INCLUDES);
+define('DIR_FS_FUNCTIONS', DIR_FS_ADMIN . DIR_WS_FUNCTIONS);
+
+// include the list of project database tables
+require(DIR_FS_INCLUDES . 'database_tables.php');
+// include select functions
+require(DIR_FS_FUNCTIONS . 'database.php');
+
+// make a connection to the database
+tep_db_connect() or die('Unable to connect to database server!');
+
+// set application wide parameters
+$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
+while ($configuration = tep_db_fetch_array($configuration_query)) {
+ if (!defined($configuration['cfgKey'])) {
+ define($configuration['cfgKey'], $configuration['cfgValue']);
+ }
+}
+
require_once(DIR_WS_CLASSES . 'incentibox_api.php');
/* Here's the plan:
Please sign in to comment.
Something went wrong with that request. Please try again.