login if(empty($_SESSION['suser_id'])) { header("Location: login.php"); exit; } // includes include("config.php"); include("dbconnect.php"); include("functions.php"); include("yapter.php"); // include language file include('lang/' . $_SESSION['suser_lang'] . '.php'); // set template $tp = new Template("tpl/header.tpl"); // set language variables $tp->setvars($lang); // fill search box if (isset($_POST['search'])) { $search = $_POST['search']; $_SESSION['search'] = $search; } else { if(isset($_SESSION['search'])) { $search = $_SESSION['search']; } else { $search = ''; } } // give these to the templates too $tp->set("suser_displayname", $_SESSION['suser_displayname']); $tp->set("search", $search); // output $tp->parse(); $tp->spit(); ?>