60 lines
2.2 KiB
PHP
60 lines
2.2 KiB
PHP
|
<? /*
|
||
|
Copyright (C) 2004 by Duane Groth <duane_at_CAcert_dot_org>
|
||
|
|
||
|
This file is part of CAcert.
|
||
|
|
||
|
CAcert has been released under the CAcert Source License
|
||
|
which can be found included with these source files or can
|
||
|
be downloaded from the internet from the following address:
|
||
|
http://www.cacert.org/src-lic.php
|
||
|
|
||
|
CAcert is distributed WITHOUT ANY WARRANTY; without even
|
||
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||
|
PARTICULAR PURPOSE. See the License for more details.
|
||
|
*/ ?>
|
||
|
<?
|
||
|
$res = mysql_query("select * from `users` where `id`='".intval($_GET['userid'])."' and `listme`='1'");
|
||
|
if(mysql_num_rows($res) <= 0)
|
||
|
{
|
||
|
echo _("Sorry, I was unable to locate that user.");
|
||
|
unset($_SESSION['config']['user']);
|
||
|
} else {
|
||
|
|
||
|
$user = mysql_fetch_array($res);
|
||
|
$points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary`
|
||
|
where `to`='".$user['id']."' group by `to` HAVING SUM(`points`) >= 100"));
|
||
|
if($points <= 0)
|
||
|
{
|
||
|
echo _("Sorry, I was unable to locate that user.");
|
||
|
unset($_SESSION['config']['user']);
|
||
|
} else {
|
||
|
|
||
|
$_SESSION['_config']['user'] = $user;
|
||
|
?>
|
||
|
<? if($_SESSION['_config']['error'] != "") { ?><div color="orange">ERROR: <?=$_SESSION['_config']['error']?></div><? unset($_SESSION['_config']['error']); } ?>
|
||
|
<form method="post" action="wot.php">
|
||
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
||
|
<tr>
|
||
|
<td colspan="2" class="title"><?=_("Contact Notary")?></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="DataTD"><?=_("To")?>:</td>
|
||
|
<td class="DataTD" align="left"><?=$user['fname']?></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="DataTD"><?=_("Subject")?>:</td>
|
||
|
<td class="DataTD" align="left"><input type="text" name="subject" value="<?=$_POST['subject']?>"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="DataTD"><?=_("Message")?>:</td>
|
||
|
<td class="DataTD"><textarea name="message" cols="40" rows="5" wrap="virtual"><?=$_POST['message']?></textarea></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Send")?>"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<input type="hidden" name="oldid" value="<?=$id?>">
|
||
|
</form>
|
||
|
<p>[ <a href='javascript:history.go(-1)'>Go Back</a> ]</p>
|
||
|
<? } } ?>
|