jablonka.czprosek.czf

is

Subversion Repositories:
[/] [trunk/] [html/] [del_platba.php] - Blame information for rev 2

 

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>db.jablonka.cz Smazani platby</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 finance WHERE id='$id' ");
20$dotaz=MySQL_Fetch_Array($dotaz);
21echo '
22<b>Opravdu chcete smazat platbu?</b><br>
23<br>
24<form action="del_platba.php?action=del" method=POST>
25<table>
26 <tr>
27 <td class=text>Uživatel:</td><td><b>'.id_to_name($dotaz["clen"]).'</b></td>
28 </tr>
29 <tr>
30 <td class=text>Platba:</td><td class=text>'.id_to_platba($dotaz["platba"]).'</td>
31 </tr>
32 <tr>
33 <td class=text>Hodnota:</td><td class=text>'.$dotaz["hodnota"].'</td>
34 </tr>
35 <tr>
36 <td class=text>Datum:</td><td class=text>'.sql2datum($dotaz["datum"]).'</td>
37 </tr>
38 <tr><td class=text>Komentář:</td><td><textarea class=fieldthin name="komentar" rows=3 cols=25>'.$dotaz["komentar"].'</textarea></td></
39tr>
40 
41</table>
42 
43<br>
44<input class=field type="submit" name="OK" value="&nbsp;Smazat&nbsp;">
45<input name="id" type="hidden" value="'.$id.'">
46<input name="clen" type="hidden" value="'.$dotaz["clen"].'">
47</form>
48';
49}
50else
51{
52$result = MySQL_Query("DELETE FROM finance WHERE id='$id'");
53 
54if (!$result) {
55echo "<br><b>Výsledek : ".mysql_error()."</b>";
56} else {
57echo "<br><b>Platba uživatele ".id_to_name($clen)." byla úspěšně smazána!</b>";
58}
59 
60echo '
61<br>
62<img src=images/arrow.jpg>&nbsp;<a href="javascript:history.go(-2)" class=odkaz>zpět</a>
63<img src=images/arrow.jpg>&nbsp;<a href="prispevky.php" class=odkaz>zpět na příspěvky</a>
64';
65}
66 
67MySQL_Close($spojeni);
68?>
69</body>
70</html>

Powered by WebSVN 2.2.1