<?php
if (!isset($c_viewer)) $c_viewer = NULL;
if (!isset($c_editor)) $c_editor = NULL;
if (!isset($c_admin)) $c_admin = NULL;
if ($action == 'add') $c_viewer = 1;
if ($action == 'add') $c_editor = 0;
if ($action == 'add') $c_admin = 0;
print "
<div class='form-row'>
	<label for='c_viewer' class='form-label'>".LABEL_VIEWER."</label>
	<div class='form-cols'>
		<div class='form-col'>
			<div class='form-controls'>";
if ($c_viewer){
	print "
				<input type='checkbox' class='field' id='c_viewer' name='c_viewer' value='1' checked='checked'>";
} else {
	print "
				<input type='checkbox' class='field' id='c_viewer' name='c_viewer' value='1'>";
}
print "
			</div><!-- /.form-controls -->
		</div><!-- /.form-col-->
	</div><!-- /.form-cols -->
</div><!-- /.form-row -->";

if ($_SESSION['backend']['permissions']['editor'] == 1 OR $_SESSION['backend']['permissions']['admin'] == 1){
	print "
<div class='form-row'>
	<label for='c_editor' class='form-label'>".LABEL_EDITOR."</label>
	<div class='form-cols'>
		<div class='form-col'>
			<div class='form-controls'>";
	if ($c_editor){
		print "
				<input type='checkbox' class='field' id='c_editor' name='c_editor' value='1' checked='checked'>";
	} else {
		print "
				<input type='checkbox' class='field' id='c_editor' name='c_editor' value='1'>";
	}
	print "
			</div><!-- /.form-controls -->
		</div><!-- /.form-col-->
	</div><!-- /.form-cols -->
</div><!-- /.form-row -->";
}

if ($_SESSION['backend']['permissions']['admin'] == 1){
	print "
<div class='form-row'>
	<label for='c_admin' class='form-label'>".LABEL_ADMINISTRATOR."</label>
	<div class='form-cols'>
		<div class='form-col'>
			<div class='form-controls'>";
	if ($c_admin){
		print "
				<input type='checkbox' class='field' id='c_admin' name='c_admin' value='1' checked='checked'>";
	} else {
		print "
				<input type='checkbox' class='field' id='c_admin' name='c_admin' value='1'>";
	}
	print "
			</div><!-- /.form-controls -->
		</div><!-- /.form-col-->
	</div><!-- /.form-cols -->
</div><!-- /.form-row -->";
}
print "
<hr/>";