e implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Website Baker; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Start a session
if(!defined('SESSION_STARTED')) {
session_name('wb_session_id');
session_start();
define('SESSION_STARTED', true);
}
// Function to highlight input fields which contain wrong/missing data
function field_error($field_name='') {
if(!defined('SESSION_STARTED') || $field_name == '') return;
if(isset($_SESSION['ERROR_FIELD']) && $_SESSION['ERROR_FIELD'] == $field_name) {
return ' class="wrong"';
}
}
// Check if the page has been reloaded
if(!isset($_GET['sessions_checked']) OR $_GET['sessions_checked'] != 'true') {
// Set session variable
$_SESSION['session_support'] = 'Enabled';
// Reload page
header('Location: index.php?sessions_checked=true');
exit(0);
} else {
// Check if session variable has been saved after reload
if(isset($_SESSION['session_support'])) {
$session_support = $_SESSION['session_support'];
} else {
$session_support = 'Disabled';
}
}
// Check if AddDefaultCharset is set
$e_adc=false;
$sapi=php_sapi_name();
if(strpos($sapi, 'apache')!==FALSE || strpos($sapi, 'nsapi')!==FALSE) {
flush();
$apache_rheaders=apache_response_headers();
foreach($apache_rheaders AS $h) {
if(strpos($h, 'html; charset')!==FALSE) {
preg_match('/charset\s*=\s*([a-zA-Z0-9- _]+)/', $h, $match);
$apache_charset=$match[1];
$e_adc=$apache_charset;
}
}
}
?>
Website Baker Installation Wizard