本文整理汇总了PHP中e107::getSingleton方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::getSingleton方法的具体用法?PHP e107::getSingleton怎么用?PHP e107::getSingleton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类e107
的用法示例。
在下文中一共展示了e107::getSingleton方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pluginRefresh
function pluginRefresh()
{
global $plug;
$plug = e107::getSingleton('e107plugin')->getinfo($this->id);
$_path = e_PLUGIN . $plug['plugin_path'] . '/';
if (file_exists($_path . 'plugin.xml')) {
// $text .= $plugin->install_plugin_xml($this->id, 'refresh');
e107::getSingleton('e107plugin')->refresh($plug['plugin_path']);
e107::getLog()->add('PLUGMAN_04', $this->id . ':' . $plug['plugin_path'], E_LOG_INFORMATIVE, '');
}
}
示例2: get_default_prefs
function get_default_prefs()
{
$xmlArray = e107::getSingleton('xmlClass')->loadXMLfile(e_CORE . "xml/default_install.xml", 'advanced');
$pref = e107::getSingleton('xmlClass')->e107ImportPrefs($xmlArray, 'core');
return $pref;
}
示例3: close
/**
* @desc Closes the mySQL server connection.<br />
* <br />
* Only required if you open a second connection.<br />
* Native e107 connection is closed in the footer.php file<br />
* <br />
* Example :<br />
* <code>$sql->db_Close();</code>
*
* @access public
* @return void
*/
function close()
{
if (!$this->mySQLaccess) {
global $db_ConnectionID;
$this->mySQLaccess = $db_ConnectionID;
}
e107::getSingleton('e107_traffic')->BumpWho('db Close', 1);
$this->mySQLaccess = NULL;
// correct way to do it when using shared links.
$this->dbError('dbClose');
}
示例4: getJsHelper
/**
* Get JS Helper instance
*
* @return e_jshelper
*/
public function getJsHelper()
{
return e107::getSingleton('e_jshelper', true, 'admin_response');
}
示例5: tablerender
/**
* @param $caption string caption text
* @param $text string
* @param $mode unique identifier
* @param $return boolean : return the html instead of echo it.
* @return null
*/
public function tablerender($caption, $text, $mode = 'default', $return = false)
{
$override_tablerender = e107::getSingleton('override', e_HANDLER . 'override_class.php')->override_check('tablerender');
if ($override_tablerender) {
$result = call_user_func($override_tablerender, $caption, $text, $mode, $return);
if ($result == 'return') {
return '';
}
extract($result);
}
if ($return) {
if (!empty($text) && $this->eMenuArea) {
$this->eMenuCount++;
}
ob_start();
$this->tablestyle($caption, $text, $mode);
$ret = ob_get_contents();
ob_end_clean();
return $ret;
} else {
if (!empty($text) && $this->eMenuArea) {
$this->eMenuCount++;
}
$this->tablestyle($caption, $text, $mode);
return '';
}
}
示例6: _IPATH
/**
* Convenient proxy to e_admin_icons::path()
* Get icon relative server path
* <code>
* echo _IPATH('edit');
* // If icon path is overloaded by current admin theme:
* // '../e107_themes/current_theme/icons/admin/edit_16.png'
* // else
* // '../e107_images/admin_images/edit_16.png'
* </code>
*
* @param string $name without size and extension e.g. 'edit'
* @param integer size pixel , default 16
* @param string $extension without leading dot, default 'png'
* @return string icon relative server path
*/
function _IPATH($name, $size = 16, $extension = 'png')
{
return e107::getSingleton('e_admin_icons')->path($name, $size, $extension);
}
示例7: install_plugin
/**
* Install a Theme required plugin.
*
* @param string $plugpath - plugin folder name
* @return void
*/
public function install_plugin($plugpath)
{
e107::getDb()->db_Select_gen("SELECT * FROM #plugin WHERE plugin_path = '" . $plugpath . "' LIMIT 1");
$row = e107::getDb()->db_Fetch(MYSQL_ASSOC);
e107::getSingleton('e107plugin')->install_plugin($row['plugin_id']);
return;
}
示例8: render_newsitem
function render_newsitem($news, $mode = 'default', $n_restrict = '', $NEWS_TEMPLATE = '', $param = array())
{
global $NEWSSTYLE, $NEWSLISTSTYLE;
if ($override_newsitem = e107::getSingleton('override', true)->override_check('render_newsitem')) {
$result = call_user_func($override_newsitem, $news, $mode, $n_restrict, $NEWS_TEMPLATE, $param);
if ($result == 'return') {
return;
}
}
if ($n_restrict == 'userclass') {
$news['news_id'] = 0;
$news['news_title'] = LAN_NEWS_1;
$news['data'] = LAN_NEWS_2;
$news['news_extended'] = "";
$news['news_allow_comments'] = 1;
$news['news_start'] = 0;
$news['news_end'] = 0;
$news['news_render_type'] = 0;
$news['comment_total'] = 0;
}
$tmp = array();
$tmp['caticon'] = defset('ICONSTYLE');
$tmp['commentoffstring'] = defset('COMMENTOFFSTRING');
$tmp['commentlink'] = defset('COMMENTLINK');
$tmp['trackbackstring'] = defset('TRACKBACKSTRING');
$tmp['trackbackbeforestring'] = defset('TRACKBACKBEFORESTRING');
$tmp['trackbackafterstring'] = defset('TRACKBACKAFTERSTRING');
$tmp['itemlink'] = defset('NEWSLIST_ITEMLINK');
$tmp['thumbnail'] = defset('NEWSLIST_THUMB', "border:0px");
$tmp['catlink'] = defset('NEWSLIST_CATLINK');
$tmp['caticon'] = defset('NEWSLIST_CATICON', defset('ICONSTYLE'));
if (!$param) {
$param = array();
}
$param = array_merge($tmp, $param);
// Next three images aren't always defined by the caller, even if most of $param is.
//XXX All of this should be done via CSS from v2 on.
if (!isset($param['image_nonew_small'])) {
if (!defined("IMAGE_nonew_small")) {
define("IMAGE_nonew_small", file_exists(THEME . "images/nonew_comments.png") ? "<img src='" . THEME_ABS . "images/nonew_comments.png' alt='' /> " : "<img src='" . e_IMAGE_ABS . "generic/nonew_comments.png' alt='' />");
}
$param['image_nonew_small'] = IMAGE_nonew_small;
}
if (!isset($param['image_new_small'])) {
if (!defined("IMAGE_new_small")) {
define("IMAGE_new_small", file_exists(THEME . "images/new_comments.png") ? "<img src='" . THEME_ABS . "images/new_comments.png' alt='' /> " : "<img src='" . e_IMAGE_ABS . "generic/new_comments.png' alt='' /> ");
}
$param['image_new_small'] = IMAGE_new_small;
}
if (!isset($param['image_sticky'])) {
if (!defined("IMAGE_sticky")) {
define("IMAGE_sticky", file_exists(THEME . "images/sticky.png") ? "<img src='" . THEME_ABS . "images/sticky.png' alt='' /> " : "<img src='" . e_IMAGE_ABS . "generic/sticky.png' alt='' style='width: 14px; height: 14px; vertical-align: bottom' /> ");
}
$param['image_sticky'] = IMAGE_sticky;
}
cachevars('current_news_item', $news);
cachevars('current_news_param', $param);
if ($news['news_render_type'] == 1 && $mode != "extend") {
if (function_exists("news_list")) {
$NEWS_PARSE = news_list($news);
} else {
if ($NEWSLISTSTYLE) {
$NEWS_PARSE = $NEWSLISTSTYLE;
} else {
$NEWS_PARSE = "{NEWSICON} <b>{NEWSTITLELINK}</b><div class='smalltext'>{NEWSAUTHOR} " . LAN_NEWS_100 . " {NEWSDATE} | {NEWSCOMMENTS}</div>";
}
}
} else {
if ($NEWS_TEMPLATE) {
$NEWS_PARSE = $NEWS_TEMPLATE;
} else {
if (function_exists("news_style")) {
$action = varset($param['current_action'], 'default');
$NEWS_PARSE = news_style($news, $action, $param);
} else {
$NEWS_PARSE = $NEWSSTYLE;
}
}
}
//$loop_uid = $news['news_author']; - no references found
//require_once(e_CORE.'shortcodes/batch/news_shortcodes.php');
/* DEPRECATED
setScVar('news_shortcodes', 'news_item', $news);
setScVar('news_shortcodes', 'param', $param);
*/
// Set the Values for the social shortcode usage.
$tp = e107::getParser();
$socialArray = array('url' => e107::getUrl()->create('news/view/item', $news, 'full=1'), 'title' => $tp->toText($news['news_title']), 'tags' => $news['news_meta_keywords']);
$socialObj = e107::getScBatch('social');
if (is_object($socialObj)) {
$socialObj->setVars($socialArray);
}
// Retrieve batch sc object, set required vars
$sc = e107::getScBatch('news')->wrapper('news/view/item')->setScVar('news_item', $news)->setScVar('param', $param);
$text = e107::getParser()->parseTemplate($NEWS_PARSE, true, $sc);
if ($mode == 'return') {
return $text;
} else {
echo $text;
return TRUE;
//.........这里部分代码省略.........
示例9: __get
public function __get($name)
{
switch ($name) {
case 'tp':
$ret = e107::getParser();
break;
case 'sql':
$ret = e107::getDb();
break;
case 'ecache':
$ret = e107::getCache();
break;
case 'arrayStorage':
$ret = e107::getArrayStorage();
break;
case 'e_event':
$ret = e107::getEvent();
break;
case 'ns':
$ret = e107::getRender();
break;
case 'url':
$ret = e107::getUrl();
break;
case 'admin_log':
$ret = e107::getAdminLog();
break;
case 'override':
$ret = e107::getSingleton('override', e_HANDLER . 'override_class.php');
break;
case 'notify':
$ret = e107::getNotify();
break;
case 'e_online':
$ret = e107::getOnline();
break;
case 'eIPHandler':
$ret = e107::getIPHandler();
break;
case 'user_class':
$ret = e107::getUserClass();
break;
default:
trigger_error('$e107->$' . $name . ' not defined', E_USER_WARNING);
return null;
break;
}
$this->{$name} = $ret;
return $ret;
}
示例10: import_configuration
public function import_configuration()
{
$this->logLine('Starting configuration import');
// PRE-CONFIG start - create and register blank config instances - do not load!
$config_aliases = array('core', 'core_backup', 'emote', 'menu', 'search', 'notify');
foreach ($config_aliases as $alias) {
e107::getConfig($alias, false)->clearPrefCache();
}
// PRE-CONFIG end
// Basic stuff to get the handlers/classes to work.
// $udirs = "admin/|plugins/|temp";
// $e_SELF = $_SERVER['PHP_SELF'];
// $e_HTTP = preg_replace("#".$udirs."#i", "", substr($e_SELF, 0, strrpos($e_SELF, "/"))."/");
// define("MAGIC_QUOTES_GPC", (ini_get('magic_quotes_gpc') ? true : false));
// define('CHARSET', 'utf-8');
// define("e_LANGUAGE", $this->previous_steps['language']);
// define('e_SELF', 'http://'.$_SERVER['HTTP_HOST']) . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME']);
$themeImportFile = array();
$themeImportFile[0] = $this->e107->e107_dirs['THEMES_DIRECTORY'] . $this->previous_steps['prefs']['sitetheme'] . "/install.xml";
$themeImportFile[1] = $this->e107->e107_dirs['THEMES_DIRECTORY'] . $this->previous_steps['prefs']['sitetheme'] . "/install/install.xml";
// $themeImportFile[3] = $this->e107->e107_dirs['CORE_DIRECTORY']. "xml/default_install.xml";
$XMLImportfile = false;
if (vartrue($this->previous_steps['generate_content'])) {
foreach ($themeImportFile as $file) {
if (is_readable($file)) {
$XMLImportfile = $file;
break;
}
}
}
$tp = e107::getParser();
define('PREVIEWTHEMENAME', "");
// Notice Removal.
include_lan($this->e107->e107_dirs['LANGUAGES_DIRECTORY'] . $this->previous_steps['language'] . "/lan_prefs.php");
include_lan($this->e107->e107_dirs['LANGUAGES_DIRECTORY'] . $this->previous_steps['language'] . "/admin/lan_theme.php");
// [SecretR] should work now - fixed log errors (argument noLogs = true) change to false to enable log
$coreConfig = $this->e107->e107_dirs['CORE_DIRECTORY'] . "xml/default_install.xml";
$ret = e107::getXml()->e107Import($coreConfig, 'replace', true, false);
// Add core pref values
$this->logLine('Attempting to Write Core Prefs.');
$this->logLine(print_r($ret, true));
if ($XMLImportfile) {
$ret2 = e107::getXml()->e107Import($XMLImportfile, 'replace', true, false);
// Overwrite specific core pref and tables entries.
$this->logLine('Attempting to write Theme Prefs/Tables (install.xml)');
$this->logLine(print_r($ret2, true));
}
//Create default plugin-table entries.
// e107::getConfig('core')->clearPrefCache();
e107::getPlugin()->update_plugins_table('update');
$this->logLine('Plugins table updated');
// Install Theme-required plugins
if (vartrue($this->previous_steps['install_plugins'])) {
if ($themeInfo = $this->get_theme_xml($this->previous_steps['prefs']['sitetheme'])) {
if (isset($themeInfo['plugins']['plugin'])) {
foreach ($themeInfo['plugins']['plugin'] as $k => $plug) {
$this->install_plugin($plug['@attributes']['name']);
$this->logLine('Theme-related plugin installed: ' . $plug['@attributes']['name']);
}
}
}
}
e107::getSingleton('e107plugin')->save_addon_prefs('update');
// save plugin addon pref-lists. eg. e_latest_list.
$this->logLine('Addon prefs saved');
$tm = e107::getSingleton('themeHandler');
$tm->noLog = true;
// false to enable log
$tm->setTheme($this->previous_steps['prefs']['sitetheme'], false);
// Admin log fix - don't allow logs to be called inside pref handler
// FIX
e107::getConfig('core')->setParam('nologs', true);
// change to false to enable log
$pref = e107::getConfig('core')->getPref();
// Set Preferences defined during install - overwriting those that may exist in the XML.
$this->previous_steps['prefs']['sitelanguage'] = $this->previous_steps['language'];
$this->previous_steps['prefs']['sitelang_init'] = $this->previous_steps['language'];
$this->previous_steps['prefs']['siteadmin'] = $this->previous_steps['admin']['display'];
$this->previous_steps['prefs']['siteadminemail'] = $this->previous_steps['admin']['email'];
$this->previous_steps['prefs']['install_date'] = time();
$this->previous_steps['prefs']['siteurl'] = e_HTTP;
$this->previous_steps['prefs']['sitetag'] = "e107 Website System";
$this->previous_steps['prefs']['sitedisclaimer'] = '';
$this->previous_steps['prefs']['replyto_name'] = $this->previous_steps['admin']['display'];
$this->previous_steps['prefs']['replyto_email'] = $this->previous_steps['admin']['email'];
// Cookie name fix, ended up with 406 error when non-latin words used
$cookiename = preg_replace('/[^a-z0-9]/i', '', trim($this->previous_steps['prefs']['sitename']));
$this->previous_steps['prefs']['cookie_name'] = ($cookiename ? substr($cookiename, 0, 4) . '_' : 'e_') . 'cookie';
### URL related prefs
// set all prefs so that they are available, required for adminReadModules() - it checks which plugins are installed
e107::getConfig('core')->setPref($this->previous_steps['prefs']);
$url_modules = eRouter::adminReadModules();
$url_locations = eRouter::adminBuildLocations($url_modules);
$url_config = eRouter::adminBuildConfig(array(), $url_modules);
$this->previous_steps['prefs']['url_aliases'] = array();
$this->previous_steps['prefs']['url_config'] = $url_config;
$this->previous_steps['prefs']['url_modules'] = $url_modules;
$this->previous_steps['prefs']['url_locations'] = $url_locations;
eRouter::clearCache();
$this->logLine('Core URL config set to default state');
//.........这里部分代码省略.........
示例11: render_infopanel_menu_options
function render_infopanel_menu_options()
{
if (!getperms('0')) {
return;
}
global $pref;
$frm = e107::getSingleton('e_form');
$text = "";
$menu_qry = 'SELECT * FROM #menus WHERE menu_id!= 0 GROUP BY menu_name ORDER BY menu_name';
$settings = varset($pref['core-infopanel-menus'], array());
if (e107::getDb()->db_Select_gen($menu_qry)) {
while ($row = e107::getDb()->db_Fetch()) {
$label = str_replace("_menu", "", $row['menu_name']);
$path_to_menu = $row['menu_path'] . $row['menu_name'];
$checked = $settings && in_array($path_to_menu, $settings) ? true : false;
$text .= "\n<div class='left f-left list field-spacer' style='display:block;height:24px;width:200px;'>";
$text .= $frm->checkbox_label($label, "e-mymenus[]", $path_to_menu, $checked);
$text .= "</div>";
}
}
$text .= "<div class='clear'> </div>";
return $text;
}
示例12: importXmlFile
/**
* Import XML Dump
* @return none
*/
private function importXmlFile()
{
$ret = e107::getSingleton('xmlClass')->e107Import($_FILES['file_userfile']['tmp_name'][0]);
foreach ($ret['success'] as $table) {
eMessage::getInstance()->add("Inserted {$table}", E_MESSAGE_SUCCESS);
}
foreach ($ret['failed'] as $table) {
eMessage::getInstance()->add("Failed to Insert {$table}", E_MESSAGE_ERROR);
}
}
示例13: Show_Performance
function Show_Performance()
{
//
// Stats by Time Marker
//
global $db_time;
global $sql;
global $eTimingStart, $eTimingStop;
$this->Mark_Time('Stop');
if (!E107_DBG_TIMEDETAILS) {
return '';
}
$totTime = e107::getSingleton('e107_traffic')->TimeDelta($eTimingStart, $eTimingStop);
$text = "\n<table class='fborder table table-striped table-condensed'>\n";
$bRowHeaders = FALSE;
reset($this->aTimeMarks);
$aSum = $this->aTimeMarks[0];
// create a template from the 'real' array
$aSum['Index'] = '';
$aSum['What'] = 'Total';
$aSum['Time'] = 0;
$aSum['DB Time'] = 0;
$aSum['DB Count'] = 0;
$aSum['Memory'] = '';
while (list($tKey, $tMarker) = each($this->aTimeMarks)) {
if (!$bRowHeaders) {
// First time: emit headers
$bRowHeaders = TRUE;
$text .= "<tr><td class='fcaption' style='text-align:right'><b>" . implode("</b> </td><td class='fcaption' style='text-align:right'><b>", array_keys($tMarker)) . "</b> </td><td class='fcaption' style='text-align:right'><b>OB Lev </b></td></tr>\n";
$aUnits = $tMarker;
foreach ($aUnits as $key => $val) {
switch ($key) {
case 'DB Time':
case 'Time':
$aUnits[$key] = '(msec)';
break;
default:
$aUnits[$key] = '';
break;
}
}
$aUnits['OB Lev'] = 'lev(buf bytes)';
$aUnits['Memory'] = '(kb)';
$text .= "<tr><td class='fcaption' style='text-align:right'><b>" . implode("</b> </td><td class='fcaption' style='text-align:right'><b>", $aUnits) . "</b> </td></tr>\n";
}
$tMem = $tMarker['Memory'];
$tMarker['Memory'] = $tMem ? number_format($tMem / 1024.0, 1) : '?';
// display if known
if ($tMarker['What'] == 'Stop') {
$tMarker['Time'] = ' ';
$tMarker['%Time'] = ' ';
$tMarker['%DB Count'] = ' ';
$tMarker['%DB Time'] = ' ';
$tMarker['DB Time'] = ' ';
$tMarker['OB Lev'] = $this->aOBMarks[$tKey];
$tMarker['DB Count'] = ' ';
} else {
// Convert from start time to delta time, i.e. from now to next entry
$nextMarker = current($this->aTimeMarks);
$aNextT = $nextMarker['Time'];
$aThisT = $tMarker['Time'];
$thisDelta = e107::getSingleton('e107_traffic')->TimeDelta($aThisT, $aNextT);
$aSum['Time'] += $thisDelta;
$aSum['DB Time'] += $tMarker['DB Time'];
$aSum['DB Count'] += $tMarker['DB Count'];
$tMarker['Time'] = number_format($thisDelta * 1000.0, 1);
$tMarker['%Time'] = $totTime ? number_format(100.0 * ($thisDelta / $totTime), 0) : 0;
$tMarker['%DB Count'] = number_format(100.0 * $tMarker['DB Count'] / $sql->db_QueryCount(), 0);
$tMarker['%DB Time'] = $db_time ? number_format(100.0 * $tMarker['DB Time'] / $db_time, 0) : 0;
$tMarker['DB Time'] = number_format($tMarker['DB Time'] * 1000.0, 1);
$tMarker['OB Lev'] = $this->aOBMarks[$tKey];
}
$text .= "<tr><td class='forumheader3' >" . implode(" </td><td class='forumheader3' style='text-align:right'>", array_values($tMarker)) . " </td></tr>\n";
if (isset($this->aMarkNotes[$tKey])) {
$text .= "<tr><td class='forumheader3' > </td><td class='forumheader3' colspan='4'>";
$text .= $this->aMarkNotes[$tKey] . "</td></tr>\n";
}
if ($tMarker['What'] == 'Stop') {
break;
}
}
$aSum['%Time'] = $totTime ? number_format(100.0 * ($aSum['Time'] / $totTime), 0) : 0;
$aSum['%DB Time'] = $db_time ? number_format(100.0 * ($aSum['DB Time'] / $db_time), 0) : 0;
$aSum['%DB Count'] = $sql->db_QueryCount() ? number_format(100.0 * ($aSum['DB Count'] / $sql->db_QueryCount()), 0) : 0;
$aSum['Time'] = number_format($aSum['Time'] * 1000.0, 1);
$aSum['DB Time'] = number_format($aSum['DB Time'] * 1000.0, 1);
$text .= "<tr><td class='fcaption'><b>" . implode("</b> </td><td class='fcaption' style='text-align:right'><b>", $aSum) . "</b> </td><td class='fcaption'> </td></tr>\n";
$text .= "\n</table><br />\n";
//
// Stats by Table
//
$text .= "\n<table class='fborder table table-striped table-condensed'>\n";
$bRowHeaders = FALSE;
$aSum = $this->aDBbyTable['core'];
// create a template from the 'real' array
$aSum['Table'] = 'Total';
$aSum['%DB Count'] = 0;
$aSum['%DB Time'] = 0;
$aSum['DB Time'] = 0;
$aSum['DB Count'] = 0;
//.........这里部分代码省略.........
示例14: renderHelp
function renderHelp()
{
$e_userclass = e107::getSingleton('user_class_admin');
// Admin functions - should just obliterate any previous object created in class2.php
$e_userclass->calc_tree();
$text = "<div id='userclass-tree-structure'>" . $e_userclass->show_graphical_tree() . "</div>";
return array('caption' => 'Class Structure', 'text' => $text);
//TODO LAN
// $text .= $e_userclass->show_graphical_tree();
}
示例15: dbPage
public function dbPage()
{
if (!getperms('0')) {
return "Access Denied";
}
$this->dbPageEditProcess();
if ($_GET['sub'] == 'edit' || $_GET['sub'] == 'create') {
return $this->dbPageEdit();
}
// $lanlist = e107::getLanguage()->installed();
$lanlist = $this->installedLanguages;
$tabs = $this->getTables();
$sql = e107::getDb();
$frm = e107::getForm();
$tp = e107::getParser();
$mes = e107::getMessage();
$pref = e107::getPref();
if (empty($pref['multilanguage'])) {
return false;
}
$lck = e107::getSingleton('lancheck', e_ADMIN . "lancheck.php");
// Choose Language to Edit:
$text = "\n\t\t\t<fieldset id='core-language-list'>\n\t\t\t\t<legend class='e-hideme'>" . LANG_LAN_16 . "</legend>\n\t\t\t\t<table class='table table-striped adminlist'>\n\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t<col style='width:20%' />\n\t\t\t\t\t\t<col style='width:60%' />\n\t\t\t\t\t\t<col style='width:20%' />\n\t\t\t\t\t</colgroup>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>" . ADLAN_132 . "</th>\n\t\t\t\t\t\t\t<th>" . LANG_LAN_03 . "</th>\n\t\t\t\t\t\t\t<th class='last'>" . LAN_OPTIONS . "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr class='active'>\n\t\t\t\t\t\t\t<td>" . $pref['sitelanguage'] . "</td>\n\t\t\t\t\t\t\t<td><i>" . LANG_LAN_17 . "</i></td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t</tr>\n\t\t";
sort($lanlist);
foreach ($lanlist as $e_language) {
if ($e_language == $pref['sitelanguage']) {
continue;
}
$installed = array();
$text .= "<tr><td>{$e_language}</td><td>";
foreach ($tabs as $tab_name) {
if ($e_language != $pref['sitelanguage'] && $sql->isTable($tab_name, $e_language)) {
$installed[] = $tab_name;
$text .= "<span class='label label-success'>" . $tab_name . "</span> ";
}
}
$text .= !count($installed) ? "<span class='label label-danger label-important'>" . LANG_LAN_05 . "</span>" : "";
$text .= "</td>\n";
$text .= "<td>\n\t\t\t\t\t<form style='margin:0px' id='core-language-form-" . str_replace(" ", "-", $e_language) . "' action='" . e_SELF . "?mode=main&action=db' method='post'>\n";
$text .= "<div>";
if (count($installed)) {
$text .= "<a class='btn btn-primary edit' href='" . e_SELF . "?mode=main&action=db&sub=edit&lan=" . $e_language . "'>" . LAN_EDIT . "</a>";
// $text .= "<button class='btn btn-primary edit' type='submit' name='edit_existing' value='no-value'><span>".LAN_EDIT."</span></button>";
$text .= $frm->admin_button('del_existing', LAN_DELETE, 'delete');
// $text .= "<button class='btn btn-danger delete' type='submit' name='del_existing' value='no-value' title='".$tp->lanVars(LANG_LAN_105, $e_language).' '.LAN_JSCONFIRM."'><span>".LAN_DELETE."</span></button>";
} elseif ($e_language != $pref['sitelanguage']) {
// $text .= "<button class='create' type='submit' name='create_edit_existing' value='no-value'><span>".LAN_CREATE."</span></button>";
// $text .= $frm->admin_button('create_edit_existing','no-value','create',LAN_CREATE);
$text .= "<a class='btn btn-primary create' href='" . e_SELF . "?mode=main&action=db&sub=create&lan=" . $e_language . "'>" . LAN_CREATE . "</a>";
}
$text .= "<input type='hidden' name='lang_choices' value='" . $e_language . "' />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t";
}
$text .= "\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t";
return $text;
// e107::getRender()->tablerender(ADLAN_132.SEP.LANG_LAN_16, $mes->render().$text); // Languages -> Tables
}