You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
911 B
44 lines
911 B
<?php
|
|
session_start();
|
|
|
|
// check for user_id, if unnkown -> 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();
|
|
?>
|