За последние 24 часа нас посетили 18065 программистов и 1599 роботов. Сейчас ищут 880 программистов ...

Кнопка next. Previous

Тема в разделе "Прочие вопросы по PHP", создана пользователем raikage, 11 мар 2012.

  1. raikage

    raikage Активный пользователь

    С нами с:
    11 мар 2012
    Сообщения:
    48
    Симпатии:
    0
    Вот у меня скрипт фото-баттлов. я хочу сделать кнопки следующая предыдущая битвы
    Как можно это реализовать?

    вот база
    Код (Text):
    1. DROP TABLE IF EXISTS `sondaje`;
    2. CREATE TABLE `sondaje` (
    3.   `id` int(11) NOT NULL AUTO_INCREMENT,
    4.   `nume` text NOT NULL,
    5.   `intrebare` text NOT NULL,
    6.   `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    7.   `oponent1` text NOT NULL,
    8.   `oponent2` text NOT NULL,
    9.   `votes1` int(11) DEFAULT '0',
    10.   `votes2` int(11) DEFAULT '0',
    11.   `com1` text NOT NULL,
    12.   `com2` text NOT NULL,
    13.   `email` text NOT NULL,
    14.   `pass` text NOT NULL,
    15.   `img1` text NOT NULL,
    16.   `img2` text NOT NULL,
    17.   `user` text NOT NULL,
    18.   `cat` text NOT NULL,
    19.   PRIMARY KEY (`id`)
    20. ) ENGINE=MyISAM AUTO_INCREMENT=183 DEFAULT CHARSET=utf8;
    21. INSERT INTO `sondaje` VALUES (178,'178','Кто милее?','2012-03-09 21:10:36','Катя ','Аня ',3,1,'Проголосовал за Катя  !  Ð“олосуй и ты !','Проголосовал за Аня  !  Ð“олосуй и ты !','artur.ishbulatov@yandex.ru','','http://kages.ru/imgs/13313274361.jpg','http://kages.ru/imgs/1331327436z_591d4585.jpg','165','');
    22. INSERT INTO `sondaje` VALUES (179,'179','Кто красивее?','2012-03-09 21:13:18','Юлечка',' Александра',2,5,'Проголосовал за Юлечка !  Ð“олосуй и ты !','Проголосовал за  ÐÐ»ÐµÐºÑÐ°Ð½Ð´Ñ€Ð° !  Ð“олосуй и ты !','artur.ishbulatov@yandex.ru','','http://kages.ru/imgs/1331327598z_131c605a.jpg','http://kages.ru/imgs/1331327598z_f40b8139.jpg','165','');


    а вот файл отвечающий за вывод этих кнопок



    Код (Text):
    1. <?php
    2. $post = !empty($post) ? $post : false;
    3. if ($post == "") {
    4.     $nume = $_GET['nume'];
    5.     $indexed = false;
    6. } else {
    7.     $nume = $post;
    8.     $indexed = true;
    9. }
    10.  
    11. include 'cfg.php';
    12.  
    13. $_GET = str_replace($interzis, $replace, $_GET);
    14.  
    15.     $link = mysql_connect($baza['host'], $baza['user'], $baza['pass'])
    16.         or die("Could not connect : " . mysql_error());
    17.     mysql_select_db($baza['nume']) or die("Eroare!, nume baza de date incoreta");
    18. $table = $baza['table'];
    19. $a = mysql_fetch_assoc(mysql_query("SELECT * FROM $table  WHERE nume = '$nume'"));
    20.  
    21. $intrebare = $a['intrebare'];
    22. $nume = $a['nume'];
    23. $oponent1 = $a['oponent1'];
    24. $oponent2 = $a['oponent2'];
    25. $img1 = $a['img1'];
    26. $img2 = $a['img2'];
    27. $com1 = $a['com1'];
    28. $com2 = $a['com2'];
    29. $email = $a['email'];
    30. $pass = $a['pass'];
    31. $vote1 = $a['votes1'];
    32. $vote2 = $a['votes2'];
    33. $id = $a['id'];
    34. $date = $a['date'];
    35. $ips = $a['ips'];
    36.  
    37. $ar1 = explode('|-|', $img1);
    38. $ar2 = explode('|-|', $img2);
    39.  
    40. $img1 = $ar1[0];
    41. $img2 = $ar2[0];
    42.  
    43. $html1 = $ar1[1];
    44. $html2 = $ar2[1];
    45. $ipc =  $_SERVER['REMOTE_ADDR'];
    46. $w = mysql_fetch_assoc(mysql_query("SELECT * FROM votes  WHERE id = '$id' AND ip = '$ips'"));
    47.  
    48. if ((isset($_COOKIE["v_$id"])) or ($w['time'] > time())) {
    49. $votat_pe = $_COOKIE["v_$id"];
    50. $votat = "true";  
    51. } else { $votat = "false"; }
    52. include 'sus.php';
    53. if ($vote1 == "") { die("PAgina invalida");}
    54. ?>
    55.  
    56.  
    57. <script>
    58. var intrebare = "<?php echo $intrebare; ?>";
    59. var oponent1 = "<?php echo $oponent1; ?>";
    60. var oponent2 = "<?php echo $oponent2; ?>";
    61. var img1 = "<?php echo $img1; ?>";
    62. var img2 = "<?php echo $img2; ?>";
    63. var com1 = "<?php echo $com1; ?>";
    64. var com2 = "<?php echo $com2; ?>";
    65. var adresa = "http://<?=$_SERVER['HTTP_HOST']?>/view_<?php echo $nume; ?>";
    66. var title = oponent1+" vs "+oponent2+" | "+intrebare;
    67.  
    68. function getVote(int)
    69. {
    70. if (window.XMLHttpRequest)
    71.   {// code for IE7+, Firefox, Chrome, Opera, Safari
    72.   xmlhttp=new XMLHttpRequest();
    73.   }
    74. else
    75.   {// code for IE6, IE5
    76.   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    77.   }
    78. xmlhttp.onreadystatechange=function()
    79.   {
    80.   if (xmlhttp.readyState==4 && xmlhttp.status==200)
    81.     {
    82.     document.getElementById("poll").innerHTML=xmlhttp.responseText;
    83.     }
    84.   }
    85. xmlhttp.open("GET","/vote.php?id=<?=$id; ?>&ips=<?=$_SERVER['REMOTE_ADDR']; ?>&vote="+int,true);
    86. xmlhttp.send();
    87.  
    88. }
    89.  
    90. function pause(n){
    91.   today=new Date()
    92.    today2=today
    93.    while((today2-today)<=n){
    94.    today2=new Date()
    95.    }
    96. }
    97.  
    98.  
    99. function godd()
    100. {
    101.  
    102.  
    103.  
    104. pause(3000);
    105. window.location=adresa;
    106.  
    107. }
    108.  
    109. var id_brand = 0;
    110. var iterations = 0;
    111.  
    112. var total_count = new Array();
    113. total_count[1] = 0;
    114. total_count[2] = 0;
    115.  
    116. var texts = new Object();
    117. texts.facebook = new Array();
    118. texts.facebook[1] = new Object();
    119. texts.facebook[1].summary = com1;
    120. texts.facebook[1].title=title;
    121. texts.facebook[1].url = adresa;
    122. texts.facebook[1].image = img1;
    123.  
    124. texts.facebook[2] = new Object();
    125. texts.facebook[2].summary= com2;
    126. texts.facebook[2].title=title;
    127. texts.facebook[2].url = adresa;
    128. texts.facebook[2].image = img2;
    129.  
    130.  
    131. texts.twitter = new Array();
    132. texts.twitter[1] = new Object();
    133. texts.twitter[1].title = com1;
    134. texts.twitter[1].url = adresa;
    135.  
    136. texts.twitter[2] = new Object();
    137. texts.twitter[2].title = com2;
    138. texts.twitter[2].url = adresa;
    139.  
    140. texts.odnoklassniki = new Array();
    141. texts.odnoklassniki[1] = new Object();
    142. texts.odnoklassniki[1].title = com1;
    143. texts.odnoklassniki[1].url = adresa;
    144.  
    145. texts.odnoklassniki[2] = new Object();
    146. texts.odnoklassniki[2].title = com2;
    147. texts.odnoklassniki[2].url = adresa;
    148.  
    149.  
    150.  
    151. function voteFacebook(){
    152.     var url = "http://www.facebook.com/sharer.php?s=100&p[title]="+encodeURIComponent(texts.facebook[id_brand].title)+"&p[summary]="+encodeURIComponent(texts.facebook[id_brand].summary)+"&p[url]="+encodeURIComponent(texts.facebook[id_brand].url)+"&p[images][0]="+encodeURIComponent(texts.facebook[id_brand].image);
    153.     window.open(url,'','toolbar=0,status=0,width=626,height=436');
    154.     $.modal.close();
    155. }
    156.  
    157. function voteOdnoklassniki(){
    158.     var url = " http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl="+encodeURIComponent(texts.odnoklassniki[id_brand].url)+"&st.comments="+encodeURIComponent(texts.odnoklassniki[id_brand].title);
    159.     window.open(url,'','toolbar=0,status=0,width=626,height=436');
    160.     $.modal.close();
    161. }
    162.  
    163. function voteTwitter(){
    164.     var url = "http://twitter.com/share?text="+encodeURIComponent(texts.twitter[id_brand].title)+"&url="+encodeURIComponent(texts.twitter[id_brand].url)+"&counturl="+encodeURIComponent(texts.twitter[id_brand].url);
    165.     window.open(url,'','toolbar=0,status=0,width=626,height=436');
    166.     $.modal.close();
    167. }
    168.  
    169.  
    170. function calculateFB(idbrand){
    171.         var facebook = 'https://api.facebook.com/method/fql.query?query=select total_count from link_stat where url="' +encodeURIComponent(texts.facebook[idbrand].url)  + '"&format=json&callback=?';
    172.          $.getJSON(facebook, function(data) {          
    173.                 upCounter([idbrand],data[0].total_count);
    174.                
    175.          });       
    176.  
    177. }
    178.  
    179. function calculateTwitter(idbrand){
    180.         var twitter = 'http://urls.api.twitter.com/1/urls/count.json?url=' +encodeURIComponent(texts.twitter[idbrand].url)  + '&callback=?';
    181.             $.getJSON(twitter, function(data) {        
    182.                 upCounter([idbrand],data.count);
    183.                
    184.          });   
    185. }
    186.  
    187. function calculateodnoklassniki(idbrand){
    188.         var odnoklassniki = 'http://odnoklassniki.ru/share.php?act=count&index='+idbrand+'&url=' +encodeURIComponent(texts.odnoklassniki[idbrand].url)  + '&callback=?';
    189.         VK = new Object();
    190.         VK.Share = {};
    191.         VK.Share.count = function(index, count) {
    192.             upCounter([index],count);
    193.         }
    194.         $.getJSON(odnoklassniki, function(data) {       });
    195. }
    196.  
    197. function calculateStart(){
    198.         calculateFB(1);
    199.         calculateFB(2);
    200.         calculateTwitter(1);
    201.         calculateTwitter(2);
    202.         calculateodnoklassniki(1);
    203.         calculateodnoklassniki(2);
    204. }
    205.  
    206. function upCounter(id,count){
    207.     total_count[id]+=count;
    208.     $('#counter-'+id).html(total_count[id]);
    209.     iterations++;
    210.     if(iterations == 12){
    211.         //$.post("/en/ajax",{action:"update-points",id_battle:10,points_1:total_count[15], points_2:total_count[16]});
    212.         //$.post("/en/ajax",{action:"update-points",id_battle:17,points_1:total_count[30], points_2:total_count[29]});
    213.     }
    214. }
    215.  
    216. var lang = {
    217.         years:   ['an', 'ani'],
    218.         months:  ['luna', 'luni'],
    219.         days:    ['zi', 'zile'],
    220.         hours:   ['ora', 'ore'],
    221.         minutes: ['minut', 'minute'],
    222.         seconds: ['secunda', 'secunde'],
    223.         plurar:  function(n) {
    224.             return (n == 1 ? 0 : 1);
    225.         }
    226.     }
    227. $(document).ready(function(){
    228.     $("#countdown").countdown(new Date(2011, 3, 3, 23, 59, 59), {suffix:'',prefix:'A ramas:', finish: '',lang:lang});
    229.     calculateStart();
    230. });
    231.  
    232. function iwant(){
    233.             $.post("/en/ajax",{action:"iwant",brand_1: $('#br_1').val(), brand_2:$('#br_2').val()});
    234.             $('#submit').html('Thank you!');
    235. }
    236.  
    237. function showLogin1(b){
    238.     id_brand = b;
    239.     $('#login-window').modal({});
    240. }
    241.  
    242. function showLogin2(b){
    243.     id_brand = b;
    244.     $('#login-window2').modal({});
    245. }
    246.  
    247. </script>
    248.  
    249.  
    250.  
    251. <div style="text-align:center">
    252. <div id="question">
    253.         <?php echo $intrebare; ?>
    254. </div>
    255.  
    256.  
    257.  
    258. <table width="100%" border="0">
    259.  
    260. <tr>
    261. <td width="4%">&nbsp;</td>
    262. <td align="center"><center><img class="imgvs" height="200" src="<?php echo $img1; ?>" /></center></td>
    263. <td align="center"> <center><span id="vs"><img src="/static/img/vs.gif" /></span>
    264. <button class="gbtn" onclick="window.location = '/browse'; return false"><?=$lng['browse']?></button></br>
    265.  
    266.  
    267.    
    268.  
    269.  
    270. <td align="center"><center><img class="imgvsac" height="200" src="<?php echo $img2; ?>" /></center></td>
    271. <td width="4%">&nbsp;</td>
    272. </tr>
    273.  
    274. <tr>
    275. <td width="4%">&nbsp;</td>
    276. <td><center><?php echo $html1; ?><br /><h3><?php echo $oponent1; ?></h3></center></td>
    277. <td></td>
    278. <td><center><?php echo $html2; ?><br /><h3><?php echo $oponent2; ?></h3></center></td>
    279. <td width="4%">&nbsp;</td>
    280. </tr>
    281.  
    282. <tr>
    283. <td width="4%">&nbsp;</td>
    284. <td align="center">
    285.                 <center><div class="brand-votes"><font color="#0040eb"><b id="counter-15">
    286. <?php echo $vote1; ?>
    287.                 </b></font></div><?=$lng['nvotes']?></center>
    288. </td>
    289. <td></td>
    290. <td align="center">             <center><div class="brand-votes">
    291.                 <font color="#ff0000"><b id="counter-16">
    292. <?php echo $vote2; ?>
    293.                 </b></font></div><?=$lng['nvotes']?></center>
    294. </td>
    295. <td width="4%">&nbsp;</td>
    296. </tr>
    297.  
    298. <tr>
    299. <td width="4%">&nbsp;</td>
    300. <td align="center">
    301. <?php if ($votat == "false") {
    302. ?>             
    303.             <center> <a class="green" href="#" onclick="showLogin1(1)"><?=$lng['vote1']?><a></center>
    304. <?php
    305. }
    306. ?> 
    307. </td>
    308. <td align="center">
    309. <?php
    310. if ($votat == "true") {
    311. ?>
    312. <span style="font-size: 14pt"><font color="#36B500"><?=$lng['ms']?></font></span>
    313. <?php
    314. }
    315. ?> 
    316. </td>
    317.  
    318.  
    319. <td align="center">
    320. <?php
    321. if ($votat == "false") {
    322. ?>     
    323.             <center> <a class="orange" href="#" onclick="showLogin2(2)"><?=$lng['vote1']?><a></center>
    324. <?php
    325. }
    326. ?> 
    327. </td>
    328. <td width="4%">&nbsp;</td>
    329. </tr>
    330. </table>
    331.  
    332.  
    333. <?php
    334. if (!$indexed) {
    335. $r = mysql_query("SELECT * FROM sondaje ORDER BY (votes1+votes2) DESC");
    336.  
    337. $i=0;
    338. while ($x = mysql_fetch_assoc($r)) {
    339. $i=$i+1;
    340. $m[$i]=$x;
    341. }
    342. ?>
    343.  
    344. <center>
    345. <table width="100%"><tr><td width="20%" align="center">&nbsp;</td>
    346. <td align="center">
    347.     <div align="center" class="battle-slideshow clr">
    348.     <center>
    349.     <a class="battle-slideshow-container" href="/view_<?php echo $m[1]['id']; ?>">
    350.         <div class="padding clr">
    351.                 <div class="pic">
    352.                     <noindex><script> document.write("<img width=\"60\" height=\"60\" src=\"<?php echo $m[1]['img1']; ?>\" />"); </script></noindex>
    353.                     <div><?php echo $m[1]['oponent1']; ?></div>
    354.                 </div>
    355.                 <div class="vs">
    356.                     VS             
    357.                 </div>
    358.                 <div class="pic">
    359.                     <noindex><script> document.write("<img width=\"60\" height=\"60\" src=\"<?php echo $m[1]['img2']; ?>\" />"); </script></noindex>
    360.                     <div><?php echo $m[1]['oponent2']; ?></div>
    361.                 </div>
    362.         </div>
    363.     </a>
    364.     </center><center>
    365.         <a class="battle-slideshow-container" href="/view_<?php echo $m[2]['id']; ?>">
    366.         <div class="padding clr">
    367.                 <div class="pic">
    368.                     <noindex><script> document.write("<img width=\"60\" height=\"60\" src=\"<?php echo $m[2]['img1']; ?>\" />"); </script></noindex>
    369.                     <div><?php echo $m[2]['oponent1']; ?></div>
    370.                 </div>
    371.                 <div class="vs">
    372.                     VS             
    373.                 </div>
    374.                 <div class="pic">
    375.                     <noindex><script> document.write("<img width=\"60\" height=\"60\" src=\"<?php echo $m[2]['img2']; ?>\" />"); </script></noindex>
    376.                     <div><?php echo $m[2]['oponent2']; ?></div>
    377.                 </div>
    378.         </div>
    379.     </a>
    380.     </center><center>
    381.         <a class="battle-slideshow-container" href="/view_<?php echo $m[3]['id']; ?>">
    382.         <div class="padding clr">
    383.                 <div class="pic">
    384.                     <noindex><script> document.write("<img width=\"60\" height=\"60\" src=\"<?php echo $m[3]['img1']; ?>\" />"); </script></noindex>
    385.                     <div><?php echo $m[3]['oponent1']; ?></div>
    386.                 </div>
    387.                 <div class="vs">
    388.                     VS             
    389.                 </div>
    390.                 <div class="pic">
    391.                     <noindex><script> document.write("<img width=\"60\" height=\"60\" src=\"<?php echo $m[3]['img2']; ?>\" />"); </script></noindex>
    392.                     <div><?php echo $m[3]['oponent2']; ?></div>
    393.                 </div>
    394.         </div>
    395.     </a>
    396.    
    397.            
    398.    
    399. </center>
    400.             </div>
    401.  
    402.             </td><td >&nbsp;</td></tr></table>
    403. </center>
    404. <?php
    405. }
    406. ?>
    407.  
    408.  
    409.     <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    410.     <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
    411.  
    412.   <script>
    413.   $(document).ready(function() {
    414.     $("#tabs").tabs();
    415.   });
    416.   </script>
    417.    
    418.             <script type="text/javascript">
    419.                 new BackCounter([$('countdown')]).addEvent('completed', function(){
    420.                     $('battle-ended').setStyle('display','block');
    421.                     $('battle-timer').setStyle('display','none');
    422.                 }).start();
    423.             </script>
    424.    
    425.    
    426. <div id="tabs">
    427.     <ul>
    428.         <li><a href="#fragment-1"><span>Вконтакте</span></a></li>
    429.                                 <li><a href="#fragment-2"><span>Реклама </span></a></li>
    430.  
    431.     </ul>
    432.     <div id="fragment-1"><center>
    433.            
    434.            
    435.             <!-- Put this script tag to the <head> of your page -->
    436. <script type="text/javascript" src="http://userapi.com/js/api/openapi.js?48"></script>
    437.  
    438. <script type="text/javascript">
    439.   VK.init({apiId: 2844563, onlyWidgets: true});
    440. </script>
    441.  
    442. <!-- Put this div tag to the place, where the Comments block will be -->
    443. <div id="vk_comments"></div>
    444. <script type="text/javascript">
    445. VK.Widgets.Comments("vk_comments", {limit: 15, width: "870", attach: "*"});
    446. </script>
    447. </center>
    448.     </div>
    449.  
    450.  
    451.    <div id="fragment-2">
    452. <center></center>
    453.     </div>
    454.    
    455. </div> 
    456.    
    457.         <div id="fragment-3">
    458. <center><div id="fb-root"></div>
    459. </center>
    460.     </div>
    461.    
    462. </div> 
    463.    
    464.    
    465. <hr />
    466.  
    467.  
    468.  
    469.     </div>
    470.     <div align="center" class="clear"></div>
    471.     <div id="countdown"></div>
    472.  
    473. <div align="center" style="margin-top:40px; margin-bottom:50px">
    474.  
    475.         <div align="center" class="clear"></div>
    476.     </div>
    477. <div align="center" class="clear"></div>
    478.  
    479.  
    480. <div align="center" id="login-window" style="display:none">
    481. <center>
    482. <?php if ($votat == "true") {
    483. echo "Ati votat deja...";
    484. } else {
    485. ?>
    486.  
    487. <h1><?=$lng['select']?></h1><br/>
    488. <img src="/img/facebook.png" onclick="voteFacebook();getVote(1);godd()">
    489. <img src="/img/twitter.png" onclick="voteTwitter();getVote(1);godd()">
    490. <img src="/img/odnoklassniki.png" onclick="voteOdnoklassniki();getVote(1);godd()">
    491. <img src="/img/vk.png" onclick="window.open('http://vkontakte.ru/share.php?url=http://<?=$_SERVER['HTTP_HOST']?>/view_<?php echo $nume; ?>&title=<?php echo $intrebare; ?>&description=<?php echo $oponent1; ?> vs <?php echo $oponent2; ?>&image=<?php echo $img1; ?>&noparse=true','mywindow','width=600,height=500');getVote(1);godd()">
    492.  
    493. <hr>
    494. <img width="150" src="<?php echo $img1; ?>" /><br />
    495. <h2><?php echo $oponent1; ?></h2>
    496. <br/>
    497.  
    498. <?php } ?>
    499. </center>
    500. </div>
    501.  
    502. <div id="login-window2" style="display:none">
    503. <center>
    504. <?php if ($votat == "true") {
    505. echo "Ati votat deja...";
    506. } else {
    507. ?>
    508. <h1><?=$lng['select']?></h1><br>
    509. <img src="/img/facebook.png" onclick="voteFacebook();getVote(2);godd()">
    510. <img src="/img/twitter.png" onclick="voteTwitter();getVote(2);godd()">
    511. <img src="/img/odnoklassniki.png" onclick="voteOdnoklassniki();getVote(2);godd()">
    512. <img src="/img/vk.png" onclick="window.open('http://vkontakte.ru/share.php?url=http://<?=$_SERVER['HTTP_HOST']?>/view_<?php echo $nume; ?>&title=<?php echo $intrebare; ?>&description=<?php echo $oponent1; ?> vs <?php echo $oponent2; ?>&image=<?php echo $img2; ?>&noparse=true','mywindow','width=600,height=500');getVote(2);godd()">
    513.  
    514. <hr>
    515. <img width="150" src="<?php echo $img2; ?>" /><br />
    516. <h2><?php echo $oponent2; ?></h2>
    517. <br/>
    518.  
    519. <?php } ?>
    520. </center>
    521. </div>
    522.  
    523.  
    524. <?php
    525. if ($indexed) {
    526. ?>
    527.  
    528. <center><ul class="battle-list">
    529. <?php
    530. $result = mysql_query("SELECT * FROM sondaje ORDER BY (votes1+votes2) DESC");
    531. $i=0;      
    532. while($a = mysql_fetch_assoc($result))
    533. {
    534. $i=$i+1;   
    535. $intrebare = $a['intrebare'];
    536. $nume = $a['nume'];
    537. $oponent1 = $a['oponent1'];
    538. $oponent2 = $a['oponent2'];
    539. $img1 = $a['img1'];
    540. $img2 = $a['img2'];
    541. $com1 = $a['com1'];
    542. $com2 = $a['com2'];
    543. $email = $a['email'];
    544. $pass = $a['pass'];
    545. $vote1 = $a['votes1'];
    546. $vote2 = $a['votes2'];
    547. $id = $a['id'];
    548. $date = $a['date'];
    549.  
    550. $ar1 = explode('|-|', $img1);
    551. $ar2 = explode('|-|', $img2);
    552.  
    553. $img1 = $ar1[0];
    554. $img2 = $ar2[0];
    555.  
    556. echo <<<HTML
    557.    
    558.         <li id="battle62" class="clr ">
    559.  
    560.     <div class="pics">
    561.         <div class="pic1">
    562.            
    563.                             <img width='40' height='40' src="$img1" />
    564.                        
    565.             <div class="vote-1">
    566.                 $vote1          </div>
    567.  
    568.         </div>
    569.         <div class="vs">
    570.             vs      </div>
    571.  
    572.         <div class="pic2">
    573.            
    574.                             <img width='40' height='40' src="$img2" />
    575.                            
    576.             <div class="vote-2">
    577.                 $vote2          </div>
    578.         </div>
    579.  
    580.     </div>
    581.    
    582.     <div class="title">
    583.         <h2>
    584.  
    585.             <a href="/view_$id">
    586.                 $intrebare      </a>
    587.         </h2>
    588.        
    589.  
    590.                 <small>$oponent1 vs $oponent2</small>
    591.  
    592.            
    593.     </div>
    594.    
    595.  
    596. <br><br><br>   
    597. </li>
    598.  
    599. HTML;
    600. if ($i == $index_sondaje) { break; }   
    601.         }
    602. ?>
    603. </ul>
    604.  
    605. </center>
    606. <?php
    607. }
    608. include 'jos.php'; ?>

    спасибо=) По ходу не там тему создал
     
  2. Denis.Y

    Denis.Y Активный пользователь

    С нами с:
    8 авг 2011
    Сообщения:
    145
    Симпатии:
    0
    Адрес:
    Россия, Самарская область
    не нужно плодить по 37 тем, это только уменьшает желание помогать.
     
  3. artem-Kuzmin

    artem-Kuzmin Активный пользователь

    С нами с:
    16 фев 2012
    Сообщения:
    809
    Симпатии:
    0
    Прошто в url site/battl/pages/1/ site/battl/pages/3/
     
  4. raikage

    raikage Активный пользователь

    С нами с:
    11 мар 2012
    Сообщения:
    48
    Симпатии:
    0
    нет , так не получится, у меня же не только 2 битвы