<?php if (isset(//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- DW6 --> <head> <!-- Copyright 2005 Macromedia, Inc. All rights reserved. --> <title>Climate Portal Content Management System</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="cms.css" type="text/css" /> <style type="text/css"> <!-- .style1 {color: #FFFFFF} .style3 {color: #CCFFCC} .style5 {font-size: 24px} .style6 {color: #D4D0C8} --> </style> </head> <body bgcolor="#cccccc"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="15" nowrap="nowrap"><img src="file:D|/Program%20Files/%5Bwebdesign%5D/dreamweaver%208/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_spacer.gif" alt="" width="15" height="1" border="0" /></td>
<td height="74" colspan="3" class="logo" nowrap="nowrap"><br /> <span class="style1"> CLIMATE<span class="style3">PORTAL</span> <span class="style5">CMS</span></span> </td> <td width="4"> </td> <td width="574"> </td> </tr> <tr bgcolor="#ffffff"> <td colspan="6"></td> </tr> <tr bgcolor="#a4c2c2"> <td width="15" nowrap="nowrap"> </td> <td height="36" colspan="3" id="navigation" class="navText"></a> <span class="style6">ADD ITEM </a> EDIT ITEM </a> CATEGORIES </a> USER MANAGEMENT</a></span> RSS ADMIN</a></span></td> <td width="4"> </td> <td width="574"> </td> </tr> <tr bgcolor="#ffffff"> <td colspan="6"><img src="file:D|/Program%20Files/%5Bwebdesign%5D/dreamweaver%208/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr> <tr bgcolor="#ffffff"> <td colspan="2" valign="top" bgcolor="#a4c2c2"> </td> <td width="50" valign="top"><img src="file:D|/Program%20Files/%5Bwebdesign%5D/dreamweaver%208/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
<td width="536" valign="top"><br /> <br /> <table border="0" cellspacing="0" cellpadding="0" width="600"> <tr> <td width="600" class="pageName"><p>Edit an Article </p></td> </tr> <tr> <td class="bodyText"> <?php contentid = title = addslashes(contentdate = addslashes(binary = addslashes(sourcename = addslashes(sourceurl = addslashes(state = addslashes(articlelanguages = addslashes(description = addslashes(health = politics = wildlife = energy = business = climate = pollution = technology = lifestyle = environment = region = keywords = /* Als het update veld gestuurd word, betekent dat dat de gebruiker de velden van een item gewijzigd heeft en op UPDATE geklikt heeft. Zodoende worden alle velden geupdate */ if(_POST['update']){ keywords); /* De basis velden worden hier geupdate */ title', content.content_date = 'binary', content.content_source_name = 'sourceurl', content.content_state = 'description', content_type_article.article_languages = 'contentid'"; /* De categorieen worden geupdate door te kijken naar welke checkboxes er geset zijn en welke niet */ health', content_matrix.politics = 'wildlife', content_matrix.energy='business', content_matrix.climate='pollution', content_matrix.technology='lifestyle', content_matrix.environment='region' WHERE content_matrix.content_id='/* Hier worden de keywords uit de database gehaald en vervolgens allemaal weer geinsert */ keywords = split(' ', strtolower(query3 = "DELETE from `content_keywords` WHERE content_id = 'result = mysql_query(result) { die('Invalid query: ' . mysql_error()); } foreach (word) { word); word')"; query3); if(!query3 = "SELECT * from keywords WHERE keyword_name = 'result3 = mysql_query(result) { die('Invalid query: ' . mysql_error()); } result3); row['keyword_id']; contentid','result = mysql_query(result) { die('Invalid query: ' . mysql_error()); } } query); query2); if(!/* Hier word alle data weer uit de database gehaald zodat alle geupdate velden ook daadwerkelijk getoond worden */ query = "SELECT * FROM `content` , `content_type_article` WHERE content.content_id = 'contentid'"; query); if(!query2 = "SELECT * FROM `content_matrix` WHERE content_id='result2 = mysql_query(result2) { die('Invalid query: ' . mysql_error()); } contentid' AND content_keywords.keyword_id= keywords.keyword_id"; query3); if(!row = mysql_fetch_array(row2 = mysql_fetch_array(<form method="post" action=""> <table> <tr> <td width="150"> Title: </td> <td> <input type="text" name="title" size="30" value="<?php echo row['content_title']; ?>" /> </td> </tr> <tr> <td width="150"> Date: </td> <td> <input type="text" name="date" size="30" value="<?php echo </td> </tr> <tr> <td width="150"> Description: </td> <td> <input type="text" name="description" size="30" value="<?php echo row['content_description']; ?>"/> </td> </tr> <tr> <td width="150"> Binary: </td> <td> <textarea rows="30" cols="40" name="binary"><?php echo </textarea> </td> </tr> <tr> <td width="150"> Sourcename: </td> <td> <input type="text" name="sourcename" size="30" value="<?php echo row['content_source_name']; ?>"/> </td> </tr> <tr> <td> Source url: </td> <td> <input type="text" name="sourceurl" size="30" value="<?php echo </td> </tr> <tr> <td width="150"> Content state: </td> <td> <input type="text" name="contentstate" size="30" value="<?php echo row['content_state']; ?>"/> </td> </tr> <tr> <td> Categories: </td> <td> Health: <input type="checkbox" name="health" value="1" <?php row2['health']; if(<br /> Politics: <input type="checkbox" name="politics" value="1" <?php politics=politics == "1"){echo " CHECKED";}?>> <br /> Wildlife <input type="checkbox" name="wildlife" value="1" <?php row2['wildlife']; if(<br /> Energy <input type="checkbox" name="energy" value="1" <?php energy=energy == "1"){echo " CHECKED";}?>> <br /> Business <input type="checkbox" name="business" value="1" <?php row2['business']; if(<br /> Climate <input type="checkbox" name="climate" value="1" <?php climate=climate == "1"){echo " CHECKED";}?>> <br /> Pollution <input type="checkbox" name="pollution" value="1" <?php row2['pollution']; if(<br /> Technology <input type="checkbox" name="technology" value="1" <?php technology=technology == "1"){echo " CHECKED";}?>> <br /> Lifestyle <input type="checkbox" name="lifestyle" value="1" <?php row2['lifestyle']; if(<br /> Environment <input type="checkbox" name="environment" value="1" <?php environment=environment == "1"){echo " CHECKED";}?>> <br /> </td> </tr> <tr> <td width="150"> Region: </td> <td> <input type="text" name="region" size="30" value="<?php echo </td> </tr> <tr> <td width="150"> Article Languages: </td> <td> <input type="text" name="articlelanguages" size="30" value="<?php echo row['article_languages']; ?>"/> </td> </tr> <tr> <td width="150"> Keywords: </td> <td> <input type="text" name="keywords" size="30" value="<?php while(result3)) { echo </td> </tr> <tr> <td></td> <td><input type="submit" value="Update" name="update" /> </td> </tr> </table> <input type="hidden" name="contenttype" value="3"> <input type="hidden" name="contentid" value="<?php echo contentid; ?>"> </form> <p><br /> </p></td> </tr> </table> </td> <td width="4"> </td> <td width="574"> </td> </tr> <tr> <td colspan="6"> <img src="file:D|/Program%20Files/%5Bwebdesign%5D/dreamweaver%208/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_spacer.gif"
alt="" width="1" height="1" border="0" /></td> </tr> <tr> <td width="15"> </td> <td width="4"> </td> <td width="50"> </td> <td width="536"> </td> <td width="4"> </td> <td width="574"> </td> </tr> </table> </body> </html>
(C) A. Eliƫns 2/9/2007
You may not copy or print any of this material without explicit permission of the author or the publisher.