$values = explode("/", $prodrow['opts']); foreach ($values as $number) { if (is_numeric($number)) { $optrow = $db->qry_first("SELECT price, caption FROM %prefix%food_option WHERE id = %int%", $number); $price += $optrow['price']; $tempdesc .= $optrow['caption']; } } } else { $optrow = $db->qry_first("SELECT price, caption FROM %prefix%food_option WHERE id = %int%", $prodrow['opts']); $price += $optrow['price']; $tempdesc .= $optrow['caption']; } $totprice += $price * $prodrow['pice']; $tempsession = $_SESSION; $account->change($totprice, t('Rückzahlung bei abbestellten Produkten') . " (" . $auth['username'] . ") Artikel:" . $tempdesc, $prodrow['userid']); $_SESSION = $tempsession; unset($tempsession); $db->qry_first("DELETE FROM %prefix%food_ordering WHERE id = %int%", $item); } else { $db->qry("UPDATE %prefix%food_ordering SET status = %string%, lastchange = %string% WHERE id = %string%", $_GET["status"], $time, $item); if ($_GET["status"] == 3) { $user_id = $db->qry_first("SELECT userid FROM %prefix%food_ordering WHERE id = %string%", $item); $func->setainfo(t('Deine bestellten Produkte sind abholbereit'), $user_id['userid'], 2, "foodcenter", $item); } } } $fc_ordered_status_ask[4] = t('Produkte abbestellt'); $fc_ordered_status_ask[5] = t('Status auf abgeholt gesetzt'); $fc_ordered_status_ask[3] = t('Status auf Abholbereit gesetzt'); $fc_ordered_status_ask[2] = t('Status auf bestellt gesetzt');
$target_url = 'index.php?mod=foodcenter&action=account&act=payment&step=2&userid='; include_once 'modules/usrmgr/search_basic_userselect.inc.php'; break; case "2": $dsp->NewContent(t('Zahlungen')); $dsp->SetForm("index.php?mod=foodcenter&action=account&act=payment&step=3&userid=" . $_GET['userid']); $dsp->AddTextFieldRow("amount", t('Betrag'), $_POST['amount'], $error['amount']); $dsp->AddTextFieldRow("comment", t('Kommentar (Dein Name wird in Klammer angefügt)'), $_POST['comment'], $error['comment']); $dsp->AddFormSubmitRow(t('Abschicken')); $dsp->AddContent(); $account = new accounting($_GET['userid']); $account->list_balance(); break; case "3": $account = new accounting($_GET['userid']); $account->change($_POST['amount'], $_POST['comment'] . " (" . $auth['username'] . ")", $_GET['userid']); $account->list_balance(); break; } break; case "himbalance": switch ($step) { default: $current_url = 'index.php?mod=foodcenter&action=account&act=himbalance'; $target_url = 'index.php?mod=foodcenter&action=account&act=himbalance&step=2&userid='; include_once 'modules/usrmgr/search_basic_userselect.inc.php'; break; case "2": $account = new accounting($_GET['userid']); $account->list_balance(); break;