/* interface pour report de bugs / suggestions */ /* par iri - http://www.irizone.net - juin 2004 */ typeof folder = S;; typeof view = ObjText;; defcom Cretour = retour;; defcom Ccomments = comments S;; defcom Cstart = start;; fun _endAdmin(win, u)= _DStext view; _DSwindow win;; fun _resizeAdmin(win, u, w, h)= _SIZEtext view w h 0 0; 0;; fun cbAdmin(from, user, action, param, others, tag) = let _CRwindow _channel nil 0 0 400 400 WN_MENU|WN_SIZEBOX "view debug" -> winAdmin in ( set view = _CRtext _channel winAdmin 0 0 400 400 ET_HSCROLL|ET_VSCROLL|ET_DOWN _getpack _checkpack strcat folder "/_debug.txt"; _CBwinDestroy winAdmin @_endAdmin 0; _CBwinSize winAdmin @_resizeAdmin 0 ); 0;; fun cbStart(from, user, action, param, others, tag) = if (_DMSclientAlive UtoC user) then (_DMScreateClientDMI this UtoC user nil; _DMSsend this UtoC user Cstart []; 0) else (_DMSsend this UtoC user Cstart []; 0);; fun testFileExist(file, i)= let strcat strcat substr file 0 (strlen file)-5 itoa i ".jpg" -> file2 in if (_checkpack file2) == nil then file2 else testFileExist file i+1;; fun endUpload(cli, file, content)= let testFileExist strcatn folder::"/imgs/"::file::"0"::nil 0 -> path in _createpack content _getmodifypack path;; fun IniDMI(file)= let strextr _getpack _checkpack file -> l in set folder = getInfo l "folder"; if (_checkpack strcat folder "/_debug.txt") == nil then let localtime time -> [_ mn h d m y _ _] in let strcatn (itoa y)::":"::(itoa m)::":"::(itoa d)::":"::(itoa h)::":"::(itoa mn)::nil -> date in let strcat strcat "created " date "\n" -> s in _createpack s _getmodifypack strcat folder "/_debug.txt" else 0; _DMScbUpload this @endUpload; _DMSdefineActions this ["start" @cbStart]:: ["adminS" @cbAdmin]:: nil; 0;; fun __send(param, comments)= if param != nil then let lineextr param -> [pseudo[mail[os[voyager[memory[dhdms[display[site[file _]]]]]]]]] in let localtime time -> [_ mn h d m y _ _] in let linebuild (strcat "[date] = " strcatn (itoa y)::":"::(itoa m)::":"::(itoa d)::":"::(itoa h)::":"::(itoa mn)::nil):: (strcat "[pseudo] = " pseudo):: (strcat "[email] = " mail):: (strcat "[os] = " os):: (strcat "[voyager]= " voyager):: (strcat "[memory] = " memory):: (strcat "[dhdms] = " dhdms):: (strcat "[display]= " display):: (strcat "[site] = " site):: (strcat "[comment]= " comments):: (strcat "[file] = " file):: "\n_________________\n"::nil -> s in (_ADDtext view s; _appendpack s _getmodifypack strcat folder "/_debug.txt") else _DMSsend this DMSsender Cretour []; 0;; fun searchComments2(list, s)= if list == nil then s else let list -> [e n] in let strfind "[file]" e 0 -> r in if r == nil then (set s = linebuild s::e::nil; searchComments2 n s) else s;; fun searchComments(list, s)= if list == nil then s else let list -> [elt suite] in let strfind "[comment]=" elt 0 -> r in if r != nil then (set s = linebuild s::(substr elt 10 strlen elt)::(searchComments2 suite nil)::"________"::nil; searchComments suite s) else searchComments suite s;; fun __view()= let lineextr _getpack _checkpack strcat folder "/_debug.txt" -> ll in let searchComments ll nil -> lComment in _DMSsend this DMSsender Ccomments [lComment];;