jablonka.czprosek.czf

is

Subversion Repositories:
[/] [trunk/] [html/] [del_majetek.php] - Rev 5 Go to most recent revision

Compare with Previous - Blame - Download


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<style type="text/css" media="screen"> @import "style.css"; </style>
<title>Smazani majetku</title>
</head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body topmargin=0 leftmargin=10>
<?
include("header.htm");
require('grab_globals.lib.php');
include ("fce.php");
$spojeni = MySQL_Connect($db_host, $db_user, $db_pass);
MySQL_Select_DB($db_name);
if(!@$action)
{
$dotaz=MySQL_Query("SELECT * FROM majetek WHERE id='$id' ");
$dotaz=MySQL_Fetch_Array($dotaz);
echo '
<b>Opravdu chcete smazat majetek?</b><br>
<br>
<form action="del_majetek.php?action=del" method=POST>
<table>
  <tr>
     <td class=text>Člen:</td><td><b>'.id_to_name($dotaz["clen"]).'</b></td>
  </tr>
  <tr>
     <td class=text>Adresa:</td><td><b>'.id_to_adresa($dotaz["adresa"]).'</b></td>
  </tr>
  <tr>
     <td class=text>zařízení:</td><td><input class=field name="mesto" type="text" value="'.$dotaz["zarizeni"].'" size=25></td>
  </tr>
  <tr>
     <td class=text>finance:</td><td><input class=field name="ulice" type="text" value="'.$dotaz["finance"].'" size=25></td>
  </tr>
  <tr>
     <td class=text>spotřeba:</td><td><input class=field name="cp" type="text" value="'.$dotaz["spotreba"].'" size=25></td>
  </tr>
  <tr>
     <td class=text>součást:</td><td><input class=field name="cp" type="text" value="'.$dotaz["soucast"].'" size=25></td>
  </tr>
  <tr>
     <td class=text>sériové číslo:</td><td><input class=field name="cp" type="text" value="'.$dotaz["scislo"].'" size=25></td>
  </tr>
  <tr>
     <td class=text>MAC:</td><td><input class=field name="cp" type="text" value="'.$dotaz["mac"].'" size=25></td>
  </tr>
  <tr><td class=text></td><td><textarea class=fieldthin name="komentar" rows=10 cols=45>'.$dotaz["komentar"].'</textarea></td></
tr>

</table>

<br>
<input class=field type="submit" name="OK" value="&nbsp;Smazat&nbsp;">
<input name="id" type="hidden" value="'.$id.'">
<input name="clen" type="hidden" value="'.$dotaz["clen"].'">
</form>
';
}
else
{
$result = MySQL_Query("DELETE FROM majetek WHERE id='$id'");

if (!$result) {
echo "<br><b>Výsledek : ".mysql_error()."</b>";
} else {
echo "<br><b>Majetek uživatele ".id_to_name($clen)." byl úspěšně smazán!</b>";
}

echo '
<br>
<br>
<img src=images/arrow.jpg>&nbsp;<a href="javascript:history.go(-2)" class=odkaz>zpět</a>
<img src=images/arrow.jpg>&nbsp;<a href="majetek.php" class=odkaz>zpět na majetek</a>
';
}

MySQL_Close($spojeni);
?>
</body>
</html>

Powered by WebSVN 2.2.1