Esempio n. 1
0
        if ($mInfo->status == '1') {
            $keys = '';
            reset($mInfo->keys);
            while (list(, $value) = each($mInfo->keys)) {
                $keys .= '<b>' . $value['title'] . '</b><br />';
                if ($value['use_function']) {
                    $use_function = $value['use_function'];
                    if (preg_match('/->/', $use_function)) {
                        $class_method = explode('->', $use_function);
                        if (!is_object(${$class_method[0]})) {
                            include 'includes/classes/class_' . $class_method[0] . '.php';
                            ${$class_method[0]} = new $class_method[0]();
                        }
                        $keys .= oos_call_function($class_method[1], $value['value'], ${$class_method[0]});
                    } else {
                        $keys .= oos_call_function($use_function, $value['value']);
                    }
                } else {
                    $keys .= $value['value'];
                }
                $keys .= '<br /><br />';
            }
            $keys = substr($keys, 0, strrpos($keys, '<br /><br />'));
            $contents[] = array('align' => 'center', 'text' => '<a href="' . oos_href_link_admin($aFilename['modules'], 'set=' . $_GET['set'] . '&module=' . $_GET['module'] . '&action=edit') . '">' . oos_image_swap_button('edit', 'edit_off.gif', IMAGE_EDIT) . '</a>');
            $contents[] = array('text' => '<br />' . $mInfo->description);
            $contents[] = array('text' => '<br />' . $keys);
        } else {
            $contents[] = array('text' => $mInfo->description);
        }
        break;
}
Esempio n. 2
0
&nbsp;</td>
              </tr>
<?php 
$configuration_result = $dbconn->Execute("SELECT configuration_id, configuration_key, configuration_value, use_function FROM " . $oostable['configuration'] . " WHERE configuration_group_id = '" . $_GET['gID'] . "' ORDER BY sort_order");
while ($configuration = $configuration_result->fields) {
    if (oos_is_not_null($configuration['use_function'])) {
        $use_function = $configuration['use_function'];
        if (ereg('->', $use_function)) {
            $class_method = explode('->', $use_function);
            if (!is_object(${$class_method[0]})) {
                include 'includes/classes/class_' . $class_method[0] . '.php';
                ${$class_method[0]} = new $class_method[0]();
            }
            $cfgValue = oos_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]});
        } else {
            $cfgValue = oos_call_function($use_function, $configuration['configuration_value']);
        }
    } else {
        $cfgValue = $configuration['configuration_value'];
    }
    if ((!isset($_GET['cID']) || isset($_GET['cID']) && $_GET['cID'] == $configuration['configuration_id']) && !isset($cInfo) && substr($action, 0, 3) != 'new') {
        $cfg_extra_result = $dbconn->Execute("SELECT configuration_key, date_added, last_modified, use_function, set_function FROM " . $oostable['configuration'] . " WHERE configuration_id = '" . $configuration['configuration_id'] . "'");
        $cfg_extra = $cfg_extra_result->fields;
        $cInfo_array = array_merge($configuration, $cfg_extra);
        $cInfo = new objectInfo($cInfo_array);
    }
    if (isset($cInfo) && is_object($cInfo) && $configuration['configuration_id'] == $cInfo->configuration_id) {
        echo '                  <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['configuration'], 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n";
    } else {
        echo '                  <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['configuration'], 'gID=' . $_GET['gID'] . '&cID=' . $configuration['configuration_id']) . '\'">' . "\n";
    }