Thread: [phpwebapp-commits] CVS: top10/templates/admin/users users.js,NONE,1.1.2.1 adduser.html,NONE,1.1.2.1
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-01-14 14:30:39
|
Update of /cvsroot/phpwebapp/top10/templates/admin/users In directory sc8-pr-cvs1:/tmp/cvs-serv8756/templates/admin/users Modified Files: Tag: maisp users.php users.html users.db Added Files: Tag: maisp users.js adduser.html Log Message: add a new user (evaluator) --- NEW FILE: users.js --- // -*-C-*- //tell emacs to use C mode /* This file is part of Top10. Top10 is a web application for ranking and evaluating web application projects at SourceForge. Copyright 2003 Dashamir Hoxha, das...@us... Top10 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. Top10 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 Top10; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ function adduser() { var form = document.adduser; var username = form.username.value; var realname = form.realname.value; var email = form.email.value; var homepage = form.homepage.value; var status = form.status.value; var event_args = "username=" + username + ";" + "realname=" + realname + ";" + "email=" + email + ";" + "homepage=" + homepage + ";" + "status=" + status; SendEvent("users", "adduser", event_args); } --- NEW FILE: adduser.html --- <h3>Add New User</h3> <table width="100%" cellspacing="1" cellpadding="2" bgcolor="#dddddd"> <form name="adduser" onsubmit="return false;"> <tr> <td bgcolor="#eeeeee" align="center">username</td> <td bgcolor="#eeeeee" align="center">Real Name</td> <td bgcolor="#eeeeee" align="center">E-mail</td> <td bgcolor="#eeeeee" align="center">Homepage</td> <td bgcolor="#eeeeee" align="center">Status</td> <td bgcolor="#eeeeee" align="center"></td> </tr> <tr> <td bgcolor="white"> <input type="text" name="username" value="" class="textbox" size="10" onfocus="select()" /> </td> <td bgcolor="white"> <input type="text" name="realname" value="" class="textbox" size="20" onfocus="select()" /> </td> <td bgcolor="white"> <input type="text" name="email" value="" class="textbox" size="20" onfocus="select()" /> </td> <td bgcolor="white"> <input type="text" name="homepage" value="" class="textbox" size="20" onfocus="select()" /> </td> <td bgcolor="white" align="center"> <input type="text" name="status" value="private" class="textbox" size="5" onfocus="select()" /> </td> <td bgcolor="white" align="center"> <a class="button" href="javascript:adduser()">Add</a> </td> </tr> </form> </table> Index: users.php =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/admin/users/Attic/users.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** users.php 13 Jan 2004 15:48:24 -0000 1.1.2.1 --- users.php 14 Jan 2004 14:30:36 -0000 1.1.2.2 *************** *** 29,32 **** --- 29,36 ---- } + function on_adduser($event_args) + { + WebApp::execDBCmd("adduser", $event_args); + } } ?> \ No newline at end of file Index: users.html =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/admin/users/Attic/users.html,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** users.html 13 Jan 2004 15:48:24 -0000 1.1.2.2 --- users.html 14 Jan 2004 14:30:36 -0000 1.1.2.3 *************** *** 6,11 **** </IfEmpty> <Header> ! <table cellspacing="1" cellpadding="2" bgcolor="#dddddd"> ! <form name="proj_list" onsubmit="return false;"> <tr> <td bgcolor="#eeeeee" align="center" width="2%">Nr</td> --- 6,11 ---- </IfEmpty> <Header> ! <table width="100%" cellspacing="1" cellpadding="2" bgcolor="#dddddd"> ! <form name="users" onsubmit="return false;"> <tr> <td bgcolor="#eeeeee" align="center" width="2%">Nr</td> *************** *** 14,18 **** <td bgcolor="#eeeeee" align="center">E-mail</td> <td bgcolor="#eeeeee" align="center">Homepage</td> ! <td bgcolor="#eeeeee" align="center">Public</td> <td bgcolor="#eeeeee" align="center">Save</td> </tr> --- 14,18 ---- <td bgcolor="#eeeeee" align="center">E-mail</td> <td bgcolor="#eeeeee" align="center">Homepage</td> ! <td bgcolor="#eeeeee" align="center">Status</td> <td bgcolor="#eeeeee" align="center">Save</td> </tr> *************** *** 37,41 **** </td> <td bgcolor="white" align="center"> ! <input type="checkbox" name="public" value="{{public}}"> </td> <td bgcolor="white" align="center"> --- 37,42 ---- </td> <td bgcolor="white" align="center"> ! <input type="text" name="status" value="{{status}}" ! class="textbox" size="5" onfocus="select()" /> </td> <td bgcolor="white" align="center"> *************** *** 50,52 **** --- 51,57 ---- </Footer> </Repeat> + + <Include SRC="{{./}}adduser.html" /> + </WebBox> + Index: users.db =================================================================== RCS file: /cvsroot/phpwebapp/top10/templates/admin/users/Attic/users.db,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** users.db 13 Jan 2004 15:48:24 -0000 1.1.2.1 --- users.db 14 Jan 2004 14:30:36 -0000 1.1.2.2 *************** *** 6,7 **** --- 6,19 ---- </Query> </Recordset> + + <dbCommand ID="adduser"> + <Query> + INSERT INTO users + SET + username = '{{username}}', + realname = '{{realname}}', + email = '{{email}}', + homepage = '{{homepage}}', + status = '{{status}}' + </Query> + </dbCommand> |