X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;ds=inline;f=cgisimple.c;h=310303439a41d51a60e3d92f90f31499e131cb04;hb=5692d36bfe70f8e0d10833bb2550d998c089f58e;hp=cefa51a489fd9d672d359a51b47363f135127956;hpb=da4ded04ca0d2e8f8435b96de3963f682274d56a;p=privoxy.git diff --git a/cgisimple.c b/cgisimple.c index cefa51a4..31030343 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,3 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.126 2014/05/20 11:58:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -6,8 +5,8 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.126 2014/05/20 11:58:36 fabia * Purpose : Simple CGIs to get information about Privoxy's * status. * - * Copyright : Written by and Copyright (C) 2001-2014 the - * Privoxy team. http://www.privoxy.org/ + * Copyright : Written by and Copyright (C) 2001-2020 the + * Privoxy team. https://www.privoxy.org/ * * Based on the Internet Junkbuster originally written * by and Copyright (C) 1997 Anonymous Coders and @@ -60,10 +59,10 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.126 2014/05/20 11:58:36 fabia #include "parsers.h" #include "urlmatch.h" #include "errlog.h" +#ifdef FEATURE_CLIENT_TAGS +#include "client-tags.h" +#endif -const char cgisimple_h_rcs[] = CGISIMPLE_H_VERSION; - -static char *show_rcs(void); static jb_err show_defines(struct map *exports); static jb_err cgi_show_file(struct client_state *csp, struct http_response *rsp, @@ -178,7 +177,7 @@ jb_err cgi_die (struct client_state *csp, "
\n" "No tags available.
\n"); + } + else + { + client_tag_status = strdup_or_die("Tag name | \n" + "Current state | Change state | Description |
---|---|---|---|
"); + if (!err) err = string_append(&client_tag_status, this_tag->name); + if (!err) err = string_append(&client_tag_status, " | "); + if (!err) err = string_append(&client_tag_status, tag_state == 1 ? "Enabled" : "Disabled"); + if (!err) err = string_append(&client_tag_status, " | "); + cgi_create_client_tag_form(buf, sizeof(buf), this_tag->name, !tag_state, 1); + if (!err) err = string_append(&client_tag_status, buf); + if (tag_state == 0) + { + cgi_create_client_tag_form(buf, sizeof(buf), this_tag->name, !tag_state, 0); + if (!err) err = string_append(&client_tag_status, buf); + } + if (!err) err = string_append(&client_tag_status, " | "); + if (!err) err = string_append(&client_tag_status, this_tag->description); + if (!err) err = string_append(&client_tag_status, " |