View file plugins/games/leprechaun/index.php

File size: 2.53Kb
<?php 

include_once $_SERVER['DOCUMENT_ROOT'].'/sys/inc/home.php';
include_once H.'sys/inc/start.php';
include_once H.'sys/inc/compress.php';
include_once H.'sys/inc/sess.php';
include_once H.'sys/inc/settings.php';
include_once H.'sys/inc/db_connect.php';
include_once H.'sys/inc/ipua.php';
include_once H.'sys/inc/fnc.php';
include_once H.'sys/inc/user.php';

if (isset($user) && isset($_SESSION['leprchaun'])) {
    $coins = $_SESSION['leprchaun'];
    mysql_query("UPDATE user SET money = money + '$coins' WHERE id = '$user[id]' LIMIT 1");
    unset($_SESSION['leprchaun']);
} else {
    header('Location: ' . (isset($_GET['ret']) ? text($_GET['ret']) : '/index.php'));
    exit;
}

$set['title'] = __('Золото Лепрекона');

include_once H.'sys/inc/thead.php';
title();
aut(); 

?>
<style>
table.repl {
  background: #fff;
  margin: 0;
  padding: 0;
}
table.repl td {
  width: 50%;
}
table.repl td.repl-left {
  text-align: right;
}

.repl-title {
  padding: 4px;
  display: block;
  background-color: #ce950f;
  color: #fff;
  font-weight: 700;
  font-family: "tahoma";
  border-radius: 6px;
  -moz-border-radius: 6px;
  margin: 4px;
  text-align: left;
  position: relative;
}

.repl-title::after {
	margin-left: 20px;
 	margin-bottom: 0;
	border-style: solid;
	border-color: transparent  transparent #ce950f  transparent;
	border-width: 0px 10px 10px 0px;	
	height: 0px; 
	width: 0px;
  content: " ";
  position: absolute;
  right: -10px;
  top: 20px;
}

.repl-info {
  font-size: 11px;
  color: gray;
}
</style>

<div>
  <table class="repl" cellpadding="0" cellspacing="0">
  <tr>
  <td class="repl-left">
  <span class="repl-title">
    Поздравляю! Ты нашел моё золото, и за это я вручаю тебе <?= des2num($coins, array('монету', 'монеты', 'монет'))?>!
  </span>
  
  <div>
  <img src="/plugins/games/leprechaun/res/app_g.png" /> 
  </div>
  
  </td>
  <td class="repl-right">
  <img src="/plugins/games/leprechaun/res/app_r.png" /> 
  </td>
  </tr>
  </table>
</div>

<div class="nav2 repl-info">
  * Передвигаясь по сайту, ты можешь найти горшок с золотом Лепрекона, спеши нажать на него, и ты получишь свое вознаграждение!
</div>

<div class="foot">
  &laquo; <a href="<?= (isset($_GET['ret']) ? text($_GET['ret']) : '/index.php')?>">Назад</a>
</div>
<?

include_once H.'sys/inc/tfoot.php';