Beispiel #1
0
 if ($_POST['send'] == 'TB') {
     $show = 'TB';
     $TB_settings['TB_speedAction'] = @$_POST['NumberRequests'];
     $TB_settings['TB_giftboxLimit'] = @$_POST['giftboxLimit'];
     $TB_settings['TB_getEmptyPositionUseRandom'] = @$_POST['getEmptyPositionUseRandom'];
     $TB_settings['TB_sectionsUseSections'] = @$_POST['sectionsUseSections'];
     $TB_settings['TB_sectionsUseGiftBox'] = @$_POST['sectionsUseGiftBox'];
     $TB_settings['TB_sectionsUseGiftBoxDecoration'] = @$_POST['sectionsUseGiftBoxDecoration'];
     //flowermanager settings
 } elseif ($_POST['send'] == 'FM') {
     $show = 'FM';
     $TB_settings['FM_action'] = @$_POST['action'];
     $TB_settings['FM_replaceSource'] = @$_POST['replaceSource'];
     $TB_settings['FM_replaceSame'] = @$_POST['replaceSame'];
     $shed = array();
     $shed = FM_loadFlowershed();
     unset($TB_settings['FM_actionP']['place']);
     if (!empty($shed['contents'])) {
         foreach ($shed['contents'] as $arr) {
             $itemName = GetNameByCode($arr['itemCode']);
             if (isset($_POST['place_' . $itemName])) {
                 if ($_POST['place_' . $itemName] > 0) {
                     $TB_settings['FM_actionP']['place'][$itemName] = $_POST['place_' . $itemName];
                     if ($TB_settings['FM_actionP']['place'][$itemName] > $arr['numItem']) {
                         $TB_settings['FM_actionP']['place'][$itemName] = $arr['numItem'];
                     }
                 }
             }
         }
     }
     //animalmanager settings
Beispiel #2
0
function FM_buildTable()
{
    global $TB_settings;
    $shed = array();
    $shed = FM_loadFlowershed();
    $c = 1;
    @ksort($shed);
    if (!empty($shed['contents'])) {
        foreach ($shed['contents'] as $arr) {
            if ($arr['numItem'] == 0) {
                continue;
            }
            $itemName = GetNameByCode($arr['itemCode']);
            echo '<tr>';
            //name
            echo '<td>';
            echo '&raquo; ' . GetNameByItem($itemName);
            echo '</td>';
            // anzahl
            echo '<td align="center">';
            echo $arr['numItem'];
            echo '</td>';
            // FM place
            echo '<td>';
            if (isset($TB_settings['FM_actionP']['place'][$itemName])) {
                $count = $TB_settings['FM_actionP']['place'][$itemName];
            } else {
                $count = 0;
            }
            echo "<input type='text' name='place_" . $itemName . "' value='" . $count . "' size='2'>";
            echo '</td>';
            echo '</tr>';
            if ($c % 5 == 0) {
                echo '<tr>';
                echo '<td>&nbsp;</td>';
                echo '</tr>';
            }
            $c++;
        }
    }
}