Ejemplo n.º 1
0
function CreateFieldTblDropDown($report)
{
    if ($report->special_class) {
        if (!($path = find_special_class($report->special_class))) {
            return false;
        }
        load_special_language($path, $report->special_class);
        require_once $path . '/classes/' . $report->special_class . '.php';
        $sp_report = new $report->special_class();
        return $sp_report->build_table_drop_down();
    }
    return CreateFieldArray($report);
}
function CreateSpecialDropDown($ReportID, $type = 'field')
{
    global $db;
    $sql = "select special_report from " . TABLE_REPORTS . " where id = " . $ReportID;
    $result = $db->Execute($sql);
    $temp = explode(':', $result->fields['special_report']);
    $SpFunc = $temp[1];
    if (!$SpFunc) {
        return CreateFieldArray($ReportID);
    }
    // pull in the special function class and build drop-down
    if (file_exists(DIR_FS_MY_FILES . 'custom/reportwriter/classes/' . $SpFunc . '.php')) {
        require_once DIR_FS_MY_FILES . 'custom/reportwriter/classes/' . $SpFunc . '.php';
    } elseif (file_exists(DIR_FS_MODULES . 'reportwriter/classes/' . $SpFunc . '.php')) {
        require_once DIR_FS_MODULES . 'reportwriter/classes/' . $SpFunc . '.php';
    }
    $output = new $SpFunc();
    if ($type == 'table') {
        return $output->build_table_drop_down();
    } else {
        return $output->build_selection_dropdown();
    }
}
// | published by the Free Software Foundation, either version 3 of  |
// | the License, or any later version.                              |
// |                                                                 |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of  |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   |
// | GNU General Public License for more details.                    |
// |                                                                 |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html.               |
// | If not, see http://www.gnu.org/licenses/                        |
// +-----------------------------------------------------------------+
//  Path: /modules/reportwriter/pages/builder/template_crit_setup.php
//
$notes = '<u><b>' . TEXT_NOTES . '</b></u>';
$kFields = CreateFieldArray($ReportID);
echo html_form('CritFormMain', FILENAME_DEFAULT, gen_get_all_get_params(array('action')) . 'action=step7');
echo html_hidden_field('ReportID', $ReportID);
echo html_hidden_field('Type', $Type);
echo html_hidden_field('ReportName', $description);
echo html_hidden_field('todo', '');
echo html_hidden_field('rowSeq', '');
echo html_hidden_field('EntryType', 'main');
echo html_hidden_field('SeqNum', '');
echo html_hidden_field('FieldName', '');
echo html_hidden_field('DisplayDesc', '');
echo html_hidden_field('Params', '');
// customize the toolbar actions
$toolbar->icon_list['cancel']['show'] = false;
$toolbar->icon_list['open']['show'] = false;
$toolbar->icon_list['save']['params'] = 'onclick="submitToDo(\'update\');"';