ZEXP ((U OFS.FolderqUFolderqtqNt.}q(Utest-tabq(U q(UOFS.DTMLMethodqU DTMLMethodqttQU__ac_local_roles__q }q Uadminq ]q UOwnerq asU _propertiesq(}q(UidqUtitleqUmodeqUwUtypeqUstringqutU_ownerq(]qU acl_usersqah tU gen_reportq(U=q(U#Products.PythonScripts.PythonScriptqU PythonScriptqttQU index_htmlq(U q(hU DTMLMethodqttQUgenerateTablesq(U q (hU DTMLMethodq!ttQU copy_of_setDBq"(U q#(hU DTMLMethodq$ttQU get_Tablesq%(U q&(UProducts.ZSQLMethods.SQLq'USQLq(ttQU genForms3q)(U \q*(hU PythonScriptq+ttQU genForms2q,(U Uq-(hU PythonScriptq.ttQU admin_accessq/(Uq0(hU DTMLMethodq1ttQUtitleq2UU session_testq3(Udq4(hU PythonScriptq5ttQUgenFormsq6(U q7(hU PythonScriptq8ttQUgen_formq9(Uq:(hU PythonScriptq;ttQU html2testq<(Uq=(U&Products.ExternalMethod.ExternalMethodq>UExternalMethodq?ttQUadvisorq@(UqA(hUFolderqBttQU mysql_dbsqC(U qD(h'USQLqEttQU set_sessionqF(UqG(hU PythonScriptqHttQUgetColsqI(U qJ(h'USQLqKttQU test-formqL(U qM(UProducts.Formulator.FormqNUZMIFormqOttQU_objectsqP(}qQ(U meta_typeqRU Z SQL MethodqSUidqThCu}qU(hRU DTML MethodqVhTU selection1qWu}qX(U meta_typeqYU DTML MethodqZUidq[UsetDBq\u}q](U meta_typeq^U Z SQL Methodq_Uidq`h%u}qa(U meta_typeqbU DTML MethodqcUidqdhu}qe(U meta_typeqfU Z SQL MethodqgUidqhUgetColsqiu}qj(U meta_typeqkU DTML MethodqlUidqmhu}qn(U meta_typeqoUScript (Python)qpUidqqh6u}qr(hoU DTML Methodqshqh"u}qt(U meta_typequU DTML MethodqvUidqwUgenerateTables1qxu}qy(U meta_typeqzUScript (Python)q{Uidq|h,u}q}(hzh{h|h)u}q~(U meta_typeqU DTML MethodqUidqU index_htmlqu}q(U meta_typeqU DTML MethodqUidqU selectFieldsqu}q(hhhU selection2qu}q(U meta_typeqUFolderqUidqUbackupsqu}q(U meta_typeqU DTML MethodqUidqU selectionqu}q(U meta_typeqU DTML MethodqUidqh/u}q(hUFileqhUREADMEqu}q(hhhU init_accessqu}q(U meta_typeqUScript (Python)qUidqU rename_fieldsqu}q(U meta_typeqUSession Data ManagerqUidqUsessionqu}q(hUTransient Object ContainerqhUtmpqu}q(hUScript (Python)qhh3u}q(hhhU set_sessionqu}q(U meta_typeqUScript (Python)qUidqhu}q(U meta_typeqUScript (Python)qUidqh9u}q(U meta_typeqUFolderqUidqUadvisorqu}q(U meta_typeqUExternal MethodqUidqUhtml2pdfqu}q(hU DTML MethodqhU printPreviewqu}q(U meta_typeqUFormulator FormqUidqhLu}q(hUExternal MethodqhU html2testqu}q(U meta_typeqUZ MySQL Database ConnectionqUidqUmysql_dbconnectqu}q(hhhU myDB_connectqutUREADMEq(Uq(U OFS.ImageqUFileqttQU__before_publishing_traverse__q(cZPublisher.BeforeTraverse MultiHook qo}q(U_listq]q(Ueq(U$Products.Sessions.SessionDataManagerqUSessionDataManagerTraverserqttQaU_priorqNU _hooknameqhU_defined_in_classqKubh(Uq(hU DTMLMethodqttQh(U q(hU DTMLMethodqttQh(Uq(hU DTMLMethodqttQh(U q(hU DTMLMethodqttQhW(U q(hU DTMLMethodqttQUtmpq(Ugq(UProducts.Transience.TransienceqUTransientObjectContainerqttQh(Uq(h>UExternalMethodqttQhTUsql2formqh(U q(hUFolderqttQhx(U q(hU DTMLMethodqttQUsessionq(Ufq(hUSessionDataManagerqttQh(Uq(UProducts.ZMySQLDA.DAqU ConnectionqttQh\(U q(hU DTMLMethodqttQU rename_fieldsq(U;q(hU PythonScriptqttQUmysql_dbconnectr(Ur(hU ConnectionrttQU selectionr(U r(hU DTMLMethodrttQU__before_traverse__r}r(K2USessionDataManagerrt(h(hUSessionDataManagerTraverserr ttQsu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Utest-tabq Utitleq UUglobalsq }qUrawqTV my query: / my tab: qU_varsq}qu.=l((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U_write_q U_writeq U _getitem_q U_getitemq U _getattr_qU_getattrqU_print_qU_printqUProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqUdb_listqU sel_tablesqUcolsqUflowqUlabelqUi18nqU selectedListqUfolderq UxUbaseq!Udbq"Uqueryq#Umyidq$Uresq%Upageq&UdUrowsq'Ubase2q(tU co_argcountq)KubU_paramsq*UUidq+U gen_reportq,U__ac_local_roles__q-}q.Uadminq/]q0UOwnerq1asU _bind_namesq2(cShared.DC.Scripts.Bindings NameAssignments q3oq4}q5U_asgnsq6}q7(Uname_containerq8U containerq9U name_subpathq:Utraverse_subpathq;U name_m_selfqUcontextq?usbU func_defaultsq@NU_codeqAT csdZdS(Nc!&st}t}t}t}dkl } |t d} || d} |t d}|||ddd} |||ddd} |||ddd} |||ddd } |||ddd } |||ddd }|||ddd }h}d ||d<x[||t dddd r6}||d |jod||d|d+||d,d-}qxW?|d.}qcWn@|d/joCAx9|d Ar,}B|d0|d1|| |d2}qWn@Dx9|d Dr,}E|d3|| |d4|d5}qWG|d6}dI||d7|}K|||t d||} |M| d8d9d:d;|O||IJP|SdS(<N(s html_quotesREQUESTsRESPONSEsSESSIONsgetsdb_lists sel_tablesscolssflowslabelsi18ns selectedListisdbssql2forms objectItemssFolderismanage_addFolderstables objectValuess myDB_connectsmanage_addZMySQLConnections mydDB_connects rootsYESsSELECT * FROM %ssget_%ssmanage_addProducts ZSQLMethodssmanage_addZSQLMethodsspostsM sh s sbrowsers s s s s srights s s
s
sds
ss
ss
s

s addDTMLMethodsidsreportsfile(!s_write_s_writes _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionsdb_lists sel_tablesscolssflowslabelsi18ns selectedListsfoldersxsbasesdbsquerysmyidsresspagesdsrowssbase2(!s_write_s_writes _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionsdb_lists sel_tablesscolssflowslabelsi18ns selectedListsfoldersxsbasesdbsquerysmyidsresspagesdsrowssbase2((sScript (Python)s gen_reportsr!!!!!!! -$!(  < " ".*' (s gen_report(s gen_report((sScript (Python)ssqBU_bodyqCT # Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST db_list = session.SESSION.get('db_list') sel_tables = session.SESSION.get('sel_tables') cols = session.SESSION.get('cols') flow = session.SESSION.get('flow') label = session.SESSION.get('label') i18n = session.SESSION.get('i18n') selectedList = session.SESSION.get('selectedList') folder = {} folder['db'] = 0 for x in container.sql2form.objectItems('Folder'): if (x[0] == db_list): folder['db'] = 1 if (folder['db'] == 0) : container.sql2form.manage_addFolder(db_list) base = container.sql2form[db_list] folder['table'] = 0 for x in base.objectItems('Folder') : if (x[0] == sel_tables): folder['table'] = 1 if (folder['table'] == 0) : base.manage_addFolder(sel_tables) #copy = container.sql2form.manage_copyObjects(ids='myDB_connect',REQUEST=request,RESPONSE=RESPONSE) #container.sql2form[db_list].manage_pasteObjects(cb_copy_data=copy,REQUEST=request) #base2.manage_pasteObjects(cb_copy_data='copy',REQUEST=None) folder['db'] = 0 for db in base.objectValues(): if (db == 'myDB_connect'): folder['db'] = 1 if (folder['db'] == 0): base.manage_addZMySQLConnection('myDB_connect','mydDB_connect', db_list + ' root', 'YES'); query = "SELECT * FROM %s" % sel_tables myid = "get_%s" % sel_tables ########## the following lines don't work :-( ########### res = base.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(myid,"",'myDB_connect',"",query,request,"post") page = " \n \n \n"; page = page + "\n \n \n "; page = page + " \n"; if (label == "browser"): page = page + " \n" for d in selectedList: page = page + " \n" page = page + " \n" for rows in context[myid]: for d in selectedList: page = page + " \n" page = page + " \n" elif (label == "right"): for d in selectedList: page = page + " \n" else: for d in selectedList: page = page + " \n" page = page + "
" + request[d] + "
" + rows['d'] + "
" + d + "" + request[d] + "
" + request[d] + "" + d + "
\n "; page = page + myid + "

" + query base2 = container.sql2form[db_list][sel_tables] #base2.addDTMLDocument(id="report",file=page) base2.addDTMLMethod(id="report",file=page) print page return printed qDU Script_magicqEKUwarningsqF)UerrorsqG)U Python_magicqHU* qIu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U index_htmlq Utitleq UUglobalsq }qUrawqT

The following wizard will help you in the creation of an automatic database forms. Those forms are saved in dtml methods which are easy to modify and improve.

Database:

Table:

Presentation Layout

No.of columns?

Column flow:

Label location:

I18N:

qU_varsq}qu. x((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q UgenerateTablesq Utitleq UUglobalsq }qUrawqT qU_varsq}qu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U copy_of_setDBq Utitleq UUglobalsq }qUrawqT

>
>

qU_varsq}qu. ((UProducts.ZSQLMethods.SQLqUSQLqtqNt.}q(UidqU get_TablesqU__ac_local_roles__q}qUadminq ]q UOwnerq asU_argq (cShared.DC.ZRDB.Aqueduct Args q oq}q(U_keysq]qU_dataq}qubU connection_idqU myDB_connectqU_colq]q}q(UnameqUTables_in_it4biotechqUtypeqUtUnullqKUwidthqK uaUtemplateqcShared.DC.ZRDB.DA SQL qNRq }q!(U__name__q"Uq#Uglobalsq$}q%Urawq&U show tablesq'U_varsq(}q)ubUtitleq*UU arguments_srcq+UUsrcq,h'u. \ ((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U _getitem_q U_getitemq U _getattr_q U_getattrq U_print_qU_printqUstringqUProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUpageqUnewcolsqUxUcontextqUcolsqUlabelqUdefvalqUselectorqUfieldqUbeginqUendqUmidq U label_textq!tU co_argcountq"KubU_paramsq#UUidq$U genForms3q%U__ac_local_roles__q&}q'Uadminq(]q)UOwnerq*asU _bind_namesq+(cShared.DC.Scripts.Bindings NameAssignments q,oq-}q.U_asgnsq/}q0(Uname_containerq1U containerq2U name_subpathq3Utraverse_subpathq4U name_m_selfq5Uscriptq6U name_contextq7Ucontextq8usbU func_defaultsq9NU_codeq:T0 csdZdS(Ncst}t}t}dk}ddkl}d|t d} || d}  ||| dIJd ||| dIJd ||| dIJd| t ddd || dd d dd || d d} d| d|| dd} d| d} d|| dd} d| d| } d| d} dd}dx|tdd|| ddr}d||dd}d||do||d}dnd}dd||dd}dd ||dd!|d"}d d#|| d$d%}d!d&}d"d'|| d$d%}d#d(||dd)||dd*}d$|| d$d+jo5%| |||||||||} dnO&|| d$d,jo5'| |||||||||} dnqW)|d-}d+| d.} d,| d/} d-| d0} d.| d1} d/|| IJd2|SddS(2N(s html_quotesREQUESTsRESPONSEs HTTP_REFERERsformsdatabasesmanage_addZMySQLConnections myDB_connects mydDB_connects rootsYESsM s
s0 scolsis;

s sel_tabless

s5isgetColsstabs
s
iss! sss
Label text
s
sleftsrightis

s s

s (s _getitem_s_getitems _getattr_s_getattrs_print_s_printsstringsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEspagesnewcolssxscontextscolsslabelsdefvalsselectorsfieldsbeginsendsmids label_text(s _getitem_s_getitems _getattr_s_getattrs_print_s_printsstringsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEspagesnewcolssxscontextscolsslabelsdefvalsselectorsfieldsbeginsendsmids label_text((sScript (Python)s genForms3sJ-" 0! & /59(s genForms3(s genForms3((sScript (Python)ssq;U_bodyq\n \n \n \n "; page = page + "

" + request.sel_tables + "

\n"; page = page + "
\n "; newcols = request.cols * 3; page = page + "" % newcols; page = page + ""; x=0; for cols in context.getCols(tab= request.sel_tables): label = "
\n " + cols[0] + " \n
"; if (cols[4]) : defval = cols[4]; else : defval = ""; selector = " \n"; field = ""; begin = ""; mid = "
Label text
\n "; end = "
\n "; label_text = ""; if (request.label == "left"): page = page + begin + selector + mid + label_text + mid + label + mid + field + end; elif (request.label == "right"): page = page + begin + field + mid + label + mid + label_text + mid + selector + end; x = x + 1; page = page + "

"; page = page + " \n \n "; page = page + "

"; page = page + " \n"; print page; #print page; return printed; q=U Script_magicq>KUwarningsq?)Uerrorsq@)U Python_magicqAU* qBu. Uf((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U _getitem_q U_getitemq U _getattr_q U_getattrq U_print_qU_printqUProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUdbqUmanage_delObjectsqUpageqUxUresultsqUcontextqUcolsqUdefvalqtU co_argcountqKubU_paramsqUUidqU genForms2qU__ac_local_roles__q }q!Uadminq"]q#UOwnerq$asU _bind_namesq%(cShared.DC.Scripts.Bindings NameAssignments q&oq'}q(U_asgnsq)}q*(Uname_containerq+U containerq,U name_subpathq-Utraverse_subpathq.U name_contextq/Ucontextq0U name_m_selfq1Uscriptq2usbU func_defaultsq3NU_codeq4TcsdZdS(Ncst}t}t}dkl}|td} || d} xD|tddr+}  | djo t ddnqdW| tddd|| d d d dd } dd}d|| d }d| d|d} dx|tdd|dr}| d||dd} d||do||d}dnd}d | d||dd|d} dq-W"|d}d$|| IJd%|SddS(N(s html_quotesREQUESTsRESPONSEs objectValuesis myDB_connectsmanage_addZMySQLConnections mydDB_connectsdb_lists rootsYESsa
s sel_tabless sgetColsstabs@iss: i(s _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEsdbsmanage_delObjectsspagesxsresultsscontextscolssdefval(s _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEsdbsmanage_delObjectsspagesxsresultsscontextscolssdefval((sScript (Python)s genForms2s(!-  '% .(s genForms2(s genForms2((sScript (Python)ssq5U_bodyq6T1# Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE for db in container.objectValues(): if (db == 'myDB_connect'): manage_delObjects('myDB_connect'); container.manage_addZMySQLConnection('myDB_connect','mydDB_connect', request.db_list + ' root', 'YES'); ## This page will automatically generate all the table's forms and save them in DTML Methods page = " \n

s

s
"; x=0; #for results in : # OPEN A FILE IN THE DATABASE FOLDER AN WRITE THE CONTENT AS FOLLOWS #tab = results; #cols = context.getCols(tab= results); results = request.sel_tables; page = page + " \n"; for cols in context.getCols(tab= results): page = page + ""; if (cols[4]) : defval = cols[4]; else : defval = ""; page = page + " \n"; x = x + 1; print page; return printed; q7U Script_magicq8KUwarningsq9)Uerrorsq:)U Python_magicq;U* q

" + results + "

\n
\n " + cols[0] + " \n
\n \n
Form/Report Generator: Administrator Access Permission

This program requires the access to MySQL using administrator access rights.If you are not the administrator of the MySQL database server please contact your database administration who must fill the present form. After this, you will be able to use only the databases to which you have access rights.

After achieving the proper rights, the program will read the mysql internal database (named mysql) and will extract the name of the existing databases.

Id:
Title:
Admin Username:
Admin Password:

qU_varsq}qu.dw((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U_write_q U_writeq U _getitem_q U_getitemq U _getattr_qU_getattrqU_print_qU_printqUProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqUareaqUscriptqUfUxUdblistqUsubqtU co_argcountqKubU_paramsqUUidqU session_testq U__ac_local_roles__q!}q"Uadminq#]q$UOwnerq%asU _bind_namesq&(cShared.DC.Scripts.Bindings NameAssignments q'oq(}q)U_asgnsq*}q+(Uname_containerq,U containerq-U name_subpathq.Utraverse_subpathq/U name_contextq0Ucontextq1U name_m_selfq2Uscriptq3usbU func_defaultsq4NU_codeq5TBcsdZdS(Nc5st}t}t}t}dkl } |t d} || d} |t d} d|||dd< |||ddd}|dI|td Id |td I|td o$|d | |td In|dI|t dIJ|dIJ|| IJ|dIJ||IJ|dIJ||IJ|dIJh}d||d<x[||t ddddr6} ||ddjo"d||ds

OTHER DATA

isdb_listssql2forms objectItemssFolders it4biotechistables Opensource(s_write_s_writes _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionsareasscriptsfsxsdblistssub(s_write_s_writes _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionsareasscriptsfsxsdblistssub((sScript (Python)s session_tests>!5$        - ' 6 (s session_test(s session_test((sScript (Python)ssq6U_bodyq7T # Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST session.SESSION['sel_tables'] = "area" area = session.SESSION.get('sel_tables') # Return a string identifying this script. print "This is the", script.meta_type, '"%s"' % script.getId(), if script.title: print "(%s)" % html_quote(script.title), print "in", container.absolute_url() print "
" print request print "
" print session print "
" print area print "

OTHER DATA

" f = {} f['db_list'] = 0 for x in container.sql2form.objectItems('Folder'): #print x[0] #print "

" if (x[0] == 'it4biotech'): #print x f['db_list'] = 1 dblist = 'it4biotech' sub = container.sql2form[dblist].objectItems() print sub f['table'] = 0 for x in container.sql2form[dblist].objectItems('Folder') : if (x[0] == 'Opensource'): f['table'] = 1 print f return printed q8U Script_magicq9KUwarningsq:)Uerrorsq;)U Python_magicq is table_names sgetColsstabs@iss: i(s _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEspagesxsresultsscontextscolssdefval(s _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEspagesxsresultsscontextscolssdefval((sScript (Python)sgenFormss   '% .(sgenForms(sgenForms((sScript (Python)ssq1U_bodyq2T\# Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE ## This page will automatically generate all the table's forms and save them in DTML Methods page = "
\n

s

s
"; x=0; for results in request.table_name: # OPEN A FILE IN THE DATABASE FOLDER AN WRITE THE CONTENT AS FOLLOWS #tab = results; #cols = context.getCols(tab= results); page = page + " \n"; for cols in context.getCols(tab= results): page = page + ""; if (cols[4]) : defval = cols[4]; else : defval = ""; page = page + " \n"; x = x + 1; print page; return printed; q3U Script_magicq4KUwarningsq5)Uerrorsq6)U Python_magicq7U* q8u.= ((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U_write_q U_writeq U _getitem_q U_getitemq U _getattr_qU_getattrqU_print_qU_printqUProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqUdb_listqU sel_tablesqUcolsqUflowqUlabelqUi18nqU selectedListqUfolderq UxUbaseq!Udbq"Uqueryq#Umyidq$Uresq%Umyid2q&Uargsq'UdUquery2q(Ucntq)Ulenq*Utotq+Ures2q,Umyid3q-Uquery3q.Ures3q/Uheaderq0Upageq1UnUfooterq2Ureportq3Ureferq4Ubase2q5tU co_argcountq6KubU_paramsq7UUidq8Ugen_formq9U__ac_local_roles__q:}q;Uadminq<]q=UOwnerq>asU _bind_namesq?(cShared.DC.Scripts.Bindings NameAssignments q@oqA}qBU_asgnsqC}qD(Uname_containerqEU containerqFU name_subpathqGUtraverse_subpathqHU name_contextqIUcontextqJU name_m_selfqKUscriptqLusbU func_defaultsqMNU_codeqNTcsdZdS(Nc/Bs t}t}t}t}dkl } |t d} || d} |t d} |||ddd} |||ddd} |||ddd} |||ddd } |||ddd }|||ddd }|||ddd }h}d ||d<x[||t dddd r6}||d |jod||d| d&} ?d }!@xR|d @rE}A| d'|} B|!d}!C|!|#joD| d%} nqWE| d(} F||||ddd|d d|| | d!}$Id)|}%Jd }Kx$|d Kr}L||d#}qHWMd*|}&Nd }!Ot"|}#PxX|d PrK}Q|&d+||f}&R|!d}!S|!|#joT|&d,}&nqWU|&d-||d ||d f}&V||||ddd|%d d||&| d!}'Yd.|d/}(dZ|(d0}(d]d1})^|)d2|d3})_|)d4})`|)d5})ax(|d ar}b|)d6|d7})qWc|)d8})d|)d9})e|)d:})fd }*gx9|d gr,}h|)d;|d<|*})i|*d}*qWk|)d=})|)d>|d?|d@})d|dAjo|)dB})x1|d r$}|)dC|| |dD})qW|)dE})x(|d r}|)dF|dG})qW|)dH})n|dIjoCx9|d r,}|)dJ|dK|| |dL})q3Wn@x9|d r,}|)dM|| |dN|dO})qvW|)dP})dQ}+d },|,d>|d?|dR},|dAjo|,dB},x1|d r$}|,dS|| |dD},q W|,dE},x(|d r}|,dT|dU},qR W|,dH},n|dIjoCx9|d r,}|,dV|dW|| |dL},q Wn@x9|d r,}|,dX|| |dY|dZ},q Wd[|,d\}-d]|,},|,d^|-},|||t d||}.||.d_d`dadb|(||.d_d`dcdb|)||.d_d`dddb|,||.d_d`dedb|+||)IJ|SdS(fN(s html_quotesREQUESTsRESPONSEsSESSIONsgetsdb_lists sel_tablesscolssflowslabelsi18ns selectedListisdbssql2forms objectItemssFolderismanage_addFolderstables objectValuess myDB_connectsmanage_addZMySQLConnections mydDB_connects rootsYESsSELECT * FROM %ssget_%ssmanage_addProducts ZSQLMethodssmanage_addZSQLMethodssposts insert_%ss sINSERT INTO %s (s,s ) VALUES (s s)s update_%ssUPDATE %s SET s%s = s, s WHERE %s = sM sh s_ s

Database: s

Table: sB

" + results + "

\n
\n " + cols[0] + " \n
\n \n
sbrowsers s s s s srights! s s=
s
s
s"
Record:

s5

s. s s s s
s
s
s
ssa Print this form s addDTMLMethodsidsstandard_html_headersfilesformsreportsstandard_html_footer(/s_write_s_writes _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionsdb_lists sel_tablesscolssflowslabelsi18ns selectedListsfoldersxsbasesdbsquerysmyidsressmyid2sargssdsquery2scntslenstotsres2smyid3squery3sres3sheaderspagesnsfootersreportsrefersbase2(/s_write_s_writes _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionsdb_lists sel_tablesscolssflowslabelsi18ns selectedListsfoldersxsbasesdbsquerysmyidsressmyid2sargssdsquery2scntslenstotsres2smyid3squery3sres3sheaderspagesnsfootersreportsrefersbase2((sScript (Python)sgen_forms!!!!!!! -$!(  <          <     )<        '! " .*    " .* ' (sgen_form(sgen_form((sScript (Python)ssqOU_bodyqPT/# Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE #### define variables session = context.REQUEST db_list = session.SESSION.get('db_list') sel_tables = session.SESSION.get('sel_tables') cols = session.SESSION.get('cols') flow = session.SESSION.get('flow') label = session.SESSION.get('label') i18n = session.SESSION.get('i18n') selectedList = session.SESSION.get('selectedList') #### create a folder named with the db's name and a subfolder with the table's name folder = {} folder['db'] = 0 for x in container.sql2form.objectItems('Folder'): if (x[0] == db_list): folder['db'] = 1 if (folder['db'] == 0) : container.sql2form.manage_addFolder(db_list) base = container.sql2form[db_list] folder['table'] = 0 for x in base.objectItems('Folder') : if (x[0] == sel_tables): folder['table'] = 1 if (folder['table'] == 0) : base.manage_addFolder(sel_tables) folder['db'] = 0 for db in base.objectValues(): if (db =='myDB_connect'): folder['db'] = 1 ### add the datbase manipulation objects if (folder['db'] == 0): base.manage_addZMySQLConnection('myDB_connect','mydDB_connect', db_list + ' root', 'YES'); query = "SELECT * FROM %s" % sel_tables myid = "get_%s" % sel_tables res = base.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(myid,"",'myDB_connect',"",query,request,"post") ###### NOTE: this is refinemrent; strings nust be inserted within quotes ("") ! ########## myid2 = "insert_%s" % sel_tables args = "" for d in selectedList: args = args + d + "\n" query2 = "INSERT INTO %s (" % sel_tables cnt = 0 tot = len(selectedList) for d in selectedList: query2 = query2 + d cnt = cnt + 1 if cnt < tot: query2 = query2 + "," query2 = query2 + ") VALUES (" cnt = 0 for d in selectedList: query2 = query2 + "" % d cnt = cnt + 1 if cnt < tot: query2 = query2 + "," query2 = query2 + ")" res2 = base.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(myid2,"",'myDB_connect',args,query2,request,"post") ###### NOTE: this is refinement; strings nust be inserted within quotes ("") ! ########## myid3 = "update_%s" % sel_tables args = "" for d in selectedList: args = args + d + "\n" query3 = "UPDATE %s SET \n" % sel_tables cnt = 0 tot = len(selectedList) for d in selectedList: query3 = query3 + "%s = " % (d,d) cnt = cnt + 1 if cnt < tot: query3 = query3 + ", \n" query3 = query3 + " WHERE %s = " % (selectedList[0],selectedList[0]) res3 = base.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(myid3,"",'myDB_connect',args,query3,request,"post") ### define the header content header = " \n \n \n"; header = header + "\n \n \n "; ### define the form content page = " \n """ page = page + "

Database: " + db_list + "

Table: "+ sel_tables + "

\n"; if (label == "browser"): page = page + " \n" for d in selectedList: page = page + " \n" page = page + " \n" for d in selectedList: page = page + " \n" page = page + " \n" elif (label == "right"): for d in selectedList: page = page + " \n" else: for d in selectedList: page = page + " \n" page = page + """
" + request[d] + "
" + request[d] + "
" + request[d] + "
Record:

""" ### define the footer content footer = "

" ### create the report report = "" report = report + "

Database: " + db_list + "

Table: " + sel_tables + "

\n \n" if (label == "browser"): report = report + " \n" for d in selectedList: report = report + " \n" report = report + " \n" for d in selectedList: report = report + " \n" report = report + " \n" elif (label == "right"): for d in selectedList: report = report + " \n" else: for d in selectedList: report = report + " \n" refer = "" + report + "
" + request[d] + "
" + request[d] + "
" + request[d] + "
" report = "" + report report = report + " Print this form " % refer ### create the content objects base2 = container.sql2form[db_list][sel_tables] base2.addDTMLMethod(id="standard_html_header",file=header) base2.addDTMLMethod(id="form",file=page) base2.addDTMLMethod(id="report",file=report) base2.addDTMLMethod(id="standard_html_footer",file=footer) print page return printed qQU Script_magicqRKUwarningsqS)UerrorsqT)U Python_magicqUU* qVu.((U&Products.ExternalMethod.ExternalMethodqUExternalMethodqtqNt.}q(UtitleqU html2testqUidqU html2testqU__ac_local_roles__q }q Uadminq ]q UOwnerq asU _functionqU html2testqU_moduleqU html2testqu.G((U OFS.FolderqUFolderqtqNt.}q(U myDB_connectq(Uq(UProducts.ZMySQLDA.DAqU ConnectionqttQUinsert_documentq (Uq (UProducts.ZSQLMethods.SQLq USQLq ttQUidq UadvisorqU__ac_local_roles__q}qUadminq]qUOwnerqasUdocumentq(Uq(hUFolderqttQU_objectsq(}q(U meta_typeqUFolderqh Udocumentqu}q(hUZ MySQL Database Connectionqh hu}q(hU Z SQL Methodqh U get_documentq u}q!(hhh Uinsert_documentq"u}q#(hhh Uupdate_documentq$utUtitleq%UUupdate_documentq&(Uq'(h USQLq(ttQU get_documentq)(Uq*(h USQLq+ttQu. ((UProducts.ZSQLMethods.SQLqUSQLqtqNt.}q(UidqU mysql_dbsqU__ac_local_roles__q}qUadminq ]q UOwnerq asU connection_idq Umysql_dbconnectq UsrcqUselect DB from dbqU_colq]q}q(UnameqUDBqUtypeqUtUnullqKUwidthqK uaUtemplateqcShared.DC.ZRDB.DA SQL qNRq}q(U__name__qUqUglobalsq}qUrawq hU_varsq!}q"ubUtitleq#UU arguments_srcq$UU_argq%(cShared.DC.ZRDB.Aqueduct Args q&oq'}q((U_keysq)]q*U_dataq+}q,ubu.<((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U_write_q U_writeq U _getattr_q U_getattrq UProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqtU co_argcountqKubU_paramsqUUidqU set_sessionqU__ac_local_roles__q}qUadminq]qUOwnerqasU _bind_namesq(cShared.DC.Scripts.Bindings NameAssignments qoq }q!U_asgnsq"}q#(Uname_containerq$U containerq%U name_subpathq&Utraverse_subpathq'U name_contextq(Ucontextq)U name_m_selfq*Uscriptq+usbU func_defaultsq,NU_codeq-T!csdZdS(Nc st}t}dkl}|td}||d}|t d}  ||d||| dd< ||d||| ddsq.U_bodyq/TJ# Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST session.SESSION['sel_tables'] = request.sel_tables session.SESSION['db_list'] = request.db_list q0U Script_magicq1KUwarningsq2)Uerrorsq3)U Python_magicq4U* q5u. r((UProducts.ZSQLMethods.SQLqUSQLqtqNt.}q(UidqUgetColsqU__ac_local_roles__q}qUadminq ]q UOwnerq asU connection_idq U myDB_connectq UsrcqU"SHOW COLUMNS FROM qU_colq]q(}q(UnameqUFieldqUtypeqUtUnullqKUwidthqK u}q(hUTypeqhUthKhKu}q(hUNullqhUthKhKu}q(hUKeyqhUthKhKu}q(hUDefaultqhUthKhK u}q (hUExtraq!hUthKhKueUtemplateq"cShared.DC.ZRDB.DA SQL q#NRq$}q%(U__name__q&Uq'Uglobalsq(}q)Urawq*hU_varsq+}q,ubUtitleq-UU arguments_srcq.Utabq/U_argq0(cShared.DC.ZRDB.Aqueduct Args q1oq2}q3(U_keysq4]q5h/aU_dataq6}q7h/}q8subu. ((UProducts.Formulator.FormqUZMIFormqtqNt.}q(UenctypeqNU multitestq(U q(U"Products.Formulator.StandardFieldsqUMultiCheckBoxFieldq ttQUidq U test-formq U_objectsq (}q (U meta_typeqU ListFieldqh Ulistqu}q(U meta_typeqU RadioFieldqUidqUradio1qu}q(U meta_typeqU CheckBoxFieldqUidqUchecksqu}q(U meta_typeqUMultiCheckBoxFieldqUidqhu}q(U meta_typeq UMultiListFieldq!Uidq"U table_fieldsq#u}q$(U meta_typeq%U DateTimeFieldq&Uidq'Uinvitedq(u}q)(U meta_typeq*UMultiListFieldq+Uidq,U multilistq-utq.Uactionq/UUgroupsq0}q1UDefaultq2]q3(hhhhh#h(h-esh#(U 3q4(hUMultiListFieldq5ttQUmethodq6UPOSTq7U group_listq8]q9h2aUlistq:(U q;(hU ListFieldqttQUchecksq?(U q@(hU CheckBoxFieldqAttQU row_lengthqBKUnameqCUtestqDh(U qE(hU RadioFieldqFttQh-(UqG(hUMultiListFieldqHttQUtitleqIUu.((U OFS.ImageqUFileqtqNt.}q(UsizeqM$UdataqT$This zope product is intended for the automatic creation of forms and reports from existent databases, The main advantage of this product over other similar products is its full I18N compatible. It is composed of the following files: (in the described order) 1-. admin_access -> first step. needs read access to the mysql internal database (mysql). 2-. init_access -> second step, create the database connection to the mysql internal database. 3-. selection2 -> third step, select the database and tables for which we want to generate the form or report. 4-. select_fields-> four step. Select the fields to be included and their presentation order. 5-. rename_fields-> fifth step. Give names to the selected fields to be shown as the form/report labels. 6-. gen_form -> sixth step. Generate a report template.(*) (*) It could be possible to also generate a query for searching rows with a specified criteria. It needs to add a checkbox for the fields in rename_fields for defining the WHERE clause. It has to be implemented with ZSQL. qU_EtagSupport__etagqU ts40683377.03q U__name__q UREADMEq Utitleq UU content_typeq Utext/x-unknown-content-typeqU preconditionqUU__ac_local_roles__q}qUadminq]qUOwnerqasu.e((U$Products.Sessions.SessionDataManagerqUSessionDataManagerTraverserqtqNt.}q(U_sessionDataManagerqUsessionqU_requestSessionNameqUSESSIONqu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U init_accessq Utitleq UUglobalsq }qUrawqTV

The following wizard will help you in the creation of an automatic database forms. Those forms are saved in dtml methods which are easy to modify and improve.

Id:
Title:
Connection Id:
Database:
Table:
qU_varsq}qu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U selectFieldsq Utitleq UUglobalsq }qUrawqTW
Form/Report Generator

This form will let you select the fields you want to be included in the form or report. You can also change the order of apearance of each field in the form/report and the flow direction. If you need to make a form in a specific language you can even select a specific character coding. Those who write from right to left (hebrew and arab) can find usefull the option of putting labels to the right of the field value.

Available Fields

Selected Fields



Presentation Layout

No.of columns:
Column flow:
Label location:
Character coding:

qU_varsq}qu.((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U printPreviewq Utitleq UUglobalsq }qUrawqT

This is the Document in the folder. print this docuement preview a pdf docuement test docuement

qU_varsq}qu. E((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U selection2q Utitleq UUglobalsq }qUrawqT
Form/Report Generator
qU_varsq}qu. o((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U selection1q Utitleq UUglobalsq }qUrawqT

The following wizard will help you in the creation of an automatic database forms. Those forms are saved in dtml methods which are easy to modify and improve.

Database:

Table:


Selected fields


Presentation Layout

No.of columns?

Column flow:

Label location:

I18N:

qU_varsq}qu.g;((UProducts.Transience.TransienceqUTransientObjectContainerqtqNt.}q(U__len__q(Uhq(U BTrees.LengthqULengthqttQUidq Utmpq U _deindex_nextq (Uiq (hU Increaserq ttQU_min_spare_bucketsqK U_dataq(Ujq(UBTrees._IOBTreeqUIOBTreeqttQU__ac_local_roles__q}qUadminq]qUOwnerqasU_timeout_slicesqKttQh(U Sq?(h8U DTMLMethodq@ttQh%(UOqA(h8U DTMLMethodqBttQh(U qC(h8U DTMLMethodqDttQUtitleqEUh(U ]qF(h8U DTMLMethodqGttQh,(U&qH(hU PythonScriptqIttQh'(UPqJ(h8U DTMLMethodqKttQu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q UgenerateTables1q Utitleq UUglobalsq }qUrawqTU Tables:

qU_varsq}qu.f((U$Products.Sessions.SessionDataManagerqUSessionDataManagerqtqNt.}q(UidqUsessionqUobpathq]qUtmpq aU__ac_local_roles__q }q Uadminq ]q UOwnerqasUtitleqUU_requestSessionNameqUSESSIONqU_hasTraversalHookqKu.((UProducts.ZMySQLDA.DAqU ConnectionqtqNt.}q(UtitleqU mydDB_connectqUidqU myDB_connectqU__ac_local_roles__q }q Uadminq ]q UOwnerq asUconnection_stringqUit4biotech rootqu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q UsetDBq Utitleq UUglobalsq }qUrawqT 

>
> >

qU_varsq}qu.;((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U_write_q U_writeq U _getattr_q U_getattrq U_print_qU_printqUstringqUProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqU sel_tablesqUpageqUxUcolsqUlabelqUfieldqUbeginqUendqUmidqtU co_argcountq KubU_paramsq!UUidq"U rename_fieldsq#U__ac_local_roles__q$}q%Uadminq&]q'UOwnerq(asU _bind_namesq)(cShared.DC.Scripts.Bindings NameAssignments q*oq+}q,U_asgnsq-}q.(Uname_containerq/U containerq0U name_subpathq1Utraverse_subpathq2U name_contextq3Ucontextq4U name_m_selfq5Uscriptq6usbU func_defaultsq7NU_codeq8TcsdZdS(Nc st}t}t}dk}ddkl}d|t d} || d}  |t d}  ||| ddd} || d||| dd< || d||| dd<|| d ||| dd <|| d ||| dd <|| d ||| dd <d }d|d |d}d|d}d|d}d|d}dd}d!x|| dd!r}"d|d}d$d|d|d}d%d}d&d}d'd}d)||||||}dqW+|d}d-|d}d/|d}d0|d}d1|d}d2||IJd5|SddS( N(s html_quotesREQUESTsRESPONSEsSESSIONsgets sel_tabless selectedListsflowslabelscolssi18nss

s

s8 s:s%is
s
ss$s%
Field nameLabel Text
s
is

s0 s

s (s_write_s_writes _getattr_s_getattrs_print_s_printsstringsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessions sel_tablesspagesxscolsslabelsfieldsbeginsendsmid(s_write_s_writes _getattr_s_getattrs_print_s_printsstringsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessions sel_tablesspagesxscolsslabelsfieldsbeginsendsmid((sScript (Python)s rename_fieldss>!%%%%%     %(s rename_fields(s rename_fields((sScript (Python)ssq9U_bodyq:T# Example code: # Import a standard function, and get the HTML request and response objects. import string; from Products.PythonScripts.standard import html_quote; request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST sel_tables = session.SESSION.get('sel_tables') session.SESSION['selectedList'] = request.selectedList session.SESSION['flow'] = request.flow session.SESSION['label'] = request.label session.SESSION['cols'] = request.cols session.SESSION['i18n'] = request.i18n #print session.SESSION; #print request.HTTP_REFERER; #print request.form; page=""; #page = " \n \n \n #\n \n \n "; page = page + "

" + sel_tables + "

\n"; #page = page + "
\n "; #page = page + " \n "; page = page + " \n "; page = page + ""; page = page + ""; x=0; for cols in request.selectedList : label = "
\n " + cols + " \n
\n"; #selector = " \n"; field = ""; begin = ""; mid = "
Field nameLabel Text
\n "; end = "
\n "; #page = page + begin + selector + mid + label + mid + field + end; page = page + begin + label + mid + field + end; x = x + 1; page = page + "

"; page = page + " \n "; page = page + "

"; page = page + " \n"; print page; #print page; return printed; q;U Script_magicq)U Python_magicq?U* q@u.((UProducts.ZMySQLDA.DAqU ConnectionqtqNt.}q(UtitleqUmysql_dbconnectqUidqhU__ac_local_roles__q}q Uadminq ]q UOwnerq asUconnection_stringq U mysql root qu. P((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U selectionq Utitleq UUglobalsq }qUrawqT
Form/Report Generator

The following wizard will help you in the creation of an automatic database forms. Those forms are saved in dtml methods which are easy to modify and improve.

Id:
Title:
Database:
Table:

Presentation Layout

No.of columns:
Column flow:
Label location:
Character coding:

qU_varsq}qu.((UProducts.ZMySQLDA.DAqU ConnectionqtqNt.}q(UtitleqU mydDB_connectqUidqU myDB_connectqU__ac_local_roles__q }q Uadminq ]q UOwnerq asUconnection_stringqU advisor rootqu.((UProducts.ZSQLMethods.SQLqUSQLqtqNt.}q(UidqUinsert_documentqU__ac_local_roles__q}qUadminq ]q UOwnerq asU connection_idq U myDB_connectq UtitleqUUtemplateqcShared.DC.ZRDB.DA SQL qNRq}q(U__name__qUqUglobalsq}qUrawqUINSERT INTO document (doc_id,author_id,doc_name,doc_descript,area_id,field_id) VALUES (,,,,,)qU_varsq}qubUsrcqhU arguments_srcqU8doc_id author_id doc_name doc_descript area_id field_id qU_argq(cShared.DC.ZRDB.Aqueduct Args qoq }q!(U_keysq"]q#(Udoc_idq$U author_idq%Udoc_nameq&U doc_descriptq'Uarea_idq(Ufield_idq)eU_dataq*}q+(h'}q,h)}q-h%}q.h$}q/h(}q0h&}q1uubu.((U OFS.FolderqUFolderqtqNt.}q(Ustandard_html_headerq(Uq(UOFS.DTMLMethodqU DTMLMethodqttQUidq Udocumentq U__ac_local_roles__q }q Uadminq ]qUOwnerqasU_objectsq(}q(U meta_typeqU DTML Methodqh hu}q(hhh Uformqu}q(hhh Ustandard_html_footerqu}q(U meta_typeqU DTML MethodqUidqUreportqu}q(hUScript (Python)qhUreporterqu}q (U meta_typeq!UScript (Python)q"Uidq#U reporter2q$u}q%(h!h"h#U reporter3q&utUreportq'(Uq((hU DTMLMethodq)ttQU reporter3q*(Uq+(U#Products.PythonScripts.PythonScriptq,U PythonScriptq-ttQh$(Uq.(h,U PythonScriptq/ttQh(Uq0(h,U PythonScriptq1ttQh(Uq2(hU DTMLMethodq3ttQUtitleq4Uh(Uq5(hU DTMLMethodq6ttQu.((UProducts.ZSQLMethods.SQLqUSQLqtqNt.}q(UidqUupdate_documentqU__ac_local_roles__q}qUadminq ]q UOwnerq asU connection_idq U myDB_connectq UtitleqUUtemplateqcShared.DC.ZRDB.DA SQL qNRq}q(U__name__qUqUglobalsq}qUrawqUUPDATE document SET doc_id = , author_id = , doc_name = , doc_descript = , area_id = , field_id = WHERE doc_id = qU_varsq}qubUsrcqhU arguments_srcqU8doc_id author_id doc_name doc_descript area_id field_id qU_argq(cShared.DC.ZRDB.Aqueduct Args qoq }q!(U_keysq"]q#(Udoc_idq$U author_idq%Udoc_nameq&U doc_descriptq'Uarea_idq(Ufield_idq)eU_dataq*}q+(h'}q,h)}q-h%}q.h$}q/h(}q0h&}q1uubu.((UProducts.ZSQLMethods.SQLqUSQLqtqNt.}q(UidqU get_documentqU__ac_local_roles__q}qUadminq ]q UOwnerq asU connection_idq U myDB_connectq UtitleqUUtemplateqcShared.DC.ZRDB.DA SQL qNRq}q(U__name__qUqUglobalsq}qUrawqUSELECT * FROM documentqU_varsq}qubUsrcqhU arguments_srcqUU_argq(cShared.DC.ZRDB.Aqueduct Args qoq}q (U_keysq!]q"U_dataq#}q$ubu. ((U"Products.Formulator.StandardFieldsqUMultiCheckBoxFieldqtqNt.}q(Umessage_valuesq}q(Urequired_not_foundqU%Input is required but no input given.qUexternal_validator_failedq U(The input failed the external validator.q Uunknown_selectionq U.You selected an item that was not in the list.q uUidq U multitestqUvaluesq}q(Ualternate_nameqUUhiddenqKU orientationqUverticalqUitemsq]q((Usample1qht(Usample2qht(Usample3qhteUexternal_validatorqUUrequiredqKU css_classqUUdefaultq]qUtitleqU multitestq U descriptionq!UuU overridesq"}q#(hUhUhUhUhUhUh!UhUhUhUuUtalesq$}q%(hUhUhUhUhUhUh!UhUhUhUuu. 3((U"Products.Formulator.StandardFieldsqUMultiListFieldqtqNt.}q(Umessage_valuesq}q(Urequired_not_foundqU%Input is required but no input given.qUexternal_validator_failedq U(The input failed the external validator.q Uunknown_selectionq U.You selected an item that was not in the list.q uUidq U table_fieldsqUvaluesq}q(UhiddenqKUitemsq]q((UaUat(UbUbt(UcUct(UdUdt(UeUeteUexternal_validatorqUUrequiredqKU css_classqUUdefaultq]qUtitleqUשדותqUsizeqKUalternate_nameqUUextraqUU descriptionqUSelect one or more fieldsquU overridesq }q!(hUhUhUhUhUhUhUhUhUhUhUuUtalesq"}q#(hUhUhUhUhUhUhUhUhUhUhUuu. ((U"Products.Formulator.StandardFieldsqU ListFieldqtqNt.}q(Umessage_valuesq}q(Urequired_not_foundqU%Input is required but no input given.qUexternal_validator_failedq U(The input failed the external validator.q Uunknown_selectionq U.You selected an item that was not in the list.q uUidq UlistqUvaluesq}q(UhiddenqKU css_classqUUexternal_validatorqUUrequiredqKUitemsq]q((Uunoqht(Udosqht(UtresqhteUdefaultqUUtitleqUlistqU first_itemqKUsizeqKUalternate_nameqUUextraq UU descriptionq!UuU overridesq"}q#(hUhUhUhUhUhUhUhUhUhUh!Uh UuUtalesq$}q%(hUhUhUhUhUhUhUhUhUhUh!Uh Uuu. ((U"Products.Formulator.StandardFieldsqU DateTimeFieldqtqNt.}q(UidqUinvitedqUtalesq}q(Ualternate_nameq UU input_styleq UU input_orderq UUhiddenq UUtime_separatorq UUdate_separatorqUU css_classqUU end_datetimeqUUstart_datetimeqUU date_onlyqUUrequiredqUU default_nowqUUdefaultqUUtitleqUU descriptionqUUexternal_validatorqUuUvaluesq}q(h Utextqh UdmyqhU/h(cDateTime.DateTime DateTime qNoq}q(U_hourq KU_dq!G@pU_fmonq"UJanuaryq#U_yearq$MU_pmonq%UJan.q&Utimeq'GU_dayq(KU_millisq)L1262304000000L U_adayq*UFriq+U_tq,GANU _dayoffsetq-KU_minuteq.KU_monthq/KU_pmq0Uamq1U_secondq2GU_amonq3UJanq4U_fdayq5UFridayq6U_pdayq7UFri.q8U_pmhourq9K U_tzq:U Universalq;U_nearsecq}q?(h Kh!Gvh"h#h$Mlh%h&h'Gh(Kh)L-2208988800000L h*UMonq@h,GuOh-Kh.Kh/Kh0h1h2Gh3h4h5UMondayqAh7UMon.qBh9K h:h;h.ja((UBTrees._IOBTreeqUIOBTreeqtqNt.(((Urq(hUIOBucketqttQt(h(hUIOBucketqttQtq.k=((UProducts.Transience.TransienceqU IncreaserqtqNt.J\7<.l((UBTrees.OOBTreeqUOOBTreeqtqNt.((((U02224691A0HPBiiIb6IqJh5ttttq.&((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U_write_q U_writeq U _getitem_q U_getitemq U _getattr_qU_getattrqU_print_qU_printqUProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqUdb_listqU sel_tablesqUcolsqUflowqUlabelqUi18nqU selectedListqUfolderq UxUbaseq!Udbq"Uqueryq#Umyidq$Uresq%Upageq&UdUnUbase2q'tU co_argcountq(KubU_paramsq)UUidq*Ucopy_of_gen_formq+U__ac_local_roles__q,}q-Uadminq.]q/UOwnerq0asU _bind_namesq1(cShared.DC.Scripts.Bindings NameAssignments q2oq3}q4U_asgnsq5}q6(Uname_containerq7U containerq8U name_subpathq9Utraverse_subpathq:U name_contextq;UcontextqusbU func_defaultsq?NU_codeq@TcsdZdS(Nc!(st}t}t}t}dkl } |t d} || d} |t d}|||ddd} |||ddd} |||ddd} |||ddd } |||ddd } |||ddd }|||ddd }h}d ||d<x[||t dddd r6}||d |jod||dd }?x9|d ?r,}@|d/|d0|}A|d}qWC|d1}Z|d2|d3|d4}d\|d5jo]|d6}^x1|d ^r$}_|d7|| |d8}q W`|d9}ax(|d ar}b|d:|d;}qPWc|d<}nd|d=joCex9|d er,}f|d>|d?|| |d@}qWn@hx9|d hr,}i|dA|| |dB|dC}qWj|dD}k|dE}l|dF}n|dG}dr|||t d||} |t| dHdIdJdK|v||IJw|SdS(LN(s html_quotesREQUESTsRESPONSEsSESSIONsgetsdb_lists sel_tablesscolssflowslabelsi18ns selectedListisdbssql2forms objectItemssFolderismanage_addFolderstables objectValuess myDB_connectsmanage_addZMySQLConnections mydDB_connects rootsYESsSELECT * FROM %ssget_%ssmanage_addProducts ZSQLMethodssmanage_addZSQLMethodsspostsM sh s= s

Database: s

Table: s$

sbrowsers s s s s srights! s sM s
s
s
s"
sW sARecord:
s addDTMLMethodsidsreportsfile(!s_write_s_writes _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionsdb_lists sel_tablesscolssflowslabelsi18ns selectedListsfoldersxsbasesdbsquerysmyidsresspagesdsnsbase2(!s_write_s_writes _getitem_s_getitems _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionsdb_lists sel_tablesscolssflowslabelsi18ns selectedListsfoldersxsbasesdbsquerysmyidsresspagesdsnsbase2((sScript (Python)sgen_forms!!!!!!! -$!(  <        ! " .*   ' (sgen_form(sgen_form((sScript (Python)ssqAU_bodyqBT# Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST db_list = session.SESSION.get('db_list') sel_tables = session.SESSION.get('sel_tables') cols = session.SESSION.get('cols') flow = session.SESSION.get('flow') label = session.SESSION.get('label') i18n = session.SESSION.get('i18n') selectedList = session.SESSION.get('selectedList') folder = {} folder['db'] = 0 for x in container.sql2form.objectItems('Folder'): if (x[0] == db_list): folder['db'] = 1 if (folder['db'] == 0) : container.sql2form.manage_addFolder(db_list) base = container.sql2form[db_list] folder['table'] = 0 for x in base.objectItems('Folder') : if (x[0] == sel_tables): folder['table'] = 1 if (folder['table'] == 0) : base.manage_addFolder(sel_tables) #copy = container.sql2form.manage_copyObjects(ids='myDB_connect',REQUEST=request,RESPONSE=RESPONSE) #container.sql2form[db_list].manage_pasteObjects(cb_copy_data=copy,REQUEST=request) #base2.manage_pasteObjects(cb_copy_data='copy',REQUEST=None) folder['db'] = 0 for db in base.objectValues(): if (db == 'myDB_connect'): folder['db'] = 1 if (folder['db'] == 0): base.manage_addZMySQLConnection('myDB_connect','mydDB_connect', db_list + ' root', 'YES'); query = "SELECT * FROM %s" % sel_tables myid = "get_%s" % sel_tables ########## the following lines don't work :-( ########### res = base.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(myid,"",'myDB_connect',"",query,request,"post") page = " \n \n \n"; page = page + "\n \n \n "; page = page + " """ page = page + "

Database: " + db_list + "

Table: "+ sel_tables + "

\n"; if (label == "browser"): page = page + " \n" for d in selectedList: page = page + " \n" page = page + " \n" for d in selectedList: page = page + " \n" page = page + " \n" elif (label == "right"): for d in selectedList: page = page + " \n" else: for d in selectedList: page = page + " \n" page = page + " \n" page = page + "
" + request[d] + "
" + request[d] + "
" + request[d] + "
\n " page = page + " \n" page = page + "Record: \n
\n "; #page = page + myid + "

" + query base2 = container.sql2form[db_list][sel_tables] #base2.addDTMLDocument(id="report",file=page) base2.addDTMLMethod(id="report",file=page) print page return printed qCU Script_magicqDKUwarningsqE)UerrorsqF)U Python_magicqGU* qHu.?((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ureportq Utitleq UUglobalsq }qUrawqTC

Database: advisor

Table: document

doc_id
author_id
doc_name
area_id
field_id
creation_date
Record:/
qU_varsq}qu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q U field_selectq Utitleq UUglobalsq }qUrawqT


qU_varsq}qu. ((U'Products.PageTemplates.ZopePageTemplateqUZopePageTemplateqtqNt.}q(U_textqT The title

content title or id optional template id

This is Page Template template id. qUidqU index_htmlqU__ac_local_roles__q }q Uadminq ]q UOwnerq asU _bind_namesq(cShared.DC.Scripts.Bindings NameAssignments qoq}qU_asgnsq}qU name_subpathqUtraverse_subpathqssbu. S((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ucopy2_of_generateTablesq Utitleq UUglobalsq }qUrawqT
qU_varsq}qu.O((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ucopy_of_init_accessq Utitleq UUglobalsq }qUrawqT  qU_varsq}qu. ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ucopy_of_selectFieldsq Utitleq UUglobalsq }qUrawqT`


qU_varsq}qu. ]((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ucopy_of_selection1q Utitleq UUglobalsq }qUrawqTL

The following wizard will help you in the creation of an automatic database forms. Those forms are saved in dtml methods which are easy to modify and improve.

Database:

Table:

Presentation Layout

No, of columns?

Column flow:

Label location:

I18N:

qU_varsq}qu.&((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U_write_q U_writeq U _getattr_q U_getattrq U_print_qU_printqUstringqUProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqU sel_tablesqUpageqUxUcolsqUlabelqUselectorqUfieldqUbeginqUendqUmidq tU co_argcountq!KubU_paramsq"UUidq#Ucopy_of_rename_fieldsq$U__ac_local_roles__q%}q&Uadminq']q(UOwnerq)asU _bind_namesq*(cShared.DC.Scripts.Bindings NameAssignments q+oq,}q-U_asgnsq.}q/(Uname_containerq0U containerq1U name_subpathq2Utraverse_subpathq3U name_m_selfq4Uscriptq5U name_contextq6Ucontextq7usbU func_defaultsq8NU_codeq9T- csdZdS(Ncs.t}t}t}dk}ddkl}d|t d} || d}  |t d}  ||| ddd} || d||| dd< || d||| dd<|| d ||| dd <|| d ||| dd <||| dIJd||| d IJd||| d IJdd }d|d|d}d|d}d|d}d|d}dd}dx|| ddr}d|d}d d|d}d!d|d|d}d"d}d#d}d$d}d%||||||||}dqW'|d}d)|d}d+|d }d,|d!}d-|d"}d.|d#}d/|d$}d0||IJd3|SddS(%N(s html_quotesREQUESTsRESPONSEsSESSIONsgets sel_tabless selectedListsflowscolssi18ns HTTP_REFERERsformss

s

s< s:s.is
s
s! ss$s%
Label nameLabel Text
s
is

s8 sH sEs

s (s_write_s_writes _getattr_s_getattrs_print_s_printsstringsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessions sel_tablesspagesxscolsslabelsselectorsfieldsbeginsendsmid(s_write_s_writes _getattr_s_getattrs_print_s_printsstringsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessions sel_tablesspagesxscolsslabelsselectorsfieldsbeginsendsmid((sScript (Python)s rename_fieldssH!%%%%     -(s rename_fields(s rename_fields((sScript (Python)ssq:U_bodyq;T# Example code: # Import a standard function, and get the HTML request and response objects. import string; from Products.PythonScripts.standard import html_quote; request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST sel_tables = session.SESSION.get('sel_tables') session.SESSION['selectedList'] = request.selectedList session.SESSION['flow'] = request.flow session.SESSION['cols'] = request.cols session.SESSION['i18n'] = request.i18n print session.SESSION; print request.HTTP_REFERER; print request.form; page=""; #page = " \n \n \n \n \n \n "; page = page + "

" + sel_tables + "

\n"; page = page + "
\n "; page = page + ""; page = page + ""; x=0; for cols in request.selectedList : label = "
\n " + cols + " \n
\n"; selector = " \n"; field = ""; begin = ""; mid = "
Label nameLabel Text
\n "; end = "
\n "; page = page + begin + selector + mid + label + mid + field + end; x = x + 1; page = page + "

"; page = page + " \n "; page = page + " \n "; page = page + ""; page = page + "

"; page = page + " \n"; print page; #print page; return printed; q)Uerrorsq?)U Python_magicq@U* qAu.P((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ucopy_of_admin_accessq Utitleq UUglobalsq }qUrawqT 
Form/Report Generator: Administrator Access Permission

This program requires the access to MySQL using administrator access rights.If you are not the administrator of the MySQL database server please contact your database administration who must fill the present form. After this, you will be able to use only the databases to which you have access rights.

After achieving the proper rights, the program will read the mysql internal database (named mysql) and will extract the name of the existing databases.

Id:
Title:
Admin Username:
Admin Password:

qU_varsq}qu.t((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ustandard_html_headerq Utitleq UUglobalsq }qUrawqU qU_varsq}qu.w((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ureportq Utitleq UUglobalsq }qUrawqT

Database: advisor

Table: document

doc_id
author_id
doc_name
doc_descript
area_id
field_id
qU_varsq}qu. ((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U _getattr_q U_getattrq U_print_q U_printq UProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqUpageqUreferqtU co_argcountqKubU_paramsqUUidqU reporter3qU__ac_local_roles__q}qUadminq]qUOwnerqasU _bind_namesq (cShared.DC.Scripts.Bindings NameAssignments q!oq"}q#U_asgnsq$}q%(Uname_containerq&U containerq'U name_subpathq(Utraverse_subpathq)U name_contextq*Ucontextq+U name_m_selfq,Uscriptq-usbU func_defaultsq.NU_codeq/TjcsdZdS(Nc slt}t}dkl}|td}||d}|t d}  d}  | || d}  | d}  | || d} | d} | || d } | d } | || d } | d } | || d } | d} | || d} | d} | d} | d| } || IJ|SdS(N(s html_quotesREQUESTsRESPONSEsw

Database: advisor

Table: document

doc_idsdoc_ids6
author_ids author_ids5
doc_namesdoc_names9
doc_descripts doc_descripts4
area_idsarea_ids5
field_idsfield_ids
ssH Print this form ( s _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionspagesrefer( s _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionspagesrefer((sScript (Python)s reporter3s*         (s reporter3(s reporter3((sScript (Python)ssq0U_bodyq1T# Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST page = "

Database: advisor

Table: document

doc_id" page = page + session.doc_id page = page + "
author_id" page = page + session.author_id page = page + "
doc_name" page = page + session.doc_name page = page + "
doc_descript" page = page + session.doc_descript page = page + "
area_id" page = page + session.area_id page = page + "
field_id" page = page + session.field_id page = page + "
" refer = page + "" page = page + " Print this form " % refer #container.standard_html_header print page #container.standard_html_footer return printed q2U Script_magicq3KUwarningsq4)Uerrorsq5)U Python_magicq6U* q7u. ((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U _getattr_q U_getattrq U_print_q U_printq UProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqUpageqUreferqtU co_argcountqKubU_paramsqUUidqU reporter2qU__ac_local_roles__q}qUadminq]qUOwnerqasU _bind_namesq (cShared.DC.Scripts.Bindings NameAssignments q!oq"}q#U_asgnsq$}q%(Uname_containerq&U containerq'U name_subpathq(Utraverse_subpathq)U name_m_selfq*Uscriptq+U name_contextq,Ucontextq-usbU func_defaultsq.NU_codeq/TUcsdZdS(Nc slt}t}dkl}|td}||d}|t d}  d}  | || d}  | d}  | || d} | d} | || d } | d } | || d } | d } | || d } | d} | || d} | d} | d} | d| } || IJ|SdS(N(s html_quotesREQUESTsRESPONSEsl

Database: advisor

Table: document

doc_idsdoc_ids4
author_ids author_ids3
doc_namesdoc_names7
doc_descripts doc_descripts2
area_idsarea_ids3
field_idsfield_ids
ssH Print this form ( s _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionspagesrefer( s _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionspagesrefer((sScript (Python)s reporter2s*         (s reporter2(s reporter2((sScript (Python)ssq0U_bodyq1Tv# Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST page = "

Database: advisor

Table: document

doc_id" page = page + session.doc_id page = page + "
author_id" page = page + session.author_id page = page + "
doc_name" page = page + session.doc_name page = page + "
doc_descript" page = page + session.doc_descript page = page + "
area_id" page = page + session.area_id page = page + "
field_id" page = page + session.field_id page = page + "
" refer = page + "" page = page + " Print this form " % refer #container.standard_html_header print page #container.standard_html_footer return printed q2U Script_magicq3KUwarningsq4)Uerrorsq5)U Python_magicq6U* q7u.((U#Products.PythonScripts.PythonScriptqU PythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature FuncCode qoq}q(U co_varnamesq (U _getattr_q U_getattrq U_print_q U_printq UProducts.PythonScripts.standardqU html_quoteqU containerqUrequestqURESPONSEqUcontextqUsessionqUpageqtU co_argcountqKubU_paramsqUUidqUreporterqU__ac_local_roles__q}qUadminq]qUOwnerqasU _bind_namesq(cShared.DC.Scripts.Bindings NameAssignments q oq!}q"U_asgnsq#}q$(Uname_containerq%hU name_subpathq&Utraverse_subpathq'U name_m_selfq(Uscriptq)U name_contextq*husbU func_defaultsq+NU_codeq,TcsdZdS(Nc sot}t}dkl}|td}||d}|t d}  d} | || d} | d} | || d} | d} | || d } | d } !| || d } "| d } &| || d } '| d} +| || d} ,| d} 0| d8| } :| d} C|| IJF|SdS(N(s html_quotesREQUESTsRESPONSEs

Database: advisor

Table: document

doc_id sdoc_ids9
author_id s author_ids9
doc_name sdoc_names=
doc_descript s doc_descripts8
area_id sarea_ids9
field_id sfield_ids
st sY ( s _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionspage( s _getattr_s_getattrs_print_s_printsProducts.PythonScripts.standards html_quotes containersrequestsRESPONSEscontextssessionspage((sScript (Python)sreporters,          (sreporter(sreporter((sScript (Python)ssq-U_bodyq.TG# Example code: # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE session = context.REQUEST page = """

Database: advisor

Table: document

doc_id """ page = page + session.doc_id page = page + """
author_id """ page = page + session.author_id page = page + """
doc_name """ page = page + session.doc_name page = page + """
doc_descript """ page = page + session.doc_descript page = page + """
area_id """ page = page + session.area_id page = page + """
field_id """ page = page + session.field_id page = page + """
""" page = page + """ """ % page page = page + """
""" #container.standard_html_header print page #container.standard_html_footer return printed q/U Script_magicq0KUwarningsq1)Uerrorsq2)U Python_magicq3U* q4u. 5((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Uformq Utitleq UUglobalsq }qUrawqT

Database: advisor

Table: document

doc_id
author_id
doc_name
doc_descript
area_id
field_id
Record:

qU_varsq}qu.((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q Ustandard_html_footerq Utitleq UUglobalsq }qUrawqU5

qU_varsq}qu. ((UProducts.Formulator.FormqU BasicFormqtqNt.}q(UenctypeqUU group_listq]q(UDefaultqUdateq Utimeq eUmethodq UPOSTq Ufieldsq }q(Uyearq(U q(U"Products.Formulator.StandardFieldsqU IntegerFieldqttQUhourq(U q(hU IntegerFieldqttQUdayq(U q(hU IntegerFieldqttQUminuteq(U q(hU IntegerFieldqttQUmonthq(U q(hU IntegerFieldqttQuUactionqUUgroupsq }q!(h ]q"(hheh]q#h ]q$(hhheuUnameq%Uu.r((UBTrees._IOBTreeqUIOBucketqtqNt.((Jh5<(Uq(UBTrees.OOBTreeqUOOBTreeqttQJZ7<(Uq(hUOOBTreeqttQJZ7<(Uq (hUOOBTreeq ttQJ[7<(U q (hUOOBTreeq ttQJ\7<(Uq (hUOOBTreeqttQJ\7<(Uq(hUOOBTreeqttQJ\7<(Uq(hUOOBTreeqttQJ8>(Uq(hUOOBTreeqttQJd>(Uq(hUOOBTreeqttQJȃ>(Uq(hUOOBTreeqttQJ>(Uq(hUOOBTreeqttQJh>(U!q(hUOOBTreeqttQJ>(U%q(hUOOBTreeqttQJP>(U2q(hUOOBTreeq ttQJx>(U4q!(hUOOBTreeq"ttQJ>(U6q#(hUOOBTreeq$ttQJȈ>(U8q%(hUOOBTreeq&ttQJ>(U:q'(hUOOBTreeq(ttQJD>(UIq)(hUOOBTreeq*ttQJl>(UKq+(hUOOBTreeq,ttQJ>(UMq-(hUOOBTreeq.ttQJ>(UOq/(hUOOBTreeq0ttQJ>(UQq1(hUOOBTreeq2ttQJ >(USq3(hUOOBTreeq4ttQJ>(U`q5(hUOOBTreeq6ttQJ>(Uaq7(hUOOBTreeq8ttQJ>(Ubq9(hUOOBTreeq:ttQJđ>(Ucq;(hUOOBTreeq(Udq=(hUOOBTreeq>ttQJ>(Ueq?(hUOOBTreeq@ttQJ>(UfqA(hUOOBTreeqBttQJ>(UgqC(hUOOBTreeqDttQJ(>(UhqE(hUOOBTreeqFttQJ<>(UiqG(hUOOBTreeqHttQJP>(UjqI(hUOOBTreeqJttQttqK. ((U"Products.Formulator.StandardFieldsqU IntegerFieldqtqNt.}q(Umessage_valuesq}q(U not_integerqUYou did not enter an integer.qUrequired_not_foundq U%Input is required but no input given.q Uinteger_out_of_rangeq U)The integer you entered was out of range.q Uexternal_validator_failedq U(The input failed the external validator.quUidqUyearqUvaluesq}q(Ualternate_nameqUUhiddenqKU display_widthqKUstartqUUexternal_validatorqUUdisplay_maxwidthqKUrequiredqKU css_classqUUdefaultqUUtitleqUYearqU descriptionqUUendqUUextraq UuU overridesq!}q"(hUhUhUhUhUhUhUhUhUhUhUhUh UuUtalesq#}q$(hUhUhUhUhUhUhUhUhUhUhUhUh Uuu. ((U"Products.Formulator.StandardFieldsqU IntegerFieldqtqNt.}q(Umessage_valuesq}q(U not_integerqUYou did not enter an integer.qUrequired_not_foundq U%Input is required but no input given.q Uinteger_out_of_rangeq U)The integer you entered was out of range.q Uexternal_validator_failedq U(The input failed the external validator.quUidqUhourqUvaluesq}q(Ualternate_nameqUUhiddenqKU display_widthqKUstartqUUexternal_validatorqUUdisplay_maxwidthqKUrequiredqKU css_classqUUdefaultqUUtitleqUHourqU descriptionqUUendqUUextraq UuU overridesq!}q"(hUhUhUhUhUhUhUhUhUhUhUhUh UuUtalesq#}q$(hUhUhUhUhUhUhUhUhUhUhUhUh Uuu. ((U"Products.Formulator.StandardFieldsqU IntegerFieldqtqNt.}q(Umessage_valuesq}q(U not_integerqUYou did not enter an integer.qUrequired_not_foundq U%Input is required but no input given.q Uinteger_out_of_rangeq U)The integer you entered was out of range.q Uexternal_validator_failedq U(The input failed the external validator.quUidqUdayqUvaluesq}q(Ualternate_nameqUUhiddenqKU display_widthqKUstartqUUexternal_validatorqUUdisplay_maxwidthqKUrequiredqKU css_classqUUdefaultqUUtitleqUDayqU descriptionqUUendqUUextraq UuU overridesq!}q"(hUhUhUhUhUhUhUhUhUhUhUhUh UuUtalesq#}q$(hUhUhUhUhUhUhUhUhUhUhUhUh Uuu. ((U"Products.Formulator.StandardFieldsqU IntegerFieldqtqNt.}q(Umessage_valuesq}q(U not_integerqUYou did not enter an integer.qUrequired_not_foundq U%Input is required but no input given.q Uinteger_out_of_rangeq U)The integer you entered was out of range.q Uexternal_validator_failedq U(The input failed the external validator.quUidqUminuteqUvaluesq}q(Ualternate_nameqUUhiddenqKU display_widthqKUstartqUUexternal_validatorqUUdisplay_maxwidthqKUrequiredqKU css_classqUUdefaultqUUtitleqUMinuteqU descriptionqUUendqUUextraq UuU overridesq!}q"(hUhUhUhUhUhUhUhUhUhUhUhUh UuUtalesq#}q$(hUhUhUhUhUhUhUhUhUhUhUhUh Uuu. ((U"Products.Formulator.StandardFieldsqU IntegerFieldqtqNt.}q(Umessage_valuesq}q(U not_integerqUYou did not enter an integer.qUrequired_not_foundq U%Input is required but no input given.q Uinteger_out_of_rangeq U)The integer you entered was out of range.q Uexternal_validator_failedq U(The input failed the external validator.quUidqUmonthqUvaluesq}q(Ualternate_nameqUUhiddenqKU display_widthqKUstartqUUexternal_validatorqUUdisplay_maxwidthqKUrequiredqKU css_classqUUdefaultqUUtitleqUMonthqU descriptionqUUendqUUextraq UuU overridesq!}q"(hUhUhUhUhUhUhUhUhUhUhUhUh UuUtalesq#}q$(hUhUhUhUhUhUhUhUhUhUhUhUh Uuu.((UBTrees.OOBTreeqUOOBTreeqtqNt.((((U02224691A0HPBiiIb6Iq(Uq(U#Products.Transience.TransientObjectqUTransientObjectqttQttttq.'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.'((UBTrees.OOBTreeqUOOBTreeqtqNt.N. '((UBTrees.OOBTreeqUOOBTreeqtqNt.N.'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.((UBTrees.OOBTreeqUOOBTreeqtqNt.((((U16287918A0HWLcaa-Mwq(Uq(U#Products.Transience.TransientObjectqUTransientObjectqttQttttq.'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.!'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.%'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.2'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.4'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.6'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.8'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.:'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.I'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.K'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.M'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.O'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.Q'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.S'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.`'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.a((UBTrees.OOBTreeqUOOBTreeqtqNt.((((U68502142A0m58AX1j6oq(Ukq(U#Products.Transience.TransientObjectqUTransientObjectqttQttttq.b'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.c'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.d'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.e'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.f'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.g'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.h'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.i'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.j'((UBTrees.OOBTreeqUOOBTreeqtqNt.N.((U#Products.Transience.TransientObjectqUTransientObjectqtqNt.}q(UidqU10101507691560689349qU _containerq}qU sel_tablesq Uareaq sU_createdq GAָ\U_last_modifiedq GAָUtokenq U02224691A0HPBiiIb6IqU_last_accessedqGAָ\u.((U#Products.Transience.TransientObjectqUTransientObjectqtqNt.}q(UidqU10102606661811081495qU _containerq}q(Ulabelq Uleftq Ucolsq KUflowq Uvertq U selectedListq]q(Uprog_idqU prog_nameqUprog_lastversionqU prog_homepageqU prog_downloadqU prog_descriptqUprog_lastupdatedqU prog_categoryqU subcateg_idqU company_idqeUdb_listqU it4biotechqUi18nqU ISO-8859-8qU sel_tablesqU OpensourcequU_createdq GA]GU_last_modifiedq!GAN)dUtokenq"U16287918A0HWLcaa-Mwq#U_last_accessedq$GAjp9u.k((U#Products.Transience.TransientObjectqUTransientObjectqtqNt.}q(UidqU10406834170784040785qU _containerq}q(Ulabelq Ubrowserq Ucolsq KUflowq Uvertq U selectedListq]q(Uprog_idqU prog_nameqUprog_lastversionqU prog_homepageqU prog_downloadqU prog_descriptqUprog_lastupdatedqU prog_categoryqU subcateg_idqU company_idqeUdb_listqU it4biotechqUi18nqU ISO-8859-1qU sel_tablesqU OpensourcequU_createdq GAfU_last_modifiedq!GAְUtokenq"U68502142A0m58AX1j6oq#U_last_accessedq$GAfu.