function dayAheadBidsAccept($Loader, $User, $post) { $Loader->includeIsoneDayAheadBids(); $Bid = new IsoneDayAheadBid(); $startDayParts = explode('-', $post['dayAheadStart']); $stopDayParts = explode('-', $post['dayAheadStop']); $Bid->load(0, $post['assetIdentifier'], $startDayParts[2] . '-' . $startDayParts[0] . '-' . $startDayParts[1], $stopDayParts[2] . '-' . $stopDayParts[0] . '-' . $stopDayParts[1], $post['dayAheadMW'], $post['dayAheadOfferPrice'], $post['dayAheadCurtailmentPrice'], $post['dayAheadInterruptionDuration'], 0, $User->id(), 0, 0, 0); if ($Bid->save()) { $pcIdentifier = explode(':', $post['dayAheadPoint']); $result = '<div class="error" style="width: 700px;">The bid was successfully submitted.</div>'; if (!($bidList = initBidList($Loader, $User, $pcIdentifier[0], $pcIdentifier[1]))) { return '<div class="error" style="width: 700px;">We were unable to process your request. Please try again. If the problem persists, please contact the <a href="http://help.crsolutions.us/">Help Desk</a>.</div>'; } if (strlen($bidList) > 1) { $result .= $bidList; } $result .= '</form> </table> </div>'; return $result; } else { return '<div class="error" style="width: 700px;">We were unable to process your request. Please try again. If the problem persists, please contact the <a href="http://help.crsolutions.us/">Help Desk</a>.</div>'; } }