X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=cgisimple.c;h=79b811f9ff4ffa2ee623eec0da72348c6afe8238;hp=7d64402147727f735993440478df23cbf8cd9a9a;hb=04525e634ba02e58d5d75b5fd73cc1f554095e86;hpb=a2c3b8ef33eb64d16f578d13895032ff4fc1b709 diff --git a/cgisimple.c b/cgisimple.c index 7d644021..79b811f9 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,3 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.131 2014/10/18 11:28:49 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -6,7 +5,7 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.131 2014/10/18 11:28:49 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,10 +59,10 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.131 2014/10/18 11:28:49 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, " |