<?

include "header.php";

if(isset($_GET['tip_id'])) { $tip_id = $_GET['tip_id']; } else { exit(); }

if($tip_id == 0) {
 if(isset($_GET['title']) & isset($_GET['text'])) { $title = $_GET['title']; $text = $_GET['text']; } else { exit(); }
$var_title = "tip".$title;
$var_text = "tip".$text;
$tip_info[title] = ${"$var_title"};
$tip_info[tip] = ${"$var_text"};
} else {
$tip_info = mysql_fetch_assoc(mysql_query("SELECT * FROM bhost_tips WHERE tip_id='$tip_id'"));
}

echo "
<html>
<head>
<title>$tip1</title>
<style type='text/css'>

body {
margin: 10px;
font-size: 8pt; 
font-family: verdana, arial, tahoma; 
color: #333333;
line-height: 17px;
}

input.sbutton { 
background-color: #DDDDDD; 
font-size: 8pt; 
font-weight: bold; 
font-family: verdana, arial, tahoma; 
}

h2 { 
font-family: \"Trebuchet MS\", verdana, arial, tahoma; 
margin-bottom: 4px; 
font-size: 12pt; 
}

</style>
</head>
<body onload='window.focus()'>
<h2>$tip_info[title]</h2>
$tip_info[tip]

<br><br>
<input type='button' class='sbutton' value='$tip2' onClick='window.close()'>
</body>
</html>
";

?>