PageRenderTime 108ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/statusbar.php

https://github.com/Jessicasoon/ProjectKentRidgeV2
PHP | 72 lines | 70 code | 1 blank | 1 comment | 4 complexity | bfd93c575adb8528459c36f3c2162f4e MD5 | raw file
  1. <?php
  2. // populate the topics panel
  3. $query_getTopics = sprintf("SELECT cat_id, cat_name, undone, (SELECT COUNT(quiz_id) FROM `q_quizzes` WHERE isPublished = 1 AND fk_quiz_cat = cat_id) as total FROM (SELECT COUNT(fk_quiz_cat) as undone, fk_quiz_cat FROM q_quizzes q WHERE q.quiz_id NOT IN (SELECT DISTINCT(fk_quiz_id) FROM `q_store_result` WHERE `fk_member_id` = %s) AND isPublished = 1 GROUP BY fk_quiz_cat) t RIGHT JOIN q_quiz_cat r ON t.fk_quiz_cat = r.cat_id", $member->id);
  4. $getTopics = mysql_query($query_getTopics, $quizroo) or die(mysql_error());
  5. $row_getTopics = mysql_fetch_assoc($getTopics);
  6. $totalRows_getTopics = mysql_num_rows($getTopics);
  7. if(isset($_GET['topic'])){
  8. $topic = $_GET['topic'];
  9. }else{
  10. $topic = 0;
  11. }
  12. ?>
  13. <div id="dialog-message" style="display:none;" title="Feature Unavailable"> Oops, this feature is currently unavailable yet. Please hang in there while we work on it. </div>
  14. <div id="statusbar-container">
  15. <div id="statusbar"> <a href="index.php" id="statusbar-logo" title="Quizroo"><span>Quizroo</span></a>
  16. <div id="statusbar-divider"></div>
  17. <div id="statusbar-notification">
  18. <div id="notification-system" class="statusbar-element" title="Notifications">
  19. <div id="notification-system-count" class="notification-count"></div>
  20. </div>
  21. </div>
  22. <div id="statusbar-divider"></div>
  23. <div id="statusbar-game">
  24. <div id="statusbar-scores" class="statusbar-element">
  25. <div id="statusbar-quizcreator">
  26. <!--<div id="statusbar-quizcreator-logo" title="Quiz Creator"></div>-->
  27. <div id="statusbar-quizcreator-count-total" class="statusbar-achievements-quizcount-top" title="Quiz Creator Popularity Score"><div class="stretch--resizer" style="margin: 0pt; padding: 0pt; white-space: nowrap; overflow: hidden; font-size: 13px; word-spacing: 0px;" type="statusbar"><span class="stretch--handle" style="margin: 0pt; padding: 0pt;" type="statusbar"><?php echo $member->quizcreator_score; ?></span></div></div>
  28. <div id="statusbar-quizcreator-count-today" class="statusbar-achievements-quizcount-bottom" title="Quiz Creator Score for Today"><div class="stretch--resizer" style="margin: 0pt; padding: 0pt; white-space: nowrap; overflow: hidden; font-size: 13px; word-spacing: 0px;" type="statusbar"><span class="stretch--handle" style="margin: 0pt; padding: 0pt;" type="statusbar"><?php echo $member->quizcreator_score_today; ?></span></div>
  29. </div>
  30. </div>
  31. <div id="statusbar-quiztaker">
  32. <div id="statusbar-quiztaker-logo" title="Quiz Creator and Taker"></div>
  33. <div id="statusbar-quiztaker-count-total" class="statusbar-achievements-quizcount-top" title="Quiz Taker Score"><div class="stretch--resizer" style="margin: 0pt; padding: 0pt; white-space: nowrap; overflow: hidden; font-size: 13px; word-spacing: 0px;"><span class="stretch--handle" style="margin: 0pt; padding: 0pt;"><?php echo $member->quiztaker_score; ?></span></div></div>
  34. <div id="statusbar-quiztaker-count-today" class="statusbar-achievements-quizcount-bottom" title="Quiz Taker Score for Today"><div class="stretch--resizer" style="margin: 0pt; padding: 0pt; white-space: nowrap; overflow: hidden; font-size: 13px; word-spacing: 0px;" type="statusbar"><span class="stretch--handle" style="margin: 0pt; padding: 0pt;" type="statusbar"><?php echo $member->quiztaker_score_today; ?></span></div>
  35. </div>
  36. </div>
  37. </div>
  38. <div id="statusbar-achievements" class="statusbar-element" title="Achievements">
  39. <div id="statusbar-achievements-count"><div class="stretch--resizer" style="margin: 0pt; padding: 0pt; white-space: nowrap; overflow: hidden; font-size: 17px; word-spacing: 0px;" type="statusbar"><span class="stretch--handle" style="margin: 0pt; padding: 0pt;" type="statusbar"><?php echo $member->getStats('achievements'); ?></span></div>
  40. </div>
  41. <div id="statusbar-achievements-logo"></div>
  42. </div>
  43. </div>
  44. <div id="statusbar-divider"></div>
  45. <div id="statusbar-quiz" class="statusbar-text statusbar-element" title="Create, Manage or Browse quizzes">Create</div>
  46. <!--ADDED BY YL ON 22nd aug, topic button-->
  47. <div id="statusbar-divider"></div>
  48. <div id="statusbar-topics" class="statusbar-text statusbar-element" title="Browse available topics">Topics</div>
  49. <div id="statusbar-divider"></div>
  50. <div id="statusbar-friends" class="statusbar-text statusbar-element" title="Find out about your friends or Invite your friends to Quizroo">Friends</div>
  51. <div id="statusbar-divider"></div>
  52. <div id="statusbar-profile" class="statusbar-text statusbar-element" title="Configure Quizroo, View usage statistics and usage history">Profile</div>
  53. <div id="statusbar-divider"></div>
  54. <div id="statusbar-about" class="statusbar-text statusbar-element" title="Get help or Find out more about Quizroo">About</div>
  55. <div id="statusbar-divider"></div>
  56. <div id="statusbar-search" class="statusbar-searchmenu-button" title="Search"><span>Search</span></div>
  57. </div>
  58. <div id="statusbar-info"></div>
  59. <div id="statusbar-sidemenu"></div>
  60. </div>
  61. <!--<div id="topics-bar" class="clear">
  62. <ul>
  63. <li><a href="index.php" class="icon"><span>#</span></a></li>
  64. <?php //do { ?>
  65. <li><a href="topics.php?topic=<?php //echo $row_getTopics['cat_id']; ?>" class="topicTitle<?php //echo ($topic == $row_getTopics['cat_id']) ? " current" : ""; ?>" title="Total <?php //echo $row_getTopics['total']; ?> quizzes, <?php //echo ($row_getTopics['undone'] != NULL) ? $row_getTopics['undone'] : 0; ?> undone"><?php //echo $row_getTopics['cat_name']; ?></a></li>
  66. <?php //} while ($row_getTopics = mysql_fetch_assoc($getTopics)); ?>
  67. </ul>
  68. </div>-->
  69. <?php
  70. mysql_free_result($getTopics);
  71. ?>