Example #1
0
** CORAL 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 CORAL.  If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
session_start();
include_once 'directory.php';
//print header
$pageTitle = _('SUSHI Import');
include 'templates/header.php';
//this a SUSHI Service ID has been passed in, it needs to be run
if (isset($_POST['sushiServiceID']) and $_POST['sushiServiceID'] > 0) {
    $sushiServiceID = $_POST['sushiServiceID'];
    $sushiService = new SushiService(new NamedArguments(array('primaryKey' => $sushiServiceID)));
    $sushiService->setImportDates($_POST['startDate'], $_POST['endDate']);
    //try to run!
    try {
        $logText = $sushiService->runAll($_POST['overwritePlatform']);
    } catch (Exception $e) {
        $logText = $e->getMessage();
    }
    $logText = "<div class='headerText'>" . _("Sushi Output Log:") . "</div>" . nl2br($logText) . "<br /><br />";
}
?>

	<script type="text/javascript" src="js/sushi.js"></script>

	<table class="headerTable" style="background-image:url('images/header.gif');background-repeat:no-repeat;">
		<tr><td>
			<table style='width:897px;'>