Location: PHPKode > scripts > rConfig > rconfig/www/commands.php
<?php include("includes/head.inc.php"); ?>
<!-- Headwrap Include -->
<?php include("includes/masthead.inc.php"); ?>
<div id="mainwrap">
	<!-- TopNav Include -->
	<?php include("includes/topnav.inc.php"); ?>
	<div id="main">
	/* Custom Devices Custom Form Functions */
		<!-- Breadcrumb Include -->
		<?php include("includes/breadcrumb.inc.php"); ?>
		<!-- Announcement Include -->
		<?php include("includes/announcement.inc.php"); ?>
		<div id="content">
				// echo error message if is sent back in GET from CRUD
				// move nested errors array to new array
				$errors = $_SESSION['errors'];	
				/* "Do NOT unset the whole $_SESSION with unset($_SESSION) as this will disable the registering of session variables through the $_SESSION superglobal." */
				$_SESSION['errors'] = array();
			<fieldset id="tableFieldset">
				<legend>Commands Management</legend>
					if(isset($errors['Success'])){echo "<span class=\"error\">".$errors['Success']."</span><br/>";} 
					if(isset($errors['Fail'])){echo "<span class=\"error\">".$errors['Fail']."</span><br/>";}
				<div id="toolbar">
					<button class="show_hide">Add Command</button>
					<button onclick="editCommand()">Edit Command</button>
					<button onclick="delCommand()">Remove Command</button>
				<!-- begin devices form -->
				<div class="mainformDiv">
					<form id="commandAdd" method="post" action="lib/crud/commands.crud.php" enctype="multipart/form-data" class="myform stylizedForm stylized" style="width:100%;">
						<div style="width:300px; margin-bottom:10px;">
						<label for="command"><font color="red">*</font> Command:</label>
						<input name="command" id="command" size="75" tabindex='1'>
						<div class="spacer"></div>
						<?php if(isset($errors['command'])){echo "<span class=\"error\">".$errors['command']."</span>";}?>
						<label><font color="red">*</font> Category</label>
						<select name="catId[]" id="catId" tabindex='2' size='6' multiple>
							<?php categories(); /* taken from devices.frm.func.php */ ?>
						<div class="spacer"></div>
						<?php if(isset($errors['catId'])){echo "<span class=\"error\">".$errors['catId']."</span>";}?>

						<input type="hidden" id="add" name="add" value="add" tabindex='3'>
						<input type="hidden" id="editid" name="editid" value="" tabindex='4'>
						<div class="spacer"></div>
						<button id="save" type="submit">Save</button>
						<button class="show_hide" type="button">Close</button><?php /* type="button" to remove default form submit function which when pressed can cause the form action attr to take place */ ?>
				<!-- End mainformDiv -->
				<div id="table">
						/* full table stored off in different script */
		<!-- End Content -->
		<div style="clear:both;">
	<!-- End Main -->
	<!-- JS script Include -->
	<script type="text/JavaScript" src="js/commands.js"></script>
	<!-- Footer Include -->
	<?php include("includes/footer.inc.php"); ?>
<!-- End Mainwrap -->
Return current item: rConfig