2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or */
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /************************************************************************/
\r
15 define('AT_INCLUDE_PATH', '../../../include/');
\r
16 require (AT_INCLUDE_PATH.'vitals.inc.php');
\r
17 admin_authenticate(AT_ADMIN_PRIV_PATCHER);
\r
19 if (isset($_POST['remove'], $_POST['myown_patch_id']))
\r
21 header('Location: patch_delete.php?myown_patch_id='.$_POST['myown_patch_id']);
\r
24 else if (isset($_POST['edit'], $_POST['myown_patch_id']))
\r
26 header('Location: patch_edit.php?myown_patch_id='.$_POST['myown_patch_id']);
\r
29 else if (!empty($_POST) && !isset($_POST['myown_patch_id'])) {
\r
30 $msg->addError('NO_ITEM_SELECTED');
\r
33 require(AT_INCLUDE_PATH.'header.inc.php');
\r
36 <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
\r
37 <table summary="" class="data" rules="cols" align="center" style="width: 95%;">
\r
41 <th scope="col"> </th>
\r
42 <th scope="col"><?php echo _AT('atutor_patch_id'); ?></th>
\r
43 <th scope="col"><?php echo _AT('atutor_version_to_apply'); ?></th>
\r
44 <th scope="col"><?php echo _AT('description'); ?></th>
\r
45 <th scope="col"><?php echo _AT('last_modified'); ?></th>
\r
51 <div class="row buttons">
\r
52 <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" />
\r
53 <input type="submit" name="remove" value="<?php echo _AT('remove'); ?>" />
\r
58 <td colspan="5"></td>
\r
63 $include_javascript = true;
\r
65 $sql = "SELECT * from ".TABLE_PREFIX."myown_patches m order by last_modified desc";
\r
67 $result = mysql_query($sql, $db) or die(mysql_error());
\r
69 if (mysql_num_rows($result) == 0)
\r
73 <td colspan="5"><?php echo _AT('none_found'); ?></td>
\r
79 while ($row = mysql_fetch_assoc($result))
\r
82 <tr onmousedown="document.form['m<?php echo $row['myown_patch_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['myown_patch_id']; ?>">
\r
83 <td width="10"><input type="radio" name="myown_patch_id" value="<?php echo $row['myown_patch_id']; ?>" id="m<?php echo $row['myown_patch_id']; ?>" <?php if ($row['myown_patch_id']==$_POST['myown_patch_id']) echo 'checked'; ?> /></td>
\r
84 <td><label for="m<?php echo $row['myown_patch_id']; ?>"><?php echo $row['atutor_patch_id']; ?></label></td>
\r
85 <td><?php echo $row['applied_version']; ?></td>
\r
86 <td><?php echo $row['description']; ?></td>
\r
87 <td><?php echo $row['last_modified']; ?></td>
\r
99 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>
\r