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


PHP tep_class_exists函数代码示例

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


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

示例1: getOutput

 function getOutput()
 {
     global $PHP_SELF;
     $output = '';
     $secCheck_types = array('info', 'warning', 'error');
     $secCheck_messages = array();
     $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
     $secmodules_array = array();
     if ($secdir = @dir(DIR_FS_ADMIN . 'includes/modules/security_check/')) {
         while ($file = $secdir->read()) {
             if (!is_dir(DIR_FS_ADMIN . 'includes/modules/security_check/' . $file)) {
                 if (substr($file, strrpos($file, '.')) == $file_extension) {
                     $secmodules_array[] = $file;
                 }
             }
         }
         sort($secmodules_array);
         $secdir->close();
     }
     foreach ($secmodules_array as $secmodule) {
         include DIR_FS_ADMIN . 'includes/modules/security_check/' . $secmodule;
         $secclass = 'securityCheck_' . substr($secmodule, 0, strrpos($secmodule, '.'));
         if (tep_class_exists($secclass)) {
             $secCheck = new $secclass();
             if (!$secCheck->pass()) {
                 if (!in_array($secCheck->type, $secCheck_types)) {
                     $secCheck->type = 'info';
                 }
                 $secCheck_messages[$secCheck->type][] = $secCheck->getMessage();
             }
         }
     }
     if (isset($secCheck_messages['error'])) {
         $output .= '<div class="secError">';
         foreach ($secCheck_messages['error'] as $error) {
             $output .= '<p class="smallText">' . $error . '</p>';
         }
         $output .= '</div>';
     }
     if (isset($secCheck_messages['warning'])) {
         $output .= '<div class="secWarning">';
         foreach ($secCheck_messages['warning'] as $warning) {
             $output .= '<p class="smallText">' . $warning . '</p>';
         }
         $output .= '</div>';
     }
     if (isset($secCheck_messages['info'])) {
         $output .= '<div class="secInfo">';
         foreach ($secCheck_messages['info'] as $info) {
             $output .= '<p class="smallText">' . $info . '</p>';
         }
         $output .= '</div>';
     }
     if (empty($secCheck_messages)) {
         $output .= '<div class="secSuccess"><p class="smallText">' . MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_SUCCESS . '</p></div>';
     }
     return $output;
 }
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:58,代码来源:d_security_checks.php

示例2: sort

            if (substr($file, strrpos($file, '.')) == $file_extension) {
                $directory_array[] = $file;
            }
        }
    }
    sort($directory_array);
    $dir->close();
}
for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
    $file = $directory_array[$i];
    if (file_exists(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/action_recorder/' . $file)) {
        include DIR_FS_CATALOG_LANGUAGES . $language . '/modules/action_recorder/' . $file;
    }
    include DIR_FS_CATALOG_MODULES . 'action_recorder/' . $file;
    $class = substr($file, 0, strrpos($file, '.'));
    if (tep_class_exists($class)) {
        ${$class} = new $class();
    }
}
$modules_array = array();
$modules_list_array = array(array('id' => '', 'text' => TEXT_ALL_MODULES));
$modules_query = tep_db_query("select distinct module from " . TABLE_ACTION_RECORDER . " order by module");
while ($modules = tep_db_fetch_array($modules_query)) {
    $modules_array[] = $modules['module'];
    $modules_list_array[] = array('id' => $modules['module'], 'text' => is_object(${$modules['module']}) ? ${$modules['module']}->title : $modules['module']);
}
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
if (tep_not_null($action)) {
    switch ($action) {
        case 'expire':
            $expired_entries = 0;
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:31,代码来源:action_recorder.php

示例3: tep_get_shipping_modules

function tep_get_shipping_modules($shop_id)
{
    global $language;
    $shippings_array = array();
    $shop_db_query = tep_db_query("select shops_database from " . TABLE_SHOPS . " where shops_id = '" . (int) $shop_id . "'");
    $shop_db = tep_db_fetch_array($shop_db_query);
    tep_db_select_db($shop_db['shops_database']);
    $shipping_config_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_INSTALLED'");
    $shipping_config = tep_db_fetch_array($shipping_config_query);
    $available_shippings = explode(';', $shipping_config['configuration_value']);
    $module_directory = DIR_FS_CATALOG_MODULES . 'shipping/';
    $module_key = 'MODULE_SHIPPING_INSTALLED';
    $file_extension = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '.'));
    $directory_array = array();
    if ($dir = @dir($module_directory)) {
        while ($file = $dir->read()) {
            if (!is_dir($module_directory . $file)) {
                if (substr($file, strrpos($file, '.')) == $file_extension) {
                    if (in_array($file, $available_shippings)) {
                        $directory_array[] = $file;
                    }
                }
            }
        }
        sort($directory_array);
        $dir->close();
    }
    for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
        $file = $directory_array[$i];
        include_once DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/' . $file;
        include_once $module_directory . $file;
        $class = substr($file, 0, strrpos($file, '.'));
        if (tep_class_exists($class)) {
            $module = new $class();
            $config_check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_group_id = '6' and configuration_key = '" . strtoupper('MODULE_SHIPPING_' . $module->code . '_TITLE') . "'");
            if (tep_db_num_rows($config_check_query) < 1) {
                $config_check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_group_id = '6' and configuration_key = '" . strtoupper('MODULE_SHIPPING_' . $module->code . '_TEXT_TITLE') . "'");
            }
            if (tep_db_num_rows($config_check_query) > 0) {
                $config_check = tep_db_fetch_array($config_check_query);
                $module_title = tep_html_entity_decode($config_check['configuration_value']);
            } else {
                $module_title = $module->title;
            }
            $shippings_array[$class] = $module_title;
        }
    }
    tep_db_select_db(DB_DATABASE);
    return $shippings_array;
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:50,代码来源:general.php

示例4: getInstalledModules

 function getInstalledModules()
 {
     global $PHP_SELF, $language, $module_type;
     // Retrieve all shipping module files.
     $module_directory = DIR_FS_CATALOG_MODULES . 'shipping/';
     $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
     $module_files = array();
     if ($directory = @dir($module_directory)) {
         while ($file = $directory->read()) {
             if (!is_dir($module_directory . $file)) {
                 if (substr($file, strrpos($file, '.')) == $file_extension) {
                     $module_files[] = $file;
                 }
             }
         }
         sort($module_files);
         $directory->close();
     }
     // Retrieve the subset that exist as classes and are installed.
     $installed_modules = array();
     for ($i = 0, $n = sizeof($module_files); $i < $n; $i++) {
         $file = $module_files[$i];
         include_once DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/' . $file;
         include_once $module_directory . $file;
         $class = substr($file, 0, strrpos($file, '.'));
         if (tep_class_exists($class)) {
             $module = new $class();
             if ($module->check() > 0) {
                 $installed_modules[$module->code] = array('code' => $module->code, 'title' => $module->title, 'description' => $module->description, 'status' => $module->check());
             }
         }
     }
     return $installed_modules;
 }
开发者ID:digideskio,项目名称:oscmax2,代码行数:34,代码来源:merchant_calculated_shipping_option.php

示例5: tep_cfg_pull_down_payment_methods

function tep_cfg_pull_down_payment_methods()
{
    global $language;
    $enabled_payment = array();
    $module_directory = DIR_FS_CATALOG_MODULES . 'payment/';
    $file_extension = '.php';
    if ($dir = @dir($module_directory)) {
        while ($file = $dir->read()) {
            if (!is_dir($module_directory . $file)) {
                if (substr($file, strrpos($file, '.')) == $file_extension) {
                    $directory_array[] = $file;
                }
            }
        }
        sort($directory_array);
        $dir->close();
    }
    // For each available payment module, check if enabled
    for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
        $file = $directory_array[$i];
        include DIR_FS_CATALOG_LANGUAGES . $language . '/' . $file;
        include $module_directory . $file;
        $class = substr($file, 0, strrpos($file, '.'));
        if (tep_class_exists($class)) {
            $module = new $class();
            if ($module->check() > 0) {
                // If module enabled create array of titles
                $enabled_payment[] = array('id' => $module->title, 'text' => $module->title);
            }
        }
    }
    $enabled_payment[] = array('id' => 'Other', 'text' => 'Other');
    //draw the dropdown menu for payment methods and default to the order value
    return tep_draw_pull_down_menu('configuration_value', $enabled_payment, '', '');
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:35,代码来源:general.php

示例6: tep_draw_radio_field

	   <tr bgcolor="#DEE4E8">
            <td class="main"><?php 
        echo tep_draw_radio_field('group_shipment_settings', '1', false, tep_not_null($cInfo->group_shipment_allowed) ? '1' : '0') . '&nbsp;&nbsp;' . ENTRY_GROUP_SHIPPING_SET . '&nbsp;&nbsp;' . tep_draw_radio_field('group_shipment_settings', '0', false, tep_not_null($cInfo->group_shipment_allowed) ? '1' : '0') . '&nbsp;&nbsp;' . ENTRY_GROUP_SHIPPING_DEFAULT;
        ?>
</td>
          </tr>
<?php 
        $ship_module_active = explode(";", MODULE_SHIPPING_INSTALLED);
        $installed_shipping_modules = array();
        for ($i = 0, $n = sizeof($ship_directory_array); $i < $n; $i++) {
            $file = $ship_directory_array[$i];
            if (in_array($ship_directory_array[$i], $ship_module_active)) {
                include DIR_FS_CATALOG_LANGUAGES . $language . '/modules/shipping/' . $file;
                include $ship_module_directory . $file;
                $ship_class = substr($file, 0, strrpos($file, '.'));
                if (tep_class_exists($ship_class)) {
                    $ship_module = new $ship_class();
                    if ($ship_module->check() > 0) {
                        $installed_shipping_modules[] = array('file_name' => $file, 'title' => $ship_module->title);
                    }
                }
                // end if (tep_class_exists($ship_class))
            }
            // end if (in_array ($ship_directory_array[$i], $ship_module_active))
        }
        // end for ($i = 0, $n = sizeof($ship_directory_array); $i < $n; $i++)
        for ($y = 0; $y < sizeof($installed_shipping_modules); $y++) {
            ?>
	   <tr>
            <td class="main"><?php 
            echo tep_draw_checkbox_field('shipping_allowed[' . $y . ']', $installed_shipping_modules[$y]['file_name'], 0);
开发者ID:eosc,项目名称:EosC-2.3,代码行数:31,代码来源:customers_groups.php

示例7: array

$secmodules_array = array();
if ($secdir = @dir(DIR_FS_ADMIN . 'includes/modules/security_check/')) {
    while ($file = $secdir->read()) {
        if (!is_dir(DIR_FS_ADMIN . 'includes/modules/security_check/' . $file)) {
            if (substr($file, strrpos($file, '.')) == $file_extension) {
                $secmodules_array[] = $file;
            }
        }
    }
    sort($secmodules_array);
    $secdir->close();
}
foreach ($secmodules_array as $secmodule) {
    include DIR_FS_ADMIN . 'includes/modules/security_check/' . $secmodule;
    $secclass = 'securityCheck_' . substr($secmodule, 0, strrpos($secmodule, '.'));
    if (tep_class_exists($secclass)) {
        $secCheck = new $secclass();
        if (!$secCheck->pass()) {
            if (!in_array($secCheck->type, $secCheck_types)) {
                $secCheck->type = 'info';
            }
            $secCheck_messages[$secCheck->type][] = $secCheck->getMessage();
        }
    }
}
if (isset($secCheck_messages['error'])) {
    echo '<div class="secError">';
    foreach ($secCheck_messages['error'] as $error) {
        echo '<p class="smallText">' . $error . '</p>';
    }
    echo '</div>';
开发者ID:respencer,项目名称:oscommerce2,代码行数:31,代码来源:security_checks.php


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