function config_mod($mnb, $option) { $rm = msql_read('users', $_SESSION['modsnod'], $mnb); //module $mod = $rm['module']; $bloc = $rm['block']; $param = $rm['param']; if (strpos($param, ',')) { $param = str_replace(', ', ",\n", $param); $param = ereg_replace("[\n]{2,}", "\n", $param); } $arb = msql_read('system', 'admin_modules', $mod); //props $type = $arb['category']; $prm = $arb['param']; $opt = $arb['option']; $com = $arb['command']; $com = str_replace('scroll', 'scroll scrold', $com); $arc = msql_read('lang', 'admin_modules', $mod); $fhlp = $arc['description']; if (strpos(prma('blocks'), $mod) !== false && $mod) { $type = "div"; $fhlp = $fhlp ? $fhlp : nms(90); $prm = 3; $arb["title"] = 1; } elseif (!$type && $mod != 'system') { $type = 'user_mod'; $fhlp = 'obsolete'; } elseif ($mod == 'Page_titles') { $fhlp .= ' ' . hlpbt('breadcrumb'); } if ($bloc == 'menus') { $type = 'menu_link'; $fhlp = 'menu link'; } if ($arc['help']) { $phlp = admhlp('grey', ajx($mod), 'help') . ' '; } if ($arc['option']) { $ohlp = admhlp('grey', ajx($mod), 'option') . ' '; } if ($arc['command']) { $dhlp = admhlp('grey', ajx($mod), 'command') . ' '; } //usage $rc = array('module' => bal('strong', $mod) . ' (' . $type . ') ' . $mnb, 'usage' => divc('small', $fhlp)); if ($_SESSION['line'][$param]) { $rc["article"] = lkt('', htac('section') . $param, $param); } elseif ($prm == 2) { //wait_ID if (!is_numeric($param)) { $id = find_id($param); } else { $id = $param; } if (is_numeric($id) && $param > 3) { list($dy, $frm, $suj, $amg) = pecho_arts($id); //art $rc["article"] = lkt('', '/?read=' . $id, $suj); } } $l = 'modules_' . $bloc . '_' . $mnb; $rid = randid(); $rds = array('mb', 'mm', 'mp', 'mt', 'mc', 'md', 'mo', 'mh', 'mv', 'me', 'mr', 'mi', 'mj'); foreach ($rds as $k => $v) { $rvs[$v] = $v . $rid; $dvs .= $v . $rid . '|'; } //$dvs.=; $sty = '" onkeypress="checkEnter(event,\'savmod\')'; $form .= hidden('', $rvs['mm'], $mod); //edit if ($mod == "submenus") { require_once 'spe.php'; $rc["edit"] = menus_h($mnb); if ($option) { $param = menu_h_g($option); } } if ($mod == "Banner") { $rc["edit"] = lkc("popbt", '/admin/banner', 'edit_banner'); } elseif ($mod == "user_menu") { $rc["edit"] = jump_btns($rvs['mp'], spelinks(), ' '); } elseif ($mod == "app_menu") { $rc["edit"] = btn('console', 'button/type/process/param/option/condition/root/icon/hide/private§display[,]'); } elseif ($mod == 'link' or $mod == "url") { $arr = explode('|', spelinks()); if ($_SESSION['line']) { $arr += array_flip($_SESSION['line']); } $rc["edit"] = select(array('id' => 'mps', 'onchange' => 'jumpslct(\'' . $rvs['mp'] . '\',this)', 'style' => "width:90px;"), $arr, 'vv'); } elseif ($mod == 'template') { $ra = msql_read('', ses('qb') . '_template', '', 1); if ($ra) { $rb = array_keys_r($ra, 1, 'k'); $rc["edit"] = jump_btns($rvs['mp'], $rb, ''); } } elseif ($mod == 'msql_links') { $rc["edit"] = jump_btns($rvs['mp'], 'links|rssurl|deploy', ''); } elseif ($mod == 'connector') { req('art'); $rc["edit"] = conn_edit(); $rc["edit"] .= txarea('txtarea', $param, 50, 5, 'txtnoir" onkeyup="transvalue(\'' . $rvs['mp'] . '\')" onclick="transvalue(\'' . $rvs['mp'] . '\')"; onblur="transvalue(\'' . $rvs['mp'] . '\');'); } elseif ($mod == 'desktop') { $rc["edit"] = hlpbt('desklr'); } elseif ($mod == 'cssfonts') { $rc["edit"] = jump_btns($rvs['mp'], 'fontphilum|fontmicrosys|', ' '); } elseif ($mod == 'columns') { $rc["edit"] = mod_edit('', 1, $rvs['mp']); } elseif ($mod == 'articles') { $rc["edit"] = divd('amc', artmod_edit_l($rvs['mp'], '', '')); } elseif ($mod == "design" && prmb(5)) { $rc["edit"] = picto(alert) . helps('prmb5'); } //param if ($mod == 'tab_mods' or $mod == 'MenusJ' or $mod == 'art_mod') { $rc["param"] = comline($param, $rvs['mp']); } elseif ($mod == 'app_menu') { $rc["param"] = appmenu($param, $rvs['mp']); } elseif ($mod == "submenus") { $rc["param"] = txarea($rvs['mp'], $param, 42, 4); } elseif ($prm != '0') { $rc["param"] = goodarea($param, $rvs['mp'], '', $j, 42); } else { $form .= hidden('', $rvs['mp'], ''); } if ($mod == 'desktop') { $rc["edit"] = $phlp; $rc["param"] .= ' ' . hlpbt('desklr'); } elseif ($rc["param"] && $mod != 'apps' && $phlp) { $rc["param"] .= ' ' . $phlp; } //title if ($prm != '1' && !$arb["title"]) { $rc["title"] = input(1, $rvs['mt'] . '" size="42' . $sty, $rm['title'], ""); } else { $form .= hidden('', $rvs['mt'], ''); } //bloc if ($bloc != 'system' && $bloc != 'newsletter' && $bloc != 'gsm') { $rc["bloc"] = select_j($rvs['mb'], 'system ' . prma('blocks'), $bloc, 1, $bloc, 0); } else { $form .= hidden('', $rvs['mb'], $bloc); } //condition if ($bloc != 'newsletter') { $rc["condition"] = select_j($rvs['mc'], '- home cat art', $rm['condition'], 3, $rm['condition'], 0) . ' ' . hlpbt('mod_cond'); } else { $form .= hidden('', $rvs['mc'], ''); } //command if ($com) { $rc["command"] = select_j($rvs['md'], '- ' . ajx($com), $rm['command'], 1, $rm['command'], 0) . ' ' . $dhlp; } else { $form .= hidden('', $rvs['md'], ''); } //option if ($opt != '0') { $rc["option"] = select_j($rvs['mo'], '-|' . $opt, $rm['option'], 3, $rm['option'], 0) . ' '; if ($mod == 'LOAD') { $rc["option"] .= hlpbt('art_render'); } else { $rc['option'] .= $ohlp; } } else { $form .= hidden('', $rvs['mo'], ''); } //template if ($arb["template"]) { $ara = msql_read('', ses('qb') . '_template', '', 1); if ($ara) { $tmp = implode(' ', array_keys($ara)); } $rc["template"] = select_j($rvs['me'], '- ' . ajx($tmp), $rm['template'], 1, $rm['template'], 0); } else { $form .= hidden('', $rvs['me'], ''); } //cache if ($arb["cacheable"]) { $rc["cache"] = checkbox_j($rvs['mh'], $rm['cache'], ''); } else { $form .= hidden('', $rvs['mh'], ''); } $rc["hide"] = checkbox_j($rvs['mv'], $rm['hide'], ''); //hide if ($arb["nobr"] != '0') { $rc["nobr"] = checkbox_j($rvs['mr'], $rm['nobr'], ''); } else { $form .= hidden('', $rvs['mr'], ''); } if ($arb["div"] != '0') { $rc["div"] = checkbox_j($rvs['mi'], $rm['div'], ''); } else { $form .= hidden('', $rvs['mi'], ''); } if ($arb["ajax button"] != '0') { $rc["ajax button"] = checkbox_j($rvs['mj'], $rm['js'], ''); } else { $form .= hidden('', $rvs['mj'], ''); } //script if ($type != 'system') { $oks = lj('popbt', 'popup_modsee__3_' . $mnb . '_1', 'script') . hlpbt('comline') . ' '; $oks .= lj('popbt', 'popup_modsee__3_' . $mnb, nms(65)) . ' '; } //if($mod=='LOAD')$rc["edit"]=fast_sets('load'); //render $bt .= ljb("popdel", "SaveR", $l . '_del\',\'' . $dvs, nms(43)) . ' '; $bt .= ljb('popbt', "SaveR", $l . '_new\',\'' . $dvs, nms(44)) . ' '; $bt .= ljb('popbt', "SaveR", $l . '_savb\',\'' . $dvs, nms(66)) . ' '; $bt .= ljb('popsav', "SaveR", $l . '_sav\',\'' . $dvs, nms(57)) . ' '; //master_config $ret .= '<form id="savmod" action="javascript:SaveR(\'' . $l . '_sav\',\'' . $dvs . '\')">' . $form; $ret .= on2cols($rc, 470, 5); $ret .= '</form>'; $ret .= divs('', $bt . $oks); return $ret; }
function mbd_book($cnn) { req('adminx'); $ret .= btn('txtcadr', 'param [,]'); $ret .= divd('amc', artmod_edit_l('cnv', '', '')); $ret .= assistant('cnv', 'insert_conn', 'book', '', 'title/1/book'); $ret .= br() . helps('book'); return $ret; }