private function assignDate() { //Generate years, month and days $app = JFactory::getApplication(); $years = $app->input->get('years'); $selectedYear = 0; if (isset($years) && is_numeric($years)) { $selectedYear = $years; } $years = JeproshopTools::dateYears(); $months = $app->input->get('months'); $selectedMonths = 0; if (isset($months) && is_numeric($months)) { $selectedMonths = $months; } $days = $app->input->get('days'); $selectedDay = 0; if (isset($days) && is_numeric($days)) { $selectedDay = $days; } $onePhoneAtLeast = (int) JeproshopSettingModelSetting::getValue('one_phone_at_least'); $this->assignRef('years', $years); $this->assignRef('selected_year', $selectedYear); $this->assignRef('selected_month', $selectedMonths); //$this->assignRef('days', $days); $this->assignRef('selected_day', $selectedDay); $this->assignRef('one_phone_at_least', $onePhoneAtLeast); }
foreach (JeproshopTools::dateMonths() as $month) { ?> <option value="<?php echo $month; ?> " ><?php echo $month; ?> </option> <?php } ?> </select> <select id="jform_year" name="jform[year]" class="year_wrapper" > <?php foreach (JeproshopTools::dateYears() as $year) { ?> <option value="<?php echo $year; ?> " ><?php echo $year; ?> </option> <?php } ?> </select> </div> </div> <div class="control-group" >