<?
$this->load->view('cpanel/header');
?>

		<script src="<?=base_url()?>js/jquery.validationEngine-en.js" type="text/javascript"></script>
		<script src="<?=base_url()?>js/jquery.validationEngine.js" type="text/javascript"></script>



		<script>
		$(document).ready(function() {


			$("#formID").validationEngine()


			//$.validationEngine.loadValidation("#date")
			//alert($("#formID").validationEngine({returnIsValid:true}))
			//$.validationEngine.buildPrompt("#date","This is an example","error")	 		 // Exterior prompt build example
			//$.validationEngine.closePrompt(".formError",true) 							// CLOSE ALL OPEN PROMPTS
		});

	</script>

<form id="formID"  method="post" enctype="multipart/form-data" action="<?=site_url('setup/addEditUserAccount')?>">
<input type='hidden' name='action' id='action' value='<?= $action; ?>' >
<input type='hidden' name='oldPassword' id='oldPassword' value='<?= $oldPassword; ?>' >
<input type='hidden' name='accountID' id='accountID' value='<?= $id; ?>' >
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2" valign="top" style="padding-top:20px;">
    <?=$titleErrorMessage?>
    <!--
    <pre>
    <?=print_r($accessSetup);?>
    </pre>
    -->
  	</td>
  </tr>
  <tr>
    <td colspan="2" valign="top" style="padding-top:0px;">
  	      <img src="<?=base_url()?>images/s.gif" width="600" height="1" border="0" alt="" />
	      <div id="module_info"><i class="fa fa-briefcase"></i> Administrator Account  Setup</div>
  	</td>
  </tr>

<?php
if($action == 'Add')
$activeFiled = "";
else
$activeFiled = 'disabled="disabled"';
?>
  <tr>
    <td width="45%" align="center" valign="top" style="padding-top:10px;padding-right:5px;padding-left:0px;">

	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableBorderFrom">
		<tr>
			<td colspan="2" class="mainTableTitle"><i class="fa fa-caret-square-o-down"></i>Account Information</td>
		</tr>
		<tr>
			<td class='formLabelRigit' width='35%' style='padding-top:10px;'> User Name :  </td>
			<td class='formLabelLeft' width='65%' style='padding-top:10px;'><input type='text' class='validate[required,length[4,50]] formInput' name='newUser' id='newUser' maxlength="200" style='width:150px;' <?=$activeFiled?> value='<?= $newUser; ?>' />
			<span style="padding:5px;font-size:11px;color:#FF0000">	*	</span>
			</td>
		</tr>

		<tr>
			<td class='formLabelRigit'>  Password :  </td>
			<td class='formLabelLeft'><input type='text' class='formInput' name='newPassword' id='newPassword' maxlength="200" style='width:150px;' value='' />
			<span style="padding:5px;font-size:11px;color:#FF0000">	*	</span>
			</td>
		</tr>

		<tr>
			<td class='formLabelRigit'>  Account Name :  </td>
			<td class='formLabelLeft'><input type='text' class='formInput' name='full_name' id='full_name' maxlength="200" style='width:200px;' value='<?= $full_name; ?>' />
			</td>
		</tr>

		<tr>
			<td class='formLabelRigit'>  Designation :  </td>
			<td class='formLabelLeft'><input type='text' class='formInput' name='designation' id='designation' maxlength="200" style='width:200px;' value='<?= $designation; ?>' />
			</td>
		</tr>

			<tr>
				<td class='formLabelRigit'> Status :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="status" type="radio" value="0" <?= $status == 0 ? " checked='checked' " : "" ?> />Inactive
				</div>
				<div style="float:left;padding:3px">
				<input name="status" type="radio" value="1" <?= $status == 1 ? " checked='checked' " : "" ?> /> Active
				</div>
				</td>
			</tr>


		<tr>
		    <td>&nbsp;</td>
		    <td>&nbsp;</td>
  		</tr>
	</table>

	</td>
	<!--<pre>
	<?=print_r($accessSetup)?>
	</pre> -->

    <td width="45%" align="center" valign="top" style="padding-top:10px;padding-right:5px;padding-left:0px;">

    	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableBorderFrom">
			<tr>
				<td colspan="2" class="mainTableTitle"><i class="fa fa-caret-square-o-down"></i>Privilege Setting</td>
			</tr>
			<tr>
				<td class='formLabelRigit' width='40%' style='padding-top:15px;'> Carrier Section :  </td>
				<td class='formLabelLeft' width='60%' style='padding-top:12px;'>
				<div style="float:left;padding:3px">
				<input name="carrier" type="radio" value="0" <?= $accessSetup['carrier']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="carrier" type="radio" value="1" <?= $accessSetup['carrier']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="carrier" type="radio" value="2" <?= $accessSetup['carrier']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
				<td class='formLabelRigit'> Tariff Section :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="tariff" type="radio" value="0" <?= $accessSetup['tariff']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="tariff" type="radio" value="1" <?= $accessSetup['tariff']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="tariff" type="radio" value="2" <?= $accessSetup['tariff']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
				<td class='formLabelRigit'> Dialplan Section :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="dialPlan" type="radio" value="0" <?= $accessSetup['dialPlan']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="dialPlan" type="radio" value="1" <?= $accessSetup['dialPlan']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="dialPlan" type="radio" value="2" <?= $accessSetup['dialPlan']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
				<td class='formLabelRigit'> Invoice Section :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="invoice" type="radio" value="0" <?= $accessSetup['invoice']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="invoice" type="radio" value="1" <?= $accessSetup['invoice']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="invoice" type="radio" value="2" <?= $accessSetup['invoice']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
				<td class='formLabelRigit'> Billing Section :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="billing" type="radio" value="0" <?= $accessSetup['billing']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="billing" type="radio" value="1" <?= $accessSetup['billing']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="billing" type="radio" value="2" <?= $accessSetup['billing']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
				<td class='formLabelRigit'> Reconciling Section :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="reconciliation" type="radio" value="0" <?= $accessSetup['reconciliation']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="reconciliation" type="radio" value="1" <?= $accessSetup['reconciliation']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="reconciliation" type="radio" value="2" <?= $accessSetup['reconciliation']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
				<td class='formLabelRigit'> Operational Report Section :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="oprReport" type="radio" value="0" <?= $accessSetup['oprReport']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="oprReport" type="radio" value="1" <?= $accessSetup['oprReport']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="oprReport" type="radio" value="2" <?= $accessSetup['oprReport']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
				<td class='formLabelRigit'> Financial Report Section :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="finReport" type="radio" value="0" <?= $accessSetup['finReport']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="finReport" type="radio" value="1" <?= $accessSetup['finReport']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="finReport" type="radio" value="2" <?= $accessSetup['finReport']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
				<td class='formLabelRigit'> Billing Setup Section :  </td>
				<td class='formLabelLeft'>
				<div style="float:left;padding:3px">
				<input name="setting" type="radio" value="0" <?= $accessSetup['setting']['Action'] == 0 ? " checked='checked' " : "" ?> /> No
				</div>
				<div style="float:left;padding:3px">
				<input name="setting" type="radio" value="1" <?= $accessSetup['setting']['Action'] == 1 ? " checked='checked' " : "" ?> /> View
				</div>
				<div style="float:left;padding:3px">
				<input name="setting" type="radio" value="2" <?= $accessSetup['setting']['Action'] == 2 ? " checked='checked' " : "" ?> /> All Access
				</div>
				</td>
			</tr>

			<tr>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
	  		</tr>
	</table>
	</td>
   </tr>

  <tr>
    <td colspan="2" align="center" style="padding:15px;">
     <input type="submit" class="btn btn-success" name="submit" value="Save Profile" />
  </tr>

</table>
</form>


<?
$this->load->view('cpanel/footer');
?>
