<th>Action</th> </tr> <tr> <td><input name="dim_date_from" value="<?php echo $sDateFrom; ?> " class="date"/></td> <td><input name="dim_date_to" value="<?php echo $sDateTo; ?> " class="date"/></td> <td> <select name="dim_l1_id"> <option value="0">-Select-</option> <?php $aLevel = $oLevel->listLevel(null, Level::LEVEL_1); foreach ($aLevel as $aLevelRecord) { if ($aLevelRecord['hidden']) { continue; } $sHtmlSelected = $aDimData['l1_id'] == $aLevelRecord['id'] ? ' selected="selected"' : ''; ?> <option value="<?php echo $aLevelRecord['id']; ?> "<?php echo $sHtmlSelected; ?> ><?php echo $aLevelRecord['code']; ?>
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); use DBRisinajumi\Dimensions\Level; use DBRisinajumi\Dimensions\Table; use DBRisinajumi\Dimensions\Data; use DBRisinajumi\Dimensions\Period; $sAction = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'get_tree'; $nLevel = isset($_REQUEST['level']) ? (int) $_REQUEST['level'] : 1; $nParrentLevelId = isset($_REQUEST['parent_level_id']) ? (int) $_REQUEST['parent_level_id'] : 0; require 'init.php'; $nId = isset($_REQUEST['id']) ? $_REQUEST['id'] : 0; $aDirectJson = array(); $oLevel = new Level($Database); $oTable = new Table($Database); switch ($sAction) { case 'get_selectbox_values': $aLevel = $oLevel->listLevel($nParrentLevelId, $nLevel); if ($nLevel < 3) { $sNextLevel = '_' . ($nLevel + 1); } else { $sNextLevel = ''; } foreach ($aLevel as $aLevelRecord) { $aData = array('title' => $aLevelRecord['code'], 'id' => $aLevelRecord['id']); if ($aLevelRecord['hidden']) { continue; } $a = array('data' => $aData, "attr" => array('id' => $aLevelRecord['id'])); if (!empty($sNextLevel)) { $a['state'] = 'closed'; } $aDirectJson[] = $a;