本文整理汇总了PHP中updatemenu函数的典型用法代码示例。如果您正苦于以下问题:PHP updatemenu函数的具体用法?PHP updatemenu怎么用?PHP updatemenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updatemenu函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: foreach
} else {
if ($ids = dimplode($_GET['delete'])) {
C::t('common_admincp_cmenu')->delete($_GET['delete'], $_G['uid']);
}
if (is_array($_GET['titlenew'])) {
foreach ($_GET['titlenew'] as $id => $title) {
$_GET['urlnew'][$id] = rawurlencode($_GET['urlnew'][$id]);
$title = dhtmlspecialchars($_GET['langnew'][$id] && cplang($_GET['langnew'][$id], false) ? $_GET['langnew'][$id] : $title);
$ordernew = intval($_GET['displayordernew'][$id]);
C::t('common_admincp_cmenu')->update($id, array('title' => $title, 'displayorder' => $ordernew, 'url' => dhtmlspecialchars($_GET['urlnew'][$id])));
}
}
if (is_array($_GET['newtitle'])) {
foreach ($_GET['newtitle'] as $k => $v) {
$_GET['urlnew'][$k] = rawurlencode($_GET['urlnew'][$k]);
C::t('common_admincp_cmenu')->insert(array('title' => dhtmlspecialchars($v), 'displayorder' => intval($_GET['newdisplayorder'][$k]), 'url' => dhtmlspecialchars($_GET['newurl'][$k]), 'sort' => 1, 'uid' => $_G['uid']));
}
}
updatemenu('index');
cpmsg('custommenu_edit_succeed', 'action=misc&operation=custommenu', 'succeed');
}
} elseif ($do == 'add') {
if ($_GET['title'] && $_GET['url']) {
admincustom($_GET['title'], dhtmlspecialchars($_GET['url']), 1);
updatemenu('index');
cpmsg('custommenu_add_succeed', rawurldecode($_GET['url']), 'succeed', array('title' => cplang($_GET['title'])));
} else {
cpmsg('parameters_error', '', 'error');
}
}
}
开发者ID:samyex6,项目名称:discuz3.2-lite,代码行数:31,代码来源:admincp_misc.php
示例2: getgpc
$settingnew = getgpc('settingnew');
$enabled = false;
foreach ($settingnew['verify'] as $key => $value) {
if ($value['available'] && !$value['title']) {
cpmsg('members_verify_title_invalid', '', 'error');
}
if ($value['available']) {
$enabled = true;
}
$_G['setting']['verify'][$key]['available'] = intval($value['available']);
$_G['setting']['verify'][$key]['title'] = $value['title'];
}
$_G['setting']['verify']['enabled'] = $enabled;
C::t('common_setting')->update('verify', $_G['setting']['verify']);
updatecache(array('setting'));
updatemenu('user');
cpmsg('members_verify_update_succeed', 'action=verify', 'succeed');
}
}
function getverifyicon($iconkey = 'iconnew', $vid = 1, $extstr = 'verify_icon')
{
global $_G, $_FILES;
if ($_FILES[$iconkey]) {
$data = array('extid' => "{$vid}");
$iconnew = upload_icon_banner($data, $_FILES[$iconkey], $extstr);
} else {
$iconnew = $_GET['' . $iconkey];
}
return $iconnew;
}
function delverifyicon($icon)
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:admincp_verify.php
示例3: cpmsg
}
cpmsg('plugins_delete_confirm', 'action=plugins&operation=delete&pluginid=' . $pluginid . '&confirmed=yes', 'form', array('pluginname' => $plugin['name'], 'toversion' => $plugin['version']));
} else {
$identifier = $plugin['identifier'];
DB::query("DELETE FROM " . DB::table('common_plugin') . " WHERE pluginid={$pluginid}");
DB::query("DELETE FROM " . DB::table('common_pluginvar') . " WHERE pluginid={$pluginid}");
DB::delete('common_nav', "type='3' AND identifier='{$identifier}'");
foreach (array('script', 'template') as $type) {
loadcache('pluginlanguage_' . $type, 1);
if (isset($_G['cache']['pluginlanguage_' . $type][$identifier])) {
unset($_G['cache']['pluginlanguage_' . $type][$identifier]);
save_syscache('pluginlanguage_' . $type, $_G['cache']['pluginlanguage_' . $type]);
}
}
updatecache(array('plugin', 'setting', 'styles'));
updatemenu('plugin');
if ($dir) {
$file = DISCUZ_ROOT . './source/plugin/' . $dir . '/discuz_plugin_' . $dir . ($modules['extra']['installtype'] ? '_' . $modules['extra']['installtype'] : '') . '.xml';
if (file_exists($file)) {
$importtxt = @implode('', file($file));
$pluginarray = getimportdata('Discuz! Plugin');
if (!empty($pluginarray['uninstallfile']) && preg_match('/^[\\w\\.]+$/', $pluginarray['uninstallfile'])) {
dheader('location: ' . ADMINSCRIPT . '?action=plugins&operation=pluginuninstall&dir=' . $dir . '&installtype=' . $modules['extra']['installtype']);
}
}
}
loadcache('pluginlanguage_install', 1);
if (isset($_G['cache']['pluginlanguage_install'][$identifier])) {
unset($_G['cache']['pluginlanguage_install'][$identifier]);
save_syscache('pluginlanguage_install', $_G['cache']['pluginlanguage_install']);
}
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_plugins.php
示例4: showsubmenu
}
$filename = DISCUZ_ROOT . './source/plugin/' . $dir . '/' . $pluginarray['checkfile'];
if (file_exists($filename)) {
@(include $filename);
}
}
showsubmenu($lang['plugins_config_uninstall'] . ' - ' . $plugin['name'] . ($plugin['available'] ? cplang('plugins_edit_available') : ''));
echo '<div class="infobox">' . $addonstr . ($upgradestr ? '<h4 class="infotitle2">' . $lang['plugins_config_upgrade'] . '</h4>' . $upgradestr . '<br /><br />' : '') . ($deletestr ? '<h4 class="infotitle2">' . $lang['plugins_config_delete'] . '</h4>' . $deletestr . '<br /><br />' : '') . '<input class="btn" onclick="location.href=\'' . ADMINSCRIPT . '?action=plugins\'" type="button" value="' . $lang['cancel'] . '"/>
</div>';
} else {
$identifier = $plugin['identifier'];
DB::query("DELETE FROM " . DB::table('common_plugin') . " WHERE pluginid={$pluginid}");
DB::query("DELETE FROM " . DB::table('common_pluginvar') . " WHERE pluginid={$pluginid}");
DB::delete('common_nav', "type='3' AND identifier='{$identifier}'");
updatecache(array('plugin', 'setting', 'styles'));
updatemenu();
if ($dir) {
$dir = substr($dir, 0, -1);
$pdir = DISCUZ_ROOT . './source/plugin/' . $dir;
if (file_exists($pdir)) {
$d = dir($pdir);
while ($f = $d->read()) {
if (preg_match('/^discuz\\_plugin_' . $dir . '(\\_\\w+)?\\.xml$/', $f, $a)) {
$installtype = substr($a[1], 1);
$file = $pdir . '/' . $f;
$importtxt = @implode('', file($file));
$pluginarray = getimportdata('Discuz! Plugin');
if (!empty($pluginarray['uninstallfile']) && preg_match('/^[\\w\\.]+$/', $pluginarray['uninstallfile'])) {
dheader('location: ' . ADMINSCRIPT . '?action=plugins&operation=pluginuninstall&dir=' . $dir . '&installtype=' . $installtype);
}
break;
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:admincp_plugins.php
注:本文中的updatemenu函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论