<?php
require_once '../../maincore.php';
require_once '../../subheader.php';
require_once '../../side_left.php';
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."stats/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."stats/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."stats/locale/Lt.php";
}
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
opentable("".$locale['t_title']."");
echo "<form method='post' action='".$_SERVER['PHP_SELF']."'><select name='id' class='textbox'>";
$result = dbquery("SELECT * FROM zaidejai ORDER BY goals DESC");
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$id = $data['id'];
$name = $data['name'];
echo "<option value=\"".$id."\" name='id' class='textbox'>".$name."</option>";
}
echo "</select>
<input type='hidden' value='".$_POST['id']."' name='user_id' />
<input type='text' name='goals' value='".$data['goals']."' class='textbox' />
<input type='submit' name='prideti' value='".$locale['tp']."' class='button' />
<input type='submit' name='atimti' value='".$locale['pt']."' class='button' /></form>";
}
}
if(isset($_POST['prideti'])) {
$result = dbquery("UPDATE zaidejai SET goals=goals+'".$_POST['goals']."' WHERE id = '".$id."'");
}
if(isset($_POST['atimti'])) {
$result = dbquery("UPDATE zaidejai SET goals=goals+-'".$_POST['goals']."' WHERE id = '".$id."'");
}
closetable();
require_once '../../side_right.php';
require_once '../../footer.php';
?>
<?php
require_once '../../maincore.php';
require_once '../../subheader.php';
require_once '../../side_left.php';
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."stats/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."stats/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."stats/locale/Lt.php";
}
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
opentable("".$locale['t_title']."");
echo "<form method='post' action='".$_SERVER['PHP_SELF']."'><select name='id' class='textbox'>";
$result = dbquery("SELECT * FROM zaidejai ORDER BY goals DESC");
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$id = $data['id'];
$name = $data['name'];
echo "<option value=\"".$id."\" name='id' class='textbox'>".$name."</option>";
}
echo "</select>
<input type='hidden' value='".$_POST['id']."' name='user_id' />
<input type='text' name='goals' value='".$data['goals']."' class='textbox' />
<input type='submit' name='prideti' value='".$locale['tp']."' class='button' />
<input type='submit' name='atimti' value='".$locale['pt']."' class='button' /></form>";
}
}
if(isset($_POST['prideti'])) {
$result = dbquery("UPDATE zaidejai SET goals=goals+'".$_POST['goals']."' WHERE id = '".$_POST['id']."'");
}
if(isset($_POST['atimti'])) {
$result = dbquery("UPDATE zaidejai SET goals=goals-'".$_POST['goals']."' WHERE id = '".$_POST['id']."'");
}
closetable();
require_once '../../side_right.php';
require_once '../../footer.php';
?>
<?php
require_once '../../maincore.php';
require_once BASEDIR.'subheader.php';
require_once BASEDIR.'side_left.php';
if (!iADMIN || iUSER_RIGHTS == "" || iUSER_RIGHTS == "C") redirect(BASEDIR."index.php");
if (file_exists(INFUSIONS."stats/locale/".$settings['locale'].".php"))
include INFUSIONS."stats/locale/".$settings['locale'].".php";
else
include INFUSIONS."stats/locale/Lt.php";
opentable("".$locale['t_title']."");
$result = dbquery("SELECT * FROM zaidejai ORDER BY goals DESC");
if (dbrows($result) != 0)
{
echo "<form method='post' action='".FUSION_SELF."'><select name='id' class='textbox'>";
while ($data = dbarray($result))
{
print "<option value='".$data['id']."'>".$data['name']."</option>";
}
echo "</select>
<input type='hidden' value='".$_POST['id']."' name='user_id' />
<input type='text' name='goals' value='".$data['goals']."' class='textbox' />
<input type='submit' name='prideti' value='".$locale['tp']."' class='button' />
<input type='submit' name='atimti' value='".$locale['pt']."' class='button' />
</form>";
}
else
{
print "Nera irasu";
}
if(isset($_POST['prideti'])) dbquery("UPDATE zaidejai SET goals=goals+".$_POST['goals']." WHERE id = ".$_POST['id']);
if(isset($_POST['atimti'])) dbquery("UPDATE zaidejai SET goals=goals-".$_POST['goals']." WHERE id = ".$_POST['id']);
closetable();
require_once BASEDIR.'side_right.php';
require_once BASEDIR.'footer.php';
?>
<?php
require_once '../../maincore.php';
require_once '../../subheader.php';
require_once '../../side_left.php';
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."stats/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."stats/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."stats/locale/Lt.php";
}
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
opentable($locale['t_title']);
echo "<form method='post' action='".$_SERVER['PHP_SELF']."'><select name='id' class='textbox'>";
$result = dbquery("SELECT * FROM zaidejai ORDER BY goals DESC");
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$id = $data['id'];
$name = $data['name'];
echo "<option value='$id' name='id' class='textbox'>".$name."</option>";
}
echo "</select>
<input type='hidden' value='".$_POST['id']."' name='user_id' />
<input type='text' name='goals' value='".$data['goals']."' class='textbox' />
<input type='submit' name='prideti' value='".$locale['tp']."' class='button' />
<input type='submit' name='atimti' value='".$locale['pt']."' class='button' /></form>";
}
}
if(isset($_POST['prideti'])) { $result = dbquery("UPDATE zaidejai SET goals = goals + '".$_POST['goals']."' WHERE id = '".$_POST['user_id']."'"); }
if(isset($_POST['atimti'])) { $result = dbquery("UPDATE zaidejai SET goals = goals - '".$_POST['goals']."' WHERE id = '".$_POST['user_id']."'"); }
closetable();
require_once '../../side_right.php';
require_once '../../footer.php';
?>