action found"; if ($_POST['action']=="makeMeme") { // echo "action name found"; // check for text if (isset($_POST['meme'])) { // echo "meme found"; // there is a meme submitted, do something about it $text = $_POST['meme']; $thisCreateAuthor = "Website User"; $thisAppID = 2018; $thisType = $_POST['type']; $thisContent =$_POST['meme']; $thisStatus = 10; $thisSourceTitle=$_POST['sourceTitle']; $thisNote=$_POST['note']; $thisURL=$_POST['url']; $thisAuthor=$_POST['author']; $thisMemeAuthorIP=getRealIpAddr(); $insert = mysqli_query($mysqli," INSERT INTO artifact VALUES ( null, '$thisAppID', '$thisStatus', '$thisType', '$thisContent', now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); // get the id that was just created $thisID = $mysqli->insert_id; // now register the attributes // $mysqli = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // always write the artifact content caption, we are saving the submitted text. even though we may never display it. $insert = mysqli_query($mysqli," INSERT INTO artifact_content VALUES ( '$thisID', '$thisAppID', '$thisStatus', 'Meme', null, null, '$thisContent', null, null, null, now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); // always write the artifact title. for now it is just a repeat of the content. we may edit it later as a short headline $insert = mysqli_query($mysqli," INSERT INTO artifact_content VALUES ( '$thisID', '$thisAppID', '$thisStatus', 'Meme Title', null, null, '$thisContent', null, null, null, now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); // always write meme author data $insert = mysqli_query($mysqli," INSERT INTO artifact_content VALUES ( '$thisID', '$thisAppID', '$thisStatus', 'Meme Author', null, null, null, '$thisMemeAuthorIP', null, null, now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); // if present write the source type if ($thisSourceTitle != null) { $insert = mysqli_query($mysqli," INSERT INTO artifact_content VALUES ( '$thisID', '$thisAppID', '$thisStatus', 'Source Title', null, null, '$thisSourceTitle', null, null, null, now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); } if ($thisNote != null) { // if present write the note type $insert = mysqli_query($mysqli," INSERT INTO artifact_content VALUES ( '$thisID', '$thisAppID', '$thisStatus', 'Note', null, null, '$thisNote', null, null, null, now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); } if ($thisURL != null) { // if present write the url type $insert = mysqli_query($mysqli," INSERT INTO artifact_content VALUES ( '$thisID', '$thisAppID', '$thisStatus', 'Source URL Link', null, null, '$thisURL', null, null, null, now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); } if ($thisAuthor != null) { // if present write the source author type $insert = mysqli_query($mysqli," INSERT INTO artifact_content VALUES ( '$thisID', '$thisAppID', '$thisStatus', 'Source Author', null, null, '$thisAuthor', null, null, null, now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); } // if there is text, run it in the makeMeme() $memeFilename = makeMeme($thisID,$text); // ASSUME THE MEME GENERATOR PLACES IT IN THE RIGHT LOCATION AND GIVES IT THE CORRECT NAME $insert = mysqli_query($mysqli," INSERT INTO artifact_content VALUES ( '$thisID', '$thisAppID', '$thisStatus', 'File', null, null, null, '$memeFilename', null, null, now(), '$thisCreateAuthor', now(), '$thisCreateAuthor' ) "); } else { // nothing submitted, don't do anything // echo "meme NOT found"; } } else { // echo "action name not found"; // nothing submitted, don't do anything } } else { // echo "action not found"; } // PREPARE PAGE BASED ON VIEW $view = $_GET['view']; switch($view) { case "featured": $feature = "
"; break; case "meme": $feature = "

Thank you for making your own #TimesUpAziz meme. To make another, click here.

"; break; case "special": // special content $thisVisitor = getRealIpAddr(); if ($thisVisitor == "45.48.228.130") { $feature = "

"; } else { $special = ""; } break; default: // do the main thing $feature = "

Ever since babe started dishin', Aziz has not been his usual chatty self. Help him get his gab back.

"; } // CONSTANT CONTENT $ad = "

"; $blog = "

"; $footer = "
"; ?> #TimesUpAziz

#TimesUpAziz