当前位置: 首页>>代码示例>>PHP>>正文


PHP getLang函数代码示例

本文整理汇总了PHP中getLang函数的典型用法代码示例。如果您正苦于以下问题:PHP getLang函数的具体用法?PHP getLang怎么用?PHP getLang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getLang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Index

 public function Index($realm = false, $id = false)
 {
     clientLang("loading", "item");
     // Make sure item and realm are set
     if (!$id || !$realm) {
         die(lang("no_item", "item"));
     }
     $this->realm = $realm;
     $cache = $this->cache->get("items/tooltip_" . $realm . "_" . $id . "_" . getLang());
     $cache2 = $this->cache->get("items/item_" . $realm . "_" . $id);
     if ($cache2 !== false) {
         $itemName = $cache2['name'];
     } else {
         $itemName = lang("view_item", "item");
     }
     $this->template->setTitle($itemName);
     $icon = $this->getIcon($id);
     if ($cache !== false) {
         $item = $cache;
     } else {
         $item = $this->template->loadPage("ajax.tpl", array('module' => 'item', 'id' => $id, 'realm' => $realm, 'icon' => $icon));
     }
     $content = $this->template->loadPage("item.tpl", array('module' => 'item', 'item' => $item, 'icon' => $icon));
     $data3 = array("module" => "default", "headline" => "<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "armory\"'>" . lang("armory", "item") . "</span> &rarr; " . $itemName, "content" => $content);
     $page = $this->template->loadPage("page.tpl", $data3);
     $this->template->view($page, "modules/item/css/item.css");
 }
开发者ID:GlassFace,项目名称:FusionCMS,代码行数:27,代码来源:item.php

示例2: display

    public function display(array $context)
    {
        // line 1
        echo "<div style=\"padding:0px 0px 5px 10px\" class=\"Text\">";
        echo twig_safe_filter((isset($context['HelpText']) ? $context['HelpText'] : null));
        echo "</div>
<table width=\"100%\" class=\"Panel\">
<tr style=\"";
        // line 3
        echo twig_safe_filter((isset($context['HideHeaderRow']) ? $context['HideHeaderRow'] : null));
        echo "\">
\t<td class=\"Heading2\" colspan=\"2\">";
        // line 4
        echo twig_safe_filter((isset($context['ShipperId']) ? $context['ShipperId'] : null));
        echo " ";
        echo getLang("Settings");
        echo "</td>
</tr>
";
        // line 6
        echo twig_safe_filter((isset($context['Properties']) ? $context['Properties'] : null));
        echo "
</table>

";
    }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:26,代码来源:__TwigTemplate_f0acfd92049b2a577ff98a61487ae578.php

示例3: formatProductDetailsPrice

/**
 * Return a formatted price for a product for display on product detail pages.
 * Detail pages are defined as those product pages which contain the primary
 * details for a product.
 *
 * @see formatProductPrice
 * @param array $product Array containing the product to format the price for.
 * @param array $options Array of options, passed to formatProductPrice
 * @return string Generated HTML to display the price for the product.
 */
function formatProductDetailsPrice($product, array $options = array())
{
	$displayFormat = getConfig('taxDefaultTaxDisplayProducts');
	$options['displayInclusive'] = $displayFormat;

	if($displayFormat != TAX_PRICES_DISPLAY_BOTH) {
		return formatProductPrice($product, $product['prodcalculatedprice'], $options);
	}

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_INCLUSIVE;
	$priceIncTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
	$priceExTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$output = '<span class="ProductDetailsPriceIncTax">';
	$output .= $priceIncTax;
	$output .= getLang('ProductDetailsPriceIncTaxLabel', array(
		'label' => getConfig('taxLabel')
	));
	$output .= '</span> ';
	$output .= '<span class="ProductDetailsPriceExTax">';
	$output .= $priceExTax;
	$output .= getLang('ProductDetailsPriceExTaxLabel', array(
		'label' => getConfig('taxLabel')
	));
	$output  .= '</span>';
	return $output;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:39,代码来源:pricing.php

示例4: showSlug

 public function showSlug($slug)
 {
     $type = TypeNew::findBySlug($slug);
     $typeName = $type->name;
     $data = Common::getNews($type->id, getLang());
     return View::make('site.news.listNews')->with(compact('data', 'typeName', 'slug'));
 }
开发者ID:trantung,项目名称:company,代码行数:7,代码来源:SiteTypeController.php

示例5: get

 /**
  * Load the comments of one article
  * @param Int $id
  */
 public function get($id)
 {
     requirePermission("canViewComments");
     $cache = $this->cache->get("comments_" . $id . "_" . getLang());
     if ($cache !== false) {
         $comments = $cache;
     } else {
         $comments = $this->comments_model->getComments($id);
         if (is_array($comments)) {
             // Loop through and format the comments
             foreach ($comments as $key => $comment) {
                 $comments[$key]['profile'] = $this->template->page_url . "profile/" . $comment['author_id'];
                 $comments[$key]['avatar'] = $this->user->getAvatar($comment['author_id'], "small");
                 $comments[$key]['author'] = $this->user->getNickname($comment['author_id']);
             }
         }
         $this->cache->save("comments_" . $id . "_" . getLang(), $comments);
     }
     $comments_html = '';
     if (is_array($comments)) {
         $comments_html = $this->template->loadPage("comments.tpl", array('url' => $this->template->page_url, 'comments' => $comments, 'user_is_gm' => hasPermission('canRemoveComment')));
     }
     $values = array("form" => $this->user->isOnline() ? "onSubmit='Ajax.submitComment(" . $id . ");return false'" : "onSubmit='UI.alert(\"Please log in to comment!\");return false'", "online" => $this->user->isOnline(), "field_id" => "id='comment_field_" . $id . "'", "comments" => $comments_html, "comments_id" => "id='comments_area_" . $id . "'", "id" => $id);
     $output = $this->template->loadPage("article_comments.tpl", $values);
     die($output);
 }
开发者ID:GlassFace,项目名称:FusionCMS,代码行数:30,代码来源:comments.php

示例6: internalRouteURI

function internalRouteURI(string $requestUri = '') : string
{
    $config = Config::get('Services', 'route');
    if ($config['openPage']) {
        $internalDir = NULL;
        if (defined('_CURRENT_PROJECT')) {
            $configAppdir = PROJECTS_CONFIG['directory']['others'];
            if (is_array($configAppdir)) {
                $internalDir = !empty($configAppdir[$requestUri]) ? $requestUri : _CURRENT_PROJECT;
            } else {
                $internalDir = _CURRENT_PROJECT;
            }
        }
        if ($requestUri === DIRECTORY_INDEX || $requestUri === getLang() || $requestUri === $internalDir || empty($requestUri)) {
            $requestUri = $config['openPage'];
        }
    }
    $uriChange = $config['changeUri'];
    $patternType = $config['patternType'];
    if (!empty($uriChange)) {
        foreach ($uriChange as $key => $val) {
            if ($patternType === 'classic') {
                $requestUri = preg_replace(presuffix($key) . 'xi', $val, $requestUri);
            } else {
                $requestUri = Regex::replace($key, $val, $requestUri, 'xi');
            }
        }
    }
    return $requestUri;
}
开发者ID:znframework,项目名称:znframework,代码行数:30,代码来源:Internal.php

示例7: ShowLeftMenu

/**
 * adminmenu.php
 *
 * @version 1.2
 * @copyright 2008 By Chlorel for XNova
 * @copyright 2009 By MadnessRed for XNova Redesigned
 */
function ShowLeftMenu($cpage = 'x')
{
    global $lang;
    $qry = doquery("SELECT COUNT('error_id') as `errors` FROM {{table}}", 'errors', true);
    $errorscount = $qry['errors'];
    $qry = doquery("SELECT `id` FROM {{table}} WHERE `status` = 1 || `status` = 2 ;", 'supp');
    $ticketcount = mysql_num_rows($qry);
    $info = @file(XNOVAUKLINK . "info.php");
    if ($info[0] != VERSION . "\n") {
        $newversion = colourRed("(*)");
    }
    $adminpages = array('overview' => 'Overview ' . $newversion, 'config' => 'Configuration', 'edit' => 'Manage Users', 'errors' => 'Errors (' . $errorscount . ')', 'supp' => 'Tickets (' . $ticketcount . ')');
    getLang('menu');
    $parse = $lang;
    $parse['links'] = '';
    foreach ($adminpages as $get => $title) {
        $parse['links'] .= '
		<li class="menubutton_table">
			<span class="menu_icon">
		  		<img src="' . GAME_SKIN . '/img/navigation/navi_ikon_premium_b.gif" height="29" width="38" />
		  	</span>
			<a class="menubutton" href="./?page=admin&link=' . $get . '" title=\'' . $title . '\' tabindex="1">
				<span class="textlabel">' . $title . '</span>
			</a>
		</li>
		';
    }
    $Menu = parsetemplate(gettemplate('redesigned/adminmenu'), $parse);
    return $Menu;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:37,代码来源:adminmenu.php

示例8: index

 public function index($realm = false, $id = false)
 {
     // Make sure item and realm are set
     if (!$id || !$realm) {
         die(lang("invalid", "guild"));
     }
     $cache = $this->cache->get('guild_' . $realm . '_' . $id . "_" . getLang());
     if ($cache !== false) {
         $page = $cache;
     } else {
         $this->realm = $realm;
         $this->loadGuild($realm, $id);
         if (!$this->guild) {
             $this->template->setTitle(lang("invalid_guild", "guild"));
         } else {
             $this->template->setTitle($this->guild['guildName']);
         }
         $guild_data = array('module' => 'guild', 'guild' => $this->guild, 'members' => $this->members, 'leader' => $this->guildLeader, 'realmId' => $realm, 'realmName' => $this->realms->getRealm($realm)->getName(), 'url' => $this->template->page_url);
         $content = $this->template->loadPage("guild.tpl", $guild_data);
         $data = array("module" => "default", "headline" => "<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "armory\"'>" . lang("armory", "guild") . "</span> &rarr; " . (!$this->guild ? lang("invalid_guild", "guild") : $this->guild['guildName']), "content" => $content);
         $page = $this->template->loadPage("page.tpl", $data);
         $this->cache->save('guild_' . $realm . '_' . $id . "_" . getLang(), $page, 60 * 60);
     }
     $this->template->view($page, "modules/guild/css/guild.css");
 }
开发者ID:GlassFace,项目名称:FusionCMS,代码行数:25,代码来源:guild.php

示例9: postContact

 public function postContact()
 {
     $formData = array('sender_name_surname' => Input::get('sender_name_surname'), 'sender_email' => Input::get('sender_email'), 'sender_phone_number' => Input::get('sender_phone_number'), 'subject' => Input::get('subject'), 'post' => Input::get('message'));
     $rules = array('sender_name_surname' => 'required', 'sender_email' => 'required|email', 'sender_phone_number' => 'required', 'subject' => 'required', 'post' => 'required');
     $validation = Validator::make($formData, $rules);
     if ($validation->fails()) {
         return Redirect::action('FormPostController@getContact')->withErrors($validation)->withInput();
     }
     /*
     Mail::send('emails.contact-form.form', $formData, function ($message) {
         $message->from(Input::get('sender_email'), Input::get('sender_name_surname'));
         $message->to('noreply@graceadmin.com', 'Lorem Lipsum')->subject(Input::get('subject'));
     });
     */
     /*
     $mailer = new Mailer;
     $mailer->send('emails.contact-form.form', 'admin@graceadmin.com', Input::get('subject'), $formData);
     */
     $formPost = new FormPost();
     $formPost->sender_name_surname = $formData['sender_name_surname'];
     $formPost->sender_email = $formData['sender_email'];
     $formPost->sender_phone_number = $formData['sender_phone_number'];
     $formPost->subject = $formData['subject'];
     $formPost->message = $formData['post'];
     $formPost->lang = getLang();
     $formPost->save();
     return Redirect::action('FormPostController@getContact')->with('message', 'Success');
 }
开发者ID:phillipmadsen,项目名称:grace,代码行数:28,代码来源:FormPostController.php

示例10: get

 public function get($id = false)
 {
     // Is it loaded via ajax or not?
     if ($id === false) {
         $id = 0;
         $die = false;
     } else {
         $die = true;
     }
     $cache = $this->cache->get("shoutbox_" . $id . "_" . getLang());
     if ($cache !== false) {
         $shouts = $cache;
     } else {
         // Load the shouts
         $shouts = $this->shoutbox_model->getShouts($id, $this->config->item('shouts_per_page'));
         // Format the shout data
         foreach ($shouts as $key => $value) {
             $shouts[$key]['nickname'] = $this->internal_user_model->getNickname($shouts[$key]['author']);
             $shouts[$key]['content'] = $this->template->format($shouts[$key]['content'], true, true, true, 40);
         }
         $this->cache->save("shoutbox_" . $id . "_" . getLang(), $shouts);
     }
     foreach ($shouts as $key => $value) {
         $shouts[$key]['date'] = $this->template->formatTime(time() - $shouts[$key]['date']);
     }
     // Prepare the data
     $data = array("module" => "sidebox_shoutbox", "shouts" => $shouts, "url" => $this->template->page_url, "user_is_gm" => hasPermission("removeShout", "sidebox_shoutbox"));
     $shouts = $this->template->loadPage("shouts.tpl", $data);
     // To be or not to be, that's the question :-)
     if ($die) {
         die($shouts);
     } else {
         return $shouts;
     }
 }
开发者ID:GlassFace,项目名称:FusionCMS,代码行数:35,代码来源:shoutbox.php

示例11: view

 public function view()
 {
     if (count($this->realm) == 0) {
         return "This module has not been configured";
     } else {
         $cache = $this->cache->get("sidebox_toppvp_" . getLang());
         if ($cache !== false) {
             $out = $cache;
         } else {
             //Get the max chars to show
             $maxCount = $this->config->item('pvp_players');
             $realm_html = array();
             //For each realm
             foreach ($this->realm as $id => $realm) {
                 //Get the topkill characters
                 $topKillChars = $this->toppvp_model->getTopKillChars($maxCount, $realm);
                 $data = array("module" => "sidebox_toppvp", "name" => $realm->getName(), "id" => $realm->getId(), "characters" => $topKillChars, "url" => $this->template->page_url, "realm" => $realm->getId(), "showRace" => $this->config->item("pvp_show_race"), "showClass" => $this->config->item("pvp_show_class"));
                 $realm_html[$id] = $this->template->loadPage("realm.tpl", $data);
             }
             $out = $this->template->loadPage("pvp.tpl", array("module" => "sidebox_toppvp", "min_realm" => $this->min_realm, "max_realm" => $this->max_realm, "realm_html" => $realm_html, "realms" => $this->realm));
             // Cache for 12 hours
             $this->cache->save("sidebox_toppvp_" . getLang(), $out, 60 * 60 * 12);
         }
         return $out;
     }
 }
开发者ID:GlassFace,项目名称:FusionCMS,代码行数:26,代码来源:toppvp.php

示例12: gettooltip

    public function gettooltip($id = null, $title = null, $content = null, $titleReplacements = null, $contentReplacements = null)
    {
        $context = array(
            "id" => $id,
            "title" => $title,
            "content" => $content,
            "titleReplacements" => $titleReplacements,
            "contentReplacements" => $contentReplacements,
        );

        echo "<img
\tonmouseout=\"HideHelp('";
        // line 3
        echo twig_escape_filter($this->env, (isset($context['id']) ? $context['id'] : null), "1");
        echo "');\" 
\tonmouseover=\"ShowHelp('";
        // line 4
        echo twig_escape_filter($this->env, (isset($context['id']) ? $context['id'] : null), "1");
        echo "', '";
        echo getLang((isset($context['title']) ? $context['title'] : null), (isset($context['titleReplacements']) ? $context['titleReplacements'] : null));
        echo "', '";
        echo getLang((isset($context['content']) ? $context['content'] : null), (isset($context['contentReplacements']) ? $context['contentReplacements'] : null));
        echo "')\" 
\tsrc=\"images/help.gif\" 
\twidth=\"24\" 
\theight=\"16\" 
\tborder=\"0\" 
\tstyle=\"margin-top: 5px;\"
/>
<div id=\"";
        // line 11
        echo twig_escape_filter($this->env, (isset($context['id']) ? $context['id'] : null), "1");
        echo "\"></div>
";
    }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:35,代码来源:__TwigTemplate_0dadbe7e03cd11f41bdbcbecc7fdb5df.php

示例13: index

 public function index($page = "error")
 {
     if ($page == "error") {
         redirect('error');
     } else {
         $cache = $this->cache->get("page_" . $page . "_" . getLang());
         if ($cache !== false) {
             $this->template->setTitle($cache['title']);
             $out = $cache['content'];
             if ($cache['permission'] && !hasViewPermission($cache['permission'], "--PAGE--")) {
                 $this->template->showError(lang("permission_denied", "error"));
             }
         } else {
             $page_content = $this->cms_model->getPage($page);
             if ($page_content == false) {
                 redirect('error');
             } else {
                 $this->template->setTitle(langColumn($page_content['name']));
                 $page_data = array("module" => "default", "headline" => langColumn($page_content['name']), "content" => langColumn($page_content['content']));
                 $out = $this->template->loadPage("page.tpl", $page_data);
                 $this->cache->save("page_" . $page . "_" . getLang(), array("title" => langColumn($page_content['name']), "content" => $out, "permission" => $page_content['permission']));
                 if ($page_content['permission'] && !hasViewPermission($page_content['permission'], "--PAGE--")) {
                     $this->template->showError(lang("permission_denied", "error"));
                 }
             }
         }
     }
     $this->template->view($out);
 }
开发者ID:GlassFace,项目名称:FusionCMS,代码行数:29,代码来源:page.php

示例14: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $formData = Input::all();
     if ($formData['type'] == 'module') {
         $option = $formData['option'];
         $url = $this->menu->getUrl($option);
         $formData['url'] = $url;
     }
     $host = $_SERVER['SERVER_NAME'];
     $urlInfo = parse_url($formData['url']);
     $rules = array('title' => 'required', 'url' => 'required');
     $validation = Validator::make($formData, $rules);
     if ($validation->fails()) {
         return langRedirectRoute('admin.menu.create')->withErrors($validation)->withInput();
     }
     $this->menu->fill($formData);
     $this->menu->order = $this->menu->getMaxOrder() + 1;
     if (isset($urlInfo['host'])) {
         $url = $host == $urlInfo['host'] ? $urlInfo['path'] : $formData['url'];
     } else {
         $url = $formData['type'] == 'module' ? $formData['url'] : "http://" . $formData['url'];
     }
     $this->menu->lang = getLang();
     $this->menu->url = $url;
     $this->menu->save();
     Flash::message('Menu was successfully added');
     return langRedirectRoute('admin.menu.index');
 }
开发者ID:phillipmadsen,项目名称:app,代码行数:33,代码来源:MenuController.php

示例15: getCountryCustomizedPookMail

function getCountryCustomizedPookMail()
{
    if (getLang() == "pt_br") {
        return '<font color="green">Pook</font><font color="yellow">Mail</font><font color="blue">.com</font>';
    }
    return 'P<font color="red">o</font><font color="blue">o</font>kMail.com';
}
开发者ID:Git-Host,项目名称:pookmail,代码行数:7,代码来源:ui.html.php


注:本文中的getLang函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。