Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
thebestprx
/
public_html
/
admin
/
include
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/thebestprx/public_html/admin/include/connect.php
<?php if( $_SERVER['HTTP_HOST'] == 'localhost' || strncmp($_SERVER['HTTP_HOST'], "192.168.", 8)==0 ) { $ServerName = "localhost"; $User = "root"; $Password = "abc123"; $dbname = "thebestproperty_db"; $server_name = "http://localhost/baanwebsite/customer/thebestpropertygroup/admin"; $server_file = "http://localhost/baanwebsite/customer/thebestpropertygroup/album"; $server_web = "http://localhost/baanwebsite/customer/thebestpropertygroup"; } else { $ServerName = "localhost"; $User = "thebestprx_db"; $Password = "wfJv6eEf"; $dbname = "thebestprx_db"; $server_name = "http://www.thebestpropertygroup.com/admin"; $server_file = "http://www.thebestpropertygroup.com/album"; $server_web = "http://www.thebestpropertygroup.com"; } $productfolder = "product"; $albumfolder="album"; $smallfolder = "small"; $largefolder = "large"; $downloadfolder="download"; $cn = mysql_pconnect( $ServerName, $User, $Password ); mysql_select_db($dbname, $cn); mysql_query("SET NAMES UTF8"); if(!$cn) { echo "<h3>ERROR : ไม่สามารถติดต่อฐานข้อมูลได้</h3>"; exit(); } define("DB_RDBMS", "mysql"); define("DB_HOST", $ServerName); define("DB_NAME", $dbname); define("DB_USER", $User ); define("DB_PASS", $Password); $paths = array( './', '../', '../../' , ); set_include_path( PATH_SEPARATOR . implode(PATH_SEPARATOR, $paths)); function __autoload($class) { // require LIBS . $class .".php"; global $paths ; $filename = "admin/class/".strtolower($class).'.php'; //echo "<br/>"; if (is_readable($paths[0]. $filename) || is_readable($paths[1]. $filename)|| is_readable($paths[2]. $filename)) { require $filename; } } $config= new config; ?>