当前位置: 首页>>代码示例>>PHP>>正文


PHP _xsrfProtect函数代码示例

本文整理汇总了PHP中_xsrfProtect函数的典型用法代码示例。如果您正苦于以下问题:PHP _xsrfProtect函数的具体用法?PHP _xsrfProtect怎么用?PHP _xsrfProtect使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_xsrfProtect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _formMessage

if (!(_loginright_adminsection or _loginright_admincategory or _loginright_adminbook or _loginright_adminseparator or _loginright_admingallery or _loginright_adminintersection or _loginright_adminpluginpage)) {
    $continue = false;
    $output .= _formMessage(3, $_lang['global.accessdenied']);
} else {
    $continue = true;
}
/* ---  akce  --- */
if ($continue && isset($_POST['action'])) {
    // nacteni promennych
    $action = intval($_POST['action']);
    $zonedir = intval($_POST['zonedir']);
    $zone = floatval($_POST['zone']);
    $offset = floatval($_POST['offset']);
    // aplikace
    if ($action == 1) {
        $sign = "+";
    } else {
        $sign = "-";
    }
    if ($zonedir == 1) {
        $zonedir = ">";
    } else {
        $zonedir = "<";
    }
    DB::query("UPDATE `" . _mysql_prefix . "-root` SET ord=ord" . $sign . $offset . " WHERE ord" . $zonedir . "=" . $zone . " AND intersection=-1");
    $message = _formMessage(1, $_lang['global.done']);
}
/* ---  vystup  --- */
if ($continue) {
    $output .= "<p class='bborder'>" . $_lang['admin.content.move.p'] . "</p>" . $message . "\n<form class='cform' action='index.php?p=content-move' method='post'>\n<select name='action'><option value='1'>" . $_lang['admin.content.move.choice1'] . "</option><option value='2'>" . $_lang['admin.content.move.choice2'] . "</option></select>&nbsp;\n" . $_lang['admin.content.move.text1'] . "&nbsp;\n<select name='zonedir'><option value='1'>" . $_lang['admin.content.move.choice3'] . "</option><option value='2'>" . $_lang['admin.content.move.choice4'] . "</option></select>&nbsp;\n" . $_lang['admin.content.move.text2'] . "&nbsp;\n<input type='text' name='zone' value='1' class='inputmini' maxlength='5' />&nbsp;,\n" . $_lang['admin.content.move.text3'] . "&nbsp;\n<input type='text' name='offset' value='1' class='inputmini' maxlength='5' />.&nbsp;\n<input type='submit' value='" . $_lang['global.do'] . "' onclick='return _sysConfirm();' />\n" . _xsrfProtect() . "</form>\n";
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:content-move.php

示例2: define

            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>&nbsp;&nbsp;\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 ? "&nbsp;&nbsp;<small>" . $_lang['admin.content.form.thisid'] . " " . $id . "</small>&nbsp;&nbsp;<span class='customsettings'><a href='index.php?p=content-polls&amp;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']);
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:content-polls-edit.php

示例3: intval

/* ---  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";
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:30,代码来源:users-move.php

示例4: isset

    $root = isset($_GET['root']) ? '1' : '0';
    $art = isset($_GET['art']) ? '1' : '0';
    $post = isset($_GET['post']) ? '1' : '0';
    $image = isset($_GET['img']) ? '1' : '0';
} else {
    $search_query = '';
    $root = 1;
    $art = 1;
    $post = 1;
    $image = 0;
}
/* ---  modul  --- */
if (_template_autoheadings == 1) {
    $module .= "<h1>" . $_lang['mod.search'] . "</h1>";
}
$module .= "\n<p class='bborder'>" . $_lang['mod.search.p'] . "</p>\n\n<form action='index.php' method='get'>\n<input type='hidden' name='m' value='search' />\n" . _xsrfProtect() . "\n<input type='text' name='q' class='inputmedium' value='" . _htmlStr($search_query) . "' /> <input type='submit' value='" . $_lang['mod.search.submit'] . "' /><br />\n" . $_lang['mod.search.where'] . ":&nbsp;\n<label><input type='checkbox' name='root' value='1'" . _checkboxActivate($root) . " /> " . $_lang['mod.search.where.root'] . "</label>&nbsp;\n<label><input type='checkbox' name='art' value='1'" . _checkboxActivate($art) . " /> " . $_lang['mod.search.where.articles'] . "</label>&nbsp;\n<label><input type='checkbox' name='post' value='1'" . _checkboxActivate($post) . " /> " . $_lang['mod.search.where.posts'] . "</label>&nbsp;\n<label><input type='checkbox' name='img' value='1'" . _checkboxActivate($image) . " /> " . $_lang['mod.search.where.images'] . "</label>\n</form>\n\n";
/* ---  vyhledavani --- */
if ($search_query != '' && _xsrfCheck(true)) {
    if (mb_strlen($search_query) >= 3) {
        // priprava
        $search_query_sql = DB::esc('%' . $search_query . '%');
        $results = array();
        // polozka: array(link, titulek, perex)
        $public = !_loginindicator;
        // funkce na skladani vyhledavaciho dotazu
        function _tmpSearchQuery($alias, $cols)
        {
            $output = '(';
            for ($i = 0, $last = sizeof($cols) - 1; isset($cols[$i]); ++$i) {
                $output .= $alias . '.' . $cols[$i] . ' LIKE \'' . $GLOBALS['search_query_sql'] . '\'';
                if ($i !== $last) {
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:search.php

示例5: _formMessage

<?php

// kontrola jadra
if (!defined('_core')) {
    exit;
}
// titulek
if (_template_autoheadings == 1) {
    $output .= "<h1>" . $_lang['xsrf.title'] . "</h1>\n";
}
// zprava + formular
$output .= _formMessage(3, $_lang['xsrf.msg'] . '<ul><li>' . str_replace('*domain*', _getDomain(), $_lang['xsrf.warning']) . '</li></ul>');
$output .= "<form method='post'>\n" . _getPostdata(false, null, array('_security_token')) . _xsrfProtect() . "\n<p><input type='submit' value='" . $_lang['xsrf.button'] . "' /></p>\n</form>\n";
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:13,代码来源:xsrfscreen.php

示例6: _checkboxActivate

             }
         }
         // formular
         $output .= $message . "\n<form action='' method='post'>\n<table class='formtable'>\n\n<tr>\n    <td class='rpad'><strong>" . $_lang['admin.content.redir.old'] . "</strong></td>\n    <td><input type='text' name='old' value='" . $q['old'] . "' class='inputmedium' maxlength='255' /></td>\n</tr>\n\n<tr>\n    <td class='rpad'><strong>" . $_lang['admin.content.redir.new'] . "</strong></td>\n    <td><input type='text' name='new' value='" . $q['new'] . "' class='inputmedium' maxlength='255' /></td>\n</tr>\n\n<tr>\n    <td class='rpad'><strong>" . $_lang['admin.content.redir.act'] . "</strong></td>\n    <td><input type='checkbox' name='act' value='1'" . _checkboxActivate($q['active']) . " /></td>\n</tr>\n\n<tr>\n    <td></td>\n    <td><input type='submit' value='" . $_lang['global.' . ($new ? 'create' : 'save')] . "' /></td>\n</tr>\n\n</table>\n" . _xsrfProtect() . "</form>";
     } while (false);
 } elseif (isset($_GET['del']) && _xsrfCheck(true)) {
     // smazani
     DB::query('DELETE FROM `' . _mysql_prefix . '-redir` WHERE id=' . intval($_GET['del']));
     $output .= _formMessage(1, $_lang['global.done']);
 } elseif (isset($_GET['wipe'])) {
     // smazani vsech
     if (isset($_POST['wipe_confirm'])) {
         DB::query('TRUNCATE TABLE `' . _mysql_prefix . '-redir`');
         $output .= _formMessage(1, $_lang['global.done']);
     } else {
         $output .= "\n<form action='' method='post' class='formbox'>\n" . _formMessage(2, $_lang['admin.content.redir.act.wipe.confirm']) . "\n<input type='submit' name='wipe_confirm' value='" . $_lang['admin.content.redir.act.wipe.submit'] . "' />\n" . _xsrfProtect() . "</form>\n";
     }
 }
 // tabulka
 $output .= "<table class='list'>\n<thead><tr><td>" . $_lang['admin.content.redir.old'] . "</td><td>" . $_lang['admin.content.redir.new'] . "</td><td>" . $_lang['admin.content.redir.act'] . "</td><td>" . $_lang['global.action'] . "</td></tr></thead>\n<tbody>\n";
 // vypis
 $counter = 0;
 $q = DB::query('SELECT * FROM `' . _mysql_prefix . '-redir`');
 while ($r = DB::row($q)) {
     $output .= "<tr><td><code>" . $r['old'] . "</code></td><td><code>" . $r['new'] . "</code></td><td class='text-" . ($r['active'] ? 'green' : 'red') . "'>" . $_lang['global.' . ($r['active'] ? 'yes' : 'no')] . "</td><td><a href='index.php?p=content-redir&amp;edit=" . $r['id'] . "'><img src='images/icons/edit.png' alt='edit' class='icon' /></a>&nbsp;<a href='" . _xsrfLink("index.php?p=content-redir&amp;del=" . $r['id']) . "' onclick='return _sysConfirm();'><img src='images/icons/delete.png' alt='del' class='icon' /></a></td></tr>";
     ++$counter;
 }
 // zadna data?
 if ($counter === 0) {
     $output .= "<tr><td colspan='4'>" . $_lang['global.nokit'] . "</td></tr>\n";
 }
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:content-redir.php

示例7: _userLogout

<?php

/* ---  kontrola jadra  --- */
if (!defined('_core')) {
    exit;
}
/* ---  akce  --- */
$message = "";
if (isset($_POST['user'])) {
    $user = DB::esc(_anchorStr(trim($_POST['user'])));
    $query = DB::query("SELECT id,password FROM `" . _mysql_prefix . "-users` WHERE username='" . $user . "'");
    if (DB::size($query) != 0) {
        $query = DB::row($query);
        _userLogout(false);
        $_SESSION[_sessionprefix . "user"] = $query['id'];
        $_SESSION[_sessionprefix . "password"] = $query['password'];
        $_SESSION[_sessionprefix . "ip"] = _userip;
        $_SESSION[_sessionprefix . "ipbound"] = true;
        define('_redirect_to', _indexroot . 'index.php?m=login');
        return;
    } else {
        $message = _formMessage(2, $_lang['global.baduser']);
    }
}
/* ---  vystup  --- */
$output .= "\n<p class='bborder'>" . $_lang['admin.other.transm.p'] . "</p>\n" . $message . "\n<form action='index.php?p=other-transm' method='post'>\n<strong>" . $_lang['global.user'] . ":</strong> <input type='text' name='user' class='inputsmall' /> <input type='submit' value='" . $_lang['global.login'] . "' />\n" . _xsrfProtect() . "</form>\n";
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:26,代码来源:other-transm.php

示例8: mb_substr

        if (!isset($item['extension']) or $item['extension'] != "php") {
            continue;
        }
        $item = mb_substr($item['basename'], 0, mb_strrpos($item['basename'], "."));
        if ($item == _loginlanguage) {
            $selected = ' selected="selected"';
        } else {
            $selected = "";
        }
        $language_select .= '<option value="' . $item . '"' . $selected . '>' . $item . '</option>';
    }
    closedir($handle);
    $language_select .= '</select></td></tr>';
} else {
    $language_select = "";
}
// wysiwyg
if (_loginright_administration) {
    $admin = "\n\n\n\n  <tr>\n  <td><strong>" . $_lang['mod.settings.wysiwyg'] . "</strong></td>\n  <td><label><input type='checkbox' name='wysiwyg' value='1'" . _checkboxActivate($query['wysiwyg']) . " /> " . $_lang['mod.settings.wysiwyg.label'] . "</label></td>\n  </tr>\n\n  ";
} else {
    $admin = "";
}
$module .= "\n<p><a href='index.php?m=profile&amp;id=" . _loginname . "'>" . $_lang['mod.settings.profilelink'] . " &gt;</a></p>\n<p>" . $_lang['mod.settings.p'] . "</p>" . $message . "\n<form action='index.php?m=settings' method='post' name='setform' enctype='multipart/form-data'>\n\n" . _jsLimitLength(1024, "setform", "note") . "\n\n  <fieldset>\n  <legend>" . $_lang['mod.settings.userdata'] . "</legend>\n  <table class='profiletable'>\n\n  <tr>\n  <td><strong>" . $_lang['login.username'] . "</strong> <span class='important'>*</span></td>\n  <td><input type='text' name='username'" . _restorePostValue('username', _loginname) . " class='inputsmall' maxlength='24' />" . (!_loginright_changeusername ? "<span class='hint'>(" . $_lang['mod.settings.namechangenote'] . ")</span>" : '') . "</td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['mod.settings.publicname'] . "</strong></td>\n  <td><input type='text' name='publicname'" . _restorePostValue('publicname', $query['publicname']) . " class='inputsmall' maxlength='24' /></td>\n  </tr>\n\n  <tr class='valign-top'>\n  <td><strong>" . $_lang['global.email'] . "</strong> <span class='important'>*</span></td>\n  <td><input type='text' name='email'" . _restorePostValue('email', $query['email']) . " class='inputsmall'/></td>\n  </tr>\n\n  " . $language_select . "\n\n  <tr>\n  <td><strong>" . $_lang['mod.settings.massemail'] . "</strong></td>\n  <td><label><input type='checkbox' name='massemail' value='1'" . _checkboxActivate($query['massemail']) . " /> " . $_lang['mod.settings.massemail.label'] . "</label></td>\n  </tr>\n\n  " . $admin . "\n  </table>\n  </fieldset>\n\n\n  <fieldset>\n  <legend>" . $_lang['mod.settings.password'] . "</legend>\n  <p class='minip'>" . $_lang['mod.settings.password.hint'] . "</p>\n  <table class='profiletable'>\n\n  <tr>\n  <td><strong>" . $_lang['mod.settings.password.current'] . "</strong></td>\n  <td><input type='password' name='currentpassword' class='inputsmall' autocomplete='off' /></td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['mod.settings.password.new'] . "</strong></td>\n  <td><input type='password' name='newpassword' class='inputsmall' autocomplete='off' /></td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['mod.settings.password.new'] . " (" . $_lang['global.check'] . ")</strong></td>\n  <td><input type='password' name='newpassword-confirm' class='inputsmall' autocomplete='off' /></td>\n  </tr>\n\n  </table>\n  </fieldset>\n\n  " . _extend('buffer', 'mod.settings.form') . "\n\n\n  <fieldset>\n  <legend>" . $_lang['mod.settings.info'] . "</legend>\n\n  <table class='profiletable'>\n\n  <tr>\n  <td><strong>" . $_lang['global.icq'] . "</strong></td>\n  <td><input type='text' name='icq'" . _restorePostValue('icq', $query['icq']) . " class='inputsmall' /></td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['global.skype'] . "</strong></td>\n  <td><input type='text' name='skype'" . _restorePostValue('skype', $query['skype']) . " class='inputsmall' /></td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['global.msn'] . "</strong></td>\n  <td><input type='text' name='msn'" . _restorePostValue('msn', $query['msn']) . " class='inputsmall' /></td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['global.jabber'] . "</strong></td>\n  <td><input type='text' name='jabber'" . _restorePostValue('jabber', $query['jabber']) . " class='inputsmall' /></td>\n  </tr>\n\n  <tr>\n  <td><strong>" . $_lang['global.web'] . "</strong></td>\n  <td><input type='text' name='web' value='" . $query['web'] . "' class='inputsmall' /><span class='hint'>" . $_lang['mod.settings.web.hint'] . "</span></td>\n  </tr>\n\n  <tr class='valign-top'>\n  <td><strong>" . $_lang['global.note'] . "</strong></td>\n  <td><textarea name='note' class='areasmall' rows='9' cols='33'>" . _restorePostValue('note', $query['note'], true) . "</textarea></td>\n  </tr>\n\n  <tr><td></td>\n  <td>" . _getPostFormControls("setform", "note") . "</td>\n  </tr>\n\n  </table>\n\n  </fieldset>\n";
if (_uploadavatar) {
    $module .= "\n  <fieldset>\n  <legend>" . $_lang['mod.settings.avatar'] . "</legend>\n  " . _extend('buffer', 'mod.settings.avatar', array('extra' => array('query' => $query))) . "\n  <p><strong>" . $_lang['mod.settings.avatar.upload'] . ":</strong> <input type='file' name='avatar' /></p>\n    <table>\n    <tr class='valign-top'>\n    <td width='106'><div class='avatar'><img src='" . $avatar_path . "' alt='avatar' /></div></td>\n    <td><p class='minip'>" . $_lang['mod.settings.avatar.hint'] . "</p><p><label><input type='checkbox' name='removeavatar' value='1' /> " . $_lang['mod.settings.avatar.remove'] . "</label></p></td>\n    </tr>\n    </table>\n  </fieldset>\n";
}
if (_loginright_selfdestruction and _loginid != 0) {
    $module .= "\n\n  <fieldset>\n  <legend>" . $_lang['mod.settings.selfremove'] . "</legend>\n  <label><input type='checkbox' name='selfremove' value='1' onclick='if (this.checked==true) {return _sysConfirm();}' /> " . $_lang['mod.settings.selfremove.box'] . "</label><br /><br />\n  <div class='lpad'><strong>" . $_lang['mod.settings.selfremove.confirm'] . ":</strong> <input type='password' name='selfremove-confirm' class='inputsmall' /></div>\n  </fieldset>\n\n";
}
$module .= "\n<br />\n<input type='submit' value='" . $_lang['mod.settings.submit'] . "' />\n<input type='reset' value='" . $_lang['global.reset'] . "' onclick='return _sysConfirm();' />\n\n" . _xsrfProtect() . "</form>\n";
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:30,代码来源:settings.php

示例9: _HCM_search

function _HCM_search()
{
    if (_search) {
        return "<form action='index.php' method='get' class='searchform'>\n<input type='hidden' name='m' value='search' />\n<input type='hidden' name='root' value='1' />\n<input type='hidden' name='art' value='1' />\n<input type='hidden' name='post' value='1' />\n" . _xsrfProtect() . "\n<input type='text' name='q' class='q' /> <input type='submit' value='" . $GLOBALS['_lang']['mod.search.submit'] . "' />\n</form>\n";
    }
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:6,代码来源:search.php

示例10: _checkboxLoad

        // 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";
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:30,代码来源:other-cleanup.php

示例11: _formMessage

                    $output .= _formMessage(2, $_lang['admin.moduleunavailable']);
                }
            } else {
                $output .= "<h1>" . $_lang['global.error'] . "</h1>" . _formMessage(3, $_lang['global.accessdenied']);
            }
        } else {
            $output .= "<h1>" . $_lang['global.error404.title'] . "</h1>" . _formMessage(2, $_lang['global.error404']);
        }
    }
} else {
    // prihlasovaci formular
    if (empty($_POST)) {
        $login = _uniForm("login");
        $output .= $login[0];
    } else {
        $output .= "<h1>" . $_lang['admin.postrestore.title'] . "</h1>\n<p class='bborder'>" . $_lang['admin.postrestore.p'] . "</p>\n" . _formMessage(2, $_lang['admin.postrestore.msg']) . "\n<form action='' method='post'>\n<input type='submit' name='' value='" . $_lang['admin.postrestore.button'] . "' />\n" . _getPostdata(false, null, array('_security_token')) . "\n" . _xsrfProtect() . "</form>\n";
    }
}
/* ---  paticka, vypis vystupu  --- */
// paticka
$output .= '
<div class="cleaner"></div>
</div>

<hr class="hidden" />
<div id="copyright">
<div>' . ((_loginindicator and _loginright_administration) ? '<a href="' . _url . '/" target="_blank">' . $_lang['admin.link.site'] . '</a> &nbsp;&bull;&nbsp; <a href="./" target="_blank">' . $_lang['admin.link.newwin'] . '</a>' : '<a href="../">&lt; ' . $_lang['admin.link.home'] . '</a>') . '</div>
';
// vypis
if (!($redir = defined('_redirect_to'))) {
    echo $output;
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:index.php

示例12: define

<?php

/* ---  kontrola jadra  --- */
if (!defined('_core')) {
    exit;
}
/* ---  zpracovani ulozeni  --- */
if (isset($_POST['text'])) {
    DB::query('UPDATE `' . _mysql_prefix . '-settings` SET `val`=\'' . DB::esc(trim($_POST['text'])) . '\' WHERE `var`=\'.admin_index_custom\'');
    DB::query('UPDATE `' . _mysql_prefix . '-settings` SET `val`=\'' . ($_POST['pos'] == 0 ? '0' : '1') . '\' WHERE `var`=\'.admin_index_custom_pos\'');
    define('_redirect_to', 'index.php?p=index-edit&saved');
    return;
}
/* ---  vystup  --- */
$output .= "\n\n<p class='bborder'>" . $_lang['admin.menu.index.edit.p'] . "</p>\n\n" . _admin_wysiwyg() . "\n" . (isset($_GET['saved']) ? _formMessage(1, $_lang['global.saved']) : '') . "\n\n<form action='' method='post'>\n\n<table class='formtable'>\n\n<tr>\n    <td class='rpad'><strong>" . $_lang['admin.menu.index.edit.pos'] . "</strong></td>\n    <td><select name='pos'>\n        <option value='0'" . (SL::$settings['admin_index_custom_pos'] == 0 ? " selected='selected'" : '') . ">" . $_lang['admin.menu.index.edit.pos.0'] . "</option>\n        <option value='1'" . (SL::$settings['admin_index_custom_pos'] == 1 ? " selected='selected'" : '') . ">" . $_lang['admin.menu.index.edit.pos.1'] . "</option>\n    </select></td>\n</tr>\n\n<tr class='valign-top'>\n    <td class='rpad'><strong>" . $_lang['admin.menu.index.edit.text'] . "</strong></td>\n    <td class='minwidth'><textarea name='text' rows='25' cols='94' class='areabig wysiwyg_editor" . (!_wysiwyg || !_loginwysiwyg ? ' codemirror' : '') . "'>" . _htmlStr(SL::$settings['admin_index_custom']) . "</textarea></td>\n</tr>\n\n<tr>\n    <td></td>\n    <td><input type='submit' value='" . $_lang['global.savechanges'] . "' /></td>\n</tr>\n\n</table>\n\n" . _xsrfProtect() . "</form>\n";
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:15,代码来源:index-edit.php

示例13: _formMessage

/* ---  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";
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:content-editscript.php

示例14: switch

    // zpravy
    $messages_code = "";
    if (isset($_GET['r'])) {
        switch ($_GET['r']) {
            case 1:
                $messages_code .= _formMessage(1, $_lang['global.saved']);
                break;
            case 2:
                $messages_code .= _formMessage(1, $_lang['global.created']);
                break;
        }
    }
    if ($message != "") {
        $messages_code .= _formMessage(2, $message);
    }
    $output .= "\n<p class='bborder'>" . $_lang['admin.users.edit.p'] . "</p>\n" . $messages_code . "\n<form autocomplete='off' action='index.php?p=users-edit" . ($id != null ? "&amp;id=" . $id : '') . "' method='post' name='userform'" . _jsCheckForm("userform", $id != null ? array("username", "email") : array("username", "email", "password")) . ">\n<table class='formtable'>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['login.username'] . "</strong></td>\n<td><input type='text' name='username' class='inputsmall'" . _restorePostValue('username', $query['username']) . " maxlength='24' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['mod.settings.publicname'] . "</strong></td>\n<td><input type='text' name='publicname' class='inputsmall'" . _restorePostValue('publicname', $query['publicname'], false, true, false) . " maxlength='24' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang[$id == null ? 'login.password' : 'mod.settings.password.new'] . "</strong></td>\n<td><input type='password' name='password' class='inputsmall' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.group'] . "</strong></td>\n<td>" . $group_select . "</td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['login.blocked'] . "</strong></td>\n<td><input type='checkbox' name='blocked' value='1'" . _checkboxActivate($query['blocked'] || isset($_POST['blocked'])) . " /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.levelshift'] . "</strong></td>\n<td><input type='checkbox' name='levelshift' value='1'" . _checkboxActivate($query['levelshift'] || isset($_POST['levelshift'])) . _inputDisable(_loginid == 0) . " /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.email'] . "</strong></td>\n<td><input type='text' name='email' class='inputsmall'" . _restorePostValue('email', $query['email']) . " /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.icq'] . "</strong></td>\n<td><input type='text' name='icq' class='inputsmall' value='" . (($val = _restorePostValue('icq', $query['icq'], true)) != 0 ? $val : '') . "' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.skype'] . "</strong></td>\n<td><input type='text' name='skype' class='inputsmall'" . _restorePostValue('skype', $query['skype']) . " /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.msn'] . "</strong></td>\n<td><input type='text' name='msn' class='inputsmall'" . _restorePostValue('msn', $query['msn']) . " /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.jabber'] . "</strong></td>\n<td><input type='text' name='jabber' class='inputsmall' value='" . $query['jabber'] . "' /></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.web'] . "</strong></td>\n<td><input type='text' name='web' class='inputsmall'" . _restorePostValue('web', $query['web'], false, true, false) . " /> <small>" . $_lang['mod.settings.web.hint'] . "</small></td>\n</tr>\n\n<tr>\n<td class='rpad'><strong>" . $_lang['global.avatar'] . "</strong></td>\n<td><label><input type='checkbox' name='removeavatar' value='1' /> " . $_lang['mod.settings.avatar.remove'] . "</label></td>\n</tr>\n\n<tr class='valign-top'>\n<td class='rpad'><strong>" . $_lang['global.note'] . "</strong></td>\n<td><textarea name='note' class='areasmall' rows='9' cols='33'>" . _restorePostValue('note', $query['note'], true, true, false) . "</textarea></td>\n</tr>\n\n<tr><td></td>\n<td><input type='submit' value='" . $_lang[isset($_GET['id']) ? 'global.save' : 'global.create'] . "' />" . ($id != null ? "&nbsp;&nbsp;<small>" . $_lang['admin.content.form.thisid'] . " " . $query['id'] . "</small>" : '') . "</td>\n</tr>\n\n</table>\n" . _xsrfProtect() . "</form>\n";
    // odkaz na profil a zjisteni ip
    if ($id != null) {
        $output .= "\n  <p>\n  <a href='" . _indexroot . "index.php?m=profile&amp;id=" . $query['username'] . "' target='_blank'>" . $_lang['mod.settings.profilelink'] . " &gt;</a>\n  " . (_loginright_adminbans ? "<br /><a href='index.php?p=other-bans&amp;getip=" . $query['username'] . "'>" . $_lang['admin.other.bans.getuserip'] . " &gt;</a>" : '') . "\n  </p>\n  ";
    }
} else {
    switch ($errno) {
        case 1:
            $output .= _formMessage(2, $_lang['global.baduser']);
            break;
        case 2:
            $output .= _formMessage(2, $_lang['global.rootnote']);
            break;
        default:
            $output .= _formMessage(3, $_lang['global.disallowed']);
            break;
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:users-edit.php

示例15: array

    }
    /* ---  vystup  --- */
    // pole souvisejicich polozek
    $content_array = array();
    switch ($query['type']) {
        case 1:
            $content_array[] = DB::result(DB::query("SELECT COUNT(id) FROM `" . _mysql_prefix . "-posts` WHERE type=1 AND home=" . $id), 0) . " " . $_lang['admin.content.delete.comments'];
            break;
        case 2:
            $content_array[] = DB::result(DB::query("SELECT COUNT(id) FROM `" . _mysql_prefix . "-articles` WHERE home1=" . $id . " AND home2=-1 AND home3=-1"), 0) . " " . $_lang['admin.content.delete.articles'];
            break;
        case 3:
            $content_array[] = DB::result(DB::query("SELECT COUNT(id) FROM `" . _mysql_prefix . "-posts` WHERE type=3 AND home=" . $id), 0) . " " . $_lang['admin.content.delete.posts'];
            break;
        case 5:
        case 3:
            $content_array[] = DB::result(DB::query("SELECT COUNT(id) FROM `" . _mysql_prefix . "-images` WHERE home=" . $id), 0) . " " . $_lang['admin.content.delete.images'];
            break;
        case 8:
            $content_array[] = DB::result(DB::query("SELECT COUNT(id) FROM `" . _mysql_prefix . "-posts` WHERE type=5 AND home=" . $id), 0) . " " . $_lang['admin.content.delete.posts'];
            break;
        case 9:
            _extend('call', 'ppage.' . $query['type_idt'] . '.delete.confirm', array('contents' => &$content_array, 'query' => $query));
            break;
        default:
            $content_array[] = $_lang['admin.content.delete.norelated'];
    }
    $output .= "\n    <p class='bborder'>" . $_lang['admin.content.delete.p'] . "</p>\n    <h2>" . $_lang['global.item'] . " <em>" . $query['title'] . "</em></h2><br />\n    " . (!empty($content_array) ? "<p>" . $_lang['admin.content.delete.contentlist'] . ":</p>" . _eventList($content_array) . "<div class='hr'><hr /></div>" : '') . "\n\n    <form class='cform' action='index.php?p=content-delete&amp;id=" . $id . "' method='post'>\n    <input type='hidden' name='confirm' value='1' />\n    <input type='submit' value='" . $_lang['admin.content.delete.confirm'] . "' />\n    " . _xsrfProtect() . "</form>\n    ";
} else {
    $output .= _formMessage(3, $_lang['global.badinput']);
}
开发者ID:sunlight-cms,项目名称:sunlight-cms-7,代码行数:31,代码来源:content-delete.php


注:本文中的_xsrfProtect函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。