public function addEditItem($prId) { session_start(); $data['activeLink'] = 2; $this->load->view('main_top', $data); $productsStuff = new ProductsStuff(); /*$stuff = $productsStuff->getProducts(NULL, $catId, 0, 100); $data['stuff']=$stuff; $_SESSION['currentStuff']=$stuff;*/ if ($prId != NULL && $prId > 0) { $data['product'] = $productsStuff->getProductById($prId); } else { $data['product'] = NULL; } $this->load->view('editItem', $data); $this->load->view('main_footer'); }
<?php $stuff = $_SESSION['currentStuff']; ?> <div id="back_arrow"><a href="javascript:javascript:history.go(-1)"><img src="<?php echo base_url(); ?> images/back_arrow.png" width="78" height="78" /></a></div> <table><tr> <td class="arrow"> <?php $idInStuff = findPlace($stuff, $id); if ($idInStuff > 0 && count($stuff) > 1) { echo "<a href='/index.php/items/item/" . (string) $stuff[$idInStuff - 1]->id . "'><img src='/images/grey_left_arrow.png' width=48 height=95 /></a>"; } $productsStuff = new ProductsStuff(); $product = $productsStuff->getProductById($id); ?> </td> <td id="shoes"> <?php if (@fopen($product->getImageUrl(), 'r')) { echo "<img src='" . $product->getImageUrl() . "' />"; } else { echo "<img src='/images/no_image.png' />"; } ?> </td> <td id="shoe-info"> <h1> <?php echo $product->name;