General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 8th, 2011, 04:27 AM
wolit wolit is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2011
Posts: 1 wolit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 38 sec
Reputation Power: 0
Simple file rotation question

Hy guys!
I have a little problem. Perhaps some of you could help me.
I have a web site. In the main page (index.php) several news are shown.
Since today news were just some rows of text, so one person had to always make summaries of newspaper articles and physically write them inside the code of the page (or by using an html editor).
Now I have made some modification to this web site. I have created 26 subfolders within which pdf files have to be inserted. One file per folder.
The php code of the page reads the name of the file inside each folder and automatically creates News titles and links.
This way the page change dinamically according to the files contained within those 26 folders. The site maintainer only have to worry about those pdf files.
But I have a small problem...
It is important the order of the news. The latest news should be the first in top and the oldest one should be the last at the bottom.
So when new articles are added the whole content of these folders has to be rotated. For example if I want to add 4 new articles the procedure should be this one:
1) The files contained within folders 23, 24, 25, 26 should be deleted.
2) The file contained inside the folder 22 should be moved to folder 26.
3) The file contained inside the folder 21 should be moved to folder 25.
4) The file contained inside the folder 20 should be moved to folder 24.
.
.
.
and so on till folders 01, 02, 03 and 04 are empty. And the site maintainer can copy new article files inside these first 4 folders.
I really need a way, some sort of script to automate this procedure... otherwise the maintainer of the site says it's easier to write by hand directly summaries.
Thanks in advance for reading me!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Simple file rotation question


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap