Sources for file TODO.php in version 4.0 Beta 1
Click on a comment to hide it. Click here to show all comments.
/**
* Project: Xnyo 4: Bubbles
* File: TODO.php
*
* Version: 4.0-dev
* SVN Id: $Id: TODO.php 5 2007-05-18 03:49:07Z bok $
* SVN URL: $HeadURL: http://svn.syd.wholesalebroadband.com.au/xnyo/trunk/TODO.php $
* Authors: Robert Amos <bok[at]odynia.org>
*
* Copyright (c) 2001-2007 Robert Amos <bok[at]odynia.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/
/**
* Xnyo 4 ToDo List.
**/
class XnyoToDo
{
public $items = array();
public function __construct()
{
$this->add('Move debug error plugin to debug class plugin', 'bok', 1156402376, 'bok', 1156886095);
$this->add('Move $xnyo->set_language and related functions to "language" plugin', 'bok',
1156405976, 'bok', 1156886126);
$this->add('Put objects into $xnyo->storage', 'bok', 1156406281, 'bok', 1156869839);
$this->add('Move $xnyo->load_smarty() to a smarty plugin, which should extend the Smarty class to
use our plugin structures.', 'bok', 1156409221, 'bok', 1157043999);
$this->add('Make $xnyo->d() (the debug function) work like sprintf()', 'bok', 1156837300, 'bok',
1156886137);
$this->add('Make XnyoError (the exception) work like sprintf()', 'bok', 1156837300, 'bok',
1156869870);
$this->add('Add support for percentage values in Accept-Language header', 'bok', 1156886116);
$this->add('Decide what to do with $_SERVER[\'QUERY_STRING\']', 'bok', 1156927253, 'bok',
1157044137);
$this->add('Update auth/session to Xnyo 4.', 'bok', 1157044938);
$this->add('Update database to Xnyo 4 / PDO', 'bok', 1157044954);
$this->add('Update cache system to Xnyo 4 / Bubbles', 'bok', 1157044969);
$this->add('Move me to Omniplan! And get cal.odynia.org going with it :)', 'bok', 1157044642);
$this->add('Finish off quote for burnsie', 'bok', 1156837300);
$this->add('Write Pavid (XML-RPC backend) to handle requests from bubbles.', 'bok', 1157045033);
$this->add('Add bubble framework support to Xnyo 4', 'bok', 1157045052);
$this->add('Develop bubble javascript framework (sigh)', 'bok', 1157045103);
}
/**
* Add Item to ToDo List
*
* Arguments:
* $item => Text description of the ToDo item
* $who => Person who requested the item
* $time => Unix timestamp indicating when the request was made
* $completed => Unix timestamp indicating when the request was completed
* $user => Who completed the request
**/
public function add ($item, $who, $time, $user=null, $completed=null)
{
$this->items[] = array
(
'item' => $item,
'who' => $who,
'time' => $time,
'completed' => $completed,
'user' => $user,
);
}
/**
* Display ToDo List
**/
public function display ()
{
foreach ($this->items as $k => $v)
{
// dont show completed items
if (((PHP_SAPI == 'cli' && $_SERVER['argv'][1] == '-o') || strstr($_SERVER['QUERY_STRING'],
'open')) && $v['completed'] != null)
continue;
$o .= 'Item #' . $k . ': ' . $v['item'] ."\n";
$o .= ' - Requested By: ' . $v['who'] . ' @ ' .date('h:ia, jS F Y', $v['time'])."\n";
if ($v['completed'] != NULL) $o .= ' - Completed By: ' . $v['user'] . ' @ ' .date('h:ia, jS F
Y', $v['completed'])."\n";
$o .= "\n";
}
if (PHP_SAPI == 'cli')
echo $o;
else
echo nl2br($o);
}
}
$todo = new XnyoToDo;
$todo->display();
?>
