GetGmLvl(); if(1 > 0){ $id_upravit = $_POST['id_upravit']; $q = $_GET['q']; if($q==1): $operace_obracene = array( "Nákup" => "buy", "Prodej" => "sell", "Spotřeba" => "consumption", "Internet" => "internet", "contribution" => "contribution", ); $id2 = $_POST['id']; $money = $_POST['money']; $oper = $_POST['operace']; $popis = $_POST['popis']; $odmena = $_POST['odmena']; $operace = $operace_obracene[$oper]; $upravit_money = $db->query("update Finance set Money='$money' where Id='$id2'"); $upravit_operace = $db->query("update Finance set Operation='$operace' where Id='$id2'"); $upravit_popis = $db->query("update Finance set Description='$popis' where Id='$id2'"); $upravit_odmenu = $db->query("update Finance set Reward='$odmena' where Id='$id2'"); if($upravit_money and $upravit_operace and $upravit_popis and $upravit_odmenu): $info = "Finance byla upravena vpořádku..."; else: $info = "Při upravování finance došlo k chybě..."; endif; endif; echo"

$info"; $operace = array( "buy" => "Nákup", "sell" => "Prodej", "consumption" => "Spotřeba", "internet" => "Internet", "contribution" => "Příspěvek od", ); $db -> select_db($Config['Database']['Database']); $load_money = $db -> query("SELECT SUM(`Money`) FROM `Finance`;") -> fetch_array(); echo"

Aktuální stav financí: ".$load_money[0]." Kč

"; echo " "; $load_dotation = $db -> query("SELECT * FROM `Finance` ORDER BY `Id` DESC;"); while ($row = $load_dotation -> fetch_array()) { $id = $row['Id']; if ($row["Time"] != "") { //$date = $server -> HumanDate ($row["time"],0); $date = $row["Time"]; } else { $date = ""; } if($row["Money"] > 0) {$plus = "+";} else{$plus = "";} if($id != $id_upravit): echo " "; else: $oper = $row["Operation"]; if($operace[$oper]=="Nákup"): $option = " "; endif; } echo "
Datum Suma Popis Odměna  
".$date." ".$plus.$row["Money"]." ".$operace[$row["Operation"]]." ".$row["Description"]." ".$row["Reward"]."
".$date."
"; } else { echo"

Nemáte dostatečná oprávnění pro tuto akci!"; echo""; } ?>