Example #1
0
} else {
    // Web Server
    define('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'root');
    define('DB_SERVER_PASSWORD', 'root');
    define('DB_DATABASE', 'booking_calendar');
    define('USE_PCONNECT', true);
}
// define the database tables
define('DATE_TIME_SCHEDULE_TABLE', 'booking_schedule');
define('BOOKING_EVENT_TABLE', 'booking_event');
define('BOOKING_USER_TABLE', 'booking_user');
// include the database functions
include_once DIR_FS_FUNCTIONS . 'database.php';
// make a connection to the database... now
wrap_db_connect() or die('Unable to connect to database server! A working MySQL database is needed. ' . 'Please see includes/application_top.php to configure your MySQL database connection parameters. ' . 'See sql/mysql.sql for MySQL that needs to be executed to setup the database tables for the booking calendar.');
// SESSION INI CHANGES
// Change the session name for security purposes.
ini_set("session.name", "SID");
// Do not pass the session id thru the URL, use cookies only.
ini_set("session.use_trans_sid", 0);
// Change the session save path because we could be on a shared server.
ini_set("session.save_path", DIR_FS_SESSIONS);
// Use only cookies for session management.
ini_set("session.use_only_cookies", 1);
// define how the session functions will be used
include_once DIR_WS_FUNCTIONS . 'sessions.php';
// lets start our session
if (@(!SID) && $_REQUEST[wrap_session_name()]) {
    wrap_session_id($_REQUEST[wrap_session_name()]);
}
Example #2
0
define('BOOKING_GROUPS_TABLE', 'booking_groups');
define('EMAILSHOT_SENT_TO_GROUPS', 'booking_contact_sent_email_groups');
define('EMAILSHOT_SENT_TO_USERS', 'booking_contact_sent_email_users');
define('EMAILSHOT_SENT_EMAILS', 'booking_contact_sent_emails');
define('EMAILSHOT_ATTACHMENTS', 'booking_attachments');
define('EMAILSHOT_ATTACHMENTS_TEMP', 'booking_attachments_temp');
define('BOOKING_BUDDIES', 'booking_user_buddies');
define('BOOKING_BUDDIES_PENDING', 'booking_user_buddies_pending');
define('BOOKING_CREDIT_TYPES', 'booking_credit_types');
define('BOOKING_PRODUCT_ITEM', 'booking_product_item');
define('PAYPAL_TRANSACTIONS', 'booking_paypal_transactions');
define('BOOKING_PRODUCT_GROUPS', 'booking_product_groups');
// include the database functions
include_once DIR_WS_FUNCTIONS . 'database.php';
// make a connection to the database... now
wrap_db_connect() or die('Unable to connect to database server!');
// some code to solve compatibility issues (magic quotes)
include_once DIR_WS_FUNCTIONS . 'compatibility.php';
// SESSION INI CHANGES
// Change the session name for security purposes.
ini_set("session.name", "SID");
// Do not pass the session id thru the URL, use cookies only.
ini_set("session.use_trans_sid", 0);
// Change the session save path because we could be on a shared server.
ini_set("session.save_path", DIR_FS_SESSIONS);
// Use only cookies for session management.
ini_set("session.use_only_cookies", 1);
// define how the session functions will be used
include_once DIR_WS_FUNCTIONS . 'sessions.php';
// lets start our session
if (@(!SID) && $_REQUEST[wrap_session_name()]) {