SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/demo_form.php

  1. <?php
  2. use Sprout\Helpers\Enc;
  3. use Sprout\Helpers\Form;
  4. use Sprout\Helpers\Router;
  5.  
  6. Form::setData($data);
  7. ?>
  8.  
  9. <h2>Existing files</h2>
  10. <p><a href="<?= Enc::html(Router::$current_uri); ?>?file=<?= Enc::url('43_already.jpg'); ?>">43_already.jpg</a></p>
  11. <p><a href="<?= Enc::html(Router::$current_uri); ?>?file=<?= Enc::url('39_oh.mp3'); ?>">39_oh.mp3</a></p>
  12. <p><a href="<?= Enc::html(Router::$current_uri); ?>?file=">BLANK</a></p>
  13.  
  14. <form method="post">
  15. <?php
  16. Form::nextFieldDetails('File', false);
  17. echo Form::chunkedUpload('file', [], ['sess_key' => 'testing_file_upload']);
  18. ?>
  19.  
  20. <p><input type="submit" class="button"></p>
  21. </form>