function initialize_store() { if (!is_logged_in()) { Error('Invalid Access'); } $GLOBALS['items'] = GetItems(); }
function GiveItemtoItem() { $items = GetItems($not_in = "'W'"); //,'W','P','I','N'"); echo '<form action="index.php?action=give" method="post"> Lot to give: ' . SelectLot($items, "give") . '<br /> Lot to receive: ' . SelectLot($items, "receive") . '<br /> Quanity:<input type="text" name="quanity" value="0" /><br /> <input type="hidden" name="action" value="give" /> <input type="submit" value="Submit" /> <form>'; return; }
function CreateItemList($xml) { //returns an array in which every element is an xml item $array = array(); $items = GetItems($xml); for ($i = 0; $i < sizeof($items); $i++) { if ($i == sizeof($items) - 1) { $endpos = strlen($xml); } else { $endpos = $items[$i + 1]; } $array[$i] = ItemAttributes($items[$i], $endpos, $xml); } return $array; }