bug fixes
This commit is contained in:
parent
fad83fce95
commit
91a95ecaab
3 changed files with 79 additions and 3 deletions
|
@ -127,4 +127,76 @@
|
||||||
<td class="DataTD"><?=$drow['points']?></td>
|
<td class="DataTD"><?=$drow['points']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<br>
|
||||||
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="title"><?=_("Your Assurance Points")?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="DataTD"><b><?=_("Date")?></b></td>
|
||||||
|
<td class="DataTD"><b><?=_("Who")?></b></td>
|
||||||
|
<td class="DataTD"><b><?=_("Points")?></b></td>
|
||||||
|
<td class="DataTD"><b><?=_("Location")?></b></td>
|
||||||
|
<td class="DataTD"><b><?=_("Method")?></b></td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
$query = "select * from `notary` where `to`='".$row['id']."'";
|
||||||
|
$dres = mysql_query($query);
|
||||||
|
$points = 0;
|
||||||
|
while($drow = mysql_fetch_assoc($dres))
|
||||||
|
{
|
||||||
|
$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$drow['from']."'"));
|
||||||
|
$points += $drow['points'];
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="DataTD"><?=$drow['date']?></td>
|
||||||
|
<td class="DataTD"><a href="wot.php?id=9&userid=<?=$drow['from']?>"><?=$fromuser['fname']." ".$fromuser['lname']?></td>
|
||||||
|
<td class="DataTD"><?=$drow['points']?></td>
|
||||||
|
<td class="DataTD"><?=$drow['location']?></td>
|
||||||
|
<td class="DataTD"><?=$drow['method']?></td>
|
||||||
|
</tr>
|
||||||
|
<? } ?>
|
||||||
|
<tr>
|
||||||
|
<td class="DataTD" colspan="2"><b><?=_("Total Points")?>:</b></td>
|
||||||
|
<td class="DataTD"><?=$points?></td>
|
||||||
|
<td class="DataTD" colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="title"><?=_("Assurance Points You Issued")?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="DataTD"><b><?=_("Date")?></b></td>
|
||||||
|
<td class="DataTD"><b><?=_("Who")?></b></td>
|
||||||
|
<td class="DataTD"><b><?=_("Points")?></b></td>
|
||||||
|
<td class="DataTD"><b><?=_("Location")?></b></td>
|
||||||
|
<td class="DataTD"><b><?=_("Method")?></b></td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
$query = "select * from `notary` where `from`='".$row['id']."' and `to`!='".$row['id']."'";
|
||||||
|
$dres = mysql_query($query);
|
||||||
|
$points = 0;
|
||||||
|
while($drow = mysql_fetch_assoc($dres))
|
||||||
|
{
|
||||||
|
$fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$drow['to']."'"));
|
||||||
|
$points += $drow['points'];
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="DataTD"><?=$drow['date']?></td>
|
||||||
|
<td class="DataTD"><a href="wot.php?id=9&userid=<?=$drow['to']?>"><?=$fromuser['fname']." ".$fromuser['lname']?></td>
|
||||||
|
<td class="DataTD"><?=$drow['points']?></td>
|
||||||
|
<td class="DataTD"><?=$drow['location']?></td>
|
||||||
|
<td class="DataTD"><?=$drow['method']?></td>
|
||||||
|
</tr>
|
||||||
|
<? } ?>
|
||||||
|
<tr>
|
||||||
|
<td class="DataTD" colspan="2"><b><?=_("Total Points")?>:</b></td>
|
||||||
|
<td class="DataTD"><?=$points?></td>
|
||||||
|
<td class="DataTD" colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br><br>
|
||||||
<? } } ?>
|
<? } } ?>
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="DataTD"><?=$row['date']?></td>
|
<td class="DataTD"><?=$row['date']?></td>
|
||||||
<td class="DataTD"><a href="wot.php?id=9&userid=<?=$row['from']?>"><?=$fromuser['fname']." ".$fromuser['lname']?></td>
|
<td class="DataTD"><a href="wot.php?id=9&userid=<?=$row['to']?>"><?=$fromuser['fname']." ".$fromuser['lname']?></td>
|
||||||
<td class="DataTD"><?=$row['points']?></td>
|
<td class="DataTD"><?=$row['points']?></td>
|
||||||
<td class="DataTD"><?=$row['location']?></td>
|
<td class="DataTD"><?=$row['location']?></td>
|
||||||
<td class="DataTD"><?=$row['method']?></td>
|
<td class="DataTD"><?=$row['method']?></td>
|
||||||
|
|
|
@ -195,6 +195,10 @@
|
||||||
$_POST['points'] = $max - $drow['total'];
|
$_POST['points'] = $max - $drow['total'];
|
||||||
if($_POST['points'] < 0)
|
if($_POST['points'] < 0)
|
||||||
$_POST['points'] = 0;
|
$_POST['points'] = 0;
|
||||||
|
|
||||||
|
if(mysql_escape_string($_POST['date']) == "")
|
||||||
|
$_POST['date'] = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
$query = "insert into `notary` set `from`='".$_SESSION['profile']['id']."',
|
$query = "insert into `notary` set `from`='".$_SESSION['profile']['id']."',
|
||||||
`to`='".$_SESSION['_config']['notarise']['id']."',
|
`to`='".$_SESSION['_config']['notarise']['id']."',
|
||||||
`points`='".intval($_POST['points'])."',
|
`points`='".intval($_POST['points'])."',
|
||||||
|
@ -203,7 +207,7 @@
|
||||||
if($_SESSION['profile']['admin'] == 1)
|
if($_SESSION['profile']['admin'] == 1)
|
||||||
$query .= ",\n`method`='".mysql_escape_string($_POST['method'])."'";
|
$query .= ",\n`method`='".mysql_escape_string($_POST['method'])."'";
|
||||||
mysql_query($query);
|
mysql_query($query);
|
||||||
if($_SESSION['profile']['id'] < 150)
|
if($_SESSION['profile']['points'] < 150)
|
||||||
{
|
{
|
||||||
$query = "insert into `notary` set `from`='".$_SESSION['profile']['id']."',
|
$query = "insert into `notary` set `from`='".$_SESSION['profile']['id']."',
|
||||||
`to`='".$_SESSION['profile']['id']."',
|
`to`='".$_SESSION['profile']['id']."',
|
||||||
|
@ -212,7 +216,7 @@
|
||||||
`date`='".mysql_escape_string($_POST['date'])."',
|
`date`='".mysql_escape_string($_POST['date'])."',
|
||||||
`method`='Administrative Increase'";
|
`method`='Administrative Increase'";
|
||||||
mysql_query($query);
|
mysql_query($query);
|
||||||
$_SESSION['profile']['id'] += 2;
|
$_SESSION['profile']['points'] += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_SESSION['_config']['notarise']['language'] != "")
|
if($_SESSION['_config']['notarise']['language'] != "")
|
||||||
|
|
Loading…
Reference in a new issue