예제 #1
0
     if (strtoupper($charset) != 'UTF-8') {
         showsetting('jswizard_charset', 'parameter[jscharset]', $parameter['jscharset'], 'radio');
     } else {
         showsetting('jswizard_charsetr', array('parameter[jscharset]', array(array(0, $lang['none']), array(1, 'GBK'), array(2, 'BIG5'))), intval($parameter['jscharset']), 'mradio');
     }
     showtype('', 'bottom');
     echo $editext . '<br /><center><input class="button" type="submit" name="jssubmit" value="' . $lang['jswizard_preview'] . '">&nbsp; &nbsp;<input class="button" type="button" onclick="this.form.preview.value=0;this.form.jssubmit.click()" value="' . $lang['submit'] . '"><input name="preview" type="hidden" value="1"></center></form><br />';
     /* Images == End == */
 } elseif ($type == 'custom') {
     /* Custom == Start == */
     if ($jssubmit && $function == 'custom') {
         $jsurl = $jssetting ? $jssetting : "function={$function}" . "&jscharset={$parameter['jscharset']}" . ($parameter['cachelife'] != '' ? "&cachelife={$parameter['cachelife']}" : '') . (!empty($parameter['jstemplate']) ? '&jstemplate=' . rawurlencode($parameter['jstemplate']) : '');
         $jsurlview = "{$jsurl}&nocache=yes";
         $jsurlview = "{$boardurl}api/javascript.php?{$jsurlview}&verify=" . md5($authkey . $jsurlview);
         if (!$preview) {
             jssavesetting(-1);
         }
         $jsurl = "{$boardurl}api/javascript.php?{$jsurl}&verify=" . md5($authkey . $jsurl);
         $jspreview = "<textarea rows=\"3\" style=\"width: 100%; word-break: break-all\" onMouseOver=\"this.focus()\" onFocus=\"this.select()\">" . dhtmlspecialchars("<script language=\"JavaScript\" src=\"{$boardurl}api/javascript.php?key=" . rawurlencode($jskey) . "\"></script>") . "</textarea><br /><div class=\"jswizard\"><script language=\"JavaScript\" src=\"{$jsurlview}\"></script></div><br />";
     }
     if ($jspreview) {
         showtype('preview', 'top');
         echo '<tr><td class="altbg1">' . $jspreview;
         showtype('', 'bottom');
         echo '<br />';
     }
     echo '<form method="post" action="admincp.php?action=jswizard&function=custom#' . $lang['jswizard_custom'] . '">';
     showtype('jswizard_jstemplate', 'top');
     echo '<tr><td class="altbg1" colspan="2">' . $lang['jswizard_custom_jstemplate_comment'] . '<br />';
     echo '<img src="images/admincp/zoomin.gif" onmouseover="this.style.cursor=\'pointer\'" onclick="zoomtextarea(\'jstemplate\', 1)"> <img src="images/admincp/zoomout.gif" onmouseover="this.style.cursor=\'pointer\'" onclick="zoomtextarea(\'jstemplate\', 0)"><br />';
     jsinsertunit();
예제 #2
0
                     $modulearray[$displayordernew[$key]] = $key;
                 } else {
                     $modulearray[] = $key;
                 }
             }
         }
         ksort($modulearray);
         $sidedata = unserialize($db->result_first("SELECT value FROM {$tablepre}request WHERE variable='{$sidekey}'"));
         $parameter = array('selectmodule' => $modulearray, 'cachelife' => intval($cachelifenew), 'jstemplate' => $modulearray ? '[module]' . implode('[/module]<hr class="shadowline"/>[module]', $modulearray) . '[/module]' : '');
         $jsurl = 'function=side&jscharset=' . ($cachelifenew != '' ? "&cachelife={$cachelifenew}" : '') . (!empty($parameter['jstemplate']) ? '&jstemplate=' . rawurlencode($parameter['jstemplate']) : '');
         $comment = $sidedata['comment'];
         $infosidestatus[$sideid] = $jskey = $sidekey;
         $edit = $sidedata ? $jskey : '';
         $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('infosidestatus', '" . addslashes(serialize($infosidestatus)) . "')");
         updatecache('settings');
         jssavesetting(-2);
     } else {
         $infosidestatus[$sideid] = '';
         $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('infosidestatus', '" . addslashes(serialize($infosidestatus)) . "')");
         updatecache('settings');
         cpmsg('jswizard_succeed', $BASESCRIPT . '?action=jswizard&operation=infoside&sideid=' . $sideid . '&from=' . $from, 'succeed');
     }
 }
 if ($from == 'style') {
     shownav('style', 'settings_styles');
     showsubmenu('settings_styles', array(array('settings_styles_global', 'settings&operation=styles&anchor=global', 0), array('settings_styles_index', 'settings&operation=styles&anchor=index', 0), array('settings_styles_forumdisplay', 'settings&operation=styles&anchor=forumdisplay', 0), array('settings_styles_viewthread', 'settings&operation=styles&anchor=viewthread', 0), array('settings_styles_member', 'settings&operation=styles&anchor=member', 0), array('settings_styles_customnav', 'misc&operation=customnav', 0), $infosidemenu, array('settings_styles_refresh', 'settings&operation=styles&anchor=refresh', 0), array('settings_styles_sitemessage', 'settings&operation=styles&anchor=sitemessage', 0)));
 } else {
     shownav('tools', 'nav_javascript');
     showsubmenu('nav_javascript', array(array('config', 'jswizard&operation=config', 0), $infosidemenu, array('admin', 'jswizard' . ($keyp ? '&openkeypre=' . $keypre : ''), 0), array(array('menu' => 'jswizard_addmodule', 'submenu' => $addmenu), '', 0), array('jswizard_module', 'jswizard&type=module', 0), array('import', 'jswizard&operation=import', 0)));
 }
 if (!isset($sideid)) {