insertAnswer(4, 1, 5); insertQuestion(1, 'Do you like milka?', 1); insertOption(1, 'Yes', 1, 1); insertAnsOpt(1, 1, 1); insertAnsOpt(2, 3, 1); insertAnsOpt(7, 4, 1); insertOption(2, 'No', 2, 1); insertAnsOpt(3, 2, 2); insertQuestion(2, 'How much do you like kinder eggs?', 1); insertOption(3, 'Lot', 1, 2); insertAnsOpt(4, 1, 3); insertAnsOpt(5, 3, 3); insertAnsOpt(8, 4, 3); insertOption(4, 'Medium', 2, 2); insertAnsOpt(6, 2, 4); insertOption(5, 'Low', 3, 2); insertSegment('GENDER', 0, 1); insertSegment('AGE', 0, 1); insertSegment('AGE', 1, 1); // Insert statistic insertStatistic(1, 'Interesting 2D...', 1, 1, getNextDate($phpdate)); insertUVar(1, 1, 'RELIGION', 0); insertQVar(1, 1, 1, 1); insertStatistic(2, 'Interesting 3D...', 1, 1, $dates[0]); insertUVar(2, 2, 'GENDER', 0); insertQVar(2, 2, 1, 1); insertQVar(3, 2, 2, 2); insertStatistic(3, 'Not so interesting (1D)...', 1, 1, $dates[3]); insertUVar(3, 3, 'AGE', 0); insertTracking(1, 2, true, $dates[1]); insertTracking(1, 3, false, getNextDate($phpdate));
$GLOBALS['TYPO3_DB']->sql_query($sql_upd) or die($HTTP_HOST . '-' . $_SERVER['PHP_SELF'] . ' --- ' . $GLOBALS['TYPO3_DB']->sql_error() . "\n\n" . $sql_upd); } else { $sql_upd = "update tx_multishop_products_description set promotext = '' where language_id = 0 and products_id = " . $pid; $GLOBALS['TYPO3_DB']->sql_query($sql_upd) or die($HTTP_HOST . '-' . $_SERVER['PHP_SELF'] . ' --- ' . $GLOBALS['TYPO3_DB']->sql_error() . "\n\n" . $sql_upd); } if (count($option) > 0) { foreach ($option as $optname => $optval) { $hide = 0; if ($optstat[$optname] == 'hide') { $hide = 1; } $optname = ucwords($optname); if (!empty($optname)) { $optid = getOptionID($optname); if (!$optid) { $optid = insertOption($optname, $hide); } else { updateOption($optid, $hide); } if (!empty($optval)) { $value_tmp = explode(';;', $optval); foreach ($value_tmp as $optval2) { $valstat = 0; $price = 0; list($optval3, $optvalprice) = explode('||', $optval2); if (substr($optvalprice, 0, 1) == '+') { $optvalprice = str_replace('+', '', $optvalprice); $pprefix = '+'; } else { if (substr($optvalprice, 0, 1) == '-') { $optvalprice = str_replace('-', '', $optvalprice);