From: Matt M. <pro...@us...> - 2005-01-01 00:28:18
|
Update of /cvsroot/webschool/webschool/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3811/lib Modified Files: mainfile.php Log Message: :) Index: mainfile.php =================================================================== RCS file: /cvsroot/webschool/webschool/lib/mainfile.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mainfile.php 4 Dec 2004 01:47:37 -0000 1.11 --- mainfile.php 1 Jan 2005 00:28:09 -0000 1.12 *************** *** 99,102 **** --- 99,103 ---- } } + //replaces error() Function systemmessage($msg, $log=false) { *************** *** 114,156 **** } - ///This function, used in smarty, creates an option list with the names of user with given criteria - /* - ProgrammerMatt: Considering that production users may have well over 1000 users, this could be time consuming task and would - result in a huge select box, un-idealic for searching. I think that the "finduser" feature to-be-implemented in admin.php will - easily, and conviently replace this - */ - $smarty->register_function("html_option_users", "html_option_users"); - function html_option_users($args){ - //First get the users they wanted by getting the option they pased in the "where" arg - $query = "SELECT * FROM "._USERS_; - if (isset($args['where'])){ - $query .= " WHERE " . $args['where']; - } - db4(__FILE__,__LINE__,$query); - - $answer = "<select name=\"" . $args['name'] . "\" size=\"0\">"; - - - while ($curr_user = dbr4()){ - //See if this is supposed to be selected... - if ($args['selected'] == $curr_user['id']){ - $select = " selected=\"selected\""; - }else{ - $select = ""; - } - - $answer .= "<option value=\"" . $curr_user['id'] . $select . "\">" . $curr_user['fname'] . " " . - $curr_user['lname'] . "</option>"; - - } - $answer .= "</select>"; - echo $answer; - return $answer; - } - if( is_a($smarty, "Smarty")){ - $smarty->register_function("gzuncompress", "gzuncompress"); - $smarty->register_function("gzcompress", "gzcompress"); - } ?> \ No newline at end of file --- 115,119 ---- |