當前位置: 首頁>>代碼示例>>PHP>>正文


PHP products_minierp::templateElementsUsed方法代碼示例

本文整理匯總了PHP中products_minierp::templateElementsUsed方法的典型用法代碼示例。如果您正苦於以下問題:PHP products_minierp::templateElementsUsed方法的具體用法?PHP products_minierp::templateElementsUsed怎麽用?PHP products_minierp::templateElementsUsed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在products_minierp的用法示例。


在下文中一共展示了products_minierp::templateElementsUsed方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: strpos

<?php

#########################################
#  Author  : D3W4 & SAHAT               #
#  Created : Jan 3, 2012 10:59:04 PM    #
#########################################
use_class('products_minierp');
$class_pm = new products_minierp();
$products_id = tep_db_prepare_input($_GET['products_id']);
$designs_id = tep_db_prepare_input($_GET['designs_id']);
$accessed = strpos($_SERVER['HTTP_REFERER'], 'designs-manage') !== false || !empty($designs_id) ? CONST_ACCESS_DESIGNS_MANAGEMENT : '';
if (isset($_POST['me_action'])) {
    if ($_POST['me_action'] == 'PRODUCTELUSED') {
        $result = $class_pm->templateElementsUsed('?open=designs-products-elements-used&amp;products_id=' . $_POST['products_id'] . '&amp;hidemenu=true&amp;designs_id=' . $designs_id);
        echo $result;
        exit;
    } elseif ($_POST['me_action'] == 'ELEMENTSUSEDADD') {
        $class_pm->templateAddElementsUsed();
    } elseif ($_POST['me_action'] == 'ELEMENTSUSEDUPDATE') {
        $class_pm->templateUpdateElementsUsed();
    } elseif ($_POST['me_action'] == 'ELEMENTSUSEDOVR') {
        $class_pm->templateOverrideElementsUsed();
    }
}
$content = '<div id="area-el-used"></div>';
$title = "Product {$products_id} - Manage Elements Used";
$javascript = '
            var accessed = "' . $accessed . '";
            var designs_id = "' . $designs_id . '";
            document.reloadFocusedTab = function(){
                if(accessed != "undefined" && accessed == "' . CONST_ACCESS_DESIGNS_MANAGEMENT . '") window.parent.document.reloadFocusedTab(' . $designs_id . ');
開發者ID:blasiuscosa,項目名稱:manobo-2008,代碼行數:31,代碼來源:designs-products-elements-used.php

示例2: elseif

                     $result .= '</table>';
                 }
                 $result .= '</div>';
             }
             $result = utf8_encode($result);
             break;
         case 'UPDATE':
             $brand_id = tep_db_prepare_input($_POST['brand_id']);
             $updated = $class_pb->updateProductBrand($products_id, $brand_id);
             $result = $updated == 1 ? $brand_id : '';
             break;
     }
     echo $result;
     exit;
 } elseif ($_POST['me_action'] == 'PRODUCTELUSED') {
     $result = $class_pm->templateElementsUsed();
     echo $result;
     exit;
 } elseif ($_POST['me_action'] == 'ELEMENTSUSEDADD') {
     $class_pm->templateAddElementsUsed();
 } elseif ($_POST['me_action'] == 'ELEMENTSUSEDUPDATE') {
     $class_pm->templateUpdateElementsUsed();
 } elseif ($_POST['me_action'] == 'ELEMENTSUSEDOVR') {
     $class_pm->templateOverrideElementsUsed();
 } elseif ($_POST['me_action'] == 'UPDATEWATCHLIST') {
     $update = strtolower($_POST['update']);
     $products_id = tep_db_prepare_input($_GET['products_id']);
     if ($update == 'add') {
         $class_mu->addToWatchlist($session_userinfo['id'], $products_id);
     } else {
         $class_mu->removeFromWatchlist($session_userinfo['id'], $products_id);
開發者ID:blasiuscosa,項目名稱:manobo-2008,代碼行數:31,代碼來源:product-detail.php


注:本文中的products_minierp::templateElementsUsed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。