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
|
<?php
/* OpenDb - Open Media Lending Database
Copyright (C) 2001,2002 by Jason Pell
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
if($CONFIG_VARS['patch.enable']===TRUE)
{
if($HTTP_VARS['op'] == "menu")
{
echo("<p>
Each of these sql scripts will configure OpenDb for the particular country
indicated. This patch is only valid for ENGLISH language configurations.
You can rerun any of these patches as many times as required.
</p>");
echo("<DIV ALIGN=\"CENTER\">");
$files = get_patch_file_list($HTTP_VARS['from'],"sql");
echo("<FORM action=\"$PHP_SELF\" method=\"get\" target=\"main\">");
while (list(,$file) = each($files))
{
print_button("sqlfile", "$file", FALSE);
echo(" ");
}
echo("<br>");
echo("Preview SQL only<INPUT TYPE=\"checkbox\" name=\"preview\" value=\"true\">");
echo("<INPUT TYPE=\"hidden\" name=\"op\" value=\"result\">");
echo("<INPUT TYPE=\"hidden\" name=\"from\" value=\"".$HTTP_VARS['from']."\">");
echo("</FORM>");
echo("</DIV>");
}
else
{
if($HTTP_VARS['preview'] == "true")
print_sql_file($HTTP_VARS['from'], $HTTP_VARS['sqlfile']);
else if(isset($HTTP_VARS['sqlfile']))
exec_sql_file($HTTP_VARS['from'], $HTTP_VARS['sqlfile']);
}
}
?>
|