コード例 #1
0
ファイル: common.php プロジェクト: nirix/dreamer
/**
 * Get CSRF token form field.
 *
 * @return string
 */
function csrfField()
{
    return '<input type="hidden" name="csrf_token" value="' . csrfToken() . '">';
}
コード例 #2
0
ファイル: forms.php プロジェクト: Ezaki113/expl-3
function createCompleteForm()
{
    return ['fields' => ['_token' => ['name' => '_token', 'type' => 'hidden', 'value' => csrfToken(), 'validation' => ['require', 'csrf'], 'errors' => []], 'id' => ['name' => 'id', 'type' => 'hidden', 'value' => null, 'validation' => ['require', 'integer'], 'errors' => []]], 'attributes' => ['method' => 'post', 'action' => '/index.php/orders/complete']];
}
コード例 #3
0
ファイル: pay_form.php プロジェクト: Ezaki113/expl-3
function createPayForm()
{
    return ['fields' => ['_token' => ['name' => '_token', 'type' => 'hidden', 'value' => csrfToken(), 'validation' => ['require', 'csrf'], 'errors' => []], 'pay' => ['name' => 'pay', 'type' => 'text', 'value' => null, 'validation' => ['require', ['regexp', '/^\\d+(\\.\\d{1,2})?$/'], ['min_value', 1], ['max_value', 100000]], 'errors' => []]], 'attributes' => ['method' => 'post', 'action' => '/index.php/pay']];
}
コード例 #4
0
ファイル: common.php プロジェクト: Ezaki113/expl-3
function createForm()
{
    return ['fields' => ['_token' => ['name' => '_token', 'type' => 'hidden', 'value' => csrfToken(), 'validation' => ['require', 'csrf'], 'errors' => []], 'name' => ['label' => 'Имя', 'name' => 'name', 'type' => 'text', 'value' => null, 'validation' => ['require', ['min_length', 6], ['max_length', 20], 'name'], 'errors' => []], 'email' => ['label' => 'Email', 'name' => 'email', 'type' => 'email', 'value' => null, 'validation' => ['require', 'email'], 'errors' => []], 'password' => ['label' => 'Пароль', 'name' => 'password', 'type' => 'password', 'value' => null, 'validation' => ['require', ['min_length', 6]], 'errors' => []], 'password_repeat' => ['label' => 'Подтвердите пароль', 'name' => 'password_repeat', 'type' => 'password', 'value' => null, 'validation' => ['require', ['min_length', 6], ['equal', 'password']], 'errors' => []]], 'attributes' => ['method' => 'post']];
}
コード例 #5
0
ファイル: create_form.php プロジェクト: Ezaki113/expl-3
function createCreateForm()
{
    return ['fields' => ['_token' => ['name' => '_token', 'type' => 'hidden', 'value' => csrfToken(), 'validation' => ['require', 'csrf'], 'errors' => []], 'email' => ['label' => 'Email', 'name' => 'email', 'type' => 'email', 'value' => null, 'validation' => ['require', 'email'], 'errors' => []], 'password' => ['label' => 'Пароль', 'name' => 'password', 'type' => 'password', 'value' => null, 'validation' => ['require', ['min_length', 6]], 'errors' => []]], 'attributes' => ['method' => 'post']];
}
コード例 #6
0
ファイル: destroy_form.php プロジェクト: Ezaki113/expl-3
function createDestroyForm()
{
    return ['fields' => ['_token' => ['name' => '_token', 'type' => 'hidden', 'value' => csrfToken(), 'validation' => ['require', 'csrf'], 'errors' => []]], 'attributes' => ['method' => 'post', 'action' => '/index.php/logout']];
}