* @version 2.07 2010/11/08 * @link http://www.newmanix.com/ * @license http://opensource.org/licenses/osl-3.0.php Open Software License ("OSL") v. 3.0 * @see model_list.php * @todo none */ require 'inc_0700/config_inc.php'; #provides configuration, pathing, error handling, db credentials # check variable of item passed in - if invalid data, forcibly redirect back to model_list.php page if(isset($_GET['id'])){ $myID = (int)$_GET['id']; #Convert to integer, will equate to zero if fails if($myID < 1){myRedirect("model_list.php");} }else{ myRedirect("model_list.php"); } //sql statement to select individual item $sql = "select * from test_CartoonsSELECT where CartoonID = " . $myID; $foundRecord = FALSE; # Will change to true, if record found! # create mysqli (improved) connection to MySQL $iConn = IDB::conn(); # connection comes first in mysqli (improved) function $result = mysqli_query($iConn,$sql) or die(trigger_error(mysqli_error($iConn), E_USER_ERROR)); if(mysqli_num_rows($result) > 0) {#records exist - process $foundRecord = TRUE; while ($row = mysqli_fetch_assoc($result)) { $CartoonID = dbOut($row['CartoonID']); $Title = dbOut($row['Title']); $Date = dbOut($row['Date']); // $MetaDescription = dbOut($row['MetaDescription']); // $MetaKeywords = dbOut($row['MetaKeywords']); } } @mysqli_free_result($result); # We're done with the data! if($foundRecord) {#only load data if record found $config->titleTag = $Date . ' Cartoon: ' . $Title; #overwrite PageTitle with Muffin info! #Fills tags. Currently we're adding to the existing meta tags in config_inc.php // $config->metaDescription = $MetaDescription . 'Abell Smith is an editorial cartoonist and web developer based out of Seattle, WA. Smith likes to think of his political cartoons as "graphic columns," offering a combination of strong intellectual arguments and entertaining political satire.' . $config->metaDescription; // $config->metaKeywords = $MetaKeywords . ',2010, cartoon, archives,'. $config->metaKeywords; } /* $config->metaDescription = 'Web Database ITC281 class website.'; #Fills tags. $config->metaKeywords = 'SCCC,Seattle Central,ITC281,database,mysql,php'; $config->metaRobots = 'no index, no follow'; $config->loadhead = ''; #load page specific JS $config->banner = ''; #goes inside header $config->copyright = ''; #goes inside footer $config->sidebar1 = ''; #goes inside left side of page $config->sidebar2 = ''; #goes inside right side of page $config->nav1["page.php"] = "New Page!"; #add a new page to end of nav1 (viewable this page only)!! $config->nav1 = array("page.php"=>"New Page!") + $config->nav1; #add a new page to beginning of nav1 (viewable this page only)!! */ # END CONFIG AREA ---------------------------------------------------------- get_header(); #defaults to theme header or header_inc.php ?>
| Back to List | UPLOAD IMAGE '; /* # if you wish to overwrite any of these options on the view page, # you may uncomment this area, and provide different parameters: echo ''; */ } if(isset($_GET['msg'])) {# msg on querystring implies we're back from uploading new image $msgSeconds = (int)$_GET['msg']; $currSeconds = time(); if(($msgSeconds + 2)> $currSeconds) {//link only visible once, due to time comparison of qstring data to current timestamp echo ' |