Allora questa é una pagina inclusa
Codice PHP:
<?php require_once('../connessione/connessione.php'); ?>
<?php
if(isset($_GET['submit'])) {
$callsign = $_GET['call_callsign'];
$calldate = $_GET['call_date'];
$stime = $_GET['call_sTime'];
$band = $_GET['call_band'];
$mode = $_GET['call_mode'];
$power = $_GET['call_power'];
$reportout = $_GET['call_reportOut'];
$reportin = $_GET['call_reportIn'];
$remarks = $_GET['call_remarks'];
$user = $_GET['call_user'];
$qslin = $_GET['call_qslIn'];
$qslout = $_GET['call_qslOut'];
$contest = $_GET['call_contest'];
mysql_select_db($database_name, $conn);
$sql_update = "UPDATE tb_contact SET call_callsign = '$callsign', call_date = '$calldate', call_sTime = '$stime', call_band = '$band', call_mode = '$mode', call_power = '$power', call_reportOut = '$reportout', call_reportIn = '$reportin' , call_remarks = '$remarks', call_user = '$user', call_qslIn = '$qslin', call_qslOut = '$qslout', call_contest = '$contest' WHERE tb_contact.call_id = '".$_GET['call_id']."'";
$query_update = mysql_query($sql_update) or die (mysql_error());
// header("Refresh:0; URL=admin_center.php?link=updateCall&call_id=". $_GET['call_id']."");
}
mysql_select_db($database_name, $conn);
$sql = "SELECT * FROM tb_contact WHERE call_id = '".$_GET['call_id']."'";
$query = mysql_query($sql) or die (mysql_error());
$result = mysql_fetch_assoc($query);
?>
<div align="center">
<table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="get" action="">
<table width="420" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="210" height="30" bgcolor="#916600" class="TestoContenuto">Callsign:</td>
<td width="210" height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_callsign" type="text" id="call_callsign" value="<?php echo $result['call_callsign'];?>" />
<input type="hidden" name="call_id" id="hiddenField2" value="<?php echo $result['call_id'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Date:</td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_date" type="text" id="call_date" value="<?php echo $result['call_date'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Start Time: </td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_sTime" type="text" id="call_sTime" value="<?php echo $result['call_sTime'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Band:</td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_band" type="text" id="call_band" value="<?php echo $result['call_band'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Mode:</td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_mode" type="text" id="call_mode" value="<?php echo $result['call_mode'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Power:</td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_power" type="text" id="call_power" value="<?php echo $result['call_power'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Rpt Out: </td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_reportOut" type="text" id="call_reportOut" value="<?php echo $result['call_reportOut'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Rpt In:</td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_reportIn" type="text" id="call_reportIn" value="<?php echo $result['call_reportIn'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Remarks:</td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_remarks" type="text" id="call_remarks" value="<?php echo $result['call_remarks'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">User:</td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_user" type="text" id="call_user" value="<?php echo $result['call_user'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Qsl In: </td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_qslIn" type="text" id="call_qslIn" value="<?php echo $result['call_qslIn'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Qsl Out: </td>
<td height="30" bgcolor="#916600" class="TestoContenuto">
<input name="call_qslOut" type="text" id="call_qslOut" value="<?php echo $result['call_qslOut'];?>" /></td>
</tr>
<tr>
<td height="30" bgcolor="#916600" class="TestoContenuto">Contest:</td>
<td height="30" bgcolor="#916600" class="TestoContenuto"><input name="call_contest" type="text" id="call_contest" value="<?php echo $result['call_contest'];?>" />
<input type="hidden" name="link" id="hiddenField" value="updateCall" /></td>
</tr>
<tr>
<td colspan="2" bgcolor="#916600" class="TestoContenuto"><div align="center">
<input type="submit" name="submit" id="submit" value="Aggiorna" />
</div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#916600" class="TestoContenuto"><div align="center">[url="javascript:history.back()"]Back[/url]</div></td>
</tr>
</table>
</form> </td>
</tr>
</table>
<?php
mysql_free_result($query);
?>
</div>
e questa e la pagina che include lo script sopra
Codice PHP:
<?php include"inc/auth.inc.php";?>
<?php include"inc/logout.inc.php";?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Welcome to hb9fax.ch - Admin Site</title>
</style>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="978" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#999A01">
<tr>
<td width="150">[img]../image/hb9faxp.jpg[/img]</td>
<td width="828" bgcolor="#999A01"><div align="center">[img]../image/logo.jpg[/img]</div></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td valign="top"></td>
<td></td>
</tr>
<tr>
<td valign="top"><?php include"inc/menu.inc.des.php";?></td>
<td valign="top"><table width="828" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14">[img]../image/mbordosinistra.jpg[/img]</td>
<td width="800" bgcolor="#916600"><div align="center" class="TitoloMenu">Pannello di controllo HB9FAX </div></td>
<td width="14">[img]../image/mbordodestra.jpg[/img]</td>
</tr>
<tr>
<td colspan="3" bgcolor="#9A6600"><table width="826" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="14" bgcolor="#999A01"></td>
<td width="650" bgcolor="#999A01"><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td>
<?php
if (isset($_GET['link']) && $_GET['link']!= "" ){
if(file_exists("inc/" . $_GET['link'].".inc.php") && !is_dir("inc/" . $_GET['link'].".inc.php")) {
include ("inc/" . $_GET['link'].".inc.php");
} else {
echo "pagina non trovata";
}
} else {
echo "<span class=\"TestoContenuto\">Grazie per avere usato il pannello di controllo, tra poco sarai reindirizzato alla pagina di login!!</span>";
}
?> </td>
</tr>
<tr>
<td></td>
</tr>
</table></td>
<td width="14" bgcolor="#999A01"></td>
</tr>
<tr>
<td height="14" colspan="3" bgcolor="#976600">[img]image/1px.gif[/img]</td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>
praticamente lavoro su una pagina solo e tramite get carico le pagine.