<?php
if (!file_exists("po-library/po-config.php")){
	$now = gmdate('D, d M Y H:i:s') . ' GMT';
	header("Expires: $now");
	header("Last-Modified: $now");
	header("Cache-Control: no-cache, must-revalidate");
	header("Pragma: no-cache");
	echo "Maaf, PopojiCMS anda <b>belum terinstall</b>\n";
	if (file_exists("po-install/index.php")){
		echo "Mohon tunggu kami akan mendirect ke halaman installasi<br />\n";
		echo "<script language=\"Javascript\">location.href = 'po-install/index.php';</script>\n";
	}
	exit;
}else{
	include_once 'po-library/po-database.php';
	$table = new PoTable('setting');
	$current = $table->findBy(id_setting, '1');
	$current = $current->current();
	$url = $current->website_url;
	header("location:$url");
}
?>