当前位置: 首页>>代码示例>>PHP>>正文


PHP tep_call_function函数代码示例

本文整理汇总了PHP中tep_call_function函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_call_function函数的具体用法?PHP tep_call_function怎么用?PHP tep_call_function使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了tep_call_function函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tep_db_query

&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";
    }
开发者ID:laiello,项目名称:hotel-os,代码行数:31,代码来源:configuration.php

示例2: array

     $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);
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:modules_content.php

示例3: while

  <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>
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:configuration.php


注:本文中的tep_call_function函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。