# # set program start time # if ( !defined("my_const_PROGRAM_RUN_TIME_START") ) define("my_const_PROGRAM_RUN_TIME_START", time()); # # select server # switch ( $_SERVER["HTTP_HOST"] ) { default: if ( !defined("my_const_BASE_URL") ) define("my_const_BASE_URL", "http://web.uipduna.hu/dynuip/"); if ( !defined("my_const_DATABASE_USER") ) define("my_const_DATABASE_USER", "uipduna_h_529f78"); if ( !defined("my_const_DATABASE_PASSWORD") ) define("my_const_DATABASE_PASSWORD", "9OdDhqpWPpob"); if ( !defined("my_const_DATABASE_NAME") ) define("my_const_DATABASE_NAME", "uipduna_hu_023d"); if ( !defined("my_const_ERROR_REPORTING_LEVEL") ) define("my_const_ERROR_REPORTING_LEVEL", E_ALL & ~E_USER_NOTICE); if ( !defined("my_const_ERROR_LOG_FILE_DELETE") ) define("my_const_ERROR_LOG_FILE_DELETE", false); if ( !defined("my_const_SHOW_ERROR_LOG_FILE") ) define("my_const_SHOW_ERROR_LOG_FILE", false); if ( !defined("my_const_BASE_DIR") ) define("my_const_BASE_DIR", "/var/www/vw/uipduna.hu/html/dynuip/"); if ( !defined("my_const_IMAGE_DIR") ) define("my_const_IMAGE_DIR",my_const_BASE_DIR."images/"); if ( !defined("my_const_URL_IMAGE_DIR") ) define("my_const_URL_IMAGE_DIR" , "images/" ); if ( !defined("my_const_GAME_DIR") ) define("my_const_GAME_DIR",my_const_BASE_DIR."games/"); if ( !defined("my_const_URL_GAME_DIR") ) define("my_const_URL_GAME_DIR" , "games/" ); if ( !defined("my_const_GAL_DIR") ) define("my_const_GAL_DIR",my_const_BASE_DIR."gallery/"); if ( !defined("my_const_URL_GAL_DIR") ) define("my_const_URL_GAL_DIR" , "gallery/" ); break; } # # set directory constants # if ( !defined("my_const_MODULE_DIR") ) define("my_const_MODULE_DIR", my_const_BASE_DIR."module/"); if ( !defined("my_const_HTML_DIR") ) define("my_const_HTML_DIR", my_const_BASE_DIR."html/"); if ( !defined("my_const_CSS_DIR") ) define("my_const_CSS_DIR", my_const_BASE_URL."css/"); if ( !defined("my_const_IMG_DIR") ) define("my_const_IMG_DIR", my_const_BASE_URL."img/"); if ( !defined("my_const_JAVASCRIPT_DIR") ) define("my_const_JAVASCRIPT_DIR", my_const_BASE_URL."js/"); if ( !defined("my_const_SCRIPT_DIR") ) define("my_const_SCRIPT_DIR", my_const_BASE_DIR."script/"); if ( !defined("my_const_JS_SOURCE_DIR") ) define("my_const_JS_SOURCE_DIR", my_const_MODULE_DIR."javascripts/js/"); if ( !defined("my_const_IMG_UPLOAD_DIR") ) define("my_const_IMG_UPLOAD_DIR", my_const_BASE_DIR."img/upload/"); if ( !defined("my_const_DOC_UPLOAD_DIR") ) define("my_const_DOC_UPLOAD_DIR", my_const_BASE_DIR."img/docs/"); if ( !defined("my_const_DOC_UPLOAD_URL") ) define("my_const_DOC_UPLOAD_URL", my_const_BASE_URL."img/docs/"); # # set error handling constants # if ( !defined("my_const_ERROR_LOG_FILE_NAME") ) define("my_const_ERROR_LOG_FILE_NAME", my_const_BASE_DIR."debug.nfo"); if ( !defined("my_const_ERROR_REPORTING_FUNCTIONS") ) define("my_const_ERROR_REPORTING_FUNCTIONS", "#DAT-DCT#DAT-DQY#DAT-DFA#DAT-DES#DAT+DQY#"); # # set database constants # if ( !defined("my_const_DATABASE_TYPE") ) define("my_const_DATABASE_TYPE", "MYSQL"); if ( !defined("my_const_DATABASE_HOST") ) define("my_const_DATABASE_HOST", "localhost"); # # set authentication constants # if ( !defined("my_const_AUTHENTICATION_FUNCTION") ) define("my_const_AUTHENTICATION_FUNCTION", false); if ( !defined("my_const_AUTHENTICATION_EXPIRATION_TIME") ) define("my_const_AUTHENTICATION_EXPIRATION_TIME", 86400); # # set other constants # if ( !defined("my_const_TITLE") ) define("my_const_TITLE", "UIP Dunafilm"); if ( !defined("my_const_SYS_DATE") ) define("my_const_SYS_DATE", date("Y.m.d H:i:s", time())); if ( !defined("my_const_DATA_PER_PAGE") ) define("my_const_DATA_PER_PAGE", 30); if ( !defined("my_const_NEWS_MAIN") ) define("my_const_NEWS_MAIN", 5); # # set and use the user modules # $MODULE_NAME = split(",", "error,database,designer,functions,my_funcs,javascripts"); $INCLUDE_MODULE["error"] = my_const_MODULE_DIR."error/error_v2_2.inc.html"; $INCLUDE_MODULE["database"] = my_const_MODULE_DIR."database/database_v2_6.inc.html"; $INCLUDE_MODULE["designer"] = my_const_MODULE_DIR."designer/designer_v2_4.inc.html"; $INCLUDE_MODULE["functions"] = my_const_MODULE_DIR."functions/functions_v3_3.inc.html"; $INCLUDE_MODULE["my_funcs"] = my_const_MODULE_DIR."my_funcs/my_funcs.inc.html"; $INCLUDE_MODULE["authentication"] = my_const_MODULE_DIR."authentication/authentication.inc.html"; $INCLUDE_MODULE["javascripts"] = my_const_MODULE_DIR."javascripts/javascripts_v2_1.inc.html"; function IncludeModule() { global $MODULE_NAME; global $INCLUDE_MODULE; global $INCLUDE_MODULE_ERROR_TEXT; $i = 0; while ( isset($MODULE_NAME[$i]) ) { if ( !@include_once($INCLUDE_MODULE[$MODULE_NAME[$i]]) ) { $INCLUDE_MODULE_ERROR_TEXT = "
"; return false; } $i++; } return true; } if ( !IncludeModule() ) { echo $INCLUDE_MODULE_ERROR_TEXT; exit; } # # database connect # $DB = new database(my_const_DATABASE_TYPE); $DBCONN = $DB->DatabaseConnect(my_const_DATABASE_HOST, my_const_DATABASE_USER, my_const_DATABASE_PASSWORD, my_const_DATABASE_NAME); if ( !$DBCONN ) ExitProgram("Nem sikerült kapcsolódni az adatbázishoz. Próbálja meg később!"); # # session_register() # session_start(); # # set session with input value # # # set session with default value # # # authentication # /* if ( my_const_AUTHENTICATION_FUNCTION ) { $user_right = authentication(my_const_AUTHENTICATION_EXPIRATION_TIME); } */ # # set other variables # if ( !isset($_REQUEST["page"]) ) $_REQUEST["page"] = "list"; if ( !isset($_REQUEST["action"]) ) $_REQUEST["action"] = ""; function put_redstar() { return "*"; } include_once("uip_funcs.inc.php"); ?>