Esempio n. 1
0
&nbsp;</td>
              </tr>
<?php 
$configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int) $gID . "' order by sort_order");
while ($configuration = tep_db_fetch_array($configuration_query)) {
    if (tep_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 DIR_WS_CLASSES . $class_method[0] . '.php';
                ${$class_method[0]} = new $class_method[0]();
            }
            $cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]});
        } else {
            $cfgValue = tep_call_function($use_function, $configuration['configuration_value']);
        }
    } else {
        $cfgValue = $configuration['configuration_value'];
    }
    if ((!isset($HTTP_GET_VARS['cID']) || isset($HTTP_GET_VARS['cID']) && $HTTP_GET_VARS['cID'] == $configuration['configuration_id']) && !isset($cInfo) && substr($action, 0, 3) != 'new') {
        $cfg_extra_query = tep_db_query("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_id = '" . (int) $configuration['configuration_id'] . "'");
        $cfg_extra = tep_db_fetch_array($cfg_extra_query);
        $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 id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n";
    } else {
        echo '                  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '\'">' . "\n";
    }
Esempio n. 2
0
     $contents[] = array('text' => '<br />' . $mInfo->description);
 } else {
     $keys = '';
     foreach ($mInfo->keys as $value) {
         $keys .= '<strong>' . $value['title'] . '</strong><br />';
         if ($value['use_function']) {
             $use_function = $value['use_function'];
             if (preg_match('/->/', $use_function)) {
                 $class_method = explode('->', $use_function);
                 if (!isset(${$class_method[0]}) || !is_object(${$class_method[0]})) {
                     include 'includes/classes/' . $class_method[0] . '.php';
                     ${$class_method[0]} = new $class_method[0]();
                 }
                 $keys .= tep_call_function($class_method[1], $value['value'], ${$class_method[0]});
             } else {
                 $keys .= tep_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' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link('modules_content.php', 'module=' . $mInfo->code . '&action=edit')) . HTML::button(OSCOM::getDef('image_module_remove'), 'fa fa-minus', OSCOM::link('modules_content.php', 'module=' . $mInfo->code . '&action=remove')));
     if (isset($mInfo->signature) && (list($scode, $smodule, $sversion, $soscversion) = explode('|', $mInfo->signature))) {
         $contents[] = array('text' => '<br />' . HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '&nbsp;<strong>' . OSCOM::getDef('text_info_version') . '</strong> ' . $sversion . ' (<a href="http://sig.oscommerce.com/' . $mInfo->signature . '" target="_blank">' . OSCOM::getDef('text_info_online_status') . '</a>)');
     }
     if (isset($mInfo->api_version)) {
         $contents[] = array('text' => HTML::image(OSCOM::linkImage('icon_info.gif'), OSCOM::getDef('image_icon_info')) . '&nbsp;<strong>' . OSCOM::getDef('text_info_api_version') . '</strong> ' . $mInfo->api_version);
     }
     $contents[] = array('text' => '<br />' . $mInfo->description);
Esempio n. 3
0
  <tbody>

<?php 
    $Qcfg = $OSCOM_Db->get('configuration', ['configuration_id', 'configuration_title', 'configuration_value', 'use_function'], ['configuration_group_id' => (int) $gID], 'sort_order');
    while ($Qcfg->fetch()) {
        if ($Qcfg->hasValue('use_function') && tep_not_null($Qcfg->value('use_function'))) {
            $use_function = $Qcfg->value('use_function');
            if (preg_match('/->/', $use_function)) {
                $class_method = explode('->', $use_function);
                if (!is_object(${$class_method[0]})) {
                    include 'includes/classes/' . $class_method[0] . '.php';
                    ${$class_method[0]} = new $class_method[0]();
                }
                $cfgValue = tep_call_function($class_method[1], $Qcfg->value('configuration_value'), ${$class_method[0]});
            } else {
                $cfgValue = tep_call_function($use_function, $Qcfg->value('configuration_value'));
            }
        } else {
            $cfgValue = $Qcfg->value('configuration_value');
        }
        ?>

    <tr>
      <td><?php 
        echo $Qcfg->value('configuration_title');
        ?>
</td>
      <td><?php 
        echo htmlspecialchars($cfgValue);
        ?>
</td>