From 9c4d839673d7c4e20164452f036dc292b561a3bf Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Thu, 20 Jan 2011 23:10:03 -0500 Subject: AddedUserNonWeb proc is added Ignore-this: a40f889adad2dcb51f1f574321285303 darcs-hash:20110121041003-067c0-35e510e87a0fc82f53bc36c4fc9d026b41119983.gz --- GradeBook.tcl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'GradeBook.tcl') diff --git a/GradeBook.tcl b/GradeBook.tcl index a0a067f..aa6b112 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -59,6 +59,15 @@ proc CreatePasswordsTable {db} { db eval $eval_str } +proc AddUserNonWeb { first_name last_name user_name password_hash {group_name {guest}} } { + set eval_str [concat INSERT INTO GradesTable (FirstName, LastName, UserName, PassWordHash, GroupName) VALUES('$first_name', '$last_name', '$user_name', '$password_hash', '$group_name')] + set err [catch {db eval $eval_str } errStat] + if { $err } { + htmlErrorMsg $errStat + dbg "the following error happen: $errStat" 3 + } +} + proc CreateGradesTable {db} { db eval {CREATE TABLE GradesTable(FirstName text, LastName text, UserName text, HW01 real)} -- cgit v1.2.3