Unfinished activity ('quantified self') tracker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. ?>