File: application/config/constants.php

Recommend this page to a friend!
  Classes of Kishor Mali  >  PHP User Feedback System  >  application/config/constants.php  >  Download  
File: application/config/constants.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP User Feedback System
Application to record feedback from customers
Author: By
Last change:
Date: 4 months ago
Size: 6,812 bytes
 

Contents

Class file image Download
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| Display Debug backtrace
|--------------------------------------------------------------------------
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
| error_reporting is disabled, the backtrace will not display, regardless
| of this setting
|
*/
defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);

/*
|--------------------------------------------------------------------------
| 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.
|
*/
defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/
defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');

/*
|--------------------------------------------------------------------------
| Exit Status Codes
|--------------------------------------------------------------------------
|
| Used to indicate the conditions under which the script is exit()ing.
| While there is no universal standard for error codes, there are some
| broad conventions. Three such conventions are mentioned below, for
| those who wish to make use of them. The CodeIgniter defaults were
| chosen for the least overlap with these conventions, while still
| leaving room for others to be defined in future versions and user
| applications.
|
| The three main conventions used for determining exit status codes
| are as follows:
|
| Standard C/C++ Library (stdlibc):
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
| (This link also contains other GNU-specific conventions)
| BSD sysexits.h:
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
| Bash scripting:
| http://tldp.org/LDP/abs/html/exitcodes.html
|
*/
defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code


/**** USER DEFINED CONSTANTS **********/

define('ROLE_ADMIN', '1');
define('ROLE_MANAGER', '2');
define('ROLE_EMPLOYEE', '3');

define('SEGMENT', 2);

/************************** EMAIL CONSTANTS *****************************/

define('EMAIL_FROM', 'Your from email'); // e.g. email@example.com
define('EMAIL_BCC', 'Your bcc email'); // e.g. email@example.com
define('FROM_NAME', 'CIAS Admin System'); // Your system name
define('EMAIL_PASS', 'Your email password'); // Your email password
define('PROTOCOL', 'smtp'); // mail, sendmail, smtp
define('SMTP_HOST', 'Your smtp host'); // your smtp host e.g. smtp.gmail.com
define('SMTP_PORT', '25'); // your smtp port e.g. 25, 587
define('SMTP_USER', 'Your smtp user'); // your smtp user
define('SMTP_PASS', 'Your smtp password'); // your smtp password
define('MAIL_PATH', '/usr/sbin/sendmail');

/**
 * ****** APPLICATION CONSTANTS ******
 */
define ( 'VER', '1.0.0.1' );

/**
 * ****** PATH CONSTANTS *************
 */
define ( 'ASSETS', 'assets/' );
define ( 'UPLOAD_PROFILE', 'uploads/' );
define ( 'IMAGES', 'uploads/images/' );
define ( 'EXCEL_FILE', 'uploads/excel/' );
define ( 'WEBSITE_CAPTURE', 'uploads/captures/' );
define ( 'MOBILE', 'mobile/' );
define ( 'BROWSER', 'browser/' );
define ( 'PLUGINS_FULL', 'assets/plugins/' );
define ( 'ATTACHMENT_PATH', 'uploads/attachments/' );

/**
 * ****** OTHER CONSTANTS ************
 */
define ( 'CAPTURE_MOBILE', 'CM' );
define ( 'CAPTURE_BROWSER', 'CB' );
define ( 'MOBILE_UA', 'Mozilla/5.0 (Linux; Android 4.4.2; XT1033 Build/KXB20.25-1.31) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36' );
define ( 'BROWSER_UA', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' );

/**
 * ****** SERVICE STATUS *************
 */
define ( 'RAW', '1' );
define ( 'PROCESSED', '2' );
define ( 'FINALS', '3' );
define ( 'DEAD', '4' );


/**
 * ****** API Keys *******************
 */
define ( 'GMAP_API_KEY', 'AIzaSyAmiVf-dkxWQLPMxiwnH2VO1nnI0wx2orA' );
define ( "GEO_CODE_URL", "https://maps.googleapis.com/maps/api/geocode/json?address=");


For more information send a message to info at phpclasses dot org.