anchor.diff:      catch
           _:_ -> "0"
       end.
  +
  +%%--------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Get mime type from extension.
  +%% @spec doShowSchedule(User) -> Html
  +%% @end
  +%%--------------------------------------------------------------------
  +mime_type(FileName) ->
  +        "." ++ Extension = filename:extension(FileName),
  +    MimeTypes = mime_types(),
  +    proplists:get_value(string:to_lower(Extension), MimeTypes,
  +                        "application/octet-stream").
  +
  +mime_types() ->
  +    MimeTypesFile = filename:join(code:lib_dir(inets),
  +        "examples/server_root/conf/mime.types"),
  +    {ok, MimeTypes} = httpd_conf:load_mime_types(MimeTypesFile),
  +    MimeTypes.
  +
  +getDisposition("image/jpeg", _File) ->
  +    "inline";
  +getDisposition("image/png", _File) ->
  +    "inline";
  +getDisposition("image/gif", _File) ->
  +    "inline";
  +getDisposition("image/bmp", _File) ->
  +    "inline";
  +getDisposition(_MimeType, File) ->
  +    "attachment; filename=" ++ File.
positive.code:         {notConnected, State3} ->
              {reply, unAuthorized(State3#state.user), State3}
      end;
  
  handle_call({link, _SessionId, _Env, Input}, _From, State) ->
      Dict       = makeDict(Input),
      {ok, File} = find("filename",  Dict),
      {ok, Ref}  = find("reference", Dict),
      FileName   = filename:join([getRootDir(), "www", "linkedFiles",
                                  Ref ++ "_" ++ File]),
  
      FileData =
          case file:read_file(FileName) of
              {ok, Bin} ->
                  ["Content-Type: application/octet-stream\r\n"
                   "Content-Disposition: attachment; filename=", File,
                   "\r\n\r\n", zlib:gunzip(Bin)];
              Error ->
                  Error
          end,
      {reply, FileData, State};
  
  handle_call({listsTodos, SessionId, _Env, Input}, _From,
              State = #state{user = User, status = SList}) ->
  
negative.code:     mod_esi:deliver(SessionId, HtmlPage).
  
  link(SessionId, Env, Input) ->
      FileData = gen_server:call(?MODULE, {link, SessionId, Env, Input}),
      mod_esi:deliver(SessionId, FileData).
  
  login(SessionId, Env, Input) ->
  