commit a555987da53aac1dfe6ceeda704fdb8fdd2bd77e Author: tcourage Date: Sat Apr 2 10:25:27 2016 -0400 Initial commit, v0.2 BETA diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..fce8b63 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +## Meme Machine diff --git a/browse/browse.php b/browse/browse.php new file mode 100644 index 0000000..9ffb2c1 --- /dev/null +++ b/browse/browse.php @@ -0,0 +1,78 @@ +'; +echo ''; +echo 'Browse - Meme Machine'; +echo ''; +echo ''; +echo ''; +echo '
'; +echo '

Meme Machine

'; + +$dir = "../uploads"; +$fileType = array( + 'jpg', + 'jpeg', + 'png', + 'gif' +); +$servername = "localhost"; +$username = "root"; +$password = "Flamingh0m()"; +$dbname = "memes"; +$count = 0; + +$conn = mysqli_connect($servername, $username, $password, $dbname); + +if (!$conn) { + die ("CONNECTION FAIL " .mysqli_connect_error()); +} else { +} + +if(isset($_POST["browse"])) { + echo '

Category: ' . $_POST["memeCategory"] . '

'; + $memeCategory = mysqli_real_escape_string($conn, $_POST["memeCategory"]); + $browse = "SELECT * FROM memes WHERE category = \"$memeCategory\""; + $result = mysqli_query($conn, $browse); + + if (mysqli_num_rows($result) > 0) { + while($row = mysqli_fetch_assoc($result)) { + $count++; + echo '' . $row['; + if ($count == 3) { + echo '
'; + } + } + } else { + echo "This category is empty. Please choose another or start uploading"; + ?> +

 

+ Back + Category: all'; + $browse = "SELECT * FROM memes"; + $result = mysqli_query($conn, $browse); + //browse all code goes here + if (mysqli_num_rows($result) > 0) { + while($row = mysqli_fetch_assoc($result)) { + $count++; + echo '' . $row['; + if ($count == 3) { + echo '
'; + } + } + } else { + echo "Shit, something broke. Try again! Or if the problem persists contact the system administrator"; + ?> +

 

+ Back + '; +echo ''; +?> diff --git a/browse/index.php b/browse/index.php new file mode 100644 index 0000000..b4a1db8 --- /dev/null +++ b/browse/index.php @@ -0,0 +1,149 @@ + + + + Meme Machine Gallery + + + + + +
+

Meme Machine

+

Search by name

+
+ + Search: + + +
+ +
+ +
+

- OR -

+
+ +
+
+

Browse by category:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LOLWUTWTFFuck YeahFUCK!Alcohol
NopeFuck ThisDisgustSTFU/Shut UpRIP in piece
UpvoteDownvoteMind BlownFilthy FrankInsults
Haters Gonna HateDidn't ReadCool Story BroUMAD BRO?Impressed
Deal With ItAnimalsParty HardHitler/Nazis/HolocaustShocked
MetaGames/GamingFailKill YourselfScary
ThinkingMuslims/TerroristsRicky ComicBe a shame if...History
MilitaryGunsInforgraphErections/FappingCats
Joan CornellaThis sucksFuck YouNSFWMISC
PepePoliticalSanicCringeMorbid
Poland BallCanada'MuricaVisserFite me
Member-SpecificThe Fuck You Say?
+
+ + +
+ + + + + + + diff --git a/index.php b/index.php new file mode 100644 index 0000000..b546e08 --- /dev/null +++ b/index.php @@ -0,0 +1,146 @@ + + + Meme Machine + + + + + +
+

The Meme Machine

+
+

Name/Description of meme:

+

Category:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LOLWUTWTFFuck YeahFUCK!Alcohol
NopeFuck ThisDisgustSTFU/Shut UpRIP in piece
UpvoteDownvoteMind BlownFilthy FrankInsults
Haters Gonna HateDidn't ReadCool Story BroUMAD BRO?Impressed
Deal With ItAnimalsParty HardHitler/Nazis/HolocaustShocked
MetaGames/GamingFailKill YourselfScary
ThinkingMuslims/TerroristsRicky ComicBe a shame if...History
MilitaryGunsInforgraphErections/FappingCats
Joan CornellaThis sucksFuck YouNSFWMISC
PepePoliticalSanicCringeMorbid
Poland BallCanada'MuricaVisserFite me
Member-SpecificThe Fuck You Say?
+
+

+

+
+
+
+
+

Accepted file formats: .gif, .png, .jpg, .jpeg

+
+
+ + +
+
+
+
+
+
Meme Machine v0.2.0 BETA
+
+ diff --git a/upload.php b/upload.php new file mode 100644 index 0000000..72debe0 --- /dev/null +++ b/upload.php @@ -0,0 +1,86 @@ + 75000000) { + echo "Sorry, your file is too large."; + $uploadOk = 0; +} +// Allow certain file formats +if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" +&& $imageFileType != "gif" ) { + echo "Only JPG, JPEG, PNG & GIF files are allowed."; + $uploadOk = 0; +} + +// Check if $uploadOk is set to 0 by an error +if ($uploadOk == 0) { + echo "
"; + echo "There was an error. Double check your submission and try again."; + ?> +

 

+ Back + +

 

+ Back + " . mysqli_error($conn); + } + } else { + echo "Sorry, there was an error uploading your file."; + ?> +

 

+ Back +