Commit 9ff0caa1 authored by Toldierone's avatar Toldierone

vanilla code with txt license

parents
Pipeline #2741786 skipped
Icons/0.png

570 Bytes

Icons/1.png

302 Bytes

Icons/10.png

224 Bytes

Icons/11.png

277 Bytes

Icons/12.png

226 Bytes

Icons/13.png

288 Bytes

Icons/14.png

266 Bytes

Icons/15.png

304 Bytes

Icons/16.png

302 Bytes

Icons/17.png

239 Bytes

Icons/18.png

238 Bytes

Icons/19.png

272 Bytes

Icons/2.png

302 Bytes

Icons/20.png

239 Bytes

Icons/21.png

288 Bytes

Icons/22.png

278 Bytes

Icons/23.png

287 Bytes

Icons/24.png

246 Bytes

Icons/25.png

281 Bytes

Icons/26.png

275 Bytes

Icons/27.png

294 Bytes

Icons/28.png

269 Bytes

Icons/29.png

303 Bytes

Icons/3.png

242 Bytes

Icons/30.png

300 Bytes

Icons/31.png

591 Bytes

Icons/32.png

291 Bytes

Icons/33.png

242 Bytes

Icons/34.png

240 Bytes

Icons/35.png

276 Bytes

Icons/36.png

247 Bytes

Icons/37.png

284 Bytes

Icons/38.png

276 Bytes

Icons/39.png

319 Bytes

Icons/4.png

301 Bytes

Icons/40.png

225 Bytes

Icons/41.png

288 Bytes

Icons/42.png

267 Bytes

Icons/43.png

279 Bytes

Icons/44.png

271 Bytes

Icons/45.png

305 Bytes

Icons/46.png

308 Bytes

Icons/47.png

601 Bytes

Icons/48.png

242 Bytes

Icons/49.png

287 Bytes

Icons/5.png

239 Bytes

Icons/50.png

278 Bytes

Icons/51.png

290 Bytes

Icons/52.png

291 Bytes

Icons/53.png

318 Bytes

Icons/54.png

315 Bytes

Icons/55.png

596 Bytes

Icons/56.png

270 Bytes

Icons/57.png

278 Bytes

Icons/58.png

277 Bytes

Icons/59.png

600 Bytes

Icons/6.png

247 Bytes

Icons/60.png

303 Bytes

Icons/61.png

612 Bytes

Icons/62.png

605 Bytes

Icons/63.png

317 Bytes

Icons/7.png

279 Bytes

Icons/8.png

302 Bytes

Icons/9.png

238 Bytes

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
\ No newline at end of file
<?php
include ("backend/minimal.php");
if ($_SESSION['user_id'] && ($_GET['message'] != "") && ($_GET['token'] == $_SESSION["token_chat"])) {
$mysql['message'] = $GLOBALS['mysqli']->real_escape_string($_GET['message']);
$sql=<<<EOSQL
SELECT message_id FROM chat WHERE user_id = '{$_SESSION['user_id']}' AND posted > DATE_SUB(NOW(), INTERVAL 1 SECOND)
EOSQL;
$rs = onelinequery($sql);
if (!$rs['message_id']) {
$sql=<<<EOSQL
INSERT INTO chat SET message = '{$mysql['message']}', posted = NOW(), user_id = '{$_SESSION['user_id']}'
EOSQL;
$GLOBALS['mysqli']->query($sql);
$sql=<<<EOSQL
DELETE FROM chat WHERE posted <= DATE_SUB(NOW(), INTERVAL 1 WEEK)
EOSQL;
$GLOBALS['mysqli']->query($sql);
}
}
?>
\ No newline at end of file
This diff is collapsed.
<?php
include("backend/backend_alliancebankresources.php");
$extratitle = "Bank Alliance Resources - ";
include("header.php");
$token = $_SESSION["token_alliancebankresources"];
echo <<<EOFORM
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">Banked Defense Costs (Alliance)</div>
<div class="row">
<div class="col-md-6">Burden</div>
<div class="col-md-6">{$constants['alliancesecurityforburden']} Security</div>
</div>
<div class="row">
<div class="col-md-6">Corruption</div>
<div class="col-md-6">{$constants['allianceserenityforcorrupt']} Serenity</div>
</div>
<div class="row">
<div class="col-md-6">Sadness</div>
<div class="col-md-6">{$constants['allianceserenityforsadness']} Serenity</div>
</div>
<div class="row">
<div class="col-md-6">Theft</div>
<div class="col-md-6">{$constants['alliancesecurityfortheft']} Security</div>
</div>
<div class="row">
<div class="col-md-6">Spying</div>
<div class="col-md-6">{$constants['allianceunitytoblock']} Unity</div>
</div>
</div>
</div>
<div class="col-md-4">
</div>
</div>
<center>
<div class="panel panel-default" style="width:33%">
<div class="panel-heading">Bank Resources</div>
<form action="alliancebankresources.php" method="post" class="form-inline" role="form">
<input type="hidden" name="token_alliancebankresources" value="{$token}"/>
<div class="form-group row">
<div class="col-sm-6">
<select name="resource_id" class="form-control">
EOFORM;
foreach ($bankableresources as $resource_id => $name) {
echo <<<EOFORM
<option value="{$resource_id}">{$name}</option>
EOFORM;
}
echo <<<EOFORM
</select>
</div>
<div class="col-sm-6">
<div class="input-group">
<input name="amount" placeholder="Amount" value="" class="form-control" type="text"/>
<span class="input-group-btn">
<input type="submit" name="bank" value="Bank" class="btn btn-success"/>
</span></div></div></div></form></div>
</center>
<center>
<div class="panel panel-default" style="max-width:800px">
<div class="panel-heading">Banked Resources</div>
<table class="table table-striped">
EOFORM;
if ($bankedresources) {
foreach ($bankedresources as $resource_id => $amount) {
if (!$userinfo['hideicons']) {
echo <<<EOFORM
<td style="width: 16px;"><img src="images/icons/{$resource_id}.png"/></td>
EOFORM;
}
echo <<<EOFORM
<td>{$bankableresources[$resource_id]}</td>
<td>{$amount}</td>
<td style="width:50%">
<form action="alliancebankresources.php" method="post" class="form-horizontal" role="form">
<input type="hidden" name="token_alliancebankresources" value="{$token}"/>
<input type="hidden" name="resource_id" value="{$resource_id}"/>
<div class="row">
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-btn"><input type="submit" name="unbank" value="Unbank:" class="btn btn-warning"/></span>
<input name="amount" placeholder="Amount" value="" class="form-control" type="text"/></div></div>
<div class="col-sm-6"><input type="submit" name="unbankall" value="Unbank All" class="btn btn-danger"/></div></div></div>
</form></td></tr>
EOFORM;
}
}
echo <<<EOFORM
</table></center>
EOFORM;
include("footer.php");
?>
\ No newline at end of file
<?php
include("backend/backend_alliancedeals.php");
$extratitle = "Alliance Deals - ";
include("header.php");
echo <<<EOFORM
<center>Make a deal with the alliance of
<form action="alliancedeals.php" method="post">
<input type="hidden" name="token_alliancedeals" value="{$_SESSION['token_alliancedeals']}"/>
<input type="text" class="form-control" name="name" style="width:200px;"/>
<input type="submit" name="makedeal" value="Make Deal" class="btn btn-success btn-primary"/>
</form>
EOFORM;
if (!empty($outgoingdeals)) {
foreach ($outgoingdeals as $deal) {
echo <<<EOFORM
<center><h4><a href="viewalliance.php?alliance_id={$deal['alliance_id']}"/>{$deal['name']}</a></h4></center>
EOFORM;
if (!empty($offeritems[$deal['deal_id']])) {
echo <<<EOFORM
<center><h4>Offered Items</h4></center>
<center><table class="table table-striped table-bordered" style="width:400px;">
EOFORM;
foreach ($offeritems[$deal['deal_id']] as $item) {
$itemamount = commas($item['amount']);
echo <<<EOFORM
<tr><td>{$item['name']}</td><td>{$itemamount}</td></tr>
EOFORM;
}
echo "</table></center>";
}
if (!empty($askitems[$deal['deal_id']])) {
echo <<<EOFORM
<center><h4>Requested Items</h4></center>
<center><table class="table table-striped table-bordered" style="width:400px;">
EOFORM;
foreach ($askitems[$deal['deal_id']] as $item) {
$itemamount = commas($item['amount']);
echo <<<EOFORM
<tr><td>{$item['name']}</td><td>{$itemamount}</td></tr>
EOFORM;
}
echo "</table></center>";
}
if ($deal['peaceturns']) {
echo <<<EOFORM
<center><h4>{$deal['peaceturns']} ticks of peace</h4></center>
EOFORM;
}
echo <<<EOFORM
<form action="alliancedeals.php" method="post">
<input type="hidden" name="token_alliancedeals" value="{$_SESSION['token_alliancedeals']}"/>
<input type="hidden" name="deal_id" value="{$deal['deal_id']}"/>
EOFORM;
if (!$deal['finalized']) {
echo <<<EOFORM
<center><a href="alliancemakedeal.php?deal_id={$deal['deal_id']}">Edit Deal</a></center>
EOFORM;
} else {
echo <<<EOFORM
<center>This deal is finalized and sent; you cannot edit it.</center>
EOFORM;
}
echo <<<EOFORM
<input type="submit" name="canceldeal" value="Cancel Deal" class="btn btn-danger btn-primary"/>
</form>
EOFORM;
}
} else {
echo <<<EOFORM
<center>You have no outgoing deal requests.</center>
EOFORM;
}
if (!empty($deals)) {
foreach ($deals as $deal) {
echo <<<EOFORM
<center><h4><a href="viewalliance.php?alliance_id={$deal['fromalliance']}"/>{$deal['name']}</a></h4></center>
EOFORM;
if (!empty($offeritems[$deal['deal_id']])) {
echo <<<EOFORM
<center><h4>Offered Items</h4></center>
<center><table class="table table-striped table-bordered" style="width:400px;">
EOFORM;
foreach ($offeritems[$deal['deal_id']] as $item) {
$itemamount = commas($item['amount']);
echo <<<EOFORM
<tr><td>{$item['name']}</td><td>{$itemamount}</td></tr>
EOFORM;
}
echo "</table></center>";
}
if (!empty($askitems[$deal['deal_id']])) {
echo <<<EOFORM
<center><h4>Requested Items</h4></center>
<center><table class="table table-striped table-bordered" style="width:400px;">
EOFORM;
foreach ($askitems[$deal['deal_id']] as $item) {
$itemamount = commas($item['amount']);
echo <<<EOFORM
<tr><td>{$item['name']}</td><td>{$itemamount}</td></tr>
EOFORM;
}
echo "</table></center>";
}
if ($deal['peaceturns']) {
echo <<<EOFORM
<center><h4>{$deal['peaceturns']} ticks of peace</h4></center>
EOFORM;
}
echo <<<EOFORM
<form action="alliancedeals.php" method="post">
<input type="hidden" name="token_alliancedeals" value="{$_SESSION['token_alliancedeals']}"/>
<input type="hidden" name="deal_id" value="{$deal['deal_id']}"/>
<center><input type="submit" name="acceptdeal" value="Accept Deal" class="btn btn-success btn-primary"/>
<input type="submit" name="rejectdeal" value="Reject Deal" class="btn btn-danger btn-primary"/></center>
</form>
EOFORM;
}
} else {
echo <<<EOFORM
<center>You have no incoming deal requests.</center>
EOFORM;
}
include("footer.php");
?>
\ No newline at end of file
<?php
include("backend/backend_allianceincoming.php");
$extratitle = "Incoming Alliance Attacks - ";
include("header.php");
$token = $_SESSION["token_allianceincoming"];
$usetime = time();
if (date("H") % 3 == 1) {
$usetime += 7200;
} else if (date("H") % 3 == 2) {
$usetime += 3600;
} else {
$usetime += 10800;
}
echo <<<EOFORM
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Nullification Costs</div>
<div class="row">
<div class="col-md-6">Burden</div>
<div class="col-md-6">{$constants['zealforburden']} Zeal</div>
</div>
<div class="row">
<div class="col-md-6">Corruption</div>
<div class="col-md-6">{$constants['zealforcorrupt']} Zeal</div>
</div>
<div class="row">
<div class="col-md-6">Sadness</div>
<div class="col-md-6">{$constants['zealforsadness']} Zeal</div>
</div>
<div class="row">
<div class="col-md-6">Theft</div>
<div class="col-md-6">{$constants['zealfortheft']} Zeal</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">Redirection Costs</div>
<div class="row">
<div class="col-md-6">Burden</div>
<div class="col-md-6">{$constants['alliancemaliceforburden']} Malice</div>
</div>
<div class="row">
<div class="col-md-6">Corruption</div>
<div class="col-md-6">{$constants['alliancemaliceforcorrupt']} Malice</div>
</div>
<div class="row">
<div class="col-md-6">Sadness</div>
<div class="col-md-6">{$constants['alliancemaliceforsadness']} Malice</div>
</div>
<div class="row">
<div class="col-md-6">Theft</div>
<div class="col-md-6">{$constants['alliancemalicefortheft']} Malice</div>
</div>
</div>
</div>
</div>
EOFORM;
if ($attacks) {
echo <<<EOFORM
<table class="table table-striped">
<tr><td><div class="row"><div class="col-md-6">Attack</div><div class="col-md-2">Arrives</div><div class="col-md-4">Actions</div></div></td></tr>
EOFORM;
foreach ($attacks as $attack) {
echo <<<EOFORM
<tr><td><div class="row">
EOFORM;
switch ($attack['type']) {
case "burden":
echo <<<EOFORM
<div class="col-md-6">{$attack['attackername']} is burdening your alliance with a resource.</div>
EOFORM;
break;
case "corrupt":
echo <<<EOFORM
<div class="col-md-6">{$attack['attackername']} is corrupting your alliance focus to {$resourcename[$attack['resource_id']]}.</div>
EOFORM;
break;
case "sadness":
echo <<<EOFORM
<div class="col-md-6">{$attack['attackername']} is inflicting sadness on your alliance for 500 points of satisfaction.</div>
EOFORM;
break;
case "theft":
echo <<<EOFORM
<div class="col-md-6">{$attack['attackername']} is stealing a resource from your alliance.</div>
EOFORM;
break;
default:
break;
}
$addtime = $attack['ticks'] * 10800;
$arrivaldate = date("g A M j", $usetime + $addtime);
echo <<<EOFORM
<div class="col-md-2">{$arrivaldate}</div>
<form name="repelform" action="allianceincoming.php" method="post">
<input type="hidden" name="attack_id" value="{$attack['attack_id']}"/>
<input type="hidden" name="token_allianceincoming" value="{$token}"/>
<div class="col-md-1">
<input type="submit" name="nullify" value="Nullify" class="btn btn-success"/>
</div>
</form>
<form name="repelform" action="allianceincoming.php" method="post">
<input type="hidden" name="attack_id" value="{$attack['attack_id']}"/>
<input type="hidden" name="token_allianceincoming" value="{$token}"/>
<div class="col-md-3">
<div class="input-group">
<span class="input-group-btn">
<input type="submit" name="redirect" value="Redirect to:" class="btn btn-danger"/>
</span>
<input name="target" placeholder="Target" class="form-control" type="text"/>
</div></div>
</form>
</div></td></tr>
EOFORM;
}
echo <<<EOFORM
</table>
EOFORM;
} else {
echo <<<EOFORM
<center>No one is attacking your alliance.</center>
EOFORM;
}
?>
\ No newline at end of file
<?php
include("backend/backend_allianceinvites.php");
$extratitle = "Alliance Invitations - ";
include("header.php");
$token = $_SESSION["token_allianceinvites"];
if ($invitations) {
echo <<<EOFORM
<table>
EOFORM;
foreach ($invitations as $alliance_id => $alliancename) {
echo <<<EOFORM
<tr><td><a href="viewalliance.php?alliance_id={$alliance_id}">{$alliancename}</a></td><td>
<form name="acceptreject{$alliance_id}" action="allianceinvites.php" method="post">
<input type="hidden" name="token_allianceinvites" value="{$token}"/>
<input type="hidden" name="alliance_id" value="{$alliance_id}"/>
<input type="submit" onclick="return confirm('Really accept an invitation to {$alliancename}?')" name="acceptinvitation" value="Accept Invitation" class="btn btn-success"/>
<input type="submit" onclick="return confirm('Really refuse an invitation to {$alliancename}?')" name="refuseinvitation" value="Refuse Invitation" class="btn btn-danger"/>
</form>
</td></tr>
EOFORM;
}
echo <<<EOFORM
</table>
EOFORM;
} else {
echo <<<EOFORM
<center>No one has sent you an invitation to join an alliance.</center>
EOFORM;
}
include("footer.php");
?>
\ No newline at end of file
<?php
include("backend/backend_alliancemakedeal.php");
$extratitle = "Alliance Make Deal - ";
include("header.php");
echo <<<EOFORM
<center>Making a deal with</center>
<center><h4>{$dealinfo['name']}</h4></center>
<center>Cost to Deal: {$honorcost} Honor</center>
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4">
<div class="panel panel-warning">
<div class="panel-heading">Peace</div>
<form action="alliancemakedeal.php" method="post">
<input type="hidden" name="token_alliancemakedeal" value="{$_SESSION['token_alliancemakedeal']}"/>
<input type="hidden" name="deal_id" value="{$dealinfo['deal_id']}"/>
<div class="input-group">
<input name="peaceturns" placeholder="Additional Peace Ticks" type="text" value="{$dealinfo['peaceturns']}" class="form-control"/>
<span class="input-group-btn">
<input type="submit" name="changepeace" value="Add Peace Agreement" class="btn btn-success"/>
</span>
</div>
</form>
</div>
</div>
<div class="col-md-4">
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel panel-warning">
<div class="panel-heading">Offer</div>
EOFORM;
if (!empty($offeritems)) {
echo <<<EOFORM
<table class="table">
<tbody>
EOFORM;
foreach ($offeritems as $item) {
$itemamount = commas($item['amount']);
echo <<<EOFORM
<tr>
<td style="text-align: right;">{$item['name']}</td>
<td>{$itemamount}</td>
<td>
<form action="alliancemakedeal.php" method="post">
<input type="hidden" name="type" value="item"/>
<input type="hidden" name="token_alliancemakedeal" value="{$_SESSION['token_alliancemakedeal']}"/>
<input type="hidden" name="type" value="item"/>
<input type="hidden" name="deal_id" value="{$dealinfo['deal_id']}"/>
<input type="hidden" name="resource_id" value="{$item['resource_id']}"/>
<input type="submit" name="removeoffer" value="Remove Item" class="btn btn-warning btn-block"/>
</form>
</td>
</tr>
EOFORM;
}
echo "</tbody></table>";
}
echo <<<EOFORM
<div class="panel-footer">
<form action="alliancemakedeal.php" method="post" class="form-inline" role="form">
<input type="hidden" name="token_alliancemakedeal" value="{$_SESSION['token_alliancemakedeal']}"/>
<input type="hidden" name="deal_id" value="{$dealinfo['deal_id']}"/>
<input type="hidden" name="type" value="item"/>
Offer this item:
<select name="resource_id" class="form-control" style="width:210px;"/>
EOFORM;
echo elementsdropdown(true, true);
echo <<<EOFORM
</select>
in this quantity:
<div class="input-group">
<input type="text" class="form-control" name="amount" placeholder="Qty"/>
<span class="input-group-btn">
<input type="submit" name="offeritem" value="Offer Item" class="btn btn-primary"/>
</span>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-success">
<div class="panel-heading">Request</div>
EOFORM;
if (!empty($askitems)) {
echo <<<EOFORM
<table class="table">
<tbody>
EOFORM;
foreach ($askitems as $item) {
$itemamount = commas($item['amount']);
echo <<<EOFORM
<tr>
<td style="text-align: right;">{$item['name']}</td>
<td>{$itemamount}</td>
<td>
<form action="alliancemakedeal.php" method="post">
<input type="hidden" name="type" value="item"/>
<input type="hidden" name="token_alliancemakedeal" value="{$_SESSION['token_alliancemakedeal']}"/>
<input type="hidden" name="deal_id" value="{$dealinfo['deal_id']}"/>
<input type="hidden" name="resource_id" value="{$item['resource_id']}"/>
<input type="submit" name="removeask" value="Remove Item" class="btn btn-warning btn-block"/>
</form>
</td>
</tr>