Пример #1
0
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation in the version 2 of the License.
#
# Igoan 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Igoan; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
// est-ce que la release existe ?
if (!isset($_GET['idRel']) || $_GET['idRel'] != '123460') {
    append_error('No release specified or release unknown');
    flush_errors_exit();
}
// l'user concerné est-il admin du projet ?
if ($_SESSION['id'] != 34567) {
    append_error('Can\'t modify project: permission denied');
    http_redir('/project/view_release.php?idRel=123460');
}
if (isset($_GET['action']) && $_GET['action'] == 'Apply') {
    // do the job
    http_redir('/project/view_release.php?idRel=123460');
}
?>

<h1>Change release information</h1>

<form>
Пример #2
0
function append_error_exit($str)
{
    append_error($str);
    flush_errors_exit();
}