PageRenderTime 45ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/webserver/setsuden/mobile/crediets.php

https://bitbucket.org/yutof/gamificationofresearchenvironment_iphone
PHP | 77 lines | 35 code | 5 blank | 37 comment | 3 complexity | 61dd7e0637ccf971e9cf9323a35474f3 MD5 | raw file
  1. <?php
  2. require_once 'mbl_vertical_header.php';
  3. $selected_num = 4;
  4. ?>
  5. <div id="header"><a>Credits</a></div>
  6. <div id="wrapper">
  7. <div id="scroller">
  8. <ul id="thelist">
  9. <?php
  10. $link = mysql_connect($dburl, $fb_dbusr, $fb_dbpass);
  11. if (!$link) {die('Could not connect: ' . mysql_error());}
  12. mysql_select_db($dbname);
  13. mysql_set_charset('utf8',$link);
  14. $query = "SELECT Contributor_Title, Contributor_Name, Contributor_Description From Contributor Order By Contributor_Priority DESC, Contributor_Timestamp DESC;";
  15. // $charset = mysql_client_encoding($link);
  16. $result = mysql_query($query) or die('Query failed: ' .$query. mysql_error());
  17. mysql_close($link);
  18. // echo "<table class='credietsTable'><thead></thead>";
  19. // echo "<tfoot></tfoot>";
  20. // echo "<tbody>";
  21. while ($row = mysql_fetch_array($result, MYSQL_NUM))
  22. {
  23. echo "<li><div class='ctrbtr_role'>";
  24. //for($j=0; $j < 4; $j++)
  25. if(strlen($row[0]))
  26. echo "$row[0]";
  27. else
  28. echo "No Name";
  29. echo "</div></li>";
  30. // echo "<td class='credietsTable'> ";
  31. //
  32. echo "<li><div class='ctrbtr_name'> ";
  33. echo strip_tags($row[1]);
  34. // echo "</td>";
  35. //echo "<td>".$row[2]."</td>";
  36. echo "</div></li>";
  37. }//end of while
  38. /*
  39. $link = mysql_connect($dburl, $fb_dbusr, $fb_dbpass);
  40. if (!$link) {
  41. die('Could not connect: ' . mysql_error());
  42. }
  43. mysql_select_db($dbname);
  44. $query = "SELECT name, score, reportTime From StrategyReport Order By reportID DESC LIMIT 0 , 30";// LIMIT 0 , 30
  45. $result = mysql_query($query) or die('Query failed: ' .$query. mysql_error());
  46. mysql_close($link);
  47. while ($row = mysql_fetch_array($result, MYSQL_NUM))
  48. {
  49. echo "<li>";
  50. echo "<div class='li_column1'>";
  51. $date = new DateTime($row[2]);
  52. echo $date->format('n/j/y g:i');
  53. echo "</div><div class='li_column2'>";
  54. if(strlen($row[0]))
  55. echo "$row[0]";
  56. else
  57. echo "No Name";
  58. echo "&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;";
  59. echo "</div><div class='li_column3'>";
  60. printf("%3.02f%%",$row[1]);
  61. echo "</div></li>";
  62. }//end of while
  63. */
  64. ?>
  65. </ul>
  66. </div>
  67. </div>
  68. <?php
  69. require_once 'mbl_footer.php';
  70. ?>