Location: PHPKode > projects > Network Configuration Store > NCS-3.0.2/wwwroot/Settings/AlertTargets.php
<?php

require_once('./CS_Includes.inc.php');

try {
	CS::Check($_GET['alert_id'], CSA_EMPTY|CSA_THROW, 'AlertTargets with no alert_id');

	$alert = new CSAlert($_GET['alert_id']);

	$viewForm = new CSForm('AlertTargetAdmin.php?alert_id='.$_GET['alert_id']);
	$viewForm->AddControl('<strong>Alert Name</strong>', new CSFormControl(CSF_TEXT, array('text' => ($alert->enabled == 1) ? $alert->name : $alert->name.' (disabled)')));
	$viewForm->AddControl('<strong>Target Count</strong>', new CSFormControl(CSF_TEXT, array('text' => $alert->targetCount.' e-mail addresses')));
	$viewForm->AddControl('<strong>Reference Count</strong>', new CSFormControl(CSF_TEXT, array('text' => $alert->refCount.' devices')));

	$viewForm->AddButton(new CSFormControl(CSF_SUBMIT, array('value' => 'Add Target')));
	$viewForm->AddButton(new CSFormControl(CSF_BUTTON, array('value' => 'Back', 'onclick' => 'history.back(1);')));

	$targets =& $alert->GetTargetArray();
}
catch (Exception $e) {
	CS::Abort($e);
}

$i = 0; //Row counter

CS::PrintHtmlHeader('Alert Targets - Settings');

?>

<body id="Main">

	<h1>Alert Targets</h1>

	<h2>Group Information</h2>
<?php if (isset($_GET['updated'])): ?>
	<p class="InfoMsg">Alert targets successfully updated.</p>
<?php endif; ?>
	<?php $viewForm->InsertHtml(); ?>

	<h2>Current Targets</h2>

	<table width="100%">
	<tr class="Header"><td>E-mail Address</td><td>Flags</td></tr>

<?php if (count($targets)): ?>
	<?php foreach($targets as $target): ?>
		<?php echo $target; ?>
	<?php endforeach; ?>
<?php else: ?>
	<tr><td colspan="5">No e-mail addresses</td></tr>
<?php endif; ?>

	</table>

</body>
</html>
Return current item: Network Configuration Store