Main Page | Directories | File List | File Members

siteadmin/gnueval.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: gnueval.php 5187 2005-12-01 16:22:29Z yeupou $
00006 //
00007 //
00008 //  The Savannah Project
00009 //  Copyright 2000-2003 (c) Free Software Foundation
00010 // 
00011 // The Savane project is free software; you can redistribute it and/or
00012 // modify it under the terms of the GNU General Public License
00013 // as published by the Free Software Foundation; either version 2
00014 // of the License, or (at your option) any later version.
00015 //
00016 // The Savane project is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU General Public License
00022 // along with the Savane project; if not, write to the Free Software
00023 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00024 //
00025 //
00026 //
00027 //
00028 
00029 require "../include/pre.php";
00030 
00031 function gnuevalconfirm_email($group_id) 
00032 {
00033   $res_grp = db_query("SELECT * FROM groups WHERE group_id='$group_id'");
00034 
00035   if (db_numrows($res_grp) < 1) {
00036     echo ("Group [ $group_id ] does not exist. Shame on you, sysadmin.");
00037   }
00038 
00039   $row_grp = db_fetch_array($res_grp);
00040 
00041   $res_admins = db_query("SELECT user.user_name,user.email FROM user,user_group WHERE "
00042                          . "user.user_id=user_group.user_id AND user_group.group_id='$group_id' AND "
00043                          . "user_group.admin_flags='A'");
00044 
00045   if (db_numrows($res_admins) < 1) {
00046     echo ("Group [ $group_id ] does not seem to have any administrators.");
00047   }
00048 
00049   $usr = db_fetch_array($res_admins);
00050 
00051   $to = "gnueval-input@gnu.org,savannah-hackers@gnu.org,".$usr['email'];
00052   $message = 
00053     'Hi,
00054 
00055 The following project was submitted to Savannah. It needs evaluation to
00056 become a GNU package, can you give it a look, please ? 
00057 
00058 Submitter: <'.$usr['email'].'>
00059 Project Full Name:  '.$row_grp['group_name'].'
00060 Project System Name:  '.$row_grp['unix_group_name'].'
00061 License:  '.$row_grp['license'].'
00062 Approval URL: https://savannah.gnu.org/admin/groupedit.php?group_id='.$group_id.'
00063 Description: '.$row_grp['register_purpose'].'
00064 
00065  -- the Savannah admin';
00066 
00067   sendmail_mail("savannah-hackers@gnu.org",
00068                 $to,
00069                 "[Savannah] " . $row_grp['unix_group_name'] . " want to be a GNU package",
00070                 wordwrap($message));
00071 
00072 
00073 }
00074 
00075 session_require(array('group'=>'1','admin_flags'=>'A'));
00076 
00077 $HTML->header(array('title'=>"GNU Eval team request"));
00078 
00079 gnuevalconfirm_email($group_id);
00080 
00081 print "<P>Mail successfully sent.";
00082 
00083 $HTML->footer(array());
00084 ?>
00085 

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