case 'sho': $Model = "chara/demihuman/d" . $d . "/obj/equipment/e" . $e . "/model/d" . $d . "e" . $e . "_sho.mdl"; $Collection[$d]["SHO"][$e] = $Model; break; case 'glv': $Model = "chara/demihuman/d" . $d . "/obj/equipment/e" . $e . "/model/d" . $d . "e" . $e . "_glv.mdl"; $Collection[$d]["GLV"][$e] = $Model; break; } //$SQL_Values[] = "('".$ID."', '".$Model."', '".$material."', '".translate_name($ID, "en")."', '".translate_name($ID, "de")."', '".translate_name($ID, "fr")."', '".translate_name($ID, "jp")."', '".($ID==translate_name($ID, "TYPE")?$Type:translate_name($ID, "TYPE"))."', '".$ICON."')"; } } } $i = 0; foreach ($Collection as $D => $Col) { $CartesianCol = cartesian($Col); Show($CartesianCol); foreach ($CartesianCol as $FinalCol) { $material = 1; if (!$FinalCol["TOP"]) { // needs body attached continue; } $ID = ""; $ID .= explode('/', $FinalCol["TOP"])[5]; $ID .= explode('/', $FinalCol["MET"])[5]; $ID .= explode('/', $FinalCol["SHO"])[5]; $ID .= explode('/', $FinalCol["GLV"])[5]; $ID = strtoupper("D" . $D . $ID); $Type = "BEASTMAN"; $SQL_Values[] = "('" . $ID . "', '" . $FinalCol["TOP"] . "', '" . $FinalCol["SHO"] . "', '" . $FinalCol["GLV"] . "', '" . $FinalCol["MET"] . "', '" . $material . "', '" . translate_name($ID, "en") . "', '" . translate_name($ID, "de") . "', '" . translate_name($ID, "fr") . "', '" . translate_name($ID, "jp") . "', '" . ($ID == translate_name($ID, "TYPE") ? $Type : translate_name($ID, "TYPE")) . "', '" . $ICON . "')";
$admintags = prepare_input($_POST['admintags']); if ($_FILES['carouselImg']['error'] == 0) { $carouselImg = uploadPrdImage($_FILES['carouselImg']['tmp_name'], $_FILES['carouselImg']['name'], $_FILES['carouselImg']['error']); if (strpos($carouselImg, 'ERROR') !== false) { $error .= "Image upload error"; } } if ($_FILES['hookImg']['error'] == 0) { $hookImg = uploadPrdImage($_FILES['hookImg']['tmp_name'], $_FILES['hookImg']['name'], $_FILES['hookImg']['error']); if (strpos($hookImg, 'ERROR') !== false) { $error .= "Image upload error"; } } //TBD: Validations if (count($pccolors) > 0 && count($pcdesign) > 0) { $newcartesianArr = cartesian(array($pccolors, $pcdesign)); $cartesianArr = compareArr($cartesianArr, $newcartesianArr); foreach ($cartesianArr as $ind => &$product) { $filename = $product['color'] . "_" . $product['design']; if ($_FILES[$filename]['error'] == 0) { $newfile = uploadPrdImage($_FILES[$filename]['tmp_name'], $_FILES[$filename]['name'], $_FILES[$filename]['error']); if (strpos($newfile, 'ERROR') !== false) { $error .= "Image upload error"; } else { $product['imagefile'] = $newfile; } } } } if (empty($error)) { if ($pcmode == "new") {