本文整理汇总了PHP中GetClass函数的典型用法代码示例。如果您正苦于以下问题:PHP GetClass函数的具体用法?PHP GetClass怎么用?PHP GetClass使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetClass函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SetPanelSettings
public function SetPanelSettings()
{
$GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER');
$customerid = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerId();
if (gzte11(ISC_LARGEPRINT)) {
// Get the number of new messages for this customer
$order_ids = "";
$query = sprintf("select orderid from [|PREFIX|]orders where ordcustid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid));
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
$order_ids .= sprintf("%s,", $row['orderid']);
}
$order_ids = rtrim($order_ids, ",");
if ($order_ids != "") {
$query = sprintf("select count(messageid) as num from [|PREFIX|]order_messages where messageorderid in (%s) and messagefrom='admin' and messagestatus='unread'", $GLOBALS['ISC_CLASS_DB']->Quote($order_ids));
$GLOBALS['NumNewMessages'] = $GLOBALS['ISC_CLASS_DB']->FetchOne($query);
} else {
$GLOBALS['NumNewMessages'] = 0;
}
} else {
$GLOBALS['HideMessagesMenu'] = "none";
}
// Do we want to show or hide the return requests menu item?
if (gzte11(ISC_LARGEPRINT) && GetConfig('EnableReturns') == 1) {
$query = sprintf("SELECT returnid FROM [|PREFIX|]returns WHERE retcustomerid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid));
if (!$GLOBALS['ISC_CLASS_DB']->FetchOne($query)) {
$GLOBALS['HideReturnRequestsMenu'] = "none";
}
} else {
$GLOBALS['HideReturnRequestsMenu'] = 'none';
}
// How many products are in their wish list?
$query = sprintf("select count(wishlistid) as num from [|PREFIX|]wishlists where customerid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid));
$GLOBALS['NumWishListItems'] = $GLOBALS['ISC_CLASS_DB']->FetchOne($query);
}
示例2: SetPanelSettings
public function SetPanelSettings()
{
$GLOBALS['ISC_CLASS_CATEGORY'] = GetClass('ISC_CATEGORY');
// Output breadcrumb trail
$GLOBALS['SNIPPETS']['CatTrail'] = "";
if ($GLOBALS['EnableSEOUrls'] == 1) {
$baseLink = sprintf("%s/categories", $GLOBALS['ShopPath']);
} else {
$baseLink = sprintf("%s/categories.php?category=", $GLOBALS['ShopPath']);
}
$count = 0;
$catPath = '';
foreach($GLOBALS['CatTrail'] as $trail) {
// if it's the root category and not friendly url, don't add / in front
if ($count==0 && $GLOBALS['EnableSEOUrls'] != 1) {
$baseLink .= MakeURLSafe($trail[1]);
} else {
$baseLink .= "/" . MakeURLSafe($trail[1]);
}
$catPath = MakeURLSafe($trail[1]);
$GLOBALS['CatTrailName'] = isc_html_escape($trail[1]);
$GLOBALS['CatTrailLink'] = $baseLink."/";
if($count++ == count($GLOBALS['CatTrail'])-1) {
$GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItemCurrent");
}
else {
$GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItem");
}
}
}
示例3: SetPanelSettings
public function SetPanelSettings()
{
$GLOBALS['SNIPPETS']['ShippingAddressList'] = "";
$GLOBALS['ShippingAddressRow'] = "";
$count = 0;
$GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER');
// Get a list of all shipping addresses for this customer and out them as radio buttons
$shipping_addresses = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerShippingAddresses();
foreach ($shipping_addresses as $address) {
$GLOBALS['ShippingAddressId'] = (int) $address['shipid'];
$GLOBALS['ShipFullName'] = isc_html_escape($address['shipfirstname'] . ' ' . $address['shiplastname']);
$GLOBALS['ShipCompany'] = '';
if ($address['shipcompany']) {
$GLOBALS['ShipCompany'] = isc_html_escape($address['shipcompany']) . '<br />';
}
$GLOBALS['ShipAddressLine1'] = isc_html_escape($address['shipaddress1']);
if ($address['shipaddress2'] != "") {
$GLOBALS['ShipAddressLine2'] = isc_html_escape($address['shipaddress2']);
} else {
$GLOBALS['ShipAddressLine2'] = '';
}
$GLOBALS['ShipSuburb'] = isc_html_escape($address['shipcity']);
$GLOBALS['ShipState'] = isc_html_escape($address['shipstate']);
$GLOBALS['ShipZip'] = isc_html_escape($address['shipzip']);
$GLOBALS['ShipCountry'] = isc_html_escape($address['shipcountry']);
if ($address['shipphone'] != "") {
$GLOBALS['ShipPhone'] = isc_html_escape(sprintf("%s: %s", GetLang('Phone'), $address['shipphone']));
} else {
$GLOBALS['ShipPhone'] = "";
}
$GLOBALS['SNIPPETS']['ShippingAddressList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CheckoutShippingAddressItemOffer");
}
}
示例4: SetPanelSettings
public function SetPanelSettings()
{
if(!isset($GLOBALS['BreadCrumbs'])) {
$this->DontDisplay = true;
return;
}
$GLOBALS['ISC_CLASS_TAGS'] = GetClass('ISC_TAGS');
$GLOBALS['SNIPPETS']['Trail'] = '';
$trailCount = count($GLOBALS['BreadCrumbs']);
foreach($GLOBALS['BreadCrumbs'] as $k => $trail) {
$GLOBALS['CatTrailName'] = isc_html_escape($trail['name']);
$GLOBALS['CatTrailLink'] = '';
if(isset($trail['link'])) {
$GLOBALS['CatTrailLink'] = isc_html_escape($trail['link']);
}
if($k == $trailCount-1) {
$GLOBALS['SNIPPETS']['Trail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItemCurrent");
}
else {
$GLOBALS['SNIPPETS']['Trail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItem");
}
}
}
示例5: SetPanelSettings
public function SetPanelSettings()
{
if (!isset($GLOBALS['ISC_CLASS_PRODUCT'])) {
$GLOBALS['ISC_CLASS_PRODUCT'] = GetClass('ISC_PRODUCT');
}
$relatedProducts = $GLOBALS['ISC_CLASS_PRODUCT']->GetRelatedProducts();
if (!$relatedProducts) {
$this->DontDisplay = true;
return;
}
$output = "";
if(!getProductReviewsEnabled()) {
$GLOBALS['HideProductRating'] = "display: none";
}
$query = $this->getProductQuery('p.productid IN ('.$relatedProducts.')', 'prodsortorder ASC');
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
$GLOBALS['AlternateClass'] = '';
while($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
$this->setProductGlobals($row);
$output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SideRelatedProducts");
}
$GLOBALS['SNIPPETS']['SideProductsRelated'] = $output;
if(!$output) {
$this->DontDisplay = true;
}
}
示例6: HandleToDo
/**
* ISC_ADMIN_DESIGNMODE::HandleToDo()
*
* @return
*/
public function HandleToDo()
{
$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('layout');
if (isset($_REQUEST['ToDo'])) {
$do = $_REQUEST['ToDo'];
} else {
$do = '';
}
// Include the Admin authorisation class
$GLOBALS['ISC_CLASS_ADMIN_AUTH'] = GetClass('ISC_ADMIN_AUTH');
if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->IsLoggedIn() && $GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Design_Mode)) {
switch (isc_strtolower($do)) {
case "saveupdatedfile":
$this->SaveFile();
break;
case "editfile":
$this->EditFile();
break;
case "revertfile":
$this->RevertFile();
break;
default:
$this->UpdateLayoutPanels();
}
} else {
$GLOBALS["ISC_CLASS_ADMIN_ENGINE"]->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
}
}
示例7: SetPanelSettings
function SetPanelSettings()
{
$output = "";
$GLOBALS['ISC_CategoryBrandCache'] = GetClass('ISC_CACHECATEGORYBRANDS');
$cachedCategoryBrands = $GLOBALS['ISC_CategoryBrandCache']->getCategoryBrandsData();
$mybrands = $GLOBALS['ISC_CategoryBrandCache']->GetBrands($cachedCategoryBrands);
/*// Get the number of brands
$query = "select count(brandid) as num from [|PREFIX|]brands";
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
$row = $GLOBALS['ISC_CLASS_DB']->Fetch($result);*/
$num_brands = count($mybrands);
if ($num_brands > 0) {
// Get the 5 most popular brands
/*$query = "select b.brandid, b.brandname, (select count(productid) from [|PREFIX|]products p where p.prodbrandid=b.brandid and p.prodvisible='1') as num from [|PREFIX|]brands b order by b.brandname asc";
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
*/
foreach ($mybrands as $brand) {
$GLOBALS['BrandLink'] = BrandLink($brand['brandname']);
$GLOBALS['BrandName'] = isc_html_escape($brand['brandname']);
$output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem");
}
if ($num_brands > 5) {
$GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandAllItem");
}
$output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);
$GLOBALS['SNIPPETS']['SideShopByBrandFullList'] = $output;
} else {
// Hide the panel
$this->DontDisplay = true;
$GLOBALS['HideSideShopByBrandFullPanel'] = "none";
}
}
示例8: ExportOrders
/**
* An additional action that's called by this module when the above form is submitted.
*/
public function ExportOrders()
{
// Load up the orders class
$GLOBALS['ISC_CLASS_ADMIN_ORDERS'] = GetClass('ISC_ADMIN_ORDERS');
// Get the value of the order status setting
if ($this->GetValue('orderstatus') == 'shipped') {
$_GET['orderStatus'] = 2;
}
$numOrders = 0;
$ordersResult = $GLOBALS['ISC_CLASS_ADMIN_ORDERS']->_GetOrderList(0, 'orderid', 'desc', $numOrders, true);
if ($numOrders == 0) {
$GLOBALS['ISC_CLASS_ADMIN_ORDERS']->ManageOrders(GetLang('NoOrders'));
return;
}
require_once ISC_BASE_PATH . '/lib/class.xml.php';
$xml = new ISC_XML_PARSER();
$tags = array();
while ($order = $GLOBALS['ISC_CLASS_DB']->Fetch($ordersResult)) {
$orderTags = array();
$orderTags[] = $xml->MakeXMLTag('amount', number_format($order['ordtotalamount'], 2));
$orderTags[] = $xml->MakeXMLTag('customer', $order['ordbillfirstname'] . ' ' . $order['ordbilllastname'], true);
$orderTags[] = $xml->MakeXMLTag('date', CDate($order['orddate']), true);
$attributes = array('orderid' => $order['orderid']);
$tags[] = $xml->MakeXMLTag('order', implode('', $orderTags), false, $attributes);
}
@ob_end_clean();
$xml->SendXMLHeader();
$xml->SendXMLResponse($tags);
exit;
}
示例9: getFormFieldGrid
private function getFormFieldGrid()
{
if (!$GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Manage_FormFields)) {
$tags[] = $this->MakeXMLTag('status', 0);
$tags[] = $this->MakeXMLTag('grid', '', true);
$this->SendXMLHeader();
$this->SendXMLResponse($tags);
exit;
}
$GLOBALS['ISC_CLASS_TEMPLATE']->ParseFrontendLangFile();
if (!isset($_POST['formId']) || !isId($_POST['formId'])) {
$tags[] = $this->MakeXMLTag('status', 0);
$tags[] = $this->MakeXMLTag('grid', '', true);
$this->SendXMLHeader();
$this->SendXMLResponse($tags);
exit;
}
$GLOBALS['ISC_ADMIN_FORMFIELDS'] = GetClass('ISC_ADMIN_FORMFIELDS');
$grid = $GLOBALS['ISC_ADMIN_FORMFIELDS']->ManageFormFieldsGrid($_POST['formId']);
if ($grid == '') {
$grid = '<li><div class="MessageBox MessageBoxInfo" style="margin:0;">' . GetLang('FormFieldsSectionNoFields') . '</div></li>';
}
$tags[] = $this->MakeXMLTag('status', 1);
$tags[] = $this->MakeXMLTag('grid', $grid, true);
$this->SendXMLHeader();
$this->SendXMLResponse($tags);
exit;
}
示例10: SetPanelSettings
public function SetPanelSettings()
{
$GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER');
$customerid = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerId();
if(gzte11(ISC_LARGEPRINT)) {
// Get the number of new messages for this customer
$query = "
SELECT
COUNT(*)
FROM [|PREFIX|]orders o, [|PREFIX|]order_messages om
WHERE o.ordcustid = " . (int)$customerid . " AND o.deleted = 0 AND om.messageorderid = o.orderid AND om.messagefrom = 'admin' AND messagestatus = 'unread'
";
$GLOBALS['NumNewMessages'] = (int)$GLOBALS['ISC_CLASS_DB']->FetchOne($query);
}
else {
$GLOBALS['HideMessagesMenu'] = "none";
}
// Do we want to show or hide the return requests menu item?
if(gzte11(ISC_LARGEPRINT) && GetConfig('EnableReturns') == 1) {
$query = sprintf("SELECT returnid FROM [|PREFIX|]returns WHERE retcustomerid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid));
if(!$GLOBALS['ISC_CLASS_DB']->FetchOne($query)) {
$GLOBALS['HideReturnRequestsMenu'] = "none";
}
}
else {
$GLOBALS['HideReturnRequestsMenu'] = 'none';
}
// How many products are in their wish list?
$query = sprintf("select count(wishlistid) as num from [|PREFIX|]wishlists where customerid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid));
$GLOBALS['NumWishListItems'] = $GLOBALS['ISC_CLASS_DB']->FetchOne($query);
}
示例11: __construct
public function __construct()
{
$TempGet = $_GET;
$this->cache_file = ISC_BASE_PATH . '/cache/ymms.data';
$GLOBALS['ISC_CLASS_NEWSEARCH'] = GetClass('ISC_NEWSEARCH');
$params = $GLOBALS['ISC_CLASS_NEWSEARCH']->_searchterms;
if (isset($params['year'])) {
$this->cur_year = $params['year'];
}
if (isset($params['make'])) {
$this->cur_make = $params['make'];
}
if (isset($params['model'])) {
$this->cur_model = $params['model'];
}
$this->params = $params;
$_GET = $TempGet;
if (file_exists($this->cache_file)) {
$ymms_data_cached = file_get_contents($this->cache_file);
$this->data = unserialize($ymms_data_cached);
$this->iscached = TRUE;
} else {
$this->data = "";
$this->iscached = FALSE;
}
}
示例12: SetPanelSettings
/**
* Set the panel settings.
*/
public function SetPanelSettings()
{
if(GetConfig('HomeFeaturedProducts') <= 0) {
$this->DontDisplay = true;
return false;
}
$GLOBALS['SNIPPETS']['VendorFeaturedItems'] = '';
if(!getProductReviewsEnabled()) {
$GLOBALS['HideProductRating'] = "display: none";
}
$cVendor = GetClass('ISC_VENDORS');
$vendor = $cVendor->GetVendor();
$query = $this->getProductQuery(
'p.prodvendorid='.(int)$vendor['vendorid'],
'p.prodvendorfeatured DESC, RAND()',
getConfig('HomeFeaturedProducts')
);
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
$GLOBALS['AlternateClass'] = '';
while($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
$this->setProductGlobals($row);
$GLOBALS['SNIPPETS']['VendorFeaturedItems'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("VendorFeaturedItemsItem");
}
$GLOBALS['VendorProductsLink'] = VendorProductsLink($vendor);
if(!$GLOBALS['SNIPPETS']['VendorFeaturedItems']) {
$this->DontDisplay = true;
}
}
示例13: GetCheckoutModulesThatCustomerHasAccessTo
/**
* Get a list of checkout modules that are enabled, configured and that the customer has access to.
*
* @param boolean Set to true if we're on the 'confirm order' page.
* @return array An array of available modules.
*/
function GetCheckoutModulesThatCustomerHasAccessTo($confirmPage = false)
{
$modules = GetAvailableModules('checkout', true, true);
$availableModules = array();
foreach ($modules as $module) {
// Is the module accessible and supported?
if (!$module['object']->IsAccessible() || !$module['object']->IsSupported()) {
$module['object']->ResetErrors();
continue;
}
// If we have a vendor order, does the module support these?
if (!defined('ISC_ADMIN_CP')) {
$cart = GetClass('ISC_CART');
$cartVendors = $cart->api->GetCartVendorIds();
if (count($cartVendors) > 1 && $module['object']->IsVendorCompatible() == false) {
continue;
}
// Compatible with split shipping?
$checkout = GetClass('ISC_CHECKOUT');
$shippingAddresses = $checkout->GetOrderShippingAddresses();
if (count($shippingAddresses) > 1 && $module['object']->IsMultiShippingCompatible() == false) {
continue;
}
// Maybe we're on the "Confirm Order" page
if ($confirmPage && !$module['object']->showOnConfirmPage) {
continue;
}
}
// Otherwise, the module is available soo add it to the list
$availableModules[] = $module;
$module['object']->ResetErrors();
}
return $availableModules;
}
示例14: _ConstructPostData
protected function _ConstructPostData($postData)
{
$transactionid = $this->GetCombinedOrderId();
$ccname = $postData['name'];
$cctype = $postData['cctype'];
$ccissueno = $postData['ccissueno'];
$ccissuedatem = $postData['ccissuedatem'];
$ccissuedatey = $postData['ccissuedatey'];
$ccnum = $postData['ccno'];
$ccexpm = $postData['ccexpm'];
$ccexpy = $postData['ccexpy'];
$cccvd = $postData['cccvd'];
$order_desc = sprintf(GetLang('YourOrderFrom'), $GLOBALS['StoreName']);
$billingDetails = $this->GetBillingDetails();
$province = '--';
$ccemail = $billingDetails['ordbillemail'];
if (empty($ccemail)) {
// Get the customer's email address
$GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER');
$ccemail = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerEmailAddress();
}
// Contstruct the POST data
$directone_post['vendor_name'] = $this->GetValue('merchantid');
$directone_post['vendor_password'] = $this->GetValue('password');
$directone_post['card_number'] = $ccnum;
$directone_post['card_expiry'] = $ccexpm . $ccexpy;
$directone_post['card_holder'] = $ccname;
$directone_post['payment_amount'] = $this->GetGatewayAmount();
$directone_post['payment_reference'] = $transactionid;
return http_build_query($directone_post);
}
示例15: EntryPoint
/**
* EntryPoint
* Start by collecting a few options for generating the AdWords ads
*
* @return Void
*/
public function EntryPoint()
{
$GLOBALS['HTTPHost'] = $_SERVER['HTTP_HOST'];
$GLOBALS['ISC_CLASS_ADMIN_CATEGORY'] = GetClass('ISC_ADMIN_CATEGORY');
$GLOBALS['CategoryOptions'] = $GLOBALS['ISC_CLASS_ADMIN_CATEGORY']->GetCategoryOptions(0, "<option %s value='%d'>%s</option>", "selected=\"selected\"", "", false);
$this->ParseTemplate('googleadwords.form');
}