Example #1
0
} else {
    ?>
							
							<?php 
    $ur = new UserRegion();
    $userRegions = $ur->getByIdUser($idUser);
    ?>
		
						<tr>
						 <td><label for="regions"> Regiones </label></td><td>
								    <select id="regions" name="region">

   <?php 
    foreach ($userRegions as $r) {
        $region = new Region($r->prepareId_region());
        echo '<option value="' . $region->prepareId_region() . '"> ' . $region->prepareName() . ' </option>';
    }
    ?>
  </select>
  <center><span id="selectR" style="display:none;"> <b>Selecciona una regi&oacute;n</b></span></center>
</td>
						</tr>
							<?php 
}
?>
							
							
							
						<tr>
							<td> <label for="status"> Estado <label> </td> 
							<td>
        $id = $a->prepareEconomic_unit_id();
        echo '<tr><td> <input type="checkbox" class="check" value="' . $id . '" name="args[]" /> </td>';
        echo '<td> ' . $a->prepareEconomic_unit_name() . ' </td>';
        echo '<td> ' . $a->prepareEconomic_unit_street_type() . ' </td>';
        echo '
			<td> ' . substr($a->prepareEconomic_unit_description(), 0, 30) . ' </td>
		';
        echo '<td> ' . $a->prepareEconomic_unit_street_name() . ' </td>';
        echo '<td> ' . $a->prepareEconomic_unit_location_number() . ' </td>';
        echo '<td> ' . $a->prepareEconomic_unit_phone() . ' </td>';
        echo '<td>';
        $idRegion = $a->prepareEconomic_unit_region();
        if (!empty($idRegion)) {
            try {
                $region = new Region($idRegion);
                echo $region->prepareName();
            } catch (Exception $e) {
                echo "Sin regi&oacute;n";
            }
        }
        echo '</td>';
        $status = $a->getActive();
        $status = $status == true || $status == "Yes" || $status == 1 ? "Activo" : "Inactivo";
        echo '<td> ' . $status . "</td>";
        $status = $a->getVerified();
        $status = $status == true || $status == "Yes" || $status == 1 ? "Verificado" : "No verificado";
        echo '<td> ' . $status . "</td>";
        if ($canEdit) {
            echo '<td><center><a href="edit.php?id=' . $id . '"><img src="' . ICON . 'edit.png" /></a> </center></td>';
        }
        if ($canDelete) {