$week = array("Sun", "Mon", "Tues", "Wed", "Thu", "Fri", "Sat");
/* Contact roles. */
- $roles = array("Staff", "Driver", "Requester", "Beneficiary", "Donor");
+ $roles = array("Staff", "Driver", "Referrer", "Beneficiary", "Donor");
$ROLE_STAFF = 1 << 0;
$ROLE_DRIVER = 1 << 1;
$ROLE_REQUESTER = 1 << 2;
$role_string = get_contact_role_string($contact);
if ($role_string) echo " $role_string";
if ($role & $GLOBALS['ROLE_DONOR']) printf(" <a class=\"small\" href=\"/donation/from/contact/%s/%d\">Donations</a>", urlencode($contact->getDisplayname()), $contact->getId());
- if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" <a class=\"small\" href=\"/order/from/requester/%s/%d\">Requested</a>", urlencode($contact->getDisplayname()), $contact->getId());
+ if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" <a class=\"small\" href=\"/order/from/referrer/%s/%d\">Referred</a>", urlencode($contact->getDisplayname()), $contact->getId());
if ($role & $GLOBALS['ROLE_BENEFICIARY']) printf(" <a class=\"small\" href=\"/order/to/beneficiary/%s/%d\">Orders</a>", urlencode($contact->getDisplayname()), $contact->getId());
if (check_admin(1)) {
echo " " . $contact->getDeleteLink();
$role_string = get_contact_role_string($contact);
if ($role_string) echo " $role_string";
if ($role & $GLOBALS['ROLE_DONOR']) printf(" <a class=\"small\" href=\"/donation/from/contact/%s/%d\">Donations</a>", urlencode($contact->getDisplayname()), $contact->getId());
- if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" <a class=\"small\" href=\"/order/from/requester/%s/%d\">Requested</a>", urlencode($contact->getDisplayname()), $contact->getId());
+ if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" <a class=\"small\" href=\"/order/from/referrer/%s/%d\">Referred</a>", urlencode($contact->getDisplayname()), $contact->getId());
if ($role & $GLOBALS['ROLE_BENEFICIARY']) printf(" <a class=\"small\" href=\"/order/to/beneficiary/%s/%d\">Orders</a>", urlencode($contact->getDisplayname()), $contact->getId());
if (check_admin(1)) {
echo " " . $contact->getDeleteLink();
if (isset($contact_id)) $contact = get_contact_by_id($contact_id);
else if ($contact_name) $contact = get_contact_by_name($contact_name);
if ($contact) {
- echo "<p>Orders from requester " . $contact->getLink() . ":";
+ echo "<p>Orders from referrer " . $contact->getLink() . ":";
return show_orders($offset, $per_page, $contact->getId(), null, $state_mask);
}
else echo "<p>No such contact!</p>\n";
echo " <td>"; show_date_form("date", $order->getDate()); echo "</td>\n";
echo "</tr>\n";
- /* Requester. */
+ /* Referrer. */
echo "<tr>\n";
- echo " <td>Requester</td>\n";
+ echo " <td>Referrer</td>\n";
echo " <td><select name=\"requester_id\">\n";
option("requester_id", null, "");
$contacts = get_area_requesters();
$requester = get_contact_by_id($requester_id);
if (! $requester) {
- echo "<p>Invalid requester!</p>\n";
+ echo "<p>Invalid referrer!</p>\n";
return false;
}
}
}
else if ($parameters[0] == "from") {
- /* /order/from/requester/Iain+Patterson/4 */
+ /* /order/from/referrer/Iain+Patterson/4 */
switch ($parameters[1]) {
- case "requester":
+ case "referrer":
$contact_id = $parameters[3];
$q = new ContactQuery;
$contact = $q->findOneById($contact_id);