本文整理汇总了PHP中GetLib函数的典型用法代码示例。如果您正苦于以下问题:PHP GetLib函数的具体用法?PHP GetLib怎么用?PHP GetLib使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetLib函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* The constructor.
*/
public function __construct()
{
$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('ebay');
parent::__construct();
GetLib('class.json');
}
示例2: __construct
public function __construct()
{
$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('settings');
$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('settings.emailintegration');
GetLib('class.json');
parent::__construct();
}
示例3: HandleToDo
public function HandleToDo($todo)
{
if (!$this->auth->HasPermission(AUTH_Manage_Variations)) {
$this->engine->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
}
GetLib('class.json');
// todo method name
$todo = $todo . 'Action';
$render = null;
if (method_exists($this, $todo)) {
$render = $this->$todo();
}
// process template routing
if ($render && is_string($render)) {
if ($this->renderLayout) {
$this->engine->printHeader();
}
$this->template->display($render);
if ($this->renderLayout) {
$this->engine->printFooter();
}
}
}
示例4: HandleToDo
public function HandleToDo()
{
/**
* Convert the input character set from the hard coded UTF-8 to their
* selected character set
*/
convertRequestInput();
GetLib('class.json');
$what = isc_strtolower(@$_REQUEST['w']);
switch ($what) {
case "loadlinker":
if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->IsLoggedIn()) {
$this->loadLinker();
}
exit;
break;
case "search":
if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->IsLoggedIn()) {
$this->search();
}
exit;
break;
}
}
示例5: HandleToDo
/**
* Does internal settings page routing. Something like this should be built in.
*
* @param string $todo The "action" for this "controller"
* @return void
*/
public function HandleToDo($todo)
{
GetLib('class.json');
// todo method name
$todo = $todo . 'Action';
// the page to render is returned as a string from the action
$render = null;
// process action routing
if (method_exists($this, $todo) || method_exists($this, '__call')) {
$render = $this->$todo();
}
// process template routing
if ($render && is_string($render)) {
if ($this->renderLayout) {
$this->engine->printHeader();
}
$this->template->display($render . '.tpl');
if ($this->renderLayout) {
$this->engine->printFooter();
}
}
}
示例6: __construct
/**
* Constructs a new job tracker "controller" and sets defaults.
*
* @return Isc_Admin_JobTracker
*/
public function __construct()
{
parent::__construct();
GetLib('class.json');
// parse the language file
// $this->engine->loadLangFile('shoppingcomparison');
}
示例7: setUp
public function setUp()
{
parent::setUp();
GetLib('class.json');
$this->_keystore = Interspire_KeyStore::instance();
$this->_prefix = 'email:module_export:' . $this->args['id'] . ':';
$this->_db = $GLOBALS['ISC_CLASS_DB'];
}
示例8: setUp
public function setUp()
{
parent::setUp();
GetLib('class.json');
$this->_keystore = Interspire_KeyStore::instance();
$this->_prefix = 'ebay:list_products:' . $this->args['id'] . ':';
$this->_db = $GLOBALS['ISC_CLASS_DB'];
$this->_engine = getClass('ISC_ADMIN_ENGINE');
$this->_engine->LoadLangFile('ebay');
$this->_log = $GLOBALS['ISC_CLASS_LOG'];
}
示例9: HandlePage
public function HandlePage()
{
GetLib("class.redirects");
// We're here because we can't find the requested URL
// It may be a URL that has been set up as a redirect, so lets check that
ISC_REDIRECTS::checkRedirect($_SERVER['REQUEST_URI']);
// Send the 404 status headers
header("HTTP/1.1 404 Not Found");
// Simply show the 404 page
$GLOBALS['ISC_CLASS_TEMPLATE']->SetPageTitle(GetConfig('StoreName')." - ".GetLang('NotFound'));
$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("404");
$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();
}
示例10: HandleToDo
public function HandleToDo()
{
/**
* Convert the input character set from the hard coded UTF-8 to their
* selected character set
*/
convertRequestInput();
GetLib('class.json');
$action = isc_strtolower(@$_REQUEST['w']);
if(method_exists($this, $action)) {
$this->$action();
die();
}
}
示例11: CheckTemplateKey
/**
* Check that the license key is valid for a commerical template
*
* @return void
**/
private function CheckTemplateKey()
{
$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('layout');
GetLib('class.remoteopener');
$opener = new connect_remote();
// Get the information about this template from the remote server
$host = base64_encode($_SERVER['HTTP_HOST']);
$urlBits = array('template' => urlencode($_REQUEST['template']), 'key' => urlencode($_POST['templateKey']), 'host' => $host);
$url = $this->BuildTemplateURL($GLOBALS['ISC_CFG']['TemplateVerifyURL'], $urlBits);
$response = PostToRemoteFileAndGetResponse($url);
// A remote connection couldn't be established
if ($response === null) {
exit;
}
$templateXML = @simplexml_load_string($response);
if (!is_object($templateXML)) {
exit;
}
$GLOBALS['ErrorMessage'] = '';
if (isset($templateXML->error)) {
switch (strval($this->error)) {
case "invalid":
$GLOBALS['ErrorMessage'] = GetLang('InvalidKey');
return false;
case "invalid_domain":
$GLOBALS['ErrorMessage'] = GetLang('InvalidKeyDomain');
return false;
case "invalid_tpl":
$GLOBALS['ErrorMessage'] = GetLang('InvalidKeyTemplate');
return false;
case "invalid_tpl2":
$GLOBALS['ErrorMessage'] = GetLang('InvalidKeyTemplate2');
return false;
default:
$GLOBALS['ErrorMessage'] = GetLang('InvalidTemplate');
return false;
}
}
if ($GLOBALS['ErrorMessage'] == '') {
$tags[] = $this->MakeXMLTag('status', 1);
} else {
$tags[] = $this->MakeXMLTag('status', 0);
$tags[] = $this->MakeXMLTag('message', $GLOBALS['ErrorMessage']);
}
$this->SendXMLHeader();
$this->SendXMLResponse($tags);
die;
}
示例12: SaveUpdatedSettings
//.........这里部分代码省略.........
);
// hacky :/
$imageTimeChangedKeys = array(
ISC_PRODUCT_IMAGE_SIZE_THUMBNAIL => 'ProductImagesStorewideThumbnail_timeChanged',
ISC_PRODUCT_IMAGE_SIZE_STANDARD => 'ProductImagesProductPageImage_timeChanged',
ISC_PRODUCT_IMAGE_SIZE_TINY => 'ProductImagesGalleryThumbnail_timeChanged',
ISC_PRODUCT_IMAGE_SIZE_ZOOM => 'ProductImagesZoomImage_timeChanged',
);
$changedDimensions = array();
foreach($imageSizes as $size => $dimensionSettings) {
foreach($dimensionSettings as $dimension) {
if($GLOBALS['ISC_NEW_CFG'][$dimension] != $GLOBALS['ISC_CFG'][$dimension]) {
$changedDimensions[$size] = $size;
$GLOBALS['ISC_NEW_CFG'][$imageTimeChangedKeys[$size]] = time();
}
}
}
// product images used to be deleted here if the dimensions changed but this is now inside the image class
// and is based off the _timeChanged above
// check if the down for maintenance message is the same as the language pack
if(Store_DownForMaintenance::getDownForMaintenanceMessage(true) == $_POST['DownForMaintenanceMessage'] || empty($_POST['DownForMaintenanceMessage'])) {
$GLOBALS['ISC_NEW_CFG']['DownForMaintenanceMessage'] = '';
} else if ($GLOBALS['ISC_NEW_CFG']['DownForMaintenance'] == 1) {
$GLOBALS['ISC_NEW_CFG']['DownForMaintenanceMessage'] = $_POST['DownForMaintenanceMessage'];
}
// Normalize the shop path based on users redirect to www/no-www setting
$shopPath = $_POST['ShopPath'];
GetLib('class.redirects');
$shopPath = ISC_REDIRECTS::normalizeShopPath($shopPath, (int)$_POST['RedirectWWW']);
$GLOBALS['ISC_NEW_CFG']['ShopPath'] = $shopPath;
$strings = array (
'SharedSSLPath',
'SubdomainSSLPath',
'StoreName',
'StoreAddress',
'serverStamp',
'DownloadDirectory',
'ImageDirectory',
'HomePagePageTitle',
'MetaKeywords',
'MetaDesc',
'AdminEmail',
'OrderEmail',
'DisplayDateFormat',
'ExportDateFormat',
'ExtendedDisplayDateFormat',
'GoogleMapsAPIKey',
'ForwardInvoiceEmails',
'HTTPProxyPort',
'HTTPProxyServer',
'DimensionsDecimalToken',
'DimensionsThousandsToken',
'DimensionsDecimalPlaces',
'SessionSavePath',
'DefaultPreOrderMessage',
'FacebookLikeButtonAdminIds',
'CategoryListStyle',
);
示例13: _GetTemplateList
public function _GetTemplateList()
{
GetLib('class.file');
// Get a list of templates and return them as a sorted array
$dir = ISC_BASE_PATH . "/templates";
$arrTemplates = array();
if (is_dir($dir)) {
$fileHandle = new FileClass;
if ($fileHandle->SetLoadDir($dir)) {
while (($file = $fileHandle->NextFolder()) !== false) {
if ($file != "." && $file != ".." && $file != "CVS" && $file != ".svn" && $file != 'blank.dat' && $file{0} != '_') {
// These are the template categories. We will create
// an array for each of them
$arrTemplates[] = $file;
sort($arrTemplates);
}
}
$fileHandle->CloseHandle();
}
}
ksort($arrTemplates);
return $arrTemplates;
}
示例14: remoteUseSourceImages
/**
* Handler for accepting a new product images from the image manager or other products
*
* @param ISC_ADMIN_REMOTE $remote
*/
public function remoteUseSourceImages(ISC_ADMIN_REMOTE $remote)
{
GetLib('class.imagedir');
$db = $GLOBALS["ISC_CLASS_DB"];
$sourceImages = @$_POST['images'];
$tags = array();
$errors = array();
$images = array();
$productId = false;
$productHash = false;
if (isset($_POST['product'])) {
$productId = (int)@$_POST['product'];
if (!isId($productId) || !ProductExists($productId)) {
$errors[] = GetLang('ProductDoesntExist');
}
} else if (isset($_POST['hash']) && $_POST['hash']) {
$productHash = $_POST['hash'];
} else {
$errors[] = GetLang('ProductDoesntExist');
}
if (empty($errors) && count($sourceImages)) {
// only proceed if they had images selected
$imageDir = new ISC_IMAGEDIR();
foreach ($sourceImages as $imageId) {
if(substr($imageId, 0, strlen('productimage_')) == 'productimage_') {
// image from another product
$productImageId = (int)str_replace('productimage_', '', $imageId);
$productImage = new ISC_PRODUCT_IMAGE($productImageId);
$sourceFilePath = $productImage->getAbsoluteSourceFilePath();
$originalFilename = $productImage->getFileName();
} elseif (substr($imageId, 0, strlen('imagemanager_')) == 'imagemanager_') {
// image from the image manager
$imageManagerId = str_replace('imagemanager_', '', $imageId);
$originalFilename = $imageDir->findFileNameById($imageManagerId);
$sourceFilePath = $imageDir->GetImagePath() . '/' . $originalFilename;
} else {
// not a valid selection
continue;
}
try {
if ($productHash) {
$image = ISC_PRODUCT_IMAGE::importImage($sourceFilePath, $originalFilename, $productHash, true, false);
} else {
$image = ISC_PRODUCT_IMAGE::importImage($sourceFilePath, $originalFilename, $productId, false, false);
}
} catch (ISC_PRODUCT_IMAGE_IMPORT_INVALIDIMAGEFILE_EXCEPTION $exception) {
$errors[] = $url . ": " . $exception->getMessage() . ' ' . GetLang('ProductImageInvalidFileFromSource');
continue;
} catch (ISC_PRODUCT_IMAGE_IMPORT_EXCEPTION $exception) {
// these exceptions should have language-powered messages so are safe to return to the user
$errors[] = $url . ": " . $exception->getMessage();
continue;
} catch (Exception $exception) {
// other unknown error
$errors[] = $url . ': ' . GetLang('ProductImageProcessUnknownError');
continue;
}
// all done, add to list of successful images
$images[] = $image;
}
}
foreach ($images as /*ISC_PRODUCT_IMAGE*/$image) {
$json = array(
'id' => $image->getProductImageId(),
'product' => $image->getProductId(),
'hash' => $image->getProductHash(),
'preview' => $image->getResizedUrl(ISC_PRODUCT_IMAGE_SIZE_THUMBNAIL, true),
'zoom' => $image->getResizedUrl(ISC_PRODUCT_IMAGE_SIZE_ZOOM, true),
'description' => $image->getDescription(),
'baseThumbnail' => $image->getIsThumbnail(),
'sort' => $image->getSort(),
);
$tags[] = $remote->MakeXMLTag('image', isc_json_encode($json), true);
}
foreach ($errors as $message) {
$tags[] = $remote->MakeXMLTag('error', $message, true);
}
$remote->SendXMLHeader();
$remote->SendXMLResponse($tags);
die();
//.........这里部分代码省略.........
示例15: normalizeShopPath
/**
* Adds or removes www. to the ShopPath depending on the RedirectWWW config setting.
* This is so the store doesn't unnecessarily keep redirecting if the RedirectWWW setting doesn't match with the ShopPath.
*
* @param string $shopPath The ShopPath to normalize
* @param REDIRECT_NO_PREFERENCE|REDIRECT_TO_WWW|REDIRECT_TO_NO_WWW $redirectWWW The chosen redirect www preference
* @return string The normalized shop path
*/
public static function normalizeShopPath($shopPath, $redirectWWW)
{
if ($redirectWWW == REDIRECT_NO_PREFERENCE) {
return $shopPath;
}
$info = @parse_url($shopPath);
if ($info === false || empty($info['host'])) {
return $shopPath;
}
$host = $info['host'];
// set to redirect to www and their shop path doesn't contain www.
if ($redirectWWW == REDIRECT_TO_WWW && isc_substr($host, 0, 4) != 'www.') {
// add www. to host
$newHost = 'www.' . $host;
}
// set to redirect to no-www but their shop path contains www?
elseif ($redirectWWW == REDIRECT_TO_NO_WWW && isc_substr($host, 0, 4) == 'www.') {
// remove the www. from host
$newHost = isc_substr($host, 4);
}
else {
return $shopPath;
}
// reconstruct shop path
$info['host'] = $newHost;
GetLib('class.urls');
$newShopPath = ISC_URLS::unparseUrl($info);
return $newShopPath;
}