Files
        @ 5e7fdb927b36
    
        
              Branch filter: 
        
    Location: SlatePermutate/feedback.php - annotation
        
            
            5e7fdb927b36
            4.3 KiB
            text/x-php
        
        
    
    Use a different way to fix the reported time for saved_schedules created in the future.
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111  | eab20c15a6b2 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 1cb6f6105b45 9897baead6b3 9897baead6b3 79e1cca91899 ae8cada84fa2 ae8cada84fa2 7b489f5ccba0 7b489f5ccba0 7b489f5ccba0 7b489f5ccba0 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 6efbb3695b27 6efbb3695b27 6efbb3695b27 6efbb3695b27 6efbb3695b27 6efbb3695b27 7b489f5ccba0 7b489f5ccba0 7a6777d84d07 eab20c15a6b2 eab20c15a6b2 d1667e00dc71 d1667e00dc71 d1667e00dc71 d1667e00dc71 7a6777d84d07 5bc9711b7884 d1667e00dc71 d1667e00dc71 d1667e00dc71 d1667e00dc71 5bc9711b7884 d1667e00dc71 d1667e00dc71 d1667e00dc71 d1667e00dc71 d1667e00dc71 d1667e00dc71 d1667e00dc71 d1667e00dc71 eab20c15a6b2 eab20c15a6b2 6efbb3695b27 eab20c15a6b2 79e1cca91899 79e1cca91899 7b489f5ccba0 acb3d2aace0c 760a7551f2db 760a7551f2db 760a7551f2db 760a7551f2db 760a7551f2db d1667e00dc71 760a7551f2db acb3d2aace0c 79e1cca91899 79e1cca91899 5bc9711b7884 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 9897baead6b3 d1667e00dc71 eab20c15a6b2 eab20c15a6b2 eab20c15a6b2 7a6777d84d07  | <?php 
/*
 * Copyright 2010 Nathan Gelderloos, Ethan Zonca, Nathan Phillip Brink
 *
 * This file is part of SlatePermutate.
 *
 * SlatePermutate is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * SlatePermutate is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with SlatePermutate.  If not, see <http://www.gnu.org/licenses/>.
 */
include_once 'inc/class.page.php';
require_once 'inc/class.schedule.php';
$feedbackpage = page::page_create('Feedback');
$feedbackpage->head();
$ipi = $_SERVER['REMOTE_ADDR'];
$fromdom = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$httpagenti = $_SERVER['HTTP_USER_AGENT'];
$referrer = '';
if (!empty($_SERVER['HTTP_REFERER']))
  $referrer = $_SERVER['HTTP_REFERER'];
if (!empty($_POST['referrer']))
  $referrer = $_POST['referrer'];
$saved_schedules = array();
if (!empty($_SESSION['saved']))
  foreach ($_SESSION['saved'] as $key => $val)
    $saved_schedules[] = '<a href="' . htmlentities(Schedule::url($key)) . '">' . htmlentities($key) . '</a>';
$saved_schedules = implode(', ', $saved_schedules);
/* some prefill support */
$school = $feedbackpage->get_school();
$feedback_text = '';
if (isset($_GET['feedback']))
  $feedback_text = $_GET['feedback'];
$n = "\n";
?>
<form action="feedback-submit.php" method="post">
<div id="feedback-form-content">
<input type="hidden" id="ip" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" id="fromdom" name="fromdom" value="<?php echo $fromdom ?>" />
<input type="hidden" id="httpagent" name="httpagent" value="<?php echo $httpagenti ?>" />
<table>
<tr><td><label for="nameis">Name: </label></td><td><input type="text" id="nameis" name="nameis" size="20" /></td></tr>
<tr><td><label for="visitormail">Email:</label></td><td><input type="text" id="visitormail" name="visitormail" size="20" /></td></tr>
<tr><td><label for="school">School: </label></td><td><input type="text" id="school" name="school" value="<?php echo htmlentities($school['id']); ?>" size="20" /> <span class="graytext">(if relevant to your feedback)</span></td></tr>
  <tr><td><label for="referrer">Relevant Page:</label></td><td><input type="text" id="referrer" name="referrer" value="<?php echo htmlentities($referrer); ?>" size="20" /> <span class="graytext">(if relevant to your feedback)</span></td></tr>
</table>
<br/>
<div id="ratings">
  <div id="ratings-label">Overall Rating:</div>
  <input checked="checked" id="rating-great" name="rating" type="radio" value="Great" /><label for="rating-great">Great</label>
  <input id="rating-usable" name="rating" type="radio" value="Usable" /><label for="rating-usable">Usable</label>
  <input id="rating-buggy" name="rating" type="radio" value="Buggy/Hard to Use" /><label for="rating-buggy">Buggy/Hard to Use</label>
  <input id="rating-unknown" name="rating" type="radio" value="Don't know" /><label for="rating-unknown">Don't Know <!-- ' --></label>
</div>
<h3>General Comments</h3>
<p>
  <textarea name="feedback" rows="6" cols="40"><?php echo htmlentities($feedback_text); ?></textarea>
</p>
<?php
    if ($use_captcha)
    {
      echo '' . $n
      . '  <h3>Captcha</h3>' . $n
      . '<p>' . $n
      . '  <img id="captcha_img" src="captcha_img.php" alt="captcha image" /><br />' . $n
      . '  <label for="captcha_code">Enter the obfuscated text from the above image:</label><br />' . $n
      . '  <input id="captcha_code" name="captcha_code" type="text" />' . $n
      . '</p>' . $n;
    }
?>
<input class="gray" type="submit" value="Send Feedback" />
<?php if (!empty($saved_schedules)): ?>
<p class="graytext" style="margin-top: 20pt;">
  The following information will also be submitted when you send feedback:
</p>
<table class="graytext">
  <tr>
    <th>Type</th>
    <th>Value</th>
  </tr>
  <tr>
  <td>Saved Schedules:</td>
    <td><?php echo $saved_schedules; ?></td>
  </tr>
</table>
<?php endif; ?>
</div>
</form>
<?php
$feedbackpage->foot();
 |