function assign_textfile(FileName:string):integer;
procedure reset_textfile(FileHandle:word);
function readln_textfile(FileHandle:word):string;
procedure closefile_textfile(FileHandle:word);
procedure writelntotextfile(FileHandle:word;s:string);
procedure writetotextfile(FileHandle:word;s:string);
procedure rewrite_textfile(FileHandle:word);
procedure append_textfile(FileHandle:word);
procedure flush_textfile(FileHandle:word);
function is_eof(FileHandle:word):boolean;
procedure Msg(Data: string);
function IntToStr(Value: Integer): string;
function IntToHex(Value: Integer; Digits: Integer): string;
function StrToInt(const S: string): Integer;
function FloatToStr(Value: Extended): string;
function StrToFloat(const S: string): Extended;
procedure Showmessage(Data:string);
procedure write_html(Data:pchar;ue:word);
function FileExists(const FileName: string): Boolean;
function FileOpen(const FileName: string; Mode: LongWord): Integer;
function FileCreate(const FileName: string): Integer
Function FileIsOpen(Const fname: String): Boolean;
function FileCreate(const FileName: string; Rights: Integer): Integer;
function FileSeek(Handle, Offset, Origin: Integer): Integer;
procedure FileClose(Handle: Integer);
function FileAge(const FileName: string): Integer;
function FileExists(const FileName: string): Boolean;
function DirectoryExists(const Directory: string): Boolean;
function ForceDirectories(Dir: string): Boolean;
function DeleteFile(const FileName: string): Boolean;
function RenameFile(const OldName, NewName: string): Boolean;
function ExtractFilePath(const FileName: string): string;
function ExtractFileDir(const FileName: string): string;
function ExtractFileDrive(const FileName: string): string;
function ExtractFileName(const FileName: string): string;
function ExtractFileExt(const FileName: string): string;
function ExpandFileName(const FileName: string): string;
function GetCurrentDir: string;
function gethour:word;
function getmin:word;
function getsec:word;
function getmsec:word;
function gettime:string;
function getflattime:string;
function getyear:word;
function getmonth:word;
function getday:word;
function getdate:string;
function getflatdate:string;
function resolveIPToName(IPAddr: string): string;
procedure randomize;
function random(x:integer):integer;
procedure filemove(source,destination:string);
procedure processuploadfile;
function decodehash(hash,seed,userid,userpass:string):boolean;
function encodehash(userid,userpass,passwordseed:string):string;








function FindWindow(C1, C2: PChar): Longint; external 'FindWindowA@user32.dll stdcall'; 
function GetTickCount: Longint; external 'GetTickCount@kernel32.dll stdcall';
function GetVersion: Longint; external 'GetVersion@kernel32.dll stdcall';



STRING HANDLING ROUTINES

function stringreplace(S, OldPattern, NewPattern: string):string;
function pos(start:longword; c:char; s:string):longword;
function invertpos(backstart:longword; c:char; s:string):longword;
function StrLen(const Str: PChar): Cardinal;
function AnsiSameText(const S1: string; const S2: string): Boolean;
function AnsiPos(const Substr, S: string): Integer;
function AnsiUpperCase(const S: string): string;
function AnsiLowerCase(const S: string): string;
function MidStr(const AText: string; const AStart, ACount: Integer): string;



procedure setuserip(s:string);
procedure setusersonline(g:cardinal); 
procedure settrafic(gb,mb,kb,b:cardinal);
procedure iPiScriptInitialization;
procedure addcookie(name,value:string);
function ndxaddcookies:byte;
function getaddcookiesname(b:byte):string;
function getaddcookiesvalue(b:byte):string;
procedure write(data:string); 
procedure writeln(data:string);  
procedure link_text(url,desc:string);
function flink_text(url,desc:string):string;
function page_reloaded:cardinal; 
function readcookie(cook:string):string;
function iscookie(name:string):boolean;
function readparam(name:string):string;
function isparam(name:string):boolean;
procedure opentable(tablepercent,border:byte);
procedure closetable;
procedure newrow;
procedure closerow;
procedure newfield;
procedure closefield;
procedure redirect(url:string);



SQL routines

function sql_getnewhandle(dbn:string):longword;
procedure sql_execute(handle:longword;s:string);
procedure sql_commit(handle:longword);
procedure sql_rollback (handle:longword);
procedure sql_begintransaction(handle:longword);
function sql_TableExists(handle:longword; TableName: string): boolean;
procedure sql_gettable(handle:longword; sql:string);
procedure sql_droptable(handle:longword; s:string);
function sql_getrowcount(handle:longword):longword;
function sql_getcount(handle:longword):longword;
procedure sql_destroy(handle:longword);
function sql_getfieldindex(handle:longword; FieldName:string):longword;
function sql_FieldAsString(handle:longword; FieldName:string):string;
function sql_FieldAsInteger(handle:longword; FieldName:string):Integer;
function sql_FieldAsBoolean(handle:longword; FieldName:string):boolean;
function sql_Next(handle:longword):boolean;
function sql_Previous(handle:longword):boolean;
function sql_Count(handle:longword):longword;
function sql_ColCount(handle:longword):longword;
procedure sql_MoveFirst(handle:longword);
procedure sql_MoveLast(handle:longword);
function sql_freehandles:longword;

MAIL engines ROUTINES

procedure mail_host(host:string);
procedure mail_port(port:word);'
procedure mail_userid(userid:string);
procedure mail_password(pwd:string);
procedure mail_subject(subj:string);
procedure mail_body(body:string);
procedure mail_recipients(recp:string);
procedure mail_sender(sender:String);
procedure mail_sendername(sname:string);
procedure mail_connect;
procedure mail_disconnect;
procedure mail_lock;
procedure mail_unlock;
function mail_islocked:boolean;
procedure mail_send;

function console_new(joker:string):word;
procedure console_feed(consoleid:word;content:string);
procedure console_reset;
procedure console_close(maskname:string);

