本文整理汇总了PHP中Tools类的典型用法代码示例。如果您正苦于以下问题:PHP Tools类的具体用法?PHP Tools怎么用?PHP Tools使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Tools类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: sendOrderReplay
public function sendOrderReplay($data = NULL)
{
if (!$data || empty($data['content'])) {
return 'Can not send empty data';
}
$data['send_url'] .= 'php/interface.php?m=clerk&c=UserQuiz&a=GetClientReply';
$_utilFRGInterface = $this->_getGlobalData('Util_FRGInterface', 'object');
$_utilFRGInterface->set_sendUrl($data['send_url']);
$fileData = $data['file_img'];
$isFile = is_file($fileData);
if ($isFile) {
$webPath = pathinfo($fileData);
$data['ReplyFile'] = 'http://' . $_SERVER['HTTP_HOST'] . '/Upload/Service/' . date('Ymd', CURRENT_TIME) . '/' . $webPath["basename"];
}
unset($data['send_url'], $data['file_img']);
$data['_sign'] = md5(TAKE_KEY . CURRENT_TIME);
$data['_verifycode'] = CURRENT_TIME;
$_utilFRGInterface->setPost($data);
$data = $_utilFRGInterface->callInterface();
$errorInfo = Tools::getLang('SEND_MSG', 'Control_WorkOrder');
if ($data) {
if ($data['msgno'] == 1) {
return true;
}
$errorInfo = Tools::getLang('FRG_SEND_ERROR', 'Control_WorkOrder', array('data[message]' => $data['message']));
}
if ($isFile) {
unlink($fileData);
}
return $errorInfo;
}
开发者ID:huangwei2wei,项目名称:kfxt,代码行数:31,代码来源:2.class.php
示例2: getTranslationsFieldsChild
/**
* Check then return multilingual fields for database interaction
*
* @return array Multilingual fields
*/
public function getTranslationsFieldsChild()
{
parent::validateFieldsLang();
$fieldsArray = array('title', 'url');
$fields = array();
$languages = Language::getLanguages(false);
$defaultLanguage = (int) Configuration::get('PS_LANG_DEFAULT');
foreach ($languages as $language) {
$fields[$language['id_lang']]['id_lang'] = (int) $language['id_lang'];
$fields[$language['id_lang']][self::$definition['primary']] = (int) $this->id;
foreach ($fieldsArray as $field) {
if (!Validate::isTableOrIdentifier($field)) {
die(Tools::displayError());
}
if (isset($this->{$field}[$language['id_lang']]) and !empty($this->{$field}[$language['id_lang']])) {
$fields[$language['id_lang']][$field] = pSQL($this->{$field}[$language['id_lang']], true);
} elseif (in_array($field, $this->fieldsRequiredLang)) {
$fields[$language['id_lang']][$field] = pSQL($this->{$field}[$defaultLanguage], true);
} else {
$fields[$language['id_lang']][$field] = '';
}
}
}
return $fields;
}
开发者ID:arozanski,项目名称:simpleresponsivetheme,代码行数:30,代码来源:ResponsiveLinksClass.php
示例3: getContent
public function getContent()
{
// If we try to update the settings
$output = '';
if (isset($_POST['submitModule'])) {
Configuration::updateValue('blocksocial_facebook', $_POST['facebook_url'] != '' ? $_POST['facebook_url'] : '');
Configuration::updateValue('blocksocial_twitter', $_POST['twitter_url'] != '' ? $_POST['twitter_url'] : '');
Configuration::updateValue('blocksocial_rss', $_POST['rss_url'] != '' ? $_POST['rss_url'] : '');
$output = '<div class="conf confirm">' . $this->l('Configuration updated') . '</div>';
}
return '
<h2>' . $this->displayName . '</h2>
' . $output . '
<form action="' . Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']) . '" method="post">
<fieldset class="width2">
<label for="facebook_url">' . $this->l('Facebook URL: ') . '</label>
<input type="text" id="facebook_url" name="facebook_url" value="' . Tools::safeOutput(Configuration::get('blocksocial_facebook') != "" ? Configuration::get('blocksocial_facebook') : "") . '" />
<div class="clear"> </div>
<label for="twitter_url">' . $this->l('Twitter URL: ') . '</label>
<input type="text" id="twitter_url" name="twitter_url" value="' . Tools::safeOutput(Configuration::get('blocksocial_twitter') != "" ? Configuration::get('blocksocial_twitter') : "") . '" />
<div class="clear"> </div>
<label for="rss_url">' . $this->l('RSS URL: ') . '</label>
<input type="text" id="rss_url" name="rss_url" value="' . Tools::safeOutput(Configuration::get('blocksocial_rss') != "" ? Configuration::get('blocksocial_rss') : "") . '" />
<div class="clear"> </div>
<br /><center><input type="submit" name="submitModule" value="' . $this->l('Update settings') . '" class="button" /></center>
</fieldset>
</form>';
}
开发者ID:jicheng17,项目名称:vipinsg,代码行数:28,代码来源:blocksocial.php
示例4: renderContent
public function renderContent($args, $setting)
{
$t = array('name' => '', 'image_folder_path' => '', 'limit' => 12, 'columns' => 4);
$protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";
$url = Tools::htmlentitiesutf8($protocol . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
$setting = array_merge($t, $setting);
$oimages = array();
if ($setting['image_folder_path']) {
$path = _PS_ROOT_DIR_ . '/' . trim($setting['image_folder_path']) . '/';
$path = str_replace("//", "/", $path);
if (is_dir($path)) {
$images = glob($path . '*.*');
$exts = array('jpg', 'gif', 'png');
foreach ($images as $cnt => $image) {
$ext = Tools::substr($image, Tools::strlen($image) - 3, Tools::strlen($image));
if (in_array(Tools::strtolower($ext), $exts)) {
if ($cnt < (int) $setting['limit']) {
$i = str_replace("\\", "/", '' . $setting['image_folder_path'] . "/" . basename($image));
$i = str_replace("//", "/", $i);
$oimages[] = $url . $i;
}
}
}
}
}
$images = array();
$setting['images'] = $oimages;
$output = array('type' => 'image', 'data' => $setting);
return $output;
}
开发者ID:ekachandrasetiawan,项目名称:BeltcareCom,代码行数:30,代码来源:image.php
示例5: _prepareHook
protected function _prepareHook($params)
{
$languages = Language::getLanguages(true, $this->context->shop->id);
if (!count($languages)) {
return false;
}
$link = new Link();
if ((int) Configuration::get('PS_REWRITING_SETTINGS')) {
$default_rewrite = array();
if (Dispatcher::getInstance()->getController() == 'product' && ($id_product = (int) Tools::getValue('id_product'))) {
$rewrite_infos = Product::getUrlRewriteInformations((int) $id_product);
foreach ($rewrite_infos as $infos) {
$default_rewrite[$infos['id_lang']] = $link->getProductLink((int) $id_product, $infos['link_rewrite'], $infos['category_rewrite'], $infos['ean13'], (int) $infos['id_lang']);
}
}
if (Dispatcher::getInstance()->getController() == 'category' && ($id_category = (int) Tools::getValue('id_category'))) {
$rewrite_infos = Category::getUrlRewriteInformations((int) $id_category);
foreach ($rewrite_infos as $infos) {
$default_rewrite[$infos['id_lang']] = $link->getCategoryLink((int) $id_category, $infos['link_rewrite'], $infos['id_lang']);
}
}
if (Dispatcher::getInstance()->getController() == 'cms' && (($id_cms = (int) Tools::getValue('id_cms')) || ($id_cms_category = (int) Tools::getValue('id_cms_category')))) {
$rewrite_infos = isset($id_cms) && !isset($id_cms_category) ? CMS::getUrlRewriteInformations($id_cms) : CMSCategory::getUrlRewriteInformations($id_cms_category);
foreach ($rewrite_infos as $infos) {
$arr_link = isset($id_cms) && !isset($id_cms_category) ? $link->getCMSLink($id_cms, $infos['link_rewrite'], null, $infos['id_lang']) : $link->getCMSCategoryLink($id_cms_category, $infos['link_rewrite'], $infos['id_lang']);
$default_rewrite[$infos['id_lang']] = $arr_link;
}
}
$this->smarty->assign('lang_rewrite_urls', $default_rewrite);
}
return true;
}
开发者ID:jpodracky,项目名称:dogs,代码行数:32,代码来源:blocklanguages.php
示例6: postProcess
public function postProcess()
{
$cart = $this->context->cart;
if ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active) {
Tools::redirect('index.php?controller=order&step=1');
}
// Check that this payment option is still available in case the customer changed his address just before the end of the checkout process
$authorized = false;
foreach (Module::getPaymentModules() as $module) {
if ($module['name'] == 'cheque') {
$authorized = true;
break;
}
}
if (!$authorized) {
die($this->module->l('This payment method is not available.', 'validation'));
}
$customer = new Customer($cart->id_customer);
if (!Validate::isLoadedObject($customer)) {
Tools::redirect('index.php?controller=order&step=1');
}
$currency = $this->context->currency;
$total = (double) $cart->getOrderTotal(true, Cart::BOTH);
$mailVars = array('{cheque_name}' => Configuration::get('CHEQUE_NAME'), '{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'), '{cheque_address_html}' => str_replace("\n", '<br />', Configuration::get('CHEQUE_ADDRESS')));
$this->module->validateOrder((int) $cart->id, Configuration::get('PS_OS_CHEQUE'), $total, $this->module->displayName, NULL, $mailVars, (int) $currency->id, false, $customer->secure_key);
Tools::redirect('index.php?controller=order-confirmation&id_cart=' . (int) $cart->id . '&id_module=' . (int) $this->module->id . '&id_order=' . $this->module->currentOrder . '&key=' . $customer->secure_key);
}
开发者ID:dev-lav,项目名称:htdocs,代码行数:27,代码来源:validation.php
示例7: getContent
public function getContent()
{
$html = '';
// If we try to update the settings
if (isset($_POST['submitModule'])) {
Configuration::updateValue('blockcontactinfos_company', isset($_POST['company']) && $_POST['company'] != '' ? $_POST['company'] : Configuration::get('PS_SHOP_NAME'));
Configuration::updateValue('blockcontactinfos_address', isset($_POST['address']) && $_POST['address'] != '' ? $_POST['address'] : '');
Configuration::updateValue('blockcontactinfos_phone', isset($_POST['phone']) && $_POST['phone'] != '' ? $_POST['phone'] : '');
Configuration::updateValue('blockcontactinfos_email', isset($_POST['email']) && $_POST['email'] != '' ? $_POST['email'] : Configuration::get('PS_SHOP_EMAIL'));
$html .= '<div class="confirm">' . $this->l('Configuration updated') . '</div>';
}
$html .= '
<h2>' . $this->displayName . '</h2>
<form action="' . Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']) . '" method="post">
<fieldset>
<p><label for="company">' . $this->l('Company name') . ' :</label>
<input type="text" id="company" name="company" value="' . Tools::safeOutput(Configuration::get('blockcontactinfos_company')) . '" /></p>
<p><label for="address">' . $this->l('Address') . ' :</label>
<textarea id="address" name="address" cols="60" rows="4">' . Tools::safeOutput(Configuration::get('blockcontactinfos_address')) . '</textarea></p>
<p><label for="phone">' . $this->l('Phone number') . ' :</label>
<input type="text" id="phone" name="phone" value="' . Tools::safeOutput(Configuration::get('blockcontactinfos_phone')) . '" /></p>
<p><label for="email">' . $this->l('Email') . ' :</label>
<input type="text" id="email" name="email" value="' . Tools::safeOutput(Configuration::get('blockcontactinfos_email')) . '" /> </p>
<div class="margin-form">
<input type="submit" name="submitModule" value="' . $this->l('Update settings') . '" class="button" /></center>
</div>
</fieldset>
</form>
';
return $html;
}
开发者ID:jicheng17,项目名称:pengwine,代码行数:31,代码来源:blockcontactinfos.php
示例8: displayTop
/**
* displays available actions in the top of the order list
*/
public function displayTop()
{
$header = "<fieldset>";
$header .= "<div id='header_sceau'>\n\t\t\t\t<div class='sceau_control'>\n\t\t\t\t\t<a href='index.php?tab=AdminSceau&action=ResendOrders&token=" . Tools::getAdminTokenLite('AdminSceau') . "'>\n\t\t\t\t\t\t<img src='" . _PS_BASE_URL_ . __PS_BASE_URI__ . "modules/fianetsceau/img/sceauresend14.png'/>" . $this->l('Resend orders') . "\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>";
$header .= '</fieldset>';
echo $header;
}
开发者ID:juniorhq88,项目名称:PrestaShop-modules,代码行数:10,代码来源:AdminSceau.php
示例9: rev_uploader
private function rev_uploader()
{
$key = Tools::getValue('security_key');
if (empty($key) || Tools::encrypt(GlobalsRevSlider::MODULE_NAME) != $key) {
echo json_encode(array('error_on' => 1, 'error_details' => 'Security Error'));
die;
}
$targetFolder = ABSPATH . '/uploads/';
$randnum = rand(00, 9999999);
$sds_time = time();
$NewFileName = $randnum . '-' . $sds_time;
//$verifyToken = md5('unique_salt' . $_POST['timestamp']);
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
//$targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder;
$targetPath = $targetFolder;
//$targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name'];
// Validate the file type
$fileTypes = array('jpg', 'jpeg', 'gif', 'png');
// File extensions
$fileParts = pathinfo($_FILES['Filedata']['name']);
if (in_array($fileParts['extension'], $fileTypes)) {
// $worked = UniteFunctionsWPRev::import_media_img($tempFile, $targetPath, $randnum.$_FILES['Filedata']['name']);
$worked = UniteFunctionsWPRev::import_media_img($tempFile, $targetPath, $NewFileName . '.' . $fileParts['extension']);
if (!empty($worked)) {
echo '1';
}
} else {
echo '0';
}
}
}
开发者ID:evgrishin,项目名称:se1614,代码行数:32,代码来源:revolutionslider_ajax.php
示例10: displayForm
public function displayForm()
{
// Get default Language
$default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
// Init Fields form array
$fields_form[0]['form'] = array('legend' => array('title' => $this->l('Settings')), 'input' => array(array('type' => 'text', 'label' => $this->l('ID Facebook:'), 'name' => 'facebookgraph_id', 'size' => '100', 'desc' => $this->l('A Facebook Platform application ID that administers this page.')), array('type' => 'text', 'label' => $this->l('Name shop:'), 'name' => 'facebookgraph_name', 'size' => '100', 'desc' => $this->l('Name of this shop.')), array('type' => 'text', 'label' => $this->l('Url shop:'), 'name' => 'facebookgraph_url', 'size' => '100', 'desc' => $this->l('The canonical URL of this shop.')), array('type' => 'text', 'label' => $this->l('Type shop:'), 'name' => 'facebookgraph_type', 'size' => '100', 'desc' => $this->l('The type of this shop.')), array('type' => 'text', 'label' => $this->l('Title:'), 'name' => 'facebookgraph_title', 'size' => '100', 'desc' => $this->l('The title of this shop.')), array('type' => 'text', 'label' => $this->l('Description:'), 'name' => 'facebookgraph_description', 'size' => '100', 'desc' => $this->l('A one to two sentence description of this shop.')), array('type' => 'text', 'label' => $this->l('Image url:'), 'name' => 'facebookgraph_image', 'size' => '100', 'desc' => $this->l('An image URL which should represent your shop within the graph. The image must be at least 50px by 50px (though minimum 200px by 200px is preferred) and have a maximum aspect ratio of 3:1. We support PNG, JPEG and GIF formats.'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
$helper = new HelperForm();
// Module, t oken and currentIndex
$helper->module = $this;
$helper->name_controller = $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;
// Title and toolbar
$helper->title = $this->displayName;
$helper->show_toolbar = true;
// false -> remove toolbar
$helper->toolbar_scroll = true;
// yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'submit' . $this->name;
$helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
// Load current value
$helper->fields_value['facebookgraph_id'] = Configuration::get('facebookgraph_id');
$helper->fields_value['facebookgraph_type'] = Configuration::get('facebookgraph_type');
$helper->fields_value['facebookgraph_title'] = Configuration::get('facebookgraph_title');
$helper->fields_value['facebookgraph_url'] = Configuration::get('facebookgraph_url');
$helper->fields_value['facebookgraph_name'] = Configuration::get('facebookgraph_name');
$helper->fields_value['facebookgraph_image'] = Configuration::get('facebookgraph_image');
$helper->fields_value['facebookgraph_description'] = Configuration::get('facebookgraph_description');
return $helper->generateForm($fields_form);
}
开发者ID:WhisperingTree,项目名称:etagerca,代码行数:33,代码来源:profacebookopengraph.php
示例11: initContent
public function initContent()
{
$this->errors[] = $this->trans('Controller not found', array(), 'Admin.Notifications.Error');
$tpl_vars['controller'] = Tools::getvalue('controllerUri', Tools::getvalue('controller'));
$this->context->smarty->assign($tpl_vars);
parent::initContent();
}
开发者ID:M03G,项目名称:PrestaShop,代码行数:7,代码来源:AdminNotFoundController.php
示例12: upgrade_module_0_9
function upgrade_module_0_9($module)
{
$module_path = $module->getLocalPath();
$img_folder_path = $module->getLocalPath() . 'img';
$fixture_img_path = $module->getLocalPath() . 'img' . DIRECTORY_SEPARATOR . 'fixtures';
if (!Tools::file_exists_cache($img_folder_path)) {
mkdir($img_folder_path);
}
if (!Tools::file_exists_cache($fixture_img_path)) {
mkdir($fixture_img_path);
}
$files = scandir($module->getLocalPath());
foreach ($files as $file) {
if (strncmp($file, 'advertising', 11) == 0) {
if ($file == 'advertising.jpg') {
copy($module_path . $file, $fixture_img_path . DIRECTORY_SEPARATOR . $file);
} else {
copy($module_path . $file, $img_folder_path . DIRECTORY_SEPARATOR . $file);
}
unlink($module_path . $file);
}
}
Tools::clearCache(Context::getContext()->smarty, $module->getTemplatePath('blockadvertising.tpl'));
return true;
}
开发者ID:ortegon000,项目名称:tienda,代码行数:25,代码来源:install-0.9.php
示例13: displayHelp
public static function displayHelp($label, $iso_lang, $country, $ps_version)
{
$infos = HelpAccess::retrieveInfos($label, $iso_lang, $country, $ps_version);
if (array_key_exists('image', $infos) && $infos['image'] != 'none') {
echo '
<a class="help-button" href="#" onclick="showHelp(\'' . HelpAccess::URL . '\',\'' . $label . '\',\'' . $iso_lang . '\',\'' . $ps_version . '\',\'' . $infos['version'] . '\',\'' . $country . '\');" title="' . Tools::htmlentitiesUTF8($infos['tooltip']) . '">
<img id="help-' . $label . '" src="../img/admin/' . Tools::htmlentitiesUTF8($infos['image']) . '" alt="" class="middle" style="margin-top: -5px"/> ' . Tools::displayError('HELP') . '
</a>
';
if (!empty($infos['tooltip'])) {
echo ' <script type="text/javascript">
$(document).ready(function() {
$("a.help-button").cluetip({
splitTitle: "|",
cluetipClass: "help-button",
showTitle: false,
arrows: true,
dropShadow: false,
positionBy: "auto"
});
});
</script>';
}
}
}
开发者ID:srikanthash09,项目名称:codetestdatld,代码行数:26,代码来源:HelpAccess.php
示例14: createEntityCustomer
public function createEntityCustomer($identifier, array $data, array $data_lang)
{
if ($identifier == 'John') {
$data['passwd'] = Tools::encrypt('123456789');
}
return $this->createEntity('customer', $identifier, 'Customer', $data, $data_lang);
}
开发者ID:prestanesia,项目名称:PrestaShop,代码行数:7,代码来源:install.php
示例15: hookAdminStatsModules
public function hookAdminStatsModules($params)
{
$totalVisits = $this->getTotalVisits();
$totalGuests = $this->getTotalGuests();
if (Tools::getValue('export')) {
$this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => 3));
}
$this->_html = '
<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
<p><center>
<img src="../img/admin/down.gif" />' . $this->l('A visit corresponds to an internet user coming to your shop. Until the end of their session, only one visit is counted.') . '
' . $this->l('A visitor is an unknown person, who has not registered or logged on, surfing on your shop. A visitor can come and visit your shop many times.') . '
</center></p>
<div style="margin-top:20px"></div>
<p>' . $this->l('Total visits:') . ' ' . $totalVisits . '</p>
<p>' . $this->l('Total visitors:') . ' ' . $totalGuests . '</p>
' . ($totalVisits ? ModuleGraph::engine(array('layers' => 2, 'type' => 'line', 'option' => 3)) . '<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>' : '') . '
</fieldset>
<br class="clear" />
<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
<h2>' . $this->l('Determine the interest of a visit') . '</h2>
' . $this->l('The visitors\' evolution graph strongly resembles the visits\' graph, but provides additional information:') . '<br />
<ul>
<li>' . $this->l('If this is the case, congratulations, your website is well planned and pleasing.') . '</li>
<li>' . $this->l('Otherwise, the conclusion is not so simple. The problem can be aesthetic or ergonomic, or else the offer is not sufficient. It is also possible that these visitors mistakenly came here without particular interest for your shop; this phenomenon often happens with the search engines.') . '</li>
</ul>
' . $this->l('This information is mostly qualitative: you have to determine the interest of a disjointed visit.') . '<br />
</fieldset>';
return $this->_html;
}
开发者ID:priyankajsr19,项目名称:indusdiva2,代码行数:31,代码来源:statsvisits.php
示例16: display
public function display()
{
global $cookie, $currentIndex;
echo '<div style="float:left;width:600px">';
$this->getList((int) $cookie->id_lang, !Tools::getValue($this->table . 'Orderby') ? 'date_add' : NULL, !Tools::getValue($this->table . 'Orderway') ? 'DESC' : NULL);
$this->displayList();
echo '</div>';
echo '
<fieldset style="float:left;width:280px"><legend><img src="../img/admin/pdf.gif" alt="" /> ' . $this->l('Print PDF') . '</legend>
<form action="' . $currentIndex . '&token=' . $this->token . '" method="post">
<label style="width:90px">' . $this->l('From:') . ' </label>
<div class="margin-form" style="padding-left:100px">
<input type="text" size="4" maxlength="10" name="date_from" value="' . date('Y-m-01') . '" style="width: 120px;" />
<p class="clear">' . $this->l('Format: 2007-12-31 (inclusive)') . '</p>
</div>
<label style="width:90px">' . $this->l('To:') . ' </label>
<div class="margin-form" style="padding-left:100px">
<input type="text" size="4" maxlength="10" name="date_to" value="' . date('Y-m-t') . '" style="width: 120px;" />
<p class="clear">' . $this->l('Format: 2008-12-31 (inclusive)') . '</p>
</div>
<div class="margin-form" style="padding-left:100px">
<input type="submit" value="' . $this->l('Generate PDF file') . '" name="submitPrint" class="button" />
</div>
</form>
</fieldset><div class="clear"> </div>';
}
开发者ID:hecbuma,项目名称:quali-fisioterapia,代码行数:26,代码来源:AdminSlip.php
示例17: canonicalRedirection
protected function canonicalRedirection()
{
global $link, $cookie;
if (Configuration::get('PS_CANONICAL_REDIRECT') && strtoupper($_SERVER['REQUEST_METHOD']) == 'GET') {
// Automatically redirect to the canonical URL if needed
if (isset($this->php_self) && !empty($this->php_self)) {
// $_SERVER['HTTP_HOST'] must be replaced by the real canonical domain
$canonicalURL = $link->getPageLink($this->php_self, $this->ssl, $cookie->id_lang);
if (!Tools::getValue('ajax') && !preg_match('/^' . Tools::pRegexp($canonicalURL, '/') . '([&?].*)?$/', ($this->ssl && _PS_SSL_ENABLED_ ? 'https://' : 'http://') . urldecode($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']))) {
if ($_SERVER['REQUEST_URI'] == __PS_BASE_URI__) {
header('HTTP/1.0 303 See Other');
header('Cache-Control: no-cache');
} else {
header('HTTP/1.0 301 Moved Permanently');
header('Cache-Control: no-cache');
}
$params = '';
$excludedKey = array('isolang', 'id_lang');
foreach ($_GET as $key => $value) {
if (!in_array($key, $excludedKey)) {
$params .= ($params == '' ? '?' : '&') . $key . '=' . $value;
}
}
Module::hookExec('frontCanonicalRedirect');
if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_ && $_SERVER['REQUEST_URI'] != __PS_BASE_URI__) {
die('[Debug] This page has moved<br />Please use the following URL instead: <a href="' . $canonicalURL . $params . '">' . $canonicalURL . $params . '</a>');
}
Tools::redirectLink($canonicalURL . $params);
}
}
}
}
开发者ID:nokaek,项目名称:Easy-Fix-Thai-PrestaShop-14,代码行数:32,代码来源:FrontController.php
示例18: createChan
public function createChan($chanName)
{
try {
// get channel order
$chan_order = $this->ts3->channelGetById($this->cfg['base'])->getProperty('channel_order');
// Tools::Log('info', 'Got the order');
// create a channel and get its ID
$top_cid = $this->ts3->channelCreate(array("channel_name" => $chanName, "channel_order" => $chan_order, "channel_flag_permanent" => TRUE));
// Tools::Log('info', 'Created the channel');
// create cpacer and get its ID
$cpacer_cid = $this->ts3->channelCreate(array("channel_name" => "[" . $this->cfg['spacerOper'] . "spacer" . mt_rand(1, 99999) . "]" . $this->cfg['spacer'], "channel_flag_permanent" => TRUE, "channel_order" => $top_cid, "channel_flag_maxclients_unlimited" => false, "channel_maxclients" => 0));
// Tools::Log('info', 'Created the spacer');
// set permissions (WIP)
foreach ($this->cfg['permissions'] as $permission => $value) {
$this->ts3->channelGetById($top_cid)->permAssignByName($permission, $value);
}
// Tools::Log('info', 'Setted permissions');
// get token
$token = $this->ts3->channelGroupGetById($this->cfg['chanAdmin'])->tokenCreate($top_cid);
// Tools::Log('info', $token);
return $token;
} catch (Exception $e) {
Tools::Log('error', 'Error', array($e));
return false;
}
}
开发者ID:creativewild,项目名称:ts3Chan,代码行数:26,代码来源:TsAPI.php
示例19: initContent
public function initContent()
{
$this->errors[] = Tools::displayError('Controller not found');
$tpl_vars['controller'] = Tools::getvalue('controllerUri', Tools::getvalue('controller'));
$this->context->smarty->assign($tpl_vars);
parent::initContent();
}
开发者ID:zangles,项目名称:lennyba,代码行数:7,代码来源:AdminNotFoundController.php
示例20: initContent
/**
* @see FrontController::initContent()
*/
public function initContent()
{
$this->display_column_left = false;
parent::initContent();
$this->context->smarty->assign(array('total' => $this->context->cart->getOrderTotal(true, Cart::BOTH), 'this_path' => $this->module->getPathUri(), 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/' . $this->module->name . '/'));
$this->setTemplate('validation.tpl');
}
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:10,代码来源:validation.php
注:本文中的Tools类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论