summaryrefslogtreecommitdiffstats
path: root/tdeioslave/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave/cgi')
-rw-r--r--tdeioslave/cgi/CMakeLists.txt39
-rw-r--r--tdeioslave/cgi/Makefile.am16
-rw-r--r--tdeioslave/cgi/README15
-rw-r--r--tdeioslave/cgi/cgi.cpp274
-rw-r--r--tdeioslave/cgi/cgi.h48
-rw-r--r--tdeioslave/cgi/cgi.protocol8
-rw-r--r--tdeioslave/cgi/kcmcgi/CMakeLists.txt36
-rw-r--r--tdeioslave/cgi/kcmcgi/Makefile.am17
-rw-r--r--tdeioslave/cgi/kcmcgi/kcmcgi.cpp151
-rw-r--r--tdeioslave/cgi/kcmcgi/kcmcgi.desktop231
-rw-r--r--tdeioslave/cgi/kcmcgi/kcmcgi.h55
11 files changed, 890 insertions, 0 deletions
diff --git a/tdeioslave/cgi/CMakeLists.txt b/tdeioslave/cgi/CMakeLists.txt
new file mode 100644
index 000000000..130aa9a1e
--- /dev/null
+++ b/tdeioslave/cgi/CMakeLists.txt
@@ -0,0 +1,39 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( kcmcgi )
+
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES cgi.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
+
+
+##### tdeio_cgi (module) ##########################
+
+set( target tdeio_cgi )
+
+tde_add_kpart( ${target} AUTOMOC
+ SOURCES cgi.cpp
+ LINK tdeio-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/tdeioslave/cgi/Makefile.am b/tdeioslave/cgi/Makefile.am
new file mode 100644
index 000000000..dd4391e0f
--- /dev/null
+++ b/tdeioslave/cgi/Makefile.am
@@ -0,0 +1,16 @@
+SUBDIRS = kcmcgi
+
+INCLUDES = $(all_includes)
+
+kde_module_LTLIBRARIES = tdeio_cgi.la
+
+tdeio_cgi_la_SOURCES = cgi.cpp
+tdeio_cgi_la_LIBADD = $(LIB_TDEIO)
+tdeio_cgi_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+
+noinst_HEADERS = cgi.h
+
+METASOURCES = AUTO
+
+kdelnkdir = $(kde_servicesdir)
+kdelnk_DATA = cgi.protocol
diff --git a/tdeioslave/cgi/README b/tdeioslave/cgi/README
new file mode 100644
index 000000000..d68fc9d2c
--- /dev/null
+++ b/tdeioslave/cgi/README
@@ -0,0 +1,15 @@
+The CGI IO slave provides a way to execute CGI programs without the need to
+have a running web server. This can for example be used for local testing of
+CGI programs or for using search engines that only provide a CGI frontend like
+the one from Doxygen.
+
+The IO slave implements the cgi: protocol. It uses the filename from the given
+URL and searches a configurable list of directories. If it finds an executable
+with the given name it executes it, passes the arguments of the URL and sets the
+environment variables needed by CGI programs.
+
+The kcontrol module System/kcmcgi is used to configure the search paths for CGI
+programs.
+
+If you have questions or comments please contact Cornelius Schumacher
diff --git a/tdeioslave/cgi/cgi.cpp b/tdeioslave/cgi/cgi.cpp
new file mode 100644
index 000000000..4f54d6668
--- /dev/null
+++ b/tdeioslave/cgi/cgi.cpp
@@ -0,0 +1,274 @@
+/*
+ Copyright (C) 2002 Cornelius Schumacher <[email protected]>
+ Copyright 2006 Michael Pyne <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <tqdir.h>
+#include <tqregexp.h>
+
+#include <kdebug.h>
+#include <kprocess.h>
+#include <kstandarddirs.h>
+#include <kinstance.h>
+#include <tdelocale.h>
+#include <tdeconfig.h>
+
+#include "cgi.h"
+
+using namespace TDEIO;
+
+CgiProtocol::CgiProtocol( const TQCString &pool, const TQCString &app )
+ : SlaveBase( "cgi", pool, app )
+{
+ kdDebug(7124) << "CgiProtocol::CgiProtocol" << endl;
+
+ TDEConfig cfg( "kcmcgirc" );
+ cfg.setGroup( "General" );
+ mCgiPaths = cfg.readListEntry( "Paths" );
+}
+
+CgiProtocol::~CgiProtocol()
+{
+ kdDebug(7124) << "CgiProtocol::~CgiProtocol" << endl;
+}
+
+/**
+ * Search in reverse order through a TQByteArray for a given character. The position
+ * of the character is returned, or -1 if it was not found.
+ */
+static int qByteArrayFindRev( const TQByteArray &ba, char c, int startIndex )
+{
+ for ( int i = startIndex; i >= 0; --i )
+ if ( ba[i] == c ) return i;
+
+ return -1;
+}
+
+/**
+ * Extract data in ba from start, including no more than len characters from ba.
+ * Should be exactly comparable to TQCString::mid()
+ */
+static TQCString extractQCString( const TQByteArray &ba, uint start, uint len = 0xffffffff )
+{
+ uint realLen = len;
+
+ if ( ( ba.size() - start ) < len )
+ realLen = ba.size() - start;
+
+// return TQCString( &ba[ start ], realLen + 1 );
+ return TQCString( ba ).mid(start, realLen + 1);
+}
+
+/**
+ * Search through a TQByteArray for a given string. The position of the string
+ * is returned, or -1 if it was not found.
+ */
+static int qByteArrayFindStr( const TQByteArray &ba, const char *str )
+{
+ int strLen = tqstrlen( str );
+ int searchLen = ba.size() - strLen;
+
+ for ( int i = 0; i <= searchLen; ++i ) {
+ TQCString temp = extractQCString( ba, i, strLen );
+ if ( temp == str )
+ return i;
+ }
+
+ return -1;
+}
+
+void CgiProtocol::get( const KURL& url )
+{
+ kdDebug(7124) << "CgiProtocol::get()" << endl;
+ kdDebug(7124) << " URL: " << url.url() << endl;
+#if 0
+ kdDebug(7124) << " Path: " << url.path() << endl;
+ kdDebug(7124) << " Query: " << url.query() << endl;
+ kdDebug(7124) << " Protocol: " << url.protocol() << endl;
+ kdDebug(7124) << " Filename: " << url.filename() << endl;
+#endif
+ TQCString protocol = "SERVER_PROTOCOL=HTTP";
+ putenv( protocol.data() );
+
+ TQCString requestMethod = "REQUEST_METHOD=GET";
+ putenv( requestMethod.data() );
+
+ TQCString query = url.query().mid( 1 ).local8Bit();
+ query.prepend( "QUERY_STRING=" );
+ putenv( query.data() );
+
+ TQString path = url.path();
+
+ TQString file;
+
+ int pos = path.findRev('/');
+ if ( pos >= 0 ) file = path.mid( pos + 1 );
+ else file = path;
+
+ TQString cmd;
+
+ bool stripHeader = false;
+ bool forwardFile = true;
+
+ TQStringList::ConstIterator it;
+ for( it = mCgiPaths.begin(); it != mCgiPaths.end(); ++it ) {
+ cmd = *it;
+ if ( !(*it).endsWith("/") )
+ cmd += "/";
+ cmd += file;
+ if ( TDEStandardDirs::exists( cmd ) ) {
+ forwardFile = false;
+ stripHeader = true;
+ break;
+ }
+ }
+
+ FILE *fd;
+
+ if ( forwardFile ) {
+ kdDebug(7124) << "Forwarding to '" << path << "'" << endl;
+
+ TQCString filepath = TQFile::encodeName( path );
+
+ fd = fopen( filepath.data(), "r" );
+
+ if ( !fd ) {
+ kdDebug(7124) << "Error opening '" << filepath << "'" << endl;
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, filepath );
+ return;
+ }
+ } else {
+ kdDebug(7124) << "Cmd: " << cmd << endl;
+
+ fd = popen( TQFile::encodeName(TDEProcess::quote( cmd )).data(), "r" );
+
+ if ( !fd ) {
+ kdDebug(7124) << "Error running '" << cmd << "'" << endl;
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, cmd );
+ return;
+ }
+ }
+
+ char buffer[ 4090 ];
+
+ while ( !feof( fd ) )
+ {
+ int n = fread( buffer, 1, 2048, fd );
+
+ if ( n == -1 )
+ {
+ // ERROR
+ if ( forwardFile ) {
+ fclose( fd );
+ } else {
+ pclose( fd );
+ }
+ return;
+ }
+
+ buffer[n] = 0;
+
+ if ( stripHeader ) {
+ TQByteArray output;
+
+ // Access the buffer in-place by using setRawData()
+ output.setRawData( buffer, n );
+
+ int colon = output.find( ':' );
+ int newline = output.find( '\n' );
+ int semicolon = qByteArrayFindRev( output, ';', newline );
+ int end;
+ if ( semicolon < 0 ) end = newline;
+ else end = semicolon;
+
+#if 0
+ kdDebug(7124) << " colon: " << colon << endl;
+ kdDebug(7124) << " newline: " << newline << endl;
+ kdDebug(7124) << " semicolon: " << semicolon << endl;
+ kdDebug(7124) << " end: " << end << endl;
+#endif
+
+ TQCString contentType = extractQCString( output, colon + 1, end - colon - 1 );
+
+ contentType = contentType.stripWhiteSpace();
+
+ kdDebug(7124) << "ContentType: '" << contentType << "'" << endl;
+
+ mimeType( contentType );
+
+ int start = qByteArrayFindStr( output, "\r\n\r\n" );
+ if ( start >= 0 ) start += 4;
+ else {
+ start = qByteArrayFindStr( output, "\n\n" );
+ if ( start >= 0 ) start += 2;
+ }
+
+ if ( start < 0 )
+ start = 0;
+
+ // We're done with the part of the buffer we're using.
+ output.resetRawData ( buffer, n );
+
+ // Now access the part of the buffer after the header.
+ output.setRawData ( buffer + start, n - start );
+ data( output );
+ output.resetRawData ( buffer + start, n - start );
+
+ stripHeader = false;
+ } else {
+ TQByteArray array;
+ array.setRawData( buffer, n );
+ data( array );
+ array.resetRawData( buffer, n );
+ }
+ }
+
+ if ( forwardFile ) {
+ fclose( fd );
+ } else {
+ pclose( fd );
+ }
+
+ finished();
+
+ kdDebug(7124) << "CgiProtocol::get - done" << endl;
+}
+
+extern "C" { int KDE_EXPORT kdemain( int argc, char **argv ); }
+
+/*! The kdemain function generates an instance of the ioslave and starts its
+ * dispatch loop. */
+
+int kdemain( int argc, char **argv )
+{
+ TDEInstance instance( "tdeio_cgi" );
+
+ kdDebug(7124) << "tdeio_cgi starting " << getpid() << endl;
+
+ if (argc != 4)
+ {
+ fprintf(stderr, "Usage: tdeio_cgi protocol domain-socket1 domain-socket2\n");
+ exit(-1);
+ }
+
+ CgiProtocol slave( argv[2], argv[3] );
+ slave.dispatchLoop();
+
+ return 0;
+}
diff --git a/tdeioslave/cgi/cgi.h b/tdeioslave/cgi/cgi.h
new file mode 100644
index 000000000..2113acd0f
--- /dev/null
+++ b/tdeioslave/cgi/cgi.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2002 Cornelius Schumacher <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+#ifndef TDEIO_CGI_H
+#define TDEIO_CGI_H
+
+#include <tqobject.h>
+
+#include <tdeio/slavebase.h>
+
+class TDEProcess;
+
+/*!
+ This class implements an ioslave for viewing CGI script output without the
+ need to run a web server.
+*/
+class CgiProtocol : public TDEIO::SlaveBase
+{
+ public:
+ CgiProtocol( const TQCString &pool, const TQCString &app );
+ virtual ~CgiProtocol();
+
+ virtual void get( const KURL& url );
+
+// virtual void mimetype( const KURL& url );
+
+ protected:
+// TQCString errorMessage();
+
+ private:
+ TQStringList mCgiPaths;
+};
+
+#endif
diff --git a/tdeioslave/cgi/cgi.protocol b/tdeioslave/cgi/cgi.protocol
new file mode 100644
index 000000000..69ca51ab4
--- /dev/null
+++ b/tdeioslave/cgi/cgi.protocol
@@ -0,0 +1,8 @@
+[Protocol]
+exec=tdeio_cgi
+protocol=cgi
+input=none
+output=filesystem
+reading=true
+DocPath=tdeioslave/cgi/index.html
+Icon=text-html
diff --git a/tdeioslave/cgi/kcmcgi/CMakeLists.txt b/tdeioslave/cgi/kcmcgi/CMakeLists.txt
new file mode 100644
index 000000000..09354b919
--- /dev/null
+++ b/tdeioslave/cgi/kcmcgi/CMakeLists.txt
@@ -0,0 +1,36 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES kcmcgi.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+
+
+##### kcm_cgi (module) ##########################
+
+set( target kcm_cgi )
+
+tde_add_kpart( ${target} AUTOMOC
+ SOURCES kcmcgi.cpp
+ LINK tdeio-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/tdeioslave/cgi/kcmcgi/Makefile.am b/tdeioslave/cgi/kcmcgi/Makefile.am
new file mode 100644
index 000000000..366c59c05
--- /dev/null
+++ b/tdeioslave/cgi/kcmcgi/Makefile.am
@@ -0,0 +1,17 @@
+
+kde_module_LTLIBRARIES = kcm_cgi.la
+
+kcm_cgi_la_SOURCES = kcmcgi.cpp
+kcm_cgi_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
+kcm_cgi_la_LIBADD = -ltdeui $(LIB_TDEIO)
+
+INCLUDES= $(all_includes)
+
+kcm_cgi_la_METASOURCES = AUTO
+
+noinst_HEADERS = kcmcgi.h
+
+xdg_apps_DATA = kcmcgi.desktop
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kcmcgi.pot
diff --git a/tdeioslave/cgi/kcmcgi/kcmcgi.cpp b/tdeioslave/cgi/kcmcgi/kcmcgi.cpp
new file mode 100644
index 000000000..a4297969e
--- /dev/null
+++ b/tdeioslave/cgi/kcmcgi/kcmcgi.cpp
@@ -0,0 +1,151 @@
+/*
+ Copyright (C) 2002 Cornelius Schumacher <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include <tdeconfig.h>
+#include <tdelocale.h>
+#include <tdeglobal.h>
+#include <tdeaboutdata.h>
+#include <tdefiledialog.h>
+
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+
+#include "kcmcgi.h"
+#include "kcmcgi.moc"
+
+extern "C"
+{
+ KDE_EXPORT TDECModule *create_cgi( TQWidget *parent, const char * )
+ {
+ TDEGlobal::locale()->insertCatalogue("kcmcgi");
+ return new KCMCgi( parent, "kcmcgi" );
+ }
+}
+
+
+KCMCgi::KCMCgi(TQWidget *parent, const char *name)
+ : TDECModule(parent, name)
+{
+ setButtons(Default|Apply|Help);
+
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+
+ TQGroupBox *topBox = new TQGroupBox( 1, Qt::Horizontal, i18n("Paths to Local CGI Programs"), this );
+ topLayout->addWidget( topBox );
+
+ mListBox = new TQListBox( topBox );
+
+ TQHBox *buttonBox = new TQHBox( topBox );
+ buttonBox->setSpacing( KDialog::spacingHint() );
+
+ mAddButton = new TQPushButton( i18n("Add..."), buttonBox );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addPath() ) );
+
+ mRemoveButton = new TQPushButton( i18n("Remove"), buttonBox );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removePath() ) );
+ connect( mListBox, TQT_SIGNAL( clicked ( TQListBoxItem * )),this, TQT_SLOT( slotItemSelected( TQListBoxItem *)));
+
+ mConfig = new TDEConfig("kcmcgirc");
+
+ load();
+ updateButton();
+ TDEAboutData *about =
+ new TDEAboutData( I18N_NOOP("kcmcgi"),
+ I18N_NOOP("CGI TDEIO Slave Control Module"),
+ 0, 0, TDEAboutData::License_GPL,
+ I18N_NOOP("(c) 2002 Cornelius Schumacher") );
+
+ about->addAuthor( "Cornelius Schumacher", 0, "[email protected]" );
+ setAboutData(about);
+}
+
+KCMCgi::~KCMCgi()
+{
+ delete mConfig;
+}
+
+void KCMCgi::slotItemSelected( TQListBoxItem * )
+{
+ updateButton();
+}
+
+void KCMCgi::updateButton()
+{
+ mRemoveButton->setEnabled( mListBox->selectedItem ());
+}
+
+void KCMCgi::defaults()
+{
+ mListBox->clear();
+ updateButton();
+}
+
+void KCMCgi::save()
+{
+ TQStringList paths;
+
+ uint i;
+ for( i = 0; i < mListBox->count(); ++i ) {
+ paths.append( mListBox->text( i ) );
+ }
+
+ mConfig->setGroup( "General" );
+ mConfig->writeEntry( "Paths", paths );
+
+ mConfig->sync();
+}
+
+void KCMCgi::load()
+{
+ mConfig->setGroup( "General" );
+ TQStringList paths = mConfig->readListEntry( "Paths" );
+
+ mListBox->insertStringList( paths );
+}
+
+void KCMCgi::addPath()
+{
+ TQString path = KFileDialog::getExistingDirectory( TQString::null, this );
+
+ if ( !path.isEmpty() ) {
+ mListBox->insertItem( path );
+ emit changed( true );
+ }
+ updateButton();
+}
+
+void KCMCgi::removePath()
+{
+ int index = mListBox->currentItem();
+ if ( index >= 0 ) {
+ mListBox->removeItem( index );
+ emit changed( true );
+ }
+ updateButton();
+}
+
+TQString KCMCgi::quickHelp() const
+{
+ return i18n("<h1>CGI Scripts</h1> The CGI TDEIO slave lets you execute "
+ "local CGI programs without the need to run a web server. "
+ "In this control module you can configure the paths that "
+ "are searched for CGI scripts.");
+}
diff --git a/tdeioslave/cgi/kcmcgi/kcmcgi.desktop b/tdeioslave/cgi/kcmcgi/kcmcgi.desktop
new file mode 100644
index 000000000..986d06cac
--- /dev/null
+++ b/tdeioslave/cgi/kcmcgi/kcmcgi.desktop
@@ -0,0 +1,231 @@
+[Desktop Entry]
+Icon=system-run
+Type=Application
+Exec=tdecmshell kcmcgi
+X-DocPath=kcontrol/kcmcgi/index.html
+X-TDE-ModuleType=Library
+X-TDE-Library=cgi
+
+Name=CGI Scripts
+Name[af]=CGI Skripte
+Name[ar]=نصوص CGI البرمجية
+Name[az]=CGI Skriptləri
+Name[be]=Сцэнары CGI
+Name[bg]=CGI скриптове
+Name[bn]=সি-জি-আই স্ক্রিপ্ট
+Name[br]=Urzhiaouegoù CGI
+Name[bs]=CGI skripte
+Name[ca]=Scripts CGI
+Name[cs]=CGI skripty
+Name[csb]=Skriptë CGI
+Name[cy]=Sgriptiau CGI
+Name[da]=CGI Scripter
+Name[de]=CGI-Skripte
+Name[el]=Σενάρια CGI
+Name[eo]=CGI-Skriptaĵoj
+Name[es]=Procedimientos CGI
+Name[et]=CGI skriptid
+Name[eu]=CGI scriptak
+Name[fa]=دست‌نوشته‌های CGI
+Name[fi]=CGI-komentosarjat
+Name[fr]=Scripts CGI
+Name[fy]=CGI-skripts
+Name[ga]=Scripteanna CGI
+Name[gl]=Guións CGI
+Name[he]=תסריטי CGI
+Name[hi]=सीजीआई स्क्रिप्ट
+Name[hr]=CGI skripte
+Name[hu]=CGI-programok
+Name[is]=CGI Skriftur
+Name[it]=Script CGI
+Name[ja]=CGI スクリプト
+Name[ka]=CGI სკრიპტები
+Name[kk]=CGI скрипттері
+Name[km]=ស្គ្រីប CGI
+Name[ko]=CGI 스크립트
+Name[lo]=ໂໍຊລາລີສ
+Name[lt]=CGI scenarijai
+Name[lv]=CGI Skripts
+Name[mk]=CGI-скрипти
+Name[mn]=CGI-Скрипт
+Name[ms]=Skrip CGI
+Name[mt]=Scripts CGI
+Name[nb]=CGI-skript
+Name[nds]=CGI-Skripten
+Name[ne]=CGI स्क्रिप्ट
+Name[nl]=CGI-scripts
+Name[nn]=CGI-skript
+Name[nso]=Ditshwaelo tsa CGI
+Name[pa]=CGI ਸਕ੍ਰਿਪਟਾਂ
+Name[pl]=Skrypty CGI
+Name[pt]=Programas CGI
+Name[pt_BR]=Scripts CGI
+Name[ro]=Scripturi CGI
+Name[ru]=Сценарии CGI
+Name[rw]=Agaporogaramu CGI
+Name[se]=CGI-skriptat
+Name[sk]=Skripty CGI
+Name[sl]=Skripte CGI
+Name[sr]=CGI Скрипте
+Name[sr@Latn]=CGI Skripte
+Name[sv]=CGI-skript
+Name[ta]=CGI எழுத்தாக்கங்கள்
+Name[te]=సిజిఐ స్క్రిప్ట్లు
+Name[tg]=Дастнависи CGI
+Name[th]=สคริปต์ CGI
+Name[tr]=CD Betikleri
+Name[tt]=CGI Ämerleklär
+Name[uk]=Скрипти CGI
+Name[uz]=CGI skriptlar
+Name[uz@cyrillic]=CGI скриптлар
+Name[ven]=Zwikiriputi zwa CGI
+Name[vi]=Văn lệnh CGI
+Name[wa]=Scripe CGI
+Name[xh]=Amagama ashicilelwe phantsi CGI
+Name[zh_CN]=CGI 脚本
+Name[zh_TW]=CGI 命令稿
+Name[zu]=Izikript ze-CGI
+Comment=Configure the CGI TDEIO slave
+Comment[af]=Stel die CGI TDEIO slaaf op
+Comment[ar]=تهيئة CGI TDEIO slave
+Comment[be]=Настаўленні CGI TDEIO slave
+Comment[bg]=Настройване на модула за изпълнение на скриптове без уеб сървър - CGI TDEIO
+Comment[bn]=CGI TDEIO স্লেভ কনফিগার করুন
+Comment[bs]=Podešavanje CGI TDEIO slave-a
+Comment[ca]=Configura l'esclau TDEIO CGI
+Comment[cs]=Nastavení CGI pro TDE
+Comment[csb]=Kònfigùracëjô procedurë òbsłużënkù CGI
+Comment[cy]=Ffurfweddu'r gwas CGI TDEIO
+Comment[da]=Indstilling af CGI TDEIO-slaven
+Comment[de]=Ein-/Ausgabemodul für CGI einrichten
+Comment[el]=Ρυθμίστε το CGI TDEIO slave
+Comment[eo]=Agordu CGI-enel-sklavon
+Comment[es]=Configuración del TDEIO slave de CGI
+Comment[et]=CGI TDEIO mooduli seadistamine
+Comment[eu]=CGI TDEIO slave-a konfiguratu
+Comment[fa]=پیکربندی پی‌رو CGI TDEIO
+Comment[fi]=Muokkaa CGI-TDEIO-palvelun asetuksia
+Comment[fr]=Configuration du CGI TDEIO slave
+Comment[fy]=Hjir kinne jo de CGI Kio-slave ynstelle
+Comment[ga]=Cumraigh an sclábhaí CGI TDEIO
+Comment[gl]=Configuración do escravo TDEIO de CGI
+Comment[he]=שינוי הגדרות פרוטוקול ה־CGI
+Comment[hi]=सीजीआई केआईओ स्लेव कॉन्फ़िगर करें
+Comment[hr]=Konfiguriranje CGI TDEIO podčinjenog
+Comment[hu]=A CGI TDE-protokoll beállításai
+Comment[is]=Stilla CGI þrælinn
+Comment[it]=Configura il TDEIO-slave CGI
+Comment[ja]=CGI TDEIO スレーブの設定
+Comment[ka]=CGI TDEIO slave-ის კონფიგურაცია
+Comment[kk]=CGI TDEIO slave-ты баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​កូនចៅ CGI TDEIO
+Comment[ko]=CGI TDEIO 슬레이브 설정
+Comment[lo]=ປັບແຕ່ງກ້ອງ
+Comment[lt]=Konfigūruoti CGI TDEIO slave
+Comment[lv]=Konfigurēt CGI TDEIO vergu
+Comment[mk]=Конфигурација на CGI TDEIO служителот
+Comment[mn]=CGI-Оролт/Гаралтын-Модул тохируулах
+Comment[ms]=Konfigur hamba CGI TDEIO
+Comment[mt]=Ikkonfigura l-iskjav CGI
+Comment[nb]=Tilpass CGI TDEIO slave
+Comment[nds]=Den CGI-In-/Utgaavdeenst instellen
+Comment[ne]=CGI TDEIO स्लेभ कन्फिगर गर्नुहोस्
+Comment[nl]=Hier kunt u de CGI Kio-slave instellen
+Comment[nn]=Set opp CGI-TDEIO-slaven
+Comment[nso]=Beakanya lekgoba la TDEIO ya CGI
+Comment[pa]=CGI TDEIO ਸਲੇਵ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja procedury obsługi CGI
+Comment[pt]=Configuração do TDEIO slave de CGIs
+Comment[pt_BR]=Configurar o TDEIO (escravo) do CGI
+Comment[ro]=Configurează dispozitivul I/O CGI
+Comment[ru]=Настройка CGI TDEIO slave
+Comment[rw]=Kuboneza CGI TDEIO umugaragu
+Comment[se]=Heivet CGI-TDEIO-šláva
+Comment[sk]=Nastavenie IO klienta CGI
+Comment[sl]=Nastavi podrejenega TDEIO CGI
+Comment[sr]=Подешавање CGI TDEIO slave-а
+Comment[sr@Latn]=Podešavanje CGI TDEIO slave-a
+Comment[sv]=Anpassa I/O-slaven för CGI
+Comment[ta]=CGI TDEIO slaveஐ வடிவமை
+Comment[tg]=Бандаи CGI TDEIO-ро танзим кунед
+Comment[th]=ปรับแต่ง CGI TDEIO slave
+Comment[tr]=CGI TDEIO aracısını yapılandır
+Comment[tt]=CGI TDEIO slave caylawı
+Comment[uk]=Налаштування підлеглого TDEIO CGI
+Comment[uz]=CGI TDEIO sleyvni moslash
+Comment[uz@cyrillic]=CGI TDEIO слейвни мослаш
+Comment[ven]=Dzudzanyani phuli CGI TDEIO
+Comment[vi]=Cấu hình đày tớCGI TDEIO
+Comment[wa]=Apontyî li mandaye TDEIO CGI
+Comment[xh]=Qwlalsela i CGI TDEIO slave
+Comment[zh_CN]=配置 CGI TDEIO 仆人
+Comment[zh_TW]=設定 CGI TDEIO slave
+Comment[zu]=Hlanganisela i-CGI TDEIO slave
+
+Keywords=CGI;TDEIO;Slave;Paths;
+Keywords[ar]=CGI;TDEIO;Slave;Paths;مسارات;
+Keywords[az]=CGI;TDEIO;Slave;Paths;Cığırlar;
+Keywords[be]=Шляхі;CGI;TDEIO;Slave;Paths;
+Keywords[bg]=скриптове; уеб; динамичен; скрипт; Интернет; път; пътища; CGI; TDEIO; Slave; Paths;
+Keywords[br]=CGI;TDEIO;sklav;hentoù;
+Keywords[ca]=CGI;TDEIO;Esclau;Rutes;
+Keywords[cs]=CGI;TDEIO;slave;cesty;
+Keywords[csb]=CGI;TDEIO;procedurë wé/wi;stegnë;
+Keywords[cy]=CGI;TDEIO;Gwas;Llwybrau;
+Keywords[da]=CGI;TDEIO;Slave;Stier;
+Keywords[de]=CGI;TDEIO;Ein-/Ausgabemodul;Pfade;
+Keywords[el]=CGI;TDEIO;Slave;Διαδρομές;
+Keywords[eo]=CGI;Enel;K-enel;sklavo;servo;vojoj;
+Keywords[es]=CGI;TDEIO;Slave;Rutas;
+Keywords[et]=CGI;TDEIO;moodul;otsinguteed;
+Keywords[fa]=CGI، TDEIO، Slave، مسیرها;
+Keywords[fi]=CGI;TDEIO;TDEIO-palvelu;palvelu;Polut;
+Keywords[fr]=CGI;TDEIO;Slave;Paths;Chemins;Emplacements;
+Keywords[fy]=cgi;tdeio;slave;paths;paden;
+Keywords[ga]=CGI;TDEIO;Sclábhaí;Bealaí;
+Keywords[gl]=CGI;TDEIO;Escravo;Camiños;
+Keywords[he]=CGI;TDEIO;פרוטוקול;נתיבים; Slave;Paths;
+Keywords[hi]=सीजीआई;केआईओ;स्लेव;पथ;
+Keywords[hr]=CGI;TDEIO;Slave;Paths;podčinjeni;putanje;
+Keywords[hu]=CGI;TDEIO;protokoll;elérési utak;
+Keywords[is]=CGI;TDEIO;þræll;slóðir;
+Keywords[it]=CGI;TDEIO;tdeioslave;percorsi;
+Keywords[ja]=CGI;TDEIO;スレーブ;パス;
+Keywords[km]=CGI;TDEIO;កូនចៅ;ផ្លូវ;
+Keywords[lt]=CGI;TDEIO;Slave;Paths; keliai;
+Keywords[lv]=CGI;TDEIO;vergi;ceļi;
+Keywords[mk]=CGI;TDEIO;Slave;Paths;Патеки;
+Keywords[mn]=CGI;TDEIO;Оролт/Гаралтын-Модул;Зам;
+Keywords[mt]=CGI;TDEIO;Slave;Paths;skjav;passaġġ;
+Keywords[nb]=CGI;TDEIO;Slave;slave;stier;
+Keywords[nds]=CGI;TDEIO;Slave;IU;In-/Utgaavdeenst;Deenst;Padden;
+Keywords[ne]=CGI;TDEIO;स्लेभ; मार्ग;
+Keywords[nl]=cgi;tdeio;slave;paths;paden;
+Keywords[nn]=CGI;TDEIO;slave;stiar;
+Keywords[nso]=CGI;TDEIO;Lekgoba;Ditsejana;
+Keywords[pa]=CGI;TDEIO;ਸਲੇਵ;ਮਾਰਗ;
+Keywords[pl]=CGI;TDEIO;procedury we/wy;ścieżki;
+Keywords[pt]=CGI;TDEIO;Slave;Localizações;
+Keywords[pt_BR]=CGI;TDEIO;Escravo;Caminhos;
+Keywords[ro]=I/E;IE;CGI;TDEIO;dispozitiv;căi;
+Keywords[rw]=CGI;TDEIO;Umugaragu;Inzira;
+Keywords[se]=CGI;TDEIO;šláva;bálgát;
+Keywords[sk]=CGI;TDEIO;klient;cesty;
+Keywords[sl]=CGI;TDEIO;podrejeni;pot;
+Keywords[sr]=CGI;TDEIO;Slave;Путање;
+Keywords[sr@Latn]=CGI;TDEIO;Slave;Putanje;
+Keywords[sv]=CGI;TDEIO;Slav;Sökvägar;
+Keywords[ta]=CGI;TDEIO;ஸ்லேவ்;பாதைகள்;
+Keywords[te]=సిజిఐ;కెఐఒ;బానిస;దారులు;
+Keywords[th]=CGI;TDEIO;Slave;เส้นทาง;
+Keywords[tr]=CGI;TDEIO;Aracı;Yollar;
+Keywords[uk]=CGI;TDEIO;підлеглий;шлях;
+Keywords[uz]=CGI;TDEIO;Sleyv;Yoʻllar;
+Keywords[uz@cyrillic]=CGI;TDEIO;Слейв;Йўллар;
+Keywords[ven]=CGI;TDEIO;Phuli;Ludila;
+Keywords[vi]=CGI;TDEIO;Đày tớ;Đường dẫn;
+Keywords[wa]=CGI;TDEIO;Slave;Paths;tchimins;mandaye;
+Keywords[zh_CN]=CGI;TDEIO;Slave;Paths;路径;
+Keywords[zh_TW]=CGI;TDEIO;Slave;Paths;路徑;
+Keywords[zu]=CGI;TDEIO;Slave;Izindlela;
+Categories=Qt;TDE;X-TDE-settings-webbrowsing;
diff --git a/tdeioslave/cgi/kcmcgi/kcmcgi.h b/tdeioslave/cgi/kcmcgi/kcmcgi.h
new file mode 100644
index 000000000..ccd2f2f3d
--- /dev/null
+++ b/tdeioslave/cgi/kcmcgi/kcmcgi.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2002 Cornelius Schumacher <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+#ifndef KCMCGI_H
+#define KCMCGI_H
+
+#include <tdecmodule.h>
+
+class TQListBox;
+class TQPushButton;
+
+class TDEConfig;
+
+class KCMCgi : public TDECModule
+{
+ Q_OBJECT
+ public:
+ KCMCgi( TQWidget *parent = 0, const char *name = 0 );
+ ~KCMCgi();
+
+ void load();
+ void save();
+ void defaults();
+ TQString quickHelp() const;
+
+ public slots:
+
+ protected slots:
+ void addPath();
+ void removePath();
+ void slotItemSelected( TQListBoxItem * item );
+ private:
+ void updateButton();
+ TQListBox *mListBox;
+ TQPushButton *mAddButton;
+ TQPushButton *mRemoveButton;
+
+ TDEConfig *mConfig;
+};
+
+#endif