Esempio n. 1
0
     $TB_settings['MG_openGiftsFarm'] = @$_POST['openGiftsFarm'];
     $TB_settings['MG_openGiftsFarmAll'] = @$_POST['openGiftsFarmAll'];
     $TB_settings['MG_openGiftsGiftbox'] = @$_POST['openGiftsGiftbox'];
     $TB_settings['MG_openGiftsGiftboxAll'] = @$_POST['openGiftsGiftboxAll'];
     $TB_settings['MG_openGiftsGiftboxJustPlace'] = @$_POST['openGiftsGiftboxJustPlace'];
     //eggs
     $TB_settings['MG_openEggsFarm'] = @$_POST['openEggsFarm'];
     $TB_settings['MG_openEggsFarmAll'] = @$_POST['openEggsFarmAll'];
     $TB_settings['MG_openEggsGiftbox'] = @$_POST['openEggsGiftbox'];
     $TB_settings['MG_openEggsGiftboxAll'] = @$_POST['openEggsGiftboxAll'];
     $TB_settings['MG_openEggsGiftboxJustPlace'] = @$_POST['openEggsGiftboxJustPlace'];
     //storagemanager settings
 } elseif ($_POST['send'] == 'SM') {
     $show = 'SM';
     $storage = array();
     $storage = TB_loadStorage();
     unset($TB_settings['SM_action']['sell']);
     unset($TB_settings['SM_action']['place']);
     foreach ($storage as $i => $num) {
         //sell
         if (isset($_POST['sell_' . $i])) {
             if ($_POST['sell_' . $i] > 0) {
                 $TB_settings['SM_action']['sell'][$i] = $_POST['sell_' . $i];
                 if ($TB_settings['SM_action']['sell'][$i] > $num) {
                     $TB_settings['SM_action']['sell'][$i] = $num;
                 }
             }
         }
         //place
         if (isset($_POST['place_' . $i])) {
             if ($_POST['place_' . $i] > 0) {
Esempio n. 2
0
function SM_buildTable()
{
    global $TB_settings;
    $storage = array();
    $storage = TB_loadStorage();
    $units = array();
    $units = TB_loadUnits();
    $c = 1;
    ksort($storage);
    foreach ($storage as $i => $num) {
        echo '<tr>';
        //name
        echo '<td>';
        echo '&raquo; ' . GetNameByItem($i);
        echo '</td>';
        // size
        echo '<td>';
        echo 'X: ' . $units[$i]['sizeX'] . ' - Y: ' . $units[$i]['sizeY'];
        echo '</td>';
        // anzahl
        echo '<td align="center">';
        echo $num;
        echo '</td>';
        // SM sell
        echo '<td>';
        if (isset($TB_settings['SM_action']['sell'][$i])) {
            $count = $TB_settings['SM_action']['sell'][$i];
        } else {
            $count = 0;
        }
        echo "<input type='text' name='sell_" . $i . "' value='" . $count . "' size='2'>";
        echo '</td>';
        // SM place
        echo '<td>';
        if (isset($TB_settings['SM_action']['place'][$i])) {
            $count = $TB_settings['SM_action']['place'][$i];
        } else {
            $count = 0;
        }
        echo "<input type='text' name='place_" . $i . "' value='" . $count . "' size='2'>";
        echo '</td>';
        echo '</tr>';
        if ($c % 5 == 0) {
            echo '<tr>';
            echo '<td>&nbsp;</td>';
            echo '</tr>';
        }
        $c++;
    }
}