if ($id == 2 and !in_array($item, $unregistered_useable) or _userHasNotRight($item)) {
                    continue;
                }
                $newdata[$item] = _checkboxLoad($item);
            }
        }
        // ulozeni
        $sql = '';
        $last = sizeof($newdata) - 1;
        $counter = 0;
        foreach ($newdata as $col => $val) {
            $sql .= '`' . $col . '`=\'' . $val . '\'';
            if ($counter !== $last) {
                $sql .= ',';
            }
            ++$counter;
        }
        DB::query('UPDATE `' . _mysql_prefix . '-groups` SET ' . $sql . ' WHERE id=' . $id);
        // reload stranky
        define('_redirect_to', 'index.php?p=users-editgroup&id=' . $id . '&saved');
        return;
    }
    /* ---  vystup  --- */
    $output .= "\n  <p class='bborder'>" . $_lang['admin.users.groups.editp'] . "</p>\n  " . (isset($_GET['saved']) ? _formMessage(1, $_lang['global.saved']) : '') . "\n  " . ($systemitem ? _admin_smallNote($_lang['admin.users.groups.specialgroup.editnotice']) : '') . "\n  <form action='index.php?p=users-editgroup&amp;id=" . $id . "' method='post'>\n  <table>\n\n  <tr>\n  <td><strong>" . $_lang['global.name'] . "</strong></td>\n  <td><input type='text' name='title' class='inputmedium' value='" . $query['title'] . "' maxlength='32' /></td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['global.descr'] . "</strong></td>\n  <td><input type='text' name='descr' class='inputmedium' value='" . $query['descr'] . "' maxlength='128' /></td>\n  </tr>\n\n  <tr>\n  <td class='rpad'><strong>" . $_lang['admin.users.groups.level'] . "</strong></td>\n  <td><input type='text' name='level' class='inputmedium' value='" . $query['level'] . "'" . _inputDisable(!$systemitem) . " /></td>\n  </tr>\n\n  " . ($id != 2 ? "\n  <tr><td><strong>" . $_lang['admin.users.groups.icon'] . "</strong></td><td><input type='text' name='icon' class='inputsmall' value='" . $query['icon'] . "' maxlength='16' /></td></tr>\n  <tr><td><strong>" . $_lang['admin.users.groups.color'] . "</strong></td><td><input type='text' name='color' class='inputsmall' value='" . $query['color'] . "' maxlength='16' /></td></tr>\n  <tr><td class='rpad'><strong>" . $_lang['admin.users.groups.reglist'] . "</strong></td><td><input type='checkbox' name='reglist' value='1'" . _checkboxActivate($query['reglist']) . " /></td></tr>\n  " : '') . "\n\n  <tr>\n  <td class='rpad'><strong>" . $_lang['admin.users.groups.blocked'] . "</strong></td>\n  <td><input type='checkbox' name='blocked' value='1'" . _checkboxActivate($query['blocked']) . _inputDisable($id != 1 and $id != 2) . " /></td>\n  </tr>\n\n  </table><br />\n\n  <fieldset>\n  <legend>" . $_lang['admin.users.groups.commonrights'] . "</legend>\n  <table>\n\n  " . $rights . "\n\n\n  </table></fieldset><br />\n\n\n  <br />\n  <input type='submit' value='" . $_lang['global.save'] . "' />&nbsp;&nbsp;<small>" . $_lang['admin.content.form.thisid'] . " " . $id . "</small>\n\n  " . _xsrfProtect() . "</form>\n  ";
} else {
    if ($levelconflict == false) {
        $output .= _formMessage(3, $_lang['global.badinput']);
    } else {
        $output .= _formMessage(3, $_lang['global.disallowed']);
    }
}
    /* ---  odstraneni  --- */
    $done = false;
    if (isset($_POST['doit'])) {
        // smazani skupiny
        if (!$systemgroup) {
            DB::query("DELETE FROM `" . _mysql_prefix . "-groups` WHERE id=" . $id);
        }
        // zmena vychozi skupiny
        if (!$systemgroup and $id == _defaultgroup) {
            DB::query("UPDATE `" . _mysql_prefix . "-settings` SET val='3' WHERE var='defaultgroup'");
        }
        // smazani uzivatelu
        $users = DB::query("SELECT id FROM `" . _mysql_prefix . "-users` WHERE `group`=" . $id . " AND id!=0");
        while ($user = DB::row($users)) {
            _deleteUser($user['id']);
        }
        $done = true;
    }
    /* ---  vystup  --- */
    if ($done != true) {
        $output .= "\n    <p class='bborder'>" . $_lang['admin.users.groups.delp'] . "</p>\n    " . ($systemgroup ? _admin_smallNote($_lang['admin.users.groups.specialgroup.delnotice']) : '') . "\n    <form class='cform' action='index.php?p=users-delgroup&amp;id=" . $id . "' method='post'>\n    <input type='hidden' name='doit' value='1' />\n    <input type='submit' value='" . $_lang['global.do'] . "' onclick='return _sysConfirm();' />\n    " . _xsrfProtect() . "</form>\n    ";
    } else {
        $output .= _formMessage(1, $_lang['global.done']);
    }
} else {
    if ($levelconflict == false) {
        $output .= _formMessage(3, $_lang['global.badinput']);
    } else {
        $output .= _formMessage(3, $_lang['global.disallowed']);
    }
}
    }
    if (isset($_GET['created'])) {
        $message = _formMessage(1, $_lang['global.created']);
    }
    // wysiwyg editor
    $output .= _admin_wysiwyg();
    // vypocet hodnoceni
    if (!$new) {
        if ($query['ratenum'] != 0) {
            $rate = DB::result(DB::query("SELECT ROUND(ratesum/ratenum) FROM `" . _mysql_prefix . "-articles` WHERE id=" . $query['id']), 0) . "%, " . $query['ratenum'] . "x";
        } else {
            $rate = $_lang['article.rate.nodata'];
        }
    } else {
        $rate = "";
    }
    // seo title input
    $seo_input = "<input type='text' name='title_seo' value='" . $query['title_seo'] . "' maxlength='255' class='input" . ($author_select != '' ? 'medium' : 'big') . "' />";
    // obrazek
    $picture = '';
    if (isset($query['picture_uid'])) {
        $picture .= "<img src='" . _pictureStorageGet(_indexroot . 'pictures/articles/', null, $query['picture_uid'], 'jpg') . "' alt='article picture' id='is-picture-file' />\n<label id='is-picture-delete'><input type='checkbox' name='picture-delete' value='1' /> <img src='images/icons/delete3.png' class='icon' alt='" . $_lang['global.delete'] . "' /></label>";
    } else {
        $picture .= "<img src='images/art-no-pic.png' alt='no picture' />\n";
    }
    $picture .= "<input type='file' name='picture' id='is-picture-upload' />\n";
    // formular
    $output .= "\n<a href='" . $backlink . "' class='backlink'>&lt; " . $_lang['global.return'] . "</a>\n<h1>" . $_lang['admin.content.articles.edit.title'] . "</h1>\n<p class='bborder'>" . $_lang['admin.content.articles.edit.p'] . "</p>" . $message . "\n\n" . (($new == true and _loginright_adminneedconfirm) ? _admin_smallNote($_lang['admin.content.articles.edit.newconfnote']) : '') . "\n" . ($query['confirmed'] != 1 ? _admin_smallNote($_lang['admin.content.articles.edit.confnote']) : '') . "\n\n" . (!$new && DB::result(DB::query('SELECT COUNT(*) FROM `' . _mysql_prefix . '-articles` WHERE `id`!=' . $query['id'] . ' AND `home1`=' . $query['home1'] . ' AND `title_seo`=\'' . $query['title_seo'] . '\''), 0) != 0 ? _formMessage(2, $_lang['admin.content.form.title_seo.collision']) : '') . "\n\n<form class='cform' action='index.php?p=content-articles-edit" . $actionplus . "' method='post' enctype='multipart/form-data' name='artform'" . _jsCheckForm("artform", array("title")) . ">\n\n<table class='formtable'>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['article.category'] . "</strong></td>\n<td>" . _admin_rootSelect("home1", 2, $query['home1'], false) . " " . _admin_rootSelect("home2", 2, $query['home2'], true) . " " . _admin_rootSelect("home3", 2, $query['home3'], true) . "</td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.title'] . "</strong></td>\n<td><input type='text' name='title' value='" . $query['title'] . "' class='inputbig' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.title_seo'] . "</strong></td>\n<td>" . ($author_select == '' ? $seo_input : "\n    <table class='ae-twoi'><tr>\n    <td>" . $seo_input . "</td>\n    <td class='rpad'><strong>" . $_lang['article.author'] . "</strong></td>\n    <td>" . $author_select . "</td>\n    </tr></table>\n") . "</td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.description'] . "</strong></td>\n<td>\n    <table class='ae-twoi'><tr>\n    <td><input type='text' name='description' value='" . $query['description'] . "' maxlength='128' class='inputmedium' /></td>\n    <td class='rpad'><strong>" . $_lang['admin.content.form.keywords'] . "</strong></td>\n    <td><input type='text' name='keywords' value='" . $query['keywords'] . "' maxlength='128' class='inputmedium' /></td>\n    </tr></table>\n</td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.content.form.perex'] . "</strong></td>\n<td><textarea name='perex' rows='9' cols='94' class='areabigperex codemirror'>" . _htmlStr($query['perex']) . "</textarea></td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.content.form.content'] . "</strong>" . $artlink . "</td>\n<td>\n\n  <table id='ae-table'>\n  <tr class='valign-top'>\n    <td id='content-cell'>\n      <textarea name='content' rows='25' cols='68' class='wysiwyg_editor" . (!_wysiwyg || !_loginwysiwyg ? ' codemirror' : '') . "'>" . _htmlStr($query['content']) . "</textarea>\n    </td>\n    <td id='is-cell'>\n      <div id='is-cell-wrapper'>\n      <div id='is-cell-content'>\n\n      <h2>" . $_lang['admin.content.form.picture'] . "</h2>\n      <div id='is-picture'>" . $picture . "</div>\n\n      <h2>" . $_lang['admin.content.form.settings'] . "</h2>\n      <p id='is-settings'>\n      <label><input type='checkbox' name='public' value='1'" . _checkboxActivate($query['public']) . " /> " . $_lang['admin.content.form.public'] . "</label>\n      <label><input type='checkbox' name='visible' value='1'" . _checkboxActivate($query['visible']) . " /> " . $_lang['admin.content.form.visible'] . "</label>\n      " . (_loginright_adminconfirm || !_loginright_adminneedconfirm && $query['author'] == _loginid ? "<label><input type='checkbox' name='confirmed' value='1'" . _checkboxActivate($query['confirmed']) . " /> " . $_lang['admin.content.form.confirmed'] . "</label>" : '') . "\n      <label><input type='checkbox' name='comments' value='1'" . _checkboxActivate($query['comments']) . " /> " . $_lang['admin.content.form.comments'] . "</label>\n      <label><input type='checkbox' name='commentslocked' value='1'" . _checkboxActivate($query['commentslocked']) . " /> " . $_lang['admin.content.form.commentslocked'] . "</label>\n      <label><input type='checkbox' name='rateon' value='1'" . _checkboxActivate($query['rateon']) . " /> " . $_lang['admin.content.form.artrate'] . "</label>\n      <label><input type='checkbox' name='showinfo' value='1'" . _checkboxActivate($query['showinfo']) . " /> " . $_lang['admin.content.form.showinfo'] . "</label>\n      " . (!$new ? "<label><input type='checkbox' name='resetrate' value='1' /> " . $_lang['admin.content.form.resetartrate'] . " <small>(" . $rate . ")</small></label>" : '') . "\n      " . (!$new ? "<label><input type='checkbox' name='delcomments' value='1' /> " . $_lang['admin.content.form.delcomments'] . " <small>(" . DB::result(DB::query("SELECT COUNT(id) FROM `" . _mysql_prefix . "-posts` WHERE home=" . $query['id'] . " AND type=2"), 0) . ")</small></label>" : '') . "\n      " . (!$new ? "<label><input type='checkbox' name='resetread' value='1' /> " . $_lang['admin.content.form.resetartread'] . " <small>(" . $readed_counter . ")</small></label>" : '') . "\n      </p>\n\n      <h2>" . $_lang['admin.content.form.infobox'] . "</h2>\n      <div id='infobox-wrapper'>\n        <textarea name='infobox' rows='10' cols='20' class='codemirror'>" . _htmlStr($query['infobox']) . "</textarea>\n      </div>\n\n      </div>\n      </div>\n    </td>\n  </tr>\n  </table>\n\n</td>\n</tr>\n\n<tr id='time-cell'>\n<td class='rpad'><strong>" . $_lang['article.posted'] . "</strong></td>\n<td>" . _editTime('time', $query['time'], true, $new) . "</td>\n</tr>\n\n<tr>\n<td></td>\n<td id='ae-lastrow'><br /><input type='submit' value='" . $_lang[$submittext] . "' />\n" . (!$new ? "\n&nbsp;&nbsp;\n<span class='customsettings'><a href='index.php?p=content-articles-delete&amp;id=" . $query['id'] . "&amp;returnid=" . $query['home1'] . "&amp;returnpage=1'><span><img src='images/icons/delete.png' alt='del' class='icon' />" . $_lang['global.delete'] . "</span></a></span>&nbsp;&nbsp;\n<span class='customsettings'><small>" . $_lang['admin.content.form.thisid'] . " " . $query['id'] . "</small></span>\n" : '') . "\n\n</td>\n</tr>\n\n</table>\n\n" . _xsrfProtect() . "</form>\n\n";
} else {
    $output .= "<a href='index.php?p=content-articles' class='backlink'>&lt; " . $_lang['global.return'] . "</a>\n<h1>" . $_lang['admin.content.articles.edit.title'] . "</h1>\n" . _formMessage(3, $_lang['global.badinput']);
}
Exemplo n.º 4
0
}
/* ---  vystup  --- */
// priprava vlastniho obsahu indexu
if (SL::$settings['admin_index_custom'] !== '') {
    $custom = '
<iframe src="index-custom.php" id="index_custom_iframe" frameborder="0" allowtransparency="true"></iframe>
<script type="text/javascript">/* <![CDATA[ */
$("#index_custom_iframe").load(function(){
    try {
        var doc = this.contentDocument;
         this.style.height = Math.max(
            Math.max(doc.body.scrollHeight, doc.body.scrollHeight),
            Math.max(doc.body.offsetHeight, doc.body.offsetHeight),
            Math.max(doc.body.clientHeight, doc.body.clientHeight)
         ) + "px";
    } catch (e) {}
});
/* ]]> */</script>
';
}
// upozorneni na logout
$logout_warning = '';
$maxltime = ini_get('session.gc_maxlifetime');
if (!empty($maxltime) && !isset($_COOKIE[_sessionprefix . 'persistent_key'])) {
    $logout_warning = _admin_smallNote(sprintf($_lang['admin.index.logoutwarn'], round($maxltime / 60)), false, 'warn');
}
// vystup
$output .= "\n<table id='indextable'>\n\n\n<tr class='valign-top'>\n\n<td>" . (isset($custom) && SL::$settings['admin_index_custom_pos'] == 0 ? $custom : "\n  <h1>" . $_lang['admin.menu.index'] . "</h1>\n  <p>" . $_lang['admin.index.p'] . "</p>\n  <ul>\n  <li><a href='http://sunlight.shira.cz/' target='_blank'>" . $_lang['admin.link.web'] . "</a></li>\n  <li><a href='http://sunlight.shira.cz/feedback/docs.php' target='_blank'>" . $_lang['admin.link.docs'] . "</a></li>\n  <li><a href='http://sunlight.shira.cz/feedback/forum.php' target='_blank'>" . $_lang['admin.link.forum'] . "</a></li>\n  </ul>\n  " . $logout_warning . "\n  ") . "\n</td>\n\n<td width='200'>\n  <h2>" . $_lang['admin.index.box'] . "</h2>\n  <p>\n  <strong>" . $_lang['global.version'] . ":</strong> " . _systemversion . ' <small>' . (_systemstate === 2 ? '(rev.' . _systemstate_revision . ')' : SL::$states[_systemstate] . _systemstate_revision) . '</small>' . "<br />\n  <strong>" . $_lang['admin.index.box.latest'] . ":</strong> <span id='hook'>---</span><br />\n  <strong>PHP:</strong> " . PHP_VERSION . "<br />\n  <strong>MySQL:</strong> " . $mysqlver . "<br />\n  </p>\n</td>\n\n</tr>\n\n" . (isset($custom) && SL::$settings['admin_index_custom_pos'] == 1 ? '<tr><td colspan="2">' . $custom . '</td></tr>' : '') . "\n\n\n</table>\n\n<script type='text/javascript' src='http://sunlight.shira.cz/feedback/hook.php?ver=" . _systemversion . "&state=" . _systemstate . "&rev=" . _systemstate_revision . "'></script>\n";
if (_loginright_group == 1) {
    $output .= '<p align="right"><a href="index.php?p=index-edit"><img src="images/icons/edit.png" alt="edit" class="icon" /> ' . $_lang['admin.index.edit.link'] . '</a></p>';
}
Exemplo n.º 5
0
    $handle = opendir($backup_dir);
    while (false !== ($item = readdir($handle))) {
        if ($item === '.' || $item === '..' || !is_file($backup_dir . $item)) {
            continue;
        }
        $backups[] = $item;
    }
    // serazeni a vypis
    if (!empty($backups)) {
        natsort($backups);
        $output .= "<table class='list'>\n<thead><tr><td>" . $_lang['admin.other.backup.restore.item'] . "</td><td>" . $_lang['global.type'] . "</td><td>" . $_lang['global.time'] . "</td><td>" . $_lang['global.note'] . "</td><td>" . $_lang['global.size'] . "</td><td>" . $_lang['global.extra'] . "</td></tr></thead>\n<tbody>\n";
        foreach ($backups as $file) {
            // info o archivu
            $file_err = false;
            $file_vars = _backupCheckFile($backup_dir . $file, array(_backup_db, _backup_partial), true);
            if (!is_array($file_vars)) {
                $file_err = true;
            }
            $file_h = _htmlStr($file);
            // polozka
            $output .= "<tr>\n<td><label><input type='radio' name='fname' value='" . $file_h . "'" . ($file_err ? " disabled='disabled'" : '') . " /> " . $file_h . "</label></td>\n<td>" . ($file_err ? '-' : $_lang['admin.other.backup.backup.' . ($file_vars['type'] === _backup_db ? 'db' : 'partial')]) . "</td>\n<td>" . ($file_err ? '-' : _formatTime($file_vars['time'])) . "</td>\n<td>" . ($file_err ? "<img src='images/icons/warn.png' alt='err' /> " . $_lang['global.error'] : (empty($file_vars['note']) ? '-' : _htmlStr(_cutStr($file_vars['note'], 48, false)))) . "</td>\n<td>" . number_format(filesize($backup_dir . $file) / 1024, 0, '.', ' ') . "kB</td>\n<td><a href='" . $backup_dir . $file_h . "'>" . $_lang['global.download'] . "</a></td>\n</tr>\n";
        }
        $output .= "</tbody></table><br />\n\n<p><strong>" . $_lang['global.action'] . ":</strong> &nbsp;\n<select name='sub_action'>\n    <option value='-1'>...</option>\n    <option value='1'>" . $_lang['admin.other.backup.restore.do'] . "</option>\n    <option value='2'>" . $_lang['global.delete'] . "</option>\n</select> &nbsp;\n<input type='submit' value='" . $_lang['global.do'] . "' onclick='return _sysConfirm();' />&nbsp;\n<a href='index.php?p=fman&amp;dir=" . urlencode('../data/backup/') . "'><img src='images/icons/list.png' class='icon' alt='fman' />" . $_lang['admin.other.backup.restore.fman'] . "</a>\n</p>\n\n" . _admin_smallNote($_lang['admin.other.backup.restore.warning'], true, 'warn');
    } else {
        $output .= '<p>' . $_lang['admin.other.backup.restore.none'] . '</p>';
    }
    $output .= "\n</fieldset>\n" . _xsrfProtect() . "</form>\n";
} else {
    /* ----- volba akce ----- */
    $output .= (_loginright_adminbackup ? "\n<fieldset>\n<legend>" . $_lang['admin.other.backup.backup'] . "</legend>\n<form action='index.php?p=other-backup' method='post'>\n<p>" . $_lang['admin.other.backup.backup.p'] . "</p>\n\n<input type='hidden' name='do_backup' value='1' />\n<p><input type='submit' value='" . $_lang['admin.other.backup.backup.db'] . "' name='type_db' />&nbsp; <small class='note'>(" . $_lang['admin.other.backup.backup.db.hint'] . ")</small></p>\n<p><input type='submit' value='" . $_lang['admin.other.backup.backup.partial'] . "' name='type_partial' />&nbsp; <small class='note'>(" . $_lang['admin.other.backup.backup.partial.hint'] . ")</small></p>\n<p><input type='submit' value='" . $_lang['admin.other.backup.backup.full'] . "' name='type_full' />&nbsp; <small class='note'>(" . $_lang['admin.other.backup.backup.full.hint'] . ")</small></p>\n\n" . _xsrfProtect() . "</form>\n</fieldset>" : '') . (_loginright_adminrestore ? "\n\n<fieldset>\n<legend>" . $_lang['admin.other.backup.restore'] . "</legend>\n<form class='cform' method='post'>\n<p>" . $_lang['admin.other.backup.restore.p'] . "</p>\n<p><input type='submit' name='do_restore' value='" . $_lang['global.continue'] . "' /></p>\n" . _xsrfProtect() . "</form>\n</fieldset>\n" : '');
}
Exemplo n.º 6
0
        // deinstalace
        case 2:
            $pass = $_POST['pass'];
            $confirm = _checkboxLoad("confirm");
            if ($confirm) {
                $right_pass = DB::query_row("SELECT password,salt FROM `" . _mysql_prefix . "-users` WHERE id=0");
                if (_md5Salt($pass, $right_pass['salt']) == $right_pass['password']) {
                    // ziskani tabulek
                    $tables = array();
                    $q = DB::query('SHOW TABLES LIKE \'' . _mysql_prefix . '-%\'');
                    while ($r = DB::rown($q)) {
                        $tables[] = $r[0];
                    }
                    // odstraneni tabulek
                    foreach ($tables as $table) {
                        DB::query("DROP TABLE `" . $table . "`");
                    }
                    // zprava
                    _userLogout();
                    echo "<h1>" . $_lang['global.done'] . "</h1>\n<p>" . $_lang['admin.other.cleanup.uninstall.done'] . "</p>";
                    exit;
                } else {
                    $message = _formMessage(2, $_lang['admin.other.cleanup.uninstall.badpass']);
                }
            }
            break;
    }
}
/* ---  vystup  --- */
$output .= $message . "\n<br />\n<fieldset>\n<legend>" . $_lang['admin.other.cleanup.cleanup'] . "</legend>\n<form class='cform' action='index.php?p=other-cleanup' method='post'>\n<input type='hidden' name='action' value='1' />\n<p>" . $_lang['admin.other.cleanup.cleanup.p'] . "</p>\n\n<table>\n<tr class='valign-top'>\n\n<td rowspan='2'>\n  <fieldset>\n  <legend>" . $_lang['mod.messages'] . "</legend>\n  <label><input type='radio' name='messages' value='0'" . _checkboxActivate(!isset($_POST['messages']) || $_POST['messages'] == 0) . " /> " . $_lang['global.noaction'] . "</label><br />\n  <label><input type='radio' name='messages' value='1'" . _checkboxActivate(isset($_POST['messages']) && $_POST['messages'] == 1) . " /> " . $_lang['admin.other.cleanup.messages.1'] . "</label> " . _tmp_selectTime("messages-time") . "<br />\n  <label><input type='radio' name='messages' value='2'" . _checkboxActivate(isset($_POST['messages']) && $_POST['messages'] == 2) . " /> " . $_lang['admin.other.cleanup.messages.2'] . "</label>\n  </fieldset>\n\n  <fieldset>\n  <legend>" . $_lang['admin.users.users'] . "</legend>\n  <p class='bborder'><label><input type='checkbox' name='users' value='1'" . _checkboxActivate(isset($_POST['users'])) . " /> " . $_lang['admin.other.cleanup.users'] . "</label></p>\n  <table>\n\n  <tr>\n  <td><strong>" . $_lang['admin.other.cleanup.users.time'] . "</strong></td>\n  <td>" . _tmp_selectTime("users-time") . "</td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['admin.other.cleanup.users.group'] . "</strong></td>\n  <td>" . _admin_authorSelect("users-group", isset($_POST['users-group']) ? intval($_POST['users-group']) : -1, "1", null, $_lang['global.all'], true) . "</td>\n  </tr>\n\n  </table>\n  </fieldset>\n</td>\n\n<td>\n  <fieldset>\n  <legend>" . $_lang['global.other'] . "</legend>\n  <label><input type='checkbox' name='maintenance' value='1' checked='checked' /> " . $_lang['admin.other.cleanup.other.maintenance'] . "</label><br />\n  <label><input type='checkbox' name='optimize' value='1' checked='checked' /> " . $_lang['admin.other.cleanup.other.optimize'] . "</label><br />\n  <label><input type='checkbox' name='comments' value='1'" . _checkboxActivate(isset($_POST['comments'])) . " /> " . $_lang['admin.other.cleanup.other.comments'] . "</label><br />\n  <label><input type='checkbox' name='posts' value='1'" . _checkboxActivate(isset($_POST['posts'])) . " /> " . $_lang['admin.other.cleanup.other.posts'] . "</label><br />\n  <label><input type='checkbox' name='iplog' value='1'" . _checkboxActivate(isset($_POST['iplog'])) . " /> " . $_lang['admin.other.cleanup.other.iplog'] . "</label>\n  </fieldset>\n</td>\n\n</tr>\n\n<tr class='valign-top'>\n\n<td align='center'><p>\n<input type='submit' value='" . $_lang['admin.other.cleanup.prev'] . "' /><br /><br />\n<input type='submit' name='do_cleanup' value='" . $_lang['admin.other.cleanup.do'] . "' onclick='return _sysConfirm();' />\n</p></td>\n\n</tr>\n\n</table>\n\n" . _xsrfProtect() . "</form>\n</fieldset>\n<br />\n\n<fieldset>\n<legend>" . $_lang['admin.other.cleanup.uninstall'] . "</legend>\n<form class='cform' action='index.php?p=other-cleanup' method='post'>\n<input type='hidden' name='action' value='2' />\n<p class='bborder'>" . $_lang['admin.other.cleanup.uninstall.p'] . "</p>\n" . _admin_smallNote(str_replace('*prefix*', _mysql_prefix, $_lang['admin.other.cleanup.uninstall.note']), true) . "\n<p><label><input type='checkbox' name='confirm' value='1' /> " . str_replace('*dbname*', _mysql_db, $_lang['admin.other.cleanup.uninstall.confirm']) . "</label></p>\n<p><strong>" . $_lang['admin.other.cleanup.uninstall.pass'] . ":</strong> &nbsp;<input type='password' class='inputsmall' name='pass' autocomplete='off' /></p>\n<input type='submit' value='" . $_lang['global.do'] . "' onclick='return _sysConfirm();' />\n" . _xsrfProtect() . "</form>\n</fieldset>\n";
/* ---  vystup  --- */
if ($continue != true) {
    $output .= _formMessage(3, $_lang['global.badinput']);
} else {
    // vyber rozcestniku
    if ($type != 7) {
        $intersection_select = "<select name='intersection' class='selectmedium'><option value='-1' class='special'>" . $_lang['admin.content.form.intersection.none'] . "</option>";
        $isquery = DB::query("SELECT id,title FROM `" . _mysql_prefix . "-root` WHERE type=7 ORDER BY ord");
        while ($item = DB::row($isquery)) {
            if ($item['id'] == $query['intersection']) {
                $selected = " selected='selected'";
            } else {
                $selected = "";
            }
            $intersection_select .= "<option value='" . $item['id'] . "'" . $selected . ">" . _cutStr($item['title'], 22) . "</option>";
        }
        $intersection_select .= "</select>";
        $intersection_row = "<td class='rpad'><strong>" . $_lang['admin.content.form.intersection'] . "</strong></td><td>" . $intersection_select . "</td>";
    } else {
        $intersection_select = "";
        $intersection_row = "";
    }
    // wysiwyg editor
    $output .= _admin_wysiwyg();
    // stylove oddeleni individualniho nastaveni
    if ($custom_settings != "") {
        $custom_settings = "<span class='customsettings'>" . $custom_settings . "</span>";
    }
    // formular
    $output .= "<div class='hr'><hr /></div><br />" . (isset($_GET['saved']) ? _formMessage(1, $_lang['global.saved'] . "&nbsp;&nbsp;<small>(" . _formatTime(time()) . ")</small>") : '') . "\n\n" . (!$new && $type != 4 && DB::result(DB::query('SELECT COUNT(*) FROM `' . _mysql_prefix . '-root` WHERE `id`!=' . $query['id'] . ' AND `title_seo`=\'' . $query['title_seo'] . '\''), 0) != 0 ? _formMessage(2, $_lang['admin.content.form.title_seo.collision']) : '') . "\n" . (!$new && $id == _index_page_id ? _admin_smallNote($_lang['admin.content.form.indexnote']) : '') . "\n<form" . ($type != 4 ? " class='cform'" : '') . " action='index.php?p=content-edit" . $type_array[$type] . (!$new ? "&amp;id=" . $id : '') . ($type == 9 && $new ? '&amp;idt=' . $type_idt : '') . "' method='post'>\n\n\n" . $editscript_extra . "\n" . (!$new && $type == 5 ? "<p><a href='index.php?p=content-manageimgs&amp;g=" . $id . "'><img src='images/icons/edit.png' alt='edit' class='icon' /><big>" . $_lang['admin.content.form.manageimgs'] . " &gt;</big></a></p>" : '') . "\n\n<table class='formtable'>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.title'] . "</strong></td>\n<td><input type='text' name='title' value='" . $query['title'] . "' class='inputmedium' maxlength='96' /></td>\n\n" . ($type != 4 ? "<td class='rpad'><strong>" . $_lang['admin.content.form.title_seo'] . "</strong></td>\n<td><input type='text' name='title_seo' value='" . $query['title_seo'] . "' maxlength='255' class='inputmedium' /></td>" : $intersection_row) . "\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.ord'] . "</strong></td>\n<td><input type='text' name='ord' value='" . $query['ord'] . "' class='inputmedium' /></td>\n\n" . ($type != 4 ? $intersection_row : '') . "\n</tr>\n\n" . ($type != 4 ? "\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.description'] . "</strong></td>\n<td><input type='text' name='description' value='" . $query['description'] . "' maxlength='128' class='inputmedium' /></td>\n\n<td class='rpad'><strong>" . $_lang['admin.content.form.keywords'] . "</strong></td>\n<td><input type='text' name='keywords' value='" . $query['keywords'] . "' maxlength='128' class='inputmedium' /></td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.content.form.intersectionperex'] . "</strong></td>\n<td colspan='3'><textarea name='intersectionperex' rows='2' cols='94' class='arealine codemirror'>" . _htmlStr($query['intersectionperex']) . "</textarea></td>\n</tr>\n\n" . ($editscript_enable_content ? "\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.content.form.' . ($type != 6 ? 'content' : 'url')] . "</strong>" . (!$new ? " <a href='" . _indexroot . _linkRoot($query['id'], $query['title_seo']) . "' target='_blank'><img src='images/icons/loupe.png' alt='prev' /></a>" : '') . "</td>\n<td colspan='3'>\n" . ($type != 6 ? "<textarea name='content' rows='25' cols='94' class='areabig wysiwyg_editor" . (!_wysiwyg || !_loginwysiwyg ? ' codemirror' : '') . "'>" . _htmlStr($query['content']) . "</textarea>" : "<input type='text' name='content' value='" . _htmlStr($query['content']) . "' class='inputbig' />") . "\n</td>\n</tr>\n" : '') . "\n\n" . $editscript_extra_row . "\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.content.form.settings'] . "</strong></td>\n<td colspan='3'>\n<label><input type='checkbox' name='visible' value='1'" . _checkboxActivate($query['visible']) . " /> " . $_lang['admin.content.form.visible'] . "</label>&nbsp;&nbsp;\n" . ($type != 6 ? "<label><input type='checkbox' name='autotitle' value='1'" . _checkboxActivate($query['autotitle']) . " /> " . $_lang['admin.content.form.autotitle'] . "</label>&nbsp;&nbsp;" : '') . "\n" . $custom_settings . "\n</td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.access'] . "</strong></td>\n<td>\n<label><input type='checkbox' name='public' value='1'" . _checkboxActivate($query['public']) . " /> " . $_lang['admin.content.form.public'] . "</label>&nbsp;&nbsp;\n<input type='text' name='level' value='" . $query['level'] . "' class='inputsmaller' maxlength='5' /> " . $_lang['admin.content.form.level'] . "\n</td>\n\n" . ($type != 4 ? "<td class='rpad'><strong>" . $_lang['admin.content.form.events'] . "</strong></td>\n<td><input type='text' name='events' value='" . (isset($query['events']) ? _htmlStr($query['events']) : '') . "' class='inputmedium' maxlength='255' /></td>" : '') . "\n</tr>\n\n" : '') . "\n\n\n<tr><td></td><td colspan='3'><br />\n<input type='submit' value='" . ($new ? $_lang['global.create'] : $_lang['global.savechanges']) . "' />" . (!$new ? "&nbsp;&nbsp;<small>" . $_lang['admin.content.form.thisid'] . " " . $query['id'] . "</small>" : '') . "\n</td></tr>\n\n</table>\n" . _xsrfProtect() . "</form>\n";
}