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


<table width="100%" border="0" cellspacing="0" cellpadding="1">
  <tr>
    <td style="padding-left:10px; padding-right:5px; padding-top:15px; padding-bottom:10px;">
	  <!-- Body Test -->


     <table width="100%" border="0" cellspacing="0" cellpadding="1" class="tableBorder">
	   <tr>
	     <td class="mainTableTitle"><?=$titleMessage?>  <?=$errorMessage?></td>
	   </tr>
	   <tr>
	     <td>
	     <!-- Add/ Edit Form -->
	     <form class="edit" name="addForm" id="addForm" enctype="multipart/form-data" method="POST" action="<?=site_url('reseller/addEditReseller2')?>" onSubmit="return formValidation(this)">
         <input type='hidden' name='id' id='id' value='<?= $id; ?>' >
         <input type='hidden' name='action' id='action' value='<?= $action; ?>' >
    	 <?
		 if($action !="Add")
		 {
		  $disableField = "disabled='disabled'";
		 }
		 else
		 {
		  $disableField = "";
		 }
		?>




	     </form>

	     <!-- End Add/ Edit Form -->
	     </td>
	   </tr>
      </table>


	<!-- End Body Test -->
	</td>
  </tr>
</table>


<table width="100%"  border="0" cellspacing="0" cellpadding="1" class="tableBorder">
<tr>
<td style="padding-top:10px;">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" class="top_title2" style="padding-left:2px;">
	<div class="block-head">
	<h3 class="title"><?=$titleMessage?>  <?=$errorMessage?> </h3>
	</div>
    </td>
    <td width="0%" align="right" class="block-head" style="padding-right:12px;">
    </td>
  </tr>
</table>

</td>
</tr>

<tr>
<td style="padding-top:10px;">

<!-- Form -->
<form class="edit" name="addForm" id="addForm" enctype="multipart/form-data" method="POST" action="<?=site_url('reseller/addEditReseller2')?>" onSubmit="return formValidation(this)">

<input type='hidden' name='id' id='id' value='<?= $id; ?>' >
<input type='hidden' name='idReseller' id='idReseller' value='<?= $idReseller; ?>' >
<input type='hidden' name='action' id='action' value='<?= $action; ?>' >
<input type='hidden' name='tech_prefix' id='tech_prefix' value='<?= $tech_prefix; ?>' >
<input type='hidden'  class = 'formInput' name='type' id='type' value='<?= $type; ?>' />

<?
if($action !="Add")
{
  $disableField = "disabled='disabled'";
}
else
{
  $disableField = "";
}
?>

<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td width="45%" valign="top">
    <!-- Account Information -->

<div align="center">
<FIELDSET style="padding:5px;width:90%">
<LEGEND ACCESSKEY=I>Account Information</LEGEND>

<table cellspacing="0" cellpadding="0" border="0" width="100%">

<tr>
<td class='formLabelf' width='30%'> Login :</td>
<td class='formLabel_inputf' width='70%'>
<input type='text'  class = 'formInput' name='login' id='login' value='<?= $login; ?>' <?=$disableField?> /> *
</td>
</tr>

<tr>
<td class='formLabelf'> Password :</td>
<td class='formLabel_inputf'>
<input type='password' name='password' id='password' value='<?= $password; ?>' /> *
</td>
</tr>

<tr>
<td class='formLabelf'> Rate Name :</td>
<td class='formLabel_inputf'>
<select name="id_rate" id = "id_rate" class = 'formInput'>
<?=$rateList?>
</select> *
</td>
</tr>


<tr>
<td class='formLabelf'>Balance : </td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='balance' id='balance' maxlength="10" size="15" value="<?= $balance; ?>" <?=$disableField?> />
</td>
</tr>


<tr>
<td class='formLabelf'>User Limit : </td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='limit_user' id='limit_user' maxlength="3" size="10" value="<?=$limit_user?>"/>
</td>
</tr>


<tr>
<td class='formLabelf'>Balance Limit : </td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='limit_balance' id='limit_balance' maxlength="10" size="15" value="<?=$limit_balance?>"/>
</td>
</tr>


<tr>
<td class='formLabelf'>Rate Chart Limit : </td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='limit_rate' id='limit_rate' maxlength="3" size="10" value="<?=$limit_rate?>"/>
</td>
</tr>


<tr>
<td class='formLabelf'> Active :  </td>
<td class='formLabel_inputf'>

<?
if($type%2 !=0)
$checkDisable = "checked='checked'";
else
$checkDisable = "";
?>
<input name="active"  type="checkbox" id="active" value="1" <?=$checkDisable?> />

</td>
</tr>


</table>


</FIELDSET>
</div>

<!-- End Account Information -->

    </td>
    <td width="45%" valign="top">

     <!-- Tariff Information -->

<FIELDSET style="padding:5px;width:90%">
<LEGEND ACCESSKEY=I>Personal Information</LEGEND>

<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td class='formLabelf' width='30%'> Fullname : </td>
<td class='formLabel_inputf' width='70%'>
<input type='text'  class = 'formInput' name='Fullname' size = '35' id='Fullname' value='<?= $Fullname; ?>' />
</td>
</tr>

<tr>
<td class='formLabelf'> Address : </td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='Address' id='Address' size = '40' value='<?= $Address; ?>' />
</td>
</tr>

<tr>
<td class='formLabelf'> City :</td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='City' id='City' value='<?= $City; ?>' />
</td>
</tr>

<tr>
<td class='formLabelf'> ZipCode :</td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='ZipCode' id='ZipCode' value='<?= $ZipCode; ?>' />
</td>
</tr>

<tr>
<td class='formLabelf'> Country : </td>
<td class='formLabel_inputf'>
<select name="Country" id = "Country" class = 'formInput'>
<option value="Null">-- Select One --</option>
<!--
<?=$countryList?>
-->
</select>
<!--
<input type='text'  class = 'formInput' name='Country' id='Country' value='<?= $Country; ?>' />
-->
</td>
</tr>

<tr>
<td class='formLabelf'> Phone : </td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='Phone' id='Phone' value='<?= $Phone; ?>' />
</td>
</tr>

<tr>
<td class='formLabelf'> Email : </td>
<td class='formLabel_inputf'>
<input type='text'  class = 'formInput' name='Email' id='Email' value='<?= $Email; ?>' />
</td>
</tr>

</table>

</FIELDSET>
</div>

<!-- End Account Information -->

    </td>
  </tr>



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


  <tr>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
</table>


</form>
<!-- End Form -->
</td>
</tr>

</table>

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