本文整理汇总了PHP中getLanguage函数的典型用法代码示例。如果您正苦于以下问题:PHP getLanguage函数的具体用法?PHP getLanguage怎么用?PHP getLanguage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLanguage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getImgSrc
function getImgSrc($array = "")
{
global $web_img_upload_path;
// return $array['filename'];
// mydump ($array);
if ($array['filename'] == "") {
if (!is_array($array)) {
$array = array("imgTag" => imgTagThumb, "type" => "article");
}
$array['filename'] = "archive/no_image_" . getLanguage() . ".gif";
}
// different types can have different settings
switch (strtolower($array['type'])) {
case tOffersType_Article:
case "article":
case tOffersType_Service:
case "service":
$addition = "";
if (strtolower(substr($array["imgTag"], 0, 6)) == "imgtag") {
$tag = $array["imgTag"];
eval("\$addition = {$tag};");
} else {
$addition = $array["imgTag"];
}
$path = $web_img_upload_path;
// add special file code for different size images in articles
$file = $web_img_upload_path . "/" . ereg_replace("(.[a-z0-9]{2,5})\$", $addition . "\\1", $array["filename"]);
break;
default:
$path = $web_img_upload_path;
$file = $path . "/" . $array["filename"];
}
// switch
return $file;
}
开发者ID:hexerei-software,项目名称:XOX-Framework,代码行数:35,代码来源:class.imagehandler.php
示例2: __construct
public function __construct()
{
$this->language = getLanguage();
$this->pdo = new PDO('mysql:host=' . DATABASE_HOST . ';dbname=' . DATABASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD);
global $router;
$this->router = $router;
$this->userProfile = new stdClass();
$this->userProfile->type = 'guest';
if (isset($_COOKIE['user_id'])) {
$id = $_COOKIE['user_id'];
$sql = "SELECT * FROM users WHERE `id`=:id LIMIT 1";
$query = $this->pdo->prepare($sql);
$query->bindValue(':id', $id);
$query->execute();
$user = $query->fetch(PDO::FETCH_OBJ);
if ($user != false) {
$this->userId = $user->id;
$this->userProfile = $user;
$this->userProfile->name = ucfirst($user->first_name) . ' ' . ucfirst($user->last_name);
$birthday = strtotime($this->userProfile->birthday);
$this->userProfile->age = date('md', $birthday) > date('md') ? date('Y') - date('Y', $birthday) - 1 : date('Y') - date('Y', $birthday);
$this->setUserChildren();
// TO-DO..
// Current stuff (what's the current height, weight) to particular date...
} else {
setcookie('user_id', '', time() - 3600, '/');
// TO-DO..set the path right
}
}
}
开发者ID:bobalazek,项目名称:actyplex,代码行数:30,代码来源:Application.php
示例3: show
public function show()
{
require_once _base_ . '/lib/lib.navbar.php';
require_once _lms_ . '/lib/lib.middlearea.php';
$ma = new Man_MiddleArea();
$block_list = array();
//if($ma->currentCanAccessObj('user_details_short')) $block_list['user_details_short'] = true;
if ($ma->currentCanAccessObj('user_details_full')) {
$block_list['user_details_full'] = true;
}
if ($ma->currentCanAccessObj('credits')) {
$block_list['credits'] = true;
}
if ($ma->currentCanAccessObj('news')) {
$block_list['news'] = true;
}
$query_home = "SELECT title, description FROM learning_webpages where publish=1 and in_home = 1 AND language = '" . getLanguage() . "' LIMIT 1";
$re_home = sql_query($query_home);
list($titolo, $descrizione) = sql_fetch_row($re_home);
if (!empty($block_list)) {
$this->render('_tabs_block', array('active_tab' => 'home', '_content' => "<div id=\"tabhome_title\"><h1>" . $titolo . "</h1></div><div id=\"tabhome_description\">" . $descrizione . "</div>", 'block_list' => $block_list));
} else {
$this->render('_tabs', array('active_tab' => 'home', '_content' => "<div id=\"tabhome_title\"><h1>" . $titolo . "</h1></div><div id=\"tabhome_description\">" . $descrizione . "</div>"));
}
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:25,代码来源:HomeLmsController.php
示例4: run
public function run()
{
require_once _lms_ . '/lib/lib.kbres.php';
$kbres = new KbRes();
$data = false;
if ($this->res_id > 0) {
$data = $kbres->getResource($this->res_id, true, true);
} else {
if (!empty($this->r_item_id) && !empty($this->r_type)) {
$data = $kbres->getResourceFromItem($this->r_item_id, $this->r_type, $this->r_env, true, true);
}
}
if ($data == false) {
$data = array('res_id' => 0, 'r_name' => '', 'original_name' => '', 'r_desc' => '', 'r_item_id' => $this->r_item_id, 'r_type' => $this->r_type, 'r_env' => $this->r_env, 'r_env_parent_id' => $this->r_env_parent_id, 'r_param' => $this->r_param, 'r_alt_desc' => '', 'r_lang' => !empty($this->language) ? $this->language : getLanguage(), 'force_visible' => 0, 'is_mobile' => 0, 'folders' => array(), 'tags' => array());
}
if (!empty($this->original_name)) {
$data['original_name'] = $this->original_name;
}
$c_folders = array_keys($data['folders']);
unset($data['folders']);
$c_tags = $data['tags'];
unset($data['tags']);
$json = new Services_JSON();
$this->render('kbcategorize', array('selected_node' => $this->_getSelectedNode(), 'back_url' => $this->back_url, 'form_url' => $this->form_url, 'form_extra_hidden' => $this->form_extra_hidden, 'data' => $data, 'c_folders' => $c_folders, 'c_tags_json' => $json->encode(array_values($c_tags)), 'all_tags_json' => $json->encode(array_values($kbres->getAllTags()))));
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:25,代码来源:lib.kbcategorize.php
示例5: l
/**
* get language text
* @param String $paramText text to convert
* @param array/string $paramArgs sprintf args
*/
function l($paramText, $paramArgs = null)
{
if (!function_exists('getLanguage')) {
return "!!LANGUAGE_NOT_LOADED!!";
}
return getLanguage()->getText($paramText, $paramArgs);
}
开发者ID:JacoRuit,项目名称:orongocms,代码行数:12,代码来源:function_l.php
示例6: __
function __($str = '')
{
$lang = getLanguage();
if (file_exists(APPLICATION_PATH . 'languages/' . $lang . '.php')) {
$translations = (include APPLICATION_PATH . 'languages/' . $lang . '.php');
if (isset($translations) && isset($translations[$str])) {
$str = $translations[$str];
}
}
return $str;
}
开发者ID:bobalazek,项目名称:actyplex,代码行数:11,代码来源:Functions.php
示例7: news
/**
* The news link for the home pages
* @return <html>
*/
public static function news($hnumber = 2)
{
$html = '<div id="news">';
$textQuery = "\r\n\t\tSELECT idNews, publish_date, title, short_desc\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_news\r\n\t\tWHERE language = '" . getLanguage() . "'\r\n\t\tORDER BY important DESC, publish_date DESC\r\n\t\tLIMIT 0," . Get::sett('visuNewsHomePage');
//do query
$result = sql_query($textQuery);
if (sql_num_rows($hnumber)) {
$html .= '<p>' . Lang::set('_NO_CONTENT', 'login') . '</p>';
}
while (list($idNews, $publish_date, $title, $short_desc) = sql_fetch_row($result)) {
$html .= '<h' . $hnumber . '>' . '<a href="index.php?modname=login&op=readnews&idNews=' . $idNews . '">' . $title . '</a>' . '</h' . $hnumber . '>' . '<p class="news_textof">' . '<span class="news_data">' . Format::date($publish_date) . ' - </span>' . $short_desc . '</p>';
}
$html .= '</div>';
return $html;
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:19,代码来源:lib.loginlayout.php
示例8: loadNewsBlock
function loadNewsBlock()
{
$lang = DoceboLanguage::createInstance('login');
$textQuery = "\r\n\tSELECT idNews, publish_date, title, short_desc \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_news \r\n\tWHERE language = '" . getLanguage() . "'\r\n\tORDER BY important DESC, publish_date DESC";
$result = sql_query($textQuery);
$html = '<div class="home_news_block">' . '<h1>' . $lang->def('_NEWS') . '</h1>';
while (list($idNews, $publish_date, $title, $short_desc) = sql_fetch_row($result)) {
$html .= '<h2>' . '<a href="index.php?modname=login&op=readnews&idNews=' . $idNews . '">' . $title . '</a></h2>' . '<p><span class="news_data">' . $lang->def('_DATE') . ' ' . Format::date($publish_date, 'date') . ': </span>' . $short_desc . '</p>';
}
if (mysql_num_rows($result) == 0) {
$html .= $lang->def('_NO_CONTENT');
}
$html .= '</div>';
return $html;
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:15,代码来源:menu_login.php
示例9: news
function news()
{
$textQuery = "\r\n\tSELECT idNews, publish_date, title, short_desc\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_news\r\n\tWHERE language = '" . getLanguage() . "'\r\n\tORDER BY important DESC, publish_date DESC";
$lang = DoceboLanguage::createInstance('login');
$GLOBALS['page']->add(getTitleArea($lang->def('_NEWS'), 'news', $lang->def('_NEWS')) . '<div class="news_block">' . getBackUi('index.php', $lang->def('_BACK')), 'content');
//do query
$result = sql_query($textQuery);
while (list($idNews, $publish_date, $title, $short_desc) = sql_fetch_row($result)) {
$GLOBALS['page']->add('<div class="news_title">' . '<a href="index.php?modname=login&op=readnews&idNews=' . $idNews . '">' . $title . '</a></div>' . '<div class="news_textof">' . '<span class="news_data">' . $lang->def('_DATE') . ' ' . $publish_date . ' - </span>' . $short_desc . '</div>', 'content');
}
if (mysql_num_rows($result) == 0) {
$GLOBALS['page']->add($lang->def('_NO_CONTENT'), 'content');
} elseif (mysql_num_rows($result) >= 3) {
$GLOBALS['page']->add(getBackUi('index.php', $lang->def('_BACK')) . '</div>', 'content');
}
$GLOBALS['page']->add('</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:17,代码来源:login.php
示例10: mycompetences
function mycompetences(&$url)
{
checkPerm('view');
$html = "";
$html .= getTitleArea(Lang::t('_COMPETENCES'), 'competences');
$html .= '<div class="std_block">';
$cmodel = new CompetencesAdm();
$fmodel = new FunctionalrolesAdm();
$id_user = getLogUserId();
$ucomps = $cmodel->getUserCompetences($id_user);
$rcomps = $fmodel->getUserRequiredCompetences($id_user);
$ucomps_info = $cmodel->getCompetencesInfo(array_keys($ucomps));
$language = getLanguage();
$_typologies = $cmodel->getCompetenceTypologies();
$_types = $cmodel->getCompetenceTypes();
$icon_actv = '<span class="ico-sprite subs_actv"><span>' . Lang::t('_COMPETENCE_OBTAINED', 'competences') . '</span></span>';
$icon_req = '<span class="ico-sprite subs_actv"><span>' . Lang::t('_MANDATORY', 'competences') . '</span></span>';
//*******************
require_once _base_ . '/lib/lib.table.php';
$table = new Table(Get::sett('visuItem'), Lang::t('_COMPETENCES'), Lang::t('_COMPETENCES'));
$style_h = array('', '', 'image', 'image', 'image', 'image', 'image');
$label_h = array(Lang::t('_NAME', 'competences'), Lang::t('_TYPOLOGY', 'competences'), Lang::t('_TYPE', 'standard'), Lang::t('_SCORE', 'competences'), Lang::t('_DATE_LAST_COMPLETE', 'subscribe'), Lang::t('_COMPETENCES_REQUIRED', 'competences'));
$table->addHead($label_h, $style_h);
foreach ($ucomps_info as $id_competence => $cinfo) {
$line = array();
$line[] = $cinfo->langs[$language]['name'];
$line[] = $_typologies[$cinfo->typology];
$line[] = $_types[$cinfo->type];
$line[] = $cinfo->type == 'score' ? '<b>' . $ucomps[$id_competence]->score_got . '</b>' : $icon_actv;
$line[] = Format::date($ucomps[$id_competence]->last_assign_date, 'datetime');
$line[] = array_key_exists($id_competence, $rcomps) ? $icon_req : '';
$table->addBody($line);
}
$html .= $table->getTable();
$html .= '</div>';
$html .= Form::openForm('beck_url', 'index.php');
$html .= Form::openButtonSpace();
$html .= Form::getButton('close', 'close', Lang::t('_CLOSE', 'standard'));
$html .= Form::closeButtonSpace();
$html .= Form::closeform();
cout($html, 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:42,代码来源:mycompetences.php
示例11: __construct
public function __construct($viewFile = null)
{
if (null !== $viewFile) {
$this->_module = 'www';
if (strstr($viewFile, DS)) {
$this->_viewFile = $viewFile;
} else {
$file = CACHE_PATH . DS . md5($this->_viewFile . time() . Utils::UUID()) . '.fake';
File::create($file);
$fp = fopen($file, 'a');
fwrite($fp, '<?php echo $this->content; ?>');
$this->_viewFile = $file;
}
} else {
$route = Utils::get('appDispatch');
/* polymorphism */
$route = !$route instanceof Container ? container()->getRoute() : $route;
if ($route instanceof Container) {
$module = $route->getModule();
$controller = $route->getController();
$action = $route->getAction();
$this->_module = $module;
$isTranslate = Utils::get('isTranslate');
if (true === $isTranslate) {
$lng = getLanguage();
if (true === container()->getMultiSite()) {
$this->_viewFile = APPLICATION_PATH . DS . SITE_NAME . DS . 'modules' . DS . $module . DS . 'views' . DS . 'scripts' . DS . Inflector::lower($controller) . DS . Inflector::lower($lng) . DS . Inflector::lower($action) . '.phtml';
} else {
$this->_viewFile = APPLICATION_PATH . DS . 'modules' . DS . SITE_NAME . DS . $module . DS . 'views' . DS . 'scripts' . DS . Inflector::lower($controller) . DS . Inflector::lower($lng) . DS . Inflector::lower($action) . '.phtml';
}
} else {
if (true === container()->getMultiSite()) {
$this->_viewFile = APPLICATION_PATH . DS . SITE_NAME . DS . 'modules' . DS . $module . DS . 'views' . DS . 'scripts' . DS . Inflector::lower($controller) . DS . Inflector::lower($action) . '.phtml';
} else {
$this->_viewFile = APPLICATION_PATH . DS . 'modules' . DS . SITE_NAME . DS . $module . DS . 'views' . DS . 'scripts' . DS . Inflector::lower($controller) . DS . Inflector::lower($action) . '.phtml';
}
}
}
}
Utils::set('appView', $this);
Utils::set('showStats', true);
}
开发者ID:schpill,项目名称:thin,代码行数:42,代码来源:View.php
示例12: isLanguageKey
function isLanguageKey($key, $language = null)
{
global $lang;
if (!$language) {
$language = getLanguage();
}
if (!count($lang)) {
$directoryHandler = dir("language/" . $language);
while (($fileEntry = $directoryHandler->read()) !== false) {
if ($fileEntry != '.' && $fileEntry != '..' && strpos($fileEntry, ".php")) {
include_once "language/" . $language . "/" . $fileEntry;
}
}
$directoryHandler->close();
// Uncomment if you're not in UTF-8
// $lang = changeCharset($lang);
}
if (array_key_exists($key, $lang)) {
return true;
}
return false;
}
开发者ID:ArmagNet,项目名称:vpn,代码行数:22,代码来源:language.php
示例13: getLanguage
<?php
include "../includes/config.php";
include "../includes/classes.php";
include getLanguage(null, !empty($_GET['lang']) ? $_GET['lang'] : $_COOKIE['lang'], 2);
session_start();
$db = new mysqli($CONF['host'], $CONF['user'], $CONF['pass'], $CONF['name']);
if ($db->connect_errno) {
echo "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error;
}
$db->set_charset("utf8");
$resultSettings = $db->query(getSettings());
$settings = $resultSettings->fetch_assoc();
if (isset($_SESSION['usernameAdmin']) && isset($_SESSION['passwordAdmin'])) {
$loggedInAdmin = new loggedInAdmin();
$loggedInAdmin->db = $db;
$loggedInAdmin->url = $CONF['url'];
$loggedInAdmin->username = $_SESSION['usernameAdmin'];
$loggedInAdmin->password = $_SESSION['passwordAdmin'];
$loggedIn = $loggedInAdmin->verify();
if ($loggedIn['username']) {
$managePayments = new managePayments();
$managePayments->db = $db;
$managePayments->url = $CONF['url'];
$managePayments->per_page = $settings['rperpage'];
if (isset($_POST['start'])) {
echo $managePayments->getPayments($_POST['start']);
}
}
}
开发者ID:Jeg72,项目名称:php_sound,代码行数:29,代码来源:manage_payments.php
示例14: getLanguage
<?php
include "../includes/config.php";
include "../includes/classes.php";
require_once getLanguage(null, !empty($_GET['lang']) ? $_GET['lang'] : $_COOKIE['lang'], 2);
session_start();
$db = new mysqli($CONF['host'], $CONF['user'], $CONF['pass'], $CONF['name']);
if ($db->connect_errno) {
echo "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error;
}
$db->set_charset("utf8");
$resultSettings = $db->query(getSettings());
$settings = $resultSettings->fetch_assoc();
// The theme complete url
$CONF['theme_url'] = $CONF['theme_path'] . '/' . $settings['theme'];
if (isset($_POST['start']) && isset($_POST['q']) && ctype_digit($_POST['start'])) {
$feed = new feed();
$feed->db = $db;
$feed->url = $CONF['url'];
if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
$loggedIn = new loggedIn();
$loggedIn->db = $db;
$loggedIn->url = $CONF['url'];
$loggedIn->username = isset($_SESSION['username']) ? $_SESSION['username'] : $_COOKIE['username'];
$loggedIn->password = isset($_SESSION['password']) ? $_SESSION['password'] : $_COOKIE['password'];
$verify = $loggedIn->verify();
$feed->username = $verify['username'];
$feed->id = $verify['idu'];
$feed->online_time = $settings['conline'];
if (!empty($_POST['list'])) {
echo $feed->onlineUsers(2, $_POST['q']);
return;
开发者ID:Jeg72,项目名称:php_sound,代码行数:31,代码来源:load_people.php
示例15: createNewAlert
/**
* This function encapsulate a set of common instruction for event notification generation
* @param string $class The class name ho event (eg. UserMod)
* @param string $module The module generator (eg. directory)
* @param string $section The section in module that generate event (eg. edit)
* @param int $priority The priority level of event
* @param string $description The description of the event
* @param array $recipients An array of userid that should be notified
* @param EventMessageComposer $msg_composer a class for message composition
* @param bool $force_email_send if true the message is sent to all the user in $recipients ignoring their settings for email
**/
function createNewAlert($class, $module, $section, $priority, $description, $recipients, $msg_composer, $force_email_send = false)
{
$event =& DoceboEventManager::newEvent($class, $module, $section, $priority, $description);
$event->deleteOldProperty();
if (is_array($recipients["to"]) && is_array($recipients["cc"]) && is_array($recipients["bcc"])) {
$event->setProperty('recipientid', implode(',', $recipients["to"]));
$event->setProperty('recipientcc', implode(',', $recipients["cc"]));
$event->setProperty('recipientbcc', implode(',', $recipients["bcc"]));
} else {
$event->setProperty('recipientid', implode(',', $recipients));
}
$event->setProperty('subject', addslashes($msg_composer->getSubject('email', getLanguage())));
$event->setProperty('body', addslashes($msg_composer->getBody('email', getLanguage())));
$msg_composer->prepare_serialize();
// __sleep is preferred but i preferr this method
$event->setProperty('MessageComposer', addslashes(rawurlencode(serialize($msg_composer))));
$event->setProperty('force_email_send', $force_email_send === false ? 'false' : 'true');
DoceboEventManager::dispatch($event);
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:30,代码来源:lib.eventmanager.php
示例16: get_languages_selectoptions
if ($langcnt > 0) {
?>
<ul>
<li>Language: <select id="filterlang" onchange="{setLang(document.getElementById('filterlang'),'index.php');}"><?php
echo get_languages_selectoptions($currentlang, '[Select...]');
?>
</select></li>
</ul>
<?php
if ($currenttext != '') {
$txttit = get_first_value('select TxTitle as value from ' . $tbpref . 'texts where TxID=' . (int) $currenttext);
if (isset($txttit)) {
$txtlng = get_first_value('select TxLgID as value from ' . $tbpref . 'texts where TxID=' . (int) $currenttext);
$lngname = getLanguage($txtlng);
?>
<ul>
<li>My last Text (in <?php
echo tohtml($lngname);
?>
):<br /> <i><?php
echo tohtml($txttit);
?>
</i>
<br />
<a href="do_text.php?start=<?php
echo $currenttext;
?>
"><img src="icn/book-open-bookmark.png" title="Read" alt="Read" /> Read</a>
开发者ID:Fips11,项目名称:lwt,代码行数:31,代码来源:index.php
示例17: getLanguage
echo "\t\t</form></nobr>\n";
echo "\t</td>\n";
echo "</tr>\n";
echo "</table>\n";
}
if (file_exists("../translation/locale_{$lang}.php")) {
include "./translation/locale_{$lang}.php";
} else {
include "../translation/locale_en.php";
}
include_once "../conf/themes.php";
$g_szRequestedVersion = $_REQUEST["version"];
if ($g_szRequestedVersion == "") {
$g_szRequestedVersion = $_SESSION["version"];
}
$g_szRequestedLanguage = getLanguage();
$_SESSION["version"] = $g_szRequestedVersion;
$g_iCurrentPage = $_REQUEST["page"];
if (!is_numeric($g_iCurrentPage)) {
$g_iCurrentPage = $_SESSION["page"];
}
if (!is_numeric($g_iCurrentPage)) {
$g_iCurrentPage = 0;
}
$g_szRequestedSortOrder = $_REQUEST["sort"];
if ($g_szRequestedSortOrder == "") {
$g_szRequestedSortOrder = $_SESSION["sort"];
}
if ($g_aAvailableSortOrders[$g_szRequestedSortOrder] == "") {
$g_szRequestedSortOrder = "name";
}
开发者ID:un1versal,项目名称:kvirc-www,代码行数:31,代码来源:themes.php
示例18: Report
$message = '';
// Import
if (isset($_REQUEST['op'])) {
// INSERT
if ($_REQUEST['op'] == 'Import') {
$col[0] = $_REQUEST["Col1"];
$col[1] = $_REQUEST["Col2"];
$col[2] = $_REQUEST["Col3"];
$col[3] = $_REQUEST["Col4"];
$col[4] = $_REQUEST["Col5"];
$overwrite = $_REQUEST["Over"] == '1';
$tabs = $_REQUEST["Tab"];
$sqlct = 0;
$lang = $_REQUEST["LgID"];
$status = $_REQUEST["WoStatus"];
$protokoll = '<h4>Import Report (Language: ' . getLanguage($lang) . ', Status: ' . $status . ')</h4><table class="tab1" cellspacing="0" cellpadding="5"><tr><th class="th1">Line</th><th class="th1">Term</th><th class="th1">Translation</th><th class="th1">Romanization</th><th class="th1">Sentence</th><th class="th1">Tag List</th><th class="th1">Message</th></tr>';
if (isset($_FILES["thefile"]) && $_FILES["thefile"]["tmp_name"] != "" && $_FILES["thefile"]["error"] == 0) {
$lines = file($_FILES["thefile"]["tmp_name"], FILE_IGNORE_NEW_LINES);
} else {
$lines = explode("\n", prepare_textdata($_REQUEST["Upload"]));
}
$l = count($lines);
for ($i = 0; $i < $l; $i++) {
if ($tabs == 'h') {
$lines[$i] = explode("#", trim(str_replace("\t", " ", $lines[$i])));
} elseif ($tabs == 'c') {
$lines[$i] = my_str_getcsv(trim(str_replace("\t", " ", $lines[$i])));
} else {
$lines[$i] = explode("\t", trim($lines[$i]));
}
$k = count($lines[$i]);
开发者ID:chajadan,项目名称:lwt,代码行数:31,代码来源:upload_words.php
示例19: getLanguage
+-------------------------------------------------------------------------+
| facileManager: Easy System Administration |
+-------------------------------------------------------------------------+
| http://www.facilemanager.com/ |
+-------------------------------------------------------------------------+
*/
/**
* facileManager language translation functions
*
* @package facileManager
* @subpackage i18n
*/
$directory = ABSPATH . 'fm-modules/' . $fm_name . '/languages';
$domain = $fm_name;
$encoding = 'UTF-8';
$_SESSION['language'] = getLanguage($directory);
putenv('LANG=' . $_SESSION['language']);
setlocale(LC_ALL, $_SESSION['language']);
if (function_exists('textdomain')) {
bindtextdomain($domain, $directory);
bind_textdomain_codeset($domain, $encoding);
if (isset($_SESSION['module']) && $_SESSION['module'] != $fm_name) {
loadModuleLanguage($_SESSION['module'], $encoding);
}
textdomain($domain);
}
/**
* Returns if access to a zone is allowed
*
* @since 2.0
* @package facileManager
开发者ID:pclemot,项目名称:facileManager,代码行数:31,代码来源:i18n.php
示例20: updateCompetenceDescription
public function updateCompetenceDescription($id_competence, $description, $lang_code = false)
{
if ($id_competence <= 0) {
return false;
}
if (!$lang_code) {
$lang_code = getLanguage();
}
$query = "UPDATE " . $this->_getCompetencesLangTable() . " " . " SET description = '" . $description . "' " . " WHERE id_competence = " . (int) $id_competence . " AND lang_code = '" . $lang_code . "'";
$res = $this->db->query($query);
return $res ? true : false;
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:12,代码来源:CompetencesAdm.php
注:本文中的getLanguage函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论