Example #1
0
}
function DisplayAlert($message)
{
    if ($message != null) {
        echo "alert('{$message}');";
    }
}
?>

<html>
	<head>
		<script language="javascript" type="text/javascript">
			function OnInit()
			{
				<?php 
DisplayAlert($alert);
//echo "alert('$cmd');";
switch ($cmd) {
    case "REM":
        echo "window.location.href='" . get_admin_url() . "edit.php'";
        break;
    case "RMW":
        echo "window.location.href='" . get_admin_url() . "options-general.php?page=feedweb.php'";
        break;
    case "NPW":
        echo "window.location.href='" . get_admin_url() . "post.php?post={$post_id}&action=edit'";
        break;
    default:
        echo "window.parent.tb_remove();";
        echo "window.parent.location.href = window.parent.location.href;";
        break;
Example #2
0
function DisplayAlerts()
{
    global $num_ConditionList;
    ?>
    <script language="Javascript" src="js/alerting.js" type="text/javascript">
    </script>
<?php 
    ReportLog("Alert action eval: " . $_SESSION['action']);
    $setup = 0;
    switch ($_SESSION['action']) {
        case 'list':
            $alertstatus = $_SESSION['alertstatus'];
            DisplayAlertTable($alertstatus);
            break;
        case 'new':
            $alertinfo = $_SESSION['alertinfo'];
            $setup = 1;
            DisplayAlert(1, $alertinfo);
            break;
        case 'details':
            $setup = 1;
            $alertinfo = $_SESSION['alertinfo'];
            DisplayAlert(0, $alertinfo);
            break;
        default:
            print "<h3>ERROR action: " . $_SESSION['action'] . "</h3>";
            break;
    }
    unset($_SESSION['action']);
    if ($setup) {
        ?>
    <script language="Javascript" type="text/javascript">
		window.onload=function() {
			for (i=0; i< <?php 
        echo $num_ConditionList;
        ?>
; i++ )
				SetConditionRow(i);
			SetupCondition(<?php 
        echo "{$num_ConditionList}, " . $alertinfo['type'];
        ?>
);
		}
    </script>
<?php 
    }
}