1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
<?vsp
--
-- $Id: xs_t_1_trig.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
--
-- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
-- project.
--
-- Copyright (C) 1998-2006 OpenLink Software
--
-- This project 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; only version 2 of the License, dated June 1991.
--
-- This program 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 this program; if not, write to the Free Software Foundation, Inc.,
-- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--
--
?>
<html>
<head><link rel="stylesheet" type="text/css" href="../demo.css"></head>
<body>
<?vsp
if ({?'del'} = '1')
{
delete from DB.DBA.XML_TEXT2_XT_TEXT_QUERY where TT_ID = atoi({?'tt_id'});
delete from DB.DBA.XML_TEXT2_XT_TEXT_USER where TTU_T_ID = atoi({?'tt_id'});
delete from DB.DBA.XML_TEXT2_XT_TEXT_HIT where TTH_T_ID = atoi({?'tt_id'});
}
else if ({?'add'} = 'Add')
{
declare exit handler for sqlstate '*' {
http('<pre style="color:red">');
http(__SQL_STATE);
http('\n');
http(__SQL_MESSAGE);
http('</pre>');
};
DB.DBA."TT_QUERY_XML_TEXT2" ({?'query'}, 1, {?'comment'}, '');
}
?>
<form method=POST action="xs_t_1_trig.vsp" name=query_form>
<TABLE class="tableentry">
<tr><td>Comment</td><td><input type="text" name="comment" size="60%" value=""> </td><td> </td></tr>
<tr><td>Query text</td><td><input type="text" name="query" size="60%" value=""> </td><td> </td></tr>
<tr>
<td align="right" colspan="2">
<input type="submit" name="add" value="Add">
<input type="reset" name="clr" value="Clear">
</td>
<td>
</td>
</tr>
</table>
</form>
<table class="tableresult">
<TR><TD COLSPAN="3"><b>Current triggers</b></TD></TR>
<tr>
<td>Query</td>
<td>Comment</td>
<td>Actions</td>
</tr>
<?vsp
for select distinct TT_QUERY, TT_COMMENT, TT_ID from DB.DBA.XML_TEXT2_XT_TEXT_QUERY,
DB.DBA.XML_TEXT2_XT_TEXT_USER
where TTU_U_ID = 1 and TTU_T_ID = TT_ID
order by TT_ID do
{
?>
<tr>
<td><?=TT_QUERY?></td>
<td><?=TT_COMMENT?></td>
<td>
<table>
<tr>
<td><a href="xs_t_1_trig.vsp?tt_id=<?=TT_ID?>&del=1">Remove</a></td>
</tr>
</table>
</td>
</tr>
<?vsp
}
?>
</table>
<p>Back to <a href="xs_t_1_list.vsp">main</a></p>
</body>
</html>
|