[php-todo-cvs] src ChangeLog,1.4,1.5 TODO,1.3,1.4 index.php,1.4,1.5
Status: Pre-Alpha
Brought to you by:
mnordstr
From: <mno...@us...> - 2002-06-20 17:58:22
|
Update of /cvsroot/php-todo/src In directory usw-pr-cvs1:/tmp/cvs-serv21894 Modified Files: ChangeLog TODO index.php Log Message: Empty Todo check, dual Todo check Index: ChangeLog =================================================================== RCS file: /cvsroot/php-todo/src/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChangeLog 20 Jun 2002 17:24:02 -0000 1.4 --- ChangeLog 20 Jun 2002 17:58:02 -0000 1.5 *************** *** 5,8 **** --- 5,10 ---- - Valid CSS2 - Delete verification + - Empty Todo check + - Dual Todo check 0.1.0 (Initial release): Index: TODO =================================================================== RCS file: /cvsroot/php-todo/src/TODO,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TODO 20 Jun 2002 17:24:02 -0000 1.3 --- TODO 20 Jun 2002 17:58:02 -0000 1.4 *************** *** 7,13 **** - [DONE] 100% XHTML 1.0 & CSS2 valid - [DONE] INSTALL: tell to copy img dir ! - Check for empty todos (generate error, do not accept) ! - Add a check to prevent dual todos to be added, ! it is too easy to hit reload and post another (duplicate) todo - [DONE] Fix stupid password error message - [DONE] Widen todo listing (configurable variable) --- 7,13 ---- - [DONE] 100% XHTML 1.0 & CSS2 valid - [DONE] INSTALL: tell to copy img dir ! - [DONE] Check for empty todos (generate error, do not accept) ! - [DONE] Add a check to prevent dual todos to be added, ! it is too easy to hit reload and post another (duplicate) todo - [DONE] Fix stupid password error message - [DONE] Widen todo listing (configurable variable) Index: index.php =================================================================== RCS file: /cvsroot/php-todo/src/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 20 Jun 2002 17:24:02 -0000 1.4 --- index.php 20 Jun 2002 17:58:02 -0000 1.5 *************** *** 156,161 **** mysql_query("DELETE FROM todo WHERE todo_id=" . $_REQUEST['delete']); ! if ((!empty($_REQUEST['action'])) && ($_REQUEST['action'] == 'add')) { mysql_query(" INSERT INTO todo SET --- 156,168 ---- mysql_query("DELETE FROM todo WHERE todo_id=" . $_REQUEST['delete']); ! if ((!empty($_REQUEST['action'])) && ($_REQUEST['action'] == 'add') && (!empty($_REQUEST['todo']))) { + $sql = "SELECT * FROM todo WHERE todo_priority=" . strip_tags($_REQUEST['priority']) . " && + todo_short='" . strip_tags($_REQUEST['todo'], '<b>,<i>,<u>,<li>') . "' && + todo_long='" . strip_tags($_REQUEST['description'], '<b>,<i>,<u>,<li>') . "'"; + + $sql_result = mysql_query($sql); + + if (!mysql_num_rows($sql_result)) mysql_query(" INSERT INTO todo SET *************** *** 166,170 **** } ! if ((!empty($_REQUEST['action'])) && ($_REQUEST['action'] == 'edit')) { mysql_query(" --- 173,177 ---- } ! if ((!empty($_REQUEST['action'])) && ($_REQUEST['action'] == 'edit') && (!empty($_REQUEST['todo']))) { mysql_query(" |