X-Git-Url: http://www.privoxy.org/gitweb/templates.html?a=blobdiff_plain;f=cgisimple.c;h=961510f2273ad2620a231d198af81063a0293661;hb=e917ae3908064b70cca0e0e57b2c043d572306b8;hp=f3dfc8fe2dc2d11fc5107721dcdcef61430a0c9b;hpb=452b882d3844f7d6ba93155010aea2c406161f8e;p=privoxy.git diff --git a/cgisimple.c b/cgisimple.c index f3dfc8fe..961510f2 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,3 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.132 2015/11/06 13:38:13 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -6,8 +5,8 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.132 2015/11/06 13:38: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-2022 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.132 2015/11/06 13:38: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, " |