|
|
| version 1.1.1.1, 2004/04/14 16:37:27 | version 1.2, 2004/04/23 16:25:09 |
|---|---|
| Line 3 import os | Line 3 import os |
| def liseScript(mainobj, idclicked="0"): | def liseScript(mainobj, idclicked="0"): |
| """ liseScript """ | """ liseScript """ |
| pictid = int(idclicked) - 1 | pictid = int(idclicked) - 1 |
| if pictid < 0: | if pictid < 0: |
| pictid = 0 | pictid = 0 |
| session = mainobj.REQUEST.SESSION | session = mainobj.REQUEST.SESSION |
| pagelist = mainobj.pagelist | |
| pagelistlen = len(pagelist) | |
| openchaplist = session.get("openchaplist", []) | openchaplist = session.get("openchaplist", []) |
| newopenchaplist = 0 | newopenchaplist = 0 |
| if len(openchaplist) < 1: | if len(openchaplist) < 1: |
| Line 23 def liseScript(mainobj, idclicked="0"): | Line 27 def liseScript(mainobj, idclicked="0"): |
| pagelist = mainobj.pagelist | pagelist = mainobj.pagelist |
| filelist = mainobj.filenames | filelist = mainobj.filenames |
| filelistlen = len(filelist) | |
| # baseurl = mainobj.baseurl | |
| filelistindex = 0; | filelistindex = 0; |
| # fetch the current picture | # fetch the current picture |
| Line 33 def liseScript(mainobj, idclicked="0"): | Line 39 def liseScript(mainobj, idclicked="0"): |
| else: | else: |
| if IsInt(pagelist[pictid].pictindex): | if IsInt(pagelist[pictid].pictindex): |
| filelistindex = int(pagelist[pictid].pictindex) | filelistindex = int(pagelist[pictid].pictindex) |
| if filelistindex < filelistlen: | |
| pictfile = filelist[filelistindex] | pictfile = filelist[filelistindex] |
| else: | else: |
| pictfile = 'this_is the_no_fucking_picture_error' | pictfile = 'this_is the_no_fucking_picture_error_from_script_1' |
| else: | |
| pictfile = 'this_is the_no_fucking_picture_error_from_script_2' | |
| else: | else: |
| if IsInt(pagelist[pictid].pictindex): | if IsInt(pagelist[pictid].pictindex): |
| filelistindex = int(pagelist[pictid].pictindex) | filelistindex = int(pagelist[pictid].pictindex) |
| if filelistindex < filelistlen: | |
| pictfile = filelist[filelistindex] | pictfile = filelist[filelistindex] |
| else: | else: |
| pictfile = 'this_is the_no_fucking_picture_error' | pictfile = 'this_is the_no_fucking_picture_error_from_script_3' |
| mainobj.currpict = pictfile | else: |
| pictfile = 'this_is the_no_fucking_picture_error_from_script_4' | |
| mainobj.currpict = '<img src="' + pictfile + '" border="0">' | |
| thelength = len(pagelist) | thelength = len(pagelist) |
| counter = 0 | counter = 0 |