Skip to content

Commit 535880e

Browse files
committed
database and constant setting updated
1 parent fd3d8b8 commit 535880e

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-0
lines changed

.htaccess

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
DirectoryIndex index.php
2+
RewriteEngine on
3+
4+
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
5+
RewriteCond %{REQUEST_FILENAME} !-f
6+
RewriteCond %{REQUEST_FILENAME} !-d
7+
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]

application/config/constants.php

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2+
3+
/*
4+
|--------------------------------------------------------------------------
5+
| File and Directory Modes
6+
|--------------------------------------------------------------------------
7+
|
8+
| These prefs are used when checking and setting modes when working
9+
| with the file system. The defaults are fine on servers with proper
10+
| security, but you may wish (or even need) to change the values in
11+
| certain environments (Apache running a separate process for each
12+
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
13+
| always be used to set the mode correctly.
14+
|
15+
*/
16+
define('FILE_READ_MODE', 0644);
17+
define('FILE_WRITE_MODE', 0666);
18+
define('DIR_READ_MODE', 0755);
19+
define('DIR_WRITE_MODE', 0777);
20+
21+
/*
22+
|--------------------------------------------------------------------------
23+
| File Stream Modes
24+
|--------------------------------------------------------------------------
25+
|
26+
| These modes are used when working with fopen()/popen()
27+
|
28+
*/
29+
30+
define('FOPEN_READ', 'rb');
31+
define('FOPEN_READ_WRITE', 'r+b');
32+
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
33+
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
34+
define('FOPEN_WRITE_CREATE', 'ab');
35+
define('FOPEN_READ_WRITE_CREATE', 'a+b');
36+
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
37+
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
38+
39+
/**** USER DEFINED CONSTANTS **********/
40+
41+
define('ROLE_ADMIN', '1');
42+
define('ROLE_MANAGER', '2');
43+
define('ROLE_EMPLOYEE', '3');
44+
45+
define('SEGMENT', 2);
46+
47+
/************************** EMAIL CONSTANTS *****************************/
48+
49+
define('EMAIL_FROM', 'Your from email'); // e.g. email@example.com
50+
define('EMAIL_BCC', 'Your bcc email'); // e.g. email@example.com
51+
define('FROM_NAME', 'CIAS Admin System'); // Your system name
52+
define('EMAIL_PASS', 'Your email password'); // Your email password
53+
define('PROTOCOL', 'smtp'); // mail, sendmail, smtp
54+
define('SMTP_HOST', 'Your smtp host'); // your smtp host e.g. smtp.gmail.com
55+
define('SMTP_PORT', '25'); // your smtp port e.g. 25, 587
56+
define('SMTP_USER', 'Your smtp user'); // your smtp user
57+
define('SMTP_PASS', 'Your smtp password'); // your smtp password
58+
define('MAIL_PATH', '/usr/sbin/sendmail');
59+
60+
/* End of file constants.php */
61+
/* Location: ./application/config/constants.php */

application/config/database.php

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2+
/*
3+
| -------------------------------------------------------------------
4+
| DATABASE CONNECTIVITY SETTINGS
5+
| -------------------------------------------------------------------
6+
| This file will contain the settings needed to access your database.
7+
|
8+
| For complete instructions please consult the 'Database Connection'
9+
| page of the User Guide.
10+
|
11+
| -------------------------------------------------------------------
12+
| EXPLANATION OF VARIABLES
13+
| -------------------------------------------------------------------
14+
|
15+
| ['hostname'] The hostname of your database server.
16+
| ['username'] The username used to connect to the database
17+
| ['password'] The password used to connect to the database
18+
| ['database'] The name of the database you want to connect to
19+
| ['dbdriver'] The database type. ie: mysql. Currently supported:
20+
mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
21+
| ['dbprefix'] You can add an optional prefix, which will be added
22+
| to the table name when using the Active Record class
23+
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
24+
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
25+
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
26+
| ['cachedir'] The path to the folder where cache files should be stored
27+
| ['char_set'] The character set used in communicating with the database
28+
| ['dbcollat'] The character collation used in communicating with the database
29+
| NOTE: For MySQL and MySQLi databases, this setting is only used
30+
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
31+
| (and in table creation queries made with DB Forge).
32+
| There is an incompatibility in PHP with mysql_real_escape_string() which
33+
| can make your site vulnerable to SQL injection if you are using a
34+
| multi-byte character set and are running versions lower than these.
35+
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
36+
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
37+
| ['autoinit'] Whether or not to automatically initialize the database.
38+
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
39+
| - good for ensuring strict SQL while developing
40+
|
41+
| The $active_group variable lets you choose which connection group to
42+
| make active. By default there is only one group (the 'default' group).
43+
|
44+
| The $active_record variables lets you determine whether or not to load
45+
| the active record class
46+
*/
47+
48+
$active_group = 'default';
49+
$active_record = TRUE;
50+
51+
$db['default']['hostname'] = 'localhost';
52+
$db['default']['username'] = 'root';
53+
$db['default']['password'] = '';
54+
$db['default']['database'] = 'cias';
55+
$db['default']['dbdriver'] = 'mysqli';
56+
$db['default']['dbprefix'] = '';
57+
$db['default']['pconnect'] = TRUE;
58+
$db['default']['db_debug'] = TRUE;
59+
$db['default']['cache_on'] = FALSE;
60+
$db['default']['cachedir'] = '';
61+
$db['default']['char_set'] = 'utf8';
62+
$db['default']['dbcollat'] = 'utf8_general_ci';
63+
$db['default']['swap_pre'] = '';
64+
$db['default']['autoinit'] = TRUE;
65+
$db['default']['stricton'] = FALSE;
66+
67+
68+
/* End of file database.php */
69+
/* Location: ./application/config/database.php */

0 commit comments

Comments
 (0)