<?php
/**************************************************************************
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.
@Authors: Ryan Thompson(hide@address.com)
***************************************************************************/
/*$Id: add_tables.php,v 1.1 2003/12/14 21:59:02 rthomp Exp $*/
$service['no_session'] = TRUE;
include('../config.inc.php');
$db->query($sql);
$handle = opendir('../');
while (false !== ($d = readdir($handle)))
{
//Make sure the the pointer is at a service and that it actually is a directory
if(!in_array($d, $system_dirs) && is_dir($root_dir. "/".$d))
{
$cfg_dir = "$root_dir/$d/config/tables";
if(is_dir($cfg_dir))
{
$handle2 = opendir($cfg_dir);
while (false !== ($file = readdir($handle2)))
{
//Have to unset $fields to keep O from trying to add columns from previous tables
//to the current table
//DEPRECATED??
unset($fields);
if(is_file($root_dir ."/$d/config/tables/$file") && $file != '.' && $file != '..' && !strstr($file, '~'))
{
$setup->create_table($d, $file);
}
}
}
}
}
if(!@header("Location: upgrade_tables.php"))
{
echo '<a href="upgrade_languages.php">Upgrade Language Text</a>';
}