本文整理汇总了PHP中e107::includeLan方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::includeLan方法的具体用法?PHP e107::includeLan怎么用?PHP e107::includeLan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类e107
的用法示例。
在下文中一共展示了e107::includeLan方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install_post
function install_post($var)
{
e107::includeLan(e_PLUGIN . 'featurebox/languages/' . e_LANGUAGE . '_admin_featurebox.php');
$mes = e107::getMessage();
$query = array();
$query['fb_category_id'] = 0;
$query['fb_category_title'] = 'General';
$query['fb_category_template'] = 'default';
$query['fb_category_random'] = 0;
$query['fb_category_class'] = e_UC_PUBLIC;
$query['fb_category_limit'] = 1;
$inserted = e107::getDb()->db_Insert('featurebox_category', $query);
$status = $inserted ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add(FBLAN_INSTALL_01, $status);
if ($inserted) {
$query = array();
$query['fb_id'] = 0;
$query['fb_category'] = $inserted;
$query['fb_title'] = 'Default Title';
$query['fb_text'] = 'Default Message';
$query['fb_mode'] = 0;
$query['fb_class'] = e_UC_PUBLIC;
$query['fb_rendertype'] = 0;
$query['fb_template'] = 'default';
$query['fb_order'] = 0;
$query['fb_image'] = '';
$query['fb_imageurl'] = '';
$status = e107::getDb('sql2')->db_Insert('featurebox', $query) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
} else {
$status = E_MESSAGE_ERROR;
}
$mes->add(FBLAN_INSTALL_02, $status);
}
示例2: __construct
function __construct()
{
global $pref, $TEMPLATE_TAGWORDS, $tagwords_shortcodes;
$this->e107 = e107::getInstance();
//language
e107::includeLan(e_PLUGIN . "tagwords/languages/" . e_LANGUAGE . ".php");
//shortcodes
//require_once(e_PLUGIN.'tagwords/tagwords_shortcodes.php');
$this->shortcodes = e107::getScBatch('tagwords', TRUE);
//$this->shortcodes = $tagwords_shortcodes;
//template
if (is_readable(THEME . "tagwords_template.php")) {
require_once THEME . "tagwords_template.php";
} else {
require_once e_PLUGIN . "tagwords/tagwords_template.php";
}
$this->template = $TEMPLATE_TAGWORDS;
$this->pref = $this->get_prefs();
//load plugin and core tagword areas
$this->loadPlugin();
$this->loadCore();
//prepare and assign key'ed tagwords data
$this->mapper();
}
示例3: install_post
function install_post($var)
{
e107::includeLan(e_PLUGIN . 'featurebox/languages/' . e_LANGUAGE . '_admin_featurebox.php');
$mes = e107::getMessage();
$e107_featurebox_category = array(array('fb_category_id' => 1, 'fb_category_title' => FBLAN_INSTALL_04, 'fb_category_icon' => '', 'fb_category_template' => 'bootstrap3_carousel', 'fb_category_random' => '0', 'fb_category_class' => '0', 'fb_category_limit' => '0', 'fb_category_parms' => ''), array('fb_category_id' => 2, 'fb_category_title' => FBLAN_INSTALL_05, 'fb_category_icon' => '', 'fb_category_template' => 'bootstrap_tabs', 'fb_category_random' => '0', 'fb_category_class' => '0', 'fb_category_limit' => '0', 'fb_category_parms' => ''), array('fb_category_id' => 3, 'fb_category_title' => FBLAN_INSTALL_03, 'fb_category_icon' => '', 'fb_category_template' => 'unassigned', 'fb_category_random' => '0', 'fb_category_class' => '255', 'fb_category_limit' => '0', 'fb_category_parms' => ''));
$count = 0;
foreach ($e107_featurebox_category as $insert) {
$count = e107::getDb()->insert('featurebox_category', $insert) ? $count + 1 : $count;
}
$status = $count == 3 ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add(FBLAN_INSTALL_01, $status);
if ($status) {
$e107_featurebox = array(array('fb_id' => '4', 'fb_title' => 'Slide 1', 'fb_text' => 'Default Message - this is the default', 'fb_mode' => '0', 'fb_class' => '0', 'fb_rendertype' => '0', 'fb_template' => 'bootstrap_carousel_default', 'fb_order' => '3', 'fb_image' => '', 'fb_imageurl' => '', 'fb_category' => '1'), array('fb_id' => '6', 'fb_title' => 'Slide 2', 'fb_text' => 'Suspendisse ac dui purus. Cras eleifend, velit sed dapibus pharetra, elit dolor mattis tellus, ac luctus nisi massa at ligula. Ut sagittis, neque consequat elementum convallis, lorem nulla molestie arcu, eu rutrum velit quam at metus! Nullam eu eleifend magna. Praesent eget leo felis, vel euismod nibh. Morbi sem eros, pellentesque eu scelerisque id, pretium id enim. Mauris aliquet molestie dui vel ultricies. Etiam consequat quam sed tellus facilisis sollicitudin. Vivamus malesuada iaculis metus.
', 'fb_mode' => '0', 'fb_class' => '0', 'fb_rendertype' => '0', 'fb_template' => 'bootstrap_carousel_left', 'fb_order' => '4', 'fb_image' => '', 'fb_imageurl' => '', 'fb_category' => '1'), array('fb_id' => '10', 'fb_title' => 'Slide 3', 'fb_text' => 'Suspendisse ac dui purus. Cras eleifend, velit sed dapibus pharetra, elit dolor mattis tellus, ac luctus nisi massa at ligula. Ut sagittis, neque consequat elementum convallis, lorem nulla molestie arcu, eu rutrum velit quam at metus! Nullam eu eleifend magna. Praesent eget leo felis, vel euismod nibh. Morbi sem eros, pellentesque eu scelerisque id, pretium id enim. Mauris aliquet molestie dui vel ultricies. Etiam consequat quam sed tellus facilisis sollicitudin. Vivamus malesuada iaculis metus.
', 'fb_mode' => '0', 'fb_class' => '0', 'fb_rendertype' => '0', 'fb_template' => 'bootstrap_carousel_right', 'fb_order' => '4', 'fb_image' => '', 'fb_imageurl' => '', 'fb_category' => '1'));
foreach ($e107_featurebox as $qry) {
$status = e107::getDb('sql2')->insert('featurebox', $qry) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
}
$mes->add(FBLAN_INSTALL_02, $status);
} else {
$status = E_MESSAGE_ERROR;
$mes->add(FBLAN_INSTALL_02, $status);
}
}
示例4: header
/*
* e107 website system
*
* Copyright (C) 2008-2014 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
$eplug_admin = true;
require_once '../../class2.php';
if (!getperms('P')) {
header('location:' . e_BASE . 'index.php');
exit;
}
e107::includeLan(e_PLUGIN . 'forum/languages/' . e_LANGUAGE . '/English_admin.php');
e107::lan('forum', '', 'front');
$legacy = false;
if (E107_DEBUG_LEVEL > 0 && $legacy == true) {
define('OLD_FORUMADMIN', true);
//e107::getMessage()->addwarning("Experimental code now active. Using this page in debug mode active could break your forum configuration.");
}
// Generated e107 Plugin Admin Area
if (!deftrue('OLD_FORUMADMIN')) {
class forum_admin extends e_admin_dispatcher
{
protected $modes = array('main' => array('controller' => 'forum_ui', 'path' => null, 'ui' => 'forum_form_ui', 'uipath' => null), 'mods' => array('controller' => 'forum_ui', 'path' => null, 'ui' => 'forum_form_ui', 'uipath' => null), 'report' => array('controller' => 'reported_ui', 'path' => null, 'ui' => 'reported_form_ui', 'uipath' => null), 'post' => array('controller' => 'post_ui', 'path' => null, 'ui' => 'post_form_ui', 'uipath' => null));
protected $adminMenu = array('main/list' => array('caption' => LAN_MANAGE, 'perm' => 'P'), 'main/create' => array('caption' => LAN_CREATE, 'perm' => 'P'), 'opt1' => array('divider' => true), 'main/rules' => array('caption' => WMGLAN_5, 'perm' => 'P'), 'mods/list' => array('caption' => LAN_FORUM_2003, 'perm' => 'P'), 'main/prefs' => array('caption' => LAN_PREFS, 'perm' => 'P'), 'opt2' => array('divider' => true), 'report/list' => array('caption' => FORLAN_116, 'perm' => 'P'), 'post/list' => array('caption' => "Latest Posts", 'perm' => 'P'), 'main/prune' => array('caption' => LAN_PRUNE, 'perm' => 'P'), 'main/tools' => array('caption' => FORLAN_153, 'perm' => 'p'));
protected $adminMenuAliases = array('main/edit' => 'main/list');
protected $menuTitle = 'Forum';
function init()
示例5: header
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/faqs.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) {
require_once "../../class2.php";
}
if (file_exists(e_PLUGIN . "faqs/controllers/list.php")) {
$url = e107::getUrl()->create('faqs/list/all', false, 'full=1&noencode=1');
header('Location: ' . $url);
exit;
} else {
e107::includeLan(e_PLUGIN . "faqs/languages/" . e_LANGUAGE . "/" . e_LANGUAGE . "_front.php");
}
require_once e_HANDLER . "form_handler.php";
require_once e_HANDLER . "userclass_class.php";
require_once e_HANDLER . "ren_help.php";
require_once e_HANDLER . "comment_class.php";
if (!vartrue($FAQ_VIEW_TEMPLATE)) {
if (file_exists(THEME . "faqs_template.php")) {
// require_once (THEME."faqs_template.php");
} else {
// require_once (e_PLUGIN."faqs/templates/faqs_template.php");
}
}
e107::css('faqs', 'faqs.css');
// require_once(HEADERF);
// $pref['add_faq']=1;
示例6: define
define('ERR_INVALID_WORD', '09');
define('ERR_PASSWORDS_DIFFERENT', '10');
define('ERR_BANNED_EMAIL', '11');
define('ERR_INVALID_EMAIL', '12');
define('ERR_ARRAY_EXPECTED', '13');
define('ERR_BANNED_USER', '14');
define('ERR_FIELDS_DIFFERENT', '15');
define('ERR_CODE_ERROR', '16');
define('ERR_TOO_LOW', '17');
define('ERR_TOO_HIGH', '18');
define('ERR_GENERIC', '19');
// This requires coder-defined error text
define('ERR_IMAGE_TOO_WIDE', '20');
define('ERR_IMAGE_TOO_HIGH', '21');
// Default error messages
e107::includeLan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_validator.php');
/**
* Validator class - used by e_model and its child classes
*
* @package e107
* @category e107_handlers
* @version 1.0
* @author SecretR
* @copyright Copyright (c) 2009, e107 Inc.
*/
class e_validator
{
/**
* @var integer Unknown error code
*/
const ERR_UNKNOWN = 0;
示例7: explode
/*
* e107 website system
*
* Copyright (C) 2008-2015 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*/
if (!defined('e107_INIT')) {
exit;
}
if (!e107::isInstalled('rss_menu')) {
return '';
}
$sql = e107::getDb();
e107::includeLan(e_PLUGIN . "rss_menu/languages/" . e_LANGUAGE . "_admin_rss_menu.php");
$topic = "";
$caption = "";
if (e_PAGE == "news.php" && e107::getPref('rss_newscats')) {
$qry = explode(".", e_QUERY);
if ($qry[0] == "cat" || $qry[0] == "list") {
$topic = intval($qry[1]);
}
}
if (deftrue('e_CURRENT_PLUGIN') && ($res = $sql->retrieve("rss", "rss_path,rss_url", " rss_path = '" . e_CURRENT_PLUGIN . "' LIMIT 1"))) {
$caption = e107::getParser()->lanVars(LAN_PLUGIN_RSS_SUBSCRIBE_TO, deftrue('LAN_PLUGIN_' . strtoupper(e_CURRENT_PLUGIN) . '_NAME'));
$type = $res['rss_url'];
$plug = $res['rss_path'];
} elseif ($sql->select("rss", "rss_path", " rss_path = 'news' LIMIT 1")) {
$caption = LAN_PLUGIN_RSS_SUBSCRIBE;
$type = 'news';
示例8: header
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
if (!defined('e107_INIT')) {
require_once "../../class2.php";
}
if (!e107::isInstalled('log')) {
header('Location: ' . e_BASE . 'index.php');
exit;
}
e107::includeLan(e_PLUGIN . 'log/languages/' . e_LANGUAGE . '.php');
$bar = file_exists(THEME . 'images/bar.png') ? THEME_ABS . 'images/bar.png' : e_IMAGE_ABS . 'generic/bar.png';
$mes = e107::getMessage();
e107::css('inline', "\n/* Site Stats */\n.b { background-image: url('" . $bar . "'); border: 1px solid #999; height: 10px; font-size: 0px }\n");
require_once HEADERF;
if (!check_class(e107::getPref('statUserclass'))) {
$mes->addError(ADSTAT_L4);
$ns->tablerender(ADSTAT_L6, $mes->render());
require_once FOOTERF;
exit;
}
if (!e107::getPref('statActivate')) {
$text = ADMIN ? "<div style='text-align:center'>" . ADSTAT_L41 . "</div>" : "<div style='text-align:center'>" . ADSTAT_L5 . "</div>";
$ns->tablerender(ADSTAT_L6, $text);
require_once FOOTERF;
exit;
示例9: include_lan
function include_lan($path, $force = false)
{
return e107::includeLan($path, $force);
}
示例10: header
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Featurebox administration
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/admin_config.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
require_once "../../class2.php";
if (!getperms("P") || !plugInstalled('featurebox')) {
header("location:" . e_BASE . "index.php");
exit;
}
e107::includeLan(e_PLUGIN . 'featurebox/languages/' . e_LANGUAGE . '_admin_featurebox.php');
class fb_admin extends e_admin_dispatcher
{
protected $modes = array('main' => array('controller' => 'fb_main_ui', 'path' => null, 'ui' => 'fb_admin_form_ui', 'uipath' => null), 'category' => array('controller' => 'fb_category_ui', 'path' => null, 'ui' => 'fb_cat_form_ui', 'uipath' => null));
protected $adminMenu = array('main/list' => array('caption' => 'Featurebox List', 'perm' => 'P'), 'main/create' => array('caption' => 'Create Featurebox Entry', 'perm' => 'P'), 'category/list' => array('caption' => 'Categories', 'perm' => 'P'), 'category/create' => array('caption' => "Create Category", 'perm' => 'P'));
protected $adminMenuAliases = array('main/edit' => 'main/list', 'category/edit' => 'category/list');
protected $menuTitle = 'featurebox';
}
class fb_category_ui extends e_admin_ui
{
protected $pluginTitle = 'Feature Box';
protected $pluginName = 'featurebox';
protected $table = "featurebox_category";
protected $pid = "fb_category_id";
protected $perPage = 0;
//no limit
示例11: intval
/*
* e107 website system
*
* Copyright (C) 2009-2014 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
if (!defined('e107_INIT')) {
require_once "../../class2.php";
}
if (!e107::isInstalled('banner')) {
e107::redirect();
exit;
}
e107::includeLan(e_PLUGIN . "banner/languages/" . e_LANGUAGE . "_banner.php");
// TODO
e107::lan('banner');
$mes = e107::getMessage();
$frm = e107::getForm();
// When a banner is clicked
if (e_QUERY) {
$query_string = intval(e_QUERY);
$row = $sql->retrieve("banner", "*", "banner_id = '{$query_string}'");
// select the banner
$ip = e107::getIPHandler()->getIP(FALSE);
$newip = strpos($row['banner_ip'], "{$ip}^") !== FALSE ? $row['banner_ip'] : "{$row['banner_ip']}{$ip}^";
// what does this do?
$sql->update("banner", "banner_clicks = banner_clicks + 1, `banner_ip` = '{$newip}' WHERE `banner_id` = '{$query_string}'");
header("Location: {$row['banner_clickurl']}");
exit;
示例12: config
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Plugin - newsfeeds
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/newsfeed/e_frontpage.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
if (!defined('e107_INIT')) {
exit;
}
e107::includeLan(e_PLUGIN . 'newsfeed/languages/' . e_LANGUAGE . '_frontpage.php');
//v2.x spec.
class newsfeed_frontpage
{
function config()
{
$frontPage = array();
$frontPage['title'] = LAN_PLUGIN_NEWSFEEDS_NAME;
// .': '.vartrue($row['content_heading']); LAN_PLUGIN_NEWSFEEDS_NAME ?
$frontPage['page'][] = array('page' => '{e_PLUGIN}newsfeed/newsfeed.php', 'title' => NWSF_FP_2);
if (e107::getDb()->select("newsfeed", "newsfeed_id, newsfeed_name")) {
while ($row = e107::getDb()->fetch()) {
$frontPage['page'][] = array('page' => '{e_PLUGIN}newsfeed/newsfeed.php?show.' . $row['newsfeed_id'], 'title' => $row['newsfeed_name']);
}
}
return $frontPage;
示例13: newsFormatDate
}
if (false === $cached) {
if (!function_exists('newsFormatDate')) {
function newsFormatDate($year, $month, $day = "")
{
$date = $year;
$date .= strlen($month) < 2 ? "0" . $month : $month;
$date .= strlen($day) < 2 && $day != "" ? "0" . $day : $day;
return $date;
}
}
if (!isset($parms['showarchive'])) {
$parms['showarchive'] = 0;
}
// e107::lan('blogcalendar_menu', e_LANGUAGE); // FIXME decide on language file structure (#743)
e107::includeLan(e_PLUGIN . 'blogcalendar_menu/languages/English.php');
$tp = e107::getParser();
$sql = e107::getDb();
$marray = e107::getDate()->terms('month');
//$parms['year'] = "2011 0";
if (vartrue($parms['year'])) {
$date = $parms['year'];
list($cur_year, $cur_month) = explode(" ", date($date));
$start = mktime(0, 0, 0, 1, 1, $cur_year);
$end = mktime(23, 59, 59, 12, 31, $cur_year);
} else {
$date = "Y n";
list($cur_year, $cur_month) = explode(" ", date($date));
$start = mktime(0, 0, 0, 1, 1, $cur_year);
$end = time();
}