📄 search.php
字号:
break;
}
case 'deplacer_suite':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
$destination = ((''.$racine).'/');
if (($dest != ''))
{
($destination .= ((''.$dest).'/'));
}
($destination .= basename ($fic));
if ((file_exists ((((''.$racine).'/').$fic)) AND ((((''.$racine).'/').$fic) != $destination)))
{
copy ((((''.$racine).'/').$fic), $destination);
}
if (((((''.$racine).'/').$fic) != $destination))
{
if (file_exists ((((''.$racine).'/').$fic)))
{
unlink ((((''.$racine).'/').$fic));
}
}
header (((((((((((''.'Location:netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&ordre=').$ordre).'&sens=').$sens).'&id=').$id));
exit ();
break;
}
case 'supprimer':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
include $hautpage;
echo '<div align=center class=big1>
';
if (is_dir ((((''.$racine).'/').$fic)))
{
$mime = $mess[45];
}
else
{
$mime = $mess[46];
}
echo ((((((''.$mess['47']).' <br><br>').$mime).' <b>').$fic).'</b> ?');
echo '<br><br>';
echo (((((((((((((((''.'<a href="netdisk.php?DISK_ID=').$DISK_ID).'&action=supprimer_suite&rep=').$rep).'&fic=').$fic).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens).'"><span class=Big1>').$mess['48']).'</span></a>
');
echo (((((((((((((''.'<a href="netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens).'"><span class=Big1>').$mess['49']).'</span></a>
');
echo '<br>';
echo '</div>
';
break;
}
case 'supprimer_suite':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
$messtmp = '';
$a_effacer = (((''.$racine).'/').$fic);
if (file_exists ($a_effacer))
{
if (is_dir ($a_effacer))
{
deldir ($a_effacer);
($messtmp .= ((((((''.$mess['38']).' <b>').$fic).'</b> ').$mess['44']).'.'));
}
else
{
unlink ($a_effacer);
($messtmp .= ((((((''.$mess['34']).' <b>').$fic).'</b> ').$mess['44']).'.'));
}
}
else
{
($messtmp .= $mess[76]);
}
($messtmp .= (((((((((((((''.'<br><br><a href="netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens).'"><span class=Big1>').$mess['32']).'</span></a>'));
($messtmp .= '');
header (((((((((((''.'Location:netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens));
exit ();
break;
}
case 'rename':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
include $hautpage;
echo '<div align=center class=big1>
';
$nom_fic = basename ($fic);
echo '';
echo '<form action="netdisk.php" method="post">
';
echo (((''.'<input type="hidden" name="DISK_ID" value="').$DISK_ID).'">
');
echo '<input type="hidden" name="action" value="rename_suite">
';
echo (((''.'<input type="hidden" name="rep" value="').$rep).'">
');
echo (((''.'<input type="hidden" name="fic" value="').$fic).'">
');
echo (((''.'<input type="hidden" name="id" value="').$id).'">
');
echo (((''.'<input type="hidden" name="ordre" value="').$ordre).'">
');
echo (((''.'<input type="hidden" name="sens" value="').$sens).'">
');
echo ((((((''.$mess['6']).' <b>').$nom_fic).'</b> ').$mess['42']).' ');
echo (((''.'<input type="text" class=BigInput name="fic_new" value="').$nom_fic).'">
');
echo (((''.'<input type="submit" class=BigButton value="').$mess['6']).'">
');
echo '</form>';
echo (((((((((((((''.'<a href="netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens).'"><span class=Big1>').$mess['32']).'</span></a>');
echo '<br>';
echo '</div>
';
break;
}
case 'rename_suite':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
$err = '';
$nom_fic = basename ($fic);
$messtmp = '';
$fic_new = traite_nom_fichier ($fic_new);
$old = (((''.$racine).'/').$fic);
$new = ((dirname ($old).'/').$fic_new);
if (($fic_new == ''))
{
($messtmp .= (''.$mess['37']));
$err = 1;
}
else
{
if (file_exists ($new))
{
($messtmp .= ((((''.'<b>').$fic_new).'</b> ').$mess['43']));
$err = 1;
}
else
{
if (file_exists ($old))
{
rename ($old, $new);
}
($messtmp .= (((((((''.'<b>').$fic).'</b> ').$mess['41']).' <b>').$fic_new).'</b>'));
}
}
($messtmp .= (((((((((((((''.'<br><br><a href="netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens).'"><span class=Big1>').$mess['32']).'</span></a>'));
($messtmp .= '');
if (($err == ''))
{
header (((((((((((''.'Location:netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&ordre=').$ordre).'&sens=').$sens).'&id=').$id));
exit ();
}
include $hautpage;
echo '<div align=center class=big1>
';
echo (''.$messtmp);
echo '</div>
';
break;
}
case 'mkdir':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
$err = '';
$messtmp = '';
$nomdir = traite_nom_fichier ($nomdir);
if (($nomdir == ''))
{
($messtmp .= (''.$mess['37']));
$err = 1;
}
else
{
if (file_exists ((((((''.$racine).'/').$rep).'/').$nomdir)))
{
($messtmp .= (''.$mess['40']));
$err = 1;
}
else
{
mkdir ((((((''.$racine).'/').$rep).'/').$nomdir), 509);
($messtmp .= ((((((''.$mess['38']).' <b>').$nomdir).'</b> ').$mess['39']).' <b>'));
if (($rep == ''))
{
($messtmp .= '/');
}
else
{
($messtmp .= (''.$rep));
}
($messtmp .= '</b>');
}
}
($messtmp .= (((((((((((((''.'<br><br><a href="netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens).'"><span class=Big1>').$mess['32']).'</span></a>'));
($messtmp .= '');
if (($err == ''))
{
header (((((((((((''.'Location:netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens));
exit ();
}
include $hautpage;
echo '<div align=center class=big1>
';
echo (''.$messtmp);
echo '</div>
';
break;
}
case 'creer_fichier':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
$err = '';
$messtmp = '';
$nomfic = traite_nom_fichier ($nomfic);
if (($nomfic == ''))
{
($messtmp .= (''.$mess['37']));
$err = 1;
}
else
{
if (file_exists ((((((''.$racine).'/').$rep).'/').$nomfic)))
{
($messtmp .= (''.$mess['71']));
$err = 1;
}
else
{
$fp = fopen ((((((''.$racine).'/').$rep).'/').$nomfic), 'w');
if ((eregi ((''.'\\.html$'), $nomfic) OR eregi ((''.'\\.htm$'), $nomfic)))
{
fputs ($fp, '<html>
<head>
<title>Document sans titre</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
');
}
fclose ($fp);
($messtmp .= ((((((''.$mess['34']).' <b>').$nomfic).'</b> ').$mess['39']).' <b>'));
if (($rep == ''))
{
($messtmp .= '/');
}
else
{
($messtmp .= (''.$rep));
}
($messtmp .= '</b>');
}
}
($messtmp .= (((((((((((((''.'<br><br><a href="netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens).'"><span class=Big1>').$mess['32']).'</span></a>'));
($messtmp .= '');
if (($err == ''))
{
header (((((((((((''.'Location:netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens));
exit ();
}
include $hautpage;
echo '<div align=center class=big1>
';
echo (''.$messtmp);
echo '</div>
';
break;
}
case 'upload':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
$messtmp = '';
if (($rep != ''))
{
$rep_source = ((''.'/').$rep);
}
$destination = ($racine.$rep_source);
if (($userfile_size != 0))
{
$taille_ko = ($userfile_size / 1024);
}
else
{
$taille_ko = 0;
}
if (($userfile == 'none'))
{
$message = $mess[31];
}
if ((($userfile != 'none') AND ($userfile_size != 0)))
{
if (!copy ($userfile, (((''.$destination).'/').$userfile_name)))
{
$message = ((((''.'<br>').$mess['33']).'<br>').$userfile_name);
}
else
{
if (is_editable ($userfile_name))
{
enlever_controlm ((((''.$destination).'/').$userfile_name));
}
$message = ((((((((''.$mess['34']).' <b>').$userfile_name).'</b> ').$mess['35']).' <b>').$rep).'</b>');
}
}
($messtmp .= ((''.$message).'<br>'));
($messtmp .= (((((((((((((''.'<br><br><a href="netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&id=').$id).'&ordre=').$ordre).'&sens=').$sens).'"><span class=Big1>').$mess['32']).'</span></a>'));
($messtmp .= '');
header (((((((((((''.'Location:netdisk.php?DISK_ID=').$DISK_ID).'&rep=').$rep).'&ordre=').$ordre).'&sens=').$sens).'&id=').$id));
exit ();
break;
}
case 'deconnexion':
{
if (!connecte ($id))
{
header ('Location:netdisk.php');
exit ();
}
if (file_exists ((((''.'logs/').$id).'.php')))
{
unlink ((((''.'logs/').$id).'.php'));
}
$now = time ();
$eff = ($now - 86400);
$handle = opendir ('logs');
while ($fichier = readdir ($handle))
{
if ((($fichier != '.') AND ($fichier != '..')))
{
$tmp = filemtime (((''.'logs/').$fichier));
if (($tmp < $eff))
{
unlink (((''.'logs/').$fichier));
continue;
}
continue;
}
}
closedir ($handle);
header ('Location:netdisk.php');
break;
}
default:
{
echo '
<html>
<head>
<title>全文检索结果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/theme/';
echo $LOGIN_THEME;
echo '/style.css">
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="95%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/netdisk.gif" WIDTH="22" HEIGHT="20" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 全文检索结果</span>
</td>
</tr>
</table>
';
$pagestarttime = microtime ();
lister_rep ($nom_rep);
if (empty ($page))
{
$page = 1;
}
$maxresult = ($page * 20);
$resultcount = $LINE_COUNT;
if ((($resultcount % 20) == 0))
{
$maxpageno = ($resultcount / 20);
}
else
{
$maxpageno = (floor (($resultcount / 20)) + 1);
}
if (($maxpageno < $page))
{
$page = $maxpageno;
$pagemax = ($resultcount - 1);
$pagemin = max (0, ($result_count - 20));
}
else
{
if (($page == 1))
{
$pagemin = 0;
$pagemax = min (($result_count - 1), 19);
}
else
{
$pagemin = min (($resultcount - 1), (20 * ($page - 1)));
$pagemax = min (($resultcount - 1), (($pagemin + 20) - 1));
}
}
$maxresult = min ($maxresult, $resultcount);
for ($i = (max (0, ($maxresult - 20)) + 1); ($i <= $maxresult); ++$i)
{
echo $RESULT_ARRAY[$i];
}
echo '</table>';
echo '<p align="center" class="small1">';
echo (((''.' 已经搜索到了 ').$resultcount).' 条信息');
$nextpage = ($page + 1);
$previouspage = ($page - 1);
echo (((((((((((((''.' --- [ <a href=\'search.php?key=').$key).'&page=').$nextpage).'&DISK_ID=').$DISK_ID).'&REP=').$REP).'&SEARCH_DOC=').$SEARCH_DOC).'&ATTACHMENT_NAME=').urlencode ($ATTACHMENT_NAME)).'\' target=\'_self\'>搜索下 20 个结果</a> ]');
echo (((((((((((((''.' [ <a href=\'search.php?key=').$key).'&page=').$previouspage).'&DISK_ID=').$DISK_ID).'&REP=').$REP).'&SEARCH_DOC=').$SEARCH_DOC).'&ATTACHMENT_NAME=').urlencode ($ATTACHMENT_NAME)).'\' target=\'_self\'>返回上 20 个结果</a> ]');
$pageendtime = microtime ();
$starttime = explode (' ', $pagestarttime);
$endtime = explode (' ', $pageendtime);
$beforetime = abs (((($endtime[1] - $starttime[1]) + $endtime[0]) - $starttime[0]));
echo (('<br>提示:本次搜索耗时: '.$beforetime).' 秒');
echo '<br><br>
<div align="center">
<input type="button" value="返回" class="BigButton" onclick="location=\'query.php?DISK_ID=';
echo $DISK_ID;
echo '&rep=';
echo $REP;
echo '\'">
</div>
';
break;
}
}
echo '
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -