define('_redirect_to', 'index.php?p=content-polls-edit&id=' . $id . '&saved'); return; } else { DB::query("INSERT INTO `" . _mysql_prefix . "-polls` (author,question,answers,locked,votes) VALUES (" . $author . ",'" . $question . "','" . $answers . "'," . $locked . ",'" . trim(str_repeat("0-", $answers_count), "-") . "')"); $newid = DB::insertID(); define('_redirect_to', 'index.php?p=content-polls-edit&id=' . $newid . '&created'); return; } } else { $message = _formMessage(2, _eventList($errors, 'errors')); } } /* --- vystup --- */ if ($continue) { // vyber autora if (_loginright_adminpollall) { $author_select = "\n <tr>\n <td class='rpad'><strong>" . $_lang['article.author'] . "</strong></td>\n <td>" . _admin_authorSelect("author", $query['author'], "adminpoll=1", "selectmedium") . "</td></tr>\n "; } else { $author_select = ""; } // zprava if (isset($_GET['saved'])) { $message = _formMessage(1, $_lang['global.saved']); } if (isset($_GET['created'])) { $message = _formMessage(1, $_lang['global.created']); } $output .= "\n <p class='bborder'>" . $_lang['admin.content.polls.edit.p'] . "</p>\n " . $message . "\n <form action='index.php?p=content-polls-edit" . $actionbonus . "' method='post'>\n <table class='formtable'>\n\n <tr>\n <td class='rpad'><strong>" . $_lang['admin.content.form.question'] . "</strong></td>\n <td><input type='text' name='question' class='inputmedium' value='" . $query['question'] . "' maxlength='64' /></td>\n </tr>\n\n " . $author_select . "\n\n <tr class='valign-top'>\n <td class='rpad'><strong>" . $_lang['admin.content.form.answers'] . "</strong></td>\n <td><textarea name='answers' rows='25' cols='94' class='areamedium'>" . $query['answers'] . "</textarea></td>\n </tr>\n\n " . (!$new ? "<tr>\n <td class='rpad'><strong>" . $_lang['admin.content.form.hcm'] . "</strong></td>\n <td><input type='text' name='hcm' value='[hcm]poll," . $id . ",150[/hcm]' readonly='readonly' onclick='this.select();' class='inputmedium' /></td>\n </tr>" : '') . "\n\n <tr>\n <td class='rpad'><strong>" . $_lang['admin.content.form.settings'] . "</strong></td>\n <td>\n <label><input type='checkbox' name='locked' value='1'" . _checkboxActivate($query['locked']) . " /> " . $_lang['admin.content.form.locked'] . "</label> \n " . (!$new ? "<label><input type='checkbox' name='reset' value='1' /> " . $_lang['admin.content.polls.reset'] . "</label>" : '') . "\n </td>\n </tr>\n\n <tr><td></td>\n <td><input type='submit' value='" . $submitcaption . "' />" . (!$new ? " <small>" . $_lang['admin.content.form.thisid'] . " " . $id . "</small> <span class='customsettings'><a href='index.php?p=content-polls&del=" . $id . "' onclick='return _sysConfirm();'><span><img src='images/icons/delete.png' class='icon' alt='del' /> " . $_lang['global.delete'] . "</span></a>" : '') . "</span></td>\n </tr>\n\n </table>\n " . _xsrfProtect() . "</form>\n "; } else { $output .= _formMessage(3, $_lang['global.badinput']); }
/* --- kontrola jadra --- */ if (!defined('_core')) { exit; } /* --- ulozeni --- */ $message = ""; if (isset($_POST['sourcegroup'])) { $source = intval($_POST['sourcegroup']); $target = intval($_POST['targetgroup']); $source_data = DB::query("SELECT level FROM `" . _mysql_prefix . "-groups` WHERE id=" . $source); $target_data = DB::query("SELECT level FROM `" . _mysql_prefix . "-groups` WHERE id=" . $target); if (DB::size($source_data) != 0 and DB::size($target_data) != 0 and $source != 2 and $target != 2) { if ($source != $target) { $source_data = DB::row($source_data); $target_data = DB::row($target_data); if (_loginright_level > $source_data['level'] and _loginright_level > $target_data['level']) { DB::query("UPDATE `" . _mysql_prefix . "-users` SET `group`=" . $target . " WHERE `group`=" . $source . " AND id!=0"); $message = _formMessage(1, $_lang['global.done']); } else { $message = _formMessage(2, $_lang['admin.users.move.failed']); } } else { $message = _formMessage(2, $_lang['admin.users.move.same']); } } else { $message = _formMessage(3, $_lang['global.badinput']); } } /* --- vystup --- */ $output .= "<p class='bborder'>" . $_lang['admin.users.move.p'] . "</p>\n" . $message . "\n<form class='cform' action='index.php?p=users-move' method='post'>\n" . $_lang['admin.users.move.text1'] . " " . _admin_authorSelect("sourcegroup", -1, "id!=2", null, null, true) . " " . $_lang['admin.users.move.text2'] . " " . _admin_authorSelect("targetgroup", -1, "id!=2", null, null, true) . " <input type='submit' value='" . $_lang['global.do'] . "' onclick='return _sysConfirm();' />\n" . _xsrfProtect() . "</form>\n";
$newid = DB::insertID(); // udalost _extend('call', 'admin.article.new', array('id' => $newid, 'data' => $newdata)); // presmerovani define('_redirect_to', 'index.php?p=content-articles-edit&id=' . $newid . '&created&returnid=' . $newdata['home1'] . '&returnpage=1'); return; } } else { $message = _formMessage(2, _eventList($error_log, 'errors')); } } /* --- vystup --- */ if ($continue) { // vyber autora if (_loginright_adminchangeartauthor) { $author_select = _admin_authorSelect("author", $query['author'], "adminart=1", "selectmedium"); } else { $author_select = ""; } // zprava if (isset($_GET['saved'])) { $message = _formMessage(1, $_lang['global.saved'] . " <small>(" . _formatTime(time()) . ")</small>"); } if (isset($_GET['created'])) { $message = _formMessage(1, $_lang['global.created']); } // wysiwyg editor $output .= _admin_wysiwyg(); // vypocet hodnoceni if (!$new) { if ($query['ratenum'] != 0) {
if (isset($_GET['search']) and $_GET['search'] != "") { $search = true; $searchword = DB::esc($_GET['search']); } else { $search = false; } // filtry - vyber skupiny, vyhledavani $output .= ' <table class="wintable"> <tr> <td> <form class="cform" action="index.php" method="get"> <input type="hidden" name="p" value="users-list" /> <input type="hidden" name="search"' . _restoreGetValue('search', '') . ' /> <strong>' . $_lang['admin.users.list.groupfilter'] . ':</strong> ' . _admin_authorSelect("group", $group, "id!=2", null, $_lang['global.all'], true) . ' </select> <input type="submit" value="' . $_lang['global.apply'] . '" /> </form> </td> <td> <form class="cform" action="index.php" method="get"> <input type="hidden" name="p" value="users-list" /> <input type="hidden" name="group" value="' . $group . '" /> <strong>' . $_lang['admin.users.list.search'] . ':</strong> <input type="text" name="search" class="inputsmall"' . _restoreGetValue('search') . ' /> <input type="submit" value="' . $_lang['mod.search.submit'] . '" /> ' . ($search ? ' <a href="index.php?p=users-list&group=' . $group . '">' . $_lang['global.cancel'] . '</a>' : '') . ' </form> </td> </tr> </table>
} /* --- vystup --- */ // filtr autoru if (_loginright_adminpollall and isset($_GET['author']) and $_GET['author'] != -1) { $pasep = true; $author_filter_id = intval($_GET['author']); $author_filter = "author=" . intval($_GET['author']); } else { $pasep = false; $author_filter = ""; $author_filter_id = -1; } $output .= "\n<p class='bborder'>" . $_lang['admin.content.polls.p'] . "</p>\n<p><img src='images/icons/new.png' class='icon' alt='new' /><a href='index.php?p=content-polls-edit'>" . $_lang['admin.content.polls.new'] . "</a></p>\n"; // filtr if (_loginright_adminpollall) { $output .= "\n <form class='cform' action='index.php' method='get'>\n <input type='hidden' name='p' value='content-polls' />\n <strong>" . $_lang['admin.content.polls.filter'] . ":</strong> " . _admin_authorSelect("author", $author_filter_id, "adminpoll=1", null, $_lang['global.all2']) . " <input type='submit' value='" . $_lang['global.apply'] . "' />\n </form>\n "; } // strankovani $paging = _resultPaging("index.php?p=content-polls", 25, "polls", $author_filter . _admin_pollAccess($pasep), "&filter=" . $author_filter_id); $output .= $paging[0] . "<br />"; $output .= $message . "\n<table class='list'>\n<thead><tr><td>" . $_lang['admin.content.form.question'] . "</td>" . (_loginright_adminpollall ? "<td>" . $_lang['article.author'] . "</td>" : '') . "<td>" . $_lang['global.id'] . "</td><td>" . $_lang['global.action'] . "</td></tr></thead>\n<tbody>\n"; // vypis anket $query = DB::query("SELECT question,id,author,locked FROM `" . _mysql_prefix . "-polls` WHERE " . $author_filter . _admin_pollAccess($pasep) . " ORDER BY id DESC " . $paging[1]); if (DB::size($query) != 0) { while ($item = DB::row($query)) { if (_loginright_adminpollall) { $username = "******" . _linkUser($item['author']) . "</td>"; } else { $username = ""; } $output .= "<tr><td><a href='index.php?p=content-polls-edit&id=" . $item['id'] . "' class='block'>" . _cutStr($item['question'], 64) . "</a>" . ($item['locked'] == 1 ? " (" . $_lang['admin.content.form.locked'] . ")" : '') . "</td>" . $username . "<td>" . $item['id'] . "</td><td><a href='" . _xsrfLink("index.php?p=content-polls&author=" . $author_filter_id . "&page=" . $paging[2] . "&del=" . $item['id']) . "' onclick='return _sysConfirm();'><img src='images/icons/delete.png' class='icon' alt='del' /> " . $_lang['global.delete'] . "</a></td></tr>\n";
// zprava if ($done != 0) { $output .= _formMessage(1, str_replace(array("*done*", "*total*"), array($done, $item_total), $_lang['admin.other.massemail.send'])); } else { $output .= _formMessage(2, $_lang['admin.other.massemail.noreceiversfound']); } } else { // vypis emailu $emails_total = DB::size($query); if ($emails_total != 0) { $emails = ''; $email_counter = 0; while ($item = DB::row($query)) { ++$email_counter; $emails .= $item['email']; if ($email_counter !== $emails_total) { $emails .= ','; } } $output .= _formMessage(1, "<textarea class='areasmallwide' rows='9' cols='33' name='list'>" . $emails . "</textarea>"); } else { $output .= _formMessage(2, $_lang['admin.other.massemail.noreceiversfound']); } } } else { $output .= _formMessage(2, _eventList($errors, 'errors')); } } /* --- vystup --- */ $output .= "\n<br />\n<form class='cform' action='index.php?p=other-massemail' method='post'>\n<table class='formtable'>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.other.massemail.sender'] . "</strong></td>\n<td><input type='text' name='sender'" . _restorePostValue("sender", _sysmail) . " class='inputbig' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['posts.subject'] . "</strong></td>\n<td><input type='text' name='subject' class='inputbig'" . _restorePostValue("subject") . " /></td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.other.massemail.receivers'] . "</strong></td>\n<td>" . _admin_authorSelect("receivers", -1, "1", "selectbig", null, true, 4) . "</td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['admin.other.massemail.ctype'] . "</strong></td>\n<td>\n <select name='ctype' class='selectbig'>\n <option value='1'>" . $_lang['admin.other.massemail.ctype.1'] . "</option>\n <option value='2'" . ((isset($_POST['ctype']) and $_POST['ctype'] == 2) ? " selected='selected'" : '') . ">" . $_lang['admin.other.massemail.ctype.2'] . "</option>\n </select>\n</td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.other.massemail.text'] . "</strong></td>\n<td><textarea name='text' class='areabig' rows='9' cols='94'>" . _restorePostValue("text", null, true) . "</textarea></td>\n</tr>\n\n<tr><td></td>\n<td><input type='submit' value='" . $_lang['global.send'] . "' /> <label><input type='checkbox' name='maillist' value='1'" . _checkboxActivate(_checkboxLoad("maillist")) . " /> " . $_lang['admin.other.massemail.maillist'] . "</label></td>\n</tr>\n\n</table>\n" . _xsrfProtect() . "</form>\n";
// 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> <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";
$item = pathinfo($item); if (!isset($item['extension']) or $item['extension'] != "php") { continue; } $item = mb_substr($item['basename'], 0, mb_strrpos($item['basename'], ".")); if ($item == _language) { $selected = ' selected="selected"'; } else { $selected = ""; } $language_select .= '<option value="' . $item . '"' . $selected . '>' . $item . '</option>'; } closedir($handle); $language_select .= '</select>'; // vyber vychozi skupiny $defaultgroup_select = _admin_authorSelect("defaultgroup", _defaultgroup, "id!=2", null, null, true); // vyber zobrazeni strankovani $pagingmode_select = '<select name="pagingmode">'; for ($x = 1; $x < 4; $x++) { if ($x == _pagingmode) { $selected = " selected='selected'"; } else { $selected = ""; } $pagingmode_select .= "<option value='" . $x . "'" . $selected . ">" . $_lang['admin.settings.mods.pagingmode.' . $x] . "</option>"; } $pagingmode_select .= '</select>'; // vyber schematu administrace $adminscheme_select = '<select name="adminscheme">'; for ($x = 0; $x < 11; $x++) { if ($x == _adminscheme) {
} } } else { define('_redirect_to', _indexroot . 'index.php?m=settings'); return; } } else { $errno = 1; } } else { $continue = true; $id = null; $query = array("id" => "-1", "group" => _defaultgroup, "levelshift" => 0, "username" => "", "publicname" => "", "blocked" => 0, "email" => "@", "avatar" => null, "web" => "", "skype" => "", "msn" => "", "jabber" => "", "icq" => "", "note" => ""); } // vyber skupiny $group_select = _admin_authorSelect("group", isset($_POST['group']) ? intval($_POST['group']) : $query['group'], "id!=2 AND level<" . _loginright_level, null, null, true); if ($continue) { /* --- ulozeni --- */ if (isset($_POST['username'])) { $errors = array(); // nacteni a kontrola promennych // username $username = $_POST['username']; if (mb_strlen($username) > 24) { $username = mb_substr($username, 0, 24); } $username = DB::esc(_anchorStr($username, false)); if ($username == "") { $errors[] = $_lang['admin.users.edit.badusername']; } else { $usernamechange = false;
$paramvar = "new_" . $param; $paramval = ${$paramvar}; if ($paramval == 0 or $paramval == 1) { DB::query("UPDATE `" . _mysql_prefix . "-articles` SET " . $param . "=" . $paramval . " WHERE id=" . $item['id']); } } } $message = _formMessage(1, $_lang['global.done']); } } else { $message = _formMessage(2, $_lang['admin.content.artfilter.f1.noresult']); } } /* --- vystup --- */ $output .= "\n<p class='bborder'>" . $_lang['admin.content.artfilter.p'] . "</p>\n" . $message . "\n<form action='index.php?p=content-artfilter' method='post'>\n"; if (!$infopage) { $output .= "\n<h2>" . $_lang['admin.content.artfilter.f1.title'] . "</h2>\n<p>" . $_lang['admin.content.artfilter.f1.p'] . "</p>\n<table>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['article.category'] . "</strong></td>\n<td>" . _admin_rootSelect("category", 2, -1, true, $_lang['global.any2']) . "</td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['article.author'] . "</strong></td>\n<td>" . _admin_authorSelect("author", -1, "adminart=1", "selectmedium", $_lang['global.any']) . "</td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['article.posted'] . "</strong></td>\n<td>\n\n<select name='ba'>\n<option value='0'>" . $_lang['admin.content.artfilter.f1.time0'] . "</option>\n<option value='1'>" . $_lang['admin.content.artfilter.f1.time1'] . "</option>\n<option value='2'>" . $_lang['admin.content.artfilter.f1.time2'] . "</option>\n<option value='3'>" . $_lang['admin.content.artfilter.f1.time3'] . "</option>\n</select>\n\n" . _editTime('time', -1) . "\n\n</td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.content.form.settings'] . "</strong></td>\n<td>\n" . _admin_boolSelect("public") . $_lang['admin.content.form.public'] . "<br />\n" . _admin_boolSelect("visible") . $_lang['admin.content.form.visible'] . "<br />\n" . _admin_boolSelect("confirmed") . $_lang['admin.content.form.confirmed'] . "<br />\n" . _admin_boolSelect("comments") . $_lang['admin.content.form.comments'] . "<br />\n" . _admin_boolSelect("rateon") . $_lang['admin.content.form.artrate'] . "<br />\n" . _admin_boolSelect("showinfo") . $_lang['admin.content.form.showinfo'] . "\n</td>\n</tr>\n\n</table>\n\n<br /><div class='hr'><hr /></div><br />\n\n<h2>" . $_lang['admin.content.artfilter.f2.title'] . "</h2>\n<p>" . $_lang['admin.content.artfilter.f2.p'] . "</p>\n<table>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['article.category'] . "</strong></td>\n<td>" . _admin_rootSelect("new_category", 2, -1, true, $_lang['global.nochange']) . "</td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['article.author'] . "</strong></td>\n<td>" . _admin_authorSelect("new_author", -1, "adminart=1", "selectmedium", $_lang['global.nochange']) . "</td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['admin.content.form.settings'] . "</strong></td>\n<td>\n" . _admin_boolSelect("new_public", true) . $_lang['admin.content.form.public'] . "<br />\n" . _admin_boolSelect("new_visible", true) . $_lang['admin.content.form.visible'] . "<br />\n" . (_loginright_adminconfirm ? _admin_boolSelect("new_confirmed", true) . $_lang['admin.content.form.confirmed'] . "<br />" : '') . "\n" . _admin_boolSelect("new_comments", true) . $_lang['admin.content.form.comments'] . "<br />\n" . _admin_boolSelect("new_rateon", true) . $_lang['admin.content.form.artrate'] . "<br />\n" . _admin_boolSelect("new_showinfo", true) . $_lang['admin.content.form.showinfo'] . "\n</td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['global.action'] . "</strong></td>\n<td>\n<label><input type='checkbox' name='new_delete' value='1' /> " . $_lang['global.delete'] . "</label><br />\n<label><input type='checkbox' name='new_resetrate' value='1' /> " . $_lang['admin.content.form.resetartrate'] . "</label><br />\n<label><input type='checkbox' name='new_delcomments' value='1' /> " . $_lang['admin.content.form.delcomments'] . "</label><br />\n<label><input type='checkbox' name='new_resetread' value='1' /> " . $_lang['admin.content.form.resetartread'] . "</label>\n</td>\n</tr>\n\n</table>\n\n<br /><div class='hr'><hr /></div><br />\n\n<input type='submit' value='" . $_lang['mod.search.submit'] . "' />\n"; } else { $output .= _getPostdata() . "\n<input type='hidden' name='_process' value='1' />\n" . _formMessage(1, str_replace("*found*", $found, $_lang['admin.content.artfilter.f1.infotext'])) . "\n<ul>"; $counter = 0; while ($r = DB::row($query)) { if ($counter >= 30) { $output .= "<li><em>... (+" . ($found - $counter) . ")</em></li>\n"; break; } $output .= "<li><a href='" . _indexroot . _linkArticle($r['id'], $r['title_seo'], $r['cat_title_seo']) . "' target='_blank'>" . $r['title'] . "</a></li>\n"; ++$counter; } $output .= "</ul>\n<input type='submit' value='" . $_lang['global.do2'] . "' /> <a href='index.php?p=content-artfilter'>" . $_lang['global.cancel'] . "</a>\n"; } $output .= _xsrfProtect() . "</form>";
$groups = "<table class='list'>\n<thead><tr><td>" . $_lang['global.name'] . "</td><td>" . $_lang['admin.users.groups.level'] . "</td><td>" . $_lang['admin.users.groups.members'] . "</td><td>" . $_lang['global.action'] . "</td></tr></thead>\n<tbody>"; $query = DB::query("SELECT id,title,icon,color,blocked,level,reglist,(SELECT COUNT(id) FROM `" . _mysql_prefix . "-users` WHERE `group`=`" . _mysql_prefix . "-groups`.id) AS user_count FROM `" . _mysql_prefix . "-groups` ORDER BY level DESC"); while ($item = DB::row($query)) { $is_sys = in_array($item['id'], $sysgroups_array); $groups .= "\n <tr>\n <td><a href='index.php?p=users-editgroup&id=" . $item['id'] . "'" . ($item['blocked'] == 1 ? " class='invisible'" : '') . ($item['color'] !== '' ? " style='color:" . $item['color'] . ";'" : '') . ">" . ($item['reglist'] == 1 ? "<img src='images/icons/list.png' alt='reglist' class='icon' title='" . $_lang['admin.users.groups.reglist'] . "' />" : '') . ($item['icon'] != "" ? "<img src='" . _indexroot . "pictures/groupicons/" . $item['icon'] . "' alt='icon' class='groupicon' /> " : '') . ($is_sys ? "<u>" : '') . $item['title'] . ($is_sys ? "</u>" : '') . "</a></td>\n <td>" . $item['level'] . "</td>\n <td><a href='index.php?p=users-list&group=" . $item['id'] . "'>" . ($item['id'] != 2 ? $item['user_count'] : "-") . "</a></td>\n <td><a href='index.php?p=users-delgroup&id=" . $item['id'] . "' title='" . $_lang['global.delete'] . "'><img src='images/icons/delete.png' alt='del' class='icon' />" . $_lang['global.delete'] . "</a></td>\n </tr>\n"; } $groups .= "</tbody>\n</table>"; } else { $groups = ""; } // zprava switch ($msg) { case 1: $message = _formMessage(1, $_lang['global.done']); break; case 2: $message = _formMessage(2, $_lang['admin.users.groups.specialgroup.delnotice']); break; case 3: $message = _formMessage(3, $_lang['global.disallowed']); break; case 4: $message = _formMessage(3, $_lang['global.badgroup']); break; default: $message = ""; break; } /* --- vystup --- */ $output .= "\n<p>" . $_lang['admin.users.p'] . "</p>\n\n" . $message . "\n\n<table class='wintable'>\n<tr class='valign-top'>\n\n " . (_loginright_adminusers ? "\n <td" . (_loginright_admingroups ? " style='width: 40%;' class='rbor'" : '') . ">\n <h2>" . $_lang['admin.users.users'] . "</h2>\n <p class='bborder'>\n<a href='index.php?p=users-edit'><img src='images/icons/new.png' alt='new' class='icon' />" . $_lang['global.create'] . "</a>\n<span style='color:#b2b2b2;'> | </span>\n<a href='index.php?p=users-list'><img src='images/icons/action.png' alt='act' class='contenttable-icon' />" . $_lang['admin.users.list'] . "</a> \n<a href='index.php?p=users-move'><img src='images/icons/action.png' alt='act' class='contenttable-icon' />" . $_lang['admin.users.move'] . "</a></p>\n\n <div class='lpad'>\n\n <form class='cform' action='index.php' method='get' name='edituserform'" . _jsCheckForm("edituserform", array("id")) . ">\n <input type='hidden' name='p' value='users-edit' />\n <strong>" . $_lang['admin.users.edituser'] . "</strong><br /><input type='text' name='id' class='inputsmall' />\n <input type='submit' value='" . $_lang['global.continue'] . "' />\n </form><br />\n\n <form class='cform' action='index.php' method='get' name='deleteuserform'" . _jsCheckForm("deleteuserform", array("id")) . ">\n <input type='hidden' name='p' value='users-delete' />\n " . _xsrfProtect() . "\n <strong>" . $_lang['admin.users.deleteuser'] . "</strong><br /><input type='text' name='id' class='inputsmall' />\n <input type='submit' value='" . $_lang['global.do'] . "' onclick='return _sysConfirm();' />\n </form>\n\n </div>\n\n </td>\n " : '') . "\n\n\n " . (_loginright_admingroups ? "<td>\n <h2>" . $_lang['admin.users.groups'] . "</h2>\n <form action='index.php?p=users' method='post'><p class='bborder'><strong>" . $_lang['admin.users.groups.new'] . ":</strong> " . _admin_authorSelect("type", -1, "1", null, $_lang['admin.users.groups.new.empty'], true) . " <input type='submit' value='" . $_lang['global.do'] . "' /></p>" . _xsrfProtect() . "</form>\n " . $groups . "\n </td>\n " : '') . "\n\n\n</tr>\n</table>\n";