Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

Administration

July 10, 2000

"Great," you say. "So now my writers can publish their own content. What happened to the proofreading and editing you promised me?"

Fear not, this is the best part. We want to build a system that allows the editors (most likely you) to proof, publish, delete, and otherwise play with the article that was just submitted by the writer. Since all the important info is stored in the database, this part will be a snap.

First, build an adminstrator's form. Using a for loop, loop through all the documents in the database that are not marked 'Published' and list them in an HTML Select element. For each option, store a unique variable that identifies that particular article, such as the UID:

<%
Set connArticles = Server.CreateObject("ADODB.connection")
Set rstArticles = Server.CreateObject("ADODB.Recordset")
connArticles.Open "dsn=my_db;DATABASE=my_db"


strSQL = "SELECT * FROM tblContent WHERE NOT Published = True"
rstArticles.Open strSQL, ConnArticles, adOpenKeyset, adLockOptimistic
if not rstArticles.EOF then
%>
<select name="DocTitle" size="10">
  <% do until rstArticles.EOF %>
  <option value="<% = rstArticles("UID") %>"><% = rstArticles("Title") %>lt;/option>
  <% rstArticles.movenext
  loop
  %>
</select>
<% end if
rstArticles.Close
set rstArticles = nothing
set connArticles = nothing
%>


<input type="submit" value="      Edit Title       " name="Submit">
<input type="submit" value="        Publish        " name="Submit">
<input type="submit" value="  	Delete Article  " name="Submit">

When the form is submitted, simply check the value of the submit input by using a Request.Form("Submit"). If the value is 'Edit Title', then redirect to a page that allows the user to change the title of the article in the database. The 'Publish' option would change the Published field in the database to true, and the 'Delete Article' option deletes the article from the database, and uses the file system object to delete the actual file. Since you know the path/filename of the article, by providing a link to it on the same page, the editor can also proofread it or save a local copy on his/her hard drive. If you'd like to edit the content online, simply use the file system object to extract the content and place it in an HTML textarea. Make your changes in the textarea, and use the FSO to write the changes to the file when you're done.

What about images?
Content Management Made Easy with ASP
A few notes


Up to => Home / Authoring / ASP / Content_Management




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers