- Codice: Seleziona tutto
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\AppServ\www\tt2\tt2\header.php:7) in C:\AppServ\www\tt2\tt2\del_ut2.php on line 17
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\tt2\tt2\header.php:7) in C:\AppServ\www\tt2\tt2\del_ut2.php on line 17
header.php
- Codice: Seleziona tutto
<?php
$utente = $_COOKIE ['user'];
if (!isset ($utente)) die ("Non sei autorizzato ad accedere alla pagina!!");
?>
<html>
<head>
<title><?php echo ($pagename); ?></title>
<link rel="stylesheet" href="css/stili.css" type="text/css">
</head>
<body leftmargin=10>
<TABLE cellSpacing=0 cellPadding=10 width="100%" height=100% align=center border=0 class=bodyline>
<TBODY>
<TR height=5%>
<TD class=row1>
<?
echo "<span class=gensmall>utente corrente ".$utente."</span><hr>";
?>
</TD>
<TD class=row1><CENTER><H4><B>Trouble Tickets</B></H4></CENTER>
</TD>
</TR>
- Codice: Seleziona tutto
<?php
$pagename = "Cancella Utente";
require_once ("header.php");
?>
<TR>
<TD width="20%" class=row1 valign=top>
<?
require_once ("menu.php");
?>
</TD>
<TD width="80%" valign=top>
<TABLE border=0 cellpadding=0 cellspacing=2 width=100% class=bodyline height=100%>
<TR>
<TD valign=top>
<?
session_start();
$link = mysql_connect ("localhost", "root", "coniglio") or die ("connessione non riuscita");
mysql_select_db ("trouble_ticket") or die ("Selezione del DB non riuscita: " . mysql_error());
$sql = "DELETE FROM utenti WHERE id=".$_SESSION["id"];
$sql2 = "DELETE FROM tt WHERE id_utente=".$_SESSION["id"];
mysql_query ($sql,$link);
mysql_query ($sql2,$link);
mysql_close ($link);
echo("<BR><BR><center><span class=gensmall>Cancellazione avvenuta con successo.</span></center>");
session_destroy();
?>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<tr height=5%>
<td colspan=2 class=row1 align=middle> </td>
</TR>
</TBODY>
</TABLE>
</BODY>
</HTML>
- Codice: Seleziona tutto
<?php
$pagename = "Cancella Utente";
require_once ("header.php");
?>
<TR>
<TD width="20%" class=row1 valign=top>
<?
require_once ("menu.php");
?>
</TD>
<TD width="80%" valign=top>
<TABLE border=0 cellpadding=0 cellspacing=2 width=100% class=bodyline height=100%>
<TR>
<TD valign=top>
<script language="JavaScript">
<!--
if (!confirm("Vuoi veramente cancellare l'utente?"))
{
history.back();
}
else
{
location.href="del_ut2.php";
}
//-->
</script>
<?
session_start();
$_SESSION["id"]=$_GET["id"];
?>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<tr height=5%>
<td colspan=2 class=row1 align=middle> </td>
</TR>
</TBODY>
</TABLE>
</BODY>
</HTML>
<!-- <p><b>cancella.php</b></p>
<p>Questa pagina deve avere le seguenti funzionalità:<br>
1 - sicurezza verificare che la pagina non venga acceduta direttamente<br>
2 - cancella il contenuto selezionato, prima viene richiesta la conferma<br>
</p>
-->