index_body.php
来自「这是matlab的一个小程序」· PHP 代码 · 共 41 行
PHP
41 行
<?php
require(dirname(__FILE__).'/config.php');
require(DEDEINC.'/image.func.php');
require(DEDEINC.'/dedetag.class.php');
$defaultIcoFile = DEDEROOT.'/data/admin/quickmenu.txt';
$myIcoFile = DEDEROOT.'/data/admin/quickmenu-'.$cuserLogin->getUserID().'.txt';
if(!file_exists($myIcoFile)) {
$myIcoFile = $defaultIcoFile;
}
if(empty($dopost)) {
$dopost = '';
}
/*------------
澧炲姞鏂伴」
function _AddNew() { }
-------------*/
if($dopost=='addnew')
{
if(empty($link) || empty($title))
{
ShowMsg("閾炬帴缃戝潃鎴栨爣棰樹笉鑳戒负绌猴紒","-1");
exit();
}
$fp = fopen($myIcoFile,'r');
$oldct = trim(fread($fp,filesize($myIcoFile)));
fclose($fp);
$link = ereg_replace("['\"]",'`',$link);
$title = ereg_replace("['\"]",'`',$title);
$ico = ereg_replace("['\"]",'`',$ico);
$oldct .= "\r\n<menu:item ico=\"{$ico}\" link=\"{$link}\" title=\"{$title}\" />";
$myIcoFileTrue = DEDEROOT.'/data/admin/quickmenu-'.$cuserLogin->getUserID().'.txt';
$fp = fopen($myIcoFileTrue,'w');
fwrite($fp,$oldct);
fclose($fp);
ShowMsg("鎴愬姛澧炲姞涓
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?