![]() | |
Using PHP, CSS, SQL, MYSQL, Javascript and HTMLTo create a Web Standards Content EngineBy Anthony Matarazzo |
|
Dear Valued Web Guest:
When you buy a premium web service like GoDaddy.com offers, it includes numerous software options that you can install. Some of the major applications that they offer are content management systems. These systems can be tailored through plug-ins. They are written using textual Web programming languages. Being that they are complete products, it is difficult to contemplate precise designs. After all, these applications offer an abstract implementation using Object Oriented Programming (OOP) for many different types of content.
Recently at a coffee shop in Atlanta, GA, a person was smoking a cigarette. Applying the premium cup to my lips quickly and sipping to avoid the burn pain feeling, I asked if I could have a cigarette. He had a laptop and a cool car. He is a computer technician to the public with a car that looks like Ghost Busters.
He told me that he wanted to start a unique socialization Website where its members pay a fee for use. As well, there are many other general uses that he wanted to achieve. Because I had experience in programming, I decided to create a project to find out how existing content management systems work. There are many features that I want to improve within modern content management systems. Sometimes the interface can be difficult to use. Tieing together Multimedia, a Message Center, People Searching, a Calendar, File Upload Storage and tracking, Moderate Security and Layout Publishing within the engine is what the project must accomplish. Project Renegade.
With GoDaddy.com, the PHP compiler, MYSQL server and web service are installed. This book describes the development of a content engine and includes the source to it.
Since I am developing the Website using my web server, the book is updated dynamically as more progress is made. The following files are the beginning of the first version. I wanted to have a product that had features people would use. The first version will not to have an abundance of features. This will ensure that the smaller project will get the necessary attention to details. The information provided is not complete yet.
To begin, you should be familiar with the documentation for each of the technologies used. Take a moment to review the following online manuals. Some manuals like PHP can be downloaded. Choose the chm file format if you are using Microsoft Windows for editing. When developing a web project, having tools to write souce code and manage ftp ca be a great help. There is an editor called NotePad++ that is execellent. It has syntax highlighting for many languages, PHP, HTML, CSS and Javascript are amongst the ones it supports. It is free to download. Take a moment to review and store the following links.
PHP looks like this within a web page:
PHP
<HTML> <HEAD> </HEAD> <BODY> <?php echo "This is PHP"; ?> </BODY> </HTML>
CSS
a:link { color:blue; text-decoration:underline; } a:hover { background:Black; color:Orange; text-decoration:dashed; } a:visited { color:orange; text-decoration:underline; } /* this is the information that is displayed on the main profile page. */ ul.MemberProfileSummary { } DIV.Panel { display:none; position:relative; padding:0px; } DIV.PanelDialog { display:none; position:relative; padding:0px; color:#00; } div.PanelDialogButtons { clear:both; background:#c0c0c0; color:#ffffff; padding:3px; } #buffer { position:absolute; visibility:hidden; left:0; top:0 } div#displayContainer { float:left; margin: 0 0 0 0; padding:0px; } body { margin: 0; padding: 0; font-size: 95%; font-family: Georgia,'Lucida Grande',Verdana,sans-serif; text-align:center; } /* LAYOUT STUFF */ #wrapper { width:100%; margin:0 auto 0 auto; text-align:left; } /* this is the color and objects of all the information that appears at the top of the page. The navigation links are handled by the ul and LI tags.*/ #masthead { width:100%; margin:0px 0 0 0px; color:#000000; background: #d0d0d0 url(images/masthead.jpg) no-repeat } #masthead h1 { margin:10px 0 2px -10px; padding: 16px 0 5px 13px; font-size:14px/165% Georgia, arial, helvetica, sans-serif; letter-spacing:0.2em; color:#DABFFF; background: #00248F; } #masthead h2 { color:#DABFFF; margin:10px 0 2px -10px; padding: 16px 0 5px 13px; font-size:12px/165% Georgia, arial, helvetica, sans-serif; letter-spacing:0.2em; color:#DABFFF; background: #00248F; } #masthead h3 { color:#DABFFF; margin:10px 0 2px -10px; padding: 16px 0 5px 13px; font-size:10px/165% Georgia, arial, helvetica, sans-serif; letter-spacing:0.2em; color:#DABFFF; background: #00248F; } #masthead li { float: left; padding: 0 1em 0 1em; border-right: 1px solid #fff; } #masthead ul li { width:135px; height:25px; padding-top:4px; list-style-type: none; font-size: 12px; letter-spacing:0.07em; } #masthead ul li a { display:block; padding:4px 0 0 11px; height:25px; text-decoration:none; font-weight:bold; } #masthead ul li a:link, #masthead ul li a:visited, #masthead ul li a:active { color:#00000; } #masthead ul li a:hover { color:#0000ff; } #MainMenu { float: right; list-style:none; padding-top: 15px; cursor:pointer; } #MainMenu li { float: left; cursor:pointer; padding: 0 .5em 0 .5em; } #content { float:left; width:100%; background: url(images/content.gif); color:#000000; } #container { float:left; width:300px; margin:0; } /* this is the main menu navigation colors */ #mainmenu li a { color: #000000; background: none; } #mainmenu ul li a:link, #mainmenu ul li a:visited, #mainmenu ul li a:active { float: left; padding: 0 1em 0 1em; border-right: 1px solid #fff; color:#000; } #mainmenu { padding: 2px 0 0 0; float: left; list-style:none; } #mainmenu ul li a:hover { color:#FF0000; } /* Main column and variants */ #pagemenu { float:none; text-align:center; width:100%; height:50px; margin:0px 0 0 0px; color:#000; background:#00248F url(images/pagemenu.png) no-repeat } #HelpContextMain { float:left; width:500px; height:50px; color:#00000; margin:0 0 0 0; text-align:left; font-size:10px; } #contextmenu { float:left; width: 200px; height:500px; margin:0px 20px 0 0; padding: 0px 0px 0px 0px; font-size: 11px; color:#000000; background-color:#d0d0d0; border-right: 1px solid #fff; } #contextmenu li a { color: #000000; background: none; } #actionview { float:left; width:443px; margin:0 0 10px 30px; text-align:left; padding:10px 0 10px 0; font-size:12px; line-height:165%; } #blog { float:left; width:443px; margin:0 0 10px 30px; text-align:left; padding:10px 0 10px 0; font-size:12px; line-height:165%; } /* Side columns and specific elements */ #sidebar { float:right; width: 240px; margin:10px 10px 0 0; padding-bottom: 14px; font-size: 11px; color:#000000; background-color:#d0d0d0; } /* Footer */ #footer { text-align:center; height:88px; margin:0 0 0 1px; padding:20px 0 12px 20px; color:#333; font-size:10px; letter-spacing:0.09em; background: #008E00 url(images/footer.jpg) no-repeat } #footer ul { float:left; list-style-type:none; display:block; padding:0; width:680px; margin:0 0 9px 0; } #footer ul li { display:inline; margin-right: 7px; padding: 0 0 0 0; background: transparent; } img { border: 0; } .flourish { margin-left:24px; width:730px; height:25px; background: url(images/flourish.gif) no-repeat; } h1 {display:none;} h2 { margin:10px 0 2px -10px; padding: 16px 0 5px 13px; font-size:14px/165% Georgia, arial, helvetica, sans-serif; letter-spacing:0.2em; color:#000000; background: #FF856F url(images/blackhead.gif) left bottom no-repeat } #sidebar h2 { margin-top:3px; font-size:12px; background: #FFA96F url(images/blackheadside.gif) left bottom no-repeat } h2 a:link, h2 a:visited { font-weight:bold; background:transparent; text-decoration: none; color:#000000; } h3 { letter-spacing:0.2em; margin-top:3px; margin-bottom:3px; margin-left:-10px; padding: 6px 0 5px 13px; color:#333; font-size:19px; font-style:italic; font-family: Georgia, arial, helvetica, sans-serif; line-height:165%; background: #FFCD6F url(images/whiteheadmain.gif) left bottom no-repeat } #mainhome h3 {letter-spacing:0.2em;margin-top:3px;margin-bottom:3px;margin-left:-10px;padding: 6px 35px 5px 13px;color:#333;border: 0px dashed #999;font-size:19px;font-style:italic;font-family: Georgia, arial, helvetica, sans-serif;line-height:165%;background: #EAE5D8 url(images/whiteheadmain.gif) left bottom repeat-y} #sidebar h3 {margin-left:0;color: #333;text-decoration: none;font-size: 11px;padding:6px 0 5px 9px;background: #EAE5D8 url(images/whitehead.gif) left bottom no-repeat} #blog h3 {font-weight:bold;color:#333;text-decoration: none;margin-top:9px;margin-bottom:3px;margin-left:-10px;font-size:13px;} #blog h3 a:link, #blog h3 a:visited, #sidebar h3 a:link, #sidebar h3 a:visited {color:#000;text-decoration: none;} #h2 a:hover, #blog h3 a:hover, #sidebar h3 a:hover {color:#CCC;} /* Paragraphs */ #blog p {margin: 6px 16px 6px 0;} #sidebar p {margin: 2px 0 3px 0;line-height:150%;} #footer p {margin:10px 0px 5px 0px;} /* Key link styles */ a:link { background-color: transparent; font-weight:bold;text-decoration: underline;color:#000000;font-style:italic; } a:visited { background-color: transparent; font-weight:bold;text-decoration: underline;color:#000000;font-style:italic; } a:hover { background-color: transparent; font-weight:bold;text-decoration: none;color:#333;font-style:italic;} #footer a:link { background-color: transparent; font-weight:bold;text-decoration: underline;color:#333 } #footer a:visited { background-color: transparent; font-weight:bold;text-decoration: underline;color:#333 } .spacer { clear: both; } .logos {float:right;margin:-60px 30px 0 10px;} .date {color:#999;font-size:11px;} /* drop shadow effect for the gallery thumbnails. Sadly this requires a div to be wrapped around the image markup, which is a shame */ .img-wrapper { float:left; margin: 15px 0 14px 5px; background: url(images/shadowee.gif) no-repeat bottom right; line-height:0; } .img-wrapper img { margin:00; padding:8px; border:1px solid #C5BDBD; background:#FFF; position:relative; top:-5px; left:-5px; } table { width:100%; margin: 10px 0 20px 0; border:0; font-size:11px; } th { text-align:left; } td, th { margin: 0px; border-top:1px dashed #999; padding: 3px 5px 3px 5px; } dl { } dt { float:left; padding:2px 5px 7px 0; line-height:130%; font-weight:bold; } dd { margin:0; padding:2px 0 7px 0; line-height:130%; } label.description { width:100%; margin: 10px 0 20px 0; border:0; font-size:11px; } /* When a message selection list is shown, these ids are used for each column */ div.MessageContainer { float:left; margin:15px 0 0 8px; color:#000; color:#000000; background-color:#C0C0C0; } div.Message { display:block; width:100%; border: dotted 2px #999; padding-top:5px; padding-bottom:10px; } div.MessageHighlight { background-color:#0000CC; border: dotted 2px #FF0000; } div.MessageSelected { float:left; width: 30px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.MessageSubject { float:left; width: 200px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.MessageFrom { float:left; width: 100px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.MessageDate { float:left; width: 150px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.MessageTime { float:left; width: 100px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.MessageText { float:left; width:443px; margin:0 0 10px 30px; text-align:left; padding:3px 3px 3px 3px; font-size:12px; line-height:110%; } /* theses fields define the message compose dialog.*/ .txtMemberAlias { padding:3px; } .cboMemberAliasCombo { padding:3px; } .txtSubject { maxlength:255; } .txtMessage { cols:60; rows:10; } .CommandButton { -moz-box-shadow:inset 0px 1px 0px 0px #97c4fe; -webkit-box-shadow:inset 0px 1px 0px 0px #97c4fe; box-shadow:inset 0px 1px 0px 0px #97c4fe; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #3d94f6), color-stop(1, #1e62d0) ); background:-moz-linear-gradient( center top, #3d94f6 5%, #1e62d0 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#3d94f6', endColorstr='#1e62d0'); background-color:#3d94f6; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; border:1px solid #337fed; display:inline-block; color:#ffffff; font-family:arial; font-size:15px; font-weight:bold; padding:6px 24px; text-decoration:none; text-shadow:1px 1px 0px #1570cd; }.CommandButton:hover { background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #1e62d0), color-stop(1, #3d94f6) ); background:-moz-linear-gradient( center top, #1e62d0 5%, #3d94f6 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1e62d0', endColorstr='#3d94f6'); background-color:#1e62d0; }.CommandButton:active { position:relative; top:1px; } .cmdCancel { float:left; } .cmdClear { float:left; } .cmdSend { float:left; } .cmdSave { float:left; } div.ComposeButtonGroup { float:left; background:#c0c0c0; color:#ffffff; padding:3px; } /* these fields are located upon the AddMedia panel. */ .cboMediaType { float:left; background:#c0c0c0; color:#ffffff; padding:3px; } /* text */ .txtLabel { float:left; background:#c0c0c0; color:#ffffff; padding:3px; } .chkTOC { float:left; background:#c0c0c0; color:#ffffff; padding:3px; } .txtInformation { float:left; background:#c0c0c0; color:#ffffff; padding:3px; } /* these classes are used to define the visual layout of The ImageUpload Panel */ div.ImageUploadPanel { float:left; background:#c0c0c0; color:#000000; padding:3px; } div.ImageUploadLabel { clear:both; padding:3px; } div.ImageFileUpload { clear:both; padding:3px; } div.ImageFileDescription { clear:both; padding:3px; } div.ImageFileShort { clear:both; padding:3px; } /* media database grid lists */ /* holds the infromation about the file in small tense. */ div.MediaStatistics { } /* main display compoents of identification */ div.MediaFilename { } div.MediaShortDescription { } div.MediaDescription { } /* these fields are the classes used to edit information on all media objects.*/ #txtMediaShortName { } #txtMediaDescription { rows:10; cols:40; } /* each publishing type has a div tag for forward appeal configuration */ div.MediaObjectText { float:left; background:#c0c0c0; padding:10px; width:200px; margin:10px; border:3px solid #000000; cursor:pointer; } div.MediaObjectVideo { float:left; background:#c0c0c0; padding:10px; width:200px; margin:10px; border:3px solid #000000; cursor:pointer; } div.MediaObjectAudio { float:left; background:#c0c0c0; padding:10px; width:200px; margin:10px; border:3px solid #000000; cursor:pointer; } div.MediaObjectYoutube { float:left; background:#c0c0c0; padding:10px; width:200px; margin:10px; border:3px solid #000000; cursor:pointer; } div.MediaObjectRSSFeed { float:left; background:#c0c0c0; padding:10px; width:200px; margin:10px; border:3px solid #000000; cursor:pointer; } div.MediaRSSURL { float:left; background:#c0c0c0; padding:3px; width:200px; margin:10px; } div.MediaObjectImage{ float:left; background:#c0c0c0; padding:10px; margin:10px; width:200px; border:3px solid #000000; cursor:pointer; } div.MediaObjectPortrait { float:left; background:#c0c0c0; padding:10px; width:200px; margin:10px; border:3px solid #000000; cursor:pointer; } img.imgMediaImage { width:150px; height:175px; } img.imgPortrait { width:150px; height:175px; } object.objRealPlayer { width:150px; height:175px; } object.objQuickTime { width:150px; height:175px; } object.objShockwave { width:150px; height:175px; } object.objWindowsMediaPlayer { width:150px; height:175px; } object.objAudioPlayer { width:150px; height:175px; } object.objYoutubeVideo { width:150px; height:175px; } div.MediaObjectGallery { float:left; background:#c0c0c0; padding:3px; width:200px; border:3px solid #000000; cursor:pointer; } .txtYoutubeLabel { float:left; background:#c0c0c0; color:#ffffff; padding:3px; } .txtYoutubeShortDescription { float:left; background:#c0c0c0; color:#ffffff; padding:3px; } .txtYoutubeVideoDescription { float:left; background:#c0c0c0; color:#ffffff; padding:3px; } /* this is a container for the short edit links upon each media object -- Edit Delete */ div.MediaShortEdit { align:right; } div.MediaShortEdit a:link { color:orange; text-decoration:none; font-family:arial; font-size:10px; } div.MediaShortEdit a:hover { background:Black; color:Orange; text-decoration:underline; font-family:arial; font-size:10px; } div.MediaShortEdit a:visited { color:orange; text-decoration:none; font-family:arial; font-size:10px; } /* when a mouse over event is had over a media contet div */ div.DivHighlight { background:#505050; border:3px solid #FF0000; } /* when a user is editing, the media object has this*/ div.DivEdit { background:#FFFF00; border:3px solid #008000; } div.DivSelected { background:#0000FF; border:3px solid #ffffff; } /* publishing interface */ div.divColumn { float:left; } div.divColumnRight { float:right; } ul.PublishingWigitBar { align:right;; list-style-type: none; font-size: 12px; } #PublishSidebar { float:left; width: 240px; margin:10px 10px 0 0; padding-bottom: 14px; font-size: 11px; color:#000000; background-color:#C3F65F; } /* li.PublishingWigitBar { list-style-type: none; font-size: 12px; }*/ div.divBackgroundImage { } div.cboBackgrounds { } img.imgBackground { } div.txtFileDescription { } div.ImageFileDescription { } /* HOME Page */ div.HomePageMediaStatistics { float:left; background:#c0c0c0; color:#000000; margin:10px; padding:10px; } div.HomePageMessageStatistics { float:left; background:#c0c0c0; color:#000000; margin:10px; padding:10px; } /* The following definitions are used for the people display. It is a summary of information about each user, displaying a small portrait, their alias, top likes and a one hundred character teaser about them. */ div.PersonContainer { width:500px; height:100%; margin:15px 0 0 8px; color:#000; color:#000000; background-color:#C0C0C0; } div.Person{ padding-top:5px; width:100%; height:100px; border-bottom: dotted 2px #999; } div.PersonHighlight{ background-color:#0000CC; border: dotted 2px #FF0000; } div.PersonSelected { float:left; width: 30px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.PersonAlias { float:left; width: 30px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.PersonTeaser { float:left; width: 200px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.PersonPortraitContainer { float:left; width: 100px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.PersonImg { float:left; width: 100px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } div.PersonLikes { float:left; width: 150px; margin:0px 10px 0 0; padding-bottom: 4px; font-size: 11px; } .wrapper{ position: relative; float: left; left: 0px; width: 987px; margin-bottom: 10px; background-color: rgb(204, 204, 204) } #eft1{ position: relative; float: left; left: 5px; width: 200px; height: 319px; } #PanelDialogWrapper{ position: relative; float: left; left: 15px; width: 486px; height: 319px; } /* Calendar Page */ #calendarWrapper { float:left; padding:5px 0 0 0; width:300px; background:#000066; border: 1px solid #999; font: normal 12pt "Arial", "Helvetica", "Sans Serif"; } #calendarWrapper a:link { color: #004400; text-decoration: none; } #calendarWrapper a:visited { color: #004400; text-decoration: none; } #calendarWrapper a:hover { color: #004400; text-decoration: underline; } /* mouse over link */ #calendarWrapper a:active { color: #004400; text-decoration: none; } /* selected link */ div.calendarMain { float:left; border:10px; font: normal 12pt "Arial", "Helvetica", "Sans Serif"; } div.calendarNavigation { width:365px; height:30px; float:left; background: #000000; } div.calendarTitle { float:left; width:180px; color:#FFFFFF; padding:5px; background: #000000; } div.calendarButtons { align:center; float:left; width:30px; padding:5px; color:#FFFFFF; background: #000000; } div.calendarButtons a:link { color:white; text-decoration:none; } div.calendarButtons a:hover { background:white; color:black; } div.calendarButtons a:visited { color:white; text-decoration:none; } div.calendarDayOfWeek { align:center; float:left; width:30px; height:20px; padding:10px; color:#FFFFFF; background: #000000; border: 1px solid #000000; } div.calendarNotDayRange { float:left; width:30px; height:20px; text-align:center; padding:10px; background:#666666; border: 1px solid #000; } div.calendarEventCurrentDay { float:left; width:30px; height:20px; text-align:center; padding:10px; background:#AAFFAA; border: 1px solid #000; } div.calendarEvent { float:left; width:30px; height:20px; text-align:center; padding:10px; background:#FFFFC8; border: 1px solid #000; } div.calendarNormalDay { float:left; width:30px; height:20px; text-align:center; padding:10px; background:#DDFFFF; color:#000000; border: 1px solid #000; } div.calendarShowCurrentDay { float:left; width:30px; height:20px; text-align:center; padding:10px; background:#C8C896; border: 1px solid #000; } /* these items are part of the user interface and validation information */ p.UserError { color:#FF0000; } #display { float:left; width:75%; } /* these are used for popup editing. The blanket covers the page while the information is being edited. */ #blanket { background-color:#111; opacity: 0.65; filter:alpha(opacity=65); position:absolute; z-index: 9001; top:0px; left:0px; width:100%; } #popUpDiv { position:relative; background-color:#eeeeee; width:300px; height:300px; z-index: 9002; }
HTML
<html> <head> <title>AtlPlay.com - Atlanta, Georgia's Socialization Network</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Author" content="Anthony Matarazzo" /> <link rel='stylesheet' media="screen" type='text/css' href='main.css' /> </head> <body id="home" onLoad="document.frmLogin.Alias.focus();"> <div id="wrapper"> <div id="masthead"> <a href="home"><img src="img/Welcome.png" alt="AtlPlay.com - Atlanta, Georgia's Socialization Network" /></a> <h1>Welcome to AtlPlay.com</h1> <h2>Atlanta, Georgia's community socialization network</h2> </div> <!--------------------- main content ----------------> <div id="content"> <div id="blog"> <p>Dear valued Web Guest:</p><br> <p>Welcome to AtlPlay.com - the place for community gatherings. AtlPlay.com is a community socialization and information publishing website. The web software enables digital communication between many anonymous members. For the <i>nominal fee of one dollar</i>, you can establish a membership. Unless you give your full name or location, other members will not be able to gather your personal identity information. Each member does have a personal identity and is required to join using a credit card. This site uses PayPal.com for secure payment. Therefore, absolutely none of your financial data is stored or transferred to AtlPlay.com. Feel confident that other members are respected as you are for their investment.</p> <p>The web application software you get enables much more than messaging. The software enables easy publishing of many types of document and media data. For versatility, you may publish a link that others can view an individual document or group of documents. An intuitive interface enables a member to publish a web presentation. Information can be published just for members or for anyone in the world. You can specify a password for viewers to enter before they have access.</p> <p>AtlPlay.com allows users to create or upload many formats of digital data. Unicode Text (Standard documentation), books, music, music albums, photographs, computer animations and video. Each of these formats are industry accepted open formats so the information is compatible with many computing platforms. It is desired that no pornography be distributed upon the website. By becoming a member, you agree to this policy. </p> <p>AtlPlay.com is a social digital communication system implemented for inspiring positive thoughts. To account for the many moods that people experience, be prepared to exercise good behavior. Textual communication, if it contains very offensive language, can hurt people-s feelings. Each member is a real person, with emotions. Please use courteous greetings and sensible communication practices. Enjoy, learn and bring Internet communication to a higher level.</p> </div> <!--------------------- Sidebar - login or create new ----------------> <div class="sidebar"> <h2>Member Login</h2> <form name="frmLogin" method="post" enctype="application/x-www-form-urlencoded" action="checklogin.php"> <label>Alias</label><input name="Alias" type="text" id="Alias"><br> <label>Password</label><input name="xID" type="password" id="xID"><br> <input type="submit" name="Submit" value="Login" onclick="frmLogin.action='checklogin.php';"> <input type="submit" name="Submit" value="New Member" onclick="frmLogin.action='memberAlias.php';"> </form> </div> <div class="spacer"></div> <div class="flourish"></div> </div> <!--------------------- The footer of the page ----------------> <div id="footer"> <div class="spacer"></div> </div> </div> </body> </html>
PHP
<?php session_start(); require_once('MediaDatabase.php'); $_SESSION['MEDIAFUNCTIONPROCESSED']=0; ?> <html> <head> <script src="js/dw_loader.js" type="text/javascript"></script> <script type="text/javascript" src="ckEditor/ckeditor.js"></script> <link rel='stylesheet' media="screen" type='text/css' href='main.css' /> </head><body> <?php function outputFileUploadControl() { $max_no_img=4; // Maximum number of images value to be set here echo "<div class=\"ImageUploadPanel\">"; for($i=1; $i<=$max_no_img; $i++){ echo '<div class="ImageUploadLabel">File ' . $i . '</div>'; echo '<div class="ImageFileUpload"><input type="file" name="files[]" id="files[]" class="bginput"></input></div>'; echo '<div class="ImageFileShort"><input name="txtShortDescription[]" maxlength=100></input></div>'; echo '<div class="ImageFileDescription"><textarea name="txtFileDescription[]" id="txtFileDescription[]" rows="4" cols="30"></textarea></div>'; } echo '</div>'; } $oMedia=new Media(); $oMedia->setMemberID($_SESSION['MemberID']); $oMedia->outputQuotaUsage(); ?> <form action="" method="post" enctype="multipart/form-data" name="frmMedia" id="frmMedia"> <div id="PanelDialogWrapper"> <!--------------------- main content ----------------> <h2>Add Media</h2> <p>Select what type of media you are adding:<br></p> <select id=cboMediaType onclick="ShowMediaPanel(this.value);" onchange="ShowMediaPanel(this.value);"> <option name="MediaType" value="BLOG">Blog</option> <option name="MediaType" value="TEXT">Text</option> <option name="MediaType" value="IMAGE">Photograph</option> <option name="MediaType" value="MUSIC">Music</option> <option name="MediaType" value="VIDEO">Video</option> <option name="MediaType" value="YOUTUBE">Youtube Video Gallery</option> <option name="MediaType" value="IMAGE_GALLERY">Picture Gallery</option> <option name="MediaType" value="RSS_FEED">RSS Feed</option> </select> <!-----------------------------------------------------> <div id="BLOG" class="PanelDialog"> <h3>Blog Entry</h3> <p>Please label the blog text block and then type in the text that you want to store.</p> <label for="txtLabel">Item Label</label> <input type="text" maxlength=100 name="txtBlogLabel" id="txtBlogLabel"> <label for="txtInformation">Textual Information</label> <textarea cols="50" id="txtBlogInformation" name="txtBlogInformation" rows="10"></textarea> <div class="PanelDialogButtons"> <input class="CommandButton" id=cmdCancel type="button" value="Cancel" onClick="loadExternalDoc('Media.php','display');"/> <input class="CommandButton" id=cmdSave type="submit" value="Save" onClick="frmMedia.action='SaveMedia.php?FUNCTION=BLOG';frmMedia.submit();"/> </div> </div> <div id="TEXT" class="PanelDialog"> <h3>Text</h3> <p>Please label the text block and then type in the text that you want to store.</p> <label for="txtLabel">Item Label</label> <input type="text" maxlength=100 name="txtLabel" id="txtLabel"> <label for="txtInformation">Textual Information</label> <textarea cols="50" id="txtInformation" name="txtInformation" rows="10"></textarea> <div class="PanelDialogButtons"> <input class="CommandButton" id=cmdCancel type="button" value="Cancel" onClick="loadExternalDoc('Media.php','display');"/> <input class="CommandButton" id=cmdSave type="submit" value="Save" onClick="frmMedia.action='SaveMedia.php?FUNCTION=TEXT';frmMedia.submit();"/> </div> </div> <!-----------------------------------------------------> <div id="IMAGE" class="PanelDialog"> <h3>Photographs</h3> <p>Select the image files you wish to upload.</p> <!-------------------------------------------------------------------> <!------------- set the ienctype='multipart/form-data' -------> <!-------------------------------------------------------------------> <?php outputFileUploadControl(); ?> <div class="PanelDialogButtons"> <input class="CommandButton" type="button" class="cmdCancel" value="Cancel" onClick="loadExternalDoc('Media.php','display');"/> <input class="CommandButton" type="submit" class="cmdSave" value="Save" onClick="frmMedia.action='SaveMedia.php?FUNCTION=IMAGE';frmMedia.submit();"/> </div> </div> <div id="MUSIC" class="PanelDialog"> <!-------------------------------------------------------------------> <!------------- set the ienctype='multipart/form-data' -------> <!-------------------------------------------------------------------> <h3>Music</h3> <p>Please select the music files (.mp3) you want to upload.</p> <?php outputFileUploadControl(); ?> <div class="PanelDialogButtons"> <input class="CommandButton" type="button" value="Cancel" onClick="loadExternalDoc('Media.php','display');"/> <input class="CommandButton" type="submit" value="Save" onClick="frmMedia.action='SaveMedia.php?FUNCTION=AUDIO';frmMedia.submit();"/> </div> </div> <!-------------------------------------------------------------------> <!------------- set the ienctype='multipart/form-data' -------> <!-------------------------------------------------------------------> <div id="VIDEO" class="PanelDialog"> <h3>Video</h3> <p>Please select the video files (.mp3) you want to upload.</p> <?php outputFileUploadControl(); ?> <div class="PanelDialogButtons"> <input class="CommandButton" type="button" value="Cancel" onClick="loadExternalDoc('Media.php','display');"/> <input class="CommandButton" type="submit" value="Save" onClick="frmMedia.action='SaveMedia.php?FUNCTION=VIDEO';frmMedia.submit();"/> </div> </div> <!-------------------------------------------------------------------> <!------------- Youtube video player integration -------> <!-------------------------------------------------------------------> <div id="YOUTUBE" class="PanelDialog"> <label for="txtLabel">Youtube Video ID or complete URL</label> <input type="text" maxlength=100 name="txtYoutubeLabel" id="txtYoutubeLabel"/> <label for="txtYouTube">Short Description</label> <input type="text" maxlength=100 name="txtYoutubeShortDescription" id="txtYoutubeShortDescription"/> <label for="txtInformation">Description</label> <textarea cols="80" id="txtYoutubeVideoDescription" name="txtYoutubeVideoDescription" rows="10"></textarea> <div class="PanelDialogButtons"> <input class="CommandButton" type="button" value="Cancel" onClick="loadExternalDoc('Media.php','display');"/> <input class="CommandButton" type="submit" value="Save" onClick="frmMedia.action='SaveMedia.php?FUNCTION=YOUTUBE';frmMedia.submit();"/> </div> </div> <!-------------------------------------------------------------------> <!------------- Youtube video player integration -------> <!-------------------------------------------------------------------> <div id="IMAGE_GALLERY" class="PanelDialog"> <h3>Photograph Gallery</h3> <p>Please select which images you would like in the the Gallery</p> <label for="txtGalleryName">Gallery Name</label> <input type="text" maxlength=100 name="txtGalleryName" id="txtGalleryName"> <?php $oMedia->outputMediaImageList(""); ?> <div class="PanelDialogButtons"> <input class="CommandButton" type="button" value="Cancel" onClick="loadExternalDoc('Media.php','display');"/> <input class="CommandButton" type="submit" value="Save" onClick="frmMedia.action='SaveMedia.php?FUNCTION=IMAGE_GALLERY'; frmMedia.submit();"/> </div> </div> <!-------------------------------------------------------------------> <!------------- Youtube video player integration -------> <!-------------------------------------------------------------------> <div id="RSS_FEED" class="PanelDialog"> <label for="txtLabel">RSS Feed Name</label> <input type="text" maxlength=100 name="txtRSSFeedName" id="txtRSSFeedName"> <label for="txtLabel">Complete URL of RSS Feed</label> <input type="text" maxlength=1024 name="txtRSSFeedURL" id="txtRSSFeedURL"> <label for="txtInformation">Description</label> <textarea cols="80" id="txtRSSDescription" name="txtYoutubeVideoDescription" rows="10"></textarea> <div class="PanelDialogButtons"> <input class="CommandButton" type="button" value="Cancel" onClick="loadExternalDoc('Media.php','display');"/> <input class="CommandButton" type="submit" value="Save" onClick="frmMedia.action='SaveMedia.php?RSS_FEED';frmMedia.submit();"/> </div> </div> </form> <!------------------- <option name="MediaType" value="Survey">Survey</option> --------------------> </div> <!--wrapper---> </body></html>
PHP
<?php session_start(); require_once('CalendarDatabase.php'); unset($function); if(isset($_GET)) { $function=$_GET["FUNCTION"]; } $oCalendar=new Calendar(); $oCalendar->setMemberID($_SESSION['MemberID']); $sTextInfo=""; if(isset($_SESSION['calDay'])) { $day = $_SESSION['calDay']; $month = $_SESSION['calMonth']; $year = $_SESSION['calYear']; } else { $date =time(); //This puts the day, month, and year in seperate variables $day = date('d', $date); $month = date('m', $date); $year = date('Y', $date); } switch($function) { case 'EDIT': $sTextInfo=$oCalendar->getInformation($_GET["Date"]); break; case 'SAVE': $sTextInfo=$_POST['txtCalendarInfo']; $oCalendar->saveInformation($_POST['hidDate'], $_POST['txtCalendarInfo']); $sTextInfo=$oCalendar->getInformation($_POST['hidDate']); break; case 'DELETE': $oCalendar->deleteInformation($_POST['hidDate']); break; case "PrevYear": $year--; break; case "PrevMonth": $month--; if($month<1) { $month=12; $year--; } break; case "NextMonth": $month++; if($month>12) { $month=1; $year++; } break; case "NextYear": $year++; break; } /* store the current date context in theothe session */ $_SESSION['calDay'] = $day; $_SESSION['calMonth']=$month; $_SESSION['calYear']=$year; ?> <div id="wrapper"> <div class="content">