source: branches/posledni/pages/admin_finance.php

Last change on this file was 472, checked in by amun, 16 years ago

Přidáno do financí "odměna"...

File size: 1.7 KB
Line 
1<?php
2echo "<center>";
3$lvl = $player -> GetGmLvl();
4if($lvl > 0){
5echo "
6<form method=\"post\">
7<table align=\"center\" border=\"0\" width=\"300\">
8 <tr>
9 <td colspan=\"2\"><b>Přidat finance</b></td>
10 </tr>
11 <tr>
12 <td>Dne</td>
13 <td><input type=\"text\" name=\"day\"></td>
14 </tr>
15 <tr>
16 <td>Suma</td>
17 <td><input type=\"text\" name=\"suma\"></td>
18 </tr>
19 <tr>
20 <td>Kategorie</td>
21 <td>
22 <select name=\"kategorie\">
23 <option value=\"\">Vyberte :</option>
24 <option value=\"buy\">Nákup</option>
25 <option value=\"sell\">Prodej</option>
26 <option value=\"consumption\">Spotřeba</option>
27 <option value=\"internet\">Internet</option>
28 <option value=\"contribution\">Příspěvek</option>
29 </select>
30 </td>
31 </tr>
32 <tr>
33 <td>Odměna</td>
34 <td>
35 <input type=text name=\"odmena\">
36 </td>
37 </tr>
38 <tr>
39 <td>Popis</td>
40 <td><input type=\"text\" name=\"popis\"></td>
41 </tr>
42 <tr>
43 <td></td>
44 <td><input type=\"submit\" value=\"Přidat\" name=\"add\"></td>
45 </tr>
46</table>
47</form>
48";
49if (isset($_POST["add"]) AND $lvl > 0)
50{
51 $db -> select_db($db_ghsystem);
52 $result = $db -> query("INSERT INTO `finance` ( `id` , `time` , `money` , `operation` , `description`, `odmena`) VALUES (NULL, '".$_POST["day"]."', '".$_POST["suma"]."', '".$_POST["kategorie"]."' , '".$_POST["popis"]."', '".$_POST["odmena"]."');");
53 echo "Přidáno !";
54}
55
56 } else {
57 echo"<p align=center><font color=red><b>Nemáte dostatečná oprávnění pro tuto akci!</b></font>";
58 echo"<meta http-equiv=\"refresh\" content=\"3;url=?page=main\">";
59 }
60echo "</center>";
61?>
Note: See TracBrowser for help on using the repository browser.