<?php
  function add_to_addressbook($addr)
  {
    global $phpgw_info;
    global $phpgw;

    $str = "<a href=\""
	 . $phpgw->link('/addressbook/add.php',"add_email=".urlencode($addr->adl))
	 . "\" target=\"_new\"><img src=\"".$phpgw_info["server"]["app_images"]
	 . "/sm_envelope.gif\" width=\"10\" height=\"8\" alt=\""
         . lang("add to addressbook")."\" border=\"0\" "
	 . "align=\"ABSMIDDLE\"></a>";
    return $str;
  }

  function monitor($on,$folder)
  {
    global $phpgw_info;
    global $phpgw;

    if ($on) {
      $str = "<a href=\"".$phpgw->link('/nntp/monitor.php'
	   , "folder=".urlencode($folder))."\" target=\"_new\"><img src=\""
	   . $phpgw_info["server"]["app_images"]."/sm_envelope.gif\" "
	   . "width=\"10\" height=\"8\" alt=\"".lang("monitor")."\" "
	   . "border=\"0\" align=\"ABSMIDDLE\"></a>";
    } else {
      $str = "<img src=\"".$phpgw_info["server"]["app_images"]
	   . "/sm_envelope.gif\" width=\"10\" height=\"8\" alt=\""
	   . lang("monitor")."\" border=\"0\" align=\"ABSMIDDLE\">";

    }
    return $str;
  }

  function send_to($addr,$folder)
  {
    global $phpgw_info;
    global $phpgw;

    $codecv = CreateObject('phpgwapi.codecv');
    $str = "<a href=\"".$phpgw->link('/nntp/compose.php',"folder="
	 . urlencode($folder)."&to=".urlencode($addr->adl))."\">"
	 . $phpgw->strip_html($codecv->out2in($addr->personal))."</a>";
    return $str;
  }
?>
