session_start();
function logout()
{
require('mysql.inc.php');
$d_cos="DELETE FROM cos WHERE username=\"$_SESSION[username]\"";
mysql_query($d_cos) or die($d_cos.'
'.mysql_error().'
'.__FILE__.':'.__LINE__);
unset($_SESSION[username], $_SESSION[nume]);
//session_unset();
//session_destroy();
//session_start();
//session_regenerate_id();
mysql_close();
}
if($_GET[user]=="logout")
{
logout();
}
require("pagini.inc.php");
$homepage = new Page();
$homepage -> Display();
if($_GET[add])
{
$homepage -> add_cart($_GET[cod_produs]);
}
if($_POST[cauta])
{
$homepage -> results();
}
if($_GET[action]=="arhiva_stiri")
{
$homepage -> arhiva_stiri();
}
if(!$_GET[cod_produs] and !$_POST[cauta])
{
$harta='';
echo $harta;
echo '