本文整理汇总了PHP中cmsPage::displayLangJS方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsPage::displayLangJS方法的具体用法?PHP cmsPage::displayLangJS怎么用?PHP cmsPage::displayLangJS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmsPage
的用法示例。
在下文中一共展示了cmsPage::displayLangJS方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: applet_repairnested
function applet_repairnested()
{
$inCore = cmsCore::getInstance();
global $_LANG;
global $adminAccess;
if (!cmsUser::isAdminCan('admin/config', $adminAccess)) {
cpAccessDenied();
}
$tables = array(array('name' => 'cms_category', 'title' => $_LANG['AD_ARTICLES_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_category')), array('name' => 'cms_photo_albums', 'title' => $_LANG['AD_ALBUMS_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_photo_albums')), array('name' => 'cms_board_cats', 'title' => $_LANG['AD_DESK_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_board_cats')), array('name' => 'cms_uc_cats', 'title' => $_LANG['AD_CATALOG_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_uc_cats')), array('name' => 'cms_menu', 'title' => $_LANG['AD_MENU_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_menu')), array('name' => 'cms_forums', 'title' => $_LANG['AD_FORUMS_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_forums')));
if ($inCore->isComponentInstalled('maps')) {
$tables[] = array('name' => 'cms_map_cats', 'title' => $_LANG['AD_MAPS_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_map_cats'));
}
if ($inCore->isComponentInstalled('video')) {
$tables[] = array('name' => 'cms_video_category', 'title' => $_LANG['AD_VIDEO_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_video_category'));
}
if ($inCore->isComponentInstalled('shop')) {
$tables[] = array('name' => 'cms_shop_cats', 'title' => $_LANG['AD_SHOP_TREE'], 'differ' => '', 'error' => checkNestedSet('cms_shop_cats'));
}
if (cmsCore::inRequest('tables')) {
if (is_array($_POST['tables'])) {
foreach ($_POST['tables'] as $table_id) {
if (cmsCore::request('go_repair', 'int', 0)) {
repairNestedSet($tables[(int) $table_id]);
} else {
if (cmsCore::request('go_repair_tree', 'int', 0)) {
if (tree_all_ns($tables[(int) $table_id]['name']) !== false) {
cmsCore::addSessionMessage($tables[(int) $table_id]['title'] . ' ' . $_LANG['AD_RESTORED'], 'success');
}
}
}
}
}
}
cmsCore::c('page')->setTitle($_LANG['AD_CHECKING_TREES']);
cpAddPathway($_LANG['AD_SITE_SETTING'], 'index.php?view=config');
cpAddPathway($_LANG['AD_CHECKING_TREES'], 'index.php?view=repairnested');
cmsCore::c('page')->addHeadJS('admin/js/repair.js');
$errors_found = false;
cmsCore::c('page')->initTemplate('applets', 'repairnested')->display();
cmsPage::displayLangJS(array('AD_REPAIR_CONFIRM', 'AD_REPAIR_TOTREE_CONFIRM'));
}
示例2: applet_repairnested
function applet_repairnested()
{
$inCore = cmsCore::getInstance();
global $_LANG;
global $adminAccess;
if (!cmsUser::isAdminCan('admin/config', $adminAccess)) {
cpAccessDenied();
}
$tables = array();
$tables[0]['name'] = 'cms_category';
$tables[0]['title'] = $_LANG['AD_ARTICLES_TREE'];
$tables[0]['differ'] = '';
$tables[1]['name'] = 'cms_photo_albums';
$tables[1]['title'] = $_LANG['AD_ALBUMS_TREE'];
$tables[1]['differ'] = '';
$tables[3]['name'] = 'cms_board_cats';
$tables[3]['title'] = $_LANG['AD_DESK_TREE'];
$tables[3]['differ'] = '';
$tables[4]['name'] = 'cms_uc_cats';
$tables[4]['title'] = $_LANG['AD_CATALOG_TREE'];
$tables[4]['differ'] = '';
$tables[5]['name'] = 'cms_menu';
$tables[5]['title'] = $_LANG['AD_MENU_TREE'];
$tables[5]['differ'] = '';
$tables[6]['name'] = 'cms_forums';
$tables[6]['title'] = $_LANG['AD_FORUMS_TREE'];
$tables[6]['differ'] = '';
if ($inCore->isComponentInstalled('maps')) {
$tables[7]['name'] = 'cms_map_cats';
$tables[7]['title'] = $_LANG['AD_MAPS_TREE'];
$tables[7]['differ'] = '';
}
if ($inCore->isComponentInstalled('video')) {
$tables[8]['name'] = 'cms_video_category';
$tables[8]['title'] = $_LANG['AD_VIDEO_TREE'];
$tables[8]['differ'] = '';
}
if ($inCore->isComponentInstalled('shop')) {
$tables[9]['name'] = 'cms_shop_cats';
$tables[9]['title'] = $_LANG['AD_SHOP_TREE'];
$tables[9]['differ'] = '';
}
if (cmsCore::inRequest('tables')) {
if (is_array($_POST['tables'])) {
foreach ($_POST['tables'] as $table_id) {
if (cmsCore::request('go_repair', 'int', 0)) {
repairNestedSet($tables[(int) $table_id]);
} else {
if (cmsCore::request('go_repair_tree', 'int', 0)) {
if (tree_all_ns($tables[(int) $table_id]['name']) !== false) {
cmsCore::addSessionMessage($tables[(int) $table_id]['title'] . ' ' . $_LANG['AD_RESTORED'], 'success');
}
}
}
}
}
}
$GLOBALS['cp_page_title'] = $_LANG['AD_CHECKING_TREES'];
cpAddPathway($_LANG['AD_SITE_SETTING'], 'index.php?view=config');
cpAddPathway($_LANG['AD_CHECKING_TREES'], 'index.php?view=repairnested');
$GLOBALS['cp_page_head'][] = '<script type="text/javascript" src="/admin/js/repair.js"></script>';
$errors_found = false;
echo '<h3>' . $_LANG['AD_TREE_FULL'] . '</h3>';
echo '<div style="margin:20px; margin-top:0px;">';
echo '<form method="post" action="" id="repairform">';
echo '<input id="go_repair" type="hidden" name="go_repair" value="0">';
echo '<input id="go_repair_tree" type="hidden" name="go_repair_tree" value="0">';
echo '<table cellpadding="2">';
foreach ($tables as $id => $table) {
$errors = checkNestedSet($table);
echo '<tr>';
echo '<td width="15">' . ($errors ? '<input type="checkbox" name="tables[]" value="' . $id . '" checked="checked"/>' : '') . '</td>';
echo '<td><div>';
echo '<span>' . $table['title'] . '</span> — ' . ($errors ? '<span style="color:red">' . $_LANG['AD_ERROR_FOUND'] . '</span>' : '<span style="color:green">' . $_LANG['AD_NO_ERROR_FOUND'] . '</span>');
echo '</div></td>';
echo '</tr>';
if ($errors) {
$errors_found = true;
}
}
echo '</table>';
echo '</div>';
if ($errors_found) {
echo '<div style="margin-bottom:20px">';
echo '<input type="button" onclick="repairTreesRoot()" value="' . $_LANG['AD_REPAIR'] . '"> ';
echo '<input type="button" onclick="repairTrees()" value="' . $_LANG['AD_REPAIR_TOTREE'] . '">';
echo '</div>';
}
cmsPage::displayLangJS(array('AD_REPAIR_CONFIRM', 'AD_REPAIR_TOTREE_CONFIRM'));
}
示例3:
<strong><?php
echo $_LANG['UPLOAD_IMG'];
?>
:</strong> <span id="fileInputContainer"><input type="file" id="attach_img" name="attach_img"/></span>
<input type="button" name="goinsert" value="<?php
echo $_LANG['INSERT'];
?>
" onclick="loadImage('<?php
echo $field_id;
?>
', '<?php
echo $component;
?>
', '<?php
echo $target;
?>
', '<?php
echo $target_id;
?>
')" />
</div>
<span class="ajax-loader" style="display:none"> </span>
<?php
}
?>
<?php
}
cmsPage::displayLangJS(array('ERROR', 'BB_URL', 'BB_URL_TITLE', 'BB_IMG_URL', 'BB_MP3_LINK', 'BB_VIDEO_CODE', 'BB_IMG_ADDED', 'BB_Q_TEXT', 'BB_Q_AUTHOR', 'BB_CUT_TITLE', 'BB_CUT_DEMO'));