Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
jMc"@sdZdZddklZddkZddkZddkZddkZddkZddk l Z l Z l Z e i izXeioe ddenddkZeioe ddenddkZWdQXydd klZWn#ej odd klZnXd d d d ddddddddddddddgZdZeadZdZdZead aeeid d d!Z d d d"Z!d d d#Z"d$Z#d%Z$d&Z%d fd'YZ&d fd(YZ'd eifd)YZ(d e(fd*YZ)de)fd+YZ*de(fd,YZ+eid-Z,eeeed.Z-eid/Z.d0Z/d1Z0d2Z1d3Z2ed4Z3d5d6Z4e5d7jo e,ndS(8sSupport module for CGI (Common Gateway Interface) scripts. This module defines a number of utilities for use by CGI scripts written in Python. s2.6i(t attrgetterN(tfilterwarningstcatch_warningstwarntignores.*mimetools has been removeds.*rfc822 has been removed(tStringIOtMiniFieldStoraget FieldStoragetFormContentDicttSvFormContentDicttInterpFormContentDictt FormContenttparsetparse_qst parse_qsltparse_multipartt parse_headertprint_exceptiont print_environt print_formtprint_directorytprint_argumentstprint_environ_usagetescapetcGsato5t o-yttdaWq<tj oq<Xntp tantat|dS(sWrite a log message, if there is a log file. Even though this function is called initlog(), you should always use log(); log is a variable that is set either to initlog (initially), to dolog (once the log file has been opened), or to nolog (when logging is disabled). The first argument is a format string; the remaining arguments (if any) are arguments to the % operator, so e.g. log("%s: %s", "a", "b") will write "a: b" to the log file, followed by a newline. If the global logfp is not None, it should be a file object to which log data is written. If the global logfp is None, the global logfile may be a string giving a filename to open, in append mode. This file should be world writable!!! If the file can't be opened, logging is silently disabled (since there is no safe place where we could send an error message). taN(tlogfiletlogfptopentIOErrortnologtlogtdolog(tallargs((s/usr/lib/python2.6/cgi.pytinitlogHs  cGsti||ddS(s=Write a log message to the log file. See initlog() for docs.s N(Rtwrite(tfmttargs((s/usr/lib/python2.6/cgi.pyR kscGsdS(s9Dummy function, assigned to log when logging is disabled.N((R!((s/usr/lib/python2.6/cgi.pyRosicCs|d jo ti}nd|jod|dR5R(R=R8R9((s/usr/lib/python2.6/cgi.pyRs c Csd}d|jo|d}nt|ptd|fnd|}d|d}h}d}xK||jo=d}d}|oti|} | id} | o*yt| }Wqtj oqXn|djo4to|tjo tdn|i|}q#d}ng} xg|i } | p |}Pn| d djo(| i }|||fjoPqn| i | q,|djoqin|djop| oe| d} | d d jo| d } n | dd jo| d } n| | dHs N(RlR-Rtset(Re((s/usr/lib/python2.6/cgi.pyRDs cs:|idjo tdntfd|iDS(s"Dictionary style has_key() method.s not indexablec3s"x|]}|ijVqWdS(N(R@(RR(RR(s/usr/lib/python2.6/cgi.pys Ns N(RlR-Rtany(ReRR((RRs/usr/lib/python2.6/cgi.pythas_keyJs cs:|idjo tdntfd|iDS(s%Dictionary style __contains__ method.s not indexablec3s"x|]}|ijVqWdS(N(R@(RR(RR(s/usr/lib/python2.6/cgi.pys Ts N(RlR-RR(ReRR((RRs/usr/lib/python2.6/cgi.pyt __contains__Ps cCst|iS(s Dictionary style len(x) support.(RXR(Re((s/usr/lib/python2.6/cgi.pyt__len__VscCs t|iS(N(tboolRl(Re((s/usr/lib/python2.6/cgi.pyt __nonzero__ZscCs|ii|i}|io|d|i7}ng|_}x?ti||i|iD]"\}}|i t ||q]W|i dS(s+Internal: read data in query string format.R,N( R6R3RwRtRlR5RR8R9RGRt skip_lines(ReR=RlRRRd((s/usr/lib/python2.6/cgi.pyRy]s   c Cs |i}t|ptd|fng|_|ioRxEti|i|i|iD]%\}}|ii t ||q\Wd}n|i p|i }||ih||||} xO| ipDti|i} ||i| ||||} |ii | qW|idS(s/Internal: read a part that is itself multipart.s&Invalid boundary in multipart form: %rN(RvRAR2RlRtR5RR8R9RGRR-tFieldStorageClasst __class__R6Rxtrfc822RCR( ReR7R8R9tibRRRdRtklasstpartRO((s/usr/lib/python2.6/cgi.pyRzjs(       cCsF|idjo|i|in |i|iiddS(sInternal: read an atomic part.iN(Rwt read_binaryRt read_linesRnR(Re((s/usr/lib/python2.6/cgi.pyR{s   iicCs|id|_|i}|djolxi|djoW|iit||i}|pd|_Pn|ii||t |}q+WndS(sInternal: read binary data.tbiiN( t make_fileRnRwR6R3tmintbufsizeRxR#RX(RettodoRN((s/usr/lib/python2.6/cgi.pyRs    cCs9t|_|_|io|in |idS(s0Internal: read lines until EOF or outerboundary.N(RRnt_FieldStorage__fileRutread_lines_to_outerboundarytread_lines_to_eof(Re((s/usr/lib/python2.6/cgi.pyRs cCs|idj o\|iit|djo8|id|_|ii|iid|_qln|ii|dS(NiR(RR-ttellRXRRnR#R(ReRQ((s/usr/lib/python2.6/cgi.pyt__writes  cCs>x7|iid}|pd|_Pn|i|qdS(sInternal: read lines until EOF.iiiNi(R6RERxt_FieldStorage__write(ReRQ((s/usr/lib/python2.6/cgi.pyRs  cCs"d|i}|d}d}t}x|iid }|pd|_Pn|d djoD|o=|i}||joPn||jod|_Pqn|}|ddjod}|d }t}n8|dd jod }|d }t}n d}t}|i||q&d S( s)Internal: read lines until outerboundary.s--Riiiiis s Ni(RutTrueR6RERxRFtFalseR(ReR^tlasttdelimtlast_line_lfendRQt strippedlinetodelim((s/usr/lib/python2.6/cgi.pyRs8            cCs|i p |iodSd|i}|d}t}x|iid}|pd|_Pn|d djoD|o=|i}||joPn||jod|_Pqn|id}q:dS( s5Internal: skip lines until outer boundary if defined.Ns--iiiis i(RuRxRR6RERFtendswith(ReR^RRRQR((s/usr/lib/python2.6/cgi.pyRs$        cCsddk}|idS(sOverridable: return a readable & writable file. The file will be used as follows: - data is written to it - seek(0) - data is read from it The 'binary' argument is unused -- the file is always opened in binary mode. This version opens a temporary file for reading and writing, and immediately deletes (unlinks) it. The trick (on Unix!) is that the file can still be used, but it can't be opened by another process, and it will automatically be deleted when it is closed or when the current process terminates. If you want a more permanent file, you derive a class which overrides this method. If you want a visible temporary file that is nevertheless automatically deleted when the script terminates, try defining a __del__ method in a derived class which unlinks the temporary files you have created. iNsw+b(ttempfilet TemporaryFile(RetbinaryR((s/usr/lib/python2.6/cgi.pyRs Ni (RhRiRjR-tosR7RfRgRRRRRRRRRRRRyRRzR{RRRRRRRR(((s/usr/lib/python2.6/cgi.pyRas6) s              cBs#eZdZeidddZRS(sxForm content as dictionary with a list of values per field. form = FormContentDict() form[key] -> [value, value, ...] key in form -> Boolean form.keys() -> [key, key, ...] form.values() -> [[val, val, ...], [val, val, ...], ...] form.items() -> [(key, [val, val, ...]), (key, [val, val, ...]), ...] form.dict == {key: [val, val, ...], ...} icCs6td|d|d||_|_|d|_dS(NR7R8R9R+(R tdictRNt query_string(ReR7R8R9((s/usr/lib/python2.6/cgi.pyRfs (RhRiRjRR7Rf(((s/usr/lib/python2.6/cgi.pyRs cBs2eZdZdZdZdZdZRS(sForm content as dictionary expecting a single value per field. If you only expect a single value for each field, then form[key] will return that single value. It will raise an IndexError if that expectation is not true. If you expect a field to have possible multiple values, than you can use form.getlist(key) to get all of the values. values() and items() are a compromise: they return single strings where there is a single value, and lists of strings otherwise. cCs6t|i|djo tdn|i|dS(Nisexpecting a single valuei(RXRt IndexError(ReRR((s/usr/lib/python2.6/cgi.pyR's cCs |i|S(N(R(ReRR((s/usr/lib/python2.6/cgi.pyR+scCsYg}xL|iiD];}t|djo|i|dq|i|qW|S(Nii(RtvaluesRXRG(RetresultRd((s/usr/lib/python2.6/cgi.pyR-scCskg}x^|iiD]M\}}t|djo|i||dfq|i||fqW|S(Nii(RtitemsRXRG(ReRRRRd((s/usr/lib/python2.6/cgi.pyR4s (RhRiRjRRRR(((s/usr/lib/python2.6/cgi.pyR s     cBs)eZdZdZdZdZRS(s7This class is present for backwards compatibility only.cCsyti||}|ddjoLyt|SWqotj o+yt|SWqktj oqkXqoXn|iS(Nis 0123456789+-.(R RR0R2tfloatRF(ReRRtv((s/usr/lib/python2.6/cgi.pyR?scCs`g}xS|iD]E}y|i||Wqtj o|i|i|qXqW|S(N(RRGRR(ReRRR((s/usr/lib/python2.6/cgi.pyRGs cCslg}x_|iD]Q}y|i|||fWqtj o!|i||i|fqXqW|S(N(RRGRR(ReRRR((s/usr/lib/python2.6/cgi.pyROs #(RhRiRjRRR(((s/usr/lib/python2.6/cgi.pyR =s  cBsDeZdZdZdZdZdZdZdZRS(s7This class is present for backwards compatibility only.cCs$||ijo |i|SdSdS(N(RR-(ReRR((s/usr/lib/python2.6/cgi.pyR[s cCsJ||ijo2t|i||jo|i||SdSndSdS(N(RRXR-(ReRRtlocation((s/usr/lib/python2.6/cgi.pyt indexed_value^s cCs(||ijo|i|dSdSdS(Ni(RR-(ReRR((s/usr/lib/python2.6/cgi.pyRddscCst|i|S(N(RXR(ReRR((s/usr/lib/python2.6/cgi.pyRwgscCs.||ijo|i|diSdSdS(Ni(RRFR-(ReRR((s/usr/lib/python2.6/cgi.pytstrippediscCs|iS(N(R(Re((s/usr/lib/python2.6/cgi.pytparsls( RhRiRjRRRdRwRR(((s/usr/lib/python2.6/cgi.pyR Ys     cCsdGHHtit_yWt}ttt|t|td}|d}dGH|Wnt nXdGHda y/t}ttt|t|Wnt nXdS(sRobust test CGI script, usable as main program. Write minimal HTTP headers and dump all information provided to the script in HTML form. sContent-type: text/htmlcRs ddUdS(Ns,testing print_exception() -- italics?((((s/usr/lib/python2.6/cgi.pyR[scSs |dS(N((R[((s/usr/lib/python2.6/cgi.pytgss9

What follows is a test, not an actual exception:

s*

Second try with a small maxlen...

i2N( R.tstdouttstderrRRRRRRRR1(R7tformR[R((s/usr/lib/python2.6/cgi.pyttestss4          cCs|djoti\}}}nddk}HdGH|i|||i||}dtdi|d t|dfGH~dS(Nis+

Traceback (most recent call last):

s
%s%s
R(R-R.texc_infot tracebackt format_tbtformat_exception_onlyRRH(RmRdttbtlimitRRl((s/usr/lib/python2.6/cgi.pyRs  cCs]|i}|iHdGHdGHx/|D]'}dGt|GdGt||GHq(WdGHHdS(s#Dump the shell environment as HTML.s

Shell Environment:

s
s
s
s
N(RtsortR(R7RRR((s/usr/lib/python2.6/cgi.pyRs  %cCs|i}|iHdGH|p dGHndGHx^|D]V}dt|dG||}dttt|dGHdtt|GHq8Wd GHHd S( s$Dump the contents of a form as HTML.s

Form Contents:

s

No form fields.s

s
t:sss
s
N(RRRtreprRm(RRRRRd((s/usr/lib/python2.6/cgi.pyRs    cCsVHdGHyti}Wn-tij o}dGtt|GHn Xt|GHHdS(s#Dump the current directory as HTML.s#

Current Working Directory:

s os.error:N(RtgetcwdterrorRtstr(tpwdtmsg((s/usr/lib/python2.6/cgi.pyRs cCsHdGHHtiGHHdS(Ns

Command Line Arguments:

(R.R4(((s/usr/lib/python2.6/cgi.pyRs cCs dGHdS(s9Dump a list of environment variables used by CGI as HTML.s

These environment variables could have been set:

  • AUTH_TYPE
  • CONTENT_LENGTH
  • CONTENT_TYPE
  • DATE_GMT
  • DATE_LOCAL
  • DOCUMENT_NAME
  • DOCUMENT_ROOT
  • DOCUMENT_URI
  • GATEWAY_INTERFACE
  • LAST_MODIFIED
  • PATH
  • PATH_INFO
  • PATH_TRANSLATED
  • QUERY_STRING
  • REMOTE_ADDR
  • REMOTE_HOST
  • REMOTE_IDENT
  • REMOTE_USER
  • REQUEST_METHOD
  • SCRIPT_NAME
  • SERVER_NAME
  • SERVER_PORT
  • SERVER_PROTOCOL
  • SERVER_ROOT
  • SERVER_SOFTWARE
In addition, HTTP headers sent by the server may be passed in the environment as well. Here are some common variable names:
  • HTTP_ACCEPT
  • HTTP_CONNECTION
  • HTTP_HOST
  • HTTP_PRAGMA
  • HTTP_REFERER
  • HTTP_USER_AGENT
N((((s/usr/lib/python2.6/cgi.pyRs)cCsW|idd}|idd}|idd}|o|idd}n|S( sReplace special characters "&", "<" and ">" to HTML-safe sequences. If the optional flag quote is true, the quotation mark character (") is also translated.R,s&ts>RUs"(R`(RYtquote((s/usr/lib/python2.6/cgi.pyRs s^[ -~]{0,200}[!-~]$cCsddk}|i||S(Ni(tretmatch(RYt _vb_patternR((s/usr/lib/python2.6/cgi.pyRAs t__main__(6Rjt __version__toperatorRR.RturllibtUserDictR5twarningsRRRt__exit__t __enter__t py3kwarningtDeprecationWarningRBRt cStringIORt ImportErrort__all__RR-RR"R RRR1R7R R RRR\RRRRR R R RRRRRRRRRARh(((s/usr/lib/python2.6/cgi.pytsr                 #  8 b "'   /