function plug_pictos($d, $id) { $rid = 'bld' . randid(); $ret = lj('popbt', $rid . '_plug___pictos_pictos*refresh', picto('reload')) . ' '; $ret .= hlpbt('pictos') . ' ' . msqlink('system', 'program_pictos') . br(); $r = msql_read('system', 'program_pictos', '', 1); foreach ($r as $k => $v) { list($p, $c) = split(':', $v); if ($c == 'icon') { $ico = icon($p, $k); } elseif (is_numeric($c)) { $ico = icosys($p, $c); } elseif ($c == 'svg') { $ico = svg($p); } else { $ico = ''; } $edit = lj('popbt', 'popup_plug___pictos_pictos*edit_' . $k, $k) . ' '; $rb[] = div('', picto($k, 24) . ' ' . $edit . btd('ico' . $k, $ico)); } $ret .= onxcols($rb, 4, 680); return divd($rid, $ret); }
function icons_read() { $id = randid(); $r = msql_read('system', 'program_icons', ''); if ($r) { unset($r['_menus_']); } ksort($r); if ($r) { foreach ($r as $k => $v) { $im = pictosys($k) . ' '; //icons_graphics($v,16,16,'../imgb/icons/system/philum/16/'.$k.'.png'); $ret[] = lj('popbt', 'popup_plup___icons_icons*edit_' . $k, $im . $k) . br(); } } return onxcols($ret, '5', '550'); }
function colonize($re, $prm, $id, $cls, $w = '', $b = '') { $b = $b ? 'div' : 'ul'; $w = $w ? $w : currentwidth() - 10; $ret = onxcols($re, $prm, $w); $wb = atd($id) . atc($cls) . ats('width:100%;'); //-($prm*5) return balb($b, $wb, $ret) . divc("clear", ""); }
function make_tabs($r, $ud = '', $c = '') { if (!$r) { return; } static $i; $i++; $id = 'tab' . $ud . '-' . $i; $ra = array_keys($r); $ib = $_SESSION['tbmd' . $id]; if (!$ib) { $ib = 1; } $sp = btn('txtac', ' '); foreach ($r as $k => $v) { $b++; $dsp = $b == $ib ? 'block' : 'none'; $cs = $b == $ib ? 'txtaa' : 'txtab'; $menu .= ljb($cs, 'toggle_tab', $id . '\',\'' . $b, $k) . $sp; if (is_array($v)) { $v = divc('list', onxcols($v, 3, '')); } //implode(' ',$v); if ($v) { $divs .= div(atd('div' . $id . $b) . ats('display:' . $dsp) . atc($c), $v); } } return divb('|mnuab' . $id . '|margin-bottom:4px;', $menu) . $divs; }