//connect to database
include('db/config.php');
//creat newsitems array
$newsitems = create_newsitems_array();
//safe new/edited item
if($_GET['mode'] != '' && $_SESSION['user'] == 'admin')
{include('functions/safe.php');}
//echo page elements
echo <<