diff options
| -rw-r--r-- | download.php | 527 | ||||
| -rw-r--r-- | index.php | 32 |
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> @@ -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> |
