X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=cgisimple.c;h=562eeb63bb91e8ab4bdb0f5c083811f26582afb6;hb=83acee61d2f7e4a3c2e6e9e6b582849867d2324e;hp=cefa51a489fd9d672d359a51b47363f135127956;hpb=da4ded04ca0d2e8f8435b96de3963f682274d56a;p=privoxy.git diff --git a/cgisimple.c b/cgisimple.c index cefa51a4..562eeb63 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,4 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.126 2014/05/20 11:58:36 fabiankeil Exp $"; +const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.149 2017/05/04 14:33:17 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -6,7 +6,7 @@ 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 + * Copyright : Written by and Copyright (C) 2001-2017 the * Privoxy team. http://www.privoxy.org/ * * Based on the Internet Junkbuster originally written @@ -60,6 +60,9 @@ 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; @@ -178,7 +181,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, " |