本文整理汇总了PHP中GlobalConfig::checkOpenSiVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP GlobalConfig::checkOpenSiVersion方法的具体用法?PHP GlobalConfig::checkOpenSiVersion怎么用?PHP GlobalConfig::checkOpenSiVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GlobalConfig
的用法示例。
在下文中一共展示了GlobalConfig::checkOpenSiVersion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hookAdminOrder
public function hookAdminOrder($params)
{
if (Configuration::get('OSI_HOOK_ADMIN_ORDER') == 1) {
global $cookie;
$order = new Order($params['id_order']);
$return = Db::getInstance()->ExecuteS('SELECT * FROM ' . _DB_PREFIX_ . 'opensi_order WHERE id_order = \'' . (int) $order->id . '\' LIMIT 1');
$html = '
<br /><br />
<fieldset style="width:400px">
<legend><img src="' . $this->_path . 'logo.gif" alt="" /> ' . $this->l('Sync with OpenSi') . '</legend>
';
/*
* Check if upgrade is available
*/
if (@ini_get('allow_url_fopen') and $update = GlobalConfig::checkOpenSiVersion($this->version)) {
$html .= '<div class="warn">' . $this->l('New OpenSi version available') . '<br /><a style="text-decoration: underline;" href="' . $update['link'] . '">' . $this->l('Download') . ' ' . $update['name'] . '</a> !</div>';
}
/*
* Is the order synchronized with OpenSi ?
*/
if (isset($return[0]['id_order'])) {
$html .= $this->l('Order synchronized with OpenSi the :') . ' ' . Tools::displayDate($return[0]['date_order_synchro'], (int) $cookie->id_lang, true);
} else {
$html .= $this->l('Order not synchronized with OpenSi.');
}
/* Display links of OpenSi invoices if available */
$query = 'SELECT * FROM ' . _DB_PREFIX_ . 'opensi_invoice WHERE id_order = \'' . (int) $order->id . '\'';
if ($links = Db::getInstance()->ExecuteS($query)) {
$html .= '<br />';
$i = 0;
foreach ($links as $link) {
$html .= '<br /><img src="' . $this->_path . 'img/invoice.png" alt="" /> <a href="' . _PS_BASE_URL_ . __PS_BASE_URI__ . $this->_moduleUri . 'getInvoice.php?key=' . $link['url_key'] . '">';
if ($link['type'] == 'F') {
$html .= $this->l('Invoice') . ' ' . $link['number_invoice'] . '.pdf';
} else {
if ($link['type'] == 'A') {
$html .= $this->l('Credit') . ' ' . $link['number_invoice'] . '.pdf';
}
}
$html .= '</a>';
$i++;
}
}
$html .= '</fieldset>';
return $html;
}
}