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


PHP load_lang函数代码示例

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


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

示例1: layout

function layout($data)
{
    if (!$_REQUEST['lang']) {
        $blanguage = GetUserLanguage();
    } else {
        $blanguage = $_REQUEST['lang'];
    }
    // lingua
    $lang = load_lang('lang_mngbd', $blanguage);
    echo "\r\n\t<br>\r\n\t<div align=\"center\">\r\n\t  <table border=\"0\" width=\"500\" id=\"table1\">\r\n\t\t<tr>\r\n\t\t  <th class='row1'>\r\n\t\t  <font face=\"Verdana\"><b>" . $lang['mngbd_title'] . "</b></font></th>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t  <td class='row1' >\r\n\t\t    <p align=\"center\"><br>\r\n\t            \t<form method=\"POST\" action=\"mngbd.php?edit=1\">\r\n\t\t\t\t\t\r\n\t\t\t\t<table border=\"0\" width=\"100%\" id=\"table2\">\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class='row1' width=\"27%\"><b>\r\n\t\t\t\t\t\t<font size=\"2\">" . $lang['mngbd_band'] . "</font></b></td>\r\n\t\t\t\t\t\t<td class='row1' width=\"71%\"><input type=\"text\" name=\"band\" value=\"" . $data['BAND'] . "\" size=\"20\">" . $lang['mngbd_kb'] . "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class='row3' colspan=\"2\">" . $lang['mngbd_info'] . "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class='row1' width=\"27%\"><b>\r\n\t\t\t\t\t\t<font size=\"2\">" . $lang['mngbd_port'] . "</font></b></td>\r\n\t\t\t\t\t\t<td class='row1' width=\"71%\"><input type=\"text\" name=\"port\" value=\"" . $data['PORT'] . "\" size=\"20\"></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class='row3' colspan=\"2\">" . $lang['mngbd_info2'] . "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<p align=\"center\"><input type=\"submit\" value=\"Conferma\" name=\"B1\"></p>\r\n\t\t\t</form>\r\n\t\t    </p>\r\n\t\t  </td>\r\n\t\t</tr>\r\n\t  </table>\r\n\t</div>\r\n\t\r\n\t</body>\r\n\t\r\n\t</html>\r\n\t";
}
开发者ID:BackupTheBerlios,项目名称:keyforum-svn,代码行数:11,代码来源:mngbd.php

示例2: prefs_list

function prefs_list($message = '')
{
    global $textarray;
    extract(get_prefs());
    $locale = setlocale(LC_ALL, $locale);
    $textarray = load_lang($language);
    echo pagetop(gTxt('edit_preferences'), $message), '<form action="index.php" method="post">', startTable('list'), tr(tdcs(hed(gTxt('site_prefs'), 1), 3)), tr(tdcs(sLink('prefs', 'advanced_prefs', gTxt('advanced_preferences'), 'navlink') . sp . sLink('prefs', 'list_languages', gTxt('install_language'), 'navlink'), '3'));
    $evt_list = safe_column('event', 'txp_prefs', "type='0' AND prefs_id='1' GROUP BY 'event' ORDER BY 'event' DESC");
    foreach ($evt_list as $event) {
        $rs = safe_rows_start('*', 'txp_prefs', "type='0' AND prefs_id='1' AND event='{$event}' ORDER BY 'position'");
        $cur_evt = '';
        while ($a = nextRow($rs)) {
            if ($a['event'] != $cur_evt) {
                $cur_evt = $a['event'];
                if ($cur_evt == 'comments' && !$use_comments) {
                    continue;
                }
                echo tr(tdcs(hed(ucfirst(gTxt($a['event'])), 1), 3));
            }
            if ($cur_evt == 'comments' && !$use_comments) {
                continue;
            }
            # Skip old settings that don't have an input type
            if (!is_callable($a['html'])) {
                continue;
            }
            $out = tda(gTxt($a['name']), ' style="text-align:right;vertical-align:middle"');
            if ($a['html'] == 'text_input') {
                $size = 20;
                $out .= td(call_user_func('text_input', $a['name'], $a['val'], $size));
            } else {
                $out .= td(call_user_func($a['html'], $a['name'], $a['val']));
            }
            $out .= tda(popHelp($a['name']), ' style="vertical-align:middle"');
            echo tr($out);
        }
    }
    echo tr(tda(fInput('submit', 'Submit', gTxt('save_button'), 'publish'), ' colspan="3" class="noline"')), endTable(), sInput('prefs_save'), eInput('prefs'), hInput('prefs_id', "1"), hInput('lastmod', "now()"), '</form>';
    $check_updates = gps('check_updates');
    if (!empty($check_updates)) {
        include_once txpath . '/lib/txplib_update.php';
        $updates = checkUpdates();
        if (is_array($updates)) {
            $out = join(br, $updates);
        } else {
            $out = $updates;
        }
        echo startTable('edit'), tr(tda($out)), endTable();
    } else {
        echo startTable('edit'), form(tr(tda(tag(gTxt('check_for_txp_updates'), 'strong'), ' style="text-align:right;vertical-align:middle"') . tda('<input type="submit" value="' . gTxt('go') . '" name="check_updates" class="publish" />')) . eInput('prefs') . sInput('prefs_list')), endTable();
    }
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:52,代码来源:txp_prefs.php

示例3: header

// Sypex Dumper Lite 2
header("Content-Type: text/html; charset=utf-8");
set_error_handler("sxd_error");
if (!empty($_POST['ajax']['job']) && preg_match("/^[\\w-]+\$/", $_POST['ajax']['job'])) {
    $d = date("'Y.m.d H:i:s'");
    if (!empty($_COOKIE['sxd'])) {
        include 'ses.php';
        if (!empty($SES[$_COOKIE['sxd']])) {
            $CFG =& $SES[$_COOKIE['sxd']]['cfg'];
            include load_lang($SES[$_COOKIE['sxd']]['lng']);
        }
    }
    if (empty($LNG)) {
        include 'cfg.php';
        include load_lang($CFG['lang']);
        if (!empty($CFG['auth'])) {
            echo "sxd.log.add({$d},[" . esc($LNG['stop_5']) . " (1)]);sxd.hideLoading();";
            exit;
        }
    }
    $job_name = $_POST['ajax']['job'];
    $log_seek = !empty($_POST['ajax']['lseek']) ? (int) $_POST['ajax']['lseek'] : 0;
    $job_file = "{$CFG['backup_path']}{$job_name}.job.php";
    if (!file_exists($job_file)) {
        exit;
    }
    include $job_file;
    switch ($_POST['ajax']['act']) {
        case 'info':
            if (!file_exists($JOB['file_rtl'])) {
开发者ID:sonicmaster,项目名称:RPG,代码行数:30,代码来源:info.php

示例4: foreach

$db->hide_errors();
//configurazione
$query = "SELECT * FROM config WHERE 1";
$result = $db->get_results($query);
foreach ($result as $riga) {
    $config[$riga->MAIN_GROUP][$riga->SUBKEY][$riga->FKEY] = $riga->VALUE;
}
include "langsupport.php";
// determino la lingua
if (!$_REQUEST['lang']) {
    $blanguage = GetUserLanguage();
} else {
    $blanguage = $_REQUEST['lang'];
}
// lingua
$lang = load_lang('lang_index', $blanguage);
?>

<html>
<head>
<link rel="shortcut icon" href="favicon.ico">
<link type="text/css" rel="stylesheet" href="style_page.css" />

<script> 
function goTo(screen)
{
document.toolbar.action = screen;
document.toolbar.submit();
}
</script>
开发者ID:BackupTheBerlios,项目名称:keyforum-svn,代码行数:30,代码来源:testa.php

示例5: die

<?php

/**********************************************************
			mod_meteo.php

***********************************************************/
if (!defined('IN_PHPBB')) {
    die("Hacking attempt");
}
global $lang;
load_lang('meteo');
$template->set_filenames(array('meteo' => 'areabb/mods/meteo/tpl/mod_meteo.tpl'));
$template->assign_vars(array('L_MOD_METEO' => $lang['L_MOD_METEO'], 'L_DEFINIR_VILLE' => $lang['L_DEFINIR_VILLE'], 'L_TA_VILLE' => $lang['L_TA_VILLE'], 'L_GO' => $lang['L_GO']));
$template->assign_var_from_handle('meteo', 'meteo');
开发者ID:Nekrofage,项目名称:FJR,代码行数:14,代码来源:mod_meteo.php

示例6: aff_str_ordinal

function aff_str_ordinal($param)
{
    global $msg;
    $index = $param[0];
    $langue = $param[1];
    $local_msg = $msg;
    if ($langue) {
        $local_msg = load_lang($langue);
    }
    return $local_msg["ordinal_s_" . $index];
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:11,代码来源:interpreter.inc.php

示例7: die

<?php

/***************************************************************************
 *                                mod_searchbox.php
 *                            -------------------
 *  Par Saint-Pere www.yep-yop.com
 ***************************************************************************/
if (!defined('IN_PHPBB')) {
    die("Hacking attempt");
}
global $HTTP_POST_VARS;
load_lang('arcade');
// minimum de caractere pour effectuer une recherche
$min_char = 3;
$max_reponses = 30;
include_once $phpbb_root_path . 'areabb/fonctions/class_liste_jeux.' . $phpEx;
$search = new liste_jeux();
$search->game_popup == 1;
//chargement du template
$template->set_filenames(array('searchbox' => 'areabb/mods/searchbox/tpl/mod_searchbox.tpl'));
// on recherche
if (isset($HTTP_POST_VARS['recherche'])) {
    $mot_clef = $HTTP_POST_VARS['recherche'];
    $longueur_mot_clef = strlen($mot_clef);
    // si il  y a moins de 3 caracteres on cherche pas..
    if ($longueur_mot_clef < $min_char) {
        $template->assign_block_vars('trop_court', array('COURT' => "Minimum " . $min_char . " caractères"));
    } else {
        $sql = 'SELECT * FROM ' . AREABB_GAMES_TABLE . ' 
				WHERE game_desc LIKE \'%' . $mot_clef . '%\' 
				OR game_name LIKE \'%' . $mot_clef . '%\' 
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:mod_searchbox.php

示例8: ini_set

<?php

include "testa.php";
// massima durata in secondi dello script
$globaltimeout = 3600;
ini_set("max_execution_time", $globaltimeout);
// lingua
$lang += load_lang('lang_newboard', $blanguage);
echo "\n\n<div align=center>\n<form method=\"POST\" action=\"newboard.php\">\n  <p>" . $lang['newbrd_sesname'] . "<br>\n  <input type=\"text\" name=\"bsession\" size=\"20\"></p>\n  <p>" . $lang['newbrd_description'] . "<br>\n  <input type=\"text\" name=\"bdesc\" size=\"73\"></p>\n  <p>&nbsp;</p>\n  <p>\n  <input type=hidden name=\"submit\" value=1>\n  <input type=\"submit\" value=\"" . $lang['newbrd_create'] . "\" name=\"B1\"></p>\n</form>\n</div>\n";
?>


<?php 
if ($submit) {
    require "functions.php";
    include "core.php";
    $corereq['RSA']['GENKEY']['CONSOLE_OUTPUT'] = 0;
    $coresk = new CoreSock();
    echo "<div align=center>";
    echo $lang['newbrd_keygen'];
    flush();
    if (!$coresk->Send($corereq)) {
        $std->Error($lang['newbrd_senderr']);
    }
    $coreresp = $coresk->Read($globaltimeout);
    if (!$coreresp) {
        die($lang['newbrd_coretimeout']);
    }
    $bname = $_REQUEST['bsession'];
    $bdesc = $_REQUEST['bdesc'];
    $pubkey = $coreresp['RSA']['GENKEY']['pub'];
开发者ID:BackupTheBerlios,项目名称:keyforum-svn,代码行数:31,代码来源:newboard.php

示例9: load_lang

<?php

/**
 *  RainFramework
 *  -------------
 *	Realized by Federico Ulfo & maintained by the Rain Team
 *	Distributed under MIT license http://www.opensource.org/licenses/mit-license.php
 */
// load language of the form
load_lang("form");
// add style
add_style("default.css", LIBRARY_DIR . "Form/tpl/");
// add javascript
add_script("jquery/jquery.min.js");
add_script("jquery/jquery.validate.min.js");
class Rain_Form
{
    // form variable
    private $name, $action, $method, $target;
    // html generated
    private $html;
    // hidden inputs
    private $hidden;
    // flag
    private $upload_file;
    // flag
    private $tiny_mce = false, $validation = false;
    // form counter
    private static $form_counter = 0;
    function Rain_Form($action = null, $method = "get", $name = null, $target = null, $layout = "default")
    {
开发者ID:jffuchs,项目名称:rainframework,代码行数:31,代码来源:Rain_Form.php

示例10: register_shutdown_function

register_shutdown_function('softfatalerrorHandler');
//Load the SOFTPANEL Class
if (!class_exists('softpanel')) {
    include_once $globals['enduser'] . '/softpanel.php';
}
$softpanel = new softpanel();
if (!defined('APP')) {
    define('APP', 'Softaculous');
}
//What index are we using ?
$globals['index'] = empty($globals['admin_index']) ? $globals['index'] : $globals['admin_index'];
//GET the Categories, Scripts and iScripts
catsnscripts();
//Load the Functions Language File - This will be from the default Lang Folder
load_lang('index');
load_lang('admin/index');
//Load the License Info - Loaded after langs loaded
loadlicense();
//Which Timezone is this PAGE ?
$globals['pgtimezone'] = (double) (empty($user['timezone']) ? $globals['timezone'] : $user['timezone']);
//ob_start('softaculous_buffer');
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOFTACULOUS IS DISABLED USING ACL
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (!empty($globals['disabled'])) {
    reporterror($l['disable_softaculous_t'], $l['disable_softaculous'], $l['disable_softaculous_t']);
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# SOFTACULOUS RESELLER PANEL IS DISABLED
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (!empty($globals['disable_reseller_panel']) && defined('SOFTRESELLER')) {
开发者ID:Git-Host,项目名称:AMPPS,代码行数:31,代码来源:admin_index.php

示例11: define

define('ABSPATH', __DIR__);
/* load core functions */
require_once ABSPATH . '/includes/functions.common.php';
if (!is_writable(ABSPATH . '/')) {
    exit(ABSPATH . ' is not writable.');
}
/* Load Configurations or start installation */
if (file_exists(ABSPATH . '/config.php')) {
    require_once ABSPATH . '/config.php';
} else {
    header("Location: install.php");
    exit;
}
// Check config.php if it is correct
$config_timestamp = 0;
$config_timestamp_now = filemtime(ABSPATH . '/config.php');
if (file_exists(ABSPATH . '/config.timestamp')) {
    $config_timestamp = file_get_contents(ABSPATH . '/config.timestamp');
}
if ($config_timestamp != $config_timestamp_now) {
    check_config();
    file_put_contents(ABSPATH . '/config.timestamp', $config_timestamp_now);
}
define('SUPPORT_TYPE', 'jpg|jpeg|jpe|jfif|jfi|jif|gif|png|svg');
header("X-Qchan-Info: Qchan is an image hosting freeware, is developed by Quadra Studio, and published under GPLv3.");
/* Load functions */
require_once ABSPATH . '/includes/functions.language.php';
require_once ABSPATH . '/includes/functions.theme.php';
require_once ABSPATH . '/includes/functions.upload.php';
$lang = load_lang(defined('MANAGE_RUN'));
开发者ID:ungc0,项目名称:three5six,代码行数:30,代码来源:engine.php

示例12: posted

function posted($atts)
{
    global $dateformat, $archive_dateformat, $timeoffset, $pg, $c, $thisarticle, $id, $txpcfg;
    $date_offset = $thisarticle['posted'] + $timeoffset;
    if (is_array($atts)) {
        extract($atts);
    }
    if (!empty($format)) {
        if ($format == 'since') {
            $date_out = since($thisarticle['posted']);
        } else {
            $date_out = date($format, $date_offset);
        }
    } else {
        if ($pg or $id or $c) {
            $dateformat = $archive_dateformat;
        }
        if ($dateformat == "since") {
            $date_out = since($thisarticle['posted']);
        } else {
            $date_out = date($dateformat, $date_offset);
        }
    }
    if (!empty($lang)) {
        if (empty($GLOBALS['date_lang'])) {
            $date_lang = load_lang($lang . '_dates');
        } else {
            global $date_lang;
        }
        if ($date_lang) {
            foreach ($date_lang as $k => $v) {
                $date_out = str_replace($k, $v, $date_out);
            }
        }
    }
    if (!empty($wraptag)) {
        $date_out = tag($date_out, $wraptag);
    }
    return $date_out;
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:40,代码来源:taghandlers.php

示例13: _l10n_pretext

 function _l10n_pretext()
 {
     function load_localised_pref($name)
     {
         global $prefs, $pretext;
         $k = "snip-{$name}";
         $r = gTxt($k);
         if ($r !== $k) {
             $GLOBALS[$name] = $r;
             $GLOBALS['prefs'][$name] = $r;
             $prefs[$name] = $r;
             $pretext[$name] = $r;
         }
     }
     global $l10n_language, $textarray, $prefs;
     $first_chunk = _l10n_process_url();
     #
     #	Now we know what language this user is browsing in.
     # If it is NOT the site's currently selected language then we need to re-load
     # the textarray with the right language (otherwise some strings used in comment forms
     # and older/newer tags will be wrong!
     #
     if (LANG !== $l10n_language['long'] and LANG !== $l10n_language['short']) {
         trace_add("L10N MLP: Switching to {$l10n_language['long']} from " . LANG);
         $textarray = load_lang($l10n_language['long']);
         $prefs['language'] = $l10n_language['long'];
     }
     load_localised_pref('site_slogan');
     @($GLOBALS['prefs']['comments_default_invite'] = gTxt('comment'));
     #
     #	Don't know why, but there seems to be some whitespace getting into the
     # output buffer. XHTML can cope but it causes a parse error in the feed xml
     #
     #	Simple solution is to make sure the output buffer is empty before
     # continuing the processing of rss or atom requests...
     #
     $ob_cleaning = array('rss', 'atom');
     if (in_array($first_chunk, $ob_cleaning)) {
         while (@ob_end_clean()) {
         }
     }
 }
开发者ID:netcarver,项目名称:mlp_pack,代码行数:42,代码来源:gbp_l10n.php

示例14: exit

if (!is_writable(ABSPATH . '/')) {
    exit(ABSPATH . ' is not writable.');
}
/* Load Configurations or start installation */
if (file_exists(ABSPATH . '/config.php')) {
    require_once ABSPATH . '/config.php';
} else {
    header("Location: install.php");
    exit;
}
$config_timestamp = 0;
$config_timestamp_now = filemtime(ABSPATH . '/config.php');
if (file_exists(ABSPATH . '/config.timestamp')) {
    $config_timestamp = file_get_contents(ABSPATH . '/config.timestamp');
}
if ($config_timestamp != $config_timestamp_now) {
    check_config();
    file_put_contents(ABSPATH . '/config.timestamp', $config_timestamp_now);
}
define('SUPPORT_TYPE', 'jpg|jpeg|jpe|jfif|jfi|jif|gif|png|svg');
header("X-Qchan-Info: Qchan is an image hosting freeware, is developed by Quadra Studio, and published under GPLv3.");
/* Load functions */
require_once ABSPATH . '/includes/functions.language.php';
require_once ABSPATH . '/includes/functions.theme.php';
require_once ABSPATH . '/includes/functions.upload.php';
/* load classes */
require_once ABSPATH . '/includes/Service.class.php';
require_once ABSPATH . '/includes/HttpRequest.class.php';
Service::init();
$lang = load_lang();
开发者ID:oxmcvusd,项目名称:qchan-lite,代码行数:30,代码来源:engine.php

示例15: ob_start

ob_start();
// start the clock for runtime
$microstart = getmicrotime();
// check the size of the url request
bombShelter();
// get all prefs as an array
$prefs = get_prefs();
$prefs['path_from_root'] = !$prefs['path_from_root'] ? '/' : $prefs['path_from_root'];
// add prefs to globals
extract($prefs);
if ($txpac['use_plugins']) {
    // get plugins, write to a temp file, include, then destroy
    plugins();
}
define("LANG", $language);
$textarray = load_lang('en-gb');
$s = empty($s) ? '' : $s;
$pretext = pretext($s, $prefs);
extract($pretext);
if (gps('parentid') && gps('submit')) {
    saveComment();
} elseif (gps('parentid') and $comments_mode == 1) {
    // popup comments?
    exit(popComments(gps('parentid')));
}
if (!isset($nolog)) {
    if ($logging == 'all') {
        logit();
    } elseif ($logging == 'refer') {
        logit('refer');
    }
开发者ID:bgarrels,项目名称:textpattern,代码行数:31,代码来源:publish.php


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