Guest User

Results PHP

a guest
Jul 4th, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.04 KB | None | 0 0
  1. <?php
  2.  
  3. require "config.php";
  4. require "connect.php";
  5.    
  6.  // Determining the URL of the page:
  7. $url = 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER["REQUEST_URI"]);
  8.  
  9. // Fetching the number and the sum of the donations:
  10. list($number,$sum) = mysql_fetch_array(mysql_query("SELECT COUNT(*),SUM(amount) FROM dc_donations"));
  11.  
  12. // Building a URL with Google's Chart API:
  13. $chartURL = 'http://chart.apis.google.com/chart?chf=bg,s,f9faf7&amp;cht=p&amp;chd=t:'.$percent.',-'.(100-$percent).'&amp;chs=200x200&amp;chco=639600&amp;chp=1.57';
  14.  
  15. ?>
  16.  
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19. <head>
  20.    
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  22. <title>Walkathon Sponsor Donations</title>
  23.  
  24. <link rel="stylesheet" type="text/css" href="styles.css" />
  25. <script src="gen_validatorv4.js" type="text/javascript"></script>
  26.  
  27. <!-- JQUERY MOBILE -->
  28. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
  29.     <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
  30.     <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
  31. <script src="scripts/fastclick.js"></script> <!-- FASTCLICK -->
  32.  
  33. </head>
  34.  
  35. <!------------------------------- BODY ---------------------------------------------------------------->
  36. <body onload="initFastButtons();">
  37. <span id="fastclick">
  38.  
  39. <div data-role="page" id="pageone">
  40. <img src="Logo.png" style="position:absolute; top: 25px; left:125px;" />
  41. <div id="main">
  42.     <div class="headers">
  43.     <h1>Inspirica & SLS Walk-A-Thon</h1>
  44.     <h2>Donation Page</h2>
  45.     </div>
  46.  
  47. <div id="content">
  48.    
  49.     <div class="lightSection">    
  50.        
  51.         <!-- The PayPal Donation Button -->
  52.         <?php
  53.                      
  54.        
  55.         $list = "SELECT sponsoring, SUM(amount) FROM dc_donations GROUP BY sponsoring";
  56.         $result = mysql_query("SELECT sponsoring,SUM(amount)
  57.         FROM dc_donations
  58.         GROUP BY sponsoring");
  59.         $POUND = '#';
  60.        
  61.         /* Table */
  62.         echo "<table id='resultstable'>";  
  63.         echo "<tr>";  
  64.         echo "<td width='100' align='center'>Participant</td><td width='100' align='center'>Amount of Donations</td>";
  65.            
  66.         /* Each Entry */
  67.         while($row=mysql_fetch_array($result))  {  
  68.             echo "<tr class='tablerow'>";
  69.            
  70.  
  71.             echo "<td align='left' class='leftabit'  width='200'>" . /* HREF */'<a href="#' . $row['sponsoring'] . '" data-rel="dialog">' /* //HREF */. $row['sponsoring'] . "</td>" . "</a>";  
  72.             echo "<td align='center' width='200'>" . /* HREF */'<a href="#' . $row['sponsoring'] . '">' /* //HREF */.  '$ '.$row['SUM(amount)'] . "</td>" . "</a>";  
  73.             echo "<br />";  
  74.             echo "</tr>";
  75.         }
  76.        
  77.        
  78.         echo "</table>";  
  79.         ?>      
  80.        
  81.     </div>
  82. <table id="GLASS" width="861" height="200" border="0" cellpadding="0" cellspacing="0">
  83.     <tr>
  84.         <td>
  85.             <a class="Homepage" href="http://StLukesCT.org/inspirica/walkathon">
  86.                 </a></td>
  87.         <td>
  88.             <a class="InspiricaCenter" href="http://InspiricaCT.org">
  89.                 </a></td>
  90.         <td>
  91.             <a class="Register" href="https://www.StLukesCT.org/podium/default.aspx?t=36644">
  92.                 </a></td>
  93.     </tr>
  94. </table>
  95. </div>
  96.  
  97.  
  98.    
  99.    
  100.     <div class="clear"></div>
  101.    
  102. </div> <!-- Closing the main div -->
  103. </div> <!--Page -->
  104.  
  105. <?php
  106. $name= $row['sponsoring']; 
  107. $result = mysql_query("SELECT donor_first,donor_last,sponsoring,SUM(amount)
  108.         FROM dc_donations
  109.         GROUP BY sponsoring");
  110.        
  111. $eachone= mysql_query("SELECT donor_last,donor_first
  112.         FROM dc_donations"
  113.         );
  114.    
  115.        
  116. /* ECHO THE PAGES */
  117. while($row=mysql_fetch_array($result))  {  
  118.             echo '<div id="'.$row['sponsoring'].'"  data-role="page">';
  119.             echo '<div data-role="header" style="height:40px;">' . '<h10>' . $row['sponsoring'] . '</h10>' . '</div>';
  120.             /* echo $row['donor_first'] . $row['donor_last']; */
  121.            
  122.             echo 'TK';
  123.             echo '</div>';
  124.         }
  125.        
  126.         while($row=mysql_fetch_array($eachone))  {
  127.             echo $row['donor_first'] . ' ' . $row['donor_last']. ' ';
  128.                 }
  129.  
  130. ?>
  131.  
  132. </span>
  133. </body>
  134. </html>
Advertisement
Add Comment
Please, Sign In to add comment