Advertisement
Guest User

Untitled

a guest
May 9th, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. <?php
  2. $table1 = '<table id= "Table1" width='100%' border='1' cellspacing='0' cellpadding='0'>
  3. <tr class="tableheader">
  4. <th>Weeks</th>
  5. <th>' . '<p></p>' . '</th>
  6. <th> place</th>
  7. <th> More Details</th>
  8. </tr>
  9. <tr>';
  10.  
  11. $button = $_POST[$wnumber];
  12. while($row3 = mysql_fetch_array($sql3)) :
  13. $rows[] = $row3;
  14. endwhile;
  15. $wnumber = "" ;
  16.  
  17. foreach ($rows as $row3) : // loop #1 to output the main table
  18. $wnumber = $row3[$ww];
  19.  
  20. <!--SW - No closing tr tag-->
  21. $table1 .= '<tr id="' . $row3['$ww'] . '">';
  22.  
  23. $sql4 = mysql_query (" SELECT $ww as yourplace FROM data WHERE $ww = ".$wnumber." and id_user = ".$userid." and $ww != \"w_nothing\" ");
  24. $row4 = mysql_fetch_array($sql4) ;
  25. $string = "<blink style= 'color:#990000 ;font-weight: bolder;' ><< You are here </blink>" ;
  26. ?>
  27. $table1 .= '<tr id= "' . $row3[$ww] . '" class="intable">
  28. <td> "Week ". $wnumber . '</td>
  29. <td>' . (int) $row3['percent'] .'%' . '</td>
  30. <td>';
  31. if($row4['yourplace'] == $wnumber and $row2['id'] == $userid ) {
  32. $table1 .= $string ; } else { $table1 .= "";}
  33. $table1 .= '</td>
  34. <td>
  35. <form name ="dets" method="POST" action="">
  36. <input class = "showt" name ="' . $wnumber . '" id ="' . $wnumber . '" type="submit" value= "More Details" />
  37. <input type="hidden" name="data" value="' . $wnumber . '" />
  38. <input style="display:none;" type="text" name="' . $wnumber . '" value="' . $wnumber . '" />
  39.  
  40. </form>
  41. </td>
  42. </tr>';
  43. endforeach;
  44.  
  45. $table1 .= '</tr>
  46. </table>';
  47.  
  48. print $table1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement