本文整理汇总了PHP中dir::backend方法的典型用法代码示例。如果您正苦于以下问题:PHP dir::backend方法的具体用法?PHP dir::backend怎么用?PHP dir::backend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dir
的用法示例。
在下文中一共展示了dir::backend方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public static function save()
{
if (!self::$isChange) {
return true;
}
$newEntrys = array_merge(self::$params, self::$newEntrys);
return file_put_contents(dir::backend('lib' . DIRECTORY_SEPARATOR . 'config.json'), json_encode($newEntrys, JSON_PRETTY_PRINT));
}
示例2: opendir
<h3 class="panel-title"><?php
echo lang::get('general');
?>
</h3>
</div>
<div class="panel-body">
<?php
$form = form_install::factory('', '', 'index.php');
$form->addParam('page', $page);
$field = $form->addTextField('hp_name', dyn::get('hp_name'));
$field->fieldName(lang::get('settings_name_of_site'));
$field = $form->addTextField('hp_url', dyn::get('hp_url'));
$field->fieldName(lang::get('settings_url_of_site'));
$field = $form->addSelectField('lang', dyn::get('lang'));
$field->fieldName(lang::get('settings_backend_lang'));
$handle = opendir(dir::backend('lib' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR));
while ($file = readdir($handle)) {
if (in_array($file, ['.', '..'])) {
continue;
}
$field->add($file, $file);
}
if ($form->isSubmit()) {
$url = 'http://' . str_replace('http://', '', $form->get('hp_url'));
$endSlash = substr($url, -1, 1);
if ($endSlash != '/') {
$url .= '/';
}
dyn::add('hp_name', $form->get('hp_name'), true);
dyn::add('hp_url', $url, true);
dyn::add('lang', $form->get('lang'), true);
示例3: dyn
autoload::addDir(dir::classes('utils'));
new dyn();
if (dyn::get('setup') == true) {
header('Location: install/');
exit;
}
if (isset($DYN['backend'])) {
dyn::add('backend', $DYN['backend']);
} else {
dyn::add('backend', true);
}
unset($DYN);
include dir::functions('html_stuff.php');
include dir::functions('url_stuff.php');
lang::setDefault();
lang::setLang(dyn::get('lang'));
$DB = dyn::get('DB');
sql::connect($DB['host'], $DB['user'], $DB['password'], $DB['database']);
ob_start();
date_default_timezone_set(dyn::get('timezone', 'Europe/Berlin'));
new userLogin();
dyn::add('user', new user(userLogin::getUser()));
cache::setCache(dyn::get('cache'));
addonConfig::loadAllConfig();
addonConfig::includeAllLangFiles();
addonConfig::includeAllLibs();
if (dyn::get('backend')) {
include dir::backend('backend.php');
} else {
include dir::backend('frontend.php');
}
示例4: elseif
$successMsg = type::get('success_msg', 'string');
$errorMsg = type::get('error_msg', 'string');
if (!is_null($errorMsg)) {
echo message::danger($errorMsg);
} elseif (!is_null($successMsg)) {
echo message::success($successMsg);
}
if (userLogin::isLogged()) {
if ($file = backend::getNaviInclude()) {
include $file;
}
}
$content = ob_get_contents();
ob_end_clean();
$content = extension::get('BACKEND_OUTPUT', $content);
dyn::add('content', $content);
if (ajax::is()) {
$deleteAction = type::get('deleteAction', 'bool', false);
if ($deleteAction) {
$title = type::get('title', 'string');
$message = type::get('message', 'string');
getDeleteModal($title, $message);
}
echo ajax::getReturn();
die;
}
if (userLogin::isLogged()) {
include dir::backend('layout/index.php');
} else {
include dir::backend('layout/login.php');
}
示例5: scandir
echo markdown::parse(file_get_contents($file));
} else {
echo lang::get('addon_no_readme');
}
?>
</div>
</div>
</div>
</div>
<?php
} else {
$table = table::factory();
$table->addCollsLayout('20,*,215');
$table->addRow()->addCell('')->addCell(lang::get('name'))->addCell(lang::get('actions'));
$table->addSection('tbody');
$addons = scandir(dir::backend('addons' . DIRECTORY_SEPARATOR));
if (count($addons)) {
foreach ($addons as $dir) {
if (in_array($dir, ['.', '..', '.htaccess'])) {
continue;
}
$curAddon = new addon($dir);
$install_url = url::backend('addons', ['subpage' => 'overview', 'addon' => $dir, 'action' => 'install']);
$active_url = url::backend('addons', ['subpage' => 'overview', 'addon' => $dir, 'action' => 'active']);
$delete_url = url::backend('addons', ['subpage' => 'overview', 'addon' => $dir, 'action' => 'delete']);
$help_url = url::backend('addons', ['subpage' => 'overview', 'addon' => $dir, 'action' => 'help']);
if ($curAddon->isInstall()) {
$install = '<a href="' . $install_url . '" class="btn btn-sm dyn-online">' . lang::get('addon_installed') . '</a>';
} else {
$install = '<a href="' . $install_url . '" class="btn btn-sm dyn-offline">' . lang::get('addon_not_installed') . '</a>';
}
示例6: ListLang
/**
* Gibt alle Sprachen als ARRAY aus, wobei immer KURZ:lang als Array generiert wird
*
*/
public static function ListLang()
{
$lang = [];
$handle = opendir(dir::backend('lib' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR));
while ($file = readdir($handle)) {
if (in_array($file, ['.', '..'])) {
continue;
}
$array = json_decode(file_get_contents(dir::backend('lib' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR) . '/' . $file . '/about.json'), true);
$lang[] = ['short' => $array['short'], 'readable' => $array['readable']];
}
return $lang;
}