require_once("../database.php"); require_once("adminfuncties.php"); require_once("product_navigatie.php"); if(isset($_POST[s100])) { $MyProductName = htmlentities(strip_tags($_POST[ProductName])); $NewCategoryInfo = explode("|", $_POST[CategoryInfo]); $NewDesc = htmlentities(strip_tags($_POST[ProductDesc])); $ImageName = $_FILES[ProductImage][name]; $NewShipping = strip_tags($_POST[ShippingPrice]); $NewPrice = strip_tags($_POST[ProductPrice]); if(!empty($ImageName)) { if(!empty($_POST[OldImage])) { unlink("../items_images/$_POST[OldImage]"); } $t = time(); $NewImageName = "$t$ImageName"; copy($_FILES[ProductImage][tmp_name], "../items_images/$NewImageName"); } else { $NewImageName = $_POST[OldImage]; } $q1 = "update oneshop_producten set ItemName = '$MyProductName', ItemCategory = '$NewCategoryInfo[0]', ItemSubcategory = '$NewCategoryInfo[1]', ItemDescription = '$NewDesc', ItemPrice = '$NewPrice', ItemShipping = '$NewShipping', ItemImage = '$NewImageName', ProductStatus = 'unapproved' where ItemID = '$_POST[ItemID]' "; mysql_query($q1) or die(mysql_error()); $q1 = "select oneshop_producten.*, oneshop_categories.*, devbg_subcategories.* from oneshop_producten left join oneshop_categories on oneshop_producten.ItemCategory = oneshop_categories.CategoryID left join devbg_subcategories on oneshop_producten.ItemSubcategory = devbg_subcategories.SubcategoryID where oneshop_producten.ItemID = '$_POST[ItemID]' "; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); $DisplayCategory = $a1[CategoryName]; if($a1[ItemSubcategory] > '0') { $DisplayCategory .= " / $a1[SubcategoryName]"; } ?>
Product naam: |
if(!empty($a1[ItemImage]))
{
echo "Huidige afbeelding: \n |
|||
Categorie: | =$MySelect?> | |||
Beschrijving: | ||||
Nieuwe afbeelding: | ||||
Prijs verzending: | ||||
Product prijs: | ||||
ItemID | Item naam | Categorie / Sub-categorie | Prijs | Selecteer |
$a1[ItemID] | \n\t$a1[ItemName] | \n\t$a1[CategoryName]"; if(!empty($a1[SubcategoryName])) { echo " / $a1[SubcategoryName]"; } echo " | \n\t$MyPrice | \n\t\n |
\n\t | \n
| "; $pages = ceil($rows/$ByPage); for($i = 0; $i <= ($pages); $i++) { $PageStart = $ByPage*$i; $i2 = $i + 1; if($PageStart == $Start) { $links[] = " $i2\n\t "; } elseif($PageStart < $rows) { $links[] = " $i2\n\t "; } } $links2 = implode(" | ", $links); echo $links2; echo "| | "; echo "