actions_form.php 1.78 KB
Newer Older
1
<?php if (!$USE_VIRTUAL_URLS): ?>
2
<div class="box">
Lukas Fleischer's avatar
Lukas Fleischer committed
3
	<form action="<?= htmlspecialchars(get_pkg_uri($row['Name']), ENT_QUOTES); ?>" method="post">
Lukas Fleischer's avatar
Lukas Fleischer committed
4
		<fieldset>
Lukas Fleischer's avatar
Lukas Fleischer committed
5
6
7
			<input type="hidden" name="IDs[<?= $row['ID'] ?>]" value="1" />
			<input type="hidden" name="ID" value="<?= $row['ID'] ?>" />
			<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
8
9

		<?php if (user_voted($uid, $row['ID'])): ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
10
			<input type="submit" class="button" name="do_UnVote" value="<?= __("UnVote") ?>" />
11
		<?php else: ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
12
			<input type="submit" class="button" name="do_Vote" value="<?= __("Vote") ?>" />
13
		<?php endif; ?>
14
15

		<?php if (user_notify($uid, $row['ID'])): ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
16
			<input type="submit" class="button" name="do_UnNotify" value="<?= __("UnNotify") ?>" title="<?= __("No New Comment Notification") ?>" />
17
		<?php else: ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
18
			<input type="submit" class="button" name="do_Notify" value="<?= __("Notify") ?>" title="<?= __("New Comment Notification") ?>" />
19
		<?php endif; ?>
Loui Chang's avatar
Loui Chang committed
20

21
		<?php if ($row["OutOfDateTS"] === NULL): ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
22
			<input type="submit" class="button" name="do_Flag" value="<?= __("Flag Out-of-date") ?>" />
23
24
		<?php elseif (($row["OutOfDateTS"] !== NULL) &&
		($uid == $row["MaintainerUID"] || $atype == "Trusted User" || $atype == "Developer")): ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
25
			<input type="submit" class="button" name="do_UnFlag" value="<?= __("UnFlag Out-of-date") ?>" />
26
		<?php endif; ?>
Loui Chang's avatar
Loui Chang committed
27
			
28
		<?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
Lukas Fleischer's avatar
Lukas Fleischer committed
29
30
			<input type="submit" class="button" name="do_Delete" value="<?= __("Delete Packages") ?>" />
			<label for="merge_Into" ><?= __("Merge into") ?></label>
31
32
			<input type="text" id="merge_Into" name="merge_Into" />
			<input type="checkbox" name="confirm_Delete" value="1" />
Lukas Fleischer's avatar
Lukas Fleischer committed
33
			<?= __("Confirm") ?>
34
35
		<?php endif; ?>

Lukas Fleischer's avatar
Lukas Fleischer committed
36
		</fieldset>
Loui Chang's avatar
Loui Chang committed
37
38
	</form>
</div>
39
<?php endif; ?>