jablonka.czprosek.czf

is

Subversion Repositories:
[/] [trunk/] [html/] [del_majetek.php] - Blame information for rev 8

 

Line No. Rev Author Line
12simandl<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
5<style type="text/css" media="screen"> @import "style.css"; </style>
6<title>Smazani majetku</title>
7</head>
8<link rel="stylesheet" type="text/css" href="style.css">
9</head>
10<body topmargin=0 leftmargin=10>
11<?
12include("header.htm");
13require('grab_globals.lib.php');
14include ("fce.php");
15$spojeni = MySQL_Connect($db_host, $db_user, $db_pass);
16MySQL_Select_DB($db_name);
17if(!@$action)
18{
19$dotaz=MySQL_Query("SELECT * FROM majetek WHERE id='$id' ");
20$dotaz=MySQL_Fetch_Array($dotaz);
21echo '
22<b>Opravdu chcete smazat majetek?</b><br>
23<br>
24<form action="del_majetek.php?action=del" method=POST>
25<table>
26 <tr>
27 <td class=text>Člen:</td><td><b>'.id_to_name($dotaz["clen"]).'</b></td>
28 </tr>
29 <tr>
30 <td class=text>Adresa:</td><td><b>'.id_to_adresa($dotaz["adresa"]).'</b></td>
31 </tr>
32 <tr>
33 <td class=text>zařízení:</td><td><input class=field name="mesto" type="text" value="'.$dotaz["zarizeni"].'" size=25></td>
34 </tr>
35 <tr>
36 <td class=text>finance:</td><td><input class=field name="ulice" type="text" value="'.$dotaz["finance"].'" size=25></td>
37 </tr>
38 <tr>
39 <td class=text>spotřeba:</td><td><input class=field name="cp" type="text" value="'.$dotaz["spotreba"].'" size=25></td>
40 </tr>
41 <tr>
42 <td class=text>součást:</td><td><input class=field name="cp" type="text" value="'.$dotaz["soucast"].'" size=25></td>
43 </tr>
44 <tr>
45 <td class=text>sériové číslo:</td><td><input class=field name="cp" type="text" value="'.$dotaz["scislo"].'" size=25></td>
46 </tr>
47 <tr>
48 <td class=text>MAC:</td><td><input class=field name="cp" type="text" value="'.$dotaz["mac"].'" size=25></td>
49 </tr>
50 <tr><td class=text></td><td><textarea class=fieldthin name="komentar" rows=10 cols=45>'.$dotaz["komentar"].'</textarea></td></
51tr>
52 
53</table>
54 
55<br>
56<input class=field type="submit" name="OK" value="&nbsp;Smazat&nbsp;">
57<input name="id" type="hidden" value="'.$id.'">
58<input name="clen" type="hidden" value="'.$dotaz["clen"].'">
59</form>
60';
61}
62else
63{
64$result = MySQL_Query("DELETE FROM majetek WHERE id='$id'");
65 
66if (!$result) {
67echo "<br><b>Výsledek : ".mysql_error()."</b>";
68} else {
69echo "<br><b>Majetek uživatele ".id_to_name($clen)." byl úspěšně smazán!</b>";
70}
71 
72echo '
73<br>
74<br>
75<img src=images/arrow.jpg>&nbsp;<a href="javascript:history.go(-2)" class=odkaz>zpět</a>
76<img src=images/arrow.jpg>&nbsp;<a href="majetek.php" class=odkaz>zpět na majetek</a>
77';
78}
79 
80MySQL_Close($spojeni);
81?>
82</body>
83</html>

Powered by WebSVN 2.2.1