Example #1
0
// Get the webGui configuration preferences
extract(parse_plugin_cfg("dynamix",true));

// Read emhttp status
$var     = parse_ini_file('state/var.ini');
$sec     = parse_ini_file('state/sec.ini',true);
$devs    = parse_ini_file('state/devs.ini',true);
$disks   = parse_ini_file('state/disks.ini',true);
$users   = parse_ini_file('state/users.ini',true);
$shares  = parse_ini_file('state/shares.ini',true);
$sec_nfs = parse_ini_file('state/sec_nfs.ini',true);
$sec_afp = parse_ini_file('state/sec_afp.ini',true);

// Merge SMART settings
require_once 'include/CustomMerge.php';

// Build webGui pages first, then plugins pages
$site = [];
build_pages('webGui/*.page');
foreach (glob('plugins/*', GLOB_ONLYDIR) as $plugin) {
  if ($plugin != 'plugins/dynamix') build_pages("$plugin/*.page");
}

// Here's the page we're rendering
$myPage = $site[basename($path)];
$pageroot = "{$docroot}/".dirname($myPage['file']);

// Giddyup
require_once 'include/DefaultPageLayout.php';
?>
Example #2
0
// The current "task" is the first element of the path
$task = strtok($path, '/');

// Get the webGui configuration preferences
extract(parse_plugin_cfg("dynamix",true));

// Read emhttp status
$var     = parse_ini_file('state/var.ini');
$sec     = parse_ini_file('state/sec.ini',true);
$devs    = parse_ini_file('state/devs.ini',true);
$disks   = parse_ini_file('state/disks.ini',true);
$users   = parse_ini_file('state/users.ini',true);
$shares  = parse_ini_file('state/shares.ini',true);
$sec_nfs = parse_ini_file('state/sec_nfs.ini',true);
$sec_afp = parse_ini_file('state/sec_afp.ini',true);

$site = array();
$base = 'dynamix';
// Build the webGui pages first
build_pages("$base/*.page");
// Build the plugins pages
foreach (glob('plugins/*', GLOB_ONLYDIR+GLOB_NOSORT) as $plugin) if ($plugin != $base) build_pages("$plugin/*.page");
// Here's the page we're rendering
$myPage = $site[basename($path)];
$pageroot = "{$docroot}/".dirname($myPage['file']);

// Giddyup
require_once('include/DefaultPageLayout.php');
?>
Example #3
0
function reorder_ui()
{
    global $wp_version;
    if ($wp_version >= 3.0) {
        //get the label of the current post_type
        foreach (get_post_types('', 'objects') as $post_type) {
            if ($post_type->name == $_GET['post_type']) {
                $pt = $post_type->label;
            } elseif (!$_GET['post_type']) {
                $pt = 'Posts';
            }
        }
    } else {
        $pt = ucwords($_GET['page']) . 's';
    }
    ?>
 
	<div class="wrap">
		<div id="icon-edit" class="icon32"><br /></div>
			<h2>Reorder <?php 
    echo $pt;
    ?>
</h2>
			<div class="tablenav">
				<p id="reorder-loading" class="alignleft">Drag and drop to reorder and then click "Apply New Order".</p>
				<div class="alignright">
					<span class="reorder-loading"></span>
					<input type="submit" id="post-query-submit" value="Apply New Order" class="button-secondary submit-reorder" />				
				</div>
			</div>
			<table class="widefat post fixed">
				<thead>
					<tr><th>Title</th><th width="38">ID</th><th width="38">Edit</th></tr>
				</thead>	
				<tr>
					<td style="padding: 0" colspan="3" id="reorder-list">
						<?php 
    /*<p><a href="#" class="reorder-expand-all">expand all</a> <a href="#" class="reorder-collapse-all">collapse all</a></p>*/
    ?>
						<ul id="order-posts-list<?php 
    if ($wp_version >= 3.0 && is_post_type_hierarchical($_GET["post_type"]) || $wp_version < 3.0 && $_GET['page'] == 'page') {
        echo '-nested';
    }
    ?>
" class="page-list">
						<?php 
    build_pages();
    ?>
						</ul>						
					</td>
				</tr>
				<tfoot>
					<tr><th>Title</th><th width="38">ID</th><th width="38">Edit</th></tr>
				</tfoot>
			</table>	
			<div class="tablenav">
				<div class="alignright">
					<span class="reorder-loading"></span>
					<input type="submit" id="post-query-submit" value="Apply New Order" class="button-secondary submit-reorder" />
				</div>
			</div>						
	</div>
<?php 
}