Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 124 |
|
0.00% |
0 / 8 |
CRAP | |
0.00% |
0 / 1 |
| iaHeader | |
0.00% |
0 / 124 |
|
0.00% |
0 / 8 |
1560 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| set_include_head | |
0.00% |
0 / 14 |
|
0.00% |
0 / 1 |
12 | |||
| html_head_add | |
0.00% |
0 / 14 |
|
0.00% |
0 / 1 |
110 | |||
| html_head_get | |
0.00% |
0 / 33 |
|
0.00% |
0 / 1 |
42 | |||
| html_head_echo | |
0.00% |
0 / 53 |
|
0.00% |
0 / 1 |
210 | |||
| put_dir | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| debug_show_all_headers | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| logoutForce | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php /** @noinspection PhpMissingFieldTypeInspection */ |
| 2 | /** @noinspection HtmlUnknownTarget */ |
| 3 | /* |
| 4 | mas comunes agregar a 'ia' |
| 5 | */ |
| 6 | |
| 7 | class iaHeader { |
| 8 | public $con_iajqjs=false; // bandera interna quitar js vienen en iajq.js |
| 9 | public $iajqjs="iautil.js iaJqueryInit.js jquery.addanother.js jquery.blockUI.js autoNumeric.js jquery.metadata.js jstorage.js jquery.scrollTo-min.js jquery.tmpl.1.1.1.js iaColor.js"; |
| 10 | |
| 11 | |
| 12 | public $header_array=Array(); |
| 13 | |
| 14 | private $need_set=array('meta','css','plugin','js','script'); //,'onload' |
| 15 | |
| 16 | private $need = array ( |
| 17 | 'meta' => array( 'meta' => array('nocache','ie9compatible','charset') ) |
| 18 | |
| 19 | ,'jquery' => array( 'js'=> array('jquery.js','fckeditor.js') ) |
| 20 | |
| 21 | ,'jquery-ui' => array( 'css'=> array('jquery-ui.css'),'js'=>array('jquery.js','jquery-ui.js') ) |
| 22 | ,'jquery-ui.css' => array( 'css'=> array('jquery-ui.css') ) |
| 23 | |
| 24 | ,'ia' => array('css'=>array('iastyles.min.css', 'icofont.min.css'),'js'=>array('fckeditor.js', 'iautil.js','iaJqueryInit.js', 'iaColor.js','app_iacase.js','autoNumeric.js','details-shim.js', 'printThis.js')) // 'iajq.js', |
| 25 | // cosas de jquery |
| 26 | // ,'jqgrid' => array( 'css'=> array('jquery-ui.css','jquery.uix.multiselect.css','jqgrid.css')//'ui.multiselect.css' |
| 27 | // ,'js'=>array('jquery.js','jquery-ui.js','jstorage.js','localisation.js','grid.locale','jqgrid.no_legacy_api','jquery.tmpl.1.1.1.js','jquery.blockUI.js','jquery.uix.multiselect.js','jquery.scrollTo-min.js','jqGrid.js')//'ui.multiselect.js' |
| 28 | // ) |
| 29 | //novo |
| 30 | /* |
| 31 | Grid5.0.1.css |
| 32 | <link rel="stylesheet" type="text/css" media="screen" href="./jqGrid/plugins/ui.multiselect.css"/> |
| 33 | <link rel="stylesheet" type="text/css" media="screen" href="./jqGrid/css/ui.jqgrid.css"/> |
| 34 | Grid5.0.1.js |
| 35 | <script type="text/ecmascript" src="./jqGrid/plugins/ui.multiselect.js"></script> |
| 36 | <script type="text/ecmascript" src="./jqGrid/js/i18n/grid.locale-en.js"></script> |
| 37 | <script type="text/ecmascript" src="./jqGrid/js/i18n/grid.locale-es.js"></script> |
| 38 | <script type="text/ecmascript" src="./jqGrid/js/jquery.jqGrid.js"></script> |
| 39 | <script type="text/ecmascript" src="/tst/iacJqGrid.js" defer="defer"></script> |
| 40 | |
| 41 | */ |
| 42 | ,'jqgrid' => array( |
| 43 | 'css'=> array('jquery-ui.css','jquery.uix.multiselect.css','Grid5.0.1.css') |
| 44 | ,'js'=>array('jquery.js','jquery-ui.js', |
| 45 | 'jstorage.js','localisation.js', |
| 46 | //'grid.locale', |
| 47 | 'jqgrid.no_legacy_api', |
| 48 | 'jquery.tmpl.1.1.1.js', |
| 49 | 'jquery.blockUI.js', |
| 50 | 'jquery.uix.multiselect.js', |
| 51 | //'jquery.scrollTo-min.js', |
| 52 | 'Grid5.0.1.js') |
| 53 | ) |
| 54 | |
| 55 | // table add rows |
| 56 | ,'table_addanother'=> array('js'=>array('jquery.js','jquery.addanother.js')) |
| 57 | // dialogs |
| 58 | ,'dialogs'=>array( 'css'=> array('jquery-ui.css'),'js'=>array('jquery.js','jquery-ui.js','framedialog.js') ) |
| 59 | // formate numeros |
| 60 | ,'auotNumeric'=> array('css'=>array('iastyles.min.css'),'js'=>array('jquery.js','autoNumeric.js') ) |
| 61 | // storage |
| 62 | ,'jstorage'=> array('js'=>array('jquery.js','jstorage.js')) |
| 63 | // jeego context menu |
| 64 | ,'jeegoocontext' => array( 'css'=>array('jeegoocontext.css'), 'js' => array('jquery.js','jquery.livequery.js','jquery.jeegoocontext.js')) |
| 65 | |
| 66 | // form validation 'jquery.validate.js','additional-methods.js','jquery.ui.datepicker.validation.js' |
| 67 | ,'jquery.validate'=>array('js'=>array('jquery.js','jquery.validate.js','additional-methods.js','jquery.validate.locale')) |
| 68 | |
| 69 | // dates |
| 70 | ,'datepicker' => array( 'css'=> array('jquery-ui.css'),'js'=>array('jquery.js','jquery-ui.js') ) |
| 71 | ,'daterangepicker' => array( 'css'=> array('jquery-ui.css','ui.daterangepicker.css'),'js'=>array('jquery.js','jquery-ui.js','daterangepicker.jQuery.js') ) |
| 72 | ,'datetimepicker' => array( 'css'=> array('jquery-ui.css','jquery-ui-timepicker-addon.css'),'js'=>array('jquery.js','jquery-ui.js','jquery-ui-timepicker-addon.js') ) |
| 73 | ,'mobiscroll' => array( 'css'=>array('mobiscroll.css'),'js'=>array('jquery.js','mobiscroll.js') ) // ete fue modifcado |
| 74 | // selects |
| 75 | ,'multiselect' => array( 'css'=> array('jquery-ui.css','jquery.uix.multiselect.css')//'ui.multiselect.css' |
| 76 | ,'js'=>array('jquery.js','jquery-ui.js','jquery.tmpl.1.1.1.js','localisation.js','jquery.scrollTo-min.js','jquery.uix.multiselect.js')//'ui.multiselect.js' |
| 77 | ) |
| 78 | ,'searchabledropdown' => array( 'js'=> array( 'jquery.js', 'jquery.searchabledropdown.js') ) |
| 79 | |
| 80 | // varios |
| 81 | ,'localisation' => array( 'js'=> array('jquery.js','localisation.js') ) |
| 82 | ,'jquery.tmpl.1.1.1.js' => array( 'js'=> array('jquery.tmpl.1.1.1.js') ) |
| 83 | ,'jquery.blockUI' => array( 'js'=> array('jquery.blockUI.js') ) |
| 84 | |
| 85 | // uloadoeres |
| 86 | ,'jquery.MultiFile' => array('js'=>array('jquery.form.js','jquery.metadata.js','jquery.MultiFile.js','jquery.blockUI.js' )) |
| 87 | // table sort/filter |
| 88 | ,'table' => array('css'=>array('iastyles.min.css'),'js'=>array('table.js')) |
| 89 | |
| 90 | // fgmenu |
| 91 | ,'fgmenu' => array('css'=>array('fg.menu.css'),'js'=>array('jquery.js','fg.menu.js')) |
| 92 | , 'estado_filter' => array('js'=>array('estado_filter')) |
| 93 | , 'cambia_estado' => array('js'=>array('cambia_estado')) |
| 94 | // theme switcher |
| 95 | ,'themeswitchertool' => array( 'js'=>array('themeswithertool.js' ) ) |
| 96 | ,'jfontsize.js' => array( 'js'=> array('jquery.js','jfontsize.js'), 'css'=>array('iastyles.min.css') ) |
| 97 | // editor |
| 98 | ,'fckeditor' => array('js'=>array('fckeditor.js') ) |
| 99 | |
| 100 | ,'highlightor' => array('js'=>array('highlightor.js') ) |
| 101 | |
| 102 | |
| 103 | ); |
| 104 | private $include_head = array(); |
| 105 | |
| 106 | public function __construct() { |
| 107 | $this->set_include_head(); |
| 108 | } |
| 109 | private function set_include_head() { |
| 110 | global $gIApath,$gWebDir,$jQueryUIStyle,$toolBarColor,$vx_debug,$verJS; //CAMBIA_01 SESSION/COPIAPROGRAMA |
| 111 | if(!isset($gIApath['uitheme_cookiename'])) $gIApath['uitheme_cookiename']='uitheme'; |
| 112 | |
| 113 | $mini = $vx_debug ? "" : "min."; |
| 114 | //$dummy = time(); |
| 115 | |
| 116 | |
| 117 | $this->include_head = [ |
| 118 | 'nocache'=>'' |
| 119 | ,'ie9compatible'=>'<meta http-equiv="X-UA-Compatible" content="IE=9"/>' |
| 120 | ,'charset'=>'' |
| 121 | ,'icofont.min.css'=>' <link rel="stylesheet" type="text/css" href="/css/icofont/icofont.min.css">' |
| 122 | ,'iastyles.min.css'=>'<link href="/css/iastyles.css?'.$verJS.'" rel="stylesheet" type="text/css"/>'."<style>div.iactoolbar{background-color:$toolBarColor!important; background:$toolBarColor!important}</style>" |
| 123 | |
| 124 | ,'ia.js'=>'<script src="/js/ia.js"></script>' |
| 125 | // ,'iajq.js'=>'<script src="/js/iajq.min.js" ></script>' |
| 126 | ,'iautil.js'=>'<script src="/js/iautil.js?'.$verJS.'"></script>' |
| 127 | ,'printThis.js'=>'<script src="/js/printThis.js"></script>' |
| 128 | ,'iaJqueryInit.js'=>'<script src="/js/iaJqueryInit.js?'.$verJS.'"></script>' |
| 129 | ,'iaColor.js'=>'<script src="/js/iaColor20220902.'.$mini.'js?'.$verJS.'"></script>' |
| 130 | ,'app_iacase.js'=>'<script charset="UTF-8" src="/js/app_iacase.js?'.$verJS.'"></script>' |
| 131 | //,'jquery.js'=>'<script src="/js/jquery-2.1.4.min.js"></script>' |
| 132 | //,'jquery.js'=>'<script src="/js/jquery-2.2.0.min.js"></script>' |
| 133 | //,'jquery.js'=>'<script src="/js/jquery-3.0.0.min.js"></script><script src="/js/jquery-migrate-3.0.0.min.js"></script>' |
| 134 | //,'jquery.js'=>'<script src="/js/jquery-3.1.0.min.js"></script><script src="/js/jquery-migrate-3.0.0.min.js"></script>' |
| 135 | //,'jquery.js'=>'<script src="/js/jquery-3.1.1.min.js"></script><script src="/js/jquery-migrate-3.0.0.min.js"></script>' |
| 136 | //,'jquery.js'=>'<script src="/js/jquery-3.1.1.min.js"></script><script src="/js/jquery-migrate-3.0.0.js"></script>' |
| 137 | //,'jquery.js'=>'<script src="/js/jquery-3.1.1.min.js"></script>' |
| 138 | //,,'jquery.js'=>'<script src="/js/jquery-3.3.1.min.js"></script>' |
| 139 | //,'jquery.js'=>'<script src="/js/jquery-3.3.1.min.js"></script>'//<script src="/js/jquery-migrate-3.0.0.js"></script>' // jquery-migrate-3.0.0.min.js jquery-migrate-1.4.1.min.js super ultimo: jquery-migrate-git.js |
| 140 | ,'jquery.js'=>'<script src="/js/jquery-3.6.4.min.js"></script>'//<script src="/js/jquery-migrate-3.0.0 |
| 141 | //.js"></script>' // jquery-migrate-3.0.0.min.js jquery-migrate-1.4.1.min.js super ultimo: jquery-migrate-git.js |
| 142 | // .'<script>jQuery(function() { jQuery.migrateMute=false; });</script>' |
| 143 | |
| 144 | ,'details-shim.js'=>'<script src="/js/details-shim.min.js"></script>' |
| 145 | |
| 146 | //,'jquery-ui.css'=>'<link href="/css/'.$jQueryUIStyle.'/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css"/>' |
| 147 | //,'jquery-ui.js'=>'<script src="/js/jquery-ui-1.10.3.min.js"></script>' |
| 148 | |
| 149 | //,'jquery-ui.css'=>'<link href="/css/'.$jQueryUIStyle.'/jquery-ui.min.css" rel="stylesheet" type="text/css"/> <link href="/css/'.$jQueryUIStyle.'/theme.css" rel="stylesheet" type="text/css"/>' |
| 150 | //,'jquery-ui.js'=>'<script src="/js/jquery-ui.1.11.4.min.js"></script>' |
| 151 | //,'jquery-ui.js'=>'<script src="/js/jquery-ui.1.12.1.min.js"></script>' |
| 152 | // ,'jquery-ui.css'=>'<link href="/js/jquery-ui-1.12.1.redmond/jquery-ui.min.css" rel="stylesheet" type="text/css"/>' |
| 153 | |
| 154 | ,'jquery-ui.css'=>'<link href="/jquery-ui-themes/themes/'.$jQueryUIStyle.'/jquery-ui.min.css" rel="stylesheet" type="text/css"/> |
| 155 | <link href="/css/jquery-ui-1.12.icon-font.min.css" rel="stylesheet" type="text/css"/>' |
| 156 | |
| 157 | ,'jquery-ui.js'=>'<script>var $ = $ || {};$.uiBackCompat=true;</script><script src="/js/jquery-ui-1.13.2.redmond/jquery-ui.min.js"></script>' . |
| 158 | " |
| 159 | <script>jQuery(function(){ |
| 160 | // catch y da algo rasonable TypeError: Cannot read properties of undefined (reading left) at st._findPos |
| 161 | \$.datepicker._findPos = function( obj ) { |
| 162 | try { |
| 163 | var position, |
| 164 | inst = this._getInst( obj ), |
| 165 | isRTL = this._get( inst, 'isRTL' ); |
| 166 | |
| 167 | while ( obj && ( obj.type === 'hidden' || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) { |
| 168 | obj = obj[ isRTL ? 'previousSibling' : 'nextSibling' ]; |
| 169 | } |
| 170 | |
| 171 | position = \$( obj ).offset(); |
| 172 | return [ position.left ?? 100, position.top ?? 100 ]; |
| 173 | }catch(err) { |
| 174 | console.log('\$.datepicker._findPos', err); |
| 175 | console.log(' suponinedo position = 100,100 para', obj); |
| 176 | //return [100, 100]; |
| 177 | } |
| 178 | }; |
| 179 | }); |
| 180 | </script>" |
| 181 | |
| 182 | ,'framedialog.js'=>'<script src="/js/jquery-framedialog-1.1.2_loadingImage.js"></script>' |
| 183 | |
| 184 | ,'fg.menu.js'=>'<script src="/js/fg.menu.js"></script>' |
| 185 | ,'estado_filter'=>'<script src="/js/estado_filter.js"></script>' |
| 186 | ,'cambia_estado'=>'<script src="/js/cambia_estado.js"></script>' |
| 187 | ,'fg.menu.css'=>'<link href="/css/fg.menu.css" rel="stylesheet" type="text/css"/>' |
| 188 | |
| 189 | ,'jquery.tmpl.1.1.1.js'=>'<script src="/js/jquery.tmpl.1.1.1.js"></script>' |
| 190 | //,'jquery.blockUI.js'=> '<script src="/js/jquery.blockUI.2.55.min.js"></script>' |
| 191 | ,'jquery.blockUI.js'=> '<script src="/js/jquery.blockUI.2.70.js"></script>' |
| 192 | |
| 193 | ,'jqgrid.no_legacy_api'=>'' //<script>jQuery.jgrid.no_legacy_api = true;</script> |
| 194 | ,'jqgrid.css'=>'<link href="/css/ui.jqgrid.css" rel="stylesheet" type="text/css" media="screen"/>' |
| 195 | ,'grid.locale'=>'<script src="/js/i18n/grid.locale-en.js"></script>' |
| 196 | ,'jqGrid.js'=>'<script src="/js/jquery.jqGrid.4.6.0.min.js" defer="defer"></script>' |
| 197 | ,'jQGridState.js'=>'<script src="/js/jQGridState.js"></script>' |
| 198 | // <script type="text/ecmascript" src="/tst/jqGrid/plugins/ui.multiselect.js"></script> |
| 199 | //<link rel="stylesheet" type="text/css" media="screen" href="/tst/jqGrid/plugins/ui.multiselect.css"/> |
| 200 | ,'Grid5.0.1.css'=> |
| 201 | '<link rel="stylesheet" type="text/css" media="screen" href="/js/jqGrid5.8.5/css/ui.jqgrid.css"/>' |
| 202 | ,'Grid5.0.1.js'=> |
| 203 | '<script type="text/ecmascript" src="/js/jqGrid5.8.5/js/i18n/grid.locale-en.js"></script><script type="text/ecmascript" src="/js/jqGrid5.8.5/js/i18n/grid.locale-es.js"></script> |
| 204 | <script type="text/ecmascript" src="/js/jqGrid5.8.5/js/jquery.jqGrid.js"></script><script type="text/ecmascript" src="/js/iacJqGrid.js?'.$verJS.'" defer="defer"></script> |
| 205 | <script>$(document).ready(function () {$.jgrid.formatter = $.jgrid.regional["en"].formatter;});</script>' |
| 206 | /* |
| 207 | * |
| 208 | * <script type="text/ecmascript" src="/js/jqGrid/js/jquery.jqGrid.vitex.01042021.min.js"></script><script type="text/ecmascript" src="/js/iacJqGrid.js?'.$verJS.'" defer="defer"></script> |
| 209 | Grid5.0.1.css |
| 210 | <link rel="stylesheet" type="text/css" media="screen" href="./jqGrid/plugins/ui.multiselect.css"/> |
| 211 | <link rel="stylesheet" type="text/css" media="screen" href="./jqGrid/css/ui.jqgrid.css"/> |
| 212 | Grid5.0.1.js |
| 213 | <script type="text/ecmascript" src="./jqGrid/plugins/ui.multiselect.js"></script> |
| 214 | <script type="text/ecmascript" src="./jqGrid/js/i18n/grid.locale-en.js"></script> |
| 215 | <script type="text/ecmascript" src="./jqGrid/js/i18n/grid.locale-es.js"></script> |
| 216 | <script type="text/ecmascript" src="./jqGrid/js/jquery.jqGrid.js"></script> |
| 217 | <script type="text/ecmascript" src="/tst/iacJqGrid.js" defer="defer"></script> |
| 218 | |
| 219 | */ |
| 220 | ,'jquery.validate.js'=>'<script src="/js/jquery.validate.1.9.0.min.js"></script>' |
| 221 | ,'additional-methods.js'=>'<script src="/js/additional-methods.min.js"></script>' |
| 222 | ,'jquery.ui.datepicker.validation.js'=>'<script src="/js/jquery.ui.datepicker.validation.min.js"></script>' |
| 223 | ,'jquery.validate.locale'=>'<script src="/js/localization/messages_es.js"></script>' |
| 224 | ,'jquery-ui-timepicker-addon.js'=>'<script src="/js/jquery-ui-timepicker-addon.1.2.1.min.js"></script>' |
| 225 | ,'jquery-ui-timepicker-addon.css'=>'<link href="/css/jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css"/>' |
| 226 | ,'ui.daterangepicker.css' => '<link href="/css/ui.daterangepicker.css" rel="stylesheet" type="text/css"/>' |
| 227 | ,'daterangepicker.jQuery.js' => '<script src="/js/daterangepicker.jQuery.compressed.js"></script>' |
| 228 | |
| 229 | ,'mobiscroll.css' => '<link href="/css/mobiscroll-2.0.custom.min.css" rel="stylesheet" type="text/css"/>' |
| 230 | ,'mobiscroll.js'=>'<script src="/js/mobiscroll-2.0.custom.min.js"></script>' |
| 231 | |
| 232 | //,'ui.multiselect.css'=>'<link href="/css/ui.multiselect.css" rel="stylesheet" type="text/css" />' |
| 233 | //,'ui.multiselect.js'=>'<script src="/js/ui.multiselect.js"></script>' |
| 234 | |
| 235 | ,'jquery.uix.multiselect.css'=>'<link href="/css/jquery.uix.multiselect.css" rel="stylesheet" type="text/css"/>' |
| 236 | ,'jquery.uix.multiselect.js'=>'<script src="/js/jquery.uix.multiselect.vitex.js?'.$verJS.'"></script>' |
| 237 | |
| 238 | |
| 239 | ,'jquery.scrollTo-min.js'=>'<script src="/js/jquery.scrollTo-min.js"></script>' |
| 240 | |
| 241 | ,'jquery.searchabledropdown.js' => '<script src="/js/jquery.searchabledropdown-1.0.7.min.js" ></script>' |
| 242 | |
| 243 | ,'jeegoocontext.css'=>'<link href="/js/jeegoocontext/skins/cm_default/style.css" rel="Stylesheet" type="text/css"/>' |
| 244 | ,'jquery.livequery.js' => '<script src="/js/jquery.livequery.js"></script>' |
| 245 | ,'jquery.jeegoocontext.js' => '<script src="/js/jeegoocontext/jquery.jeegoocontext.min.js"></script>' |
| 246 | |
| 247 | ,'localisation.js'=>'<script src="/js/jquery.localize.min.js" ></script>' |
| 248 | |
| 249 | ,'jquery.MultiFile.js'=>'<script src="/js/jquery.MultiFile.1.48.min.js?'.$verJS.'"></script>' |
| 250 | |
| 251 | ,'jquery.form.js'=>'<script src="/js/jquery.form.3.26.min.js" ></script>' |
| 252 | ,'jstorage.js'=>'<script src="/js/jstorage.js" defer="defer"></script>' |
| 253 | ,'tableadd.js' => '<script src="/js/table.js"></script>' |
| 254 | |
| 255 | ,'jquery.metadata.js'=>'<SCRIPT src="/js/jquery.metadata.2.0.min.js"></SCRIPT>' |
| 256 | ,'autoNumeric.js'=>'<SCRIPT src="/js/autoNumeric.1.9.2.js"></SCRIPT>' |
| 257 | |
| 258 | ,'jquery.addanother.js'=>'<script src="/js/jquery.addanother.js" ></script>' |
| 259 | ,'table.js' => '<script src="/js/table.js"></script>' |
| 260 | |
| 261 | ,'themewsithertool.js'=>"<script src='http://jqueryui.com/themeroller/themeswitchertool/' type='text/javascript'></script> |
| 262 | <script>$(document).ready(function(){ $('#iathswitcher').themeswitcher({cookieName:'$gIApath[uitheme_cookiename]'}); });</script>" |
| 263 | |
| 264 | ,'jfontsize.js'=>'<script src="/js/jquery.jfontsize-1.0.js"></script>' |
| 265 | |
| 266 | ,'fckeditor.js'=> '<script src="/js/tinymce5/tinymce.min.js?'.''.'" defer="defer"></script><style>.mce-path {display: none !important;}</style><script>var iacBaseDir="'.$gWebDir.'";</script>' |
| 267 | ,'highlightor.js' => '<script src="/js/highlightor.js"></script>', |
| 268 | |
| 269 | ]; |
| 270 | } |
| 271 | |
| 272 | public function html_head_add($needed) { |
| 273 | $msg=''; |
| 274 | if(!is_array($needed)) |
| 275 | $needed = array($needed); |
| 276 | foreach($needed as $n) |
| 277 | if( array_key_exists($n, $this->need) ) { |
| 278 | foreach($this->need_set as $k) { |
| 279 | if( array_key_exists($k, $this->need[$n]) ) { |
| 280 | //echo "<br/><li>n=$n: k=$k : "; print_r($this->need[$n]); echo " da ".$this->need[$n][$k]; echo "</li><ul>"; |
| 281 | foreach($this->need[$n][$k] as $set) { |
| 282 | //echo "<li>$set"; |
| 283 | if($set=='iajq.js' || $set=='iajq.min.js') |
| 284 | $this->con_iajqjs=true; |
| 285 | $this->header_array[$k][$set]=1; |
| 286 | } |
| 287 | //echo "</ul>"; |
| 288 | } |
| 289 | } |
| 290 | } else { |
| 291 | $msg.="<li>$n"; |
| 292 | } |
| 293 | |
| 294 | |
| 295 | |
| 296 | if($msg!='') |
| 297 | echo "<div style='color:red'>iaHeader no encontre:<ul>$msg</ul></div>"; |
| 298 | } |
| 299 | |
| 300 | |
| 301 | public function html_head_get() { |
| 302 | global $vx_debug; |
| 303 | $mini = $vx_debug ? "js" : "min.js"; |
| 304 | $ret = ''; |
| 305 | if($this->header_array) |
| 306 | foreach($this->need_set as $set) |
| 307 | if(isset($this->header_array[$set]) ) |
| 308 | foreach($this->header_array[$set] as $k=>$p) |
| 309 | $ret .= "\r" . $this->put_dir( $this->include_head[$k] ); |
| 310 | |
| 311 | global $gIApath,$gWebDir; |
| 312 | global $verJS; |
| 313 | $ret .= <<<JSExtras |
| 314 | <script>var notificar_carta_porte = false;</script> |
| 315 | <link id="favicon" rel="icon" data-href='' href="../img/favicon.ico"/> |
| 316 | <link rel="stylesheet" href="$gIApath[WebPathJs]css2/font-lato.css" type="text/css" charset="utf-8" /> |
| 317 | <link href="/$gWebDir/fontawesome-pro-6.4.0-web/css/all.min.css" rel="stylesheet"> |
| 318 | <link href="$gIApath[WebPathJs]css2/jquery.countdown.css" rel="stylesheet" type="text/css"/> |
| 319 | <link href="$gIApath[WebPathJs]css2/selectize.css?$verJS" rel="stylesheet" type="text/css"/> |
| 320 | <link href="$gIApath[WebPathJs]css2/selectize.default.css?$verJS" rel="stylesheet" type="text/css"/> |
| 321 | <link href="$gIApath[WebPathJs]css2/jquery.tagify.css?$verJS" rel="stylesheet" type="text/css"/> |
| 322 | <link href="$gIApath[WebPathJs]js2/jQuery-Validation-Engine/css/validationEngine.jquery.css" rel="stylesheet" type="text/css"/> |
| 323 | <link href="$gIApath[WebPathJs]js2/clasificame/clasificame.css?$verJS" rel="stylesheet" type="text/css"/> |
| 324 | <link href="$gIApath[WebPathJs]js2/jqGridColsSorter/jqGridColsSorter.css?$verJS" rel="stylesheet" type="text/css"/> |
| 325 | |
| 326 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jqGridColsSorter/jqGridColsSorter.js?x=2.71727&$verJS"></script> |
| 327 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/clasificame/clasificame.js?$verJS"></script> |
| 328 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/widgets/iacParam.js?$verJS"></script> |
| 329 | <script charset="UTF-8" src="$gIApath[WebPathJs]cobranza/js/tipos.js?$verJS"></script> |
| 330 | <script charset="UTF-8" src="$gIApath[WebPathJs]cobranza/js/configuradordereportes.js?$verJS" defer="defer"></script> |
| 331 | <script charset="UTF-8" src="$gIApath[WebPathJs]cobranza/js/funciones.js?$verJS"></script> |
| 332 | <script charset="UTF-8" src="$gIApath[WebPathJs]js_ia/ia_dialog.js?$verJS"></script> |
| 333 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jquery.countdown.031221.js"></script> |
| 334 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jquery.countdown.031221-es.js"></script> |
| 335 | <script src="$gIApath[WebPathJs]js2/selectize.js?$verJS"></script> |
| 336 | <script src="$gIApath[WebPathJs]js2/jquery.hotkeys.js"></script> |
| 337 | <script src="$gIApath[WebPathJs]js2/hot_keys_handler.js?$verJS"></script> |
| 338 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jquery.tagify_dev.js?$verJS"></script> |
| 339 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jQuery-Validation-Engine/js/languages/jquery.validationEngine-en.js" ></script> |
| 340 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jQuery-Validation-Engine/js/languages/jquery.validationEngine-es.js" ></script> |
| 341 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jQuery-Validation-Engine/js/jquery.validationEngine.js?$verJS" ></script> |
| 342 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/js_libs/styleSheet/styleSheet.$mini?$verJS" ></script> |
| 343 | JSExtras; |
| 344 | |
| 345 | return $ret; |
| 346 | } |
| 347 | |
| 348 | public function html_head_echo($debug=false,$showWhereIsIt=true) { |
| 349 | global $vx_debug; |
| 350 | $mini = $vx_debug ? "js" : "min.js"; |
| 351 | |
| 352 | $user_id = $_SESSION['usuario_id'] ?? ''; |
| 353 | $user_name_session = $_SESSION['usuario'] ?? ''; |
| 354 | |
| 355 | if($this->con_iajqjs) |
| 356 | $quita=substr( preg_replace('/\s+/','|', $this->iajqjs ),0,-1); |
| 357 | else |
| 358 | $quita=null; |
| 359 | if($debug) { |
| 360 | echo "<ol>"; |
| 361 | echo "<li>con iajq.js=$this->con_iajqjs los modulos: ".$quita; |
| 362 | } |
| 363 | $match=array(); |
| 364 | if($this->header_array) |
| 365 | foreach($this->need_set as $set) |
| 366 | if(isset($this->header_array[$set]) ) |
| 367 | foreach($this->header_array[$set] as $k=>$p) { |
| 368 | if($debug) { |
| 369 | $dio= preg_match("/$quita/",$k,$match); |
| 370 | $s=" dio=$dio ".print_r($match,true)." ".sizeof($match); |
| 371 | echo "<li>$k =". $s . "</li>"; |
| 372 | } |
| 373 | if( !$this->con_iajqjs || preg_match("/$quita/",$k)==0 ) |
| 374 | if($debug) |
| 375 | echo "<li>".ia_htmlentities( $this->put_dir($this->include_head[$k]) ).( $showWhereIsIt ? " ($k , $set)" : ''); |
| 376 | else |
| 377 | echo "\r\n".$this->put_dir( $this->include_head[$k] ); |
| 378 | } |
| 379 | if($debug) |
| 380 | echo "</ol>"; |
| 381 | //VCA |
| 382 | global $gIApath, $gWebDir; |
| 383 | global $verJS; |
| 384 | $forzaLogout = $this->logoutForce(); |
| 385 | echo <<<JSExtras |
| 386 | <script>var notificar_carta_porte = false;</script> |
| 387 | <link id="favicon" rel="icon" data-href='' href="../img/favicon.ico"/> |
| 388 | <link rel="stylesheet" href="$gIApath[WebPathJs]css2/font-lato.css" type="text/css" charset="utf-8" /> |
| 389 | <link href="/$gWebDir/fontawesome-pro-6.4.0-web/css/all.min.css" rel="stylesheet"> |
| 390 | <link href="$gIApath[WebPathJs]css2/jquery.countdown.css" rel="stylesheet" type="text/css"/> |
| 391 | <link href="$gIApath[WebPathJs]css2/selectize.css?$verJS" rel="stylesheet" type="text/css"/> |
| 392 | <link href="$gIApath[WebPathJs]css2/selectize.default.css?$verJS" rel="stylesheet" type="text/css"/> |
| 393 | <link href="$gIApath[WebPathJs]css2/jquery.tagify.css?$verJS" rel="stylesheet" type="text/css"/> |
| 394 | <link href="$gIApath[WebPathJs]js2/jQuery-Validation-Engine/css/validationEngine.jquery.css" rel="stylesheet" type="text/css"/> |
| 395 | <link href="$gIApath[WebPathJs]js2/clasificame/clasificame.css?$verJS" rel="stylesheet" type="text/css"/> |
| 396 | <link href="$gIApath[WebPathJs]js2/jqGridColsSorter/jqGridColsSorter.css?$verJS" rel="stylesheet" type="text/css"/> |
| 397 | |
| 398 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jqGridColsSorter/jqGridColsSorter.js?x=2.71727&$verJS"></script> |
| 399 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/clasificame/clasificame.js?$verJS"></script> |
| 400 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/widgets/iacParam.js?$verJS"></script> |
| 401 | <script charset="UTF-8" src="$gIApath[WebPathJs]cobranza/js/tipos.js?$verJS"></script> |
| 402 | <script charset="UTF-8" src="$gIApath[WebPathJs]cobranza/js/configuradordereportes.js?$verJS" defer="defer"></script> |
| 403 | <script charset="UTF-8" src="$gIApath[WebPathJs]cobranza/js/funciones.js?$verJS"></script> |
| 404 | <script charset="UTF-8" src="$gIApath[WebPathJs]js_ia/ia_dialog.js?$verJS"></script> |
| 405 | <script>\$.noRequestAnimationFrame = true;</script> |
| 406 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jquery.countdown.031221.js"></script> |
| 407 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jquery.countdown.031221-es.js"></script> |
| 408 | |
| 409 | <script src="$gIApath[WebPathJs]js2/selectize.js?$verJS"></script> |
| 410 | <script src="$gIApath[WebPathJs]js2/jquery.hotkeys.js"></script> |
| 411 | <script src="$gIApath[WebPathJs]js2/hot_keys_handler.js?$verJS"></script> |
| 412 | <!--script charset="UTF-8" src="$gIApath[WebPathJs]js2/jquery.tagify.js?$verJS"></script--> |
| 413 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jquery.tagify_dev.js?$verJS"></script> |
| 414 | |
| 415 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jQuery-Validation-Engine/js/languages/jquery.validationEngine-en.js" ></script> |
| 416 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jQuery-Validation-Engine/js/languages/jquery.validationEngine-es.js" ></script> |
| 417 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/jQuery-Validation-Engine/js/jquery.validationEngine.js?$verJS" ></script> |
| 418 | <script charset="UTF-8" src="$gIApath[WebPathJs]js2/js_libs/styleSheet/styleSheet.$mini?$verJS" ></script> |
| 419 | <script charset="UTF-8" src="$gIApath[WebPathJs]js_ia/ia_dialog.js?$verJS" ></script> |
| 420 | <script > |
| 421 | const ia_user_id_session = '$user_id'; |
| 422 | const ia_username_session = '$user_name_session'; |
| 423 | </script> |
| 424 | <style>.blockOverlay { |
| 425 | z-index: 100005 !important; |
| 426 | }</style> |
| 427 | <script src="$gIApath[WebPathJs]/js2/jqGridNavigate.js?$verJS"></script> |
| 428 | $forzaLogout |
| 429 | JSExtras; |
| 430 | } |
| 431 | |
| 432 | private function put_dir($s) { |
| 433 | global $gIApath; |
| 434 | return str_replace( |
| 435 | array('src="/js' ,'href="/css' ,'src="/fckeditor' ,'href="/js') |
| 436 | ,array('src="'.$gIApath['WebPathJs'].'js2','href="'.$gIApath['WebPath'].'css2' ,'src="'.$gIApath['WebPathJs'].'fckeditor','href="'.$gIApath['WebPathJs'].'js2' ) |
| 437 | ,$s); |
| 438 | } |
| 439 | |
| 440 | public function debug_show_all_headers() { |
| 441 | echo "<h5>iaHeader: all headers</h5><ol>"; |
| 442 | foreach($this->need as $k => $n) |
| 443 | echo "<li>$k"; |
| 444 | echo "</ol>"; |
| 445 | } |
| 446 | |
| 447 | private function logoutForce() { |
| 448 | global $gWebDir; |
| 449 | |
| 450 | // $doc_r = (!empty($_SERVER['HTTPS'])) ? "https://$_SERVER[SERVER_NAME]:$_SERVER[SERVER_PORT]$_SERVER[REQUEST_URI]" : "http://$_SERVER[SERVER_NAME]:$_SERVER[SERVER_PORT]$_SERVER[REQUEST_URI]"; |
| 451 | |
| 452 | $path = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://')."$_SERVER[SERVER_NAME]:$_SERVER[SERVER_PORT]/$gWebDir/backoffice/index.php?dologout=1&forzado"; // bug server name es domain... |
| 453 | return "<script>setTimeout(function(){window.location='$path';}, 1000*60*60*8);</script>"; |
| 454 | } |
| 455 | |
| 456 | |
| 457 | } |
| 458 | |
| 459 | ?> |