<?php
if (!isset($c_cms)) $c_cms = NULL;
if ($action == 'add' && !$c_cms) $c_cms = 1;
if (!isset($c_viewer)) $c_viewer = NULL;
if ($action == 'add' && !$c_viewer) $c_viewer = 1;
if (!isset($c_editor)) $c_editor = NULL;
if ($action == 'add' && !$c_editor) $c_editor = 1;
if (!isset($c_admin)) $c_admin = NULL;
if ($action == 'add' && !$c_admin) $c_admin = 1;
print "
<span class='headline'>".LABEL_PERMISSIONS."</span>

<div class='form-row'>
	<label for='c_cms' class='form-label desktoponly'></label>
	<div class='form-cols'>
		<div class='form-col'>
			<div class='form-controls'>";
if ($c_cms){
	print "
				<input type='checkbox' class='field' id='c_cms' name='c_cms' value='1' checked='checked'>";
} else {
	print "
				<input type='checkbox' class='field' id='c_cms' name='c_cms' value='1'>";
}
print "
				<label for='c_cms' class='form-label-after'>".LABEL_CMS."</label>
			</div><!-- /.form-controls -->
		</div><!-- /.form-col-->
	</div><!-- /.form-cols -->
</div><!-- /.form-row -->

<div class='form-row'>
	<label for='c_viewer' class='form-label'></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 "
				<label for='c_viewer' class='form-label-after'>".LABEL_VIEWER."</label>
			</div><!-- /.form-controls -->
		</div><!-- /.form-col-->
		
		<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 "
				<label for='c_editor' class='form-label-after'>".LABEL_EDITOR."</label>
			</div><!-- /.form-controls -->
		</div><!-- /.form-col-->
		
		<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 "
				<label for='c_admin' class='form-label-after'>".LABEL_ADMINISTRATOR."</label>
			</div><!-- /.form-controls -->
		</div><!-- /.form-col-->
	</div><!-- /.form-cols -->
</div><!-- /.form-row -->

<hr/>";