if ($request->GetVar('frm_newstart', 'post') == "true") { list($month, $year) = split('[/]', $thestart); $month = number_format($month, 0, '', ''); $year = number_format($year, 0, '', ''); if ($month == 12) { $year = $year + 1; $month = 1; } else { $month = $month + 1; } $theend = $month . '/' . $year; $theotherend = $month . '-' . $year; } if ($request->GetVar('frm_thedate', 'post') !== $request->undefined) { $thedate = $request->GetVar('frm_thedate', 'post'); } $theotherdate = str_replace('.', '-', $thedate); if ($request->GetVar('frm_start1', 'post') !== $request->undefined) { $thestart1 = $request->GetVar('frm_start1', 'post'); } $theotherstart1 = str_replace('.', '-', $thestart1); if ($request->GetVar('frm_end1', 'post') !== $request->undefined) { $theend1 = $request->GetVar('frm_end1', 'post'); } $theotherend1 = str_replace('.', '-', $theend1); if ($request->GetVar('frm_what', 'post') !== $request->undefined) { $what = $request->GetVar('frm_what', 'post'); } else { $what = 'thedate'; } $smarty->assign('tpl_what', $what);