温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:风讯dotNETCMSv1.0免安装版源码
当前文件:
FooSunCMS/Foosun.CMS/Recyle.cs[14K,2009-6-12 11:42:42],打开代码结构图
FooSunCMS/Foosun.CMS/Recyle.cs[14K,2009-6-12 11:42:42],打开代码结构图1//=========================================================== 2
//== (c)2007 Foosun Inc. by dotNETCMS 1.0 == 3
//== Forum:bbs.foosun.net == 4
//== website:www.foosun.net == 5
//== Address:NO.109 HuiMin ST.,Chengdu ,China == 6
//== TEL:86-28-85098980/66026180 == 7
//== qq:655071,MSN:ikoolls@gmail.com == 8
//== Code By Xi.Deng == 9
//=========================================================== 10
using System; 11
using System.Collections.Generic; 12
using System.Data; 13
using Foosun.DALFactory; 14
15
namespace Foosun.CMS 16
{ 17
public class Recyle 18
{ 19
private IRecyle rc; 20
private string str_dirDumm = Foosun.Config.UIConfig.dirDumm; 21
private string str_dirSite = Foosun.Config.UIConfig.dirSite; 22
private string str_rootpath = Foosun.Common.ServerInfo.GetRootPath(); 23
public Recyle() 24
{ 25
rc = DataAccess.CreateRecyle(); 26
if (str_dirDumm != "" && str_dirDumm != null && str_dirDumm != string.Empty) 27
str_dirDumm = "\\" + str_dirDumm; 28
} 29
public DataTable getList(string type) 30
{ 31
DataTable dt = rc.getList(type); 32
return dt; 33
} 34
public void RallNCList() 35
{ 36
rc.RallNCList(); 37
} 38
public void RallNList(string classid) 39
{ 40
rc.RallNList(classid); 41
} 42
public void RallCList() 43
{ 44
rc.RallCList(); 45
} 46
public void RallSList() 47
{ 48
rc.RallSList(); 49
} 50
public void RallLCList() 51
{ 52
rc.RallLCList(); 53
} 54
public void RallLList(string classid) 55
{ 56
rc.RallLList(classid); 57
} 58
public void RallStCList() 59
{ 60
rc.RallStCList(); 61
} 62
public void RallStList(string classid) 63
{ 64
rc.RallStList(classid); 65
} 66
public void RallPSFList() 67
{ 68
rc.RallPSFList(); 69
} 70
//--------------------------------------------------------------------------------------------------------------------------------------- 71
//--------------------------------------------------------------------------------------------------------------------------------------- 72
public void DallNCList() 73
{ 74
DataTable dt = rc.getNewsTable(); 75
if (dt != null) 76
{ 77
for (int i = 0; i < dt.Rows.Count; i++) 78
{ 79
string tbname = dt.Rows[i][0].ToString(); 80
DataTable dv = rc.getNewsClass(null); 81
if (dv != null) 82
{ 83
for (int j = 0; j < dv.Rows.Count; j++) 84
{ 85
string classid = dv.Rows[j]["ClassID"].ToString(); 86
DataTable dc = rc.getNews(classid, tbname); 87
if (dc != null) 88
{ 89
for (int k = 0; k < dc.Rows.Count; k++) 90
{ 91
string newsid = dc.Rows[k]["NewsID"].ToString(); 92
string savepath = dc.Rows[k]["SavePath"].ToString(); 93
string filename = dc.Rows[k]["FileName"].ToString(); 94
string fileexname = dc.Rows[k]["FileEXName"].ToString(); 95
96
string filepath = str_rootpath + str_dirDumm + savepath + "\\" + filename + "." + fileexname; 97
98
Foosun.Common.Public.DelFile("", filepath); 99
rc.raDComment(newsid, true); 100
} 101
dc.Clear(); dc.Dispose(); 102
103
string dirpath = str_rootpath + str_dirDumm + dv.Rows[j]["SavePath"].ToString() + "\\" + dv.Rows[j]["SaveClassframe"].ToString(); 104
Foosun.Common.Public.DelFile(dirpath, ""); 105
} 106
} 107
dv.Clear(); dv.Dispose(); 108
} 109
} 110
dt.Clear(); dt.Dispose(); 111
} 112
rc.DallNCList(); 113
} 114
public void DallNList() 115
{ 116
DataTable dt = rc.getNewsTable(); 117
if (dt != null) 118
{ 119
for (int i = 0; i < dt.Rows.Count; i++) 120
{ 121
string tbname = dt.Rows[i][0].ToString(); 122
DataTable dc = rc.getNews("",tbname); 123
if (dc != null) 124
{ 125
for (int k = 0; k < dc.Rows.Count; k++) 126
{ 127
string newsid = dc.Rows[k]["NewsID"].ToString(); 128
string savepath = dc.Rows[k]["SavePath"].ToString(); 129
string filename = dc.Rows[k]["FileName"].ToString(); 130
string fileexname = dc.Rows[k]["FileEXName"].ToString(); 131
132
string filepath = str_rootpath + str_dirDumm + savepath + "\\" + filename + "." + fileexname; 133
134
Foosun.Common.Public.DelFile("", filepath); 135
rc.raDComment(newsid, true); 136
} 137
dc.Clear(); dc.Dispose(); 138
} 139
} 140
} 141
rc.DallNList(); 142
} 143
public void DallCList() 144
{ 145
DataTable dt = rc.getSite(null); 146
if (dt != null) 147
{ 148
for (int i = 0; i < dt.Rows.Count; i++) 149
{ 150
string siteid = dt.Rows[i]["ChannelID"].ToString(); 151
string siteename = dt.Rows[i]["EName"].ToString(); 152
string sitepath = str_rootpath + str_dirDumm + "\\" + str_dirSite + "\\" + siteename; 153
Foosun.Common.Public.DelFile(sitepath, ""); 154
} 155
dt.Clear();dt.Dispose(); 156
} 157
rc.DallCList(); 158
} 159
public void DallSList() 160
{ 161
DataTable dt = rc.getSpeaciList(null); 162
if (dt != null) 163
{ 164
for (int i = 0; i < dt.Rows.Count; i++) 165
{ 166
string savepath = dt.Rows[i]["SavePath"].ToString(); 167
string spename = dt.Rows[i]["specialEName"].ToString(); 168
string savedirpath = dt.Rows[i]["saveDirPath"].ToString(); 169
string filename = dt.Rows[i]["FileName"].ToString(); 170
string fileexname = dt.Rows[i]["FileEXName"].ToString(); 171
172
string FilePath = str_rootpath + str_dirDumm + savepath + "\\" + spename + "\\" + savedirpath + "\\" + filename + "." + fileexname; 173
string DirPath = str_rootpath + str_dirDumm + savepath + "\\" + spename + "\\" + savedirpath; 174
Foosun.Common.Public.DelFile(DirPath, FilePath); 175
} 176
dt.Clear();dt.Dispose(); 177
} 178
rc.DallSList(); 179
} 180
public void DallLCList() 181
{ 182
rc.DallLCList(); 183
} 184
public void DallLList() 185
{ 186
rc.DallLList(); 187
} 188
public void DallStCList() 189
{ 190
rc.DallStCList(); 191
} 192
public void DallStList() 193
{ 194
rc.DallStList(); 195
} 196
public void DallPSFList() 197
{ 198
rc.DallPSFList(); 199
} 200
//--------------------------------------------------------------------------------------------------------------------------------------- 201
//--------------------------------------------------------------------------------------------------------------------------------------- 202
public void PRNCList(string idstr) 203
{ 204
rc.PRNCList(idstr); 205
} 206
public void PRNList(string classid, string idstr) 207
{ 208
rc.PRNList(classid,idstr); 209
} 210
public void PRCList(string idstr) 211
{ 212
rc.PRCList(idstr); 213
} 214
public void PRSList(string idstr) 215
{ 216
rc.PRSList(idstr); 217
} 218
public void PRStCList(string idstr) 219
{ 220
rc.PRStCList(idstr); 221
} 222
public void PRStList(string classid, string idstr) 223
{ 224
rc.PRStList(classid,idstr); 225
} 226
public void PRLCList(string idstr) 227
{ 228
rc.PRLCList(idstr); 229
} 230
public void PRLList(string classid, string idstr) 231
{ 232
rc.PRLList(classid,idstr); 233
} 234
public void PRPSFList(string idstr) 235
{ 236
rc.PRPSFList(idstr); 237
} 238
//--------------------------------------------------------------------------------------------------------------------------------------- 239
//--------------------------------------------------------------------------------------------------------------------------------------- 240
public void PDNCList(string idstr) 241
{ 242
DataTable dc = rc.getNewsClass(idstr); 243
if (dc != null) 244
{ 245
for (int i = 0; i < dc.Rows.Count; i++) 246
{ 247
string classid = dc.Rows[i]["ClassID"].ToString(); 248
DataTable dt = rc.getNewsTable(); 249
if (dt != null) 250
{ 251
for (int j = 0; j < dt.Rows.Count; j++) 252
{ 253
string tbname = dt.Rows[j][0].ToString(); 254
DataTable dv = rc.getNews(classid, tbname); 255
if (dv != null) 256
{ 257
for (int k = 0; k < dv.Rows.Count; k++) 258
{ 259
string newsid = dv.Rows[k]["NewsID"].ToString(); 260
string filepath = str_rootpath + str_dirDumm + dv.Rows[k]["SavePath"].ToString() + "\\" + dv.Rows[k]["FileName"].ToString() + "." + dv.Rows[k]["FileEXName"].ToString(); 261
262
Foosun.Common.Public.DelFile("", filepath); 263
rc.raDComment(newsid, true); 264
} 265
dv.Clear(); dv.Dispose(); 266
} 267
} 268
dt.Clear(); dt.Dispose(); 269
} 270
string dirPath = str_rootpath + str_dirDumm + dc.Rows[0]["SavePath"].ToString() + "\\" + dc.Rows[0]["SaveClassframe"].ToString(); 271
Foosun.Common.Public.DelFile(dirPath, ""); 272
} 273
dc.Clear(); dc.Dispose(); 274
} 275
rc.PDNCList(idstr); 276
} 277
public void PDNList(string idstr) 278
{ 279
DataTable dt = rc.getNewsTable(); 280
if (dt != null) 281
{ 282
for (int i = 0; i < dt.Rows.Count; i++) 283
{ 284
string tbname = dt.Rows[i][0].ToString(); 285
DataTable dv = rc.getNews(null, tbname); 286
if (dv != null) 287
{ 288
for (int k = 0; k < dv.Rows.Count; k++) 289
{ 290
string newsid = dv.Rows[k]["NewsID"].ToString(); 291
string savepath = dv.Rows[k]["SavePath"].ToString(); 292
string filename = dv.Rows[k]["FileName"].ToString(); 293
string fileexname = dv.Rows[k]["FileEXName"].ToString(); 294
295
string filepath = str_rootpath + str_dirDumm + savepath + "\\" + filename + "." + fileexname; 296
297
Foosun.Common.Public.DelFile("", filepath); 298
rc.raDComment(newsid, true); 299
} 300
dv.Clear(); dv.Dispose(); 301
} 302
} 303
dt.Clear(); dt.Dispose(); 304
} 305
rc.PDNList(idstr); 306
} 307
public void PDCList(string idstr) 308
{ 309
DataTable dt = rc.getSite(idstr); 310
if (dt != null) 311
{ 312
for (int i = 0; i < dt.Rows.Count; i++) 313
{ 314
string siteid = dt.Rows[i]["ChannelID"].ToString(); 315
string siteename = dt.Rows[i]["EName"].ToString(); 316
string sitepath = str_rootpath + str_dirDumm + "\\" + str_dirSite + "\\" + siteename; 317
Foosun.Common.Public.DelFile(sitepath, ""); 318
} 319
dt.Clear(); dt.Dispose(); 320
} 321
rc.PDCList(idstr); 322
} 323
public void PDSList(string idstr) 324
{ 325
DataTable dt = rc.getSpeaciList(idstr); 326
if (dt != null) 327
{ 328
for (int i = 0; i < dt.Rows.Count; i++) 329
{ 330
string savepath = dt.Rows[i]["SavePath"].ToString(); 331
string specialEName = dt.Rows[i]["specialEName"].ToString(); 332
string saveDirPath = dt.Rows[i]["saveDirPath"].ToString(); 333
string filename = dt.Rows[i]["FileName"].ToString(); 334
string fileexname = dt.Rows[i]["FileEXName"].ToString(); 335
336
string FilePath = str_rootpath + str_dirDumm + savepath + "\\" + specialEName + "\\" + saveDirPath + "\\" + filename + "." + fileexname; 337
string DirPath = str_rootpath + str_dirDumm + savepath + "\\" + specialEName + "\\" + saveDirPath; 338
Foosun.Common.Public.DelFile(DirPath, FilePath); 339
} 340
dt.Clear(); 341
dt.Dispose(); 342
} 343
rc.PDSList(idstr); 344
} 345
public void PDStCList(string idstr) 346
{ 347
rc.PDStCList(idstr); 348
} 349
public void PDStList(string idstr) 350
{ 351
rc.PDStList(idstr); 352
} 353
public void PDLCList(string idstr) 354
{ 355
rc.PDLCList(idstr); 356
} 357
public void PDLList(string idstr) 358
{ 359
rc.PDLList(idstr); 360
} 361
public void PDPSFList(string idstr) 362
{ 363
rc.PDPSFList(idstr); 364
} 365
} 366
} 367






}
}