session_start();
function FFileRead($file)
{
$fp = fopen ($file, "r");
$buffer = fread($fp, filesize($file));
fclose ($fp);
return $buffer;
}
function FFileWrite($file,$what)
{
$fh=fopen($file,"a+");
fwrite($fh,$what);
fclose($fh);
}
if(!isset($_REQUEST['action'])) $action = "index";
else $action = $_REQUEST['action'];
switch($action)
{
//index
case "index":
$content = $main = FFileRead("home.html");
break;
case "about":
$content = $main = FFileRead("about.html");
break;
case "topics":
$content = $main = FFileRead("topics.html");
break;
case "committees":
$content = $main = FFileRead("committees.html");
break;
case "program":
$content = $main = FFileRead("program.html");
break;
case "submission":
$content = $main = FFileRead("submission.html");
break;
case "fees":
$content = $main = FFileRead("fees.html");
break;
case "papers_m":
$content = $main = FFileRead("papers_m.html");
break;
case "papers_f":
$content = $main = FFileRead("papers_f.html");
break;
case "tehnical":
$content = $main = FFileRead("tehnical.html");
break;
case "satellite":
$content = $main = FFileRead("satellite.html");
break;
case "plenary":
$content = $main = FFileRead("Plenary Lectures.htm");
break;
case "venue":
$content = $main = FFileRead("venue.html");
break;
case "accomodation":
$content = $main = FFileRead("accomodation.html");
break;
case "local":
$content = $main = FFileRead("local.html");
break;
case "sponsors":
$content = $main = FFileRead("sponsors.html");
break;
case "ts":
$content = $main = FFileRead("ts.html");
break;
case "contact":
$content = $main = FFileRead("contact.html");
break;
case "student":
$content = $main = FFileRead("student.html");
break;
}
$main = FFileRead("main.html");
$main = str_replace("{content}",$content,$main);
$main = str_replace("{page}",$pagina,$main);
$main = str_replace("{news}",$news,$main);
$main = str_replace("{counter}",$counter,$main);
/*
$query = mysql_query("SELECT * FROM `meniu_linkuri` ORDER BY `ord` ASC");
$meniu = "
";
while($row=mysql_fetch_array($query)){
$meniu .= "".$row['id']." | ";
$query2 = mysql_query("SELECT * FROM `meniu_sublinkuri` WHERE `pid`='".$row['id']."' ORDER BY `ord` ASC");
if(mysql_num_rows("$query2")!=0) $meniu .= "";
while($row2=mysql_fetch_array($query)){
$meniu .= "".$row2['id']." | ";
}
if(mysql_num_rows($query)!=0) $meniu .= " | ";
$meniu .= "
";
}
$meniu .= "
";
$main = str_replace("{meniu_dinamic}",$meniu,$main);*/
echo $main;
//mysql_close();
?>