Changeset 685 for trunk/pages/admin_finance_modify.php
- Timestamp:
- Jan 23, 2010, 9:50:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/admin_finance_modify.php
r583 r685 23 23 $operace = $operace_obracene[$oper]; 24 24 25 $upravit_money = $db->query("update finance set money='$money' where id='$id2'");26 $upravit_operace = $db->query("update finance set operation='$operace' where id='$id2'");27 $upravit_popis = $db->query("update finance set description='$popis' where id='$id2'");28 $upravit_odmenu = $db->query("update finance set odmena='$odmena' where id='$id2'");25 $upravit_money = $db->query("update Finance set Money='$money' where Id='$id2'"); 26 $upravit_operace = $db->query("update Finance set Operation='$operace' where Id='$id2'"); 27 $upravit_popis = $db->query("update Finance set Description='$popis' where Id='$id2'"); 28 $upravit_odmenu = $db->query("update Finance set Reward='$odmena' where Id='$id2'"); 29 29 30 30 if($upravit_money and $upravit_operace and $upravit_popis and $upravit_odmenu): … … 47 47 $db -> select_db($Config['Database']['Database']); 48 48 49 $load_money = $db -> query("SELECT SUM(` money`) FROM `finance`;") -> fetch_array();49 $load_money = $db -> query("SELECT SUM(`Money`) FROM `Finance`;") -> fetch_array(); 50 50 51 51 echo"<p><strong>Aktuální stav financí: ".$load_money[0]." Kč</strong></p>"; … … 56 56 <th>Suma</th> 57 57 <th>Popis</th> 58 59 58 <th>Odměna</th> 59 <th> </th> 60 60 </tr> 61 61 "; 62 $load_dotation = $db -> query("SELECT * FROM ` finance` ORDER BY `id` DESC;");62 $load_dotation = $db -> query("SELECT * FROM `Finance` ORDER BY `Id` DESC;"); 63 63 while ($row = $load_dotation -> fetch_array()) 64 64 { 65 $id = $row[' id'];65 $id = $row['Id']; 66 66 67 if ($row[" time"] != "")67 if ($row["Time"] != "") 68 68 { 69 69 70 70 //$date = $server -> HumanDate ($row["time"],0); 71 $date = $row[" time"];71 $date = $row["Time"]; 72 72 } 73 73 else … … 75 75 $date = ""; 76 76 } 77 if($row[" money"] > 0)77 if($row["Money"] > 0) 78 78 {$plus = "+";} else{$plus = "";} 79 80 79 80 if($id != $id_upravit): 81 81 echo " 82 82 <tr> 83 83 <td align=\"center\">".$date."</td> 84 <td align=\"center\">".$plus.$row[" money"]."</td>85 <td align=\"left\">".$operace[$row[" operation"]]." ".$row["description"]."</td>86 <td align=\"center\">".$row["odmena"]."</td>87 84 <td align=\"center\">".$plus.$row["Money"]."</td> 85 <td align=\"left\">".$operace[$row["Operation"]]." ".$row["Description"]."</td> 86 <td align=\"center\">".$row["Reward"]."</td> 87 <form method=post><td align=\"center\" valign=\"middle\"><input type=hidden name='id_upravit' value='$id'><input type=submit value='Upravit'></form></td> 88 88 </tr> 89 89 "; 90 91 $oper = $row["operation"];92 90 else: 91 $oper = $row["Operation"]; 92 if($operace[$oper]=="Nákup"): 93 93 $option = 94 94 "<option value=\"buy\">Nákup … … 127 127 128 128 endif; 129 130 131 129 echo " 130 131 <tr><form method=post action=\"?page=admin_finance_modify&q=1\"> <input type=hidden name=id value='$id'> 132 132 <td align=\"center\">".$date."</td> 133 <td align=\"center\"><input type=text name=money value=".$row["money"]." size=4></td>134 <td align=\"left\"><select name=operace>$option</select><input type=text name=popis value='".$row[" description"]."'></td>135 <td align=\"center\"><input type=text name=odmena value='".$row["odmena"]."'></td>136 133 <td align=\"center\"><input type=text name=money value=".$row["Money"]." size=4></td> 134 <td align=\"left\"><select name=operace>$option</select><input type=text name=popis value='".$row["Description"]."'></td> 135 <td align=\"center\"><input type=text name=odmena value='".$row["Odmena"]."'></td> 136 <td align=\"center\" valign=\"middle\"><input type=hidden name=id value='$id'><input type=submit value='Upravit'></td> 137 137 </form> </tr> 138 138 "; 139 139 endif; 140 140 } 141 141 echo "</table>";
Note:
See TracChangeset
for help on using the changeset viewer.