Discuz.Web/admin/global/global_ftpsetting.aspx.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Discuz.Config;
using Discuz.Common;
using Discuz.Forum;
namespace Discuz.Web.Admin
{
public partial class ftpsetting : AdminPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string ftpType = GetParam(DNTRequest.GetString("ftptype"));
FTPConfigInfoCollection ftpconfiginfocollection =
(FTPConfigInfoCollection)SerializationHelper.Load(typeof(FTPConfigInfoCollection), Server.MapPath("../../config/ftp.config"));
Allowupload.Items[0].Attributes.Add("onclick", "ShowFtpLayout(true)");
Allowupload.Items[1].Attributes.Add("onclick", "ShowFtpLayout(false)");
foreach (FTPConfigInfo fci in ftpconfiginfocollection)
{
if (fci.Name == ftpType) //绑定论坛FTP设置
{
Serveraddress.Text = fci.Serveraddress;
Serverport.Text = fci.Serverport.ToString();
Username.Text = fci.Username;
Password.Text = fci.Password;
hiddpassword.Value = fci.Password;
Mode.SelectedValue = fci.Mode.ToString();
Uploadpath.Text = fci.Uploadpath;
Timeout.Text = fci.Timeout.ToString();
Allowupload.SelectedValue = fci.Allowupload.ToString();
Remoteurl.Text = fci.Remoteurl;
Reservelocalattach.SelectedValue = fci.Reservelocalattach.ToString();
Reserveremoteattach.SelectedValue = fci.Reserveremoteattach.ToString();
if (fci.Allowupload == 0)
{
FtpLayout.Attributes.Add("style", "display:none");
}
else
{
FtpLayout.Attributes.Add("style", "display:block");
}
}
}
if (Serveraddress.Text != "") //如果设置完全则返回
return;
FtpLayout.Attributes.Add("style", "display:none");
foreach (FTPConfigInfo fci in ftpconfiginfocollection)
{
if (fci.Serveraddress != "")
{
后面还有 103 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
