Unfinished activity ('quantified self') tracker
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

12345678910111213141516171819202122232425262728
  1. <?PHP
  2. class WikiSource implements Source {
  3. private $data = array();
  4. public function __construct() {
  5. mysql_connect('localhost', '', '');
  6. mysql_select_db('');
  7. $sql = 'SELECT tag AS page, UNIX_TIMESTAMP(time) AS ts FROM wikka_pages WHERE user = \'ChrisSmith\'';
  8. $res = mysql_query($sql);
  9. while ($row = mysql_fetch_assoc($res)) {
  10. $message = 'Edited the <a href="http://wiki.MD87.co.uk/' . $row['page'];
  11. $message .= '">' . $row['page'] . '</a> page on my wiki';
  12. $this->data[] = new Event($row['ts'], $message);
  13. }
  14. }
  15. public function getData() {
  16. return $this->data;
  17. }
  18. }
  19. $_SOURCES[] =& new WikiSource();
  20. ?>