
<?
$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>



<?
if($routeType == 0)
$dialPlanStr = "Common Dialplan List";
else
$dialPlanStr = "LCR Dialplan List";
?>


<form id="formID"  method="post" action="<?=site_url('gateway/addEditLCRDialPlan')?>">

<input type='hidden' name='id' id='id' value='<?= $id; ?>' >
<input type='hidden' name='action' id='action' value='<?= $action; ?>' >
<input type='hidden' name='routeType' id='routeType' value='<?= $routeType; ?>' >
<div align="center">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td colspan="2" valign="top" style="padding-top:20px;">

      <img src="<?=base_url()?>images/s.gif" width="600" height="1" border="0" alt="" />
      <div id="module_info">

                  <span>&nbsp;&nbsp;&raquo;</span> <?=$dialPlanStr?>  <?=$titleErrorMessage?>  </div>

    </td>
  </tr>

  <tr>
    <td width="40%" valign="top" style="padding-top:10px;padding-right:5px;">
    <!-- Account Information -->

<table width="100%" class="tableBorder" border="0"  cellpadding="2" cellspacing="2">
  <tr>
    <td colspan="2" class="mainTableTitle"><?=TITLE042?></td>
  </tr>

<tr>
	<td class='formLabelRigit' width='30%' style='padding-top:10px;'>  Dial Prefix :  </td>
	<td class='formLabelLeft' width='70%' style='padding-top:10px;'><input type='text' class='validate[required,custom[onlyNumberFormate],length[1,13]] formInput' name='prefix' id='prefix' style='width:150px;' value='<?= $prefix; ?>' />
	<span style="padding:5px;font-size:11px;color:#FF0000">	*	</span>
	</td>
</tr>


<tr>
	<td class='formLabelRigit'>  Gateway Name :  </td>
	<td class='formLabelLeft'>
	  <!--
	  <select name="id_trunk" id="id_trunk" class="validate[required] selectFrom">
	    <?=$trunkList?>
    </select>
    -->
    	<select class="selectFrom" name="idTrunks[]" id="idTrunks[]" multiple="multiple" style="width:200px;height:100px">
		<?=$trunkList?>
	</select>

    <span style="padding:5px;font-size:11px;color:#FF0000">	*	</span>
	</td>
</tr>

<!--
<tr>
	<td class='formLabelRigit'>  Priority :  </td>
	<td class='formLabelLeft'><input type='text' class='validate[required] formInput' name='priority' id='priority' style='width:50px;' value='<?= $priority; ?>' />
	<span style="padding:5px;font-size:11px;color:#FF0000">	*	</span>
	</td>
</tr>
-->



		<tr>
			<td class='formLabelRigit'>  Add Prefix :  </td>
			<td class='formLabelLeft'><input type='text' class='formInput' name='add_prefix' id='add_prefix' style='width:70px;' value='<?= $add_prefix; ?>' /></td>
		</tr>


		<tr>
			<td class='formLabelRigit'>  Remove Prefix :  </td>
			<td class='formLabelLeft'><input type='text' name='remove_prefix' id='remove_prefix' class='formInput' style='width:70px;' value='<?= $remove_prefix; ?>' /></td>
		</tr>


		<tr>
			<td class='formLabelRigit'> Status :  </td>
			<td class='formLabelLeft'>

		<?
		if($status ==1)
		$checkDisable = "checked='checked'";
		else
		$checkDisable = "";
		?>
		<input name="status"  type="checkbox" id="status" value="1" <?=$checkDisable?> />

		</td>
		</tr>


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



    <!-- End Account Information -->

    </td>
    <td width="40%" valign="top" style="padding-top:10px;padding-left:5px;">
    <!-- Personal Information -->



		<table width="100%" class="tableBorder" border="0"  cellpadding="2" cellspacing="2">
		  <tr>
			<td colspan="2" class="mainTableTitle"><?=TITLE043?></td>
		  </tr>
<!--
<tr>
	<td class='formLabelRigit' width='30%' style='padding-top:10px;'>  Balance Share :  </td>
	<td class='formLabelLeft' width='70%' style='padding-top:10px;'><input type='text' class='validate[required] formInput' name='share' id='share' style='width:50px;' value='<?= $share; ?>' /></td>
</tr>
-->

		<tr>
			<td class='formLabelRigit' width='30%' style='padding-top:10px;'>  From Day :  </td>
			<td class='formLabelLeft' width='70%' style='padding-top:10px;'>
			<select name="from_day" id="from_day" class="selectFrom">
		    <?=$fromDayList?>
			</select>
			</td>
		</tr>


		<tr>
			<td class='formLabelRigit'>  From Hour :  </td>
			<td class='formLabelLeft'><input type='text' name='from_hour' id='from_hour' class='formInput' style='width:50px;' value='<?= $from_hour; ?>' /></td>
		</tr>


		<tr>
			<td class='formLabelRigit'>  To Day :  </td>
			<td class='formLabelLeft'>
			<select name="to_day" id="to_day" class="selectFrom">
		    <?=$toDayList?>
			</select>
			</td>
		</tr>


		<tr>
			<td class='formLabelRigit'>  To Hour :  </td>
			<td class='formLabelLeft'><input type='text' name='to_hour' id='to_hour' class='formInput' style='width:50px;' value='<?= $to_hour; ?>' /></td>
		</tr>


		<tr>
			<td class='formLabelRigit'> Next Route? :  </td>
			<td class='formLabelLeft'>
		<?
		if($jump ==1)
		$checkDisable = "checked='checked'";
		else
		$checkDisable = "";
		?>
		<input name="jump"  type="checkbox" id="jump" value="1" <?=$checkDisable?> />

		</td>
		</tr>


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


    <!-- End Personal Information -->
    </td>
  </tr>


  <tr>
    <td colspan="2" align="center" style="padding:15px;"><input type="submit" name="submit" value="<?= $action == 'Add' ? " Submit Now " : "Edit Now" ?>" class="input-submit" /></td>
  </tr>


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



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

