<?php
@session_start();
class Xpl extends MX_Controller{
	public function __construct(){
		parent::__construct();
		$this->load->model('seguridad/xpl_model');
	}

	public function combo($id='',$descripcion='',$ids=0){
		$html 	= '';
		$ds 	= $this->xpl_model->listar();
		if($id!=''&&$descripcion!='')
			$html 	.= '<option value="'.$id.'">'.$descripcion.'</option>';
		foreach ($ds->result() as $row) {
			$selected = ($row->pers_id==$ids)?'selected="selected"':'';
			$html 	.= '<option '.$selected.' value="'.$row->pers_id.'">'.$row->pers_apenombres.'</option>';
		}
		return $html;
	}
}