}
else {
foreach ($actionstatus->actions as $value) {
- $actions .= " <a href='index.php?$value=y&order=$record->id'>{$authstrs->$value}</a> ";
+ $actions .= " <a href='index.php?$value=y&sesskey=$USER->sesskey&order=$record->id'>{$authstrs->$value}</a> ";
}
}
}
}
- echo "<form action='index.php' method='post'>\n";
- echo "<input type='hidden' name='order' value='$orderno'>\n";
+ echo "<form action=\"index.php\" method=\"post\">\n";
+ echo "<input type=\"hidden\" name=\"order\" value=\"$orderno\">\n";
+ echo "<input type=\"hidden\" name=\"sesskey\" value=\"" . sesskey() . "\" />";
$settled = settled($order);
$status = authorize_get_status_action($order);
}
$table->data[] = array(" ", "<hr size='1' noshade>\n");
- if (!empty($cmdcapture)) { // CAPTURE
+ if (!empty($cmdcapture) and confirm_sesskey()) { // CAPTURE
if (!in_array(ORDER_CAPTURE, $status->actions)) {
$a->action = $authstrs->capture;
error(get_string('youcantdo', 'enrol_authorize', $a));
if (empty($confirm)) {
$table->data[] = array("<b>$strs->confirm:</b>",
- "$authstrs->captureyes<br /><a href='index.php?order=$orderno&".ORDER_CAPTURE."=y&confirm=y'>$strs->yes</a>
+ "$authstrs->captureyes<br /><a href='index.php?order=$orderno&sesskey=$USER->sesskey&".ORDER_CAPTURE."=y&confirm=y'>$strs->yes</a>
<a href='index.php?order=$orderno'>$strs->no</a>");
}
else {
}
print_table($table);
}
- elseif (!empty($cmdrefund)) { // REFUND
+ elseif (!empty($cmdrefund) and confirm_sesskey()) { // REFUND
if (!in_array(ORDER_REFUND, $status->actions)) {
$a->action = $authstrs->refund;
error(get_string('youcantdo', 'enrol_authorize', $a));
}
print_table($table);
}
- elseif (!empty($cmdvoid)) { // VOID
+ elseif (!empty($cmdvoid) and confirm_sesskey()) { // VOID
if (!in_array(ORDER_VOID, $status->actions)) {
$a->action = $authstrs->void;
error(get_string('youcantdo', 'enrol_authorize', $a));
}
print_table($table);
}
- elseif (!empty($cmddelete)) { // DELETE
+ elseif (!empty($cmddelete) and confirm_sesskey()) { // DELETE
if (!in_array(ORDER_DELETE, $status->actions)) {
$a->action = $authstrs->delete;
error(get_string('youcantdo', 'enrol_authorize', $a));
else {
foreach ($substatus->actions as $vl) {
$subactions .=
- "<a href='index.php?$vl=y&order=$orderno&suborder=$rf->id'>{$authstrs->$vl}</a> ";
+ "<a href='index.php?$vl=y&sesskey=$USER->sesskey&order=$orderno&suborder=$rf->id'>{$authstrs->$vl}</a> ";
}
}
$t2->data[] = array($rf->transid,