#!/usr/bin/python3

import json
import sqlite3
from db import *
from globalSettings import *
from global_func import *
import cgi
import cgitb
cgitb.enable()


if (GUI == true):
    form = cgi.FieldStorage()
    request_type = form.getvalue('requestType')

   
def restore_module():
    jsonSchema = {"status" : 200, "response" : "Default Values Reset Successfully"}
    print(json.JSONEncoder().encode(jsonSchema))

def restore_demo():
    jsonSchema = {'status' : 200, 'response' : "Default Values Reset Successfully!"}
    print(json.JSONEncoder().encode(jsonSchema))

def restore_vdac():
    jsonSchema = {'status' : 200, 'response' : "Default Values Reset Successfully!"}
    print(json.JSONEncoder().encode(jsonSchema))

def restore_idac():
    jsonSchema = {'status' : 200, 'response' : "Default Values Reset Successfully!"}
    print(json.JSONEncoder().encode(jsonSchema))

print("Content-type:/text/json\r\n\r\n")


if(request_type == 'restore_module'):
    restore_module()
elif(request_type == 'restore_demo'):
    restore_demo()
elif(request_type == 'restore_vdac'):
    restore_vdac()
elif(request_type == 'restore_idac'):
    restore_idac()
else:
    print("Invalid Request Type")    


