Page MenuHomec4science

LINK_ACTION_del.shtml.wml
No OneTemporary

File Metadata

Created
Sat, Nov 16, 12:30

LINK_ACTION_del.shtml.wml

<?
/*********************************************************************
This file is part of the CERN Document Server Software (CDSware).
Copyright (C) 2002 CERN.
1211 Geneva 23 - Switzerland
<cds.support@cern.ch>
The CDSware 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.
The CDSware 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 CDSware; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*********************************************************************/
//==========================================================================
// File: LINK_ACTION_del.shtml (flexElink WI)
// Description: Deletes an existing action of a certain condition for a given
// link definition from the DB.
// POST parameters:
// linktype --> (required) Name (id) of the link definition the condition
// belongs to
// eorder ----> (required) Action's condition evaluation order number for
// the given link definition
// aorder ----> (required) Action's apply order number inside the given
// condition
// Notes: If the action is succesfully added to the DB the current browser is
// redirectred to the link detailed definition display
// Requires: DB, ERROR
// Author: Hector.Sanchez@cern.ch
//==========================================================================
include("localconf.inc.shtml");
include(DB);
include(ERROR);
if( (!isset($linktype)) or (trim($linktype)=="") )
{
errorpage("<b>Link type</b> hasn't been specified");
exit();
}
if( (!isset($eorder)) or (trim($eorder)=="") )
{
errorpage("<b>Evaluation order</b> hasn't been specified");
exit();
}
if( (!isset($aorder)) or (trim($aorder)=="") )
{
errorpage("<b>Apply order</b> hasn't been specified");
exit();
}
$linktype=strtoupper(trim($linktype));
$db=mysql_connect( $DB_HOST, $DB_USER, $DB_PASSWD );
mysql_selectdb( $DB_DB );
$qry="delete from flxLINKTYPECONDITIONSACTIONS
where linktype='$linktype'
and eval_order='$eorder'
and apply_order='$aorder'";
if(!mysql_query( $qry ))
{
errorpage("Impossible to delete action:<br> ".mysql_error());
}
mysql_close( $db );
header("location: LINK_showone.shtml?linktype=".urlencode($linktype));
?>

Event Timeline