* moved some guild pages and account to twig

* fixed account create javascript warnings when fields are empty
This commit is contained in:
slawkens 2017-10-05 17:07:49 +02:00
parent 755deae717
commit 04a7796665
21 changed files with 1123 additions and 824 deletions

View File

@ -35,6 +35,7 @@ $config = array(
// gesior backward support (templates & pages)
// allows using gesior templates and pages with myaac
// might bring some performance when disabled
'backward_support' => true,
// head options (html)
@ -231,7 +232,7 @@ $config = array(
'google_analytics_id' => '', // e.g.: UA-XXXXXXX-X
'experiencetable_columns' => 5, // how many columns to display in experience table page. * experiencetable_rows, 5 = 500 (will show up to 500 level)
'experiencetable_rows' => 100, // till how many levels in one column
'date_timezone' => 'Europe/Berlin',
'date_timezone' => 'Europe/Berlin', // more info at http://php.net/manual/en/timezones.php
'monsters' => array(),
'npc' => array()

View File

@ -133,9 +133,7 @@ function getGuildLink($name, $generate = true)
if(is_numeric($name))
{
$guild = $db->query(
'SELECT ' . $db->fieldName('name') .
' FROM ' . $db->tableName('guilds') .
' WHERE ' . $db->fieldName('id') . ' = ' . (int)$name);
'SELECT `name` FROM `guilds` WHERE `id` = ' . (int)$name);
if($guild->rowCount() > 0)
$name = $guild->fetchColumn();
}

View File

@ -40,7 +40,7 @@ $showed = $post = $reply = false;
if(!empty($_REQUEST['reply']))
$reply=true;
$account = $ots->createObject('Account');
$account = new OTS_Account();
$account->load($_REQUEST['acc']);
$account->isLoaded();
$players = $account->getPlayersList();

View File

@ -101,7 +101,7 @@ if($step == 'save')
{
if($config['account_mail_unique'])
{
$test_email_account = $ots->createObject('Account');
$test_email_account = new OTS_Account();
$test_email_account->findByEmail($email);
if($test_email_account->isLoaded())
$errors['email'] = 'Account with this e-mail address already exist.';
@ -126,7 +126,7 @@ if($step == 'save')
if(empty($errors))
{
$new_account = $ots->createObject('Account');
$new_account = new OTS_Account();
if(USE_ACCOUNT_NAME)
$new_account->create($account_name);
else
@ -172,44 +172,21 @@ if($step == 'save')
$verify_url = BASE_URL . '?p=account&action=confirm_email&v=' . $hash;
$server_name = $config['lua']['serverName'];
$body_plain = "Hello!
$body_plain = $twig->render('mail.account.verify.plain.html.twig', array(
'account' => $tmp_account,
'verify_url' => $verify_url
));
Thank you for registering on $server_name!
Here are the details of your account:
Account" . (USE_ACCOUNT_NAME ? ' Name' : '') . ": $tmp_account
Password: ************ (hidden for security reasons)
To verify your email address please click the link below:
$verify_url
If you haven't registered on $server_name please ignore this email.";
$body_html = 'Hello!<br/>
<br/>
Thank you for registering on ' . $config['lua']['serverName'] . '!<br/>
<br/>
Here are the details of your account:<br/>
Account' . (USE_ACCOUNT_NAME ? ' Name' : '') . ': ' . $tmp_account . '<br/>
Password: ************ (hidden for security reasons)<br/>
<br/>
To verify your email address please click the link below:<br/>
' . generateLink($verify_url, $verify_url, true) . '<br/>
If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore this email.';
$body_html = $twig->render('mail.account.verify.html.twig', array(
'account' => $tmp_account,
'verify_url' => generateLink($verify_url, $verify_url, true)
));
if(_mail($email, 'New account on ' . $config['lua']['serverName'], $body_html, $body_plain))
{
?>
Your account has been created.<br/><br/>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr><td bgcolor="<?php echo $config['vdarkborder']; ?>" class="white"><b>Account Created</b></td></tr>
<tr><td bgcolor="<?php echo $config['darkborder']; ?>">
<table border="0" cellpadding="1"><tr><td>
<br/>Your account<?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> is <b><?php echo $tmp_account; ?></b>.
You will need the account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and your password to play on <?php echo $config['lua']['serverName']; ?>.
Please keep your account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and password in a safe place and
never give your account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> or password to anybody.<br/><br/>
<?php
echo $twig->render('account.created.verify.html.twig', array(
'account' => $tmp_account
));
}
else
{
@ -219,25 +196,15 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
}
else
{
echo 'Your account has been created. Now you can login and create your first character. See you in Tibia!<br/><br/>';
echo '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
<TR><TD BGCOLOR="'.$config['vdarkborder'].'" class="white"><B>Account Created</B></TD></TR>
<TR><TD BGCOLOR="'.$config['darkborder'].'">
<TABLE BORDER=0 CELLPADDING=1><TR><TD>
<br/>Your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' is <b>'.$tmp_account.'</b><br/>You will need the account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' and your password to play on '.$config['lua']['serverName'].'.
Please keep your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' and password in a safe place and
never give your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' or password to anybody.<br/><br/>';
echo $twig->render('account.created.html.twig', array(
'account' => $tmp_account
));
if($config['mail_enabled'] && $config['account_welcome_mail'])
{
$mailBody = '
<h3>Dear player,</h3>
<p>Thanks for your registration at <a href=" ' . BASE_URL . '"><b>' . $config['lua']['serverName'] . '</b></a></p>
<br/><br/>
Your login details:
<p>Account' . (USE_ACCOUNT_NAME ? ' name' : '') . ': <b>' . $tmp_account . '</b></p>
<p>Password: <b>' . str_repeat('*', strlen(trim($password))) . '</b> (hidden for security reasons)</p>
<p>Kind Regards,</p>';
$mailBody = $twig->render('account.welcome_mail.html.twig', array(
'account' => $tmp_account
));
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
echo '<br /><small>These informations were send on email address <b>' . $email . '</b>.';
@ -245,7 +212,6 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
echo '<br /><p class="error">An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '</p>';
}
}
echo '</TD></TR></TABLE></TD></TR></TABLE><br/><br/>';
return;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
To play on {{ config.lua.serverName }} you need an account.
All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if config.recaptcha_enabled %}, confirm reCAPTCHA{% endif %}{% if config.account_country %}, country{% endif %} and your email address.
Also you have to agree to the terms presented below. If you have done so, your account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %} will be shown on the following page and your account password will be sent to your email address along with further instructions. If you do not receive the email with your password, please check your spam filter.<br/><br/>
<form action="?subtopic=createaccount" method="post" >
<form action="?subtopic=createaccount" method="post" id="createaccount">
<div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
@ -10,7 +10,7 @@ Also you have to agree to the terms presented below. If you have done so, your a
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Create <?php echo $config['lua']['serverName']; ?> Account</div>
<div class="Text" >Create {{ config.lua.serverName }} Account</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>

View File

@ -2,8 +2,10 @@
eventId = 0;
lastSend = 0;
$('#createaccount').submit(function(){
return validate_form(this);
$(function() {
$('#createaccount').submit(function () {
return validate_form(this);
});
});
function checkAccount()
@ -21,19 +23,19 @@
}
// anti flood
date = new Date;
timeNow = parseInt(date.getTime());
var date = new Date;
var timeNow = parseInt(date.getTime());
if(lastSend != 0)
{
if(timeNow - lastSend < 1100)
{
eventId = setInterval('checkAccount()', 1100)
eventId = setInterval('checkAccount()', 1100);
return;
}
}
account = document.getElementById("account_input").value;
var account = document.getElementById("account_input").value;
$.get("tools/validate.php", { account: account, uid: Math.random() },
function(data){
document.getElementById("acc_check").innerHTML = data;
@ -56,8 +58,8 @@
}
//anti flood
date = new Date;
timeNow = parseInt(date.getTime());
var date = new Date;
vartimeNow = parseInt(date.getTime());
if(lastSend != 0)
{
@ -68,7 +70,7 @@
}
}
email = document.getElementById("email").value;
var email = document.getElementById("email").value;
$.get("tools/validate.php", { email: email, uid: Math.random() },
function(data){
document.getElementById("email_check").innerHTML = data;

View File

@ -0,0 +1,25 @@
Your account has been created. Now you can login and create your first character. See you in Tibia!<br/><br/>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Account Created</b></td>
</tr>
<tr>
<td bgcolor="{{ config.darkborder }}">
<table border="0" cellpadding="1">
<tr>
<td>
{% if constant('USE_ACCOUNT_NAME') %}
{% set account_type = 'name' %}
{% else %}
{% set account_type = 'number' %}
{% endif %}
<br/>Your account {{ account_type }} is <b>{{ account }}</b><br/>You will need the account {{ account_type }} and your password to play on {{ config.lua.serverName }}.
Please keep your account {{ account_type }} and password in a safe place and
never give your account {{ account_type }} or password to anybody.<br/><br/>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/><br/>

View File

@ -0,0 +1,27 @@
Your account has been created.<br/><br/>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Account Created</b></td>
</tr>
<tr>
<td bgcolor="{{ config.darkborder }}">
<table border="0" cellpadding="1">
<tr>
<td>
{% if constant('USE_ACCOUNT_NAME') %}
{% set account_type = 'name' %}
{% else %}
{% set account_type = 'number' %}
{% endif %}
<br/>Your account {{ account_type }} is <b>{{ account }}</b>.
You will need the account {{ account_type }} and your password to play on {{ config.lua.serverName }}.
Please keep your account {{ account_type }} and password in a safe place and
never give your account {{ account_type }} or password to anybody.<br/><br/>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/><br/>

View File

@ -0,0 +1,7 @@
<h3>Dear player,</h3>
<p>Thanks for your registration at <a href="{{ constant('BASE_URL') }}"><b>{{ config.lua.serverName }}</b></a></p>
<br/><br/>
Your login details:
<p>Account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}: <b>{{ account }}</b></p>
<p>Password: <b>************</b> (hidden for security reasons)</p>
<p>Kind Regards,</p>

View File

@ -246,11 +246,11 @@
<td><input type="text" value="<a href=&quot;{{ player_link }}&quot;><img src=&quot;{{ signature_url }}&quot;></a>" style="width: 400px;" onclick="this.select()"></td>
</tr>
<tr>
<td>Forum::</td>
<td>Forum:</td>
<td><input type="text" value="[URL={{ player_link }}][IMG]{{ signature_url }}[/IMG][/URL]" style="width: 400px;" onclick="this.select()"></td>
</tr>
<tr>
<td>Direct link::</td>
<td>Direct link:</td>
<td><input type="text" value="{{ signature_url }}" style="width: 400px;" onclick="this.select()"></td>
</tr>
</table>

View File

@ -0,0 +1,19 @@
<center><h2>Change guild description</h2></center>
Here you can change description of your guild.<br/>
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=changedescription" method="post">
<input type="hidden" name="todo" value="save"/>
<textarea name="description" cols="60" rows="{{ rows }}">{{ guild.getCustomField('description')|raw }}</textarea><br>
(max. {{ config.guild_description_lines_limit }} lines, max. {{ config.guild_description_chars_limit }} chars) <input type="submit" value="Save description"/></form><br/>
<br/>
{% spaceless %}
<center>
<form action="?subtopic=guilds&guild='.$guild->getName().'&action=manager" method="post">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)">
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);">
<div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" >
</div>
</div>
</form>
</center>
{% endspaceless %}

View File

@ -0,0 +1,40 @@
<center><h2>Change guild logo</h2></center>
Here you can change logo of your guild.<br/>Actuall logo: <img src="images/guilds/{{ guild_logo }}" height="64" width="64"><br/><br/>
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=changelogo" method="post" id="upload_form">
<input type="hidden" name="todo" value="save" />
<input type="hidden" name="MAX_FILE_SIZE" value="{{ max_image_size_b }}" />
Select new logo: <input name="newlogo" id="newlogo" type="file" />
<input type="submit" value="Send new logo" />
</form>
Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ config.guild_image_size_kb }} KB</b><br>
<br/>
{% spaceless %}
<center>
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)">
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);">
<div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" />
</div>
</div>
</form>
</center>
{% endspaceless %}
<script type="text/javascript">
$(function() {
$('#upload_form').submit(function (event) {
var max_img_size = {{ config.guild_image_size_kb * 1024 }};
var input = document.getElementById("newlogo");
// check for browser support (may need to be modified)
if (input.files && input.files.length == 1) {
if (input.files[0].size > max_img_size) {
alert("The file must be less than " + (max_img_size / 1024) + "KB");
event.preventDefault();
return false;
}
}
return true;
});
});
</script>

View File

@ -0,0 +1,19 @@
<center><h2>Change guild MOTD</h2></center>
Here you can change MOTD (Message of the Day, showed in game!) of your guild.<br/>
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=changemotd" method="post">
<input type="hidden" name="todo" value="save"/>
<textarea name="motd" cols="60" rows="3">{{ guild.getCustomField('motd')|raw }}</textarea><br/>
(max. {{ config.guild_motd_chars_limit }} chars) <input type="submit" value="Save MOTD" /></form><br/>
<br/>
{% spaceless %}
<center>
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)">
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);">
<div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);"></div>
<input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif">
</div>
</div>
</form>
</center>
{% endspaceless %}

View File

@ -0,0 +1,57 @@
<form action="?subtopic=guilds&action=createguild&todo=save" method="post">
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<td bgcolor="{{ config.vdarkborder }}" class="white"><B>Create a {{ config.lua.serverName }} Guild</b></td>
</tr>
<tr>
<td bgcolor="{{ config.darkborder }}">
<table border="0" cellspacing="8" cellpadding="0">
<tr>
<td>
<table border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="150" valign="top">
<b>Leader: </b>
</td>
<td>
<select name="name">
{% for player in players %}
<option>{{ player }}</option>
{% endfor %}
</select><br/>
<font size="1" face="verdana,arial,helvetica">(Name of leader of new guild.)</font>
</td>
</tr>
<tr>
<td width="150" valign="top"><b>Guild name: </b></td>
<td>
<input name="guild" value="" size="30" maxlength="50"/><br/>
<font size="1" face="verdana,arial,helvetica">(Here write name of your new guild.)</font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<table border=0 width=100%>
<tr>
<td align="center">
<img src="{{ template_path }}/images/general/blank.gif" width=120 height=1 border=0><br/>
</td>
<td align="center" valign="top">
<input type=image name="Submit" src="{{ template_path }}/images/buttons/sbutton_submit.gif" border="0" width="120" height="18"/>
</form>
</td>
<td align="center">
<form action="?subtopic=guilds" method="post">
<input type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/sbutton_back.gif" border="0" width="120" height="18"/>
</form>
</td>
<td align="center">
<img src="{{ template_path }}/images/general/blank.gif" width="120" height="1" border="0"><br>
</td>
</tr>
</table>

View File

@ -0,0 +1,46 @@
<div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0">
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >Delete Guild</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table style="width:100%;" >
<tr>
<td>Are you sure you want delete guild <b>{{ guild.getName() }}</b>?<br/>
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=deleteguild" method="post">
<input type="hidden" name="todo" value="save"/>
<input type="submit" value="Yes, delete"/>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<br/>
{% spaceless %}
<center>
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)">
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" >
<div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif">
</div>
</div>
</form>
</center>
{% endspaceless %}

View File

@ -0,0 +1,169 @@
<center><h2>Welcome to guild manager!</h2></center>
Here you can change names of ranks, delete and add ranks, pass leadership to other guild member and delete guild.
<br/><br/>
<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="{{ config.darkborder }}">
<td width="170">
<font color="red"><b>Option</b></font>
</td>
<td>
<font color="red"><b>Description</b></font>
</td>
</tr>
<tr bgcolor="{{ config.lightborder }}">
<td width="170">
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=passleadership">Pass Leadership</a></b>
</td>
<td>
<b>Pass leadership of guild to other guild member.</b>
</td>
</tr>
<tr bgcolor="{{ config.darkborder }}">
<td width="170">
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=deleteguild">Delete Guild</a></b>
</td>
<td>
<b>Delete guild, kick all members.</b>
</td>
</tr>
<tr bgcolor="{{ config.lightborder }}">
<td width="170">
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changedescription">Change Description</a></b>
</td>
<td>
<b>Change description of guild.</b>
</td>
</tr>
{% if constant('MOTD_EXISTS') %}
<tr bgcolor="{{ config.darkborder }}">
<td width="170">
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changemotd">Change MOTD</a></b>
</td>
<td>
<b>Change MOTD of guild.</b>
</td>
</tr>
{% endif %}
<tr bgcolor="{{ config.lightborder }}">
<td width="170">
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changelogo">Change guild logo</a></b>
</td>
<td>
<b>Upload new guild logo.</b>
</td>
</tr>
</table>
<br/>
<div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0">
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >Add new rank</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table style="width:100%;">
<tr>
<td width="120" valign="top">New rank name:</td>
<td>
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=addrank" method="post">
<input type="text" name="rank_name" size="20"/>
<input type="submit" value="Add"/>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<center><h3>Change rank names and levels</h3></center>
<form action="?subtopic=guilds&action=saveranks&guild={{ guild.getName() }}" method="post">
<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td rowspan="2" width="120" align="center">
<font color="white"><b>ID/Delete Rank</b></font>
</td>
<td rowspan="2" width="300">
<font color="white"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name</b></font>
</td>
<td colspan="3" align="center">
<font color="white"><b>Level of RANK in guild</b></font>
</td>
</tr>
<tr bgcolor="{{ config.vdarkborder }}">
<td align="center" bgcolor="red">
<font color="white"><b>Leader (3)</b></font>
</td>
<td align="center" bgcolor="yellow">
<font color="black"><b>Vice (2)</b></font>
</td>
<td align="center" bgcolor="green">
<font color="white"><b>Member (1)</b></font>
</td>
</tr>
{% set i = 0 %}
{% for rank in rank_list %}
<tr bgcolor="{{ getStyle(i) }}">
<td align="center">{{ rank.getId() }} // <a href="?subtopic=guilds&guild={{ guild.getName() }}&action=deleterank&rankid={{ rank.getId() }}" border="0"><img src="{{ template_path }}/images/news/delete.png" border="0" alt="Delete Rank"></a>
</td>
<td>
<input type="text" name="{{ rank.getId() }}_name" value="{{ rank.getName() }}" size="35"/>
</td>
<td align="center">
<input type="radio" name="{{ rank.getId() }}_level" value="3"
{% if rank.getLevel() == 3 %} checked="checked"{% endif %}/>
</td>
<td align="center">
<input type="radio" name="{{ rank.getId() }}_level" value="2"
{% if rank.getLevel() == 2 %} checked="checked"{% endif %}/>
</td>
<td align="center">
<input type="radio" name="{{ rank.getId() }}_level" value="1"
{% if rank.getLevel() == 1 %} checked="checked"{% endif %}/>
</td>
</tr>
{% set i = i + 1 %}
{% endfor %}
<tr bgcolor="{{ config.vdarkborder }}">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td colspan="3" align="center">
<input type="submit" value="Save All"/>
</td>
</tr>
</table>
</form>
<h3>Ranks info:</h3>
<b>0. Owner of guild</b> - it's highest rank, only one player in guild may has this rank. Player with this rank can:
<li>Invite/Cancel Invitation/Kick Player from guild</li>
<li>Change ranks of all players in guild</li>
<li>Delete guild or pass leadership to other guild member</li>
<li>Change names, levels (leader, vice, member), add and delete ranks</li>
<li>Change {% if constant('MOTD_EXISTS') %}MOTD, {% endif %}logo and description of guild</li>
<hr/>
<b>1. Leader</b> - it's second rank in guild. Player with this rank can:
<li>Invite/Cancel Invitation/Kick Player from guild (only with lower rank than his)
<li>Change ranks of players with lower rank level ("vice leader", "member") in guild<hr>
<b>2. Vice Leader</b> - it's third rank in guild. Player with this rank can:
<li>Invite/Cancel Invitation
<li>Change ranks of players with lower rank level ("member") in guild<hr>
<b>3. Member</b> - it's lowest rank in guild. Player with this rank can:
<li>Be a member of guild
<br/>
<center>
<form action="?subtopic=guilds&action=show&guild={{ guild.getName() }}" method="post">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
</div>
</form>
</center>

View File

@ -0,0 +1,41 @@
<div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0">
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >Pass leadership</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;">
<tr>
<td>Pass leadership to: </b><br>
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=passleadership" method="post">
<input type="hidden" name="todo" value="save"/>
<input type="text" size="40" name="player"/>
<input type="submit" value="Save">
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<br/>
<center>
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
</div>
</form>
</center>

View File

@ -0,0 +1,11 @@
Hello!<br/>
<br/>
Thank you for registering on {{ config.lua.serverName }}!<br/>
<br/>
Here are the details of your account:<br/>
Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}: {{ account }}<br/>
Password: ************ (hidden for security reasons)<br/>
<br/>
To verify your email address please click the link below:<br/>
{{ verify_url|raw }}<br/>
If you haven't registered on {{ config.lua.serverName }} please ignore this email.

View File

@ -0,0 +1,11 @@
Hello!
Thank you for registering on {{ config.lua.serverName }}!
Here are the details of your account:
Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}: {{ account }}
Password: ************ (hidden for security reasons)
To verify your email address please click the link below:
{{ verify_url }}
If you haven't registered on {{ config.lua.serverName }} please ignore this email.

View File

@ -1,5 +1,8 @@
<h2>{{ title }}</h2><br/>
{{ description|raw }}
{% if custom_buttons is defined %}
{{ custom_buttons|raw }}
{% else %}
<div style="text-align: center; margin: 0 auto;">
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post">
@ -10,4 +13,5 @@
</tr>
</form>
</table>
</div>
</div>
{% endif %}