PHP Classes

File: class/config.php

Recommend this page to a friend!
  Classes of anoop singh   CDN CMS   class/config.php   Download  
File: class/config.php
Role: Configuration script
Content type: text/plain
Description: Environment config variables
Class: CDN CMS
Manage content stored in a MySQL database
Author: By
Last change:
Date: 15 years ago
Size: 4,946 bytes
 

Contents

Class file image Download
<?php

/* @author: Anoop singh
|* @email: [email protected]
|* @date: Sep - 03
|* Environment config variables
|* Please edit DB details to make connection
|* from your DB
*/

/*
|*Ex. SALT Value for security from direct access
|*/
define("SALT","bb524af15e313e7cf710e20a43013e2e");

/*
|*DB Host name Ex. LocalhostDB Host name Ex. Localhost
|*/
define("SQL_HOST_NAME","localhost");

/*
|*DB Username Ex. Root
|*/
define("SQL_USER_NAME","php");

/*
|*DB Password Ex. abcXYZ
|*/
define("SQL_PASSWORD","phpUser");

/*
|*DB DataBase Name Ex. custom_cms
|*/
define("SQL_DB","custom_cms");

                                                                                                       
// this value must be bigger the 6 character
define("BASE_DIR",dirname(__FILE__)); //BASE Path to the site
define("EXT",".php"); //PhP file name extension
define("INCLUDE_DIR","class/"); //Ex. Class Directory Path

define("IS_MENU","true");
define("IS_FOOTER_LINK","true"); //Ex. Class Directory Path

define("THEME_DIR","theme/RJP_final/"); //Ex. Theme Directory "Default"
define("MODULE_DIR","module/"); //Ex. Module Directory "ABC"


/*
|* @ Config class
|*
*/
class config
{
    static protected
$SQL_HOST_NAME=SQL_HOST_NAME;
    static protected
$SQL_USER_NAME=SQL_USER_NAME;
    static protected
$SQL_PASSWORD=SQL_PASSWORD;
    static protected
$SQL_DB=SQL_DB;

   
/**
     * Constructor
     * @access protected
     * @return void
     */
   
function __construct()
    {
           
//TODO: write some code here
   
}
}

           
/*
            |* @Config variables please do not edit/delete any
            |*
            |*/
               
global $config;

               
$config=array(

                                       
/*
                                        * Page Request Variables
                                        */
                                       
"PageName"=>"",
                                       
"PageId"=>"",
                                       
"ModuleName"=>"",
                                       
"ModuleId"=>"",
                                       
"SiteUrl"=>"",

                                       
/*
                                        * Path Variables
                                        */
                                       
"headerimagepath"=>"images/",
                                       
"stylesheetpath"=>"css/",
                                       
"javascriptpath"=>"js/",
                                       
"imagepath"=>"images/",
                                       
"menuJsPath"=>"js/menu.js",

                                       
/*
                                        * Header Variables
                                        */
                                       
"title"=>"CMS Pages",
                                       
"metaTag"=>"CMS Pages",
                                       
"keywords"=>"CMS Pages",
                                       
"description"=>"CMS Description",
                                       
"HeaderImage"=>"logo.jpg",
                                       
"NewsImage"=>"thenews_img.jpg",
                                       
"js"=>"default.js",
                                       
"css"=>"default.css",

                                       
/*
                                        * Content variables
                                        */
                                       
"Lcontent"=>"",
                                       
"Mcontent"=>"",
                                       
"Rcontent"=>"",
                                       
"LcontentMod"=>"",
                                       
"RcontentMod"=>"",
                                       
"TmpRatio"=>"",
                                       
"TmpRatio"=>"mainMenu",
                                       
"TemplateId"=>"1",

        );

       
/*
        |--------------------------------------------------------------------------
        | Error Logging Directory Path
        |--------------------------------------------------------------------------
        |
        | Leave this BLANK unless you would like to set something other than the default
        | system/logs/ folder. Use a full server path with trailing slash.
        |
        */
       
$config['log_path'] = '';

       
/*
        |--------------------------------------------------------------------------
        | Error Logging Threshold
        |--------------------------------------------------------------------------
        |
        | If you have enabled error logging, you can set an error threshold to
        | determine what gets logged. Threshold options are:
        | You can enable error logging by setting a threshold over zero. The
        | threshold determines what gets logged. Threshold options are:
        |
        | 0 = Disables logging, Error logging TURNED OFF
        | 1 = Error Messages (including PHP errors)
        | 2 = Debug Messages
        | 3 = Informational Messages
        | 4 = All Messages
        |
        | For a live site you'll usually only enable Errors (1) to be logged otherwise
        | your log files will fill up very fast.
        |
        */
       
$config['log_threshold'] = 2;

       
/*
        |--------------------------------------------------------------------------
        | Date Format for Logs
        |--------------------------------------------------------------------------
        |
        | Each item that is logged has an associated date. You can use PHP date
        | codes to set your own date formatting
        |
        */
       
$config['log_date_format']='Y-m-d H:i:s';

       
/*
        |* Include basic engine core i8E_engine
        |*
        */
       
if(@file_exists(dirname(__FILE__)."/core_i8e_engine".EXT))
        {
                @include(
"core_i8e_engine".EXT);
        }
        else
        {
                die(
"Illegal use of Script!! Some files Missing!!!!");
        }

       
/* Load Localsettings for environment
        |* variables for Messanger
        |*/
       
if(@file_exists(dirname(__FILE__)."/common".EXT))
        {
                @include_once(
"common".EXT);
        }
        else
        {
                die(
"Illegal use of Script!! Some files Missing!!!!");
        }

        global
$wgDb,$wgTemplate;
       
$wgDb=new env();
?>