Example #1
0
             echo "<td {$classAdd} style='padding:3px;'><a href='publisherPlatform.php?" . $urlstring . "'>" . $obj->name . "</a></td>";
             echo "<td {$classAdd} style='padding:3px;'>" . $lastImportDate . "</td>";
             echo "<td {$classAdd} style='padding:3px;'>" . $lastImportDetails . "<br /><a href='" . $logFileURL . "'>view full log</a></td>";
             echo "<td {$classAdd} style='padding:3px;'><a href='ajax_forms.php?action=getSushiRunForm&sushiServiceID=" . $sushi['sushiServiceID'] . "&height=216&width=348&modal=true' class='thickbox'>run now</a></td>";
             echo "<td {$classAdd} style='padding:3px;'><a href='publisherPlatform.php?" . $urlstring . "&showTab=sushi'>change/test connection</a></td>";
             echo "</tr>";
         }
         echo "</table>";
     } else {
         echo "(no failed imports found)";
     }
     break;
     //display sushi outstanding approval queue
 //display sushi outstanding approval queue
 case 'getAllSushiServices':
     $sushiService = new SushiService();
     $sushiArray = array();
     $sushiArray = $sushiService->allServices();
     if (count($sushiArray) > 0) {
         echo "<table class='dataTable' style='width:830px; max-width:830px;'>";
         echo "<tr>";
         echo "<th style='padding:3px;'>Platform/Publisher</th>";
         echo "<th style='padding:3px;'>Report(s)</th>";
         echo "<th style='padding:3px;'>Next Run</th>";
         echo "<th style='padding:3px;'>Latest Run</th>";
         echo "<th style='padding:3px;'>Latest Status</th>";
         echo "<th style='padding:3px;'>&nbsp;</th>";
         echo "<th style='padding:3px;'>&nbsp;</th>";
         echo "</tr>";
         foreach ($sushiArray as $sushi) {
             if ($sushi['platformID'] > 0) {
Example #2
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>
Example #3
0
 case 'runSushiService':
     //update
     if (isset($_GET['sushiServiceID']) && $_GET['sushiServiceID'] != '') {
         $sushiService = new SushiService(new NamedArguments(array('primaryKey' => $_GET['sushiServiceID'])));
         //try to run!
         try {
             $sushiService->runAll();
         } catch (Exception $e) {
             echo $e->getMessage();
         }
     }
     break;
 case 'testSushiService':
     //update
     if (isset($_GET['sushiServiceID']) && $_GET['sushiServiceID'] != '') {
         $sushiService = new SushiService(new NamedArguments(array('primaryKey' => $_GET['sushiServiceID'])));
         //try to run!
         try {
             echo $sushiService->runTest();
         } catch (Exception $e) {
             echo $e->getMessage();
         }
     }
     break;
 case 'deleteExternalLogin':
     $externalLogin = new ExternalLogin(new NamedArguments(array('primaryKey' => $_GET['externalLoginID'])));
     try {
         $externalLogin->delete();
     } catch (Exception $e) {
         echo $e->getMessage();
     }
Example #4
0
				   if(e.keyCode == 13) {
					   doSubmitLogEmailAddress();
				   }
        	});

        </script>


		<?php 
        break;
        //prompt for running sushi, posts to sushi.php
    //prompt for running sushi, posts to sushi.php
    case 'getSushiRunForm':
        if (isset($_GET['sushiServiceID']) && $_GET['sushiServiceID'] != '') {
            $sushiServiceID = $_GET['sushiServiceID'];
            $sushiService = new SushiService(new NamedArguments(array('primaryKey' => $sushiServiceID)));
            $sushiService->setDefaultImportDates();
            ?>
			<div id='div_sushiRunForm'>
			<form name="input" action="sushi.php" method="post">
			<input type='hidden' id='sushiServiceID' name='sushiServiceID' value='<?php 
            echo $sushiServiceID;
            ?>
'>
			<table class="thickboxTable" style="width:300px;padding:2px;">
				<tr>
					<td colspan='2'><span class='headerText'>SUSHI Service for <?php 
            echo $sushiService->getServiceProvider;
            ?>
</span><br /> Optional Parameters<span id='span_errors' style='color:red;'><br /></span><br /></td>
				</tr>
Example #5
0
**
** CORAL 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 3 of the License, or (at your option) any later version.
**
** 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';
$util = new Utility();
$config = new Configuration();
// find sushi services which need to be run today
$day = date("j");
$sushiServices = new SushiService();
$sushiServicesArray = $sushiServices->getByDayOfMonth($day);
$emailLog = "<h2>" . count($sushiServicesArray) . " SUSHI runs found for day: " . $day . "</h2>";
foreach ($sushiServicesArray as $sushiService) {
    $sushiService->setImportDates();
    $emailLog .= "<h3>" . $sushiService->getServiceProvider() . "</h3>";
    //try to run!
    try {
        $emailLog .= nl2br($sushiService->runAll($_POST['overwritePlatform']));
    } catch (Exception $e) {
        $emailLog .= nl2br($e->getMessage());
    }
}
//if more than one run, send email
if (count($sushiServicesArray) > 0) {
    $emailLog .= "<br /><br />Log in to <a href='" . $util->getPageURL() . "sushi.php'>Sushi Administration</a> for more information.";