jablonka.czprosek.czf

is

Subversion Repositories:
[/] [trunk/] [html/] [add_ip.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>add ip</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 
20if (!@$adresa) {
21echo "<br><b>Není nalezena adresa pro umístění IP adresy!</b>";
22} else {
23echo '
24<b>Přidání IP adresy pro uživatele <a class="odkaz" target="_self" href="clen.php?clen='.$clen.'">'.id_to_name($clen).'</a> :</b><br>
25 
26<form action="add_ip.php?action=save" method=POST>
27<table>
28 <tr>
29 <td class=text>DNS:</td><td><input class=field name="dns" type="text" value="" size=25></td>
30 </tr>
31 <tr>
32 <td class=text>MAC:</td><td><input class=field name="mac" type="text" value="" size=25></td>
33 </tr>
34 <tr>
35 <td class=text>IP:</td><td><input class=field name="ip" type="text" value="" size=25></td>
36 </tr>
37 <tr><td class=text></td><td><textarea class=fieldthin name="komentar" rows=10 cols=45></textarea></td></tr>
38 
39</table>
40<br><br>
41<input class=field type="submit" name="OK" value="&nbsp;vytvoř ipéčko&nbsp;">
42<input name="clen" type="hidden" value="'.$clen.'">
43<input name="adresa" type="hidden" value="'.$adresa.'">
44</form>
45';
46}
47 
48}
49else
50{
51$test=MySQL_Query("SELECT MAX(id) FROM ipecka");
52$test=MySQL_Fetch_Array($test);
53$id=$test["MAX(id)"];
54$id++;
55 
56$result = MySQL_Query("INSERT INTO ipecka VALUES ('$id','$clen','$adresa','$dns','$mac','$ip','$komentar')");
57 
58if (!$result) {
59echo "<br><b>Výsledek : ".mysql_error()."</b>";
60} else {
61echo '
62<br><b>Ipéčko uživatele <a class="odkaz" target="_self" href="clen.php?clen='.$clen.'">'.id_to_name($clen).'</a> bylo úspěšně přidáno!</b>
63';
64}
65 
66echo '
67<br><br>
68<img src=images/arrow.jpg>&nbsp;<a href="javascript:history.go(-2)" class=odkaz>zpět</a>
69<img src=images/arrow.jpg>&nbsp;<a href="seznam.php" class=odkaz>zpět na seznam</a>
70 
71';
72}
73MySQL_Close($spojeni);
74?>
75</body>
76</html>

Powered by WebSVN 2.2.1