phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] old/brewer/delete.php, 1.1


From: nomail
Subject: [Phpgroupware-cvs] old/brewer/delete.php, 1.1
Date: Thu, 30 Dec 2004 08:50:59 +0100

Update of /old/brewer
Added Files:
        Branch: 
          delete.php

date: 2004/12/30 07:50:59;  author: skwashd;  state: Exp;

Log Message:
keep a historic record of the app
=====================================================================
<?php
  /**************************************************************************\
  * phpGroupWare - Brewer delete x                                           *
  * http://www.phpgroupware.org                                              *
  * Written by: Miles Lott <address@hidden>                        *
  * --------------------------------------------                             *
  *  This program is free software; you can redistribute it and/or modify it *
  *  under the terms of the GNU General Public License as published by the   *
  *  Free Software Foundation; either version 2 of the License, or (at your  *
  *  option) any later version.                                              *
  \**************************************************************************/

   /* $Id: delete.php,v 1.1 2004/12/30 07:50:59 skwashd Exp $ */

        if ($confirm || !$id)
        {
                $GLOBALS['phpgw_info']['flags'] = array(
                        'noheader' => True,
                        'nonavbar' => True
                );
        }

        $GLOBALS['phpgw_info']['flags']['currentapp'] = 'brewer';
        include('../header.inc.php');

        if (!$id)
        {
                Header('Location: ' . 
$GLOBALS['phpgw']->link('/brewer/index.php',"start=$start&order=$order"));
        }

        if($confirm)
        {
                $accountid = $GLOBALS['phpgw_info']['user']['account_id'];

                $GLOBALS['phpgw']->db->query("DELETE FROM phpgw_brewer_" . 
$type . "s WHERE id='$id'");
                Header('Location: ' . 
$GLOBALS['phpgw']->link('/brewer/index.php',"start=$start&order=$order"));
        }
        else
        {
                $hidden_vars = '<input type="hidden" name="sort" 
value="$sort">' . "\n"
                        . '<input type="hidden" name="order" value="' . $order 
. '">' . "\n"
                        . '<input type="hidden" name="start" value="' . $start 
. '">' . "\n"
                        . '<input type="hidden" name="id" value="' . $id . '">' 
. "\n";

                $GLOBALS['phpgw']->template->set_file(array('delete' => 
'delete.tpl'));

                $GLOBALS['phpgw']->template->set_var('deleteheader',lang("Are 
you sure you want to delete this $type ?"));
                $nolinkf = 
$GLOBALS['phpgw']->link('/brewer/index.php',"id=$id");
                $nolink = "<a href=\"$nolinkf\">" . lang('No') . "</a>";
                $GLOBALS['phpgw']->template->set_var('nolink',$nolink);
                $GLOBALS['phpgw']->template->set_var('font',$font);

                $yeslinkf = 
$GLOBALS['phpgw']->link('/brewer/delete.php',"id=$id&type=$type&confirm=True");

                $yeslinkf = "<FORM method=\"POST\" name=yesbutton 
action=\"".$GLOBALS['phpgw']->link('/brewer/delete.php')."\">"
                        . $hidden_vars
                        . '<input type=hidden name="id value="' . $id . '">'
                        . '<input type=hidden name="type" value="' . $type . 
'">'
                        . '<input type=hidden name="confirm" value="True">'
                        . '<input type=submit name="yesbutton" value="Yes">'
                        . 
'</FORM><SCRIPT>document.yesbutton.yesbutton.focus()</SCRIPT>';
                $yeslink = "<a href=\"$yeslinkf\">" . lang('Yes') ."</a>";
                $yeslink = $yeslinkf;

                $GLOBALS['phpgw']->template->set_var('yeslink',$yeslink);
                $GLOBALS['phpgw']->template->pfp('out','delete');
        }

        $GLOBALS['phpgw']->common->phpgw_footer();
?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]