is |
Subversion Repositories: |
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>db.jablonka.cz Smazani platby</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 finance WHERE id='$id' ");
$dotaz=MySQL_Fetch_Array($dotaz);
echo '
<b>Opravdu chcete smazat platbu?</b><br>
<br>
<form action="del_platba.php?action=del" method=POST>
<table>
<tr>
<td class=text>Uživatel:</td><td><b>'.id_to_name($dotaz["clen"]).'</b></td>
</tr>
<tr>
<td class=text>Platba:</td><td class=text>'.id_to_platba($dotaz["platba"]).'</td>
</tr>
<tr>
<td class=text>Hodnota:</td><td class=text>'.$dotaz["hodnota"].'</td>
</tr>
<tr>
<td class=text>Datum:</td><td class=text>'.sql2datum($dotaz["datum"]).'</td>
</tr>
<tr><td class=text>Komentář:</td><td><textarea class=fieldthin name="komentar" rows=3 cols=25>'.$dotaz["komentar"].'</textarea></td></
tr>
</table>
<br>
<input class=field type="submit" name="OK" value=" Smazat ">
<input name="id" type="hidden" value="'.$id.'">
<input name="clen" type="hidden" value="'.$dotaz["clen"].'">
</form>
';
}
else
{
$result = MySQL_Query("DELETE FROM finance WHERE id='$id'");
if (!$result) {
echo "<br><b>Výsledek : ".mysql_error()."</b>";
} else {
echo "<br><b>Platba uživatele ".id_to_name($clen)." byla úspěšně smazána!</b>";
}
echo '
<br>
<img src=images/arrow.jpg> <a href="javascript:history.go(-2)" class=odkaz>zpět</a>
<img src=images/arrow.jpg> <a href="prispevky.php" class=odkaz>zpět na příspěvky</a>
';
}
MySQL_Close($spojeni);
?>
</body>
</html>