import cgi
import ccookie
from string import Template
import sys
import configparser
import os

class index:

	def __init__(self):
		self.__cfg = configparser.ConfigParser()
		self.__loadConfigFile()
		self.__cookieExist()
		self.__pfx = None
		self.__useCookie = 0
		self.__cookie = ccookie.ccookie()

	def loadConfig(self):
		self.__loadConfigFile()
		self.__loadDefaultConf('DEFAULT')
		self.__loadIndexConf()

	def __cookieExist(self):
		if 'HTPP_COOKIE' in os.environ:
			self.__cookieExist = 1
		else:
			self.__cookieExist = 0

	def useCookie(self):
		pass

	def __loadConfigFile(self):
		self.__cfg.read('conf.ini')

	def __loadDefaultConf(self, section):
		for key in self.__cfg[section]:
			pass

	def __loadIndexConf(self):
		pass

	def loadElements(self):
		pass

	def render(self):
		pass

	def printPage(self):
		pass

	def connectData(self):
		pass

	def getPage(self):
		return self.__page

	def parseArg(self, argv):
		if len(argv)>1:
			a = 0
			for i in argv:
				if a== 0:
					a +=1
				else:
					code, arg = i.split('=')
					if code == '-pfx':
						self.__pfx = arg

if __name__ == "__main__":
	a = index.index()
	a.parseArg(sys.argv)
	a.loadConfig()
	a.useCookie()
	a.connectData()
	a.render()
	a.printPage()

@@ -1,16 +1,35 @@
+#!/usr/bin/python3%0A
 import cgi%0Aimpor
@@ -561,32 +561,56 @@
 seCookie(self):%0A
+%09%09if self.__useCookie:%0A%09
 %09%09pass%0A%0A%09def __l
@@ -741,48 +741,491 @@
 %0A%09%09%09
-pass%0A%0A%09def __loadIndexConf(self):%0A%09%09pass
+if key == 'pfx':%0A%09%09%09%09self.__pfx = self.__getConfItem(section, key)%0A%09%09%09elif key == 'trp':%0A%09%09%09%09self.__trp = self.__getConfItem(section, key)%0A%09%09%09elif key == 'cookie':%0A%09%09%09%09self.__useCookie = int(self.__getConfItem(section, key))%0A%09%09%09elif key == 'mysql':%0A%09%09%09%09self.__mysql = int(self.__getConfItem(section, key))%0A%0A%09def __getConfItem(self, section, key):%0A%09%09return self.__cfg%5Bsection%5D%5Bkey%5D%0A%0A%09def __loadIndexConf(self):%0A%09%09section = 'INDEX'%0A%09%09self.__title = self.__getConfItem(section, 'title')
 %0A%0A%09d

Fix for run!