X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=cgisimple.c;h=96506273558fd507b647e1c7c003f0d0e130b104;hb=652b4b7c;hp=4a93dc783746b87a9411c619f98552d33e477d06;hpb=412c74bc2669dab5b0b1f8c78a0f66cc6f9b680b;p=privoxy.git diff --git a/cgisimple.c b/cgisimple.c index 4a93dc78..96506273 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,3 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.129 2014/10/18 11:25:13 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -6,8 +5,8 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.129 2014/10/18 11:25:13 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-2021 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.129 2014/10/18 11:25:13 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 have been configured.
\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, " |