當前位置: 首頁>>代碼示例>>PHP>>正文


PHP section_subhead函數代碼示例

本文整理匯總了PHP中section_subhead函數的典型用法代碼示例。如果您正苦於以下問題:PHP section_subhead函數的具體用法?PHP section_subhead怎麽用?PHP section_subhead使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了section_subhead函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: message_generic

function message_generic($title, $message, $head = true, $foot = true, $exit = true)
{
    if ($head) {
        head($title);
    }
    section_subhead($title);
    message_inline_blue($message);
    if ($foot) {
        foot();
    }
    if ($exit) {
        exit;
    }
}
開發者ID:ZlhlmChZ,項目名稱:source-code-mell,代碼行數:14,代碼來源:messages.inc.php

示例2: 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

示例3: 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

示例4: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONFIG_UC_MODERATOR);
head('Site management');
menu_management();
section_subhead('New news post');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_news');
form_input_text('Title');
form_textarea('Body');
echo '<script>   window.onload = function(){CKEDITOR.replace("body", {
 filebrowserUploadUrl: "actions/upload.php"
});}</script>';
form_hidden('action', 'new');
form_button_submit('Publish news item');
form_bbcode_manual();
form_end();
foot();
開發者ID:ZlhlmChZ,項目名稱:source-code-mell,代碼行數:18,代碼來源:new_news.php

示例5: enforce_authentication

<?php

require '../../include/ctf.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
validate_id($_GET['id']);
$category = db_select_one('categories', array('*'), array('id' => $_GET['id']));
head('Site management');
menu_management();
section_subhead('Edit category: ' . $category['title']);
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_category');
form_input_text('Title', $category['title']);
form_textarea('Description', $category['description']);
form_input_checkbox('Exposed', $category['exposed']);
form_input_text('Available from', date_time($category['available_from']));
form_input_text('Available until', date_time($category['available_until']));
form_hidden('action', 'edit');
form_hidden('id', $_GET['id']);
form_button_submit('Save changes');
form_end();
section_subhead('Delete category: ' . $category['title']);
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_category');
form_input_checkbox('Delete confirmation');
form_hidden('action', 'delete');
form_hidden('id', $_GET['id']);
message_inline_red('Warning! This will delete all challenges under this category, as well as all submissions, files, and hints related those challenges!');
form_button_submit('Delete category', 'danger');
form_end();
foot();
開發者ID:azizjonm,項目名稱:ctf-engine,代碼行數:28,代碼來源:edit_category.php

示例6: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
validate_id($_GET['id']);
head('Site management');
menu_management();
section_subhead('Edit dynamic menu item');
$menu_item = db_select_one('dynamic_menu', array('*'), array('id' => $_GET['id']));
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_dynamic_menu_item');
form_input_text('Title', $menu_item['title']);
form_input_text('Permalink', $menu_item['permalink']);
dynamic_visibility_select($menu_item['visibility']);
$pages = db_select_all('dynamic_pages', array('id', 'title'));
array_unshift($pages, array('id' => 0, 'title' => '--- No internal link ---'));
form_select($pages, 'Internal page', 'id', $menu_item['internal_page'], 'title');
user_class_select($menu_item['min_user_class']);
form_input_text('URL', $menu_item['url']);
form_input_text('Priority', $menu_item['priority']);
form_hidden('action', 'edit');
form_hidden('id', $_GET['id']);
form_button_submit('Save changes');
form_end();
section_subhead('Delete menu item');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_dynamic_menu_item');
form_input_checkbox('Delete confirmation');
form_hidden('action', 'delete');
form_hidden('id', $_GET['id']);
form_button_submit('Delete menu item', 'danger');
form_end();
foot();
開發者ID:aallen,項目名稱:mellivora,代碼行數:31,代碼來源:edit_dynamic_menu_item.php

示例7: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
head('Site management');
menu_management();
section_subhead('New user type');
message_inline_blue('User types are not required. You can add them if you wish to group contestants and give them separate scoreboards. If not, everyone will be in the same group.');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_user_type');
form_input_text('Title');
form_textarea('Description');
form_hidden('action', 'new');
form_button_submit('Create new user type');
form_end();
foot();
開發者ID:dirvuk,項目名稱:mellivora,代碼行數:15,代碼來源:new_user_type.php

示例8: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
head('Site management');
menu_management();
section_subhead('New dynamic page');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/new_dynamic_page');
form_input_text('Title');
form_textarea('Body');
dynamic_visibility_select();
user_class_select();
form_hidden('action', 'new');
form_button_submit('Create');
form_bbcode_manual();
form_end();
foot();
開發者ID:dirvuk,項目名稱:mellivora,代碼行數:17,代碼來源:new_dynamic_page.php

示例9: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
validate_id($_GET['id']);
$news = db_select_one('news', array('*'), array('id' => $_GET['id']));
head('Site management');
menu_management();
section_subhead('Edit news item: ' . $news['title']);
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_news');
form_input_text('Title', $news['title']);
form_textarea('Body', $news['body']);
form_hidden('action', 'edit');
form_hidden('id', $_GET['id']);
form_button_submit('Save changes');
form_bbcode_manual();
form_end();
section_subhead('Delete news item');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_news');
form_input_checkbox('Delete confirmation');
form_hidden('action', 'delete');
form_hidden('id', $_GET['id']);
form_button_submit('Delete news item', 'danger');
form_end();
foot();
開發者ID:dirvuk,項目名稱:mellivora,代碼行數:25,代碼來源:edit_news.php

示例10: enforce_authentication

require '../../include/ctf.inc.php';
enforce_authentication(CONST_USER_CLASS_MODERATOR);
validate_id($_GET['id']);
head('Site management');
menu_management();
section_subhead('Edit hint');
$hint = db_select_one('hints', array('*'), array('id' => $_GET['id']));
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_hint');
form_textarea('Body', $hint['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', $hint['challenge'], 'title', 'category');
form_input_checkbox('Visible', $hint['visible']);
form_hidden('action', 'edit');
form_hidden('id', $_GET['id']);
form_button_submit('Save changes');
form_end();
section_subhead('Delete hint');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_hint');
form_input_checkbox('Delete confirmation');
form_hidden('action', 'delete');
form_hidden('id', $_GET['id']);
form_button_submit('Delete hint', 'danger');
form_end();
foot();
開發者ID:azizjonm,項目名稱:ctf-engine,代碼行數:30,代碼來源:edit_hint.php

示例11: 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

示例12: head

head('Site management');
menu_management();
section_subhead('Edit user: ' . $user['team_name']);
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_user');
form_input_text('Email', $user['email']);
form_input_text('Team name', $user['team_name']);
$opts = db_query_fetch_all('SELECT * FROM countries ORDER BY country_name ASC');
form_select($opts, 'Country', 'id', $user['country_id'], 'country_name');
form_input_checkbox('Enabled', $user['enabled']);
form_input_checkbox('Competing', $user['competing']);
form_hidden('action', 'edit');
form_hidden('id', $_GET['id']);
form_button_submit('Save changes');
form_end();
section_subhead('Reset password');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_user');
form_input_checkbox('Reset confirmation');
form_hidden('action', 'reset_password');
form_hidden('id', $_GET['id']);
form_button_submit('Reset password', 'warning');
form_end();
section_subhead('Delete user');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_user');
form_input_checkbox('Delete confirmation');
form_hidden('action', 'delete');
form_hidden('id', $_GET['id']);
message_inline_red('Warning! This will delete all submissions made by this user!');
form_button_submit('Delete user', 'danger');
section_subhead('IP address usage');
user_ip_log($_GET['id']);
foot();
開發者ID:jpnelson,項目名稱:mellivora,代碼行數:31,代碼來源:edit_user.php

示例13: print_user_ip_log

function print_user_ip_log($user_id, $limit = 0)
{
    validate_id($user_id);
    section_subhead('IP address usage', ($limit ? 'Limited to ' . $limit . ' results ' : '') . button_link('Show all for user', 'list_ip_log?user_id=' . htmlspecialchars($user_id)), false);
    echo '
        <table id="files" class="table table-striped table-hover">
          <thead>
            <tr>
              <th>IP</th>
              <th>Hostname</th>
              <th>First used</th>
              <th>Last used</th>
              <th>Times used</th>
            </tr>
          </thead>
          <tbody>
        ';
    $entries = db_query_fetch_all('
        SELECT
            INET_NTOA(ip) AS ip,
            added,
            last_used,
            times_used
        FROM ip_log
        WHERE user_id = :user_id
        ORDER BY last_used DESC
        ' . ($limit ? 'LIMIT ' . $limit : ''), array('user_id' => $user_id));
    foreach ($entries as $entry) {
        echo '
        <tr>
            <td><a href="', CONFIG_SITE_ADMIN_URL, 'list_ip_log.php?ip=', htmlspecialchars($entry['ip']), '">', htmlspecialchars($entry['ip']), '</a></td>
            <td>', CONFIG_GET_IP_HOST_BY_ADDRESS ? gethostbyaddr($entry['ip']) : '<i>Lookup disabled in config</i>', '</td>
            <td>', date_time($entry['added']), '</td>
            <td>', date_time($entry['last_used']), '</td>
            <td>', number_format($entry['times_used']), '</td>
        </tr>
        ';
    }
    echo '
          </tbody>
        </table>
         ';
}
開發者ID:dirvuk,項目名稱:mellivora,代碼行數:43,代碼來源:user.inc.php

示例14: enforce_authentication

<?php

require '../../include/mellivora.inc.php';
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!');
開發者ID:janglapuk,項目名稱:mellivora,代碼行數:31,代碼來源:new_email.php

示例15: validate_id

validate_id($_GET['id']);
$user = db_select_one('users', array('team_name', 'email', 'enabled', 'competing', 'country_id'), array('id' => $_GET['id']));
head('Site management');
menu_management();
section_subhead('Edit user: ' . $user['team_name']);
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_user');
form_input_text('Email', $user['email']);
form_input_text('Team name', $user['team_name']);
$opts = db_query_fetch_all('SELECT * FROM countries ORDER BY country_name ASC');
form_select($opts, 'Country', 'id', $user['country_id'], 'country_name');
form_input_checkbox('Enabled', $user['enabled']);
form_input_checkbox('Competing', $user['competing']);
form_hidden('action', 'edit');
form_hidden('id', $_GET['id']);
form_button_submit('Save changes');
form_end();
section_subhead('Reset password');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_user');
form_input_checkbox('Reset confirmation');
form_hidden('action', 'reset_password');
form_hidden('id', $_GET['id']);
form_button_submit('Reset password', 'warning');
form_end();
section_subhead('Delete user');
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_user');
form_input_checkbox('Delete confirmation');
form_hidden('action', 'delete');
form_hidden('id', $_GET['id']);
message_inline_red('Warning! This will delete all submissions made by this user!');
form_button_submit('Delete user', 'danger');
foot();
開發者ID:azizjonm,項目名稱:ctf-engine,代碼行數:31,代碼來源:edit_user.php


注:本文中的section_subhead函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。