$act_alt = _ACTIVE; } else { $act_img = 'unchecked.gif'; $act_alt = _INACTIVE; } echo '<tr' . $bgcolor . '> <td align="center"><strong>' . $mid . '</strong></td> <td align="left" style="width:100%;">' . $title . '</td> <td align="center">' . $mlanguage . '</td> <td align="center" style="white-space:nowrap;">' . $mview . '</td> <td align="center"><a href="' . URL::admin('&status=' . $mid) . '"><img src="images/' . $act_img . '" alt="' . $act_alt . '" title="' . $act_alt . '" /></a></td> <td align="right" style="white-space:nowrap;"><a href="' . URL::admin('&edit=' . $mid) . '">' . _EDIT . '</a> / <a href="' . URL::admin('&del=' . $mid) . '">' . _DELETE . '</a> </td></tr>'; } echo '</table><br />'; CloseTable(); echo '<br />'; OpenTable(); echo '<div style="text-align:center;" class="option">' . _ADDMSG . '</div><br /> <form name="message" action="' . URL::admin('messages&save=0') . '" method="post" enctype="multipart/form-data" accept-charset="utf-8">' . '<strong>' . _MESSAGETITLE . '</strong><br />' . '<input type="text" name="title" value="" size="50" maxlength="100" /><br /><br />' . '<strong>' . _MESSAGECONTENT . '</strong><br />' . bbcode_table('content', 'message', 1) . '<div style="float:left;"> <textarea name="content" rows="15" wrap="virtual" cols="63" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);"></textarea></div> <div style="float: left; margin-left: 5px">' . smilies_table('inline', 'content', 'message') . '</div><br /><br />'; if ($MAIN_CFG['global']['multilingual']) { echo '<strong>' . _LANGUAGE . '</strong> ' . lang_selectbox($MAIN_CFG['global']['language'], 'language') . '<br /><br />'; } else { echo '<input type="hidden" name="language" value="" />'; } echo '<strong>' . _EXPIRATION . '</strong> ' . select_box('expire', 0, array(86400 => '1 ' . _DAY, 172800 => '2 ' . _DAYS, 432000 => '5 ' . _DAYS, 1296000 => '15 ' . _DAYS, 2592000 => '30 ' . _DAYS, 0 => _UNLIMITED)) . '<br /><br />' . '<strong>' . _ACTIVATE2 . '</strong> ' . yesno_option('active', 1) . '<br /><br /><strong>' . _VIEWPRIV . '</strong> ' . group_selectbox('view', 0, true) . '<br /><br /><input type="submit" value="' . _ADDMSG . '" /></form>'; } } CloseTable();
$lid = isset($_GET['id']) ? intval($_GET['id']) : ''; $mode = $_GET['editlnk']; if ($mode == 'mod') { $result = $db->sql_query('SELECT title, inmenu AS active, cat_id FROM ' . $prefix . '_modules WHERE mid=' . $lid); } elseif ($mode == 'link') { $result = $db->sql_query('SELECT * FROM ' . $prefix . '_modules_links WHERE lid=' . $lid); } if ($mode != 'new' && $db->sql_numrows($result) > 0 || $mode == 'new') { $link = $mode == 'new' ? array('cat_id' => 0, 'view' => 0) : $db->sql_fetchrow($result); $array = array('0' => '[' . _NONE . ']'); $cats = $db->sql_query("SELECT cid, name FROM " . $prefix . "_modules_cat ORDER BY name"); while ($cat = $db->sql_fetchrow($cats)) { $array["{$cat['cid']}"] = defined($cat['name']) ? constant($cat['name']) : $cat['name']; } cpg_mm_admin_header($mode != 'new' ? 'Edit Link' : _CPG_MMADDLINK); $cpgmm_edit = array('EDITLINK' => true, 'EDITCAT' => false, 'LNK' => $_GET['editlnk'], 'MOD' => $_GET['editlnk'] == 'mod', 'NEW' => $_GET['editlnk'] == 'new', 'LID' => $lid, 'S_CATEGORY' => _CATEGORY, 'S_ACTIVE' => _ACTIVE, 'S_SUBMIT_VALUE' => $mode != 'new' ? _SAVECHANGES : _CPG_MMADDLINK, 'SEL_CAT' => select_box('lnkcat', $link['cat_id'], $array), 'SEL_ACTIVE' => yesno_option('lnkactive', $mode != 'new' ? $link['active'] : 1)); if ($_GET['editlnk'] != 'mod') { $cpgmm_edit += array('S_URL' => _URL, 'S_VIEWPRIV' => _VIEWPRIV, 'SEL_GROUP' => group_selectbox('lnkview', $link['view'], true), 'S_TITLE_VALUE' => $mode != 'new' ? htmlprepare($link['title']) : '', 'S_LINK_VALUE' => $mode != 'new' ? $link['link'] : '', 'SEL_LINK' => select_box('lnktype', $mode != 'new' ? $link['link_type'] : 0, array(0 => 'getlink', 1 => 'link', 2 => 'web'))); } if ($_GET['editlnk'] != 'new') { $cpgmm_edit += array('S_LINK_TITLE' => $link['title']); } $cpgtpl->assign_vars($cpgmm_edit); $cpgtpl->set_handle('body', 'admin/cpgmm_edit.html'); $cpgtpl->display('body'); } else { cpg_error(_CPG_MMNOLINK); } } elseif (isset($_GET['savelnk'])) { $mode = $_GET['savelnk']; if ($_POST['lnktitle'] == '' && $mode != 'mod') {
} else { $pagetitle .= ' ' . _BC_DELIM . ' Languages' . (isset($_GET['cfg']) ? ' ' . _BC_DELIM . ' ' . _TB_CONFIG : ''); require_once 'header.php'; GraphicAdmin('_AMENU1'); OpenTable(); if (isset($_GET['cfg'])) { echo '<span class="genmed"><strong>Dragonfly Language Pack Management</strong></span><br /> <a href="' . URL::admin() . '">Language Packs</a> | <strong>' . _TB_CONFIG . '</strong> | <a href="' . URL::admin('&upd=all') . '">' . sprintf(_UPGRADE, _ALL . ' ' . _LanguagesLANG) . '</a> <br /><br /> <form action="' . URL::admin() . '" method="post" enctype="multipart/form-data" accept-charset="utf-8"> <table border="0" width="40%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <td class="row1"><span class="genmed">' . _ACTMULTILINGUAL . '</span></td> <td class="row2">' . yesno_option('multilingual', $MAIN_CFG['global']['multilingual']) . '</td> </tr><tr> <td class="row1"><span class="genmed">' . _ACTUSEFLAGS . '</span></td> <td class="row2">' . yesno_option('useflags', $MAIN_CFG['global']['useflags']) . '</td> </tr><tr> <td align="center" class="catbottom" colspan="2"><input class="mainoption" type="submit" name="save_cfg" value="' . _SAVECHANGES . '" /></td> </tr> </table></form>'; } else { $langs = array(); $dir = dir('language'); while ($file = $dir->read()) { if (is_dir('language/' . $file) && strlen($file) > 3) { $langs[$file][] = $file; } } $dir->close(); echo '<span class="genmed"><strong>Dragonfly Language Pack Management</strong></span><br /> <strong>Language Packs</strong> | <a href="' . URL::admin('&cfg') . '">' . _TB_CONFIG . '</a> | <a href="' . URL::admin('&upd=all') . '">' . sprintf(_UPGRADE, _ALL . ' ' . _LanguagesLANG) . '</a><br /><br />
global $pagetitle, $SESS; if ($MAIN_CFG['global']['maintenance'] && !is_admin() || isset($_GET['hideallblocks'])) { $showblocks = 0; } $pagetitle .= _ADMINMENU; if (!is_admin()) { list($the_first) = $db->sql_count($prefix . '_admins'); if ($the_first < 1) { if (!isset($_POST['name'])) { require 'header.php'; OpenTable(); echo open_form($adminindex, false, _NOADMINYET) . ' <label class="set" for="name">' . _NICKNAME . '</label><input class="set" type="text" name="name" id="name" size="30" maxlength="25" /><br /> <label class="set" for="email">' . _EMAIL . '</label><input class="set" type="text" name="email" id="email" size="30" maxlength="255" /><br /> <label class="set" for="password">' . _PASSWORD . '</label><input class="set" type="password" name="pwd" id="pwd" size="20" maxlength="40" /><br /> <label class="set" for="user_new">' . _CREATEUSERDATA . '</label>' . yesno_option('user_new', 1) . '<br /> <input type="hidden" name="fop" value="create_first" /> <div style="text-align:center;"><input type="submit" class="sub" value="' . _SUBMIT . '" /></div>' . close_form(); CloseTable(); require 'footer.php'; } else { if (isset($_POST['fop']) && $_POST['fop'] == 'create_first') { if (preg_match('#^[0-9]#', $_POST['pwd']) && preg_match('#[a-z]#', $_POST['pwd']) && preg_match('#[A-Z]#', $_POST['pwd'])) { $name = Fix_Quotes($_POST['name']); $email = Fix_Quotes($_POST['email']); $pwd = md5($_POST['pwd']); $db->sql_query("INSERT INTO " . $prefix . "_admins (aid, email, pwd, radminsuper) VALUES ('{$name}', '{$email}', '{$pwd}', '1')"); if ($_POST['user_new'] == 1) { $db->sql_query('INSERT INTO ' . $user_prefix . "_users (user_id, username, user_email, user_avatar, user_regdate, user_password, theme, commentmax, user_level, user_lang, user_dateformat)\n\t\t\t\t\tVALUES (DEFAULT,'{$name}','{$email}','" . $MAIN_CFG['avatar']['default'] . "','" . time() . "','{$pwd}','{$MAIN_CFG['global']['Default_Theme']}','4096', '2', 'english','D M d, Y g:i a')"); } login();
$ignore = array('banners.php', 'error.php', 'header.php', 'footer.php', 'install.php'); $filesa = $filesi = array(); $dir = dir(BASEDIR); while ($file = $dir->read()) { if (is_file(BASEDIR . $file) && preg_match('#\\.php$#', $file) && !in_array($file, $ignore)) { if ($file != 'index.php') { $filesa[] = $file; } $filesi[] = $file; } } $dir->close(); natcasesort($filesa); natcasesort($filesi); array_unshift($filesi, '[none]'); $avail_settings = array(array('L_TITLE' => 'Full debugging', 'L_TOOLTIP' => '', 'B_INPUT' => false, 'S_TYPE' => yesno_option('config_debug', NEXOS_DEBUG)), array('L_TITLE' => 'Index file</span><br /><i>If you change this into something else then index.php or [none]<br/>then you must modify LEO in .htaccess</i>', 'L_TOOLTIP' => '', 'B_INPUT' => false, 'S_TYPE' => select_option('config_index', $mainindex, $filesi)), array('L_TITLE' => 'Admin file', 'L_TOOLTIP' => '', 'B_INPUT' => false, 'S_TYPE' => select_option('config_admin', $adminindex, $filesa))); } else { if ($section == 12) { $p3p_header = !empty($MAIN_CFG['header']['P3P']) ? $MAIN_CFG['header']['P3P'] : $MAIN_CFG['header']['P3P_default']; foreach ($P3P_CP as $policy => $data) { $bg = !empty($bg) ? '' : ' style="background-color: ' . $bgcolor2 . ';"'; // echo '<td colspan="2"><span class="genmed" style="background-color: '.$bgcolor4."; font-weight: bold;\">$data</span></td>\n"; //echo "<tr$bg>\n"; if (is_int($policy)) { /*$pos = 0;*/ $p3p_sect = $policy; $avail_settings[] = array('L_TITLE' => $data, 'L_TOOLTIP' => ' style="background-color: ' . $bgcolor4 . '; font-weight: bold;"', 'B_INPUT' => false, 'S_TYPE' => ''); } else { $def_option = ''; if (preg_match('/(' . $policy . '[aio|\\s]{0,1})/', $p3p_header, $match)) { $def_option = trim($match[1]);
function ma_formfield($type, $field, $size, $userinfo) { global $MAIN_CFG, $CPG_SESS, $l10n_dst_regions, $l10n_gmt_regions; if ($type == 0) { return '<input type="text" name="' . ($field == 'name' ? 'realname' : $field) . '" value="' . htmlprepare($userinfo[$field]) . '" class="post" style="width: 200px" size="25" maxlength="' . $size . '" />'; } else { if ($type == 1) { return yesno_option($field, is_user() ? $userinfo[$field] : $size); } else { if ($type == 2) { return '<textarea name="' . $field . '" style="width: 300px" rows="6" cols="30" class="post">' . htmlprepare($userinfo[$field]) . '</textarea>'; } else { if ($type == 3) { $ret = select_box($field, $userinfo[$field], $l10n_gmt_regions); if ($field == 'user_timezone') { $ret .= '<br /><select name="user_dst">'; foreach ($l10n_dst_regions as $region => $data) { $sel = $userinfo['user_dst'] == $region ? 'selected="selected"' : ''; $ret .= "<option value=\"{$region}\" {$sel}>{$data['0']}</option>\n"; } $ret .= '</select>'; } return $ret; } else { if ($type == 4) { return '<input type="text" name="' . $field . '" value="' . htmlprepare(is_user() ? $userinfo[$field] : '') . '" class="post" style="width: 100px" size="15" maxlength="' . $size . '" />'; } else { if ($type == 5) { return select_box($field, is_user() ? $userinfo[$field] : 'm', array('m' => _MALE, 'f' => _FEMALE)); } else { if ($type == 6) { return '<input type="text" name="' . $field . '" value="' . (is_user() ? date_short($userinfo[$field]) : '') . '" class="post" style="width: 100px" size="15" maxlength="10" /> 10/24/1980'; } else { if ($type == 7) { $themelist = array(); $handle = opendir('themes'); while ($file = readdir($handle)) { if (false === strpos($file, '.') && $file != 'CVS' && file_exists("themes/{$file}/theme.php")) { $themelist[] = "{$file}"; } } closedir($handle); natcasesort($themelist); return select_option($field, is_user() && !empty($userinfo['theme']) && is_dir('themes/' . $userinfo['theme']) ? $userinfo['theme'] : $CPG_SESS['theme'], $themelist); } else { if ($type == 8) { if ($field == 'user_lang') { return lang_selectbox($userinfo['user_lang'], $field, false); } return ''; } } } } } } } } } return ''; }
if ($mode == 'avatar') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'avatar', 'S_AV_ALLOW_LOCAL' => yesno_option('allow_local', $MAIN_CFG['avatar']['allow_local']), 'S_AV_ALLOW_REMOTE' => yesno_option('allow_remote', $MAIN_CFG['avatar']['allow_remote']), 'S_AV_ALLOW_UPLOAD' => yesno_option('allow_upload', $MAIN_CFG['avatar']['allow_upload']), 'S_AV_ALLOW_ANIMATED' => yesno_option('animated', $MAIN_CFG['avatar']['animated']), 'S_AV_MAX_FILESIZE' => $MAIN_CFG['avatar']['filesize'], 'S_AV_MAX_HEIGHT' => $MAIN_CFG['avatar']['max_height'], 'S_AV_MAX_WIDTH' => $MAIN_CFG['avatar']['max_width'], 'S_AV_STORAGE_PATH' => $MAIN_CFG['avatar']['path'], 'S_AV_GALLERY_PATH' => $MAIN_CFG['avatar']['gallery_path'], 'S_AV_DEFAULT' => $MAIN_CFG['avatar']['default'])); } else { if ($mode == 'fields') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'fields')); $section = 0; $result = $db->sql_query("SELECT * FROM " . $user_prefix . "_users_fields ORDER BY section"); while ($row = $db->sql_fetchrow($result)) { $options = array(0 => _MA_HIDDEN, 1 => _MA_VISIBLE); if ($row['type'] != 1 && $row['type'] != 3) { $options[2] = _MA_REQUIRED; } $cpgtpl->assign_block_vars('section', array('S_SECTION' => $row['section'], 'S_PROFILE' => $row['section'] == 1 && !$section, 'S_ADDITIONAL' => $row['section'] == 2 && $section !== 2, 'S_PRIVATE' => $row['section'] == 3 && $section !== 3, 'S_PREFERENCES' => $row['section'] == 5 && $section !== 5, 'S_INFO' => defined($row['langdef']) ? constant($row['langdef']) : $row['langdef'], 'S_SELECT' => select_box($row['field'], $row['visible'], $options), 'U_DELFIELD' => URL::admin('users_cfg&delfield=' . $row['field']))); $section = (int) $row['section']; } $db->sql_freeresult($result); } else { if ($mode == 'addfield') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'add_field')); } else { if ($mode == 'mlist') { //$db->sql_ufetchrow('SELECT * FROM '); } else { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'member', 'S_ADMIN_HELP' => 1 == $MAIN_CFG['global']['admin_help'], 'S_HEADLINES_TIP' => show_tooltip('my_headlines'), 'S_HEADLINES_CFG' => yesno_option('my_headlines', $MAIN_CFG['member']['my_headlines'], 3), 'S_USER_NEWS_TIP' => show_tooltip('user_news'), 'S_USER_NEWS_CFG' => yesno_option('user_news', $MAIN_CFG['member']['user_news']), 'S_THEME_TIP' => show_tooltip('allowusertheme'), 'S_THEME_CFG' => yesno_option('allowusertheme', $MAIN_CFG['member']['allowusertheme']), 'S_MAILCHANGE_TIP' => show_tooltip('allowmailchange'), 'S_MAILCHANGE_CFG' => yesno_option('allowmailchange', $MAIN_CFG['member']['allowmailchange']), 'S_MINPASS_TIP' => show_tooltip('minpass'), 'S_MINPASS_CFG' => select_option('minpass', $MAIN_CFG['member']['minpass'], array('3', '5', '8', '10')), 'S_USERREG_TIP' => show_tooltip('allowuserreg'), 'S_USERREG_CFG' => yesno_option('allowuserreg', $MAIN_CFG['member']['allowuserreg']), 'S_USER_ACTIVATE_TIP' => show_tooltip('useactivate'), 'S_USER_ACTIVATE_CFG' => yesno_option('useactivate', $MAIN_CFG['member']['useactivate']), 'S_REQUIRE_ADMIN_TIP' => show_tooltip('requireadmin'), 'S_REQUIRE_ADMIN_CFG' => yesno_option('requireadmin', $MAIN_CFG['member']['requireadmin']), 'S_SENDMAIL_TIP' => show_tooltip('sendaddmail'), 'S_SENDMAIL_CFG' => yesno_option('sendaddmail', $MAIN_CFG['member']['sendaddmail']), 'S_SHOW_REGMSG_TIP' => show_tooltip('show_registermsg'), 'S_SHOW_REGMSG_CFG' => yesno_option('show_registermsg', $MAIN_CFG['member']['show_registermsg']), 'S_REGMSG_CFG' => $MAIN_CFG['member']['registermsg'], 'S_WELCOME_PM_TIP' => show_tooltip('send_welcomepm'), 'S_WELCOME_PM_CFG' => yesno_option('send_welcomepm', $MAIN_CFG['member']['send_welcomepm']), 'S_WELCOME_MSG_BB' => bbcode_table('welcomepm_msg', 'config', 1), 'S_WELCOME_MSG_CFG' => $MAIN_CFG['member']['welcomepm_msg'])); } } } } $cpgtpl->set_handle('body', 'admin/users/index.html'); $cpgtpl->display('body'); CloseTable();
</table>'); } if ($blog_private && $blog_author != $userinfo['username']) { cpg_error('<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> <tr><td class="row1" colspan="2" align="center" height="30">' . _B_PRIVATE . '</td></tr> </table>'); } echo '<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> <tr><td class="row1" colspan="2"><a href="' . getlink() . '">' . _MAIN . '</a> | <a href="' . getlink('&mode=user&nick=' . $userinfo['username']) . '">' . _B_MYBLOG . '</a> | <a href="' . getlink('&mode=add') . '">' . _B_CREATE_TITLE . '</a></td></tr> <form name="edit_entry" action="' . getlink() . '" method="post" enctype="multipart/form-data" accept-charset="utf-8"> <tr><td class="row1"><span class="gen">' . _TITLE . '</span></td> <td class="row2"><input type="text" value="' . $blog_title . '" size="50" maxlength="80" name="title" /></td></tr> <tr><td class="row1"><span class="gen">' . _B_CREATE_TEXT . '</span></td> <td class="row2">' . bbcode_table('bodytext', 'edit_entry', 1) . '<textarea name="bodytext" wrap="virtual" cols="70" rows="15">' . $blog_text . '</textarea>' . smilies_table('onerow', 'bodytext', 'edit_entry') . '</td></tr> <tr><td class="row1"><span class="gen">' . _B_CREATE_PRIVATE . '</span></td> <td class="row1"><span class="gen">' . yesno_option('private', $blog_private) . '</td></tr> <tr><td class="catbottom" colspan="2" align="center" height="28"> <input type="hidden" name="blog_id" value="' . $blog_id . '" /> <input type="submit" name="revise_entry" class="mainoption" value="' . _SAVECHANGES . '" /> <input type="reset" value="' . _RESET . '" name="reset" class="liteoption" /> </td></tr></table></form>'; } elseif ($mode == 'display') { $disp_id = intval($_GET['id']); require_once 'header.php'; $result = $db->sql_query("SELECT * FROM " . $prefix . "_blogs WHERE id='{$disp_id}'"); if ($db->sql_numrows($result) < 1) { cpg_error('<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> <tr><td class="row1" colspan="2" align="center" height="30">' . sprintf(_ERROR_NONE_TO_DISPLAY, strtolower(_B_TITLE)) . '</td></tr> </table>'); } list($blog_id, $blog_author, $blog_title, $blog_text, $blog_private, $blog_timestamp) = $db->sql_fetchrow($result); $db->sql_freeresult($result);
function BlocksEdit($bid) { global $prefix, $db, $MAIN_CFG, $pagetitle, $cpgtpl; $pagetitle .= ' ' . _BC_DELIM . ' ' . _EDITBLOCK; require 'header.php'; GraphicAdmin('_AMENU1'); list($title, $bkey, $content, $url, $bposition, $weight, $active, $refresh, $blanguage, $blockfile, $view) = $db->sql_ufetchrow("SELECT title, bkey, content, url, bposition, weight, active, refresh, blanguage, blockfile, view FROM " . $prefix . "_blocks WHERE bid='" . $bid . "'", SQL_NUM); $typebb = $typerss = $typefile = false; $blocks_edit_vars = array('S_NAME' => $title, 'S_BID' => $bid, 'S_WEIGHT' => $weight, 'S_NAME_DEF' => (defined($title) ? constant($title) : str_replace('_', ' ', $title)) . ":", 'U_BLOCKS' => URL::admin('blocks'), 'MULTILANG' => $MAIN_CFG['global']['multilingual'], 'BPOSITION' => $bposition, 'SEL_POSITION' => select_box('bposition', $bposition, array('l' => _LEFT, 'c' => _CENTERUP, 'd' => _CENTERDOWN, 'r' => _RIGHT)), 'SEL_ACTIVATE' => yesno_option('active', $active), 'SEL_GROUP' => group_selectbox('view', $view, true), 'S_VIEW_COMMENT' => 'Default ' . _ACTIVE); if ($MAIN_CFG['global']['multilingual']) { $blocks_edit_vars += array('SEL_LANG' => lang_selectbox($blanguage, 'blanguage')); } switch ($bkey) { case 'file': $typefile = true; $blocksdir = dir('blocks'); while ($func = $blocksdir->read()) { if (substr($func, 0, 6) == 'block-') { $bl = str_replace('_', ' ', substr($func, 6, -4)); $blockslist[$func] = $bl; } } closedir($blocksdir->handle); ksort($blockslist); $blocks_edit_vars += array('S_BLOCK_OP' => select_box('blockfile', $blockfile, $blockslist), 'S_BLOCK_INFO' => _FILEINCLUDE); break; case 'rss': $typerss = true; $blocks_edit_vars += array('S_BLOCK_OP' => $url, 'SEL_REFRESH' => select_box('refresh', $refresh, array('1800' => '1/2 ' . _HOUR, '3600' => '1 ' . _HOUR, '18000' => '5 ' . _HOURS, '36000' => '10 ' . _HOURS, '86400' => '24 ' . _HOURS))); break; case 'admin': case 'custom': $typebb = true; $blocks_edit_vars += array('S_BLOCK_OP' => bbcode_table('content', 'blocksedit', 1), 'S_BLOCK_INFO' => $content); break; default: break; } $blocks_list = blocks_list(); foreach ($blocks_list as $module => $data) { $cpgtpl->assign_block_vars($data['mid'] == -1 ? 'admin' : (is_active($module) ? 'active' : 'inactive'), array('S_MOD_VALUE' => $data['mid'], 'S_MOD_TITLE' => defined($data['title']) ? constant($data['title']) : $data['title'], 'S_MOD_SELECTED' => isset($data[$bid]) ? ' selected="selected"' : '')); } $blocks_edit_vars += array('TYPEFILE' => $typefile, 'TYPERSS' => $typerss, 'TYPEBB' => $typebb); $cpgtpl->assign_vars($blocks_edit_vars); $cpgtpl->set_handle('body', 'admin/blocks_edit.html'); $cpgtpl->display('body'); }
function editcomm() { global $userinfo, $pagetitle, $Blocks; $block = array('bid' => 10000, 'view' => 1, 'side' => 'l', 'title' => _TB_BLOCK, 'content' => member_block()); $Blocks->custom($block); $block = NULL; $pagetitle .= ' ' . _BC_DELIM . ' ' . _COMMENTSCONFIG; require_once 'header.php'; $cpgtpl->assign_vars(array('U_SAVECOMM' => URL::index('&op=savecomm'), 'S_UMODE' => select_box('umode', $userinfo['umode'], array('nocomments' => _NOCOMMENTS, 'nested' => _NESTED, 'flat' => _FLAT, 'thread' => _THREAD)), 'S_UORDER' => select_box('uorder', $userinfo['uorder'], array('0' => _OLDEST, '1' => _NEWEST, '2' => _HIGHEST)), 'S_THOLD' => select_box('thold', $userinfo['thold'], array('-1' => _UNCUT, '0' => _EVERYTHING, '1' => _FILTERMOSTANON, '2' => _USCORE . ' +2', '3' => _USCORE . ' +3', '4' => _USCORE . ' +4', '5' => _USCORE . ' +5')), 'S_NOSCORE' => yesno_option('noscore', $userinfo['noscore']), 'S_COMMENTMAX' => $userinfo['commentmax'])); $cpgtpl->set_handle('body', 'your_account/edit_comm.html'); $cpgtpl->display('body'); }
if (class_exists($title)) { $editmodule = new $title(); } } require 'header.php'; GraphicAdmin('_AMENU1'); OpenTable(); $a = $title == $MAIN_CFG['global']['main_module'] ? ' - (' . _INHOME . ')' : ''; echo open_form(URL::admin('modules'), '', $title . $a) . '<label class="ulog" for="custom_title">' . _CUSTOMTITLE . '</label> <input type="text" name="custom_title" id="custom_title" value="' . $custom_title . '" size="30" maxlength="255" /><br />'; if ($title == $MAIN_CFG['global']['main_module']) { echo '<input type="hidden" name="view" value="0" />'; } else { echo '<label class="ulog" for="view">' . _VIEWPRIV . '</label>' . group_selectbox('view', $view) . '<br />'; } echo '<label class="ulog" for="inmenu">' . _SHOWINMENU . '</label>' . yesno_option('inmenu', $inmenu) . '<br /> <label class="ulog" for="blocks">' . _BLOCKS . '</label>' . select_box('blocks', $blocks, array('0' => _NONE, '1' => _LEFT, '2' => _RIGHT, '3' => _BOTH)) . '<br /><br /> <input type="hidden" name="save" value="' . $mid . '" /> <input type="submit" value="' . _SAVECHANGES . '" />' . close_form(); if (isset($editmodule)) { if ($version != $editmodule->version) { $version .= ' <a href="' . URL::admin('&upgrade=' . $mid) . '">' . sprintf(_UPGRADE, $editmodule->version) . '</a>'; } $dbsize = 0; $backup = ''; if (isset($editmodule->dbtables) && !empty($editmodule->dbtables)) { if (0 === strpos(SQL_LAYER, 'mysql')) { if ($result = $db->sql_query("SHOW TABLE STATUS FROM {$dbname}", true)) { while ($table = $db->sql_fetchrow($result)) { if (in_array(substr($table['Name'], strlen($prefix) + 1), $editmodule->dbtables) && (isset($table['Type']) && $table['Type'] != 'MRG_MyISAM' || isset($table['Engine']) && $table['Engine'] != "MRG_MyISAM")) { $dbsize += $table['Data_length'] + $table['Index_length'];