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


PHP form_input_checkbox函数代码示例

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


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

示例1: enforce_authentication

<?php

require '../../include/ctf.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
head('Site management');
menu_management();
section_subhead('New hint');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_hint');
form_textarea('Body');
$opts = db_query_fetch_all('
    SELECT
       ch.id,
       ch.title,
       ca.title AS category
    FROM challenges AS ch
    LEFT JOIN categories AS ca ON ca.id = ch.category
    ORDER BY ca.title, ch.title');
form_select($opts, 'Challenge', 'id', array_get($_GET, 'id', 0), 'title', 'category');
form_input_checkbox('Visible');
form_hidden('action', 'new');
form_button_submit('Create hint');
form_end();
foot();
开发者ID:azizjonm,项目名称:ctf-engine,代码行数:23,代码来源:new_hint.php

示例2: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
head('Site management');
menu_management();
section_subhead('New category');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_category');
form_input_text('Title');
form_textarea('Description');
form_input_checkbox('Exposed', true);
form_input_text('Available from', date_time());
form_input_text('Available until', date_time());
form_hidden('action', 'new');
form_button_submit('Create category');
form_end();
foot();
开发者ID:dirvuk,项目名称:mellivora,代码行数:17,代码来源:new_category.php

示例3: db_select_all

    <th>Hint</th>
    <th>Manage</th>
  </tr>
</thead>
<tbody>
';
$hints = db_select_all('hints', array('id', 'added', 'body'), array('challenge' => $_GET['id']));
foreach ($hints as $hint) {
    echo '
  <tr>
      <td>', date_time($hint['added']), '</td>
      <td>', htmlspecialchars($hint['body']), '</td>
      <td><a href="edit_hint.php?id=', htmlspecialchars(short_description($hint['id'], 100)), '" class="btn btn-xs btn-primary">Edit</a></td>
  </tr>
  ';
}
echo '
</tbody>
</table>

<a href="new_hint.php?id=', htmlspecialchars($_GET['id']), '" class="btn btn-sm btn-warning">Add a new hint</a>
';
section_subhead('Delete challenge: ' . $challenge['title']);
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_challenge');
form_input_checkbox('Delete confirmation');
form_hidden('action', 'delete');
form_hidden('id', $_GET['id']);
message_inline_red('Warning! This will also delete all submissions, all hints and all files associated with challenge!');
form_button_submit('Delete challenge', 'danger');
form_end();
foot();
开发者ID:azizjonm,项目名称:ctf-engine,代码行数:31,代码来源:edit_challenge.php

示例4: enforce_authentication

<?php

require '../../include/ctf.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
head('Site management');
menu_management();
section_subhead('New email signup restriction rule');
message_inline_blue('Add rules to restrict which emails can sign up.
                     Rules in list below are applied top-down. Rules further down on the list override rules above.
                     List is ordered by "priority". A higher "priority" value puts a rule further down the list.
                     Rules are PCRE regex. Example: ^.+@.+$');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_restrict_email');
form_input_text('Rule');
form_input_text('Priority');
form_input_checkbox('Whitelist');
form_input_checkbox('Enabled');
form_hidden('action', 'new');
form_button_submit('Create new rule');
form_end();
foot();
开发者ID:azizjonm,项目名称:ctf-engine,代码行数:20,代码来源:new_restrict_email.php

示例5: enforce_authentication

enforce_authentication(CONST_USER_CLASS_MODERATOR);
head('Site management');
menu_management();
if (array_get($_GET, 'bcc') == 'all') {
    $users = db_select_all('users', array('email'));
    $bcc = '';
    foreach ($users as $user) {
        $bcc .= $user['email'] . ",\n";
    }
    $bcc = trim($bcc);
}
section_subhead('New email');
message_inline_blue('Separate receiver emails with a comma and optional whitespace. You can use BBCode. If you do, you must send as HTML email.');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_email');
if (isset($bcc)) {
    form_input_text('To', CONFIG_EMAIL_FROM_EMAIL);
    form_input_text('CC');
    form_textarea('BCC', $bcc);
} else {
    form_input_text('To', isset($_GET['to']) ? $_GET['to'] : '');
    form_input_text('CC');
    form_input_text('BCC');
}
form_input_text('Subject');
form_textarea('Body');
form_input_checkbox('HTML email');
form_hidden('action', 'new');
message_inline_yellow('Important email? Remember to Ctrl+C before attempting to send!');
form_button_submit('Send email');
form_end();
foot();
开发者ID:janglapuk,项目名称:mellivora,代码行数:31,代码来源:new_email.php

示例6: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONFIG_UC_MODERATOR);
head('Site management');
menu_management();
section_subhead('New challenge');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_challenge');
form_input_text('Title');
form_textarea('Description');
form_textarea('Flag');
form_input_checkbox('Automark', true);
form_input_checkbox('Case insensitive');
form_input_text('Points');
form_input_text('Num attempts allowed');
form_input_text('Min seconds between submissions');
$opts = db_query_fetch_all('SELECT * FROM categories ORDER BY title');
form_select($opts, 'Category', 'id', $_GET['category'], 'title');
form_input_text('Available from', date_time());
form_input_text('Available until', date_time());
message_inline_blue('Create and edit challenge to add files.');
form_hidden('action', 'new');
form_button_submit('Create challenge');
form_end();
foot();
开发者ID:jpnelson,项目名称:mellivora,代码行数:25,代码来源:new_challenge.php

示例7: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONFIG_UC_MODERATOR);
enforce_instance_auth();
head('Site management');
menu_management();
section_subhead('New Instance');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_instance');
form_input_text('Name');
form_input_text('URI');
form_input_checkbox('Import Sample Challenge Set');
echo '<h4>Instance Administration</h4>';
form_input_text('Team Name');
form_input_text('Email');
echo '

<div class="form-group">
      <label class="col-sm-2 control-label" for="password">Password</label>
      <div class="col-sm-10">
          <input id="password" name="password" class="form-control" placeholder="Password" type="password">
      </div>
    </div>

</div>

	
';
form_hidden('action', 'new');
form_button_submit('Create Instance');
form_end();
开发者ID:ZlhlmChZ,项目名称:source-code-mell,代码行数:31,代码来源:new_instance.php

示例8: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
head('Site management');
menu_management();
section_subhead('New challenge');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_challenge');
form_input_text('Title');
form_textarea('Description');
form_textarea('Flag');
form_input_checkbox('Automark', true);
form_input_checkbox('Case insensitive');
form_input_checkbox('Expose');
form_input_text('Points');
form_input_text('Num attempts allowed');
form_input_text('Min seconds between submissions');
$opts = db_query_fetch_all('SELECT * FROM categories ORDER BY title');
form_select($opts, 'Category', 'id', $_GET['category'], 'title');
form_input_text('Available from', date_time());
form_input_text('Available until', date_time());
message_inline_blue('Create and edit challenge to add files.');
form_hidden('action', 'new');
form_button_submit('Create challenge');
form_end();
foot();
开发者ID:HackMiami,项目名称:mellivora,代码行数:26,代码来源:new_challenge.php


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