aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAedriel Kyle Javier2023-06-11 01:02:05 -0400
committerAedriel Kyle Javier2023-06-11 01:02:05 -0400
commit8e896b8b3025b461ba8aaea091308cb113beef6e (patch)
tree089376fc847b1a1a62155106906c13bdc3e90f10
parentae514c58c2c8cdb647f9a1112e93481ed8d1361a (diff)
refactor: code formatting
Diffstat (limited to '')
-rw-r--r--download.php527
-rw-r--r--index.php32
2 files changed, 303 insertions, 256 deletions
diff --git a/download.php b/download.php
index 4e6039c..f54f99b 100644
--- a/download.php
+++ b/download.php
@@ -25,7 +25,7 @@
souce community throughout the years… <b>πŸ™Œ Thank you! πŸ€—</b> </p>
<hr>
- <?php include "includes/nav-header.php" ?>
+ <?php include "includes/nav-header.php"; ?>
<br>
<h3 class="centered">πŸŽ‰ your procrastiSlides .pdf presentation has been generated successfully!!! 🍾
@@ -34,342 +34,393 @@
<h3 class="centered">πŸ“‚ your download link is below: πŸ—ƒ
</h3>
<div class="centered">
- <?php
+ <?php if (isset($_POST["90sMakeUpCommercial"])) {
- if(isset($_POST['90sMakeUpCommercial']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
-
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/90sMakeUpCommercial.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/90sMakeUpCommercial.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
- <?php
+ <?php
+ } ?>
- if(isset($_POST['chicagoOlives']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["chicagoOlives"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/chicagoOlives.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/chicagoOlives.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
- <?php
+ <?php
+ } ?>
- if(isset($_POST['cleanMetropolis']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["cleanMetropolis"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/cleanMetropolis.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/cleanMetropolis.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
- <?php
+ <?php
+ } ?>
- if(isset($_POST['ohioCustard']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["ohioCustard"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/ohioCustard.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/ohioCustard.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
- <?php
+ <?php
+ } ?>
- if(isset($_POST['raleighAroundMe']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["raleighAroundMe"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/raleighAroundMe.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/raleighAroundMe.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
- <?php
+ <?php
+ } ?>
- if(isset($_POST['earlyCupertino']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["earlyCupertino"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/earlyCupertino.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/earlyCupertino.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
+ <?php
+ } ?>
- <?php
- if(isset($_POST['defaultIsKing']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["defaultIsKing"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/defaultIsKing.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/defaultIsKing.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
<?php
+ } ?>
- if(isset($_POST['strengthInNumbers']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["strengthInNumbers"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/strengthInNumbers.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/strengthInNumbers.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
<?php
+ } ?>
- if(isset($_POST['thatMagazine']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["thatMagazine"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/thatMagazine.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/thatMagazine.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
<?php
+ } ?>
- if(isset($_POST['cuppertinoIsh']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["cuppertinoIsh"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] =
+ uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/cuppertinoIsh.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/cuppertinoIsh.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
<?php
+ } ?>
- if(isset($_POST['lazyProfessor']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["lazyProfessor"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] =
+ uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/lazyProfessor.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/lazyProfessor.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ // sleep(1);
+ ?>
- <?php } ?>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
<?php
+ } ?>
- if(isset($_POST['redmond2003']))
- {
- $_SESSION['pres'] = uniqid('pres', true) . '.md';
- $_SESSION['push'] = uniqid('push', true) . '.md';
- $_SESSION['convert'] = uniqid('convert', true) . '.md';
- $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+ <?php if (isset($_POST["redmond2003"])) {
- $pres = $_SESSION['pres']; // filename of the template file with metadata
- $push = $_SESSION['push']; // filename of where the user data is stored
- $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
- $filename = $_SESSION['filename']; // output file name
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] =
+ uniqid("procrastiSlides_", true) . ".pdf";
+ $pres = $_SESSION["pres"]; // filename of the template file with metadata
+ $push = $_SESSION["push"]; // filename of where the user data is stored
+ $convert = $_SESSION["convert"]; // concatanated file to be converted to .pdf
+ $filename = $_SESSION["filename"]; // output file name
- $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
- // $_SESSION['user-input'] = $_POST['user-input'];
- $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+ $userMarkdown = $_SESSION["user-input"]; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/redmond2003.md output/'$push' > output/'$convert'");
- shell_exec($conversion);
- // sleep(1); ?>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/redmond2003.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
+
+ // sleep(1);
+ ?>
- <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+ <h2><a href="output/<?php echo $_SESSION[
+ "filename"
+ ]; ?>">download presentation</a></h2>
- <?php } ?>
+ <?php
+ } ?>
@@ -379,7 +430,7 @@
<br><br>
<footer>
- <?php include "includes/nav-footer.php" ?>
+ <?php include "includes/nav-footer.php"; ?>
</footer>
</body>
diff --git a/index.php b/index.php
index 26bea81..aec2b2d 100644
--- a/index.php
+++ b/index.php
@@ -1,14 +1,12 @@
<?php
- session_start();
-
- ?>
+session_start(); ?>
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
- <link rel="stylesheet" href="css/style.css?v=<?=time();?>">
+ <link rel="stylesheet" href="css/style.css?v=<?= time() ?>">
<link rel = "icon" href = "img/site-icon.webp" type = "image/x-icon">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
<title>procrastiSlides: great for procratinators who need to get a presentation out, quick! πŸ˜†</title>
@@ -26,16 +24,12 @@
<h3 class="centered">πŸƒ great for procratinators who need to get a presentation out, quick! πŸ‘Ÿ</h3>
<h3 class="centered">🏫 try copy and pasting your school notes! that might even work πŸ˜‚</h3>
<hr>
- <?php
- include "includes/nav-header.php";
- $_SESSION['user-input'] = null;
+ <?php
+ include "includes/nav-header.php";
+ $_SESSION["user-input"] = null;
?>
- <?php if(isset($_POST['compile']))
- {
-
- $_SESSION['user-input'] = $_POST['user-input'];
-
- ?>
+ <?php if (isset($_POST["compile"])) {
+ $_SESSION["user-input"] = $_POST["user-input"]; ?>
<div class="centered">
<h3>🎨 please select your presentation theme 🎭</h3>
<form class="" action="download.php" method="post">
@@ -98,13 +92,15 @@
</form>
</div>
<br>
- <?php } ?>
- <?php if(!isset($_POST['compile']))
- { ?>
+ <?php
+ } ?>
+ <?php if (!isset($_POST["compile"])) { ?>
<div>
<h2 class="centered">plain text or markdown goes here:</h2>
<form class="" action="index.php" method="post">
- <textarea id="user-input" name="user-input" rows="8" cols="80"><?php echo $_SESSION['user-input']; ?></textarea>
+ <textarea id="user-input" name="user-input" rows="8" cols="80"><?php echo $_SESSION[
+ "user-input"
+ ]; ?></textarea>
<div class="centered">
<button type="submit" name="compile">create presentation</button>
</div>
@@ -153,7 +149,7 @@
<?php } ?>
<br>
<footer>
- <?php include "includes/nav-footer.php" ?>
+ <?php include "includes/nav-footer.php"; ?>
</footer>
</body>
</html>