Esempio n. 1
0
 public function caravan_dismis($config, $ca)
 {
     call("delete from caravan where ca_id = {$ca}");
     require_once 'functions/MsgMgr.php';
     $MsgMgr = new MsgMgr();
     $MsgMgr->raport($config, $town, 'karawana zakończyła podróż w  ' . $tname);
 }
Esempio n. 2
0
 public function colectors_dismis($config, $town, $id)
 {
     $data = get_row("select * from colectors where co_id = {$id}");
     call("update game_objects set go_lvl = go_lvl + " . $data->co_counts . " where go_type = 3 and go_subtype = 8 and go_t_id =" . $town);
     require_once 'functions/TownMgr.php';
     $towns = new TownMgr();
     $towns->change_resources($config, $town, $data->co_wood, $data->co_stone, $data->co_iron, 0);
     require_once 'functions/MsgMgr.php';
     $MsgMgr = new MsgMgr();
     $user = get_one("select t_usr_id from towns where t_id = " . $town);
     $MsgMgr->raport($config, $user, 'Zbieracze powrócili do miasta i przynieśli ze sobą ' . $data->co_wood . ' drewna, ' . $data->co_stone . ' gliny i ' . $data->co_iron . ' żelaza');
 }
Esempio n. 3
0
if (empty($status)) {
    $status = 0;
}
$options = "\n<li><a href='?action=clan'>info</a></li>\n<li><a href='?action=clan&act=search'>szukaj</a></li>\n<li><a href='?action=clan&act=list'>lista klanów</a></li>\n";
$msg = '';
if (!empty($_POST['clan_name'])) {
    require_once 'functions/ClanMgr.php';
    $ClanMgr = new ClanMgr();
    $msg = $ClanMgr->new_clan($config, $player, $_POST['clan_name']);
    echo $msg;
    $player = getUser($config);
    $player->town = getTown($config, $player);
}
if (!empty($_POST['text'])) {
    require_once 'functions/MsgMgr.php';
    $MsgMgr = new MsgMgr();
    $msg = $MsgMgr->clan_msg($config, $player, $_POST['text']);
    echo $msg;
}
if (!empty($_GET['del'])) {
    require_once 'functions/ClanMgr.php';
    $ClanMgr = new ClanMgr();
    $msg = $ClanMgr->del_clan($config, $player);
    echo $msg;
    $player = getUser($config);
    $player->town = getTown($config, $player);
}
if (!empty($_GET['del_app'])) {
    require_once 'functions/ClanMgr.php';
    $ClanMgr = new ClanMgr();
    $ClanMgr->del_app($config, $player, $_GET['del_app']);
Esempio n. 4
0
<?php

if (!empty($_POST['text'])) {
    require_once 'functions/MsgMgr.php';
    $mess = new MsgMgr();
    echo $mess->msg_admin_send_mass($config, $_POST['text']);
}
?>
<form name='form1' method='post' action='?action=massmsg'>
    
        
    <h2>Wyślij wiadomość masową</h2>
    <div class='box'>
        <div class='formbox'>


            <div class='row'>
                <div class='left'>Wiadomość:		            

                </div>

                <div class='right'><textarea name='text' cols='45' rows='8' id='msg' class='form'></textarea></div>
            </div>
           

            <div class='buttonrow'>
                <input name='submit' value='wyślij' type='submit'>
            </div>
        </div>
    </div>
    </form>
Esempio n. 5
0
		<li class="personal"><a href="?action=messages&type=3">Raporty</a></li>
		<li class="personal"><a href="?action=messages&type=4">Informacje</a></li>
    </ul>
    
    
    
</div><!-- .pageSubnav -->  
<DIV id="content" class="contentNormal">

<div class='box'>
		

<?php 
$msg = '';
require_once 'functions/MsgMgr.php';
$mess = new MsgMgr();
if (!empty($_POST['to']) && !empty($_POST['text'])) {
    $msg = $mess->msg_send($config, $player->usr_id, $_POST['to'], $_POST['text']);
}
if (!empty($_GET['m_id']) && !empty($_GET['del']) && !empty($_GET['type'])) {
    $mess->msg_del($config, $player->usr_id, $_GET['type'], $_GET['m_id']);
}
if (!empty($_GET['del_all']) && !empty($_GET['type'])) {
    $mess->msg_del_all($config, $player->usr_id, $_GET['type']);
}
if (!empty($_GET['type'])) {
    switch ($_GET['type']) {
        case 1:
            $messages = get_all("select m_id, m_text, m_type, login,  avatar, usr_id,m_date, m_status from messages inner join users on m_from = usr_id where m_to = " . $player->usr_id . " and m_type = 1 order by m_status asc, m_id desc");
            $from = "od ";
            break;
Esempio n. 6
0
 public function army_dismis($config, $town, $army_id)
 {
     $units = get_all("select * from army_units where au_a_id = {$army_id} and au_counts > 0");
     call("delete from army where a_id = {$army_id}");
     call("delete from army_units where au_a_id = {$army_id}");
     if (is_array($units)) {
         foreach ($units as $unit) {
             call("update game_objects set go_lvl = go_lvl + " . $unit->au_counts . " where go_type = 3 and go_subtype = " . $unit->au_gop_subtype . " and go_t_id =" . $town);
         }
     }
     require_once 'functions/MsgMgr.php';
     $MsgMgr = new MsgMgr();
     $user = get_one("select t_usr_id from towns where t_id = " . $town);
     $MsgMgr->raport($config, $user, 'Armia powróciłą do miasta ');
 }
Esempio n. 7
0
 public function spy_dismis($config, $town, $counts)
 {
     call("update game_objects set go_lvl = go_lvl + {$counts} where go_type = 3 and go_subtype = 7 and go_t_id =" . $town);
     require_once 'functions/MsgMgr.php';
     $MsgMgr = new MsgMgr();
     $user = get_one("select t_usr_id from towns where t_id = " . $town);
     $MsgMgr->raport($config, $user, 'Szpiegowie powrócili do miasta');
 }
Esempio n. 8
0
 public function quest_end($config, $player)
 {
     $quest = (int) $quest;
     if ($player->in_quest != 0) {
         $quest = get_row("select * , unix_timestamp() as tnow from quests where q_id = " . $player->in_quest);
         if ($quest->tnow >= $player->in_quest_time) {
             $text = '';
             if ($quest->q_exp > 0) {
                 $exp = floor($quest->q_exp * ($player->lvl + 1) * 1.77);
                 call("update users set in_quest = 0,in_quest_time = 0, exp = exp + " . $exp . " where usr_id = " . $player->usr_id);
                 call("update users set skills = skills + 1, exp = exp - exp_lvl, exp_lvl = exp_lvl * 1.45, lvl = lvl + 1 where exp >= exp_lvl and usr_id = " . $player->usr_id);
                 $text .= 'Twój heros zdobył ' . $exp . ' doświadczenia<br/>';
             }
             if ($quest->q_res > 0) {
                 $res = floor($quest->q_res * ($player->lvl + 1) * 1.77);
                 call("update users set in_quest = 0,in_quest_time = 0 where usr_id = " . $player->usr_id);
                 require_once 'functions/TownMgr.php';
                 $TownMgr = new TownMgr();
                 $TownMgr->change_resources($config, $player->actual_town, $res, $res, $res, 0);
                 $text .= 'Twój heros zdobył ' . $res . ' każdego z surowców<br/>';
             }
             require_once 'functions/MsgMgr.php';
             $MsgMgr = new MsgMgr();
             $MsgMgr->raport($config, $player->usr_id, $text);
         }
     }
 }