aboutsummaryrefslogtreecommitdiffstats
path: root/download.php
diff options
context:
space:
mode:
authorBlista Kanjo2023-05-29 13:58:17 -0400
committerBlista Kanjo2023-05-29 13:58:17 -0400
commitbfe25a65e46475cd76e64b64c47bed08f992b80c (patch)
tree6555d5456aa42832771c6181d271fe6916ff80f9 /download.php
parentda5b36a7db46e047fce8c76e8f936c25993f3b97 (diff)
notForProd: added test files for 16:9 themes
Diffstat (limited to 'download.php')
-rw-r--r--download.php55
1 files changed, 55 insertions, 0 deletions
diff --git a/download.php b/download.php
index ea08e52..405c6d8 100644
--- a/download.php
+++ b/download.php
@@ -36,6 +36,61 @@
<div class="centered">
<?php
+ if(isset($_POST['test169']))
+ {
+ $_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";
+
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec("cat output/test169.md output/'$push' > output/'$convert'");
+ shell_exec($conversion);
+ // sleep(1); ?>
+
+ <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';
+
+ $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";
+
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec("cat output/defaultIsKing.md output/'$push' > output/'$convert'");
+ shell_exec($conversion);
+ // sleep(1); ?>
+
+ <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+
+ <?php } ?>
+ <?php
+
if(isset($_POST['defaultIsKing']))
{
$_SESSION['pres'] = uniqid('pres', true) . '.md';