Rename the AUR software to aurweb
[aur.git] / web / html / pkgdel.php
blob45a3ad418f6dd2a4a2a09028b196b454837fb05a
1 <?php
3 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
5 include_once("aur.inc.php");
6 include_once("pkgfuncs.inc.php");
8 set_lang();
9 check_sid();
11 html_header(__("Package Deletion"));
13 if (has_credential(CRED_PKGBASE_DELETE)): ?>
14 <div class="box">
15 <h2><?= __('Delete Package: %s', htmlspecialchars($pkgbase_name)) ?></h2>
16 <p>
17 <?= __('Use this form to delete the package base %s%s%s and the following packages from the AUR: ',
18 '<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
19 </p>
20 <ul>
21 <?php foreach(pkgbase_get_pkgnames($base_id) as $pkgname): ?>
22 <li><?= htmlspecialchars($pkgname) ?></li>
23 <?php endforeach; ?>
24 </ul>
25 <p>
26 <?= __('Deletion of a package is permanent. '); ?>
27 <?= __('Select the checkbox to confirm action.') ?>
28 </p>
29 <form action="<?= get_uri('/pkgbase/'); ?>" method="post">
30 <fieldset>
31 <input type="hidden" name="IDs[<?= $base_id ?>]" value="1" />
32 <input type="hidden" name="ID" value="<?= $base_id ?>" />
33 <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
34 <?php if (isset($_GET['via'])): ?>
35 <input type="hidden" name="via" value="<?= intval($_GET['via']) ?>" />
36 <?php endif; ?>
37 <p><input type="checkbox" name="confirm_Delete" value="1" />
38 <?= __("Confirm package deletion") ?></p>
39 <p><input type="submit" class="button" name="do_Delete" value="<?= __("Delete") ?>" /></p>
40 </fieldset>
41 </form>
42 </div>
44 <?php else:
45 print __("Only Trusted Users and Developers can delete packages.");
46 endif;
48 html_footer(AURWEB_VERSION);