- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
$resultat = mysql_query("SELECT * FROM tovar WHERE t_akcia='1' ");
$myrowat = mysql_fetch_array($resultat);
if (isset($myrowat[t_name])){$rstt=$myrowat[t_name]; if ($rstt==''){unset($rstt);}}
if (isset($rstt)){
$ft=0;
do
{
$t_namet=$myrowat[t_name];
if ($t_namet==''){unset($t_namet);}
if (isset($t_namet)){ $ft=$ft+1; }
}
while ($myrowat = mysql_fetch_array($resultat));
$vidt=rand(1,$ft);
$vidst=$vidt-1;
$resultact = mysql_query("SELECT * FROM tovar WHERE t_akcia='1' LIMIT $vidst,1 ");
$myrowact = mysql_fetch_array($resultact);
print<<<HERE
<div style="margin-top:11px;">
<table width="182" border="0" cellspacing="0" cellpadding="0">
<tr><td height="29" align="center" valign="middle" bgcolor="#fe0000"><div class="tit_block"><a class="tit_block" href="akcia.php">ÀÊÖÈÈ</a></div></td></tr>
<tr><td>
<div style="margin-top:11px; margin-bottom:11px;">
<table width="182" border="0" cellspacing="0" cellpadding="0" style="background-image:url(../img/block_center.jpg); background-position:center; background-repeat:repeat-y;">
<tr>
<td>
<img src="../img/block_top.jpg" align="top" border='0' />
<div style="margin-top:11px; margin-bottom:11px;">
HERE;
if (isset($myrowact[t_name]))
{
$t_namet=$myrowact[t_name];
$t_fotot=$myrowact[t_foto];
$t_pricet=$myrowact[t_price];
$t_old_rpicet=$myrowact[t_old_rpice];
$t_idt=$myrowact[t_id];
$t_valutt=$myrowact[t_valut];
if (isset($t_valutt)){
$resultvt = mysql_query("SELECT * FROM valut WHERE v_id='$t_valutt' ");
$myrowvt = mysql_fetch_array($resultvt);
$valutt=$myrowvt[v_name];
$kurst=$myrowvt[v_kurs];
$v_znakt=$myrowvt[v_znak];
$t_pricet=ceil($t_pricet*$kurst);
$t_old_rpicet=ceil($t_old_rpicet*$kurst);
}
if ($t_namet==''){unset($t_namet);}
if (isset($t_namet))
{
$size_imgt=imagecreatefromjpeg("img_tovar/$t_fotot");
$w_srct = imagesx($size_imgt);
$h_srct = imagesy($size_imgt);
if ($w_srct > $h_srct){$widtht=120; $heightt='';}else{$widtht=''; $heightt=120;}
print<<<HERE
<table width='182' border='0' cellspacing='0' cellpadding='0'>
<tr><td><div class='block_left' style='margin-left:2px; margin-right:2px;'>
<a class='text' style='text-decoration:none;' href='tovar.php?t_id=$t_idt'>
HERE;
if ($heightt > $widtht){echo"<img src='img_tovar/$t_fotot' height='$heightt' hspace='5' vspace='5' align='middle' border='0' />";}
if ($widtht > $heightt){echo"<img src='img_tovar/$t_fotot' width='$widtht' hspace='5' vspace='5' align='middle' border='0' />";}
print<<<HERE
<br><br><strong>$t_namet</strong><br><br>
<div style='text-align:center' class='price' style='margin-top:15px; margin-bottom:15px;'><span class='old_price'>$t_old_rpicet</span>$t_pricet<span class='valut'>ãðí</span></div></a><br>
<a href='buy.php?t_id=$t_idt' title='$t_namet'><img src='../img/kypit.jpg' alt='$t_titlet' border='0' /></a><br>
<div>
</td></tr>
</table>
HERE;
}
}
print<<<HERE
</div>
<img src="../img/block_down.jpg" align="bottom" border='0' />
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
HERE;
}