-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-topics.php
49 lines (49 loc) · 2.71 KB
/
update-topics.php
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
<div class="form-container">
<div class="navigation admin">
<a href="<?php echo getUrl("admin/approve-topic/"); ?>" class="first">Approve Topic</a>
<a href="<?php echo getUrl("admin/approve-answer/"); ?>">Approve Answer</a>
<a class="selected">Update Topic</a>
<a href="<?php echo getUrl("admin/update-answer/"); ?>">Update Answer</a>
</div>
<form action="<?php echo getUrl("admin/topic-updated/"); ?>" onsubmit="return validate_form(this);" method="post">
<div class="new-topic">
What does it feel like to <input id="new_topic" name="new_topic" type="text" value="<?php echo htmlClean ($_SESSION['a_approvedTopics'][$_SESSION['a_selectedApprovedTopic']['lcv']]['topic']); ?>" onkeydown="return processEnterKey(event)">?
</div>
<div class="user-input">
<div class="medium-text-line">
<div class="answer-update-date">
<b>Date Last Updated: </b><?php echo date('Y-m-d', strtotime($_SESSION['a_approvedTopics'][$_SESSION['a_selectedApprovedTopic']['lcv']]['dt_updated'])); ?>
</div>
<div class="answer-author">
<b>Submitted by: </b><?php echo htmlClean ($_SESSION['a_approvedTopics'][$_SESSION['a_selectedApprovedTopic']['lcv']]['name']); ?>
</div>
<div class="answer-create-date">
<b>Date Submitted: </b><?php echo date('Y-m-d', strtotime($_SESSION['a_approvedTopics'][$_SESSION['a_selectedApprovedTopic']['lcv']]['dt_created'])); ?>
</div>
</div>
<div class="categories-wrapper push-down">
<?php
// Cycle through all the categories
foreach ($_SESSION['a_categories'] as $lcv => $a_category) {
print " <div class=\"category";
if ($lcv == 0) { print " first"; }
print "\">";
print " <input type=\"radio\" name=\"category_id\" id=\"category_id-".$a_category['id']."\" value=\"".$a_category['id']."\"";
if ($lcv == $_SESSION['a_selectedCategory']['lcv']) { print " checked=\"checked\""; }
print "/>";
print " <label for=\"category_id-".$a_category['id']."\">".$a_category['category']."<span>".$a_category['description']."</span></label>";
print " </div>";
}
?>
</div>
<div class="input-text-line">
<div class="submit-button right-button">
<input type="submit" name="submit_button" value="Remove" onClick="validate=false;">
</div>
<div class="submit-button">
<input type="submit" name="submit_button" value="Update" id="accept_or_update">
</div>
</div>
</div>
</form>
</div>