function ajax_load_section()
{
    $nonce = isset($_POST['postCommentNonce']) ? $_POST['postCommentNonce'] : '';
    if (!wp_verify_nonce($nonce, 'myajax-post-comment-nonce')) {
        die('Busted!');
    }
    $counter = isset($_POST['counter']) ? $_POST['counter'] : '';
    $post_id = isset($_POST['post_id']) ? $_POST['post_id'] : '';
    ob_start();
    create_section($post_id, $counter);
    $result = ob_get_contents();
    ob_end_clean();
    echo json_encode(array('results' => $result));
    die;
}
<?php

/**************************************************************************\
	* eGroupWare - Preferences                                                 *
	* http://www.eGroupWare.org                                                *
	* --------------------------------------------                             *
	*  This program is free software; you can redistribute it and/or modify it *
	*  under the terms of the GNU General Public License as published by the   *
	*  Free Software Foundation; either version 2 of the License, or (at your  *
	*  option) any later version.                                              *
	\**************************************************************************/
/* $Id: hook_settings.inc.php,v 1.1.2.1 2004/09/28 10:17:33 bgigon Exp $ */
create_section('Preferences for the idots template set');
$start_and_logout_icons = array('yes' => lang('yes'), 'no' => lang('no'));
create_select_box('Show home and logout button in main application bar?', 'start_and_logout_icons', $start_and_logout_icons, 'When you say yes the home and logout buttons are presented as applications in the main top applcation bar.');
create_input_box('Max number of icons in navbar', 'max_icons', 'How many icons should be shown in the navbar (top of the page). Additional icons go into a kind of pulldown menu, callable by the icon on the far right side of the navbar.', '', 3);
create_check_box('Autohide Sidebox menu\'s', 'auto_hide_sidebox', 'Automatically hide the Sidebox menu\'s?');
$click_or_onmouseover = array('click' => lang('Click'), 'onmouseover' => lang('On Mouse Over'));
create_select_box('Click or Mouse Over to show menus', 'click_or_onmouseover', $click_or_onmouseover, 'Click or Mouse Over to show menus?');
create_check_box('Disable slider effects', 'disable_slider_effects', 'Disable the animated slider effects when showing or hiding menus in the page? Opera and Konqueror users will probably must want this.');
create_check_box('Disable Internet Explorer png-image-bugfix', 'disable_pngfix', 'Disable the execution a bugfixscript for Internet Explorer 5.5 and higher to show transparency in PNG-images?');
create_check_box('Show page generation time', 'show_generation_time', 'Show page generation time on the bottom of the page?');
示例#3
0
文件: tab1.php 项目: tjankovic/FAB-UI
<div class="tab-pane fade active in" id="tab1">

	<div class="row">

		<div class="col-sm-12">

			<div id="accordion_tab1">
			<?php 
foreach ($sections as $section) {
    ?>
			
			<?php 
    echo create_section($section);
    ?>
			
			<?php 
}
?>
			
			</div>

		</div>

	</div>


</div>
<?php

/**************************************************************************\
	* eGroupWare - Filemanager Preferences                                     *
	* http://egroupware.org                                                    *
	* Modified by Pim Snel <*****@*****.**>                                *
	* --------------------------------------------                             *
	*  This program is free software; you can redistribute it and/or modify it *
	*  under the terms of the GNU General Public License as published by the   *
	*  Free Software Foundation; either version 2 of the License, or (at your  *
	*  option)                                                                 *
	\**************************************************************************/
//ExecMethod('filemanager.bofilemanager.check_set_default_prefs');
/*create_section('TESTING');

	create_check_box('Use new experimental Filemanager?','experimental_new_code','The future filemanager, now for TESTING PURPOSES ONLY, please send bugreports');

	*/
create_section('Display attributes');
$file_attributes = array('name' => 'File Name', 'mime_type' => 'MIME Type', 'size' => 'Size', 'created' => 'Created', 'modified' => 'Modified', 'owner' => 'Owner', 'createdby_id' => 'Created by', 'modifiedby_id' => 'Created by', 'modifiedby_id' => 'Modified by', 'app' => 'Application', 'comment' => 'Comment', 'version' => 'Version');
while (list($key, $value) = each($file_attributes)) {
    create_check_box($value, $key);
}
create_section('Other settings');
$other_checkboxes = array("viewinnewwin" => "View documents in new window", "viewonserver" => "View documents on server (if available)", "viewtextplain" => "Unknown MIME-type defaults to text/plain when viewing", "dotdot" => "Show ..", "dotfiles" => "Show .files");
while (list($key, $value) = each($other_checkboxes)) {
    create_check_box($value, $key);
}
$upload_boxes = array("1" => "1", "5" => "5", "10" => "10", "20" => "20", "30" => "30");
create_select_box('Default number of upload fields to show', 'show_upload_boxes', $upload_boxes);
<?php

/**************************************************************************\
   * eGroupWare - Jinn Preferences                                            *
   * http://egroupware.org                                                    *
   * Written by Pim Snel <*****@*****.**>                                 *
   * --------------------------------------------                             *
   *  This program is free software; you can redistribute it and/or modify it *
   *  under the terms of the GNU General Public License as published by the   *
   *  Free Software Foundation; version 2 of the License.                     *
   \**************************************************************************/
// In the future these settings go to the plugin file
create_section('Images');
$prev_img = array('no' => lang('Never'), 'only_tn' => lang('Only if thumnails exits'), 'yes' => lang('Yes'));
create_select_box('Preview thumbs or images in form', 'prev_img', $prev_img, "When you choose 'Never', only links to the images are displayed; when you choose 'Only if thumnails exists' previews are  shown if an thumbnail of the image exists; if you choose 'Yes' all images are shown");
$max_prev = array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "10" => "10", "20" => "20", "30" => "30", "-1" => lang("No max. number"));
create_select_box('Max. number of previews in form', 'max_prev', $max_prev, 'When a lot of images are attached to a record, the form can load very slow. You can set a maximum number of images that is show in the form.');
create_section('WYSIWYG plugin');
$disable_htmlarea = array('no' => lang('No'), 'yes' => lang('Yes'));
create_select_box('Disable the WYSIWYG/HTMLArea Plugin', 'disable_htmlarea', $disable_htmlarea, "The WYSIWYG plugin makes you edit text like you do in a program like OpenOffice Writer or Word. Some people don't like this feature though, so you can force JiNN not to use it.");
create_section('JiNN Developer Settings');
$show_extra_table_info = array('no' => lang('No'), 'yes' => lang('Yes'));
create_select_box('Show extra table debugging information', 'table_debugging_info', $show_extra_table_info, "When this is enables information like field length and field type is shown when editing record");
$activate_alpha_features = array('no' => lang('No'), 'yes' => lang('Yes'));
create_select_box('Activate experimental features which are in development', 'experimental', $activate_alpha_features, 'Only activate this if you know what your doing. You can destroy your data using experimental features.');