ackertodo-cvs Mailing List for ackerTodo
Brought to you by:
zoidian
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(61) |
Jun
(102) |
Jul
(338) |
Aug
(72) |
Sep
(8) |
Oct
(35) |
Nov
(9) |
Dec
(56) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(6) |
Feb
(81) |
Mar
(56) |
Apr
(76) |
May
(73) |
Jun
(114) |
Jul
(25) |
Aug
(26) |
Sep
(56) |
Oct
(1) |
Nov
(55) |
Dec
(58) |
2006 |
Jan
(7) |
Feb
(7) |
Mar
|
Apr
(2) |
May
|
Jun
(11) |
Jul
|
Aug
(7) |
Sep
(68) |
Oct
(3) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(26) |
Apr
(13) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Shady B. S. <sha...@us...> - 2011-04-10 21:03:04
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv22370/src/includes Modified Files: users.inc controller_funcs.inc funcs.inc Log Message: 2011-04-10 shadybrooksoft Enabled ability to switch out of mobile view for current session. Index: funcs.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/funcs.inc,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** funcs.inc 8 Apr 2011 21:12:47 -0000 1.72 --- funcs.inc 10 Apr 2011 21:03:02 -0000 1.73 *************** *** 371,377 **** function is_mobile_browser() { // We only want to run this once per request. ! if( isset($GLOBALS['is_mobile_browser']) && !is_bool($GLOBALS['is_mobile_browser']) ) { return($GLOBALS['is_mobile_browser']); } // Detect the browser. require_once('includes/Browser.php'); --- 371,382 ---- function is_mobile_browser() { // We only want to run this once per request. ! if( isset($GLOBALS['is_mobile_browser']) && is_bool($GLOBALS['is_mobile_browser']) ) { return($GLOBALS['is_mobile_browser']); } + // If we are supposed to show the full version then we show the full + // version regardless of the detected browser. + if( isset($_SESSION['mobile_view']) ) { + return($_SESSION['mobile_view'] == 1); + } // Detect the browser. require_once('includes/Browser.php'); Index: controller_funcs.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/controller_funcs.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** controller_funcs.inc 29 Mar 2011 18:14:13 -0000 1.4 --- controller_funcs.inc 10 Apr 2011 21:03:02 -0000 1.5 *************** *** 126,129 **** --- 126,138 ---- redirect_on_post(); } + function controller_toggle_mobile() { + $mobile_view = 1; + if( isset($_SESSION['mobile_view']) ) { + $mobile_view = $_SESSION['mobile_view']; + } + $mobile_view = $mobile_view == 1 ? 0 : 1; + $_SESSION['mobile_view'] = $mobile_view; + header('Location: index.php'); + } function controller_install_module() { if($isadmin) { Index: users.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/users.inc,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** users.inc 10 Apr 2011 20:45:06 -0000 1.34 --- users.inc 10 Apr 2011 21:03:02 -0000 1.35 *************** *** 192,196 **** --- 192,199 ---- $date_format = $_REQUEST['newdate_format']; $theme = $_REQUEST['newtheme']; + // The default recurrence type to use when creating a new task. $default_recurrence_type = isset($_REQUEST['recurrence']) ? $_REQUEST['recurrence'] : 0; + // Force the full view even if the browser is detected as a mobile browser. + $force_full_view = isset($_REQUEST['force_full_view']) ? $_REQUEST['force_full_view'] : false; $result = db_query("UPDATE ".$table_prefix."users " *************** *** 227,232 **** $_SESSION['extra']['auto_daily'] = $_REQUEST['auto_daily']?'1':'0'; $_SESSION['extra']['ajax'] = $_REQUEST['ajax']?'1':'0'; - echo 'setting session default_recurrence_type to '.$default_recurrence_type.'<BR>'; $_SESSION['extra']['default_recurrence_type'] = $default_recurrence_type; write_extra(); } --- 230,235 ---- $_SESSION['extra']['auto_daily'] = $_REQUEST['auto_daily']?'1':'0'; $_SESSION['extra']['ajax'] = $_REQUEST['ajax']?'1':'0'; $_SESSION['extra']['default_recurrence_type'] = $default_recurrence_type; + $_SESSION['extra']['force_full_view'] = $force_full_view; write_extra(); } |
From: Shady B. S. <sha...@us...> - 2011-04-10 20:45:08
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv16286/src/includes Modified Files: users.inc groups.inc Log Message: 2011-04-10 shadybrooksoft Added mobile task form. Index: groups.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/groups.inc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** groups.inc 1 Sep 2006 16:15:45 -0000 1.16 --- groups.inc 10 Apr 2011 20:45:06 -0000 1.17 *************** *** 27,30 **** --- 27,31 ---- $first = 1; + $first_id = 0; if ($add_magic) { Index: users.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/users.inc,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** users.inc 29 Mar 2011 02:59:01 -0000 1.33 --- users.inc 10 Apr 2011 20:45:06 -0000 1.34 *************** *** 192,196 **** $date_format = $_REQUEST['newdate_format']; $theme = $_REQUEST['newtheme']; ! $default_recurrence_type = $_REQUEST['recurrence']; $result = db_query("UPDATE ".$table_prefix."users " --- 192,196 ---- $date_format = $_REQUEST['newdate_format']; $theme = $_REQUEST['newtheme']; ! $default_recurrence_type = isset($_REQUEST['recurrence']) ? $_REQUEST['recurrence'] : 0; $result = db_query("UPDATE ".$table_prefix."users " *************** *** 227,230 **** --- 227,231 ---- $_SESSION['extra']['auto_daily'] = $_REQUEST['auto_daily']?'1':'0'; $_SESSION['extra']['ajax'] = $_REQUEST['ajax']?'1':'0'; + echo 'setting session default_recurrence_type to '.$default_recurrence_type.'<BR>'; $_SESSION['extra']['default_recurrence_type'] = $default_recurrence_type; write_extra(); |
From: Shady B. S. <sha...@us...> - 2011-04-08 21:14:21
|
Update of /cvsroot/ackertodo/ackertodo/src/includes/languages In directory vz-cvs-4.sog:/tmp/cvs-serv5739/src/includes/languages Modified Files: english.inc Log Message: 2011-04-08 shadybrooksoft Added phrases for toggling between mobile/full views. Index: english.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/languages/english.inc,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** english.inc 29 Mar 2011 02:59:01 -0000 1.75 --- english.inc 8 Apr 2011 21:14:19 -0000 1.76 *************** *** 51,54 **** --- 51,56 ---- define("_USER_MENU", "User Menu"); define("_LOG_OUT", "Log Out"); + define("_TOGGLE_MOBILE_FULL", "Show Full Version"); + define("__TOGGLE_MOBILE_MOBILE", "Show Mobile Version"); /* These are for the Admin Menu. */ |
From: Shady B. S. <sha...@us...> - 2011-04-08 21:13:34
|
Update of /cvsroot/ackertodo/ackertodo/src/themes/default In directory vz-cvs-4.sog:/tmp/cvs-serv5580/src/themes/default Modified Files: mobile_default.css Log Message: 2011-04-08 shadybrooksoft Modified mobile CSS. Index: mobile_default.css =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/themes/default/mobile_default.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mobile_default.css 8 Apr 2011 00:18:06 -0000 1.1 --- mobile_default.css 8 Apr 2011 21:13:32 -0000 1.2 *************** *** 11,23 **** div.mainmenu { - background-color: #F2F2F2; - border: 1px dashed #333; - position: relative; - padding: 7px; width: auto; - margin-left: 20%; margin-right: 20%; margin-bottom: 20px; - text-align: center; } --- 11,17 ---- *************** *** 33,38 **** div.adminmenu { border-bottom: 1px dotted #333; - text-align: center; - margin-left: 1%; margin-right: 1%; margin-bottom: 7px; --- 27,30 ---- *************** *** 60,64 **** div.footer p { margin: 0px; - text-align: center; font-size: 11px; } --- 52,55 ---- *************** *** 196,199 **** --- 187,196 ---- } + th#thFilterTitle { + cursor: pointer; + background-color: lightgrey; + border-bottom: dashed 1px black; + } + table.edittask { border: none; *************** *** 202,206 **** table.tasklist { border: 2px solid #333; ! width: 99%; margin-right: 0px; } --- 199,203 ---- table.tasklist { border: 2px solid #333; ! /* width: 99%; */ margin-right: 0px; } *************** *** 217,220 **** --- 214,219 ---- border-left: 1px solid #aaa; border-right: 1px solid #aaa; + padding-bottom: 10px; + padding-top: 10px; } *************** *** 397,405 **** padding-left: 6px; border-left: 1px dotted #066; } a { color: #09c; ! font-size: 11px; font-weight: 600; border-bottom: none; --- 396,405 ---- padding-left: 6px; border-left: 1px dotted #066; + white-space: nowrap; } a { color: #09c; ! font-size: 16px; font-weight: 600; border-bottom: none; *************** *** 409,418 **** } ! /*.actions a { background-color: #CEC; border: 1px solid black; font-family: Verdana, 'trebuchet ms', helvetica, sans-serif; ! font-size: 70%; ! }*/ .actions a:hover, --- 409,421 ---- } ! .actions { ! padding-top: 10px; ! } ! .actions a { background-color: #CEC; border: 1px solid black; font-family: Verdana, 'trebuchet ms', helvetica, sans-serif; ! font-size: 12pt; ! } .actions a:hover, |
From: Shady B. S. <sha...@us...> - 2011-04-08 21:12:49
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv5386/src/includes Modified Files: funcs.inc Log Message: 2011-04-08 shadybrooksoft Fixed bug. Added function to output correct CSS file based on mobile/full view. Index: funcs.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/funcs.inc,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** funcs.inc 8 Apr 2011 00:18:06 -0000 1.71 --- funcs.inc 8 Apr 2011 21:12:47 -0000 1.72 *************** *** 411,415 **** if( is_mobile_browser() ) { $mview = 'mobile/'.$view; ! if( file_exists($mview) ) { $view = $mview; } --- 411,415 ---- if( is_mobile_browser() ) { $mview = 'mobile/'.$view; ! if( file_exists('html/'.$mview.'.html') ) { $view = $mview; } *************** *** 420,423 **** --- 420,433 ---- } + function theme_css_file() { + if( is_mobile_browser() ) { + $mtheme = 'themes/'.$GLOBALS['theme'].'/mobile_'.$GLOBALS['theme'].'.css'; + if( file_exists($mtheme) ) { + return($mtheme); + } + } + return 'themes/'.$GLOBALS['theme'].'/'.$GLOBALS['theme'].'.css'; + } + function show_default_view() { show_view('list_tasks'); |
From: Shady B. S. <sha...@us...> - 2011-04-08 21:10:46
|
Update of /cvsroot/ackertodo/ackertodo/src/html In directory vz-cvs-4.sog:/tmp/cvs-serv3973/src/html Modified Files: header.html Log Message: 2011-04-08 shadybrooksoft Added retrieval of prototype.js from Google's CDN. Index: header.html =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/html/header.html,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** header.html 28 Mar 2011 14:29:56 -0000 1.33 --- header.html 8 Apr 2011 21:10:41 -0000 1.34 *************** *** 45,61 **** <title><?php echo $version; ?></title> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> ! <link rel="stylesheet" href="themes/<?php echo "$theme/$theme.css" ?>" type="text/css" /> <link rel="icon" href="images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" /> <link rel="icon" href="images/favicon.ico" type="image/ico" /> <link rel="shortcut icon" href="images/favicon.ico" type="image/ico" /> ! <?php ! if($ajax) { ! ?> ! <script src="javascript/prototype.js" type="text/javascript"></script> ! <script src="javascript/scriptaculous.js" type="text/javascript"></script> ! <?php ! } ! ?> <script type="text/javascript"> <!-- --- 45,61 ---- <title><?php echo $version; ?></title> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> ! <link rel="stylesheet" href="<?php echo theme_css_file(); ?>" type="text/css" /> <link rel="icon" href="images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" /> <link rel="icon" href="images/favicon.ico" type="image/ico" /> <link rel="shortcut icon" href="images/favicon.ico" type="image/ico" /> ! <?php ! if($ajax) { ! ?> ! <script src="javascript/scriptaculous.js" type="text/javascript"></script> ! <?php ! } ! ?> ! <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.0/prototype.js" type="text/javascript"></script> <script type="text/javascript"> <!-- |
From: Shady B. S. <sha...@us...> - 2011-04-08 21:08:08
|
Update of /cvsroot/ackertodo/ackertodo/src/html/mobile In directory vz-cvs-4.sog:/tmp/cvs-serv3649/src/html/mobile Modified Files: login.html Added Files: list_tasks.html Log Message: 2011-04-08 shadybrooksoft Added HTML for mobile view of task list. --- NEW FILE: list_tasks.html --- <?php /* vim: set ts=4 sw=4 si:: * ackerTodo - a web-based todo list manager which supports multiple users * Copyright (C) 2004-2005 Rob Hensley * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: list_tasks.html,v 1.1 2011/04/08 21:08:05 shadybrooksoft Exp $ */ ?> <?php global $output, $theme, $_PRIORITY, $isadmin, $sort, $sortc, $print_mode; $ajax = $_SESSION['extra']['ajax']; if($ajax) { global $sajax_request_type, $sajax_debug_mode; $sajax_request_type = "POST"; $sajax_debug_mode = 0; } $i = 0; $k = 0; // get the sort order if (empty($_SESSION['extra']['order'])) { $sort = array(); } else { $sort = $_SESSION['extra']['order']; } // get the view if (empty($_SESSION['extra']['view'])) { $view = array(); } else { $view = $_SESSION['extra']['view']; } // create a more convenient assoc array $sortc = array(); $j = 1; foreach ($sort as $s) { $sortc[$s['criteria']] = $j++; } $print_mode = !empty($_REQUEST['print']); if (!isset($output['filter_priority'])) { $output['filter_priority'] = ""; } if (!isset($output['task_who'])) { $output['task_who'] = "mine"; } if (isset($_SESSION['date_format'])) { $date_format = $_SESSION['date_format']; } else { $date_format = 0; } if (isset($_GET['category'])) { $output['filter_category'] = $_GET['category']; $_SESSION['filter_category'] = $_GET['category']; } else { $output['filter_category'] = ""; // $_SESSION['filter_category'] = ""; } $pub_users = disp_public_list(); $user_in_groups = get_groups_in_array($output['login']); get_task_list(); $_SESSION['default'] = 0; function sort_widget($criteria) { global $sort, $sortc, $print_mode; if ($print_mode) { return ''; } if (empty($sortc[$criteria])) { $order = 0; $new_order = count($sort) + 1; } else { $order = $sortc[$criteria]; $dir = $sort[$order]['dir']; $dirs = $dir=='asc'?'+':'-'; $new_order = $order - 1; /*if ($new_order > count($sort)) { $new_order = 0; }*/ } $result = "<a href=\"index.php?cmd=do_set_sort&crit=$criteria&order=$order&new_order=$new_order\">$order</a>"; if ($order != 0) { $result .= "<a href=\"index.php?cmd=do_toggle_sort_dir&order=$order\">$dirs</a>"; } return $result; } ?> <?php if($ajax) { ?> <script type="text/javascript"> <!-- <?php sajax_show_javascript(); ?> --> </script> <script src="javascript/list_tasks.js" type="text/javascript"></script> <?php } if (!$print_mode) { ?> <table id="tableFilter"> <tr> <th id="thFilterTitle"><?php echo _FILTER.' '._TASK.'s'; ?> <img src="themes/<?php echo $GLOBALS['theme']; ?>/images/arrow_down_grey.gif" id="imgFilterTitle"></th> </tr> <tr class="filter"> <th nowrap="nowrap"> <form action="index.php" method="get" name="filter_text_form"> <?php echo _TITLE; ?> <input type="text" class="btn" name="filter_text" value="<?php if(isset($output['filter_text'])) { echo htmlentities($output['filter_text'], ENT_QUOTES, 'UTF-8'); }?>" onmouseover="hov(this,'btn btnhov')" onmouseout="hov(this,'btn')" /> <input type="submit" value="<?php echo _FILTER ?>" class="btn" onmouseover="hov(this,'btn btnhov')" onmouseout="hov(this,'btn')" /> </form> </th> </tr> <tr class="filter"> <th nowrap="nowrap"> <form action="index.php" method="get" name="filter_status_form"> <?php echo _STATUS; ?> <select name="task_what" size="1" class="btn" onchange="filter_status_form.submit();"> <option value="all"<?php echo ($output['task_what'] == 'all')?' selected="selected"':'' ?>><?php echo _TASKS_ALL ?></option> <option value="daily"<?php echo ($output['task_what'] == 'daily')?' selected="selected"':'' ?>><?php echo _TASKS_DAILY ?></option> <option value="open-ended"<?php echo ($output['task_what'] == 'open-ended')?' selected="selected"':'' ?>><?php echo _OPEN_ENDED ?></option> <option value="weekly"<?php echo ($output['task_what'] == 'weekly')?' selected="selected"':'' ?>><?php echo _TASKS_WEEKLY ?></option> <option value="monthly"<?php echo ($output['task_what'] == 'monthly')?' selected="selected"':'' ?>><?php echo _TASKS_MONTHLY ?></option> <option value="yearly"<?php echo ($output['task_what'] == 'yearly')?' selected="selected"':'' ?>><?php echo _TASKS_YEARLY ?></option> <option value="open"<?php echo ($output['task_what'] == 'open')?' selected="selected"':'' ?>><?php echo _TASKS_OPEN ?></option> <option value="completed"<?php echo ($output['task_what'] == 'completed')?' selected="selected"':'' ?>><?php echo _TASKS_COMPLETED ?></option> <option value="overdue"<?php echo ($output['task_what'] == 'overdue')?' selected="selected"':'' ?>><?php echo _TASKS_OVERDUE ?></option> <option value="this_week"<?php echo ($output['task_what'] == 'this_week')?' selected="selected"':'' ?>><?php echo _TASKS_THIS_WEEK ?></option> <?php if ($output['task_what'] == 'date') { ?> <option value="date" selected="selected"><?php echo _TASKS_DATE .' '. format_date_simple($output['task_date'], $date_format) ?></option> <?php } ?> </select> </form> </th> </tr> <tr class="filter"> <th nowrap="nowrap"> <form action="index.php" method="get" name="filter_priority_form"> <?php echo _PRIORITY; ?> <?php disp_priority($output['filter_priority'], '', 'filter_priority', 'onchange="filter_priority_form.submit();"') ?> </form> </th> </tr> <tr class="filter"> <th nowrap="nowrap"> <form action="index.php" method="get" name="filter_category_form"> <?php echo _CATEGORY; ?> <?php disp_category($output['filter_category'], '', 'filter_category', 'onchange="filter_category_form.submit();"', _ALL_CATEGORIES, true, true) ?> </form> </th> </tr> <tr class="filter"> <th class="actions" nowrap="nowrap"> <a href="index.php?print=true"><?php echo _PRINT ?></a> <a href="index.php?cmd=do_export_xml"><?php echo _EXPORT ?></a> </th> </tr> </table> <?php } ?> <br> <table class="tasklist"> <!-- <tr> <th nowrap="nowrap"><?php echo _TITLE . sort_widget('title') ?></th> <th nowrap="nowrap"><?php echo _STATUS . sort_widget('status') ?></th> <th nowrap="nowrap"><?php echo _PRIORITY . sort_widget('priority') ?></th> <th nowrap="nowrap"><?php echo _CATEGORY . sort_widget('category') ?></th> <?php if ($_SESSION['task_who'] != 'everyone') { ?> <th nowrap="nowrap"><?php echo _CREATION . sort_widget('creationdate') ?></th> <?php } else { ?> <th nowrap="nowrap"><?php echo _WHOS_TASK . sort_widget('login') ?></th> <?php } if (!$print_mode) { ?> <th nowrap="nowrap"><?php echo _ACTIONS ?></th> <?php } ?> </tr> --> <?php global $table_prefix; while($myrow = mysql_fetch_array($output['result'])) { $deadline = 1; $deny_group = 0; $deny_user = 0; $id = $myrow['id']; $title = trim($myrow['title']); $prio = $myrow['priority']; $recurrence = $myrow['recurrence']; $result = db_query("SELECT * FROM ".$table_prefix."comments WHERE task_id='$id'"); $num_comments = mysql_num_rows($result); $c = 0; $comments = array(); while($com = mysql_fetch_array($result)) { $comments[$c]['date'] = $com['date']; $comments[$c]['comment'] = $com['comment']; $comments[$c]['login'] = $com['login']; $comments[$c]['id'] = $com['id']; $c++; } list($status, $image) = get_status($myrow, $date_format); $temp_group = substr($myrow['login'], 6); $in_array = array_search($temp_group, $user_in_groups); if (isset($temp_group)) { $deny_group = 0; } else { $deny_group = 1; } if ($myrow['login'] != $output['login'] && !is_numeric($in_array) && !$isadmin) { $deny_user = 1; } else { $deny_user = 0; } $text_color = 'black'; if( strtolower($status) === 'complete' ) { $text_color = 'lightblue'; } if( strtolower($status) === 'complete' ) { ?><tr class="<?php echo ((++$i % 2 == 0)?'even_taskcomplete':'odd_taskcomplete'); ?>"><?php } elseif($prio == 0) { ?><tr class="<?php echo ((++$i % 2 == 0)?'even':'odd'); ?>"><?php } else { ?> <tr class="<?php echo ((++$i % 2) == 0)?'even_'.$prio:'odd_'.$prio; ?>"> <?php } if($prio == 0) { ?> <td class="<?php echo ((++$k % 2 == 0)?'even':'odd'); ?>" id="task_<?php echo $id; ?>"> <?php } else { ?> <td class="<?php if ((++$k % 2) == 0) { print "even_". $prio; } else { print "odd_". $prio; } ?>" id="task_<?php echo $id ?>"> <?php } $id = htmlentities($id, ENT_QUOTES, 'UTF-8'); ?> <span class="tasktitle"> <?php if($ajax) { ?> <span id="plus_minus_<?php echo $id ?>"> <a href="#" style="text-decoration:none;" onclick="toggleItem('<?php echo $id ?>', <?php echo $num_comments ?>); return false;"><img src="images/plus.gif" alt="Expand" /></a> </span> <?php } ?> <a href="index.php?cmd=view_task&task_id=<?php echo $id ?>" title="<?php echo $num_comments > 0 ? $num_comments : 'No' ?> Comments" class="task<?php if(strtolower($status)==='complete') { echo '_taskcomplete'; }?>"> <span style="font-weight: bold;"><?php echo $title ?></span> <?php echo $num_comments > 0 ? '*' : '' ?> </a> </span> <?php if($ajax) { ?> <span class="editbox"> <a href="#" onclick="editCell('<?php echo $id ?>', this, '<?php echo addslashes($title) ?>', 'task');return false;"><?php echo _EDIT ?></a> </span> <?php } ?> </td> <td> <span> <?php if(isset($image)) { ?> <img src="themes/<?php echo $theme; ?>/images/<?php echo $image ?>"/ width="10" height="10"> <?php } echo $status; if($myrow['completed'] == 1) { echo ' ' . _AS_OF . ' ' . format_date_simple($myrow['compdate'], $date_format); } ?> </span> <?php if($recurrence == '0' && $ajax && $myrow['completed'] == '0') { ?> <span class="editbox"> <a href="index.php?cmd=popcal&id=<?php echo $id ?>&pop_how=list" onclick="javascript:nw=window.open('index.php?cmd=popcal&id=<?php echo $id ?>&pop_how=list','popcal','height=500,width=500,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes');nw.opener=self;return false;"> <img src="themes/<?php echo $theme; ?>/images/calendar.gif" alt="<?php echo _CHANGE_DUE_DATE ?>" /> </a> </span> <?php } ?> <br> <?php if($myrow['category'] == 0) { $myrow['category_name'] = _NO_CATEGORY; } echo $myrow['category_name'] ?> <?php if ($_SESSION['task_who'] != 'everyone') { echo format_date_simple($myrow['creationdate'], $date_format); } else { if (substr($myrow['login'], 0, 6) == 'group_') { echo get_group_name(substr($myrow['login'], 6, (strlen($myrow['login'] - 6)))); } else { echo $myrow['login']; } } ?> <br> <?php if (!$print_mode) { ?> <div class="actions"> <?php if ($deny_user || $deny_group) { echo _ACCESS_DENIED; } else { ?> <a href="index.php?cmd=edit_task&task_id=<?php echo $id ?>"><?php echo _EDIT; ?></a> <?php if($ajax) { ?> <a id="delRow_<?php echo $id ?>" href="#" onclick="startDeleteTask('<?php echo $id ?>');return false;"><?php echo substr(_DELETE, 0, 4); ?></a> <?php } else { ?> <a href="index.php?cmd=do_delete_task&task_id=<?php echo $id ?>"><?php echo substr(_DELETE, 0, 4); ?></a> <?php } if ($myrow['completed'] == 1) { ?> <a href="index.php?cmd=do_open_task&task_id=<?php echo $id ?>"><?php echo _OPEN; ?></a> <?php } else { ?> <a href="index.php?cmd=do_complete_task&task_id=<?php echo $id ?>"><?php echo substr(_COMPLETE, 0, 4); ?></a> <?php } ?> </span> <?php } } ?> <br> </td> </tr> <?php if($ajax) { ?> <tr id="edit_<?php echo $id ?>" class="hide"> <td class="empty"></td> <td colspan="4" style="border-top:1px solid black;"> <textarea class="btn" id="in_edit_<?php echo $id ?>" rows="3" cols="85"><?php echo strip_tags($myrow['task']) ?></textarea> <br /> <input type="submit" class="btn" value="<?php echo _UPDATE ?>" onmouseover="hov(this,'btn btnhov')" onmouseout="hov(this,'btn')" onclick="startUpdateTask('<?php echo $id ?>');return false;" /> <span id="in_edit_<?php echo $id ?>_status"></span> </td> </tr> <?php if($num_comments > 0) { ?> <tr id="row_<?php echo $id ?>" class="hide"> <td class="empty"></td> <th class="com_header"><?php echo _DATE ?></th> <th class="com_header" colspan="3"><?php echo _COMMENT ?></th> <th class="com_header"><?php echo _WHO ?></th> </tr> <?php for($c = 0; $c < $num_comments; $c++) { ?> <tr id="com_<?php echo $id ?>_num_<?php echo $c ?>" class="hide"> <td class="empty"></td> <td style="border-top:1px solid black;"><?php echo $comments[$c]['date']; ?></td> <td colspan="3" id="com_<?php echo $id ?>_num_<?php echo $comments[$c]['id'] ?>" style="border-top:1px solid black;"> <span class="tasktitle"> <?php echo $comments[$c]['comment']; ?> </span> <span class="editbox"> <a href="#" onclick="startDeleteComment('<?php echo $id ?>', '<?php echo $comments[$i]['id'] ?>', '<?php echo $c ?>');return false;"><?php echo _DELETE ?></a> </span> <span class="editbox"> <a href="#" onclick="editCell('num_<?php echo $comments[$c]['id'] ?>', this, '<?php echo addslashes($comments[$c]['comment']) ?>', 'com_<?php echo $id ?>');return false;"><?php echo _EDIT ?></a> </span> </td> <td style="border-top:1px solid black;"><?php echo $comments[$c]['login']; ?></td> </tr> <?php } } $prev_prio = $myrow['priority']; } } ?> </table> <script type="text/javascript"> var filterrows = $('tableFilter').select('.filter'); for( var i = 0; i < filterrows.length; i++ ) { $(filterrows[i]).hide(); } $('thFilterTitle').observe('click', function(event) { for( var i = 0; i < filterrows.length; i++ ) { $(filterrows[i]).toggle(); } }); </script> Index: login.html =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/html/mobile/login.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** login.html 8 Apr 2011 00:18:06 -0000 1.1 --- login.html 8 Apr 2011 21:08:05 -0000 1.2 *************** *** 34,37 **** --- 34,38 ---- <body> + <form action="index.php" method="post" name="login"> <table class="login"> |
From: Shady B. S. <sha...@us...> - 2011-04-08 00:18:08
|
Update of /cvsroot/ackertodo/ackertodo/src/html/mobile In directory vz-cvs-4.sog:/tmp/cvs-serv18212/src/html/mobile Added Files: login.html Log Message: 2011-04-07 shadybrooksoft Added ability to create mobile formatted views. --- NEW FILE: login.html --- <?php /* vim: set ts=4 sw=4 si:: * ackerTodo - a web-based todo list manager which supports multiple users * Copyright (C) 2004-2005 Rob Hensley * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: login.html,v 1.1 2011/04/08 00:18:06 shadybrooksoft Exp $ */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="UTF-8" lang="UTF-8"> <head> <title><?php echo $GLOBALS['version']; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="themes/default/mobile_default.css" type="text/css" /> <link rel="icon" href="images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" /> <link rel="icon" href="images/favicon.ico" type="image/ico" /> <link rel="shortcut icon" href="images/favicon.ico" type="image/ico" /> </head> <body> <form action="index.php" method="post" name="login"> <table class="login"> <tr> <th colspan="2"><?php echo _LOGIN ?></th> </tr> <?php if (isset($login_error)) { ?> <tr> <th colspan="2"><?php echo $login_error ?></th> </tr> <?php } ?> <tr> <td><label for="id_login_id"><?php echo _LOGIN ?></label></td> <td><input type="text" name="login_id" id="id_login_id" /></td> </tr> <tr> <td><label for="id_login_pass"><?php echo _PASSWORD ?></label></td> <td><input type="password" name="login_pass" id="id_login_pass" /></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" name="Login" value="<?php echo _LOGIN; ?>" /></td> </tr> <tr> <td colspan="2"> <input type="checkbox" name="login_permanent" value="1" id="id_login_permanent" /> <label for="id_login_permanent"><?php echo _KEEP_LOGIN ?></label> </td> </tr> </table> <input type="hidden" name="default" value="1" /> </form> <script type="text/javascript"> <!-- document.login.login_id.focus(); //--> </script> </body> </html> |
From: Shady B. S. <sha...@us...> - 2011-04-08 00:18:04
|
Update of /cvsroot/ackertodo/ackertodo/src/html/mobile In directory vz-cvs-4.sog:/tmp/cvs-serv18203/src/html/mobile Log Message: Directory /cvsroot/ackertodo/ackertodo/src/html/mobile added to the repository |
From: Shady B. S. <sha...@us...> - 2011-04-08 00:16:52
|
Update of /cvsroot/ackertodo/ackertodo/src/config In directory vz-cvs-4.sog:/tmp/cvs-serv17946/src/config Modified Files: config.inc.php Log Message: 2011-04-07 shadybrooksoft Added list of views not to include header or footer when showing. Index: config.inc.php =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/config/config.inc.php,v retrieving revision 1.181 retrieving revision 1.182 diff -C2 -d -r1.181 -r1.182 *** config.inc.php 27 Sep 2006 12:05:36 -0000 1.181 --- config.inc.php 8 Apr 2011 00:16:50 -0000 1.182 *************** *** 29,33 **** $default_language = 'english'; /* Language before anybody logs in */ ! $debug = false; /* Debug master-switch */ $db_debug = false; /* Dump DB statements to debug */ --- 29,33 ---- $default_language = 'english'; /* Language before anybody logs in */ ! $debug = false; /* Debug master-switch */ $db_debug = false; /* Dump DB statements to debug */ *************** *** 37,41 **** $reopen_daily_tasks = true; /* Set to true to automatically reopen daily tasks the next day */ $version_number = '4.3-cvs-b1'; $version = "ackerTodo v$version_number"; ! ?> --- 37,43 ---- $reopen_daily_tasks = true; /* Set to true to automatically reopen daily tasks the next day */ + /*** DO NOT EDIT BELOW THIS LINE ***/ $version_number = '4.3-cvs-b1'; $version = "ackerTodo v$version_number"; ! $views_without_header_footer = array('popcal', 'login'); ! ?> \ No newline at end of file |
From: Shady B. S. <sha...@us...> - 2011-04-08 00:15:44
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv17775/src/includes Added Files: Browser.php Log Message: 2011-04-07 shadybrooksoft Added browser detection library (http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/) --- NEW FILE: Browser.php --- <?php /** * File: Browser.php * Author: Chris Schuld (http://chrisschuld.com/) * Last Modified: August 20th, 2010 * @version 1.9 * @package PegasusPHP * * Copyright (C) 2008-2010 Chris Schuld (ch...@ch...) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details at: [...1012 lines suppressed...] } elseif( stripos($this->_agent, 'OpenSolaris') !== false ) { $this->_platform = self::PLATFORM_OPENSOLARIS; } elseif( stripos($this->_agent, 'SunOS') !== false ) { $this->_platform = self::PLATFORM_SUNOS; } elseif( stripos($this->_agent, 'OS\/2') !== false ) { $this->_platform = self::PLATFORM_OS2; } elseif( stripos($this->_agent, 'BeOS') !== false ) { $this->_platform = self::PLATFORM_BEOS; } elseif( stripos($this->_agent, 'win') !== false ) { $this->_platform = self::PLATFORM_WINDOWS; } } } ?> |
From: Shady B. S. <sha...@us...> - 2011-04-07 23:10:30
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv30666/src/includes Modified Files: tasks.inc Log Message: 2011-04-07 shadybrooksoft Added get_tasks function. Index: tasks.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/tasks.inc,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** tasks.inc 28 Mar 2011 22:41:15 -0000 1.66 --- tasks.inc 7 Apr 2011 23:10:27 -0000 1.67 *************** *** 347,351 **** return array($status, $image); } ! /* Show list of tasks */ function get_task_list() { --- 347,360 ---- return array($status, $image); } ! function get_tasks($login, $ret = 'resultset') { ! $result = db_query("SELECT * FROM ".$GLOBALS['table_prefix']."tasks " ! ."WHERE login='$login' " ! ."AND completed='0'"); ! switch( $ret ) { ! case 'resultset': ! return($result); ! } ! return(null); ! } /* Show list of tasks */ function get_task_list() { |
From: Shady B. S. <sha...@us...> - 2011-04-07 23:09:18
|
Update of /cvsroot/ackertodo/ackertodo/src/scripts In directory vz-cvs-4.sog:/tmp/cvs-serv30476/src/scripts Modified Files: cmd.php Log Message: 2011-04-07 shadybrooksoft Added code to allow src/scripts/cmd.php to be called from a web browser. Index: cmd.php =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/scripts/cmd.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** cmd.php 20 Mar 2005 16:03:57 -0000 1.13 --- cmd.php 7 Apr 2011 23:09:16 -0000 1.14 *************** *** 22,48 **** ?> <?php $full_path = dirname(__FILE__); ! $temp_path = split("/", $full_path); $final_path = "/".$temp_path[1]."/".$temp_path[2]."/".$temp_path[3]."/"; $i = 1; ! include($final_path.'/config/config.inc.php'); include($final_path.'/includes/funcs.inc'); include($final_path.'/includes/cli.inc'); include_once($final_path.'/includes/db.inc'); $options = array("list_tasks", "add_task", "del_task", "list_users", "add_user", "del_user", "list_categories", "add_category", "del_category"); ! $choice = $argv[1]; if($choice == NULL || !in_array($choice, $options)) { if($choice == NULL) { ! echo "You must enter a command!\n"; } else { ! echo $choice . " is not a valid command!\n"; } ! print_help(); exit; } --- 22,90 ---- ?> <?php + + function output($str) { + if( $GLOBALS['cli'] ) { + echo $str."\n"; + } + else { + echo $str."<BR>\n"; + } + } + function call_func() { + $args = func_get_args(); + if( count($args) == 0 ) { + return(null); + } + $func = array_shift($args); + if( !$GLOBALS['cli'] ) { + $func .= '_web'; + } + else { + $func .= '_cli'; + } + if( !function_exists($func) ) { + return(null); + } + return( call_user_func_array($func, $args) ); + } + + /* + $full_path = dirname(__FILE__); ! $temp_path = explode(DIRECTORY_SEPARATOR, $full_path); $final_path = "/".$temp_path[1]."/".$temp_path[2]."/".$temp_path[3]."/"; + */ $i = 1; ! $final_path = '..'; include($final_path.'/config/config.inc.php'); include($final_path.'/includes/funcs.inc'); + include($final_path.'/includes/tasks.inc'); include($final_path.'/includes/cli.inc'); include_once($final_path.'/includes/db.inc'); + // Valid options/commands. $options = array("list_tasks", "add_task", "del_task", "list_users", "add_user", "del_user", "list_categories", "add_category", "del_category"); ! $cli = !isset($_SERVER['REQUEST_METHOD']); + // Determine which option/command has been given. + $choice = null; + if( $cli && $argc > 1 ) { + $choice = $argv[1]; + } + elseif( !$cli && isset($_REQUEST['choice']) ) { + $choice = $_REQUEST['choice']; + } + + // Invalid options produce an error. if($choice == NULL || !in_array($choice, $options)) { if($choice == NULL) { ! output("You must enter a command!"); } else { ! output($choice . " is not a valid command!"); } ! call_func('print_help'); exit; } *************** *** 52,69 **** } ! $login = login(); switch($choice) { case "list_tasks": ! list_tasks($login); break; case "add_task": ! add_task($login); break; case "del_task": ! del_task($login); break; case "list_users": ! list_users(); break; case "add_user": --- 94,111 ---- } ! $login = call_func('login'); switch($choice) { case "list_tasks": ! call_func('list_tasks', $login); break; case "add_task": ! call_func('add_task', $login); break; case "del_task": ! call_func('del_task', $login); break; case "list_users": ! call_func('list_users'); break; case "add_user": *************** *** 75,79 **** break; case "add_category": ! add_category($login); break; case "del_category": --- 117,121 ---- break; case "add_category": ! call_func('add_category', $login); break; case "del_category": *************** *** 82,86 **** break; case "list_categories": ! list_categories($login); break; } --- 124,128 ---- break; case "list_categories": ! call_func('list_categories', $login); break; } |
From: Shady B. S. <sha...@us...> - 2011-03-29 18:14:15
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv17937/src/includes Modified Files: controller_funcs.inc Log Message: 2011-03-29 shadybrooksoft Added comments. Fixed emailing non-posting user(s) when adding a task. Index: controller_funcs.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/controller_funcs.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** controller_funcs.inc 29 Mar 2011 03:05:56 -0000 1.3 --- controller_funcs.inc 29 Mar 2011 18:14:13 -0000 1.4 *************** *** 32,37 **** } } function controller_add_task() { ! if($_REQUEST['recurrence'] == 2) { $_REQUEST['day'] = $_REQUEST['dow']; } --- 32,52 ---- } } + /** + * Adds a new task. + */ function controller_add_task() { ! // Required $_REQUEST indexes: ! // recurrence integer see disp_recurrence_types() for correct values ! // title string the task's title (cannot be blank) ! // task string the task details ! // users array list of users who are assigned this task ! // priority integer see includes/languages/english.inc for correct values ! // category integer ID of the category to be used; 0 otherwise ! // Optional $_REQUEST indexes: ! // year, month, day if year is set then month and day must also be set. ! // this is the date the task is due by. ! ! ! if($_REQUEST['recurrence'] == 2) { $_REQUEST['day'] = $_REQUEST['dow']; } *************** *** 49,53 **** $task = strip_tags($_REQUEST['task'], '<b><i><br><li>'); $recurrence = $_REQUEST['recurrence']; ! $users = $_REQUEST['users']; $priority = $_REQUEST['priority']; $category = $_REQUEST['category']; --- 64,68 ---- $task = strip_tags($_REQUEST['task'], '<b><i><br><li>'); $recurrence = $_REQUEST['recurrence']; ! $users = !is_array($_REQUEST['users']) ? array($_REQUEST['users']) : $_REQUEST['users']; $priority = $_REQUEST['priority']; $category = $_REQUEST['category']; *************** *** 57,67 **** } else { add_task($title, $task, $final_date, $recurrence, $users, $priority, $category); ! if($users != $GLOBALS['login']) { ! $task_array = array($title, $task, $recurrence, $priority, ! $category, $_SESSION['login']); ! $email_user = db_query("SELECT * FROM ".$GLOBALS['table_prefix']."users " ! ."WHERE login='$users'"); ! send_email($email_user, $task_array); ! } $output['message'] = _TASK_ADDED; } --- 72,87 ---- } else { add_task($title, $task, $final_date, $recurrence, $users, $priority, $category); ! // Loop over all the users who were assigned this task and send emails ! // to the ones who did not do the assigning (since that user already ! // knows the task has been assigned....they assigned it!) ! foreach( $users as $u ) { ! if( $u != $GLOBALS['login'] ) { ! $task_array = array($title, $task, $recurrence, $priority, ! $category, $_SESSION['login']); ! $email_user = db_query("SELECT * FROM ".$GLOBALS['table_prefix']."users " ! ."WHERE login='$users'"); ! send_email($email_user, $task_array); ! } ! } $output['message'] = _TASK_ADDED; } |
From: Shady B. S. <sha...@us...> - 2011-03-29 03:05:58
|
Update of /cvsroot/ackertodo/ackertodo/src/html In directory vz-cvs-4.sog:/tmp/cvs-serv17938/src/html Modified Files: admin_remove_category.html Log Message: 2011-03-28 shadybrooksoft Bug fixes. Index: admin_remove_category.html =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/html/admin_remove_category.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_remove_category.html 7 Sep 2005 14:16:20 -0000 1.2 --- admin_remove_category.html 29 Mar 2011 03:05:55 -0000 1.3 *************** *** 30,34 **** } ! $global = $_REQUEST['global']; $i = 0; ?> --- 30,34 ---- } ! $global = isset($_REQUEST['global']) ? $_REQUEST['global'] : 0; $i = 0; ?> |
From: Shady B. S. <sha...@us...> - 2011-03-29 02:59:04
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv17573/src/includes Modified Files: users.inc controller_funcs.inc Log Message: 2011-03-28 shadybrooksoft Added ability to set default recurrence type. Index: controller_funcs.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/controller_funcs.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** controller_funcs.inc 29 Mar 2011 00:21:06 -0000 1.1 --- controller_funcs.inc 29 Mar 2011 02:59:01 -0000 1.2 *************** *** 208,220 **** } function controller_edit_info() { ! if (isset($users) && $users != $login) { // trying to edit another user verify_admin(); } else { ! $users = $login; } if (isset($_REQUEST['newpass'])) { ! $error = change_pw($users, isset($_REQUEST['curpass'])?$_REQUEST['curpass']:null, $_REQUEST['newpass'], $_REQUEST['verpass']); if ($error) { --- 208,220 ---- } function controller_edit_info() { ! if (isset($GLOBALS['users']) && $GLOBALS['users'] != $GLOBALS['login']) { // trying to edit another user verify_admin(); } else { ! $GLOBALS['users'] = $GLOBALS['login']; } if (isset($_REQUEST['newpass'])) { ! $error = change_pw($GLOBALS['users'], isset($_REQUEST['curpass'])?$_REQUEST['curpass']:null, $_REQUEST['newpass'], $_REQUEST['verpass']); if ($error) { Index: users.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/users.inc,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** users.inc 28 Mar 2011 19:35:13 -0000 1.32 --- users.inc 29 Mar 2011 02:59:01 -0000 1.33 *************** *** 192,195 **** --- 192,196 ---- $date_format = $_REQUEST['newdate_format']; $theme = $_REQUEST['newtheme']; + $default_recurrence_type = $_REQUEST['recurrence']; $result = db_query("UPDATE ".$table_prefix."users " *************** *** 226,229 **** --- 227,231 ---- $_SESSION['extra']['auto_daily'] = $_REQUEST['auto_daily']?'1':'0'; $_SESSION['extra']['ajax'] = $_REQUEST['ajax']?'1':'0'; + $_SESSION['extra']['default_recurrence_type'] = $default_recurrence_type; write_extra(); } *************** *** 254,257 **** --- 256,272 ---- } + function disp_recurrence_types($selected_option = 0) { + ?> + <select name="recurrence" size="1" class="btn" onchange="disp_choice(this);"> + <option value="0" <?php if( $selected_option == 0 ) { echo 'selected'; } ?>><?php echo _NO_RECURRENCE ?></option> + <option value="1" <?php if( $selected_option == 1 ) { echo 'selected'; } ?>><?php echo _DAILY ?></option> + <option value="2" <?php if( $selected_option == 2 ) { echo 'selected'; } ?>><?php echo _WEEKLY ?></option> + <option value="3" <?php if( $selected_option == 3 ) { echo 'selected'; } ?>><?php echo _MONTHLY ?></option> + <option value="5" <?php if( $selected_option == 5 ) { echo 'selected'; } ?>><?php echo _YEARLY ?></option> + <option value="4" <?php if( $selected_option == 4 ) { echo 'selected'; } ?>><?php echo _OPEN_ENDED ?></option> + </select> + <?php + } + /* This is the function that displays the form to change the users * language. */ |
From: Shady B. S. <sha...@us...> - 2011-03-29 02:59:03
|
Update of /cvsroot/ackertodo/ackertodo/src/includes/languages In directory vz-cvs-4.sog:/tmp/cvs-serv17573/src/includes/languages Modified Files: english.inc Log Message: 2011-03-28 shadybrooksoft Added ability to set default recurrence type. Index: english.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/languages/english.inc,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** english.inc 28 Mar 2011 14:16:55 -0000 1.74 --- english.inc 29 Mar 2011 02:59:01 -0000 1.75 *************** *** 243,246 **** --- 243,247 ---- define("_EMAIL", "Email"); define("_AIM", "AIM Screenname"); + define("_DEFAULT_RECURRENCE_TYPE", "Default Recurrence Type"); define("_IS_ADMIN", "Administrator?"); define("_GROUP_NAME", "Group Name"); |
From: Shady B. S. <sha...@us...> - 2011-03-29 00:21:08
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv1402/src/includes Added Files: controller_funcs.inc view_funcs.inc Log Message: 2011-03-28 shadybrooksoft Moved code into functions and out of index.php. --- NEW FILE: controller_funcs.inc --- <?php /** * This file holds the functions for the each controllers's logic. * @author shadybrooksoft */ /** * Quick task add. */ function controller_add_task_quick() { if (isset($_REQUEST['task_name']) && $_REQUEST['task_name']) { $task_name = strip_tags($_REQUEST['task_name'], '<b><i>'); // set category if filter is set on list_tasks $category = get_value_session_request('filter_category'); if ($category) { // don't do it if supercat if (substr($category, 0, 2) == 's_') { $category = ''; } } add_task($task_name, '', null, 4, $GLOBALS['login'], 0, $category); $output['message'] = _TASK_ADDED; redirect_on_post(); } else { $output['error'] = _QUERY_ERROR; show_default_view(); } } function controller_add_task() { if($_REQUEST['recurrence'] == 2) { $_REQUEST['day'] = $_REQUEST['dow']; } if($_REQUEST['recurrence'] == 3) { $_REQUEST['day'] = $_REQUEST['mday']; } if(isset($_REQUEST['year'])) { $date_array = array($_REQUEST['year'], $_REQUEST['month'], $_REQUEST['day']); $final_date = implode("", $date_array); } $title = strip_tags($_REQUEST['title'], '<b><i>'); $task = strip_tags($_REQUEST['task'], '<b><i><br><li>'); $recurrence = $_REQUEST['recurrence']; $users = $_REQUEST['users']; $priority = $_REQUEST['priority']; $category = $_REQUEST['category']; if($title == "") { $output['error'] = _ENTER_TITLE; } else { add_task($title, $task, $final_date, $recurrence, $users, $priority, $category); if($users != $GLOBALS['login']) { $task_array = array($title, $task, $recurrence, $priority, $category, $_SESSION['login']); $email_user = db_query("SELECT * FROM ".$GLOBALS['table_prefix']."users " ."WHERE login='$users'"); send_email($email_user, $task_array); } $output['message'] = _TASK_ADDED; } redirect_on_post(); } function controller_update_task() { if($_REQUEST['recurrence'] == 2) { $_REQUEST['day'] = $_REQUEST['dow']; } if($_REQUEST['recurrence'] == 3) { $_REQUEST['day'] = $_REQUEST['mday']; } if(isset($_REQUEST['year'])) { $date_array = array($_REQUEST['year'], $_REQUEST['month'], $_REQUEST['day']); $final_date = implode("", $date_array); } if(isset($_REQUEST['recurrence'])) { $recurrence = $_REQUEST['recurrence']; } else { $recurrence = ""; } $title = strip_tags($_REQUEST['title'], '<b><i>'); $task = strip_tags($_REQUEST['task'], '<b><i><br><li>'); $users = $_REQUEST['users']; $priority = $_REQUEST['priority']; $category = $_REQUEST['category']; $task_id = $_REQUEST['task_id']; if (!is_numeric($task_id)) { exit; } update_task($title, $task, $final_date, $recurrence, $users, $priority, $category, $task_id); $output['message'] = _TASK_UPDATED; redirect_on_post(); } function controller_install_module() { if($isadmin) { $result = db_query("INSERT INTO ".$table_prefix."modules (name) " ."VALUES ('" . $_REQUEST['module'] . "')"); } if($result == true) { $output['message'] = _MODULE_INSTALL; } else { $output['error'] = _QUERY_ERROR; } $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_uninstall_module() { if($isadmin) { $result = db_query("DELETE FROM ".$table_prefix."modules " ."WHERE name='" . $_REQUEST['module'] . "'"); } if($result == true) { $output['message'] = _MODULE_UNINSTALL; } else { $output['error'] = _QUERY_ERROR; } $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_disable_module() { if($isadmin) { $file = "modules/" . $_REQUEST['module'] . "/module.inc"; include($file); $function = $_REQUEST['module'] . "_disable"; $result = db_query("UPDATE ".$table_prefix."modules " ."SET enabled='0' " ."WHERE name='" . $_REQUEST['module'] . "'"); $function(); } if($result == true) { $output['message'] = _MODULE_DISABLE; } else { $output['error'] = _QUERY_ERROR; } $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_enable_module() { if($isadmin) { $result = db_query("UPDATE ".$table_prefix."modules " ."SET enabled='1' " ."WHERE name='" . $_REQUEST['module'] . "'"); } if($result == true) { $output['message'] = _MODULE_ENABLE; } else { $output['error'] = _QUERY_ERROR; } $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_load_module() { $module = $_REQUEST['module']; $what = $_REQUEST['what']; $module_file = "modules/" . $module . "/module.inc"; $module_main = $module . "_module_main"; include($module_file); if($_FILES != NULL) { $return = $module_main($what, $_FILES); } else { $return = $module_main($what); } $output['message'] = $return['message']; $output['error'] = $return['error']; $output['next_view'] = $return['next_view']; redirect_on_post(); } function controller_change_pw() { if($isadmin) { $error = change_pw($GLOBALS['users'], '', $_REQUEST['newpass'], $_REQUEST['verpass']); } else { $error = change_pw($GLOBALS['users'], $_REQUEST['curpass'], $_REQUEST['newpass'], $_REQUEST['verpass']); } if ($error) { show_view('admin_menu'); } else { $output['next_view'] = 'admin_menu'; redirect_on_post(); } } function controller_edit_info() { if (isset($users) && $users != $login) { // trying to edit another user verify_admin(); } else { $users = $login; } if (isset($_REQUEST['newpass'])) { $error = change_pw($users, isset($_REQUEST['curpass'])?$_REQUEST['curpass']:null, $_REQUEST['newpass'], $_REQUEST['verpass']); if ($error) { show_view('admin_menu'); exit; } } change_user(); redirect_on_post('index.php?cmd=admin_menu&users='.$users); } function controller_add_user_quick() { verify_admin(); if($_REQUEST['add_user'] == "") { $output['error'] = _ENTER_USER; $output['next_view'] = 'admin_menu'; } else { $result = db_query("SELECT * FROM ".$table_prefix."groups WHERE name='$add_user'"); if(($myrow = mysql_fetch_array($result)) == 0) { $add_user = strip_tags($_REQUEST['add_user']); $result = db_query("INSERT INTO ".$table_prefix."users (login) " ."VALUES ('$add_user')"); $output['message'] = _USER_ADDED; $output['next_view'] = 'admin_menu'; } else { $output['error'] = _ALREADY_GROUP; $output['next_view'] = 'admin_menu'; } } redirect_on_post(); } function controller_add_group() { verify_admin(); if($_REQUEST['group_name'] == "") { $output['error'] = _ENTER_GROUP; show_view('admin_menu'); } else { $add_group = strip_tags($_REQUEST['group_name']); $result = db_query("SELECT * FROM ".$table_prefix."users WHERE login='$add_group'"); if(($myrow = mysql_fetch_array($result)) == 0) { $result = db_query("INSERT INTO ".$table_prefix."groups (name) " ."VALUES ('$add_group')"); $output['message'] = _GROUP_ADDED; $output['next_view'] = 'admin_menu'; redirect_on_post(); } else { $output['error'] = _ALREADY_USER; show_view('admin_menu'); } } } function controller_edit_group() { verify_admin(); $group_id = $_REQUEST['group_id']; $members = $_REQUEST['members']; set_group_members($group_id, $members); set_group_name($group_id, $_REQUEST['group_name']); $output['message'] = _GROUP_UPDATED; redirect_on_post('index.php?cmd=admin_menu&group=' . $group_id); } function controller_remove_from_group() { verify_admin(); $user = $_REQUEST['user']; $group_id = $_REQUEST['group_id']; remove_user_from_group($user, $group_id); $output['message'] = _REMOVED_FROM_GROUP; $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_add_to_group() { verify_admin(); $user = $_REQUEST['user']; $group_id = $_REQUEST['group_id']; add_user_to_group($user, $group_id); $output['message'] = _ADDED_TO_GROUP; $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_remove_user() { verify_admin(); if($login == $users) { $output['error'] = _REMOVE_YOURSELF; show_view('admin_menu'); } else { remove_user($users); $output['message'] = _USER_REMOVED; $output['next_view'] = 'admin_menu'; redirect_on_post(); } } function controller_remove_group() { verify_admin(); remove_group($_REQUEST['group_id']); $output['message'] = _GROUP_REMOVED; $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_add_supercat() { if($_REQUEST['supercat_name'] == "") { $output['error'] = _ENTER_SUPERCAT; show_view('admin_menu'); } else { $add_supercat = strip_tags($_REQUEST['supercat_name']); $result = db_query("SELECT * FROM ".$table_prefix."supercats WHERE name='$add_supercat' AND login='$login'"); if(($myrow = mysql_fetch_array($result)) == 0) { $result = db_query("INSERT INTO ".$table_prefix."supercats (name, login) " ."VALUES ('$add_supercat', '$login')"); $output['message'] = _GROUP_SUPERCAT; $output['next_view'] = 'admin_menu'; redirect_on_post(); } else { $output['error'] = _ALREADY_SUPERCAT; show_view('admin_menu'); } } } function controller_remove_from_supercat() { $category_id = $_REQUEST['category_id']; $supercat_id = $_REQUEST['supercat_id']; remove_category_from_supercat($category_id, $supercat_id); $output['message'] = _REMOVED_FROM_SUPERCAT; $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_add_to_supercat() { $category_id = $_REQUEST['category_id']; $supercat_id = $_REQUEST['supercat_id']; add_category_to_supercat($category_id, $supercat_id); $output['message'] = _ADDED_TO_SUPERCAT; $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_remove_supercat() { remove_supercat($_REQUEST['supercat_id']); $output['message'] = _SUPERCAT_REMOVED; $output['next_view'] = 'admin_menu'; redirect_on_post(); } function controller_add_comment() { if($_REQUEST['comment'] == "") { $output['error'] = _ENTER_COMMENT; } else { $comment = strip_tags($_REQUEST['comment'], '<b><i><u><br><li>'); if(isset($_REQUEST['comment_id'])) { if(!is_numeric($_REQUEST['comment_id'])) { exit; } update_comment($_REQUEST['comment_id'], $comment); $output['message'] = _COMMENT_UPDATED; } else { if(!is_numeric($_REQUEST['task_id'])) { exit; } add_comment($_REQUEST['task_id'], $comment); $output['message'] = _COMMENT_ADDED; } } $output['next_view'] = 'view_task'; redirect_on_post(); } function controller_remove_comment() { $comment_id = $_REQUEST['comment_id']; db_query( "DELETE FROM ".$table_prefix."comments WHERE id = '$comment_id'" ); $output['message'] = _COMMENT_REMOVED; $output['next_view'] = 'view_task'; redirect_on_post(); } function controller_delete_task() { $task_id = $_REQUEST['task_id']; if (!is_numeric($task_id)) { exit; } $result = db_query("DELETE FROM ".$table_prefix."tasks WHERE id='$task_id'"); if($result == true) { $output['message'] = _TASK_DELETED; } else { $output['error'] = _QUERY_ERROR; } show_default_view(); } function controller_complete_task() { $task_id = $_REQUEST['task_id']; if (!is_numeric($task_id)) { exit; } $result = db_query("UPDATE ".$table_prefix."tasks " ."SET completed='1',compdate=CURDATE()+0,compby='$login' " ."WHERE id='$task_id'"); if($result == true) { $output['message'] = _TASK_CLOSED; } else { $output['error'] = _QUERY_ERROR; } redirect_on_post(); } function controller_open_task() { $task_id = $_REQUEST['task_id']; if (!is_numeric($task_id)) { exit; } $result = db_query("UPDATE ".$table_prefix."tasks " ."SET completed='0',compdate='00000000',compby=' ' " ."WHERE id='$task_id'"); if($result == true) { $output['message'] = _TASK_OPENED; } else { $output['error'] = _QUERY_ERROR; } redirect_on_post(); } function controller_add_user_permission() { $other_user = $_REQUEST['other']; if( $_REQUEST['other'] == 'specific' ) { $other_user = $_REQUEST['specific_user']; } $sql = 'INSERT INTO '.$table_prefix.'users_others_permissions '. '(login, other_user, permission, granted) '. 'VALUES ("'.db_sanitize($_REQUEST['users']).'",' . ' "'.db_sanitize($other_user).'",' . ' "'.db_sanitize($_REQUEST['permission']).'",' . ' 1)'; $result = db_query($sql); redirect_on_post(); } function controller_add_category() { $name = strip_tags($_REQUEST['category_name']); if ($name != "") { if ($_REQUEST['global'] == 1) { $result = db_query("INSERT INTO ".$table_prefix."category (name) VALUES ('$name')"); } else { $result = db_query("INSERT INTO ".$table_prefix."category (name, login) VALUES ('$name', '$login')"); } $output['message'] = _CATEGORY_CREATED; $output['next_view'] = 'admin_menu'; redirect_on_post(); } else { $output['error'] = _ENTER_CATEGORY; show_view('admin_menu'); } } function controller_update_category() { $new_name = strip_tags($_REQUEST['new_name']); $cat_id = $_REQUEST['category_id']; if (isset($new_name)) { $result = db_query("UPDATE ".$table_prefix."category SET name='$new_name' WHERE id='$cat_id'"); $output['message'] = _CATEGORY_UPDATED; $output['next_view'] = 'admin_menu'; redirect_on_post(); } else { $output['error'] = _ENTER_CATEGORY; show_view('admin_menu'); } } function controller_remove_category() { $how = $_REQUEST['how']; $category_id = $_REQUEST['category_id']; $global = $_REQUEST['global']; if ($global == 1) { $login = ''; } else { $login = $_SESSION['login']; } if (isset($category_id)) { if ($how == 'rem_all') { $result = db_query("DELETE FROM ".$table_prefix."category " ."WHERE login='$login' " ."AND id='$category_id'"); if($global == 1) { $result = db_query("DELETE FROM ".$table_prefix."tasks " ."WHERE category='$category_id'"); } else { $result = db_query("DELETE FROM ".$table_prefix."tasks " ."WHERE login='$login' " ."AND category='$category_id'"); } } elseif ($how == 'reset') { $result = db_query("DELETE FROM ".$table_prefix."category " ."WHERE login='$login' " ."AND id='$category_id'"); if($global == 1) { $result = db_query("UPDATE ".$table_prefix."tasks SET category='0' " ."WHERE category='$category_id'"); } else { $result = db_query("UPDATE ".$table_prefix."tasks SET category='0' " ."WHERE login='$login' " ."AND category='$category_id'"); } } $output['message'] = _CATEGORY_DELETED; $output['next_view'] = 'admin_menu'; redirect_on_post(); } else { $output['error'] = _NO_ID; show_view('admin_menu'); } } function controller_set_view() { $default_tasks = $_REQUEST['tasks']; if ($_REQUEST['users'] == '') { $default_users = "mine"; } else { $default_users = $_REQUEST['users']; } $default_priority = $_REQUEST['priority']; $default_category = $_REQUEST['category']; $view = & $_SESSION['extra']['view']; if (empty($view)) { $view = array(); } $view['tasks'] = $default_tasks; $view['users'] = $default_users; $view['priority'] = $default_priority; $view['category'] = $default_category; $output['message'] = _VIEW_UPDATED; write_extra(); show_view('list_tasks'); } function controller_set_sort() { $criteria = $_REQUEST['crit']; $old_order = $_REQUEST['order']; $new_order = $_REQUEST['new_order']; $order = & $_SESSION['extra']['order']; if (empty($order)) { $order = array(); } if ($old_order == 0) { $new_crit['criteria'] = $criteria; $new_crit['dir'] = 'asc'; $order[$new_order] = $new_crit; } elseif ($new_order == 0) { $count = count($order); if ($old_order < $count) { for ($i = $old_order; $i < $count; $i++) { $order[$i] = $order[$i + 1]; } } unset($order[$count]); } else { $tmp = $order[$new_order]; $order[$new_order] = $order[$old_order]; $order[$old_order] = $tmp; } write_extra(); show_view('list_tasks'); } function controller_toggle_sort_dir() { $order = $_REQUEST['order']; $_SESSION['extra']['order'][$order]['dir'] = $_SESSION['extra']['order'][$order]['dir'] == 'asc' ? 'desc' : 'asc'; write_extra(); show_view('list_tasks'); } function controller_logout() { session_destroy(); $login_error = _LOGGED_OUT; include('html/login.html'); } ?> --- NEW FILE: view_funcs.inc --- <?php /** * This file holds the functions for the each view's logic. * @author shadybrooksoft */ /** * Default view */ function view_default() { $cur_dow = "1" . date("w", strtotime(date("Ymd"))); $this_year = date("Y"); $this_month = date("m"); $this_day = date("d"); $today = $this_year . $this_month . $this_day; $next_yearly = $this_year + 1 . $this_month . $this_day; if($this_month == 12) { $next_month = '01'; $next_year = $this_year + 1; } else { $next_month = $this_month + 1; $next_year = $this_year; } $next_monthly = $next_year . $next_month . $this_day; /* START REOPEN DAILY */ // SQL Injection #1 $GLOBALS['login'] = mysql_real_escape_string($GLOBALS['login']); if ($GLOBALS['reopen_daily_tasks']) { $result = db_query( 'SELECT id ' . 'FROM '.$GLOBALS['table_prefix'].'tasks ' . 'WHERE login="'.$GLOBALS['login'].'" AND ' . ' recurrence=1 AND ' . ' completed=1 AND ' . ' compdate < CURDATE()' ); $ids = array(); while($myrow = mysql_fetch_array($result)) { $ids[] = $myrow['id']; } if (!empty($ids)) { db_query("UPDATE ".$GLOBALS['table_prefix']."tasks " ."SET completed='0',compdate='00000000',compby='' " .'WHERE id IN (' . implode(',', $ids) . ')'); } } /* END REOPEN DAILY */ /* START REOPEN WEEKLY */ $result = db_query("SELECT id,date FROM ".$GLOBALS['table_prefix']."tasks " ."WHERE login='".$GLOBALS['login']."' " ."AND recurrence='2' " ."AND completed='1' " ."AND compdate != CURDATE()"); $ids = array(); while($myrow = mysql_fetch_array($result)) { if($cur_dow != substr($myrow['date'], 6, 2)) { $ids[] = $myrow['id']; } } if (!empty($ids)) { db_query("UPDATE ".$GLOBALS['table_prefix']."tasks " ."SET completed='0',compdate='00000000',compby='' " .'WHERE id IN (' . implode(',', $ids) . ')'); } /* END REOPEN WEEKLY */ /* START REOPEN MONTHLY */ $result = db_query("SELECT id,date FROM ".$GLOBALS['table_prefix']."tasks " ."WHERE login='".$GLOBALS['login']."' " ."AND recurrence='3' " ."AND completed='1'"); $ids = array(); while($myrow = mysql_fetch_array($result)) { $temp_day = substr($myrow['date'], 6, 2); if($temp_day == $this_day) { $ids[] = $myrow['id']; } } if (!empty($ids)) { db_query("UPDATE ".$GLOBALS['table_prefix']."tasks " ."SET completed='0',compdate='00000000000000'," ."compby='',date='$next_monthly' " .'WHERE id IN (' . implode(',', $ids) . ')'); } /* END REOPEN MONTHLY */ /* START REOPEN YEARLY */ $result = db_query("SELECT id,date FROM ".$GLOBALS['table_prefix']."tasks " ."WHERE login='".$GLOBALS['login']."' " ."AND recurrence='5' " ."AND completed='1'"); $ids = array(); while($myrow = mysql_fetch_array($result)) { $temp_day = substr($myrow['date'], 6, 2); if($temp_day == $this_day) { $ids[] = $myrow['id']; } } if (!empty($ids)) { db_query("UPDATE ".$GLOBALS['table_prefix']."tasks " ."SET completed='0',compdate='00000000000000'," ."compby='',date='$next_yearly' " .'WHERE id IN (' . implode(',', $ids) . ')'); } /* END REOPEN YEARLY */ show_default_view(); } /** * New task view */ function view_new_task() { $GLOBALS['output']['task_id'] = -1; if (isset($_REQUEST['date'])) { $GLOBALS['output']['date'] = $_REQUEST['date']; } show_view('edit_task'); } ?> |
From: Shady B. S. <sha...@us...> - 2011-03-28 23:35:52
|
Update of /cvsroot/ackertodo/ackertodo/src/html In directory vz-cvs-4.sog:/tmp/cvs-serv26325/src/html Modified Files: view_task.html Log Message: 2011-03-28 shadybrooksoft Shrunk image display to flow better with text. Index: view_task.html =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/html/view_task.html,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** view_task.html 14 Jun 2005 13:36:44 -0000 1.26 --- view_task.html 28 Mar 2011 23:35:49 -0000 1.27 *************** *** 75,97 **** <td align="right"><?php echo _STATUS ?>:</td> <td align="left"> ! <?php ! if(isset($image)) { ! ?> ! <img align="middle" src="themes/<?php echo $theme; ?>/images/<?php echo $image; ?>" /> ! <?php ! } ! echo $status; ! if($output['completed'] == 1) { ! echo _AS_OF . format_date_simple($output['compdate'], $date_format) . ' by '. $output['compby'] . '.'; ! } ! if (isset($status_ext)) { ! ?> ! <br /><?php echo $status_ext; ?> ! <?php ! } ! ?> </td> </tr> --- 75,95 ---- <td align="right"><?php echo _STATUS ?>:</td> <td align="left"> ! <?php ! if(isset($image)) { ! ?> ! <img src="themes/<?php echo $theme; ?>/images/<?php echo $image; ?>" width="12" height="12" /> ! <?php ! } ! echo $status; ! if($output['completed'] == 1) { ! echo _AS_OF . format_date_simple($output['compdate'], $date_format) . ' by '. $output['compby'] . '.'; ! } ! if (isset($status_ext)) { ! ?><br /><?php echo $status_ext; ?><?php ! } ! ?> </td> </tr> |
From: Shady B. S. <sha...@us...> - 2011-03-28 22:52:36
|
Update of /cvsroot/ackertodo/ackertodo/src/html In directory vz-cvs-4.sog:/tmp/cvs-serv21836/src/html Modified Files: list_tasks.html Log Message: 2011-03-28 shadybrooksoft Shrunk image display to flow better with text. Index: list_tasks.html =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/html/list_tasks.html,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** list_tasks.html 28 Mar 2011 16:00:38 -0000 1.83 --- list_tasks.html 28 Mar 2011 22:52:34 -0000 1.84 *************** *** 393,397 **** if(isset($image)) { ?> ! <img align="middle" src="themes/<?php echo $theme; ?>/images/<?php echo $image ?>"/> <?php } --- 393,397 ---- if(isset($image)) { ?> ! <img src="themes/<?php echo $theme; ?>/images/<?php echo $image ?>"/ width="10" height="10"> <?php } |
From: Shady B. S. <sha...@us...> - 2011-03-28 22:52:03
|
Update of /cvsroot/ackertodo/ackertodo/src/themes/default/images In directory vz-cvs-4.sog:/tmp/cvs-serv21736/src/themes/default/images Modified Files: completed.gif today.gif Log Message: 2011-03-28 shadybrooksoft Fixed broken images. Index: today.gif =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/themes/default/images/today.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsJuOXEc and /tmp/cvsR0t2iM differ Index: completed.gif =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/themes/default/images/completed.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvssuELFf and /tmp/cvshxMTkP differ |
From: Shady B. S. <sha...@us...> - 2011-03-28 22:41:17
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv20052/src/includes Modified Files: tasks.inc Log Message: 2011-03-28 shadybrooksoft Fixed bug in update_task(). Index: tasks.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/tasks.inc,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** tasks.inc 28 Mar 2011 22:34:49 -0000 1.65 --- tasks.inc 28 Mar 2011 22:41:15 -0000 1.66 *************** *** 144,152 **** } ! db_query("UPDATE ".$table_prefix."tasks " ! ."SET title='$title',task='$task',date='$final_date', " ! ."recurrence='$recurrence',login='$users',priority='$priority', " ! ."category='$category' " ! ."WHERE id='$id'"); } --- 144,158 ---- } ! if( !is_array($users) ) { ! $users = array($users); ! } ! ! foreach( $users as $assigned_user ) { ! db_query("UPDATE ".$table_prefix."tasks " ! ."SET title='$title',task='$task',date='$final_date', " ! ."recurrence='$recurrence',login='$assigned_user',priority='$priority', " ! ."category='$category' " ! ."WHERE id='$id'"); ! } } |
From: Shady B. S. <sha...@us...> - 2011-03-28 22:34:51
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv19598/src/includes Modified Files: tasks.inc Log Message: 2011-03-28 shadybrooksoft Fixed typo. Index: tasks.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/tasks.inc,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** tasks.inc 28 Mar 2011 19:35:13 -0000 1.64 --- tasks.inc 28 Mar 2011 22:34:49 -0000 1.65 *************** *** 168,172 **** if( !is_array($users) ) { ! $user = array($users); } --- 168,172 ---- if( !is_array($users) ) { ! $users = array($users); } |
From: Shady B. S. <sha...@us...> - 2011-03-28 19:46:21
|
Update of /cvsroot/ackertodo/ackertodo/src/html In directory vz-cvs-4.sog:/tmp/cvs-serv22511/src/html Modified Files: list_comments.html Log Message: 2011-03-28 shadybrooksoft Fixed bug. Index: list_comments.html =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/html/list_comments.html,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** list_comments.html 1 Sep 2006 15:49:47 -0000 1.16 --- list_comments.html 28 Mar 2011 19:46:19 -0000 1.17 *************** *** 41,44 **** --- 41,48 ---- } + if( !isset($_GET['print']) ) { + $_GET['print'] = 'no'; + } + $task_id = get_value_session_request_output('task_id'); $result = db_query("SELECT * FROM ".$table_prefix."comments WHERE task_id='$task_id'"); *************** *** 49,59 **** <?php if($task_what == "edit_comment") { ! ?> ! <form method="post" action="index.php?cmd=do_add_comment&comment_id=<?php echo $comment_id ?>" name="update_comment"> ! <?php } else { ! ?> ! <form method="post" action="index.php?cmd=do_add_comment" name="add_comment"> ! <?php } ?> --- 53,59 ---- <?php if($task_what == "edit_comment") { ! ?><form method="post" action="index.php?cmd=do_add_comment&comment_id=<?php echo $comment_id ?>" name="update_comment"><?php } else { ! ?><form method="post" action="index.php?cmd=do_add_comment" name="add_comment"><?php } ?> *************** *** 64,117 **** <th><?php echo _COMMENT_BY; ?></th> <th><?php echo _COMMENT_DATE; ?></th> ! <?php ! if($_GET['print'] != 'yes') { ! ?> ! <th><?php echo _ACTIONS ?></th> ! <?php ! } ! ?> </tr> ! <?php ! while ($myrow = mysql_fetch_array($result)) { ! ?> ! <tr class="<?php echo ((++$i % 2 == 0)?'even':'odd') ?>"> ! <?php ! if($comment_id == $myrow['id']) { ! $comment = strip_tags($myrow['comment']); ! ?> ! <td align="left"><font color="red"><?php echo $myrow['comment'] ?></font></td> ! <?php ! } else { ! ?> ! <td align="left"><?php echo $myrow['comment'] ?></td> ! <?php ! } ! ?> <td align="center"><?php echo $myrow['login'] ?></td> <td align="center"><?php echo format_date_simple($myrow['date']) ?></td> ! <?php ! if($_GET['print'] != 'yes') { ! ?> ! <td class="actions"> <a href="index.php?cmd=do_remove_comment&comment_id=<?php echo $myrow['id'] ?>"><?php echo _REMOVE ?></a> <a href="index.php?cmd=view_task&task_what=edit_comment&comment_id=<?php echo $myrow['id'] ?>"><?php echo _EDIT ?></a> ! </td> ! <?php ! } ! ?> ! </tr> ! <?php ! } ! if($_GET['print'] != 'yes') { ! ?> ! <tr class="new"> ! <th colspan="3"> ! <textarea class="btn" name="comment" rows="3" cols="85" id="newComment"> ! <?php ! if(isset($comment)) { ! echo $comment; ! } ! ?> ! </textarea> </th> <th> --- 64,105 ---- <th><?php echo _COMMENT_BY; ?></th> <th><?php echo _COMMENT_DATE; ?></th> ! <?php ! if( $_GET['print'] != 'yes') { ! ?><th><?php echo _ACTIONS ?></th><?php ! } ! ?> </tr> ! <?php ! while ($myrow = mysql_fetch_array($result)) { ! ?><tr class="<?php echo ((++$i % 2 == 0)?'even':'odd') ?>"><?php ! if($comment_id == $myrow['id']) { ! $comment = strip_tags($myrow['comment']); ! ?><td align="left"><font color="red"><?php echo $myrow['comment'] ?></font></td><?php ! } else { ! ?><td align="left"><?php echo $myrow['comment'] ?></td><?php ! } ! ?> <td align="center"><?php echo $myrow['login'] ?></td> <td align="center"><?php echo format_date_simple($myrow['date']) ?></td> ! <?php ! if($_GET['print'] != 'yes') { ! ?> ! <td class="actions"> <a href="index.php?cmd=do_remove_comment&comment_id=<?php echo $myrow['id'] ?>"><?php echo _REMOVE ?></a> <a href="index.php?cmd=view_task&task_what=edit_comment&comment_id=<?php echo $myrow['id'] ?>"><?php echo _EDIT ?></a> ! </td> ! <?php ! } ! ?></tr><?php ! } ! if($_GET['print'] != 'yes') { ! ?> ! <tr class="new"> ! <th colspan="3"> ! <textarea class="btn" name="comment" rows="3" cols="85" id="newComment"><?php ! if(isset($comment)) { ! echo $comment; ! } ! ?></textarea> </th> <th> *************** *** 120,126 **** </th> </tr> ! <?php ! } ! ?> </table> </center> --- 108,114 ---- </th> </tr> ! <?php ! } ! ?> </table> </center> |
From: Shady B. S. <sha...@us...> - 2011-03-28 19:35:15
|
Update of /cvsroot/ackertodo/ackertodo/src/includes In directory vz-cvs-4.sog:/tmp/cvs-serv21816/src/includes Modified Files: users.inc tasks.inc Log Message: 2011-03-28 shadybrooksoft Added ability to assign a task to multiple people and to a specific other user. Index: tasks.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/tasks.inc,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** tasks.inc 28 Mar 2011 16:00:38 -0000 1.63 --- tasks.inc 28 Mar 2011 19:35:13 -0000 1.64 *************** *** 166,172 **** $final_date = "'$final_date'"; } ! ! db_query("INSERT INTO ".$table_prefix."tasks (login,creationdate,recurrence,title,task,date,assignedby,category,priority)" ! ."VALUES ('$users',NOW(),'$recurrence','$title','$task',$final_date,'$login','$category','$priority')"); } --- 166,178 ---- $final_date = "'$final_date'"; } ! ! if( !is_array($users) ) { ! $user = array($users); ! } ! ! foreach( $users as $assigned_user ) { ! db_query("INSERT INTO ".$table_prefix."tasks (login,creationdate,recurrence,title,task,date,assignedby,category,priority)" ! ."VALUES ('$assigned_user',NOW(),'$recurrence','$title','$task',$final_date,'$login','$category','$priority')"); ! } } Index: users.inc =================================================================== RCS file: /cvsroot/ackertodo/ackertodo/src/includes/users.inc,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** users.inc 28 Mar 2011 16:00:38 -0000 1.31 --- users.inc 28 Mar 2011 19:35:13 -0000 1.32 *************** *** 25,32 **** --- 25,63 ---- * assign a task to in a dropdown box. */ function disp_users_and_groups($login, $select_user_or_group) { + disp_users_with_permission($login, array('_ADD_TASK', '_EDIT_TASK')); disp_users($login, 'allow_others', $select_user_or_group); disp_groups($login, $select_user_or_group, true, true); } + /** + * Outputs <OPTION> elements with the users who have the requested permissions + * with respect to the given $login. + * @param string $login + * @param string $perms + * @return array + */ + function disp_users_with_permission($login, $perms) { + // Make sure $perms is an array. + if( !is_array($perms) ) { + $perms = array($perms); + } + $perms_string = array(); + foreach( $perms as $p ) { + $perms_string[] .= '"'.$p.'"'; + } + $perms_string = implode(',', $perms_string); + $query = + 'SELECT up.login ' . + 'FROM users u, users_others_permissions up ' . + 'WHERE u.login=up.login AND ' . + ' up.permission IN ('.$perms_string.') AND ' . + ' up.granted=1 AND ' . + ' up.other_user="'.$login.'"' + ; + $result = db_query($query); + while( $row = mysql_fetch_assoc($result) ) { + echo '<option value="'.$row['login'].'">'.$row['login'].'</option>'; + } + } /* This function lists all of the users who you're allowed to * assign a task to in a dropdown box. */ |