<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% 'On Error Resume Next FileRootFolder = "C:\Inetpub\vhosts\4edu.ca\httpdocs\archives\english\ChalkTalk\" RootFolder = "/archives/english/ChalkTalk" Function ShowFolderTree() Dim oTree, html Set oTree = Server.CreateObject("obout_ASPTreeview_2.Tree") ' Root node is optional. You can delete this line. ' oTree.AddRootNode "Chalk Talk", true, "xpMyComp.gif" 'FOR HELP--> http://www.obout.com/t2/propadd.aspx ' Populate Treeview. Set oTree = ShowFileList(oTree, "root", "") oTree.FolderIcons = "tree2/icons" oTree.FolderScript = "tree2/script" oTree.FolderStyle = "tree2/style/Classic" oTree.KeepLastExpanded = 5 oTree.Width = "200px" 'Write treeview to your page. Response.Write oTree.HTML() Set oTree = Nothing End Function Function ShowFileList(ByRef objTree, ByVal nodeID, ByVal folderspec) Dim fso, f, f1, fc, s Set fso = CreateObject("Scripting.FileSystemObject") ' Response.Write(folderspec) Set f = fso.GetFolder(FileRootFolder & folderspec) Set fc = f.Files Set ff = f.SubFolders CurFolder = RootFolder & Replace(folderspec , "\", "/") sortFF = FolderSort(ff) For i = 1 to UBound(sortFF) subNodeID = nodeID & "_" & i objTree.Add nodeID, subNodeID, sortFF(i), false Set objTree = ShowFileList(objTree, subNodeID, folderspec & "\" & sortFF(i)) Next sortFF = FilesSort(f) for i = 1 to UBound(sortFF) subNodeID = nodeID & "_" & i FileName = Replace(sortFF(i) , "-", " ") objTree.Add nodeID, subNodeID, "" & Mid(FileName, 1, instrRev(FileName, ".")-1) & "", , "page.gif" next Set ShowFileList = objTree End Function Function FolderSort(fold) fileCount = fold.count dim fNames() redim fNames(fileCount) cFcount = 0 for each file in fold cFcount = cFcount + 1 ' sept 24 09 ' fNames(cFcount) = lcase(file.name) fNames(cFcount) = file.name next for tName = 1 to fileCount for nName = (tName + 1) to fileCount ' sept 24 09 ' if strComp(fNames(tName),fNames(nName),0)=-1 then if strComp(fNames(tName),fNames(nName),0)=+ 1 then buffer = fNames(nName) fNames(nName) = fNames(tName) fNames(tName) = buffer end if next next FolderSort = fNames End Function Function FilesSort(fold) fileCount = fold.files.count dim fNames() redim fNames(fileCount) cFcount = 0 for each file in fold.files cFcount = cFcount + 1 fNames(cFcount) = lcase(file.name) next for tName = 1 to fileCount for nName = (tName + 1) to fileCount if strComp(fNames(tName),fNames(nName),0)=-1 then buffer = fNames(nName) fNames(nName) = fNames(tName) fNames(tName) = buffer end if next next FilesSort = fNames End Function %> Chalk Talk

Free eNewsletter.

 

 

Chalk Talk is an e-newsletter produced for Canadian educators by CoEd Communications Inc., available at no charge by subscription. Chalk Talk contains a treasure trove of timely articles, facts and figures, and features information on free, quality, curriculum-based teaching resources that teachers can use to create interesting and topical lesson plans on a variety of subjects from Canadian History, the Environment, Social Trends and Human Rights, to Literacy and Numeracy. Current and past issues of Chalk Talk are posted to this site.

Chalk Talk

(area for archives html)

CoEd Communications Inc. is a not-for-profit educational communications company, specializing in the production and promotion of free, quality, curriculum-based educational resource material for the Canadian school system. CoEd works in conjunction with Departments/Ministries of Education, school districts/boards, associations, teachers and subject specialists across the country.

| Privacy

It's all about education.

CoEd Communications

66 George Street, 3rd Floor

Toronto, Ontario, Canada

M5A 4K8

 

Phone 416.955.9526

Proudly supporting the important work done by Canadian Teachers since 1992.

Copyright © CoEd 2014