Main Page | Directories | File List | File Members

projecttype.php

Go to the documentation of this file.
00001 <?php
00002 # This file is part of the Savane project
00003 # <http://gna.org/projects/savane/>
00004 #
00005 # $Id: projecttype.php 5429 2006-02-17 22:59:20Z toddy $
00006 #
00007 #  Copyright 1999-2000 (c) The SourceForge Crew
00008 #  Copyright 2000-2003 (c) Free Software Foundation
00009 #                          Mathieu Roy <yeupou--gnu.org>
00010 #
00011 #  Copyright 2004-2005 (c) Mathieu Roy <yeupou--gnu.org>
00012 #
00013 # The Savane project is free software; you can redistribute it and/or
00014 # modify it under the terms of the GNU General Public License
00015 # as published by the Free Software Foundation; either version 2
00016 # of the License, or (at your option) any later version.
00017 #
00018 # The Savane project is distributed in the hope that it will be useful,
00019 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021 # GNU General Public License for more details.
00022 #
00023 # You should have received a copy of the GNU General Public License
00024 # along with the Savane project; if not, write to the Free Software
00025 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00026 
00027 
00028 
00029 require "../include/pre.php";
00030 require "../include/vars.php";
00031 session_require(array('isloggedin'=>'1'));
00032 require "../include/account.php";
00033 
00034 if ($group_id && $insert_license && $rand_hash && $form_license)
00035 {
00036    # Hash prevents them from updating a live, existing group account
00037    $sql="UPDATE groups SET license='$form_license', license_other='$form_license_other' "
00038       . "WHERE group_id='$group_id' AND rand_hash='__$rand_hash'";
00039    $result=db_query($sql);
00040    if (db_affected_rows($result) < 1)
00041    {
00042       exit_error(_("Error"),_("This is an invalid state.").' '._("Update query failed.").' '.sprintf (_("Please report to %s"),$GLOBALS['sys_email_address']));
00043    }
00044 
00045 }
00046 else
00047 {
00048         exit_error(_("Error"),_("This is an invalid state.").' '._("Some form variables were missing.").' '
00049         .sprintf (_("If you are certain you entered everything, %sPLEASE%s report to %s including info on your browser and platform configuration."),'<strong>','</strong>',$GLOBALS['sys_email_address']));
00050 }
00051 
00052 # If we have only one project type available, the next page is not a real step
00053 
00054 if (db_numrows(db_query("SELECT type_id FROM group_type")) == 1) {
00055   Header("Location: ".$GLOBALS['sys_home']."register/confirmation.php?no_redirection=1&show_confirm=y&group_id=".$group_id."&rand_hash=".$rand_hash);
00056   
00057 } else {
00058   $HTML->header(array('title'=>_("Project Type")));
00059   
00060   # get site-specific content
00061   utils_get_content("register/projecttype_long");
00062   
00063   print '<form action="confirmation.php" method="post">';
00064   print '<input type="hidden" name="no_redirection" value="1" />';
00065   print '<input type="hidden" name="show_confirm" value="y" />';
00066   print '<input type="hidden" name="group_id" value="'.$group_id.'" />';
00067   print '<input type="hidden" name="rand_hash" value="'.$rand_hash.'" />';
00068     
00069   # get more site-specific content
00070   utils_get_content("register/projecttype_short");
00071   
00072 
00073   print show_group_type_box('group_type', $default_group_type_value, true);
00074   
00075   print '<br /><br />';
00076   
00077   print '<div align="center">';
00078   
00079   print '<input type=submit name="Submit" value="'._("Next Step: Confirmation").'" />';
00080   print '</div>';
00081   print '</form>';
00082   
00083   print '<div align="center"><span class="error">'._("Do not click back button (unless asked to).").'</span></div>';
00084      
00085   $HTML->footer(array());
00086 }
00087 
00088 ?>
00089 

Generated on Sun Feb 26 13:23:04 2006 for Savane PHP Frontend Developer Reference by  doxygen 1.4.4