JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed css so prioritize links don't make a horizontal scroll bar
[contractor-progress.git] / people.php
index 1690a4b..60e3121 100644 (file)
@@ -1,21 +1,20 @@
 <?php
 
-# This form requires wfpl. See: http://jasonwoof.org/wfpl
-
-# This form was initially auto-generated. If you would like to alter the
-# parameters and generate a new one try this URL:
+#  Copyright (C) 2008  Jason Woofenden
 #
-# http://jasonwoof.com/metaform/?form_name=people&opt_email=No&opt_db=Yes&opt_listing=Yes&opt_http_pass=No&fields=username+textbox%0D%0Apassword+textbox%0D%0Aname+textbox%0D%0Aprivs+int%0D%0Abalance+decimal&edit=yes
-
-
-# SETUP
-
-# To save results to a database, you'll need to create the people table
-# (the file people.sql should help with this), and create the file
-# 'code/db_connect.php' which calls db_connect() see:
-# code/wfpl/examples/db_connect.php
+#  This program is free software: you can redistribute it and/or modify
+#  it under the terms of the GNU Affero General Public License as published by
+#  the Free Software Foundation, either version 3 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 Affero General Public License for more details.
 #
-# if you rename any of the database fields, you'll need to update this:
+#  You should have received a copy of the GNU Affero General Public License
+#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 
 define('PEOPLE_DB_FIELDS', 'username,password,name,privs,balance');
 
@@ -70,7 +69,7 @@ function people_display_listing($where = 'order by username limit 100') {
 }
 
 function people_main() {
-       if(logged_in() != 1) { # FIXME get more sophisticated than first person in database is admin
+       if(!logged_in_as_contractor()) {
                $GLOBALS['url'] = this_url();
                message('You must be logged in as an administrator to access that function');
                return 'login';