mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-26 22:46:09 +00:00
feat: in-game messages can be sent as Support when allowed
This commit is contained in:
@@ -55,6 +55,8 @@
|
||||
$s = 0;
|
||||
}
|
||||
$name = 1;
|
||||
$support_messages = (($session->access == MULTIHUNTER || $session->access == ADMIN) && ADMIN_RECEIVE_SUPPORT_MESSAGES);
|
||||
|
||||
for($i=(1+$s);$i<=(10+$s);$i++) {
|
||||
if(count($message->inbox1) >= $i) {
|
||||
if($message->inbox1[$i-1]['owner'] <= 1) {
|
||||
@@ -65,7 +67,7 @@
|
||||
else {
|
||||
echo "<tr>";
|
||||
}
|
||||
echo "<td class=\"sel\"><input class=\"check\" type=\"checkbox\" name=\"n".$name."\" value=\"".$message->inbox1[$i-1]['id']."\" /></td>
|
||||
echo "<td class=\"sel\">".((!$support_messages || ($support_messages && $message->inbox1[$i-1]['target'] != 1)) ? "<input class=\"check\" type=\"checkbox\" name=\"n".$name."\" value=\"".$message->inbox1[$i-1]['id']."\" />" : '<u><b title="Message for Support"><i>S</i></b></u>')."</td>
|
||||
<td class=\"top\"><a href=\"nachrichten.php?id=".$message->inbox1[$i-1]['id']."\">".$message->inbox1[$i-1]['topic']."</a> ";
|
||||
if($message->inbox1[$i-1]['viewed'] == 0) {
|
||||
echo "(new)";
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
$s = 0;
|
||||
}
|
||||
$name = 1;
|
||||
$support_messages = (($session->access == MULTIHUNTER || $session->access == ADMIN) && ADMIN_RECEIVE_SUPPORT_MESSAGES);
|
||||
|
||||
for($i=(1+$s);$i<=(10+$s);$i++) {
|
||||
if(count($message->sent1) >= $i) {
|
||||
if($message->sent1[$i-1]['target'] == 0) {
|
||||
@@ -65,7 +67,7 @@
|
||||
else {
|
||||
echo "<tr>";
|
||||
}
|
||||
echo "<td class=\"sel\"><input class=\"check\" type=\"checkbox\" name=\"n".$name."\" value=\"".$message->sent1[$i-1]['id']."\" /></td>
|
||||
echo "<td class=\"sel\">".((!$support_messages || ($support_messages && $message->inbox1[$i-1]['target'] != 1)) ? "<input class=\"check\" type=\"checkbox\" name=\"n".$name."\" value=\"".$message->sent1[$i-1]['id']."\" />" : '<u><b title="Sent as Support"><i>S</i></b></u>')."</td>
|
||||
<td class=\"top\"><a href=\"nachrichten.php?id=".$message->sent1[$i-1]['id']."\">".$message->sent1[$i-1]['topic']."</a> ";
|
||||
if($message->sent1[$i-1]['viewed'] == 0) {
|
||||
echo "(unread)";
|
||||
|
||||
@@ -53,9 +53,9 @@ $user = $database->getUserArray($session->uid, 1);
|
||||
if (preg_match("/re([0-9]+)/i",$message->reply['topic'],$c))
|
||||
{
|
||||
$c = $c[1]+1;
|
||||
echo $message->reply['topic'] = preg_replace("/re[0-9]+/i","re".($c),$message->reply['topic']);
|
||||
echo $message->reply['topic'] = strip_tags(preg_replace("/re[0-9]+/i","re".($c),$message->reply['topic']));
|
||||
}else{
|
||||
echo "re1:".$message->reply['topic']; }} ?>" maxlength="35" onkeyup="copyElement('subject')" tabindex=2/>
|
||||
echo "re1:".strip_tags($message->reply['topic']); }} ?>" maxlength="35" onkeyup="copyElement('subject')" tabindex=2/>
|
||||
</div>
|
||||
<a id="adbook" href="#" onclick="toggleFriendsList(); return false;"><img src="img/x.gif" alt="Addressbook" title="Addressbook" /></a>
|
||||
<div class="clear"></div>
|
||||
@@ -94,7 +94,14 @@ Reply: ".$database->getUserField($id,'username',0)."
|
||||
</script>
|
||||
<p class="btn">
|
||||
<input type="hidden" name="ft" value="m2" />
|
||||
<input type="image" value="" name="s1" id="btn_send" class="dynamic_img" src="img/x.gif" alt="send" onclick="this.disabled=true;this.form.submit();" tabindex=4; />
|
||||
<input type="image" value="" name="s1" id="btn_send" class="dynamic_img" src="img/x.gif" alt="send" onclick="this.disabled=true;this.form.submit();" tabindex=4; />
|
||||
<?php
|
||||
if (($session->access == MULTIHUNTER || $session->access == ADMIN) && ADMIN_RECEIVE_SUPPORT_MESSAGES && !empty($_GET['mid'])) {
|
||||
?><br />
|
||||
<input type="checkbox" name="as_support"<?php echo ((!empty($_GET['tid']) && $_GET['tid'] == 1) ? ' checked="checked"' : ''); ?> /> Send as Support
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</form>
|
||||
<div id="adressbook" class="hide"><h2>Addressbook</h2>
|
||||
|
||||
Reference in New Issue
Block a user