* User: Garrett * Date: 3/7/2015 * Time: 06:10 */ require_once "classes/Donorbid.php"; $id = $_GET['id']; $amt = $_GET['amt']; $product = $db->getProduct($id); if (is_null($product)) { $product = new Item(); } $charity = $db->getCharity($product->getCharity()); if (is_null($charity)) { $charity = new Charity(); } $seller = $product->getSeller(); if (is_null($seller)) { $seller = new User(); } $user = $_SESSION['user']; if (!$util->isValidUser($user)) { //Disabled until login is working! header('Location: login.php'); } else { } //temporary here $seller->setImage("images/creep.jpg"); ?> <!DOCTYPE HTML>
<?php /** * Created by PhpStorm. * User: Garrett * Date: 3/7/2015 * Time: 00:14 */ require_once "classes/Donorbid.php"; $id = $_GET['id']; $product = $db->getProduct($id); if (is_null($product)) { $product = new Item(); } if (is_null($product->getSeller())) { $product->seller = new User(); } $charity = $db->getCharity($product->getCharity()); if (is_null($charity)) { $charity = new Charity(); } $seller = $product->getSeller(); if (is_null($seller)) { $seller = new User(); } //Error here... these aren't able to get charities from seller for some reason.... //$top_charity1 = $db -> $seller -> getCharities()[0]; //$top_charity2 = $db -> $seller -> getCharities()[1]; //$top_charity3 = $db -> $seller -> getCharities()[2]; //temp $top_charity1 = new Charity();