<?php  #if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',                            'rb');
define('FOPEN_READ_WRITE',                      'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',        'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',   'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',                    'ab');
define('FOPEN_READ_WRITE_CREATE',               'a+b');
define('FOPEN_WRITE_CREATE_STRICT',             'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',        'x+b');

define('NO_IMG',                                'assets/images/no_image.png');
define('DEFAULT_FAVICON',                       'assets/images/favicon.ico');
define('PAGE_TITLE_PREFIX',                     'Murugan Hill Temple'); // Only for login page.
define('TBL_PREFIX',                            'thiru_');
define('TIME_ZONE',                             'Asia/Singapore'); #'Asia/Calcutta'
define('INV_PREFIX',                            'INV');
define('REC_PREFIX',                            'TBR');

/* For front end */
define('INSTALL_LIMIT',                          10);
define('PAGINATION_LIMIT',                      10);
define('MAX_OTP_LIMIT',                         6);
define('OTP_EXPIRE_TIME',                       '+1 hour');// 1 hour --- 30 minutes

define('IS_DEMO',                               FALSE);
define('TO_SEND',                               TRUE); // Whether All SMS is send or not

define('ACK_MAIL_SEND',                         FALSE); // Whether Acknowledgement Mail send
define('ACK_SMS_SEND',                          TRUE); // Whether Acknowledgement SMS send (TO_SEND Must be set to TRUE)
define('OTP_SEND',                              FALSE); // Show OTP Window
define('TO_PRINT',                              TRUE); // Enable or Disable "EXE" && Printing

define('SMS_USER',                              'APIXQE9MPSZV7'); //APIVOGDWRKIZR // 'API48Z28JBWS3'
define('SMS_PWD',                               'APIXQE9MPSZV7XQE9M'); //APIVOGDWRKIZRVOGDW // 'API48Z28JBWS3XMH9Z'
define('SMS_FROM',                              'Tiru-MHT'); //'SVKT'); 
define('MOB_PREFIX',                            '65'); // '65'
define('MAIL_SUB',                              SMS_FROM . ': Booking Acknowledgement for {module}!'); // Mail Subject Example: "Tiru: Booking Acknowledgement for Prasadam!"

if (defined('TIME_ZONE')) {
    date_default_timezone_set(TIME_ZONE);
    
    /*$now = new DateTime();
    $mins = $now->getOffset() / 60;
    
    $sgn = ($mins < 0 ? -1 : 1);
    $mins = abs($mins);
    $hrs = floor($mins / 60);
    $mins -= $hrs * 60;
    
    define( 'ZONE_DIFF' , sprintf('%+d:%02d', $hrs*$sgn, $mins) );*/
    
}

/* UPLOADS Directories */
define('UPLOADS',                               'uploads/');
define('VOL_DIR',                               UPLOADS . 'volunteers/');
define('EMP_DIR',                               UPLOADS . 'employees/');
define('TMP_PRINT_DIR',                         'tmp/print/');

define('DIR_COMPANY_LOGO',                      UPLOADS . 'settings/logo/');
define('DIR_FAVICON',                           UPLOADS . 'settings/favicon/');
define('DIR_LOGIN_IMG',                         UPLOADS . 'settings/login_img/');
define('DIR_ADMIN_MENU_BG',                     UPLOADS . 'settings/admin_menu_bg/');
define('DIR_USER_MENU_BG',                      UPLOADS . 'settings/user_menu_bg/');
define('DIR_ADMIN_BG',                          UPLOADS . 'settings/admin_bg/');
define('DIR_USER_BG',                           UPLOADS . 'user_bg/');
define('DIR_CATEGORY_IMAGE',                    UPLOADS . 'category_image/');
define('DIR_ITEM_IMAGE',                        UPLOADS . 'item_image/');
define('DIR_SERVICE_IMAGE',                     UPLOADS . 'service_image/');
define('DIR_GOD_ICON',                          UPLOADS . 'god/');
define('DIR_FORM_DOWNLOAD',                     UPLOADS . 'forms/');
define('DIR_PAY_TYPE',                          UPLOADS . 'pay_types/');
define('DIR_ADVERTISEMENT',                     UPLOADS . 'advertisements/' );

/* Table names */
define('TBL_TALLY',                             'tallytransaction');
define('TBL_SETTINGS_BASIC',                    TBL_PREFIX . 'settings_basic');
define('TBL_SETTINGS_GENERAL',                  TBL_PREFIX . 'settings_general');
define('TBL_SETTINGS_DESIGN',                   TBL_PREFIX . 'settings_design');
define('TBL_SETTINGS_MASTER',                   TBL_PREFIX . 'settings_master');
define('TBL_SETTINGS_INVENTORY',                TBL_PREFIX . 'settings_inventory');
define('TBL_SETTINGS_REPORT',                   TBL_PREFIX . 'settings_report');
define('TBL_SETTINGS_STATUE',                   TBL_PREFIX . 'settings_statue');
define('TBL_USERS',                             TBL_PREFIX . 'users');
define('TBL_CATEGORY',                          TBL_PREFIX . 'categories');
define('TBL_SERVICE_MENU',                      TBL_PREFIX . 'service_menus');
define('TBL_SERVICE',                           TBL_PREFIX . 'services');
define('TBL_ITEM',                              TBL_PREFIX . 'items');
define('TBL_PRASADAM',                          TBL_PREFIX . 'prasadam');
define('TBL_UNIT',                              TBL_PREFIX . 'units');
define('TBL_MADAPPALLI',                        TBL_PREFIX . 'madappalli');
define('TBL_GOD_NAME',                          TBL_PREFIX . 'god_names');
define('TBL_PRICE',                             TBL_PREFIX . 'price');
define('TBL_DEVOTEE',                           TBL_PREFIX . 'devotees');
define('TBL_TEMPLE',                            TBL_PREFIX . 'temple_details');
define('TBL_SUPPLIER',                          TBL_PREFIX . 'suppliers');
define('TBL_VOLUNTEER',                         TBL_PREFIX . 'volunteers');
define('TBL_DONOR',                             TBL_PREFIX . 'donor_sponsor');
define('TBL_UBAYAM',                            TBL_PREFIX . 'ubayam');
define('TBL_PRIEST',                            TBL_PREFIX . 'priest_name');
define('TBL_EMPLOYEE',                          TBL_PREFIX . 'employees');
define('TBL_STATUE_BOOK',                       TBL_PREFIX . 'statue_books');
define('TBL_SB_ITEM',                           TBL_PREFIX . 'sb_item_qty');
define('TBL_PURCHASE',                          TBL_PREFIX . 'purchase_entry');
define('TBL_PO_ITEMS',                          TBL_PREFIX . 'po_items');
define('TBL_PAY_TYPE',                          TBL_PREFIX . 'payment_types');
define('TBL_STAR',                              TBL_PREFIX . 'stars');
define('TBL_PAY',                               TBL_PREFIX . 'payments');
define('TBL_BA',                                TBL_PREFIX . 'bill_abishegam');
define('TBL_BAI',                               TBL_PREFIX . 'ba_abishegam');//TBL_PREFIX . 'bill_prasadam_items');
define('TBL_BP',                                TBL_PREFIX . 'bill_prasadam');
define('TBL_BPI',                               TBL_PREFIX . 'bp_items');
define('TBL_BM',                                TBL_PREFIX . 'bill_madappalli');
define('TBL_BMI',                               TBL_PREFIX . 'bm_items');
define('TBL_BD',                                TBL_PREFIX . 'bill_devotees');
define('TBL_BDI',                               TBL_PREFIX . 'bd_items');
define('TBL_BAR',                               TBL_PREFIX . 'bill_archanai');
define('TBL_BARI',                              TBL_PREFIX . 'bar_items');
define('TBL_BK',                                TBL_PREFIX . 'bill_kattalai');
define('TBL_BKI',                               TBL_PREFIX . 'bill_kattalai_items');
define('TBL_SMS_TYPES',                         TBL_PREFIX . 'sms_types');
define('TBL_BH',                                TBL_PREFIX . 'bill_hall_booking');
define('TBL_BWH',                               TBL_PREFIX . 'bill_wedding_booking');
define('TBL_BILL_TEMPLE',                       TBL_PREFIX . 'bill_temple_institution');
define('TBL_BILL_OTHERS',                       TBL_PREFIX . 'bill_other_services');
define('TBL_BILL_MEMBER_SUBSCRIPE',             TBL_PREFIX . 'bill_member_subscripe');

define('TBL_BILL_MEMBER_TOPUP',                 TBL_PREFIX . 'bill_member_topup');
define('TBL_BILL_FESTIVAL_FUNCTION',            TBL_PREFIX . 'bill_festival_function');
define('TBL_BILL_FESTIVAL_PRASADAM',            TBL_PREFIX . 'bill_festival_prasadam');
define('TBL_BILL_MEGA_FUNCTION',                TBL_PREFIX . 'bill_mega_function');
define('TBL_BILL_MEGA_PRASADAM',                TBL_PREFIX . 'bill_mega_prasadam');
define('TBL_BILL_UBAYAM',                       TBL_PREFIX . 'bill_ubayam');
define('TBL_BILL_UBAYAM_PRASADAM',              TBL_PREFIX . 'bill_ubayam_prasadam');
define('TBL_BILL_BUILDING_FUND',                TBL_PREFIX . 'bill_building_fund');
define('TBL_BILL_DONATION',                     TBL_PREFIX . 'bill_donation');
define('TBL_BILL_DONATION_PLEDGE',              TBL_PREFIX . 'bill_donation_pledge');
define('TBL_BILL_DONATION_TRANSACTION',         TBL_PREFIX . 'bill_donation_pledge_transaction');
define('TBL_BILL_GOLD_SILVER_OFFERING',         TBL_PREFIX . 'bill_gold_silver_offer');
define('TBL_BILL_OUTDOOR_SERVICES',             TBL_PREFIX . 'bill_outdoor_services');
define('TBL_BILL_MEMBER_CARD',                  TBL_PREFIX . 'bill_mem_register');
define('TBL_BILL_CARD_MEMBERS',                 TBL_PREFIX . 'bill_reg_members');
define('TBL_BILL_CARD_TOPUP',                   TBL_PREFIX . 'bill_mem_topup_details');
define('TBL_BILL_SETT',                         TBL_PREFIX . 'bill_settings');
define('TBL_BILL_TEMPLESHOP_SALES',             TBL_PREFIX . 'bill_temple_shop_sales');
define('TBL_BILL_TEMPLESHOP_ITEM',              TBL_PREFIX . 'bill_temple_shop_item');
define('TBL_FORM_DOWNLOAD',                     TBL_PREFIX . 'form_downloads');
define('TBL_EXPENSES',                          TBL_PREFIX . 'expenses');
define('TBL_EXP',                               TBL_PREFIX . 'expenses');
define('TBL_VENDOR',                            TBL_PREFIX . 'vendor');
define('TBL_STUDENT',                           TBL_PREFIX . 'student_form');
define( 'TBL_LOGIN',                            TBL_PREFIX . 'log_details');
define( 'TBL_REFUND',                           TBL_PREFIX . 'refund_details');
define( 'TBL_OPEN_BALANCE',                     TBL_PREFIX . 'opening_balance_details');

define('TBL_INV_CATEGORY',                      TBL_PREFIX . 'inventory_category');
define('TBL_INV_ITEM',                          TBL_PREFIX . 'inventory_item');
define('TBL_INV_GOLD',                          TBL_PREFIX . 'inventory_gold_silver');
define('TBL_INV_GOLD_TYPE',                     TBL_PREFIX . 'gold_silver_type');
define('TBL_INV_LOG',                           TBL_PREFIX . 'inventory_log');
define('TBL_INV_ISSUED',                        TBL_PREFIX . 'inventory_issued');

define('TBL_INV_GENERAL',                       TBL_PREFIX . 'inventory_general');
define('TBL_INV_SALES',                         TBL_PREFIX . 'inventory_sales' );
define('TBL_EXP_TYPE',                          TBL_PREFIX . 'expense_types');
define('TBL_INV_TEMPLE',                        TBL_PREFIX . 'inventory_temple');

/* End of file constants.php */
/* Location: ./application/config/constants.php */