<?php
require'fun.php';
require'f_conectare.php';
conectare('recruteaza cazarma (triburile v2)','triburile2-recruteaza-cazarma');
$titlu='Recruteaza cazarma - Triburile V2';
$back[1]='<a href="/triburile2">'.img('triburile.gif',1).'Triburi</a>';
$back[2]='<a href="/triburile2-cazarma">'.img('triburile.gif',1).'Cazarma</a>';
require'f_sus.php';
require'triburile2_nicu1.php';
require'triburile2_nicu2.php';
if($if[3]>0)
{
$tl[1]=50;
$ta[1]=30;
$tp[1]=10;
$tl[2]=30;
$ta[2]=30;
$tp[2]=90;
$tl[3]=60;
$ta[3]=30;
$tp[3]=40;
$tl[4]=60;
$ta[4]=60;
$tp[4]=60;
$tl[5]=80;
$ta[5]=90;
$tp[5]=80;
$tl[6]=120;
$ta[6]=130;
$tp[6]=110;
$sp[1]=floor($if[9]/$tl[1]);
$sp[2]=floor($if[11]/$ta[1]);
$sp[3]=floor($if[10]/$tp[1]);
if($sp[1]<$sp[2])
$totspio=$sp[1];
else
$totspio=$sp[2];
if($totspio>$sp[3])
$totspio=$sp[3];
$c1[1]=floor($if[9]/$tl[2]);
$c1[2]=floor($if[11]/$ta[2]);
$c1[3]=floor($if[10]/$tp[2]);
if($c1[1]<$c1[2])
$totcvus=$c1[1];
else
$totcvus=$c1[2];
if($totcvus>$c1[3])
$totcvus=$c1[3];
$c2[1]=floor($if[9]/$tl[3]);
$c2[2]=floor($if[11]/$ta[3]);
$c2[3]=floor($if[10]/$tp[3]);
if($c2[1]<$c2[2])
$totcvgr=$c2[1];
else
$totcvgr=$c2[2];
if($totcvgr>$c2[3])
$totcvgr=$c2[3];
$lvlgrj=$conn->query('SELECT`lvlarm`FROM`t2_membrii`WHERE`de`="'.$de.'"')->fetch_row();
$foo=$conn->query('SELECT`cant`FROM`t2_cazermata`WHERE`lvl`="'.$lvlgrj[0].'"')->fetch_row();
$tmpsp=$foo[0]+20;
$tmpcu=$foo[0]+38;
$tmpcg=$foo[0]+57;
require'f_ramas.php';
echo$div[4].'<img src="'.$domenii_statice[1].'triburile2/barracks1.png" alt="" />Recruteaza cazarma (nivel '.$if[3].')'.$div[5].$div[10].'Recrutare:<br /><img src="'.$domenii_statice[1].'triburile2/lanc.png" alt="lancieri" />Lancieri <img src="'.$domenii_statice[2].'triburile2/lemne.png" alt="lemn" />'.$tl[1].'<img src="'.$domenii_statice[1].'triburile2/argila.png" alt="argile" />'.$ta[1].'<img src="'.$domenii_statice[1].'triburile2/piatra.png" alt="piatra" />'.$tp[1].'<img src="'.$domenii_statice[2].'triburile2/clock.png" alt="ceas" />'.ramas($tmpsp).'<img src="'.$domenii_statice[1].'triburile2/speed.png" alt="rapiditate" width="16" height="16" />12<br /><img src="'.$domenii_statice[1].'triburile2/lpsp.png" alt="luptatori cu spada" />Luptatori cu spada <img src="'.$domenii_statice[2].'triburile2/lemne.png" alt="lemn" />'.$tl[2].'<img src="'.$domenii_statice[1].'triburile2/argila.png" alt="argile" />'.$ta[2].'<img src="'.$domenii_statice[1].'triburile2/piatra.png" alt="piatra" />'.$tp[2].'<img src="'.$domenii_statice[2].'triburile2/clock.png" alt="ceas" />'.ramas($tmpcu).'<img src="'.$domenii_statice[1].'triburile2/speed.png" alt="rapiditate" width="16" height="16" />15<br /><img src="'.$domenii_statice[2].'triburile2/lptp.png" alt="luptatori cu toporul" />Luptatori cu toporul <img src="'.$domenii_statice[2].'triburile2/lemne.png" alt="lemn" />'.$tl[3].'<img src="'.$domenii_statice[1].'triburile2/argila.png" alt="argile" />'.$ta[3].'<img src="'.$domenii_statice[1].'triburile2/piatra.png" alt="piatra" />'.$tp[3].'<img src="'.$domenii_statice[2].'triburile2/clock.png" alt="ceas" />'.ramas($tmpcg).'<img src="'.$domenii_statice[1].'triburile2/speed.png" alt="rapiditate" width="16" height="16" />12'.$div[0];
$form[0]='/triburile2-cazarma/tip/recruteaza" method="post';
$form[1]=0;
$form[2]='<table columns="3"><tr><td><img src="'.$domenii_statice[1].'triburile2/lanc.png" alt="lancieri" />Lancieri:</td><td><input name="lanc" maxlength="2" /></td><td>(maxim '.$totspio.')</td></tr><tr><td><img src="'.$domenii_statice[1].'triburile2/lpsp.png" alt="luptatori cu spada" />Luptatori cu spada:</td><td><input name="lpsp" maxlength="2" /></td><td>(maxim '.$totcvus.')</td></tr><tr><td><img src="'.$domenii_statice[2].'triburile2/lptp.png" alt="luptatori cu toporul" />Luptatori cu toporul:</td><td><input name="lptp" maxlength="2" /></td><td>(maxim '.$totcvgr.')</td></tr></table>';
$form[3]='lanc::lpsp::lptp';
$form[4]='Recruteaza';
require'f_form.php';
}
else
echo$div[4].'<img src="'.$domenii_statice[2].'actiune_delete.png" alt="" width="16" height="16" />Eroare!'.$div[5].$div[7].'Construieste cazarma intai!'.$div[0];
require'f_jos.php';