2004-10-16 00:28:17 +00:00
|
|
|
<? /*
|
|
|
|
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.
|
|
|
|
*/ ?>
|
|
|
|
<?
|
2006-02-03 18:45:23 +00:00
|
|
|
$res = mysql_query("select * from `users` where `id`='".intval($_REQUEST['userid'])."' and `listme`='1'");
|
2004-10-16 00:28:17 +00:00
|
|
|
if(mysql_num_rows($res) <= 0)
|
|
|
|
{
|
2006-02-03 18:45:23 +00:00
|
|
|
echo _("Sorry, I was unable to locate that user, the person doesn't wish to be contacted, or isn't an assurer.");
|
2006-03-05 11:18:16 +00:00
|
|
|
unset($_SESSION['_config']['user']);
|
2004-10-16 00:28:17 +00:00
|
|
|
} else {
|
|
|
|
|
|
|
|
$user = mysql_fetch_array($res);
|
2004-10-16 15:14:46 +00:00
|
|
|
$userlang = $user['language'];
|
2004-10-16 00:28:17 +00:00
|
|
|
$points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary`
|
2004-11-10 06:12:43 +00:00
|
|
|
where `to`='".$user['id']."' group by `to` HAVING SUM(`points`) > 0"));
|
2004-10-16 00:28:17 +00:00
|
|
|
if($points <= 0)
|
|
|
|
{
|
|
|
|
echo _("Sorry, I was unable to locate that user.");
|
2006-03-05 11:18:16 +00:00
|
|
|
unset($_SESSION['_config']['user']);
|
2004-10-16 00:28:17 +00:00
|
|
|
} else {
|
|
|
|
|
|
|
|
$_SESSION['_config']['user'] = $user;
|
2006-02-03 18:45:23 +00:00
|
|
|
$_SESSION['_config']['pagehash'] = md5(date("U"));
|
2004-10-16 00:28:17 +00:00
|
|
|
?>
|
|
|
|
<? 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>
|
2004-10-24 01:46:49 +00:00
|
|
|
<td colspan="2" class="title"><?=_("Contact Assurer")?></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("To")?>:</td>
|
2005-11-08 10:06:04 +00:00
|
|
|
<td class="DataTD" align="left"><?=$user['fname']?> <?=substr($user['lname'], 0, 1)?></td>
|
2004-10-16 00:28:17 +00:00
|
|
|
</tr>
|
2004-10-16 15:14:46 +00:00
|
|
|
<? if($userlang != "") { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Language")?>:</td>
|
2005-05-25 03:41:55 +00:00
|
|
|
<td class="DataTD" align="left"><? printf(_("%s prefers to be contacted in %s"), $user['fname'], $_SESSION['_config']['translations'][$userlang]) ?></td>
|
2004-10-16 15:14:46 +00:00
|
|
|
</tr>
|
2006-08-15 22:24:21 +00:00
|
|
|
<? } ?>
|
|
|
|
<?
|
|
|
|
$query = "select * from `addlang` where `userid`='".$user['id']."'";
|
|
|
|
$res = mysql_query($query);
|
|
|
|
if(mysql_num_rows($res) > 0)
|
|
|
|
{
|
|
|
|
$row = mysql_fetch_assoc($res);
|
|
|
|
$lang = mysql_fetch_assoc(mysql_query("select * from `languages` where `locale`='${row['lang']}'"));
|
|
|
|
?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Additional Language")?>:</td>
|
|
|
|
<td class="DataTD" align="left"><? printf(_("%s will also accept email in %s - %s"), $user['fname'], $lang['lang'], $lang['country']) ?></td>
|
|
|
|
</tr>
|
2004-10-16 15:14:46 +00:00
|
|
|
<? } ?>
|
2004-10-16 00:28:17 +00:00
|
|
|
<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>
|
2006-02-03 18:45:23 +00:00
|
|
|
<input type="hidden" name="pageid" value="<?=$_SESSION['_config']['pagehash']?>">
|
|
|
|
<input type="hidden" name="userid" value="<?=$_REQUEST['userid']?>">
|
2004-10-16 00:28:17 +00:00
|
|
|
<input type="hidden" name="oldid" value="<?=$id?>">
|
|
|
|
</form>
|
|
|
|
<p>[ <a href='javascript:history.go(-1)'>Go Back</a> ]</p>
|
|
|
|
<? } } ?>
|