Esempio n. 1
0
<?php

//Bootstrap SPF
require 'includes/master.inc.php';
//This loads up $user - $isadmin - $js
require 'includes/user.inc.php';
printr(gimme(Options::groups(), 'group'));
?>
<form method="post">
    <select name='option' title='Options'>
        <?php 
echo get_options('options', 'key', 'key', @$_POST['option']);
?>
    
    </select> 
    <select name='group' title='Groups of options'>
        <?php 
echo get_options('options_groups', 'group', 'group', @$_POST['group']);
?>
    
    </select>
    <select  name='type' title='Type of variable'>
        <?php 
echo array2options(Options::types(), @$_POST['type']);
?>
    </select>
    <input type='hidden' name='action' value='update' />
    <input type='submit' class='input-large' value='Update' />
</form>

<?php 
Esempio n. 2
0
    }
    $hash = strtolower(str_replace(" ", "", $group['group']));
    $title = $group['desc'];
    echo '<li class="' . $active . '">
                <a data-toggle="tab" title="' . $title . '" href="#' . $hash . '">' . $group["group"] . '</a>
            </li>';
    $i++;
}
?>
      
    </ul>
    <div id="myTabContent" class="tab-content">
    
<?php 
$i = 0;
foreach (Options::groups() as $group) {
    $active = '';
    if ($i == 0) {
        $active = " active in";
    }
    $hash = strtolower(str_replace(" ", "", $group['group']));
    $title = $group['desc'];
    $name = $group['group'];
    echo '<div id="' . $hash . '" class="tab-pane fade' . $active . '">
                <div class="well">
                    <h3>' . $name . ' <small>' . $title . '</small></h3>
                    <br />';
    $options = Options::getList(false, $name);
    if (empty($options)) {
        echo "No results found";
    } else {