data: {form_tinhhinhquanly : form_tinhhinhquanly}, success:function(data){ if (data == true){ $.unblockUI(); _initViewDetailPage(id); loadNoticeBoardSuccess('Thông báo', 'Xử lý thành công.'); } else {$.unblockUI();loadNoticeBoardError('Thông báo', 'Có lỗi xảy ra, vui lòng liên hệ quản trị viên!');} } }); } }); $('#btn_add_noidunghop').on('click', function(){ var xhtml = '<tr class="ye">'; xhtml+= '<td style="vertical-align: middle; text-align: center;">'; xhtml+= '<?php echo ThontoHelper::selectBoxAndAttr('', array('name' => 'noidunghop_id[]'), 'thonto_danhmucnoidunghop', array('id', 'ten'), '', 'ten asc'); ?> '; xhtml+= '</td>'; xhtml+= '<td style="vertical-align: middle; text-align: center;">'; xhtml+= "<select name='co_thuchien[]' class='input-small'> <option value='1'>Có</option> <option value='0'>Không</option> </select>"; xhtml+= '</td>'; xhtml+= '<td style="vertical-align: middle; text-align: center;">'; xhtml+= '<span class="btn btn-mini btn-danger btn_xoa_noidunghop">Xóa</span>'; xhtml+= '</td>'; xhtml+= '</tr>'; $('#div_noidunghop').append(xhtml); }); }); </script>
<i class="icon-search"></i> Hiển thị </a> <a id="dlink" style="display:none;"></a> <input type="button" class="btn btn-small btn-success" id="btn_excelmau5" value='Xuất excel'> </span> </h5> </div> <div class="row-fluid"> <div class="span4"> <div id="caydonvi_mau5" style="overflow:auto"> CÂY ĐƠN VỊ </div> </div> <div class="span8"> <h4 class="blue header"><i class="icon-star blue"></i> Phụ lục 5 - Bảng theo dõi tình hình hoạt động tại tổ dân phố, thôn </h4> Đợt báo cáo: <?php echo ThontoHelper::selectBox_notdefautl(null, array('name' => 'dot_phuluc5'), 'thonto_dotbaocao', array('id', 'tendot'), 'trangthai =1', 'nam desc, id desc'); ?> </div> </div> <h5 class="row-fluid header smaller lighter blue"> <span>Hiển thị nội dung thống kê</span> </h5> <div id="kqThongkemau5" ></div> <script type="text/javascript"> var dot_phuluc5; var getDataPhuluc5 = function(index,donvi_id,donvi_ten,donvi_kieu,lft,rgt){ dot_phuluc5 = jQuery('#dot_phuluc5 option:selected').val(); var dataPost = {option:'com_thonto',controller:'thongke',task:'getDulieuPhuluc5',lft:lft,rgt:rgt, dot_phuluc5:dot_phuluc5}; jQuery.post('index.php', dataPost, function(data){ var xhtml = ''; var a =data.thongtinthem;
<?php echo ThontoHelper::selectBoxAndAttr($item['thonto_id'], array('id' => 'congtac_thonto_id', 'name' => 'congtac[thonto_id]'), 'thonto_tochuc', array('id', 'ten', 'kieu'), array('trangthai_id = 1 AND kieu IN (4,5) AND parent_id = "' . $item['phuongxa_id'] . '"')); ?> </div> </div> </div> <div style="float:left;width:400px;"> <div class="control-group"> <label class="control-label" for="congtac_chucvu_id">Chức vụ (<span style="color:red;">*</span>)</label> <div class="controls"> <input type="hidden" id="congtac_chucvu" name="congtac[chucvu]" value="<?php echo $item['chucvu']; ?> " /> <?php echo ThontoHelper::selectBoxAndAttr($item['chucvu_id'], array('id' => 'congtac_chucvu_id', 'name' => 'congtac[chucvu_id]'), 'thonto_chucvu', array('id', 'ten'), array('trangthai = 1 AND loaihinhtochuc_id IN (4,5)')); ?> </div> </div> </div> <div style="float:left;width:400px;"> <div class="control-group"> <label class="control-label" for="congtac_ngaybatdau">Ngày bắt đầu (<span style="color:red;">*</span>)</label> <div class="controls"> <div class="row-fluid input-append"> <input type="text" id="congtac_ngaybatdau" name="congtac[ngaybatdau]" class="input-small date-picker input-mask-date" data-date-format="dd/mm/yyyy" value="<?php echo $item['ngaybatdau']; ?> " /> <span class="add-on">
?> >Có</option> </select> </div> </div> </div> </td> </tr> <tr> <td> <div style="float:left;width:400px;"> <div class="control-group"> <label class="control-label" for="hoso_edit_loaibaohiemyte_id">Loại bảo hiểm y tế (<span style="color:red;">*</span>)</label> <div class="controls"> <?php echo ThontoHelper::selectBoxAndAttr($item['loaibaohiemyte_id'], array('id' => 'hoso_edit_loaibaohiemyte_id', 'name' => 'hoso_edit[loaibaohiemyte_id]'), 'thonto_loaibaohiemyte', array('id', 'ten'), array('trangthai = 1')); ?> </div> </div> </div> </td> <td> <div style="float:left;width:400px;" class="hoso_edit_kiemnhiem"> <div class="control-group"> <label class="control-label" for="hoso_edit_congtac_chucvu_kiemnhiem">Chức danh phường xã kiêm nhiệm</label> <div class="controls"> <input type="hidden" id="hoso_edit_congtac_chucvu_kiemnhiem_id" name="hoso_edit[congtac_chucvu_kiemnhiem_id]" value="<?php echo $item['congtac_chucvu_kiemnhiem_id']; ?> " /> <input type="text" id="hoso_edit_congtac_chucvu_kiemnhiem" name="hoso_edit[congtac_chucvu_kiemnhiem]" value="<?php
<div style="float:left;width:800px;"> <div class="control-group"> <label class="control-label" for="timkiem_congtac_donvi_id">Thôn, tổ dân phố</label> <div class="controls"> <select id="timkiem_congtac_donvi_id" name="timkiem[congtac_donvi_id][]" data-placeholder="Chọn thôn, tổ dân phố..." multiple="multiple"> <option value=""></option> </select> </div> </div> </div> <div style="float:left;width:800px;"> <div class="control-group"> <label class="control-label" for="timkiem_nghenghiephientai">Nghề nghiệp hiện tại</label> <div class="controls"> <?php echo ThontoHelper::selectBoxAndAttr('', array('id' => 'timkiem_nghenghiephientai', 'name' => 'timkiem[nghenghiephientai][]', 'data-placeholder' => 'Chọn phường xã...', 'multiple' => 'multiple'), 'thonto_nghenghiephientai', array('id', 'ten')); ?> </div> </div> </div> <input type="hidden" name="option" value="com_thonto" /> <input type="hidden" name="controller" value="timkiem" /> <input type="hidden" name="view" value="timkiem" /> <input type="hidden" name="format" value="raw" /> <input type="hidden" name="task" value="ketqua" /> </form> <div style="clear: both;"></div> <div id="div_result"></div> <script type="text/javascript"> jQuery(document).ready(function($){ $('#timkiem_congtac_chucvu_id').chosen({width: '400px', allow_single_deselect: true, search_contains: true});
* Company: DNICT */ $user = JFactory::getUser(); $dot = $_REQUEST['dot'] == null ? 0 : $_REQUEST['dot']; ?> <style> #main-content-tree{ height: 280px; overflow: auto; } </style> <h3 class="row-fluid header smaller lighter blue"> Tình hình quản lý <small><span id='tentochuc'></span> </small> <span class="pull-right inline"> <?php echo ThontoHelper::selectBox_notdefautl($dot, array('name' => 'dot'), 'thonto_dotbaocao', array('id', 'tendot'), 'trangthai=1', 'nam desc'); ?> </span> </h3> <div class="row-fluid" id="com_thonto_viewdetail"></div> <script type="text/javascript"> var id; var showlist; var px_id; var dot; var _initViewDetailPage = function(id){ dot = jQuery('#dot option:selected').val(); jQuery.ajax({ type: "GET", url: 'index.php?option=com_thonto&controller=tinhhinhquanly&task=frmtinhhinhquanly&format=raw&thonto_id='+id+'&dot='+dot, beforeSend: function(){
defined('_JEXEC') or die('Restricted access'); $item = $this->item; ?> <div style="clear: both;"></div> <form id="KyluatFrm" name="KyluatFrm" method="post" class="form-horizontal" enctype="multipart/form-data" action="index.php"> <div style="float:left;width:800px;"> <div class="control-group"> <label class="control-label" for="kyluat_hinhthuc_id">Hình thức (<span style="color:red;">*</span>)</label> <div class="controls"> <input type="hidden" id="kyluat_hinhthuc" name="kyluat[hinhthuc]" value="<?php echo $item['hinhthuc']; ?> " /> <?php echo ThontoHelper::selectBoxAndAttr($item['hinhthuc_id'], array('id' => 'kyluat_hinhthuc_id', 'name' => 'kyluat[hinhthuc_id]'), 'thonto_hinhthuckhenthuongkyluat', array('id', 'ten'), array("loai = 1 AND trangthai = 1")); ?> </div> </div> </div> <div style="clear: both;"></div> <div style="float:left;width:400px;"> <div class="control-group"> <label class="control-label" for="kyluat_ngayquyetdinh">Ngày ký quyết định (<span style="color:red;">*</span>)</label> <div class="controls"> <div class="row-fluid input-append"> <input type="text" id="kyluat_ngayquyetdinh" name="kyluat[ngayquyetdinh]" class="input-small date-picker input-mask-date" data-date-format="dd/mm/yyyy" value="<?php echo $item['ngayquyetdinh']; ?> " />
public function selectBox($value, $attrs, $table, $colums, $where = null, $order = null) { if (count($colums) >= 2) { if (isset($table) && is_array($table)) { $rows = $table; } else { $rows = ThontoHelper::collect($table, $colums, $where); } if (is_array($attrs)) { $controlName = $attrs['name']; if ($controlName) { $controlAttrs = " ng-model=\"" . $controlName . "\""; } unset($attrs['name']); unset($attrs['value']); foreach ($attrs as $key => $val) { if (is_array($val)) { $controlAttrs .= " " . $key . '="' . implode(" ", $val) . '"'; } else { $controlAttrs .= " " . $key . '="' . $val . '"'; } } } else { $controlAttrs = $attrs; } if (isset($attrs['hasEmpty']) && $attrs['hasEmpty'] == true) { $option = array("{$colums['0']}" => '', "{$colums['1']}" => ''); array_unshift($rows, $option); } return JHTML::_('select.genericlist', $rows, $controlName, $controlAttrs, $colums[0], $colums[1], $value); } return ''; }
<label class="control-label" for="hoso_add_dadaotaonghiepvu">Đã đào tạo nghiệp vụ (<span style="color:red;">*</span>)</label> <div class="controls"> <select id="hoso_add_dadaotaonghiepvu" name="hoso_add[dadaotaonghiepvu]"> <option value=""></option> <option value="0">Không</option> <option value="1">Có</option> </select> </div> </div> </div> <div style="float:left;width:400px;"> <div class="control-group"> <label class="control-label" for="hoso_add_loaibaohiemyte_id">Loại bảo hiểm y tế (<span style="color:red;">*</span>)</label> <div class="controls"> <?php echo ThontoHelper::selectBoxAndAttr('', array('id' => 'hoso_add_loaibaohiemyte_id', 'name' => 'hoso_add[loaibaohiemyte_id]'), 'thonto_loaibaohiemyte', array('id', 'ten'), array('trangthai = 1')); ?> </div> </div> </div> <div style="float:left;width:400px;display:none;" class="hoso_add_kiemnhiem"> <div class="control-group"> <label class="control-label" for="hoso_add_congtac_chucvu_kiemnhiem">Chức danh phường xã kiêm nhiệm</label> <div class="controls"> <input type="hidden" id="hoso_add_congtac_chucvu_kiemnhiem_id" name="hoso_add[congtac_chucvu_kiemnhiem_id]" value="" /> <input type="text" id="hoso_add_congtac_chucvu_kiemnhiem" name="hoso_add[congtac_chucvu_kiemnhiem]" value="" /> </div> </div> </div> <div style="float:left;width:400px;"> <div class="control-group">
static function checkFiles($file) { jimport('joomla.filesystem.file'); $params =& JComponentHelper::getParams('com_hoso'); $type = $params->get('typefile', 'txt,doc,jpg,jpeg,png,gif,xls,ppt'); $arrtype = explode(",", $type); $file['name'] = JFile::makeSafe($file['name']); if (!$file['name']) { $msg = 'Error. Unsupported Media Type!'; JFactory::getApplication()->enqueueMessage($msg, 'error'); return false; } $allowedExtensions = $arrtype; $convert_file = ThontoHelper::strtolower_utf8($file['name']); if (!in_array(end(explode(".", $convert_file)), $allowedExtensions)) { /** Alternatively you may use chaining */ JFactory::getApplication()->enqueueMessage('Tập tin không đúng định dạng:' . $file['name'], 'error'); JLog::add('Tập tin không đúng định dạng:' . $file['name'], JLog::WARNING, 'com_helloworld'); return false; } return true; }
if (data == true){ $.unblockUI(); // window.location.href ='index.php?option=com_thonto&controller=tinhhinhhoatdong&task=default&dot='+dot; _initViewDetailPage(id); loadNoticeBoardSuccess('Thông báo', 'Xử lý thành công.'); } else loadNoticeBoardError('Thông báo', 'Có lỗi xảy ra, vui lòng liên hệ quản trị viên!'); } }); } }); $('#btn_add_kiennghi').on('click', function(){ var xhtml = '<tr class="ye">'; xhtml+= '<td style="vertical-align: middle; text-align: center;">'; xhtml+= '<?php echo ThontoHelper::selectBoxAndAttr('', array('name' => 'kiennghi_id[]'), 'thonto_danhmuckiennghi', array('id', 'ten'), '', 'ten asc'); ?> '; xhtml+= '</td>'; xhtml+= '<td style="vertical-align: middle; text-align: center;">'; xhtml+= '<input type="text" name="soluongkiennghi[]" style="width:72px;text-align:right;" value="" />'; xhtml+= '</td>'; xhtml+= '<td style="vertical-align: middle; text-align: center;">'; xhtml+= '<input type="text" name="dagiaiquyet_thonto[]" style="width:72px;text-align:right;" value="" />'; xhtml+= '</td>'; xhtml+= '<td style="vertical-align: middle; text-align: center;">'; xhtml+= '<input type="text" name="dagiaiquyet_phuongxa[]" style="width:72px;text-align:right;" value="" />'; xhtml+= '</td>'; xhtml+= '<td style="vertical-align: middle; text-align: center;">'; xhtml+= '<input type="text" name="dagiaiquyet_quanhuyentrolen[]" style="width:72px;text-align:right;" value="" />'; xhtml+= '</td>';