'weight' => $weight, 'theme' => $themesum, 'condition' => $condition, 'herd' => $herd, 'averslegend' => $averslegend, 'reverselegend' => $reverselegend, 'mint' => $mint, 'designer' => $designer, 'officialdate' => $officialdate, 'image_small_url' => $image_small_url, 'image_big_url' => $image_big_url, 'details' => $details, 'dateinsert' => $officialdate, 'user' => $tpl['user']['user_id'], 'agreement' =>0); $catalog = $catalognew_class->addCatalognewItem($data); $submitaftererror = 0; for ($i=1; $i<=$year_p; $i++){ ${"yearstart".$i} = (int)request("yearstart".$i); if(${"yearstart".$i}){ ${"yearend".$i} = (int)request("yearend".$i); if (${"yearend".$i}){ $data = array('yearstart'=>${"yearstart".$i}, 'yearend'=>${"yearend".$i}, 'catalog'=>$catalog);