Пример #1
0
} elseif ($request->GetVar('theseason', 'get') !== $request->undefined) {
    $theseason = $request->GetVar('theseason', 'get');
} else {
    $theseason = -1;
}
$smarty->assign('tpl_theseason', $theseason);
if ($request->GetVar('frm_action', 'post') == 'save') {
    $price->save();
}
$prices = $price->getall('N');
$prices2 = $price->getall('A');
if ($request->GetVar('frm_copy', 'post') !== $request->undefined) {
    $cpyfrom = $request->GetVar('frm_copy', 'post');
    $cpyto = substr($theseason, 1, strlen($theseason));
    $prices[$cpyto] = $prices[$cpyfrom];
    $prices2[$cpyto] = $prices2[$cpyfrom];
    $setaltered = true;
} else {
    $setaltered = false;
}
$smarty->assign('tpl_altered', $setaltered);
$smarty->assign('tpl_prices', $prices);
$smarty->assign('tpl_prices2', $prices2);
$smarty->assign('tpl_theyear', $theyear);
$smarty->assign('tpl_years', $season->getYears());
$smarty->assign('tpl_seasons', $season->GetOneYear($theyear));
$smarty->assign('tpl_allseasons', $season->get());
$smarty->assign('tpl_bcat', $bcat->Get());
$smarty->assign('tpl_rcat', $rcat->get('N'));
$smarty->assign('tpl_rcat2', $rcat->get('A'));
$smarty->display('price.tpl');