Go to the documentation of this file.00001 <?php
00002 if(!defined('__PRAGYAN_CMS'))
00003 {
00004 header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden');
00005 echo "<h1>403 Forbidden<h1><h4>You are not authorized to access the page.</h4>";
00006 echo '<hr/>'.$_SERVER['SERVER_SIGNATURE'];
00007 exit(1);
00008 }
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 $configFileText = <<<CONFIGFILETEXT
00019 <?php
00027
00028
00029 define("MYSQL_SERVER","$MYSQL_SERVER");
00030
00031
00032 define("MYSQL_USERNAME","$MYSQL_USERNAME");
00033
00034
00035 define("MYSQL_PASSWORD","$MYSQL_PASSWORD");
00036
00037
00038 define("MYSQL_DATABASE","$MYSQL_DATABASE");
00039
00040
00041
00042 define("MYSQL_DATABASE_PREFIX","$MYSQL_DATABASE_PREFIX");
00043
00044
00045 define("ADMIN_USERID",1);
00046
00047
00057 \$error_level = $error_level;
00058 switch(\$error_level) {
00059 case 0 : \$error_text = 0; break;
00060 case 1 : \$error_text = E_ERROR | E_WARNING | E_PARSE; break;
00061 case 2 : \$error_text = E_ERROR | E_WARNING | E_PARSE | E_NOTICE; break;
00062 case 3 : \$error_text = E_ALL ^ E_NOTICE;break;
00063 case 4 : \$error_text = E_ALL; break;
00064 case 5 : \$error_text = E_ALL; \$debugSet='on'; break;
00065 }
00066 ini_set('error_reporting', \$error_text);
00067 ini_set('display_errors', 0);
00068
00069
00070 define("LANGUAGE","en");
00071
00072
00073
00074 define("MAILPATH","./cms/languages");
00075
00076
00077
00078
00079
00080
00081 \$authmethods['imap']['status']=$AUTH_IMAP_STATUS;
00082 \$authmethods['imap']['server_address']="$AUTH_IMAP_SERVER";
00083 \$authmethods['imap']['port']="$AUTH_IMAP_PORT";
00084 \$authmethods['imap']['user_domain']="$AUTH_IMAP_DOMAIN";
00085
00086 \$authmethods['ldap']['status']=$AUTH_LDAP_STATUS;
00087 \$authmethods['ldap']['server_address']="$AUTH_LDAP_SERVER";
00088 \$authmethods['ldap']['search_group']="$AUTH_LDAP_SEARCHGROUP";
00089 \$authmethods['ldap']['user_domain']="$AUTH_LDAP_DOMAIN";
00090
00091 \$authmethods['ads']['status']=$AUTH_ADS_STATUS;
00092 \$authmethods['ads']['server_address']="$AUTH_ADS_SERVER";
00093 \$authmethods['ads']['network_name']="$AUTH_ADS_NETWORK";
00094 \$authmethods['ads']['user_domain']="$AUTH_ADS_DOMAIN";
00095
00096
00097 if(!defined('CMS_SETUP')) {
00098
00099 ini_set("use_cookies",1);
00100 ini_set("use_only_cookies",1);
00101
00102
00103 \$cookie_path = "/";
00104
00105
00106 \$cookie_timeout = $cookie_timeout;
00107
00108
00109
00110
00111
00112
00113 \$garbage_timeout = \$cookie_timeout + 300;
00114
00115
00116 ini_set('session.name',"PHPSESSID");
00117 session_set_cookie_params(\$cookie_timeout, \$cookie_path);
00118
00119
00120
00121 ini_set('session.gc_maxlifetime', \$garbage_timeout);
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 \$sessdir = \$sourceFolder."/".\$uploadFolder."/sessions";
00134 if (!is_dir(\$sessdir)) { mkdir(\$sessdir, 0777); }
00135 ini_set('session.save_path', \$sessdir);
00136
00137 }
00138 ?>
00139 CONFIGFILETEXT;
00140
00141 $searchConfigFileText =<<<SEARCHCONFIGFILETEXT
00142 <?php
00143 \$database="$MYSQL_DATABASE";
00144 \$mysql_user = "$MYSQL_USERNAME";
00145 \$mysql_password = "$MYSQL_PASSWORD";
00146 \$mysql_host = "$MYSQL_SERVER";
00147 \$mysql_table_prefix = "";
00148
00149
00150
00151 \$success = mysql_pconnect (\$mysql_host, \$mysql_user, \$mysql_password);
00152 if (!\$success)
00153 die ("<b>Cannot connect to database, check if username, password and host are correct.</b>");
00154 \$success = mysql_select_db (\$database);
00155 if (!\$success) {
00156 print "<b>Cannot choose database, check if database name is correct.";
00157 die();
00158 }
00159 ?>
00160 SEARCHCONFIGFILETEXT;
00161
00162 ?>