code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
const ENCODING *NS(XmlGetUtf8InternalEncoding)(void) { return &ns(internal_utf8_encoding).enc; } const ENCODING *NS(XmlGetUtf16InternalEncoding)(void) { #if XML_BYTE_ORDER == 12 return &ns(internal_little2_encoding).enc; #elif XML_BYTE_ORDER == 21 return &ns(internal_big2_encoding).enc; #else const short n = 1; return *(const char *)&n ? &ns(internal_little2_encoding).enc : &ns(internal_big2_encoding).enc; #endif } static const ENCODING *NS(encodings)[] = { &ns(latin1_encoding).enc, &ns(ascii_encoding).enc, &ns(utf8_encoding).enc, &ns(big2_encoding).enc, &ns(big2_encoding).enc, &ns(little2_encoding).enc, &ns(utf8_encoding).enc /* NO_ENC */ }; static int NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_PROLOG_STATE, ptr, end, nextTokPtr); } static int NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_CONTENT_STATE, ptr, end, nextTokPtr); } int NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr, const char *name) { int i = getEncodingIndex(name); if (i == UNKNOWN_ENC) return 0; SET_INIT_ENC_INDEX(p, i); p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog); p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent); p->initEnc.updatePosition = initUpdatePosition; p->encPtr = encPtr; *encPtr = &(p->initEnc); return 1; } static const ENCODING *NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) { #define ENCODING_MAX 128 char buf[ENCODING_MAX]; char *p = buf; int i; XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); if (ptr != end) return 0; *p = 0; if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2) return enc; i = getEncodingIndex(buf); if (i == UNKNOWN_ENC) return 0; return NS(encodings)[i]; } int NS(XmlParseXmlDecl)(int isGeneralTextEntity, const ENCODING *enc, const char *ptr, const char *end, const char **badPtr, const char **versionPtr, const char **versionEndPtr, const char **encodingName, const ENCODING **encoding, int *standalone) { return doParseXmlDecl(NS(findEncoding), isGeneralTextEntity, enc, ptr, end, badPtr, versionPtr, versionEndPtr, encodingName, encoding, standalone); }
001-log4cxx
trunk/src/apr-util/xml/expat/lib/xmltok_ns.c
C
asf20
2,468
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, /* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML, /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, /* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, /* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, /* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, /* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, /* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
001-log4cxx
trunk/src/apr-util/xml/expat/lib/asciitab.h
C
asf20
1,757
/*================================================================ ** Copyright 2000, Clark Cooper ** All rights reserved. ** ** This is free software. You are permitted to copy, distribute, or modify ** it under the terms of the MIT/X license (contained in the COPYING file ** with this distribution.) ** ** */ #ifndef WINCONFIG_H #define WINCONFIG_H #define WIN32_LEAN_AND_MEAN #include <windows.h> #undef WIN32_LEAN_AND_MEAN #include <memory.h> #include <string.h> #define XML_NS 1 #define XML_DTD 1 #define XML_BYTE_ORDER 12 #define XML_CONTEXT_BYTES 1024 #endif /* ndef WINCONFIG_H */
001-log4cxx
trunk/src/apr-util/xml/expat/lib/winconfig.h
C
asf20
595
/*================================================================ ** Copyright 2000, Clark Cooper ** All rights reserved. ** ** This is free software. You are permitted to copy, distribute, or modify ** it under the terms of the MIT/X license (contained in the COPYING file ** with this distribution.) ** ** */ #ifndef WINCONFIG_H #define WINCONFIG_H #define WIN32_LEAN_AND_MEAN #include <windows.h> #undef WIN32_LEAN_AND_MEAN #include <memory.h> #include <string.h> #define XML_NS 1 #define XML_DTD 1 #define XML_BYTE_ORDER 12 #define XML_CONTEXT_BYTES 1024 #endif /* ndef WINCONFIG_H */
001-log4cxx
trunk/src/apr-util/xml/expat/lib/config.h
C
asf20
595
################################################################ # Process this file with top-level configure script to produce Makefile # # Copyright 2000 Clark Cooper # # This file is part of EXPAT. # # EXPAT is free software; you can redistribute it and/or modify it # under the terms of the License (based on the MIT/X license) contained # in the file COPYING that comes with this distribution. # # EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT. # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ blddir = @blddir@/lib bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include subdir = lib top_builddir = .. INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_DATA = @INSTALL_DATA@ host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ LIBRARY = libexpat.la SOURCES = xmlparse.c xmltok.c xmlrole.c OBJECTS = $(SOURCES:.c=.o) LTOBJECTS = $(SOURCES:.c=.lo) TEMPLATES = xmltok_impl.c xmltok_ns.c APIHEADER = expat.h HEADERS = ascii.h iasciitab.h utf8tab.h xmltok.h asciitab.h latin1tab.h \ nametab.h xmldef.h xmlrole.h xmltok_impl.h mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = INCLUDES = -I$(srcdir) -I.. -I$(blddir) DEFS = @DEFS@ -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(PACKAGE)_$(VERSION)"' CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ CFLAGS = @CFLAGS@ LIBREVISION = @LIBREVISION@ LIBCURRENT = @LIBCURRENT@ LIBAGE = @LIBAGE@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(TEMPLATES) $(APIHEADER) $(HEADERS) TAR = gtar GZIP_ENV = --best all: $(LIBRARY) .SUFFIXES: .c .lo .o .PHONY: all clean distclean maintainer-clean .c.o: $(COMPILE) -c $< .c.lo: $(LTCOMPILE) -c $< Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status $(top_builddir)/config.status: $(top_builddir)/configure cd $(top_builddir) && $(MAKE) config.status $(top_builddir)/config.h: $(top_builddir)/config.h.in cd $(top_builddir) && $(MAKE) config.h clean: rm -f $(LIBRARY) *.o *.lo *~ rm -rf .libs _libs distclean: clean rm -f Makefile expat.h maintainer-clean: distclean install: $(LIBRARY) $(APIHEADER) $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY) $(INSTALL_DATA) $(APIHEADER) $(DESTDIR)$(includedir) uninstall: $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY); rm -f $(DESTDIR)$(libdir)/$(APIHEADER) $(LIBRARY): $(LTOBJECTS) $(LINK) -rpath $(libdir) $(LDFLAGS) $(LTOBJECTS) xmlparse.o \ xmlparse.lo: xmlparse.c expat.h xmlrole.h xmltok.h $(top_builddir)/config.h xmlrole.o \ xmlrole.lo: xmlrole.c ascii.h xmlrole.h $(top_builddir)/config.h xmltok.o \ xmltok.lo: xmltok.c xmltok_impl.c xmltok_ns.c \ ascii.h asciitab.h iasciitab.h latin1tab.h nametab.h utf8tab.h \ xmltok.h xmltok_impl.h $(top_builddir)/config.h
001-log4cxx
trunk/src/apr-util/xml/expat/lib/Makefile.in
Makefile
asf20
4,172
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #ifndef XmlRole_INCLUDED #define XmlRole_INCLUDED 1 #include "xmltok.h" #ifdef __cplusplus extern "C" { #endif enum { XML_ROLE_ERROR = -1, XML_ROLE_NONE = 0, XML_ROLE_XML_DECL, XML_ROLE_INSTANCE_START, XML_ROLE_DOCTYPE_NAME, XML_ROLE_DOCTYPE_SYSTEM_ID, XML_ROLE_DOCTYPE_PUBLIC_ID, XML_ROLE_DOCTYPE_INTERNAL_SUBSET, XML_ROLE_DOCTYPE_CLOSE, XML_ROLE_GENERAL_ENTITY_NAME, XML_ROLE_PARAM_ENTITY_NAME, XML_ROLE_ENTITY_VALUE, XML_ROLE_ENTITY_SYSTEM_ID, XML_ROLE_ENTITY_PUBLIC_ID, XML_ROLE_ENTITY_COMPLETE, XML_ROLE_ENTITY_NOTATION_NAME, XML_ROLE_NOTATION_NAME, XML_ROLE_NOTATION_SYSTEM_ID, XML_ROLE_NOTATION_NO_SYSTEM_ID, XML_ROLE_NOTATION_PUBLIC_ID, XML_ROLE_ATTRIBUTE_NAME, XML_ROLE_ATTRIBUTE_TYPE_CDATA, XML_ROLE_ATTRIBUTE_TYPE_ID, XML_ROLE_ATTRIBUTE_TYPE_IDREF, XML_ROLE_ATTRIBUTE_TYPE_IDREFS, XML_ROLE_ATTRIBUTE_TYPE_ENTITY, XML_ROLE_ATTRIBUTE_TYPE_ENTITIES, XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN, XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS, XML_ROLE_ATTRIBUTE_ENUM_VALUE, XML_ROLE_ATTRIBUTE_NOTATION_VALUE, XML_ROLE_ATTLIST_ELEMENT_NAME, XML_ROLE_IMPLIED_ATTRIBUTE_VALUE, XML_ROLE_REQUIRED_ATTRIBUTE_VALUE, XML_ROLE_DEFAULT_ATTRIBUTE_VALUE, XML_ROLE_FIXED_ATTRIBUTE_VALUE, XML_ROLE_ELEMENT_NAME, XML_ROLE_CONTENT_ANY, XML_ROLE_CONTENT_EMPTY, XML_ROLE_CONTENT_PCDATA, XML_ROLE_GROUP_OPEN, XML_ROLE_GROUP_CLOSE, XML_ROLE_GROUP_CLOSE_REP, XML_ROLE_GROUP_CLOSE_OPT, XML_ROLE_GROUP_CLOSE_PLUS, XML_ROLE_GROUP_CHOICE, XML_ROLE_GROUP_SEQUENCE, XML_ROLE_CONTENT_ELEMENT, XML_ROLE_CONTENT_ELEMENT_REP, XML_ROLE_CONTENT_ELEMENT_OPT, XML_ROLE_CONTENT_ELEMENT_PLUS, #ifdef XML_DTD XML_ROLE_TEXT_DECL, XML_ROLE_IGNORE_SECT, XML_ROLE_INNER_PARAM_ENTITY_REF, #endif /* XML_DTD */ XML_ROLE_PARAM_ENTITY_REF }; typedef struct prolog_state { int (*handler)(struct prolog_state *state, int tok, const char *ptr, const char *end, const ENCODING *enc); unsigned level; #ifdef XML_DTD unsigned includeLevel; int documentEntity; #endif /* XML_DTD */ } PROLOG_STATE; void XmlPrologStateInit(PROLOG_STATE *); #ifdef XML_DTD void XmlPrologStateInitExternalEntity(PROLOG_STATE *); #endif /* XML_DTD */ #define XmlTokenRole(state, tok, ptr, end, enc) \ (((state)->handler)(state, tok, ptr, end, enc)) #ifdef __cplusplus } #endif #endif /* not XmlRole_INCLUDED */
001-log4cxx
trunk/src/apr-util/xml/expat/lib/xmlrole.h
C
asf20
2,479
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd See the file COPYING for copying permission. */ #ifndef IS_INVALID_CHAR #define IS_INVALID_CHAR(enc, ptr, n) (0) #endif #define INVALID_LEAD_CASE(n, ptr, nextTokPtr) \ case BT_LEAD ## n: \ if (end - ptr < n) \ return XML_TOK_PARTIAL_CHAR; \ if (IS_INVALID_CHAR(enc, ptr, n)) { \ *(nextTokPtr) = (ptr); \ return XML_TOK_INVALID; \ } \ ptr += n; \ break; #define INVALID_CASES(ptr, nextTokPtr) \ INVALID_LEAD_CASE(2, ptr, nextTokPtr) \ INVALID_LEAD_CASE(3, ptr, nextTokPtr) \ INVALID_LEAD_CASE(4, ptr, nextTokPtr) \ case BT_NONXML: \ case BT_MALFORM: \ case BT_TRAIL: \ *(nextTokPtr) = (ptr); \ return XML_TOK_INVALID; #define CHECK_NAME_CASE(n, enc, ptr, end, nextTokPtr) \ case BT_LEAD ## n: \ if (end - ptr < n) \ return XML_TOK_PARTIAL_CHAR; \ if (!IS_NAME_CHAR(enc, ptr, n)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ ptr += n; \ break; #define CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) \ case BT_NONASCII: \ if (!IS_NAME_CHAR_MINBPC(enc, ptr)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ case BT_NMSTRT: \ case BT_HEX: \ case BT_DIGIT: \ case BT_NAME: \ case BT_MINUS: \ ptr += MINBPC(enc); \ break; \ CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr) \ CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr) \ CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr) #define CHECK_NMSTRT_CASE(n, enc, ptr, end, nextTokPtr) \ case BT_LEAD ## n: \ if (end - ptr < n) \ return XML_TOK_PARTIAL_CHAR; \ if (!IS_NMSTRT_CHAR(enc, ptr, n)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ ptr += n; \ break; #define CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) \ case BT_NONASCII: \ if (!IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ case BT_NMSTRT: \ case BT_HEX: \ ptr += MINBPC(enc); \ break; \ CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr) \ CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr) \ CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr) #ifndef PREFIX #define PREFIX(ident) ident #endif /* ptr points to character following "<!-" */ static int PREFIX(scanComment)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr != end) { if (!CHAR_MATCHES(enc, ptr, ASCII_MINUS)) { *nextTokPtr = ptr; return XML_TOK_INVALID; } ptr += MINBPC(enc); while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { INVALID_CASES(ptr, nextTokPtr) case BT_MINUS: if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) { if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_COMMENT; } break; default: ptr += MINBPC(enc); break; } } } return XML_TOK_PARTIAL; } /* ptr points to character following "<!" */ static int PREFIX(scanDecl)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { case BT_MINUS: return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_LSQB: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_COND_SECT_OPEN; case BT_NMSTRT: case BT_HEX: ptr += MINBPC(enc); break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { case BT_PERCNT: if (ptr + MINBPC(enc) == end) return XML_TOK_PARTIAL; /* don't allow <!ENTITY% foo "whatever"> */ switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) { case BT_S: case BT_CR: case BT_LF: case BT_PERCNT: *nextTokPtr = ptr; return XML_TOK_INVALID; } /* fall through */ case BT_S: case BT_CR: case BT_LF: *nextTokPtr = ptr; return XML_TOK_DECL_OPEN; case BT_NMSTRT: case BT_HEX: ptr += MINBPC(enc); break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } static int PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr, const char *end, int *tokPtr) { int upper = 0; *tokPtr = XML_TOK_PI; if (end - ptr != MINBPC(enc)*3) return 1; switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_x: break; case ASCII_X: upper = 1; break; default: return 1; } ptr += MINBPC(enc); switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_m: break; case ASCII_M: upper = 1; break; default: return 1; } ptr += MINBPC(enc); switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_l: break; case ASCII_L: upper = 1; break; default: return 1; } if (upper) return 0; *tokPtr = XML_TOK_XML_DECL; return 1; } /* ptr points to character following "<?" */ static int PREFIX(scanPi)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { int tok; const char *target = ptr; if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_S: case BT_CR: case BT_LF: if (!PREFIX(checkPiTarget)(enc, target, ptr, &tok)) { *nextTokPtr = ptr; return XML_TOK_INVALID; } ptr += MINBPC(enc); while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { INVALID_CASES(ptr, nextTokPtr) case BT_QUEST: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_GT)) { *nextTokPtr = ptr + MINBPC(enc); return tok; } break; default: ptr += MINBPC(enc); break; } } return XML_TOK_PARTIAL; case BT_QUEST: if (!PREFIX(checkPiTarget)(enc, target, ptr, &tok)) { *nextTokPtr = ptr; return XML_TOK_INVALID; } ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_GT)) { *nextTokPtr = ptr + MINBPC(enc); return tok; } /* fall through */ default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } static int PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { static const char CDATA_LSQB[] = { ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB }; int i; /* CDATA[ */ if (end - ptr < 6 * MINBPC(enc)) return XML_TOK_PARTIAL; for (i = 0; i < 6; i++, ptr += MINBPC(enc)) { if (!CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) { *nextTokPtr = ptr; return XML_TOK_INVALID; } } *nextTokPtr = ptr; return XML_TOK_CDATA_SECT_OPEN; } static int PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_NONE; if (MINBPC(enc) > 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); if (n == 0) return XML_TOK_PARTIAL; end = ptr + n; } } switch (BYTE_TYPE(enc, ptr)) { case BT_RSQB: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB)) break; ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { ptr -= MINBPC(enc); break; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CDATA_SECT_CLOSE; case BT_CR: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); *nextTokPtr = ptr; return XML_TOK_DATA_NEWLINE; case BT_LF: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DATA_NEWLINE; INVALID_CASES(ptr, nextTokPtr) default: ptr += MINBPC(enc); break; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \ *nextTokPtr = ptr; \ return XML_TOK_DATA_CHARS; \ } \ ptr += n; \ break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_NONXML: case BT_MALFORM: case BT_TRAIL: case BT_CR: case BT_LF: case BT_RSQB: *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; default: ptr += MINBPC(enc); break; } } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; } /* ptr points to character following "</" */ static int PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_S: case BT_CR: case BT_LF: for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) { switch (BYTE_TYPE(enc, ptr)) { case BT_S: case BT_CR: case BT_LF: break; case BT_GT: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_END_TAG; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; #ifdef XML_NS case BT_COLON: /* no need to check qname syntax here, since end-tag must match exactly */ ptr += MINBPC(enc); break; #endif case BT_GT: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_END_TAG; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } /* ptr points to character following "&#X" */ static int PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { case BT_DIGIT: case BT_HEX: break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) { switch (BYTE_TYPE(enc, ptr)) { case BT_DIGIT: case BT_HEX: break; case BT_SEMI: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CHAR_REF; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } } return XML_TOK_PARTIAL; } /* ptr points to character following "&#" */ static int PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr != end) { if (CHAR_MATCHES(enc, ptr, ASCII_x)) return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); switch (BYTE_TYPE(enc, ptr)) { case BT_DIGIT: break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) { switch (BYTE_TYPE(enc, ptr)) { case BT_DIGIT: break; case BT_SEMI: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CHAR_REF; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } } return XML_TOK_PARTIAL; } /* ptr points to character following "&" */ static int PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) case BT_NUM: return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_SEMI: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_ENTITY_REF; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } /* ptr points to character following first character of attribute name */ static int PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { #ifdef XML_NS int hadColon = 0; #endif while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) #ifdef XML_NS case BT_COLON: if (hadColon) { *nextTokPtr = ptr; return XML_TOK_INVALID; } hadColon = 1; ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) default: *nextTokPtr = ptr; return XML_TOK_INVALID; } break; #endif case BT_S: case BT_CR: case BT_LF: for (;;) { int t; ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; t = BYTE_TYPE(enc, ptr); if (t == BT_EQUALS) break; switch (t) { case BT_S: case BT_LF: case BT_CR: break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } /* fall through */ case BT_EQUALS: { int open; #ifdef XML_NS hadColon = 0; #endif for (;;) { ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; open = BYTE_TYPE(enc, ptr); if (open == BT_QUOT || open == BT_APOS) break; switch (open) { case BT_S: case BT_LF: case BT_CR: break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } ptr += MINBPC(enc); /* in attribute value */ for (;;) { int t; if (ptr == end) return XML_TOK_PARTIAL; t = BYTE_TYPE(enc, ptr); if (t == open) break; switch (t) { INVALID_CASES(ptr, nextTokPtr) case BT_AMP: { int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr); if (tok <= 0) { if (tok == XML_TOK_INVALID) *nextTokPtr = ptr; return tok; } break; } case BT_LT: *nextTokPtr = ptr; return XML_TOK_INVALID; default: ptr += MINBPC(enc); break; } } ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { case BT_S: case BT_CR: case BT_LF: break; case BT_SOL: goto sol; case BT_GT: goto gt; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } /* ptr points to closing quote */ for (;;) { ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) case BT_S: case BT_CR: case BT_LF: continue; case BT_GT: gt: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_START_TAG_WITH_ATTS; case BT_SOL: sol: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_EMPTY_ELEMENT_WITH_ATTS; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } break; } break; } default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } /* ptr points to character following "<" */ static int PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { #ifdef XML_NS int hadColon; #endif if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) case BT_EXCL: if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { case BT_MINUS: return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_LSQB: return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr); } *nextTokPtr = ptr; return XML_TOK_INVALID; case BT_QUEST: return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_SOL: return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr); default: *nextTokPtr = ptr; return XML_TOK_INVALID; } #ifdef XML_NS hadColon = 0; #endif /* we have a start-tag */ while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) #ifdef XML_NS case BT_COLON: if (hadColon) { *nextTokPtr = ptr; return XML_TOK_INVALID; } hadColon = 1; ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) default: *nextTokPtr = ptr; return XML_TOK_INVALID; } break; #endif case BT_S: case BT_CR: case BT_LF: { ptr += MINBPC(enc); while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) case BT_GT: goto gt; case BT_SOL: goto sol; case BT_S: case BT_CR: case BT_LF: ptr += MINBPC(enc); continue; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr); } return XML_TOK_PARTIAL; } case BT_GT: gt: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_START_TAG_NO_ATTS; case BT_SOL: sol: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_EMPTY_ELEMENT_NO_ATTS; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } static int PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_NONE; if (MINBPC(enc) > 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); if (n == 0) return XML_TOK_PARTIAL; end = ptr + n; } } switch (BYTE_TYPE(enc, ptr)) { case BT_LT: return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_AMP: return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_CR: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_CR; if (BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); *nextTokPtr = ptr; return XML_TOK_DATA_NEWLINE; case BT_LF: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DATA_NEWLINE; case BT_RSQB: ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_RSQB; if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB)) break; ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_RSQB; if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) { ptr -= MINBPC(enc); break; } *nextTokPtr = ptr; return XML_TOK_INVALID; INVALID_CASES(ptr, nextTokPtr) default: ptr += MINBPC(enc); break; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \ *nextTokPtr = ptr; \ return XML_TOK_DATA_CHARS; \ } \ ptr += n; \ break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_RSQB: if (ptr + MINBPC(enc) != end) { if (!CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) { ptr += MINBPC(enc); break; } if (ptr + 2*MINBPC(enc) != end) { if (!CHAR_MATCHES(enc, ptr + 2*MINBPC(enc), ASCII_GT)) { ptr += MINBPC(enc); break; } *nextTokPtr = ptr + 2*MINBPC(enc); return XML_TOK_INVALID; } } /* fall through */ case BT_AMP: case BT_LT: case BT_NONXML: case BT_MALFORM: case BT_TRAIL: case BT_CR: case BT_LF: *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; default: ptr += MINBPC(enc); break; } } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; } /* ptr points to character following "%" */ static int PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) case BT_S: case BT_LF: case BT_CR: case BT_PERCNT: *nextTokPtr = ptr; return XML_TOK_PERCENT; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_SEMI: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_PARAM_ENTITY_REF; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return XML_TOK_PARTIAL; } static int PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_CR: case BT_LF: case BT_S: case BT_RPAR: case BT_GT: case BT_PERCNT: case BT_VERBAR: *nextTokPtr = ptr; return XML_TOK_POUND_NAME; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return -XML_TOK_POUND_NAME; } static int PREFIX(scanLit)(int open, const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { while (ptr != end) { int t = BYTE_TYPE(enc, ptr); switch (t) { INVALID_CASES(ptr, nextTokPtr) case BT_QUOT: case BT_APOS: ptr += MINBPC(enc); if (t != open) break; if (ptr == end) return -XML_TOK_LITERAL; *nextTokPtr = ptr; switch (BYTE_TYPE(enc, ptr)) { case BT_S: case BT_CR: case BT_LF: case BT_GT: case BT_PERCNT: case BT_LSQB: return XML_TOK_LITERAL; default: return XML_TOK_INVALID; } default: ptr += MINBPC(enc); break; } } return XML_TOK_PARTIAL; } static int PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { int tok; if (ptr == end) return XML_TOK_NONE; if (MINBPC(enc) > 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); if (n == 0) return XML_TOK_PARTIAL; end = ptr + n; } } switch (BYTE_TYPE(enc, ptr)) { case BT_QUOT: return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_APOS: return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_LT: { ptr += MINBPC(enc); if (ptr == end) return XML_TOK_PARTIAL; switch (BYTE_TYPE(enc, ptr)) { case BT_EXCL: return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_QUEST: return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_NMSTRT: case BT_HEX: case BT_NONASCII: case BT_LEAD2: case BT_LEAD3: case BT_LEAD4: *nextTokPtr = ptr - MINBPC(enc); return XML_TOK_INSTANCE_START; } *nextTokPtr = ptr; return XML_TOK_INVALID; } case BT_CR: if (ptr + MINBPC(enc) == end) return -XML_TOK_PROLOG_S; /* fall through */ case BT_S: case BT_LF: for (;;) { ptr += MINBPC(enc); if (ptr == end) break; switch (BYTE_TYPE(enc, ptr)) { case BT_S: case BT_LF: break; case BT_CR: /* don't split CR/LF pair */ if (ptr + MINBPC(enc) != end) break; /* fall through */ default: *nextTokPtr = ptr; return XML_TOK_PROLOG_S; } } *nextTokPtr = ptr; return XML_TOK_PROLOG_S; case BT_PERCNT: return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr); case BT_COMMA: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_COMMA; case BT_LSQB: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_OPEN_BRACKET; case BT_RSQB: ptr += MINBPC(enc); if (ptr == end) return -XML_TOK_CLOSE_BRACKET; if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) { if (ptr + MINBPC(enc) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) { *nextTokPtr = ptr + 2*MINBPC(enc); return XML_TOK_COND_SECT_CLOSE; } } *nextTokPtr = ptr; return XML_TOK_CLOSE_BRACKET; case BT_LPAR: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_OPEN_PAREN; case BT_RPAR: ptr += MINBPC(enc); if (ptr == end) return -XML_TOK_CLOSE_PAREN; switch (BYTE_TYPE(enc, ptr)) { case BT_AST: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CLOSE_PAREN_ASTERISK; case BT_QUEST: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CLOSE_PAREN_QUESTION; case BT_PLUS: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_CLOSE_PAREN_PLUS; case BT_CR: case BT_LF: case BT_S: case BT_GT: case BT_COMMA: case BT_VERBAR: case BT_RPAR: *nextTokPtr = ptr; return XML_TOK_CLOSE_PAREN; } *nextTokPtr = ptr; return XML_TOK_INVALID; case BT_VERBAR: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_OR; case BT_GT: *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DECL_CLOSE; case BT_NUM: return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr); #define LEAD_CASE(n) \ case BT_LEAD ## n: \ if (end - ptr < n) \ return XML_TOK_PARTIAL_CHAR; \ if (IS_NMSTRT_CHAR(enc, ptr, n)) { \ ptr += n; \ tok = XML_TOK_NAME; \ break; \ } \ if (IS_NAME_CHAR(enc, ptr, n)) { \ ptr += n; \ tok = XML_TOK_NMTOKEN; \ break; \ } \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_NMSTRT: case BT_HEX: tok = XML_TOK_NAME; ptr += MINBPC(enc); break; case BT_DIGIT: case BT_NAME: case BT_MINUS: #ifdef XML_NS case BT_COLON: #endif tok = XML_TOK_NMTOKEN; ptr += MINBPC(enc); break; case BT_NONASCII: if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { ptr += MINBPC(enc); tok = XML_TOK_NAME; break; } if (IS_NAME_CHAR_MINBPC(enc, ptr)) { ptr += MINBPC(enc); tok = XML_TOK_NMTOKEN; break; } /* fall through */ default: *nextTokPtr = ptr; return XML_TOK_INVALID; } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) case BT_GT: case BT_RPAR: case BT_COMMA: case BT_VERBAR: case BT_LSQB: case BT_PERCNT: case BT_S: case BT_CR: case BT_LF: *nextTokPtr = ptr; return tok; #ifdef XML_NS case BT_COLON: ptr += MINBPC(enc); switch (tok) { case XML_TOK_NAME: if (ptr == end) return XML_TOK_PARTIAL; tok = XML_TOK_PREFIXED_NAME; switch (BYTE_TYPE(enc, ptr)) { CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) default: tok = XML_TOK_NMTOKEN; break; } break; case XML_TOK_PREFIXED_NAME: tok = XML_TOK_NMTOKEN; break; } break; #endif case BT_PLUS: if (tok == XML_TOK_NMTOKEN) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_NAME_PLUS; case BT_AST: if (tok == XML_TOK_NMTOKEN) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_NAME_ASTERISK; case BT_QUEST: if (tok == XML_TOK_NMTOKEN) { *nextTokPtr = ptr; return XML_TOK_INVALID; } *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_NAME_QUESTION; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } return -tok; } static int PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { const char *start; if (ptr == end) return XML_TOK_NONE; start = ptr; while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: ptr += n; break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_AMP: if (ptr == start) return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_LT: /* this is for inside entity references */ *nextTokPtr = ptr; return XML_TOK_INVALID; case BT_LF: if (ptr == start) { *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DATA_NEWLINE; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_CR: if (ptr == start) { ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_CR; if (BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); *nextTokPtr = ptr; return XML_TOK_DATA_NEWLINE; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_S: if (ptr == start) { *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_ATTRIBUTE_VALUE_S; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; default: ptr += MINBPC(enc); break; } } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; } static int PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { const char *start; if (ptr == end) return XML_TOK_NONE; start = ptr; while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: ptr += n; break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_AMP: if (ptr == start) return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_PERCNT: if (ptr == start) { int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr); return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_LF: if (ptr == start) { *nextTokPtr = ptr + MINBPC(enc); return XML_TOK_DATA_NEWLINE; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; case BT_CR: if (ptr == start) { ptr += MINBPC(enc); if (ptr == end) return XML_TOK_TRAILING_CR; if (BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); *nextTokPtr = ptr; return XML_TOK_DATA_NEWLINE; } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; default: ptr += MINBPC(enc); break; } } *nextTokPtr = ptr; return XML_TOK_DATA_CHARS; } #ifdef XML_DTD static int PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { int level = 0; if (MINBPC(enc) > 1) { size_t n = end - ptr; if (n & (MINBPC(enc) - 1)) { n &= ~(MINBPC(enc) - 1); end = ptr + n; } } while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { INVALID_CASES(ptr, nextTokPtr) case BT_LT: if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_EXCL)) { if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_LSQB)) { ++level; ptr += MINBPC(enc); } } break; case BT_RSQB: if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) { if ((ptr += MINBPC(enc)) == end) return XML_TOK_PARTIAL; if (CHAR_MATCHES(enc, ptr, ASCII_GT)) { ptr += MINBPC(enc); if (level == 0) { *nextTokPtr = ptr; return XML_TOK_IGNORE_SECT; } --level; } } break; default: ptr += MINBPC(enc); break; } } return XML_TOK_PARTIAL; } #endif /* XML_DTD */ static int PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, const char **badPtr) { ptr += MINBPC(enc); end -= MINBPC(enc); for (; ptr != end; ptr += MINBPC(enc)) { switch (BYTE_TYPE(enc, ptr)) { case BT_DIGIT: case BT_HEX: case BT_MINUS: case BT_APOS: case BT_LPAR: case BT_RPAR: case BT_PLUS: case BT_COMMA: case BT_SOL: case BT_EQUALS: case BT_QUEST: case BT_CR: case BT_LF: case BT_SEMI: case BT_EXCL: case BT_AST: case BT_PERCNT: case BT_NUM: #ifdef XML_NS case BT_COLON: #endif break; case BT_S: if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) { *badPtr = ptr; return 0; } break; case BT_NAME: case BT_NMSTRT: if (!(BYTE_TO_ASCII(enc, ptr) & ~0x7f)) break; default: switch (BYTE_TO_ASCII(enc, ptr)) { case 0x24: /* $ */ case 0x40: /* @ */ break; default: *badPtr = ptr; return 0; } break; } } return 1; } /* This must only be called for a well-formed start-tag or empty element tag. Returns the number of attributes. Pointers to the first attsMax attributes are stored in atts. */ static int PREFIX(getAtts)(const ENCODING *enc, const char *ptr, int attsMax, ATTRIBUTE *atts) { enum { other, inName, inValue } state = inName; int nAtts = 0; int open = 0; /* defined when state == inValue; initialization just to shut up compilers */ for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) { switch (BYTE_TYPE(enc, ptr)) { #define START_NAME \ if (state == other) { \ if (nAtts < attsMax) { \ atts[nAtts].name = ptr; \ atts[nAtts].normalized = 1; \ } \ state = inName; \ } #define LEAD_CASE(n) \ case BT_LEAD ## n: START_NAME ptr += (n - MINBPC(enc)); break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_NONASCII: case BT_NMSTRT: case BT_HEX: START_NAME break; #undef START_NAME case BT_QUOT: if (state != inValue) { if (nAtts < attsMax) atts[nAtts].valuePtr = ptr + MINBPC(enc); state = inValue; open = BT_QUOT; } else if (open == BT_QUOT) { state = other; if (nAtts < attsMax) atts[nAtts].valueEnd = ptr; nAtts++; } break; case BT_APOS: if (state != inValue) { if (nAtts < attsMax) atts[nAtts].valuePtr = ptr + MINBPC(enc); state = inValue; open = BT_APOS; } else if (open == BT_APOS) { state = other; if (nAtts < attsMax) atts[nAtts].valueEnd = ptr; nAtts++; } break; case BT_AMP: if (nAtts < attsMax) atts[nAtts].normalized = 0; break; case BT_S: if (state == inName) state = other; else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized && (ptr == atts[nAtts].valuePtr || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open)) atts[nAtts].normalized = 0; break; case BT_CR: case BT_LF: /* This case ensures that the first attribute name is counted Apart from that we could just change state on the quote. */ if (state == inName) state = other; else if (state == inValue && nAtts < attsMax) atts[nAtts].normalized = 0; break; case BT_GT: case BT_SOL: if (state != inValue) return nAtts; break; default: break; } } /* not reached */ } static int PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) { int result = 0; /* skip &# */ ptr += 2*MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_x)) { for (ptr += MINBPC(enc); !CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) { int c = BYTE_TO_ASCII(enc, ptr); switch (c) { case ASCII_0: case ASCII_1: case ASCII_2: case ASCII_3: case ASCII_4: case ASCII_5: case ASCII_6: case ASCII_7: case ASCII_8: case ASCII_9: result <<= 4; result |= (c - ASCII_0); break; case ASCII_A: case ASCII_B: case ASCII_C: case ASCII_D: case ASCII_E: case ASCII_F: result <<= 4; result += 10 + (c - ASCII_A); break; case ASCII_a: case ASCII_b: case ASCII_c: case ASCII_d: case ASCII_e: case ASCII_f: result <<= 4; result += 10 + (c - ASCII_a); break; } if (result >= 0x110000) return -1; } } else { for (; !CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) { int c = BYTE_TO_ASCII(enc, ptr); result *= 10; result += (c - ASCII_0); if (result >= 0x110000) return -1; } } return checkCharRefNumber(result); } static int PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr, const char *end) { switch ((end - ptr)/MINBPC(enc)) { case 2: if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) { switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_l: return ASCII_LT; case ASCII_g: return ASCII_GT; } } break; case 3: if (CHAR_MATCHES(enc, ptr, ASCII_a)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_m)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_p)) return ASCII_AMP; } } break; case 4: switch (BYTE_TO_ASCII(enc, ptr)) { case ASCII_q: ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_u)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_o)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_t)) return ASCII_QUOT; } } break; case ASCII_a: ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_p)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_o)) { ptr += MINBPC(enc); if (CHAR_MATCHES(enc, ptr, ASCII_s)) return ASCII_APOS; } } break; } } return 0; } static int PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2) { for (;;) { switch (BYTE_TYPE(enc, ptr1)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ if (*ptr1++ != *ptr2++) \ return 0; LEAD_CASE(4) LEAD_CASE(3) LEAD_CASE(2) #undef LEAD_CASE /* fall through */ if (*ptr1++ != *ptr2++) return 0; break; case BT_NONASCII: case BT_NMSTRT: #ifdef XML_NS case BT_COLON: #endif case BT_HEX: case BT_DIGIT: case BT_NAME: case BT_MINUS: if (*ptr2++ != *ptr1++) return 0; if (MINBPC(enc) > 1) { if (*ptr2++ != *ptr1++) return 0; if (MINBPC(enc) > 2) { if (*ptr2++ != *ptr1++) return 0; if (MINBPC(enc) > 3) { if (*ptr2++ != *ptr1++) return 0; } } } break; default: if (MINBPC(enc) == 1 && *ptr1 == *ptr2) return 1; switch (BYTE_TYPE(enc, ptr2)) { case BT_LEAD2: case BT_LEAD3: case BT_LEAD4: case BT_NONASCII: case BT_NMSTRT: #ifdef XML_NS case BT_COLON: #endif case BT_HEX: case BT_DIGIT: case BT_NAME: case BT_MINUS: return 0; default: return 1; } } } /* not reached */ } static int PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1, const char *end1, const char *ptr2) { for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) { if (ptr1 == end1) return 0; if (!CHAR_MATCHES(enc, ptr1, *ptr2)) return 0; } return ptr1 == end1; } static int PREFIX(nameLength)(const ENCODING *enc, const char *ptr) { const char *start = ptr; for (;;) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: ptr += n; break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_NONASCII: case BT_NMSTRT: #ifdef XML_NS case BT_COLON: #endif case BT_HEX: case BT_DIGIT: case BT_NAME: case BT_MINUS: ptr += MINBPC(enc); break; default: return ptr - start; } } } static const char *PREFIX(skipS)(const ENCODING *enc, const char *ptr) { for (;;) { switch (BYTE_TYPE(enc, ptr)) { case BT_LF: case BT_CR: case BT_S: ptr += MINBPC(enc); break; default: return ptr; } } } static void PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, POSITION *pos) { while (ptr != end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ ptr += n; \ break; LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4) #undef LEAD_CASE case BT_LF: pos->columnNumber = (unsigned)-1; pos->lineNumber++; ptr += MINBPC(enc); break; case BT_CR: pos->lineNumber++; ptr += MINBPC(enc); if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF) ptr += MINBPC(enc); pos->columnNumber = (unsigned)-1; break; default: ptr += MINBPC(enc); break; } pos->columnNumber++; } } #undef DO_LEAD_CASE #undef MULTIBYTE_CASES #undef INVALID_CASES #undef CHECK_NAME_CASE #undef CHECK_NAME_CASES #undef CHECK_NMSTRT_CASE #undef CHECK_NMSTRT_CASES
001-log4cxx
trunk/src/apr-util/xml/expat/lib/xmltok_impl.c
C
asf20
40,954
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr.h" #include "apr_strings.h" #define APR_WANT_STDIO /* for sprintf() */ #define APR_WANT_STRFUNC #include "apr_want.h" #include "apr_xml.h" #include "apu_config.h" #ifdef APR_HAVE_OLD_EXPAT #include "xmlparse.h" #else #include "expat.h" #endif #define DEBUG_CR "\r\n" static const char APR_KW_xmlns[] = { 0x78, 0x6D, 0x6C, 0x6E, 0x73, '\0' }; static const char APR_KW_xmlns_lang[] = { 0x78, 0x6D, 0x6C, 0x3A, 0x6C, 0x61, 0x6E, 0x67, '\0' }; static const char APR_KW_DAV[] = { 0x44, 0x41, 0x56, 0x3A, '\0' }; /* errors related to namespace processing */ #define APR_XML_NS_ERROR_UNKNOWN_PREFIX (-1000) #define APR_XML_NS_ERROR_INVALID_DECL (-1001) /* test for a namespace prefix that begins with [Xx][Mm][Ll] */ #define APR_XML_NS_IS_RESERVED(name) \ ( (name[0] == 0x58 || name[0] == 0x78) && \ (name[1] == 0x4D || name[1] == 0x6D) && \ (name[2] == 0x4C || name[2] == 0x6C) ) /* the real (internal) definition of the parser context */ struct apr_xml_parser { apr_xml_doc *doc; /* the doc we're parsing */ apr_pool_t *p; /* the pool we allocate from */ apr_xml_elem *cur_elem; /* current element */ int error; /* an error has occurred */ #define APR_XML_ERROR_EXPAT 1 #define APR_XML_ERROR_PARSE_DONE 2 /* also: public APR_XML_NS_ERROR_* values (if any) */ XML_Parser xp; /* the actual (Expat) XML parser */ enum XML_Error xp_err; /* stored Expat error code */ }; /* struct for scoping namespace declarations */ typedef struct apr_xml_ns_scope { const char *prefix; /* prefix used for this ns */ int ns; /* index into namespace table */ int emptyURI; /* the namespace URI is the empty string */ struct apr_xml_ns_scope *next; /* next scoped namespace */ } apr_xml_ns_scope; /* return namespace table index for a given prefix */ static int find_prefix(apr_xml_parser *parser, const char *prefix) { apr_xml_elem *elem = parser->cur_elem; /* ** Walk up the tree, looking for a namespace scope that defines this ** prefix. */ for (; elem; elem = elem->parent) { apr_xml_ns_scope *ns_scope = elem->ns_scope; for (ns_scope = elem->ns_scope; ns_scope; ns_scope = ns_scope->next) { if (strcmp(prefix, ns_scope->prefix) == 0) { if (ns_scope->emptyURI) { /* ** It is possible to set the default namespace to an ** empty URI string; this resets the default namespace ** to mean "no namespace." We just found the prefix ** refers to an empty URI, so return "no namespace." */ return APR_XML_NS_NONE; } return ns_scope->ns; } } } /* * If the prefix is empty (""), this means that a prefix was not * specified in the element/attribute. The search that was performed * just above did not locate a default namespace URI (which is stored * into ns_scope with an empty prefix). This means the element/attribute * has "no namespace". We have a reserved value for this. */ if (*prefix == '\0') { return APR_XML_NS_NONE; } /* not found */ return APR_XML_NS_ERROR_UNKNOWN_PREFIX; } static void start_handler(void *userdata, const char *name, const char **attrs) { apr_xml_parser *parser = userdata; apr_xml_elem *elem; apr_xml_attr *attr; apr_xml_attr *prev; char *colon; const char *quoted; char *elem_name; /* punt once we find an error */ if (parser->error) return; elem = apr_pcalloc(parser->p, sizeof(*elem)); /* prep the element */ elem->name = elem_name = apr_pstrdup(parser->p, name); /* fill in the attributes (note: ends up in reverse order) */ while (*attrs) { attr = apr_palloc(parser->p, sizeof(*attr)); attr->name = apr_pstrdup(parser->p, *attrs++); attr->value = apr_pstrdup(parser->p, *attrs++); attr->next = elem->attr; elem->attr = attr; } /* hook the element into the tree */ if (parser->cur_elem == NULL) { /* no current element; this also becomes the root */ parser->cur_elem = parser->doc->root = elem; } else { /* this element appeared within the current elem */ elem->parent = parser->cur_elem; /* set up the child/sibling links */ if (elem->parent->last_child == NULL) { /* no first child either */ elem->parent->first_child = elem->parent->last_child = elem; } else { /* hook onto the end of the parent's children */ elem->parent->last_child->next = elem; elem->parent->last_child = elem; } /* this element is now the current element */ parser->cur_elem = elem; } /* scan the attributes for namespace declarations */ for (prev = NULL, attr = elem->attr; attr; attr = attr->next) { if (strncmp(attr->name, APR_KW_xmlns, 5) == 0) { const char *prefix = &attr->name[5]; apr_xml_ns_scope *ns_scope; /* test for xmlns:foo= form and xmlns= form */ if (*prefix == 0x3A) { /* a namespace prefix declaration must have a non-empty value. */ if (attr->value[0] == '\0') { parser->error = APR_XML_NS_ERROR_INVALID_DECL; return; } ++prefix; } else if (*prefix != '\0') { /* advance "prev" since "attr" is still present */ prev = attr; continue; } /* quote the URI before we ever start working with it */ quoted = apr_xml_quote_string(parser->p, attr->value, 1); /* build and insert the new scope */ ns_scope = apr_pcalloc(parser->p, sizeof(*ns_scope)); ns_scope->prefix = prefix; ns_scope->ns = apr_xml_insert_uri(parser->doc->namespaces, quoted); ns_scope->emptyURI = *quoted == '\0'; ns_scope->next = elem->ns_scope; elem->ns_scope = ns_scope; /* remove this attribute from the element */ if (prev == NULL) elem->attr = attr->next; else prev->next = attr->next; /* Note: prev will not be advanced since we just removed "attr" */ } else if (strcmp(attr->name, APR_KW_xmlns_lang) == 0) { /* save away the language (in quoted form) */ elem->lang = apr_xml_quote_string(parser->p, attr->value, 1); /* remove this attribute from the element */ if (prev == NULL) elem->attr = attr->next; else prev->next = attr->next; /* Note: prev will not be advanced since we just removed "attr" */ } else { /* advance "prev" since "attr" is still present */ prev = attr; } } /* ** If an xml:lang attribute didn't exist (lang==NULL), then copy the ** language from the parent element (if present). ** ** NOTE: elem_size() *depends* upon this pointer equality. */ if (elem->lang == NULL && elem->parent != NULL) elem->lang = elem->parent->lang; /* adjust the element's namespace */ colon = strchr(elem_name, 0x3A); if (colon == NULL) { /* * The element is using the default namespace, which will always * be found. Either it will be "no namespace", or a default * namespace URI has been specified at some point. */ elem->ns = find_prefix(parser, ""); } else if (APR_XML_NS_IS_RESERVED(elem->name)) { elem->ns = APR_XML_NS_NONE; } else { *colon = '\0'; elem->ns = find_prefix(parser, elem->name); elem->name = colon + 1; if (APR_XML_NS_IS_ERROR(elem->ns)) { parser->error = elem->ns; return; } } /* adjust all remaining attributes' namespaces */ for (attr = elem->attr; attr; attr = attr->next) { /* * apr_xml_attr defines this as "const" but we dup'd it, so we * know that we can change it. a bit hacky, but the existing * structure def is best. */ char *attr_name = (char *)attr->name; colon = strchr(attr_name, 0x3A); if (colon == NULL) { /* * Attributes do NOT use the default namespace. Therefore, * we place them into the "no namespace" category. */ attr->ns = APR_XML_NS_NONE; } else if (APR_XML_NS_IS_RESERVED(attr->name)) { attr->ns = APR_XML_NS_NONE; } else { *colon = '\0'; attr->ns = find_prefix(parser, attr->name); attr->name = colon + 1; if (APR_XML_NS_IS_ERROR(attr->ns)) { parser->error = attr->ns; return; } } } } static void end_handler(void *userdata, const char *name) { apr_xml_parser *parser = userdata; /* punt once we find an error */ if (parser->error) return; /* pop up one level */ parser->cur_elem = parser->cur_elem->parent; } static void cdata_handler(void *userdata, const char *data, int len) { apr_xml_parser *parser = userdata; apr_xml_elem *elem; apr_text_header *hdr; const char *s; /* punt once we find an error */ if (parser->error) return; elem = parser->cur_elem; s = apr_pstrndup(parser->p, data, len); if (elem->last_child == NULL) { /* no children yet. this cdata follows the start tag */ hdr = &elem->first_cdata; } else { /* child elements exist. this cdata follows the last child. */ hdr = &elem->last_child->following_cdata; } apr_text_append(parser->p, hdr, s); } static apr_status_t cleanup_parser(void *ctx) { apr_xml_parser *parser = ctx; XML_ParserFree(parser->xp); parser->xp = NULL; return APR_SUCCESS; } APU_DECLARE(apr_xml_parser *) apr_xml_parser_create(apr_pool_t *pool) { apr_xml_parser *parser = apr_pcalloc(pool, sizeof(*parser)); parser->p = pool; parser->doc = apr_pcalloc(pool, sizeof(*parser->doc)); parser->doc->namespaces = apr_array_make(pool, 5, sizeof(const char *)); /* ### is there a way to avoid hard-coding this? */ apr_xml_insert_uri(parser->doc->namespaces, APR_KW_DAV); parser->xp = XML_ParserCreate(NULL); if (parser->xp == NULL) { (*apr_pool_abort_get(pool))(APR_ENOMEM); return NULL; } apr_pool_cleanup_register(pool, parser, cleanup_parser, apr_pool_cleanup_null); XML_SetUserData(parser->xp, parser); XML_SetElementHandler(parser->xp, start_handler, end_handler); XML_SetCharacterDataHandler(parser->xp, cdata_handler); return parser; } static apr_status_t do_parse(apr_xml_parser *parser, const char *data, apr_size_t len, int is_final) { if (parser->xp == NULL) { parser->error = APR_XML_ERROR_PARSE_DONE; } else { int rv = XML_Parse(parser->xp, data, len, is_final); if (rv == 0) { parser->error = APR_XML_ERROR_EXPAT; parser->xp_err = XML_GetErrorCode(parser->xp); } } /* ### better error code? */ return parser->error ? APR_EGENERAL : APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_xml_parser_feed(apr_xml_parser *parser, const char *data, apr_size_t len) { return do_parse(parser, data, len, 0 /* is_final */); } APU_DECLARE(apr_status_t) apr_xml_parser_done(apr_xml_parser *parser, apr_xml_doc **pdoc) { char end; apr_status_t status = do_parse(parser, &end, 0, 1 /* is_final */); /* get rid of the parser */ (void) apr_pool_cleanup_run(parser->p, parser, cleanup_parser); if (status) return status; if (pdoc != NULL) *pdoc = parser->doc; return APR_SUCCESS; } APU_DECLARE(char *) apr_xml_parser_geterror(apr_xml_parser *parser, char *errbuf, apr_size_t errbufsize) { int error = parser->error; const char *msg; /* clear our record of an error */ parser->error = 0; switch (error) { case 0: msg = "No error."; break; case APR_XML_NS_ERROR_UNKNOWN_PREFIX: msg = "An undefined namespace prefix was used."; break; case APR_XML_NS_ERROR_INVALID_DECL: msg = "A namespace prefix was defined with an empty URI."; break; case APR_XML_ERROR_EXPAT: (void) apr_snprintf(errbuf, errbufsize, "XML parser error code: %s (%d)", XML_ErrorString(parser->xp_err), parser->xp_err); return errbuf; case APR_XML_ERROR_PARSE_DONE: msg = "The parser is not active."; break; default: msg = "There was an unknown error within the XML body."; break; } (void) apr_cpystrn(errbuf, msg, errbufsize); return errbuf; } APU_DECLARE(apr_status_t) apr_xml_parse_file(apr_pool_t *p, apr_xml_parser **parser, apr_xml_doc **ppdoc, apr_file_t *xmlfd, apr_size_t buffer_length) { apr_status_t rv; char *buffer; apr_size_t length; *parser = apr_xml_parser_create(p); if (*parser == NULL) { /* FIXME: returning an error code would be nice, * but we dont get one ;( */ return APR_EGENERAL; } buffer = apr_palloc(p, buffer_length); length = buffer_length; rv = apr_file_read(xmlfd, buffer, &length); while (rv == APR_SUCCESS) { rv = apr_xml_parser_feed(*parser, buffer, length); if (rv != APR_SUCCESS) { return rv; } length = buffer_length; rv = apr_file_read(xmlfd, buffer, &length); } if (rv != APR_EOF) { return rv; } rv = apr_xml_parser_done(*parser, ppdoc); *parser = NULL; return rv; } APU_DECLARE(void) apr_text_append(apr_pool_t * p, apr_text_header *hdr, const char *text) { apr_text *t = apr_palloc(p, sizeof(*t)); t->text = text; t->next = NULL; if (hdr->first == NULL) { /* no text elements yet */ hdr->first = hdr->last = t; } else { /* append to the last text element */ hdr->last->next = t; hdr->last = t; } } /* --------------------------------------------------------------- ** ** XML UTILITY FUNCTIONS */ /* ** apr_xml_quote_string: quote an XML string ** ** Replace '<', '>', and '&' with '&lt;', '&gt;', and '&amp;'. ** If quotes is true, then replace '"' with '&quot;'. ** ** quotes is typically set to true for XML strings that will occur within ** double quotes -- attribute values. */ APU_DECLARE(const char *) apr_xml_quote_string(apr_pool_t *p, const char *s, int quotes) { const char *scan; apr_size_t len = 0; apr_size_t extra = 0; char *qstr; char *qscan; char c; for (scan = s; (c = *scan) != '\0'; ++scan, ++len) { if (c == '<' || c == '>') extra += 3; /* &lt; or &gt; */ else if (c == '&') extra += 4; /* &amp; */ else if (quotes && c == '"') extra += 5; /* &quot; */ } /* nothing to do? */ if (extra == 0) return s; qstr = apr_palloc(p, len + extra + 1); for (scan = s, qscan = qstr; (c = *scan) != '\0'; ++scan) { if (c == '<') { *qscan++ = '&'; *qscan++ = 'l'; *qscan++ = 't'; *qscan++ = ';'; } else if (c == '>') { *qscan++ = '&'; *qscan++ = 'g'; *qscan++ = 't'; *qscan++ = ';'; } else if (c == '&') { *qscan++ = '&'; *qscan++ = 'a'; *qscan++ = 'm'; *qscan++ = 'p'; *qscan++ = ';'; } else if (quotes && c == '"') { *qscan++ = '&'; *qscan++ = 'q'; *qscan++ = 'u'; *qscan++ = 'o'; *qscan++ = 't'; *qscan++ = ';'; } else { *qscan++ = c; } } *qscan = '\0'; return qstr; } /* how many characters for the given integer? */ #define APR_XML_NS_LEN(ns) ((ns) < 10 ? 1 : (ns) < 100 ? 2 : (ns) < 1000 ? 3 : \ (ns) < 10000 ? 4 : (ns) < 100000 ? 5 : \ (ns) < 1000000 ? 6 : (ns) < 10000000 ? 7 : \ (ns) < 100000000 ? 8 : (ns) < 1000000000 ? 9 : 10) static apr_size_t text_size(const apr_text *t) { apr_size_t size = 0; for (; t; t = t->next) size += strlen(t->text); return size; } static apr_size_t elem_size(const apr_xml_elem *elem, int style, apr_array_header_t *namespaces, int *ns_map) { apr_size_t size; if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG) { const apr_xml_attr *attr; size = 0; if (style == APR_XML_X2T_FULL_NS_LANG) { int i; /* ** The outer element will contain xmlns:ns%d="%s" attributes ** and an xml:lang attribute, if applicable. */ for (i = namespaces->nelts; i--;) { /* compute size of: ' xmlns:ns%d="%s"' */ size += (9 + APR_XML_NS_LEN(i) + 2 + strlen(APR_XML_GET_URI_ITEM(namespaces, i)) + 1); } if (elem->lang != NULL) { /* compute size of: ' xml:lang="%s"' */ size += 11 + strlen(elem->lang) + 1; } } if (elem->ns == APR_XML_NS_NONE) { /* compute size of: <%s> */ size += 1 + strlen(elem->name) + 1; } else { int ns = ns_map ? ns_map[elem->ns] : elem->ns; /* compute size of: <ns%d:%s> */ size += 3 + APR_XML_NS_LEN(ns) + 1 + strlen(elem->name) + 1; } if (APR_XML_ELEM_IS_EMPTY(elem)) { /* insert a closing "/" */ size += 1; } else { /* * two of above plus "/": * <ns%d:%s> ... </ns%d:%s> * OR <%s> ... </%s> */ size = 2 * size + 1; } for (attr = elem->attr; attr; attr = attr->next) { if (attr->ns == APR_XML_NS_NONE) { /* compute size of: ' %s="%s"' */ size += 1 + strlen(attr->name) + 2 + strlen(attr->value) + 1; } else { /* compute size of: ' ns%d:%s="%s"' */ size += 3 + APR_XML_NS_LEN(attr->ns) + 1 + strlen(attr->name) + 2 + strlen(attr->value) + 1; } } /* ** If the element has an xml:lang value that is *different* from ** its parent, then add the thing in: ' xml:lang="%s"'. ** ** NOTE: we take advantage of the pointer equality established by ** the parsing for "inheriting" the xml:lang values from parents. */ if (elem->lang != NULL && (elem->parent == NULL || elem->lang != elem->parent->lang)) { size += 11 + strlen(elem->lang) + 1; } } else if (style == APR_XML_X2T_LANG_INNER) { /* * This style prepends the xml:lang value plus a null terminator. * If a lang value is not present, then we insert a null term. */ size = elem->lang ? strlen(elem->lang) + 1 : 1; } else size = 0; size += text_size(elem->first_cdata.first); for (elem = elem->first_child; elem; elem = elem->next) { /* the size of the child element plus the CDATA that follows it */ size += (elem_size(elem, APR_XML_X2T_FULL, NULL, ns_map) + text_size(elem->following_cdata.first)); } return size; } static char *write_text(char *s, const apr_text *t) { for (; t; t = t->next) { apr_size_t len = strlen(t->text); memcpy(s, t->text, len); s += len; } return s; } static char *write_elem(char *s, const apr_xml_elem *elem, int style, apr_array_header_t *namespaces, int *ns_map) { const apr_xml_elem *child; apr_size_t len; int ns; if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG) { int empty = APR_XML_ELEM_IS_EMPTY(elem); const apr_xml_attr *attr; if (elem->ns == APR_XML_NS_NONE) { len = sprintf(s, "<%s", elem->name); } else { ns = ns_map ? ns_map[elem->ns] : elem->ns; len = sprintf(s, "<ns%d:%s", ns, elem->name); } s += len; for (attr = elem->attr; attr; attr = attr->next) { if (attr->ns == APR_XML_NS_NONE) len = sprintf(s, " %s=\"%s\"", attr->name, attr->value); else len = sprintf(s, " ns%d:%s=\"%s\"", attr->ns, attr->name, attr->value); s += len; } /* add the xml:lang value if necessary */ if (elem->lang != NULL && (style == APR_XML_X2T_FULL_NS_LANG || elem->parent == NULL || elem->lang != elem->parent->lang)) { len = sprintf(s, " xml:lang=\"%s\"", elem->lang); s += len; } /* add namespace definitions, if required */ if (style == APR_XML_X2T_FULL_NS_LANG) { int i; for (i = namespaces->nelts; i--;) { len = sprintf(s, " xmlns:ns%d=\"%s\"", i, APR_XML_GET_URI_ITEM(namespaces, i)); s += len; } } /* no more to do. close it up and go. */ if (empty) { *s++ = '/'; *s++ = '>'; return s; } /* just close it */ *s++ = '>'; } else if (style == APR_XML_X2T_LANG_INNER) { /* prepend the xml:lang value */ if (elem->lang != NULL) { len = strlen(elem->lang); memcpy(s, elem->lang, len); s += len; } *s++ = '\0'; } s = write_text(s, elem->first_cdata.first); for (child = elem->first_child; child; child = child->next) { s = write_elem(s, child, APR_XML_X2T_FULL, NULL, ns_map); s = write_text(s, child->following_cdata.first); } if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG) { if (elem->ns == APR_XML_NS_NONE) { len = sprintf(s, "</%s>", elem->name); } else { ns = ns_map ? ns_map[elem->ns] : elem->ns; len = sprintf(s, "</ns%d:%s>", ns, elem->name); } s += len; } return s; } APU_DECLARE(void) apr_xml_quote_elem(apr_pool_t *p, apr_xml_elem *elem) { apr_text *scan_txt; apr_xml_attr *scan_attr; apr_xml_elem *scan_elem; /* convert the element's text */ for (scan_txt = elem->first_cdata.first; scan_txt != NULL; scan_txt = scan_txt->next) { scan_txt->text = apr_xml_quote_string(p, scan_txt->text, 0); } for (scan_txt = elem->following_cdata.first; scan_txt != NULL; scan_txt = scan_txt->next) { scan_txt->text = apr_xml_quote_string(p, scan_txt->text, 0); } /* convert the attribute values */ for (scan_attr = elem->attr; scan_attr != NULL; scan_attr = scan_attr->next) { scan_attr->value = apr_xml_quote_string(p, scan_attr->value, 1); } /* convert the child elements */ for (scan_elem = elem->first_child; scan_elem != NULL; scan_elem = scan_elem->next) { apr_xml_quote_elem(p, scan_elem); } } /* convert an element to a text string */ APU_DECLARE(void) apr_xml_to_text(apr_pool_t * p, const apr_xml_elem *elem, int style, apr_array_header_t *namespaces, int *ns_map, const char **pbuf, apr_size_t *psize) { /* get the exact size, plus a null terminator */ apr_size_t size = elem_size(elem, style, namespaces, ns_map) + 1; char *s = apr_palloc(p, size); (void) write_elem(s, elem, style, namespaces, ns_map); s[size - 1] = '\0'; *pbuf = s; if (psize) *psize = size; } APU_DECLARE(const char *) apr_xml_empty_elem(apr_pool_t * p, const apr_xml_elem *elem) { if (elem->ns == APR_XML_NS_NONE) { /* * The prefix (xml...) is already within the prop name, or * the element simply has no prefix. */ return apr_psprintf(p, "<%s/>" DEBUG_CR, elem->name); } return apr_psprintf(p, "<ns%d:%s/>" DEBUG_CR, elem->ns, elem->name); } /* return the URI's (existing) index, or insert it and return a new index */ APU_DECLARE(int) apr_xml_insert_uri(apr_array_header_t *uri_array, const char *uri) { int i; const char **pelt; /* never insert an empty URI; this index is always APR_XML_NS_NONE */ if (*uri == '\0') return APR_XML_NS_NONE; for (i = uri_array->nelts; i--;) { if (strcmp(uri, APR_XML_GET_URI_ITEM(uri_array, i)) == 0) return i; } pelt = apr_array_push(uri_array); *pelt = uri; /* assume uri is const or in a pool */ return uri_array->nelts - 1; } /* convert the element to EBCDIC */ #if APR_CHARSET_EBCDIC static apr_status_t apr_xml_parser_convert_elem(apr_xml_elem *e, apr_xlate_t *convset) { apr_xml_attr *a; apr_xml_elem *ec; apr_text *t; apr_size_t inbytes_left, outbytes_left; apr_status_t status; inbytes_left = outbytes_left = strlen(e->name); status = apr_xlate_conv_buffer(convset, e->name, &inbytes_left, (char *) e->name, &outbytes_left); if (status) { return status; } for (t = e->first_cdata.first; t != NULL; t = t->next) { inbytes_left = outbytes_left = strlen(t->text); status = apr_xlate_conv_buffer(convset, t->text, &inbytes_left, (char *) t->text, &outbytes_left); if (status) { return status; } } for (t = e->following_cdata.first; t != NULL; t = t->next) { inbytes_left = outbytes_left = strlen(t->text); status = apr_xlate_conv_buffer(convset, t->text, &inbytes_left, (char *) t->text, &outbytes_left); if (status) { return status; } } for (a = e->attr; a != NULL; a = a->next) { inbytes_left = outbytes_left = strlen(a->name); status = apr_xlate_conv_buffer(convset, a->name, &inbytes_left, (char *) a->name, &outbytes_left); if (status) { return status; } inbytes_left = outbytes_left = strlen(a->value); status = apr_xlate_conv_buffer(convset, a->value, &inbytes_left, (char *) a->value, &outbytes_left); if (status) { return status; } } for (ec = e->first_child; ec != NULL; ec = ec->next) { status = apr_xml_parser_convert_elem(ec, convset); if (status) { return status; } } return APR_SUCCESS; } /* convert the whole document to EBCDIC */ APU_DECLARE(apr_status_t) apr_xml_parser_convert_doc(apr_pool_t *pool, apr_xml_doc *pdoc, apr_xlate_t *convset) { apr_status_t status; /* Don't convert the namespaces: they are constant! */ if (pdoc->namespaces != NULL) { int i; apr_array_header_t *namespaces; namespaces = apr_array_make(pool, pdoc->namespaces->nelts, sizeof(const char *)); if (namespaces == NULL) return APR_ENOMEM; for (i = 0; i < pdoc->namespaces->nelts; i++) { apr_size_t inbytes_left, outbytes_left; char *ptr = (char *) APR_XML_GET_URI_ITEM(pdoc->namespaces, i); ptr = apr_pstrdup(pool, ptr); if ( ptr == NULL) return APR_ENOMEM; inbytes_left = outbytes_left = strlen(ptr); status = apr_xlate_conv_buffer(convset, ptr, &inbytes_left, ptr, &outbytes_left); if (status) { return status; } apr_xml_insert_uri(namespaces, ptr); } pdoc->namespaces = namespaces; } return apr_xml_parser_convert_elem(pdoc->root, convset); } #endif
001-log4cxx
trunk/src/apr-util/xml/apr_xml.c
C
asf20
27,462
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* base64 encoder/decoder. Originally part of main/util.c * but moved here so that support/ab and apr_sha1.c could * use it. This meant removing the apr_palloc()s and adding * ugly 'len' functions, which is quite a nasty cost. */ #include "apr_base64.h" #if APR_CHARSET_EBCDIC #include "apr_xlate.h" #endif /* APR_CHARSET_EBCDIC */ /* aaaack but it's fast and const should make it shared text page. */ static const unsigned char pr2six[256] = { #if !APR_CHARSET_EBCDIC /* ASCII table */ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 #else /*APR_CHARSET_EBCDIC*/ /* EBCDIC table */ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 64, 64, 64, 64, 64, 64, 64, 35, 36, 37, 38, 39, 40, 41, 42, 43, 64, 64, 64, 64, 64, 64, 64, 64, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 64, 64, 64, 64, 64, 64, 64, 9, 10, 11, 12, 13, 14, 15, 16, 17, 64, 64, 64, 64, 64, 64, 64, 64, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64 #endif /*APR_CHARSET_EBCDIC*/ }; #if APR_CHARSET_EBCDIC static apr_xlate_t *xlate_to_ebcdic; static unsigned char os_toascii[256]; APU_DECLARE(apr_status_t) apr_base64init_ebcdic(apr_xlate_t *to_ascii, apr_xlate_t *to_ebcdic) { int i; apr_size_t inbytes_left, outbytes_left; apr_status_t rv; int onoff; /* Only single-byte conversion is supported. */ rv = apr_xlate_sb_get(to_ascii, &onoff); if (rv) { return rv; } if (!onoff) { /* If conversion is not single-byte-only */ return APR_EINVAL; } rv = apr_xlate_sb_get(to_ebcdic, &onoff); if (rv) { return rv; } if (!onoff) { /* If conversion is not single-byte-only */ return APR_EINVAL; } xlate_to_ebcdic = to_ebcdic; for (i = 0; i < sizeof(os_toascii); i++) { os_toascii[i] = i; } inbytes_left = outbytes_left = sizeof(os_toascii); apr_xlate_conv_buffer(to_ascii, os_toascii, &inbytes_left, os_toascii, &outbytes_left); return APR_SUCCESS; } #endif /*APR_CHARSET_EBCDIC*/ APU_DECLARE(int) apr_base64_decode_len(const char *bufcoded) { int nbytesdecoded; register const unsigned char *bufin; register int nprbytes; bufin = (const unsigned char *) bufcoded; while (pr2six[*(bufin++)] <= 63); nprbytes = (bufin - (const unsigned char *) bufcoded) - 1; nbytesdecoded = ((nprbytes + 3) / 4) * 3; return nbytesdecoded + 1; } APU_DECLARE(int) apr_base64_decode(char *bufplain, const char *bufcoded) { #if APR_CHARSET_EBCDIC apr_size_t inbytes_left, outbytes_left; #endif /* APR_CHARSET_EBCDIC */ int len; len = apr_base64_decode_binary((unsigned char *) bufplain, bufcoded); #if APR_CHARSET_EBCDIC inbytes_left = outbytes_left = len; apr_xlate_conv_buffer(xlate_to_ebcdic, bufplain, &inbytes_left, bufplain, &outbytes_left); #endif /* APR_CHARSET_EBCDIC */ bufplain[len] = '\0'; return len; } /* This is the same as apr_base64_decode() except on EBCDIC machines, where * the conversion of the output to ebcdic is left out. */ APU_DECLARE(int) apr_base64_decode_binary(unsigned char *bufplain, const char *bufcoded) { int nbytesdecoded; register const unsigned char *bufin; register unsigned char *bufout; register int nprbytes; bufin = (const unsigned char *) bufcoded; while (pr2six[*(bufin++)] <= 63); nprbytes = (bufin - (const unsigned char *) bufcoded) - 1; nbytesdecoded = ((nprbytes + 3) / 4) * 3; bufout = (unsigned char *) bufplain; bufin = (const unsigned char *) bufcoded; while (nprbytes > 4) { *(bufout++) = (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4); *(bufout++) = (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2); *(bufout++) = (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]); bufin += 4; nprbytes -= 4; } /* Note: (nprbytes == 1) would be an error, so just ingore that case */ if (nprbytes > 1) { *(bufout++) = (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4); } if (nprbytes > 2) { *(bufout++) = (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2); } if (nprbytes > 3) { *(bufout++) = (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]); } nbytesdecoded -= (4 - nprbytes) & 3; return nbytesdecoded; } static const char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; APU_DECLARE(int) apr_base64_encode_len(int len) { return ((len + 2) / 3 * 4) + 1; } APU_DECLARE(int) apr_base64_encode(char *encoded, const char *string, int len) { #if !APR_CHARSET_EBCDIC return apr_base64_encode_binary(encoded, (const unsigned char *) string, len); #else /* APR_CHARSET_EBCDIC */ int i; char *p; p = encoded; for (i = 0; i < len - 2; i += 3) { *p++ = basis_64[(os_toascii[string[i]] >> 2) & 0x3F]; *p++ = basis_64[((os_toascii[string[i]] & 0x3) << 4) | ((int) (os_toascii[string[i + 1]] & 0xF0) >> 4)]; *p++ = basis_64[((os_toascii[string[i + 1]] & 0xF) << 2) | ((int) (os_toascii[string[i + 2]] & 0xC0) >> 6)]; *p++ = basis_64[os_toascii[string[i + 2]] & 0x3F]; } if (i < len) { *p++ = basis_64[(os_toascii[string[i]] >> 2) & 0x3F]; if (i == (len - 1)) { *p++ = basis_64[((os_toascii[string[i]] & 0x3) << 4)]; *p++ = '='; } else { *p++ = basis_64[((os_toascii[string[i]] & 0x3) << 4) | ((int) (os_toascii[string[i + 1]] & 0xF0) >> 4)]; *p++ = basis_64[((os_toascii[string[i + 1]] & 0xF) << 2)]; } *p++ = '='; } *p++ = '\0'; return p - encoded; #endif /* APR_CHARSET_EBCDIC */ } /* This is the same as apr_base64_encode() except on EBCDIC machines, where * the conversion of the input to ascii is left out. */ APU_DECLARE(int) apr_base64_encode_binary(char *encoded, const unsigned char *string, int len) { int i; char *p; p = encoded; for (i = 0; i < len - 2; i += 3) { *p++ = basis_64[(string[i] >> 2) & 0x3F]; *p++ = basis_64[((string[i] & 0x3) << 4) | ((int) (string[i + 1] & 0xF0) >> 4)]; *p++ = basis_64[((string[i + 1] & 0xF) << 2) | ((int) (string[i + 2] & 0xC0) >> 6)]; *p++ = basis_64[string[i + 2] & 0x3F]; } if (i < len) { *p++ = basis_64[(string[i] >> 2) & 0x3F]; if (i == (len - 1)) { *p++ = basis_64[((string[i] & 0x3) << 4)]; *p++ = '='; } else { *p++ = basis_64[((string[i] & 0x3) << 4) | ((int) (string[i + 1] & 0xF0) >> 4)]; *p++ = basis_64[((string[i + 1] & 0xF) << 2)]; } *p++ = '='; } *p++ = '\0'; return p - encoded; }
001-log4cxx
trunk/src/apr-util/encoding/apr_base64.c
C
asf20
9,229
# # export_vars.sh # # This shell script is used to export vars to the application using the # APRUTIL library. This script should be "sourced" to ensure the variable # values are set within the calling script's context. For example: # # $ . path/to/apr-util/export_vars.sh # APRUTIL_EXPORT_INCLUDES="@APRUTIL_INCLUDES@" APRUTIL_EXPORT_LIBS="@APRUTIL_EXPORT_LIBS@" APRUTIL_LDFLAGS="@APRUTIL_LDFLAGS@"
001-log4cxx
trunk/src/apr-util/export_vars.sh.in
Shell
asf20
404
# # Top-level Makefile for APRUTIL # CPP = @CPP@ # gets substituted into some targets APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VERSION@ APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@ srcdir = @srcdir@ VPATH = @srcdir@ INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@ APRUTIL_LDFLAGS = @APRUTIL_LDFLAGS@ APRUTIL_LIBS = @APRUTIL_LIBS@ TARGET_LIB = lib@APRUTIL_LIBNAME@.la INSTALL_SUBDIRS = @APR_ICONV_DIR@ @APR_XML_DIR@ EXTRA_SOURCE_DIRS = @APR_ICONV_DIR@ @APR_XML_DIR@ APRUTIL_PCFILE = apr-util-$(APRUTIL_MAJOR_VERSION).pc APU_CONFIG = apu-$(APRUTIL_MAJOR_VERSION)-config INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ TARGETS = $(TARGET_LIB) aprutil.exp # bring in rules.mk for standard functionality @INCLUDE_RULES@ @INCLUDE_OUTPUTS@ CLEAN_SUBDIRS = test @APR_ICONV_DIR@ CLEAN_TARGETS = exports.c export_vars.c aprutil.exp .make.dirs apu-config.out DISTCLEAN_TARGETS = config.cache config.log config.status libtool \ include/private/apu_config.h include/private/apu_private.h \ include/private/apu_select_dbm.h include/apr_ldap.h include/apu.h \ export_vars.sh $(APU_CONFIG) build/rules.mk include/apu_want.h \ apr-util.pc build/pkg/pkginfo EXTRACLEAN_TARGETS = configure aclocal.m4 include/private/apu_config.h.in \ exports.c build-outputs.mk \ build/apr_common.m4 build/find_apr.m4 build/install.sh \ build/config.guess build/config.sub prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ libdir=@libdir@ includedir=@includedir@ top_srcdir=@abs_srcdir@ top_blddir=@abs_builddir@ # Create apu-config script suitable for the install tree apu-config.out: $(APU_CONFIG) sed 's,^\(location=\).*$$,\1installed,' < $(APU_CONFIG) > $@ install: $(TARGET_LIB) apu-config.out $(APR_MKDIR) $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/pkgconfig \ $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) for f in $(top_srcdir)/include/*.h $(top_blddir)/include/*.h; do \ $(INSTALL_DATA) $${f} $(DESTDIR)$(includedir); \ done $(INSTALL_DATA) apr-util.pc $(DESTDIR)$(libdir)/pkgconfig/$(APRUTIL_PCFILE) list='$(INSTALL_SUBDIRS)'; for i in $$list; do \ ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \ done $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir) $(INSTALL_DATA) aprutil.exp $(DESTDIR)$(libdir) $(INSTALL) -m 755 apu-config.out $(DESTDIR)$(bindir)/$(APU_CONFIG) $(TARGET_LIB): $(OBJECTS) $(LINK) @lib_target@ $(ALL_LIBS) $(APRUTIL_LDFLAGS) $(APRUTIL_LIBS) exports.c: $(HEADERS) $(APR_MKEXPORT) $(HEADERS) > $@ export_vars.c: $(HEADERS) $(APR_MKVAREXPORT) $(HEADERS) > $@ aprutil.exp: exports.c export_vars.c @echo "#! lib@APRUTIL_LIBNAME@.so" > $@ @echo "* This file was AUTOGENERATED at build time." >> $@ @echo "* Please do not edit by hand." >> $@ $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@ $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@ dox: doxygen $(top_srcdir)/docs/doxygen.conf test: check check: $(TARGET_LIB) cd test && $(MAKE) check
001-log4cxx
trunk/src/apr-util/Makefile.in
Makefile
asf20
3,052
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" #if APR_HAS_MMAP static apr_status_t mmap_bucket_read(apr_bucket *b, const char **str, apr_size_t *length, apr_read_type_e block) { apr_bucket_mmap *m = b->data; apr_status_t ok; void *addr; if (!m->mmap) { /* the apr_mmap_t was already cleaned up out from under us */ return APR_EINVAL; } ok = apr_mmap_offset(&addr, m->mmap, b->start); if (ok != APR_SUCCESS) { return ok; } *str = addr; *length = b->length; return APR_SUCCESS; } static apr_status_t mmap_bucket_cleanup(void *data) { /* the apr_mmap_t is about to disappear out from under us, so we * have no choice but to pretend it doesn't exist anymore. the * refcount is now useless because there's nothing to refer to * anymore. so the only valid action on any remaining referrer * is to delete it. no more reads, no more anything. */ apr_bucket_mmap *m = data; m->mmap = NULL; return APR_SUCCESS; } static void mmap_bucket_destroy(void *data) { apr_bucket_mmap *m = data; if (apr_bucket_shared_destroy(m)) { if (m->mmap) { apr_pool_cleanup_kill(m->mmap->cntxt, m, mmap_bucket_cleanup); apr_mmap_delete(m->mmap); } apr_bucket_free(m); } } /* * XXX: are the start and length arguments useful? */ APU_DECLARE(apr_bucket *) apr_bucket_mmap_make(apr_bucket *b, apr_mmap_t *mm, apr_off_t start, apr_size_t length) { apr_bucket_mmap *m; m = apr_bucket_alloc(sizeof(*m), b->list); m->mmap = mm; apr_pool_cleanup_register(mm->cntxt, m, mmap_bucket_cleanup, apr_pool_cleanup_null); b = apr_bucket_shared_make(b, m, start, length); b->type = &apr_bucket_type_mmap; return b; } APU_DECLARE(apr_bucket *) apr_bucket_mmap_create(apr_mmap_t *mm, apr_off_t start, apr_size_t length, apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_mmap_make(b, mm, start, length); } static apr_status_t mmap_bucket_setaside(apr_bucket *b, apr_pool_t *p) { apr_bucket_mmap *m = b->data; apr_mmap_t *mm = m->mmap; apr_mmap_t *new_mm; apr_status_t ok; if (!mm) { /* the apr_mmap_t was already cleaned up out from under us */ return APR_EINVAL; } /* shortcut if possible */ if (apr_pool_is_ancestor(mm->cntxt, p)) { return APR_SUCCESS; } /* duplicate apr_mmap_t into new pool */ ok = apr_mmap_dup(&new_mm, mm, p); if (ok != APR_SUCCESS) { return ok; } /* decrement refcount on old apr_bucket_mmap */ mmap_bucket_destroy(m); /* create new apr_bucket_mmap pointing to new apr_mmap_t */ apr_bucket_mmap_make(b, new_mm, b->start, b->length); return APR_SUCCESS; } APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_mmap = { "MMAP", 5, APR_BUCKET_DATA, mmap_bucket_destroy, mmap_bucket_read, mmap_bucket_setaside, apr_bucket_shared_split, apr_bucket_shared_copy }; #endif
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_mmap.c
C
asf20
4,071
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" #define APR_WANT_MEMFUNC #include "apr_want.h" static apr_status_t heap_bucket_read(apr_bucket *b, const char **str, apr_size_t *len, apr_read_type_e block) { apr_bucket_heap *h = b->data; *str = h->base + b->start; *len = b->length; return APR_SUCCESS; } static void heap_bucket_destroy(void *data) { apr_bucket_heap *h = data; if (apr_bucket_shared_destroy(h)) { (*h->free_func)(h->base); apr_bucket_free(h); } } /* Warning: if you change this function, be sure to * change apr_bucket_pool_make() too! */ APU_DECLARE(apr_bucket *) apr_bucket_heap_make(apr_bucket *b, const char *buf, apr_size_t length, void (*free_func)(void *data)) { apr_bucket_heap *h; h = apr_bucket_alloc(sizeof(*h), b->list); if (!free_func) { h->alloc_len = length; h->base = apr_bucket_alloc(h->alloc_len, b->list); if (h->base == NULL) { apr_bucket_free(h); return NULL; } h->free_func = apr_bucket_free; memcpy(h->base, buf, length); } else { /* XXX: we lose the const qualifier here which indicates * there's something screwy with the API... */ h->base = (char *) buf; h->alloc_len = length; h->free_func = free_func; } b = apr_bucket_shared_make(b, h, 0, length); b->type = &apr_bucket_type_heap; return b; } APU_DECLARE(apr_bucket *) apr_bucket_heap_create(const char *buf, apr_size_t length, void (*free_func)(void *data), apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_heap_make(b, buf, length, free_func); } APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_heap = { "HEAP", 5, APR_BUCKET_DATA, heap_bucket_destroy, heap_bucket_read, apr_bucket_setaside_noop, apr_bucket_shared_split, apr_bucket_shared_copy };
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_heap.c
C
asf20
2,933
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" static apr_status_t flush_bucket_read(apr_bucket *b, const char **str, apr_size_t *len, apr_read_type_e block) { *str = NULL; *len = 0; return APR_SUCCESS; } APU_DECLARE(apr_bucket *) apr_bucket_flush_make(apr_bucket *b) { b->length = 0; b->start = 0; b->data = NULL; b->type = &apr_bucket_type_flush; return b; } APU_DECLARE(apr_bucket *) apr_bucket_flush_create(apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_flush_make(b); } APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_flush = { "FLUSH", 5, APR_BUCKET_METADATA, apr_bucket_destroy_noop, flush_bucket_read, apr_bucket_setaside_noop, apr_bucket_split_notimpl, apr_bucket_simple_copy };
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_flush.c
C
asf20
1,593
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <stdlib.h> #include "apr_buckets.h" #include "apr_allocator.h" #define ALLOC_AMT (8192 - APR_MEMNODE_T_SIZE) typedef struct node_header_t { apr_size_t size; apr_bucket_alloc_t *alloc; apr_memnode_t *memnode; struct node_header_t *next; } node_header_t; #define SIZEOF_NODE_HEADER_T APR_ALIGN_DEFAULT(sizeof(node_header_t)) #define SMALL_NODE_SIZE (APR_BUCKET_ALLOC_SIZE + SIZEOF_NODE_HEADER_T) /** A list of free memory from which new buckets or private bucket * structures can be allocated. */ struct apr_bucket_alloc_t { apr_pool_t *pool; apr_allocator_t *allocator; node_header_t *freelist; apr_memnode_t *blocks; }; static apr_status_t alloc_cleanup(void *data) { apr_bucket_alloc_t *list = data; apr_allocator_free(list->allocator, list->blocks); #if APR_POOL_DEBUG if (list->pool && list->allocator != apr_pool_allocator_get(list->pool)) { apr_allocator_destroy(list->allocator); } #endif return APR_SUCCESS; } APU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create(apr_pool_t *p) { apr_allocator_t *allocator = apr_pool_allocator_get(p); apr_bucket_alloc_t *list; #if APR_POOL_DEBUG /* may be NULL for debug mode. */ if (allocator == NULL) { if (apr_allocator_create(&allocator) != APR_SUCCESS) { abort(); } } #endif list = apr_bucket_alloc_create_ex(allocator); list->pool = p; apr_pool_cleanup_register(list->pool, list, alloc_cleanup, apr_pool_cleanup_null); return list; } APU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create_ex( apr_allocator_t *allocator) { apr_bucket_alloc_t *list; apr_memnode_t *block; block = apr_allocator_alloc(allocator, ALLOC_AMT); list = (apr_bucket_alloc_t *)block->first_avail; list->pool = NULL; list->allocator = allocator; list->freelist = NULL; list->blocks = block; block->first_avail += APR_ALIGN_DEFAULT(sizeof(*list)); return list; } APU_DECLARE_NONSTD(void) apr_bucket_alloc_destroy(apr_bucket_alloc_t *list) { if (list->pool) { apr_pool_cleanup_kill(list->pool, list, alloc_cleanup); } apr_allocator_free(list->allocator, list->blocks); #if APR_POOL_DEBUG if (list->pool && list->allocator != apr_pool_allocator_get(list->pool)) { apr_allocator_destroy(list->allocator); } #endif } APU_DECLARE_NONSTD(void *) apr_bucket_alloc(apr_size_t size, apr_bucket_alloc_t *list) { node_header_t *node; apr_memnode_t *active = list->blocks; char *endp; size += SIZEOF_NODE_HEADER_T; if (size <= SMALL_NODE_SIZE) { if (list->freelist) { node = list->freelist; list->freelist = node->next; } else { endp = active->first_avail + SMALL_NODE_SIZE; if (endp >= active->endp) { list->blocks = apr_allocator_alloc(list->allocator, ALLOC_AMT); list->blocks->next = active; active = list->blocks; endp = active->first_avail + SMALL_NODE_SIZE; } node = (node_header_t *)active->first_avail; node->alloc = list; node->memnode = active; node->size = SMALL_NODE_SIZE; active->first_avail = endp; } } else { apr_memnode_t *memnode = apr_allocator_alloc(list->allocator, size); node = (node_header_t *)memnode->first_avail; node->alloc = list; node->memnode = memnode; node->size = size; } return ((char *)node) + SIZEOF_NODE_HEADER_T; } #ifdef APR_BUCKET_DEBUG #if APR_HAVE_STDLIB_H #include <stdlib.h> #endif static void check_not_already_free(node_header_t *node) { apr_bucket_alloc_t *list = node->alloc; node_header_t *curr = list->freelist; while (curr) { if (node == curr) { abort(); } curr = curr->next; } } #else #define check_not_already_free(node) #endif APU_DECLARE_NONSTD(void) apr_bucket_free(void *mem) { node_header_t *node = (node_header_t *)((char *)mem - SIZEOF_NODE_HEADER_T); apr_bucket_alloc_t *list = node->alloc; if (node->size == SMALL_NODE_SIZE) { check_not_already_free(node); node->next = list->freelist; list->freelist = node; } else { apr_allocator_free(list->allocator, node->memnode); } }
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_alloc.c
C
asf20
5,184
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" APU_DECLARE_NONSTD(apr_status_t) apr_bucket_shared_split(apr_bucket *a, apr_size_t point) { apr_bucket_refcount *r = a->data; apr_status_t rv; if ((rv = apr_bucket_simple_split(a, point)) != APR_SUCCESS) { return rv; } r->refcount++; return APR_SUCCESS; } APU_DECLARE_NONSTD(apr_status_t) apr_bucket_shared_copy(apr_bucket *a, apr_bucket **b) { apr_bucket_refcount *r = a->data; apr_bucket_simple_copy(a, b); r->refcount++; return APR_SUCCESS; } APU_DECLARE(int) apr_bucket_shared_destroy(void *data) { apr_bucket_refcount *r = data; r->refcount--; return (r->refcount == 0); } APU_DECLARE(apr_bucket *) apr_bucket_shared_make(apr_bucket *b, void *data, apr_off_t start, apr_size_t length) { apr_bucket_refcount *r = data; b->data = r; b->start = start; b->length = length; /* caller initializes the type field */ r->refcount = 1; return b; }
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_refcount.c
C
asf20
1,833
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" #define APR_WANT_MEMFUNC #include "apr_want.h" static apr_status_t pool_bucket_cleanup(void *data) { apr_bucket_pool *p = data; /* * If the pool gets cleaned up, we have to copy the data out * of the pool and onto the heap. But the apr_buckets out there * that point to this pool bucket need to be notified such that * they can morph themselves into a regular heap bucket the next * time they try to read. To avoid having to manipulate * reference counts and b->data pointers, the apr_bucket_pool * actually _contains_ an apr_bucket_heap as its first element, * so the two share their apr_bucket_refcount member, and you * can typecast a pool bucket struct to make it look like a * regular old heap bucket struct. */ p->heap.base = apr_bucket_alloc(p->heap.alloc_len, p->list); memcpy(p->heap.base, p->base, p->heap.alloc_len); p->base = NULL; p->pool = NULL; return APR_SUCCESS; } static apr_status_t pool_bucket_read(apr_bucket *b, const char **str, apr_size_t *len, apr_read_type_e block) { apr_bucket_pool *p = b->data; const char *base = p->base; if (p->pool == NULL) { /* * pool has been cleaned up... masquerade as a heap bucket from now * on. subsequent bucket operations will use the heap bucket code. */ b->type = &apr_bucket_type_heap; base = p->heap.base; } *str = base + b->start; *len = b->length; return APR_SUCCESS; } static void pool_bucket_destroy(void *data) { apr_bucket_pool *p = data; /* If the pool is cleaned up before the last reference goes * away, the data is really now on the heap; heap_destroy() takes * over. free() in heap_destroy() thinks it's freeing * an apr_bucket_heap, when in reality it's freeing the whole * apr_bucket_pool for us. */ if (p->pool) { /* the shared resource is still in the pool * because the pool has not been cleaned up yet */ if (apr_bucket_shared_destroy(p)) { apr_pool_cleanup_kill(p->pool, p, pool_bucket_cleanup); apr_bucket_free(p); } } else { /* the shared resource is no longer in the pool, it's * on the heap, but this reference still thinks it's a pool * bucket. we should just go ahead and pass control to * heap_destroy() for it since it doesn't know any better. */ apr_bucket_type_heap.destroy(p); } } APU_DECLARE(apr_bucket *) apr_bucket_pool_make(apr_bucket *b, const char *buf, apr_size_t length, apr_pool_t *pool) { apr_bucket_pool *p; p = apr_bucket_alloc(sizeof(*p), b->list); /* XXX: we lose the const qualifier here which indicates * there's something screwy with the API... */ /* XXX: why is this? buf is const, p->base is const... what's * the problem? --jcw */ p->base = (char *) buf; p->pool = pool; p->list = b->list; b = apr_bucket_shared_make(b, p, 0, length); b->type = &apr_bucket_type_pool; /* pre-initialize heap bucket member */ p->heap.alloc_len = length; p->heap.base = NULL; p->heap.free_func = apr_bucket_free; apr_pool_cleanup_register(p->pool, p, pool_bucket_cleanup, apr_pool_cleanup_null); return b; } APU_DECLARE(apr_bucket *) apr_bucket_pool_create(const char *buf, apr_size_t length, apr_pool_t *pool, apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_pool_make(b, buf, length, pool); } APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pool = { "POOL", 5, APR_BUCKET_DATA, pool_bucket_destroy, pool_bucket_read, apr_bucket_setaside_noop, /* don't need to setaside thanks to the cleanup*/ apr_bucket_shared_split, apr_bucket_shared_copy };
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_pool.c
C
asf20
4,849
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" APU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_noop(apr_bucket *data, apr_pool_t *pool) { return APR_SUCCESS; } APU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_notimpl(apr_bucket *data, apr_pool_t *pool) { return APR_ENOTIMPL; } APU_DECLARE_NONSTD(apr_status_t) apr_bucket_split_notimpl(apr_bucket *data, apr_size_t point) { return APR_ENOTIMPL; } APU_DECLARE_NONSTD(apr_status_t) apr_bucket_copy_notimpl(apr_bucket *e, apr_bucket **c) { return APR_ENOTIMPL; } APU_DECLARE_NONSTD(void) apr_bucket_destroy_noop(void *data) { return; }
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets.c
C
asf20
1,482
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" APU_DECLARE_NONSTD(apr_status_t) apr_bucket_simple_copy(apr_bucket *a, apr_bucket **b) { *b = apr_bucket_alloc(sizeof(**b), a->list); /* XXX: check for failure? */ **b = *a; return APR_SUCCESS; } APU_DECLARE_NONSTD(apr_status_t) apr_bucket_simple_split(apr_bucket *a, apr_size_t point) { apr_bucket *b; if (point > a->length) { return APR_EINVAL; } apr_bucket_simple_copy(a, &b); a->length = point; b->length -= point; b->start += point; APR_BUCKET_INSERT_AFTER(a, b); return APR_SUCCESS; } static apr_status_t simple_bucket_read(apr_bucket *b, const char **str, apr_size_t *len, apr_read_type_e block) { *str = (char *)b->data + b->start; *len = b->length; return APR_SUCCESS; } APU_DECLARE(apr_bucket *) apr_bucket_immortal_make(apr_bucket *b, const char *buf, apr_size_t length) { b->data = (char *)buf; b->length = length; b->start = 0; b->type = &apr_bucket_type_immortal; return b; } APU_DECLARE(apr_bucket *) apr_bucket_immortal_create(const char *buf, apr_size_t length, apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_immortal_make(b, buf, length); } /* * XXX: This function could do with some tweaking to reduce memory * usage in various cases, e.g. share buffers in the heap between all * the buckets that are set aside, or even spool set-aside data to * disk if it gets too voluminous (but if it does then that's probably * a bug elsewhere). There should probably be a apr_brigade_setaside() * function that co-ordinates the action of all the bucket setaside * functions to improve memory efficiency. */ static apr_status_t transient_bucket_setaside(apr_bucket *b, apr_pool_t *pool) { b = apr_bucket_heap_make(b, (char *)b->data + b->start, b->length, NULL); if (b == NULL) { return APR_ENOMEM; } return APR_SUCCESS; } APU_DECLARE(apr_bucket *) apr_bucket_transient_make(apr_bucket *b, const char *buf, apr_size_t length) { b->data = (char *)buf; b->length = length; b->start = 0; b->type = &apr_bucket_type_transient; return b; } APU_DECLARE(apr_bucket *) apr_bucket_transient_create(const char *buf, apr_size_t length, apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_transient_make(b, buf, length); } const apr_bucket_type_t apr_bucket_type_immortal = { "IMMORTAL", 5, APR_BUCKET_DATA, apr_bucket_destroy_noop, simple_bucket_read, apr_bucket_setaside_noop, apr_bucket_simple_split, apr_bucket_simple_copy }; APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_transient = { "TRANSIENT", 5, APR_BUCKET_DATA, apr_bucket_destroy_noop, simple_bucket_read, transient_bucket_setaside, apr_bucket_simple_split, apr_bucket_simple_copy };
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_simple.c
C
asf20
4,286
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr.h" #include "apr_general.h" #include "apr_file_io.h" #include "apr_buckets.h" #if APR_HAS_MMAP #include "apr_mmap.h" /* mmap support for static files based on ideas from John Heidemann's * patch against 1.0.5. See * <http://www.isi.edu/~johnh/SOFTWARE/APACHE/index.html>. */ #endif /* APR_HAS_MMAP */ static void file_bucket_destroy(void *data) { apr_bucket_file *f = data; if (apr_bucket_shared_destroy(f)) { /* no need to close the file here; it will get * done automatically when the pool gets cleaned up */ apr_bucket_free(f); } } #if APR_HAS_MMAP static int file_make_mmap(apr_bucket *e, apr_size_t filelength, apr_off_t fileoffset, apr_pool_t *p) { apr_bucket_file *a = e->data; apr_mmap_t *mm; if (!a->can_mmap) { return 0; } if (filelength > APR_MMAP_LIMIT) { if (apr_mmap_create(&mm, a->fd, fileoffset, APR_MMAP_LIMIT, APR_MMAP_READ, p) != APR_SUCCESS) { return 0; } apr_bucket_split(e, APR_MMAP_LIMIT); filelength = APR_MMAP_LIMIT; } else if ((filelength < APR_MMAP_THRESHOLD) || (apr_mmap_create(&mm, a->fd, fileoffset, filelength, APR_MMAP_READ, p) != APR_SUCCESS)) { return 0; } apr_bucket_mmap_make(e, mm, 0, filelength); file_bucket_destroy(a); return 1; } #endif static apr_status_t file_bucket_read(apr_bucket *e, const char **str, apr_size_t *len, apr_read_type_e block) { apr_bucket_file *a = e->data; apr_file_t *f = a->fd; apr_bucket *b = NULL; char *buf; apr_status_t rv; apr_size_t filelength = e->length; /* bytes remaining in file past offset */ apr_off_t fileoffset = e->start; #if APR_HAS_THREADS && !APR_HAS_XTHREAD_FILES apr_int32_t flags; #endif #if APR_HAS_MMAP if (file_make_mmap(e, filelength, fileoffset, a->readpool)) { return apr_bucket_read(e, str, len, block); } #endif #if APR_HAS_THREADS && !APR_HAS_XTHREAD_FILES if ((flags = apr_file_flags_get(f)) & APR_XTHREAD) { /* this file descriptor is shared across multiple threads and * this OS doesn't support that natively, so as a workaround * we must reopen the file into a->readpool */ const char *fname; apr_file_name_get(&fname, f); rv = apr_file_open(&f, fname, (flags & ~APR_XTHREAD), 0, a->readpool); if (rv != APR_SUCCESS) return rv; a->fd = f; } #endif *len = (filelength > APR_BUCKET_BUFF_SIZE) ? APR_BUCKET_BUFF_SIZE : filelength; *str = NULL; /* in case we die prematurely */ buf = apr_bucket_alloc(*len, e->list); /* Handle offset ... */ rv = apr_file_seek(f, APR_SET, &fileoffset); if (rv != APR_SUCCESS) { apr_bucket_free(buf); return rv; } rv = apr_file_read(f, buf, len); if (rv != APR_SUCCESS && rv != APR_EOF) { apr_bucket_free(buf); return rv; } filelength -= *len; /* * Change the current bucket to refer to what we read, * even if we read nothing because we hit EOF. */ apr_bucket_heap_make(e, buf, *len, apr_bucket_free); /* If we have more to read from the file, then create another bucket */ if (filelength > 0 && rv != APR_EOF) { /* for efficiency, we can just build a new apr_bucket struct * to wrap around the existing file bucket */ b = apr_bucket_alloc(sizeof(*b), e->list); b->start = fileoffset + (*len); b->length = filelength; b->data = a; b->type = &apr_bucket_type_file; b->free = apr_bucket_free; b->list = e->list; APR_BUCKET_INSERT_AFTER(e, b); } else { file_bucket_destroy(a); } *str = buf; return rv; } APU_DECLARE(apr_bucket *) apr_bucket_file_make(apr_bucket *b, apr_file_t *fd, apr_off_t offset, apr_size_t len, apr_pool_t *p) { apr_bucket_file *f; f = apr_bucket_alloc(sizeof(*f), b->list); f->fd = fd; f->readpool = p; #if APR_HAS_MMAP f->can_mmap = 1; #endif b = apr_bucket_shared_make(b, f, offset, len); b->type = &apr_bucket_type_file; return b; } APU_DECLARE(apr_bucket *) apr_bucket_file_create(apr_file_t *fd, apr_off_t offset, apr_size_t len, apr_pool_t *p, apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_file_make(b, fd, offset, len, p); } APU_DECLARE(apr_status_t) apr_bucket_file_enable_mmap(apr_bucket *e, int enabled) { #if APR_HAS_MMAP apr_bucket_file *a = e->data; a->can_mmap = enabled; return APR_SUCCESS; #else return APR_ENOTIMPL; #endif /* APR_HAS_MMAP */ } static apr_status_t file_bucket_setaside(apr_bucket *data, apr_pool_t *reqpool) { apr_bucket_file *a = data->data; apr_file_t *fd = NULL; apr_file_t *f = a->fd; apr_pool_t *curpool = apr_file_pool_get(f); if (apr_pool_is_ancestor(curpool, reqpool)) { return APR_SUCCESS; } if (!apr_pool_is_ancestor(a->readpool, reqpool)) { a->readpool = reqpool; } apr_file_setaside(&fd, f, reqpool); a->fd = fd; return APR_SUCCESS; } APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_file = { "FILE", 5, APR_BUCKET_DATA, file_bucket_destroy, file_bucket_read, file_bucket_setaside, apr_bucket_shared_split, apr_bucket_shared_copy };
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_file.c
C
asf20
6,577
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr.h" #include "apr_lib.h" #include "apr_strings.h" #include "apr_pools.h" #include "apr_tables.h" #include "apr_buckets.h" #include "apr_errno.h" #define APR_WANT_MEMFUNC #define APR_WANT_STRFUNC #include "apr_want.h" #if APR_HAVE_SYS_UIO_H #include <sys/uio.h> #endif static apr_status_t brigade_cleanup(void *data) { return apr_brigade_cleanup(data); } APU_DECLARE(apr_status_t) apr_brigade_cleanup(void *data) { apr_bucket_brigade *b = data; apr_bucket *e; while (!APR_BRIGADE_EMPTY(b)) { e = APR_BRIGADE_FIRST(b); apr_bucket_delete(e); } /* We don't need to free(bb) because it's allocated from a pool. */ return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_destroy(apr_bucket_brigade *b) { apr_pool_cleanup_kill(b->p, b, brigade_cleanup); return apr_brigade_cleanup(b); } APU_DECLARE(apr_bucket_brigade *) apr_brigade_create(apr_pool_t *p, apr_bucket_alloc_t *list) { apr_bucket_brigade *b; b = apr_palloc(p, sizeof(*b)); b->p = p; b->bucket_alloc = list; APR_RING_INIT(&b->list, apr_bucket, link); apr_pool_cleanup_register(b->p, b, brigade_cleanup, apr_pool_cleanup_null); return b; } APU_DECLARE(apr_bucket_brigade *) apr_brigade_split(apr_bucket_brigade *b, apr_bucket *e) { apr_bucket_brigade *a; apr_bucket *f; a = apr_brigade_create(b->p, b->bucket_alloc); /* Return an empty brigade if there is nothing left in * the first brigade to split off */ if (e != APR_BRIGADE_SENTINEL(b)) { f = APR_RING_LAST(&b->list); APR_RING_UNSPLICE(e, f, link); APR_RING_SPLICE_HEAD(&a->list, e, f, apr_bucket, link); } APR_BRIGADE_CHECK_CONSISTENCY(a); APR_BRIGADE_CHECK_CONSISTENCY(b); return a; } APU_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b, apr_off_t point, apr_bucket **after_point) { apr_bucket *e; const char *s; apr_size_t len; apr_status_t rv; if (point < 0) { /* this could cause weird (not necessarily SEGV) things to happen */ return APR_EINVAL; } if (point == 0) { *after_point = APR_BRIGADE_FIRST(b); return APR_SUCCESS; } APR_BRIGADE_CHECK_CONSISTENCY(b); for (e = APR_BRIGADE_FIRST(b); e != APR_BRIGADE_SENTINEL(b); e = APR_BUCKET_NEXT(e)) { if ((e->length == (apr_size_t)(-1)) && (point > (apr_size_t)(-1))) { /* point is too far out to simply split this bucket, * we must fix this bucket's size and keep going... */ rv = apr_bucket_read(e, &s, &len, APR_BLOCK_READ); if (rv != APR_SUCCESS) { *after_point = e; return rv; } } if ((point < e->length) || (e->length == (apr_size_t)(-1))) { /* We already checked e->length -1 above, so we now * trust e->length < MAX_APR_SIZE_T. * First try to split the bucket natively... */ if ((rv = apr_bucket_split(e, (apr_size_t)point)) != APR_ENOTIMPL) { *after_point = APR_BUCKET_NEXT(e); return rv; } /* if the bucket cannot be split, we must read from it, * changing its type to one that can be split */ rv = apr_bucket_read(e, &s, &len, APR_BLOCK_READ); if (rv != APR_SUCCESS) { *after_point = e; return rv; } /* this assumes that len == e->length, which is okay because e * might have been morphed by the apr_bucket_read() above, but * if it was, the length would have been adjusted appropriately */ if (point < e->length) { rv = apr_bucket_split(e, (apr_size_t)point); *after_point = APR_BUCKET_NEXT(e); return rv; } } if (point == e->length) { *after_point = APR_BUCKET_NEXT(e); return APR_SUCCESS; } point -= e->length; } *after_point = APR_BRIGADE_SENTINEL(b); return APR_INCOMPLETE; } APU_DECLARE(apr_status_t) apr_brigade_length(apr_bucket_brigade *bb, int read_all, apr_off_t *length) { apr_off_t total = 0; apr_bucket *bkt; for (bkt = APR_BRIGADE_FIRST(bb); bkt != APR_BRIGADE_SENTINEL(bb); bkt = APR_BUCKET_NEXT(bkt)) { if (bkt->length == (apr_size_t)(-1)) { const char *ignore; apr_size_t len; apr_status_t status; if (!read_all) { *length = -1; return APR_SUCCESS; } if ((status = apr_bucket_read(bkt, &ignore, &len, APR_BLOCK_READ)) != APR_SUCCESS) { return status; } } total += bkt->length; } *length = total; return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_flatten(apr_bucket_brigade *bb, char *c, apr_size_t *len) { apr_size_t actual = 0; apr_bucket *b; for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) { const char *str; apr_size_t str_len; apr_status_t status; status = apr_bucket_read(b, &str, &str_len, APR_BLOCK_READ); if (status != APR_SUCCESS) { return status; } /* If we would overflow. */ if (str_len + actual > *len) { str_len = *len - actual; } /* XXX: It appears that overflow of the final bucket * is DISCARDED without any warning to the caller. * * No, we only copy the data up to their requested size. -- jre */ memcpy(c, str, str_len); c += str_len; actual += str_len; /* This could probably be actual == *len, but be safe from stray * photons. */ if (actual >= *len) { break; } } *len = actual; return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_pflatten(apr_bucket_brigade *bb, char **c, apr_size_t *len, apr_pool_t *pool) { apr_off_t actual; apr_size_t total; apr_status_t rv; apr_brigade_length(bb, 1, &actual); /* XXX: This is dangerous beyond belief. At least in the * apr_brigade_flatten case, the user explicitly stated their * buffer length - so we don't up and palloc 4GB for a single * file bucket. This API must grow a useful max boundry, * either compiled-in or preset via the *len value. * * Shouldn't both fn's grow an additional return value for * the case that the brigade couldn't be flattened into the * provided or allocated buffer (such as APR_EMOREDATA?) * Not a failure, simply an advisory result. */ total = (apr_size_t)actual; *c = apr_palloc(pool, total); rv = apr_brigade_flatten(bb, *c, &total); if (rv != APR_SUCCESS) { return rv; } *len = total; return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_split_line(apr_bucket_brigade *bbOut, apr_bucket_brigade *bbIn, apr_read_type_e block, apr_off_t maxbytes) { apr_off_t readbytes = 0; while (!APR_BRIGADE_EMPTY(bbIn)) { const char *pos; const char *str; apr_size_t len; apr_status_t rv; apr_bucket *e; e = APR_BRIGADE_FIRST(bbIn); rv = apr_bucket_read(e, &str, &len, block); if (rv != APR_SUCCESS) { return rv; } pos = memchr(str, APR_ASCII_LF, len); /* We found a match. */ if (pos != NULL) { apr_bucket_split(e, pos - str + 1); APR_BUCKET_REMOVE(e); APR_BRIGADE_INSERT_TAIL(bbOut, e); return APR_SUCCESS; } APR_BUCKET_REMOVE(e); APR_BRIGADE_INSERT_TAIL(bbOut, e); readbytes += len; /* We didn't find an APR_ASCII_LF within the maximum line length. */ if (readbytes >= maxbytes) { break; } } return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_to_iovec(apr_bucket_brigade *b, struct iovec *vec, int *nvec) { int left = *nvec; apr_bucket *e; struct iovec *orig; apr_size_t iov_len; apr_status_t rv; orig = vec; for (e = APR_BRIGADE_FIRST(b); e != APR_BRIGADE_SENTINEL(b); e = APR_BUCKET_NEXT(e)) { if (left-- == 0) break; rv = apr_bucket_read(e, (const char **)&vec->iov_base, &iov_len, APR_NONBLOCK_READ); if (rv != APR_SUCCESS) return rv; vec->iov_len = iov_len; /* set indirectly in case size differs */ ++vec; } *nvec = vec - orig; return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_vputstrs(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, va_list va) { for (;;) { const char *str = va_arg(va, const char *); apr_status_t rv; if (str == NULL) break; rv = apr_brigade_write(b, flush, ctx, str, strlen(str)); if (rv != APR_SUCCESS) return rv; } return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_putc(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const char c) { return apr_brigade_write(b, flush, ctx, &c, 1); } APU_DECLARE(apr_status_t) apr_brigade_write(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const char *str, apr_size_t nbyte) { apr_bucket *e = APR_BRIGADE_LAST(b); apr_size_t remaining = APR_BUCKET_BUFF_SIZE; char *buf = NULL; if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) { apr_bucket_heap *h = e->data; /* HEAP bucket start offsets are always in-memory, safe to cast */ remaining = h->alloc_len - (e->length + (apr_size_t)e->start); buf = h->base + e->start + e->length; } if (nbyte > remaining) { /* either a buffer bucket exists but is full, * or no buffer bucket exists and the data is too big * to buffer. In either case, we should flush. */ if (flush) { e = apr_bucket_transient_create(str, nbyte, b->bucket_alloc); APR_BRIGADE_INSERT_TAIL(b, e); return flush(b, ctx); } else { e = apr_bucket_heap_create(str, nbyte, NULL, b->bucket_alloc); APR_BRIGADE_INSERT_TAIL(b, e); return APR_SUCCESS; } } else if (!buf) { /* we don't have a buffer, but the data is small enough * that we don't mind making a new buffer */ buf = apr_bucket_alloc(APR_BUCKET_BUFF_SIZE, b->bucket_alloc); e = apr_bucket_heap_create(buf, APR_BUCKET_BUFF_SIZE, apr_bucket_free, b->bucket_alloc); APR_BRIGADE_INSERT_TAIL(b, e); e->length = 0; /* We are writing into the brigade, and * allocating more memory than we need. This * ensures that the bucket thinks it is empty just * after we create it. We'll fix the length * once we put data in it below. */ } /* there is a sufficiently big buffer bucket available now */ memcpy(buf, str, nbyte); e->length += nbyte; return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_writev(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const struct iovec *vec, apr_size_t nvec) { apr_bucket *e; apr_size_t total_len; apr_size_t i; char *buf; /* Compute the total length of the data to be written. */ total_len = 0; for (i = 0; i < nvec; i++) { total_len += vec[i].iov_len; } /* If the data to be written is very large, try to convert * the iovec to transient buckets rather than copying. */ if (total_len > APR_BUCKET_BUFF_SIZE) { if (flush) { for (i = 0; i < nvec; i++) { e = apr_bucket_transient_create(vec[i].iov_base, vec[i].iov_len, b->bucket_alloc); APR_BRIGADE_INSERT_TAIL(b, e); } return flush(b, ctx); } else { for (i = 0; i < nvec; i++) { e = apr_bucket_heap_create((const char *) vec[i].iov_base, vec[i].iov_len, NULL, b->bucket_alloc); APR_BRIGADE_INSERT_TAIL(b, e); } return APR_SUCCESS; } } i = 0; /* If there is a heap bucket at the end of the brigade * already, copy into the existing bucket. */ e = APR_BRIGADE_LAST(b); if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) { apr_bucket_heap *h = e->data; apr_size_t remaining = h->alloc_len - (e->length + (apr_size_t)e->start); buf = h->base + e->start + e->length; if (remaining >= total_len) { /* Simple case: all the data will fit in the * existing heap bucket */ for (; i < nvec; i++) { apr_size_t len = vec[i].iov_len; memcpy(buf, (const void *) vec[i].iov_base, len); buf += len; } e->length += total_len; return APR_SUCCESS; } else { /* More complicated case: not all of the data * will fit in the existing heap bucket. The * total data size is <= APR_BUCKET_BUFF_SIZE, * so we'll need only one additional bucket. */ const char *start_buf = buf; for (; i < nvec; i++) { apr_size_t len = vec[i].iov_len; if (len > remaining) { break; } memcpy(buf, (const void *) vec[i].iov_base, len); buf += len; remaining -= len; } e->length += (buf - start_buf); total_len -= (buf - start_buf); if (flush) { apr_status_t rv = flush(b, ctx); if (rv != APR_SUCCESS) { return rv; } } /* Now fall through into the case below to * allocate another heap bucket and copy the * rest of the array. (Note that i is not * reset to zero here; it holds the index * of the first vector element to be * written to the new bucket.) */ } } /* Allocate a new heap bucket, and copy the data into it. * The checks above ensure that the amount of data to be * written here is no larger than APR_BUCKET_BUFF_SIZE. */ buf = apr_bucket_alloc(APR_BUCKET_BUFF_SIZE, b->bucket_alloc); e = apr_bucket_heap_create(buf, APR_BUCKET_BUFF_SIZE, apr_bucket_free, b->bucket_alloc); for (; i < nvec; i++) { apr_size_t len = vec[i].iov_len; memcpy(buf, (const void *) vec[i].iov_base, len); buf += len; } e->length = total_len; APR_BRIGADE_INSERT_TAIL(b, e); return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_brigade_puts(apr_bucket_brigade *bb, apr_brigade_flush flush, void *ctx, const char *str) { apr_size_t len = strlen(str); apr_bucket *bkt = APR_BRIGADE_LAST(bb); if (!APR_BRIGADE_EMPTY(bb) && APR_BUCKET_IS_HEAP(bkt)) { /* If there is enough space available in a heap bucket * at the end of the brigade, copy the string directly * into the heap bucket */ apr_bucket_heap *h = bkt->data; apr_size_t bytes_avail = h->alloc_len - bkt->length; if (bytes_avail >= len) { char *buf = h->base + bkt->start + bkt->length; memcpy(buf, str, len); bkt->length += len; return APR_SUCCESS; } } /* If the string could not be copied into an existing heap * bucket, delegate the work to apr_brigade_write(), which * knows how to grow the brigade */ return apr_brigade_write(bb, flush, ctx, str, len); } APU_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, ...) { va_list va; apr_status_t rv; va_start(va, ctx); rv = apr_brigade_vputstrs(b, flush, ctx, va); va_end(va); return rv; } APU_DECLARE_NONSTD(apr_status_t) apr_brigade_printf(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const char *fmt, ...) { va_list ap; apr_status_t rv; va_start(ap, fmt); rv = apr_brigade_vprintf(b, flush, ctx, fmt, ap); va_end(ap); return rv; } struct brigade_vprintf_data_t { apr_vformatter_buff_t vbuff; apr_bucket_brigade *b; /* associated brigade */ apr_brigade_flush *flusher; /* flushing function */ void *ctx; char *cbuff; /* buffer to flush from */ }; static apr_status_t brigade_flush(apr_vformatter_buff_t *buff) { /* callback function passed to ap_vformatter to be * called when vformatter needs to buff and * buff.curpos > buff.endpos */ /* "downcast," have really passed a brigade_vprintf_data_t* */ struct brigade_vprintf_data_t *vd = (struct brigade_vprintf_data_t*)buff; apr_status_t res = APR_SUCCESS; res = apr_brigade_write(vd->b, *vd->flusher, vd->ctx, vd->cbuff, APR_BUCKET_BUFF_SIZE); if(res != APR_SUCCESS) { return -1; } vd->vbuff.curpos = vd->cbuff; vd->vbuff.endpos = vd->cbuff + APR_BUCKET_BUFF_SIZE; return res; } APU_DECLARE(apr_status_t) apr_brigade_vprintf(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const char *fmt, va_list va) { /* the cast, in order of appearance */ struct brigade_vprintf_data_t vd; char buf[APR_BUCKET_BUFF_SIZE]; apr_size_t written; vd.vbuff.curpos = buf; vd.vbuff.endpos = buf + APR_BUCKET_BUFF_SIZE; vd.b = b; vd.flusher = &flush; vd.ctx = ctx; vd.cbuff = buf; written = apr_vformatter(brigade_flush, &vd.vbuff, fmt, va); if (written == -1) { return -1; } /* tack on null terminator to remaining string */ *(vd.vbuff.curpos) = '\0'; /* write out what remains in the buffer */ return apr_brigade_write(b, flush, ctx, buf, vd.vbuff.curpos - buf); } /* A "safe" maximum bucket size, 1Gb */ #define MAX_BUCKET_SIZE (0x40000000) APU_DECLARE(apr_bucket *) apr_brigade_insert_file(apr_bucket_brigade *bb, apr_file_t *f, apr_off_t start, apr_off_t length, apr_pool_t *p) { apr_bucket *e; if (sizeof(apr_off_t) == sizeof(apr_size_t) || length < MAX_BUCKET_SIZE) { e = apr_bucket_file_create(f, start, (apr_size_t)length, p, bb->bucket_alloc); } else { /* Several buckets are needed. */ e = apr_bucket_file_create(f, start, MAX_BUCKET_SIZE, p, bb->bucket_alloc); while (length > MAX_BUCKET_SIZE) { apr_bucket *ce; apr_bucket_copy(e, &ce); APR_BRIGADE_INSERT_TAIL(bb, ce); e->start += MAX_BUCKET_SIZE; length -= MAX_BUCKET_SIZE; } e->length = (apr_size_t)length; /* Resize just the last bucket */ } APR_BRIGADE_INSERT_TAIL(bb, e); return e; }
001-log4cxx
trunk/src/apr-util/buckets/apr_brigade.c
C
asf20
22,130
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" static apr_status_t eos_bucket_read(apr_bucket *b, const char **str, apr_size_t *len, apr_read_type_e block) { *str = NULL; *len = 0; return APR_SUCCESS; } APU_DECLARE(apr_bucket *) apr_bucket_eos_make(apr_bucket *b) { b->length = 0; b->start = 0; b->data = NULL; b->type = &apr_bucket_type_eos; return b; } APU_DECLARE(apr_bucket *) apr_bucket_eos_create(apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_eos_make(b); } APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_eos = { "EOS", 5, APR_BUCKET_METADATA, apr_bucket_destroy_noop, eos_bucket_read, apr_bucket_setaside_noop, apr_bucket_split_notimpl, apr_bucket_simple_copy };
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_eos.c
C
asf20
1,574
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" static apr_status_t pipe_bucket_read(apr_bucket *a, const char **str, apr_size_t *len, apr_read_type_e block) { apr_file_t *p = a->data; char *buf; apr_status_t rv; apr_interval_time_t timeout; if (block == APR_NONBLOCK_READ) { apr_file_pipe_timeout_get(p, &timeout); apr_file_pipe_timeout_set(p, 0); } *str = NULL; *len = APR_BUCKET_BUFF_SIZE; buf = apr_bucket_alloc(*len, a->list); /* XXX: check for failure? */ rv = apr_file_read(p, buf, len); if (block == APR_NONBLOCK_READ) { apr_file_pipe_timeout_set(p, timeout); } if (rv != APR_SUCCESS && rv != APR_EOF) { apr_bucket_free(buf); return rv; } /* * If there's more to read we have to keep the rest of the pipe * for later. Otherwise, we'll close the pipe. * XXX: Note that more complicated bucket types that * refer to data not in memory and must therefore have a read() * function similar to this one should be wary of copying this * code because if they have a destroy function they probably * want to migrate the bucket's subordinate structure from the * old bucket to a raw new one and adjust it as appropriate, * rather than destroying the old one and creating a completely * new bucket. */ if (*len > 0) { apr_bucket_heap *h; /* Change the current bucket to refer to what we read */ a = apr_bucket_heap_make(a, buf, *len, apr_bucket_free); h = a->data; h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */ *str = buf; APR_BUCKET_INSERT_AFTER(a, apr_bucket_pipe_create(p, a->list)); } else { apr_bucket_free(buf); a = apr_bucket_immortal_make(a, "", 0); *str = a->data; if (rv == APR_EOF) { apr_file_close(p); } } return APR_SUCCESS; } APU_DECLARE(apr_bucket *) apr_bucket_pipe_make(apr_bucket *b, apr_file_t *p) { /* * A pipe is closed when the end is reached in pipe_bucket_read(). If * the pipe isn't read to the end (e.g., error path), the pipe will be * closed when its pool goes away. * * Note that typically the pipe is allocated from the request pool * so it will disappear when the request is finished. However the * core filter may decide to set aside the tail end of a CGI * response if the connection is pipelined. This turns out not to * be a problem because the core will have read to the end of the * stream so the bucket(s) that it sets aside will be the heap * buckets created by pipe_bucket_read() above. */ b->type = &apr_bucket_type_pipe; b->length = (apr_size_t)(-1); b->start = -1; b->data = p; return b; } APU_DECLARE(apr_bucket *) apr_bucket_pipe_create(apr_file_t *p, apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_pipe_make(b, p); } APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pipe = { "PIPE", 5, APR_BUCKET_DATA, apr_bucket_destroy_noop, pipe_bucket_read, apr_bucket_setaside_notimpl, apr_bucket_split_notimpl, apr_bucket_copy_notimpl };
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_pipe.c
C
asf20
4,087
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_buckets.h" static apr_status_t socket_bucket_read(apr_bucket *a, const char **str, apr_size_t *len, apr_read_type_e block) { apr_socket_t *p = a->data; char *buf; apr_status_t rv; apr_interval_time_t timeout; if (block == APR_NONBLOCK_READ) { apr_socket_timeout_get(p, &timeout); apr_socket_timeout_set(p, 0); } *str = NULL; *len = APR_BUCKET_BUFF_SIZE; buf = apr_bucket_alloc(*len, a->list); /* XXX: check for failure? */ rv = apr_socket_recv(p, buf, len); if (block == APR_NONBLOCK_READ) { apr_socket_timeout_set(p, timeout); } if (rv != APR_SUCCESS && rv != APR_EOF) { apr_bucket_free(buf); return rv; } /* * If there's more to read we have to keep the rest of the socket * for later. XXX: Note that more complicated bucket types that * refer to data not in memory and must therefore have a read() * function similar to this one should be wary of copying this * code because if they have a destroy function they probably * want to migrate the bucket's subordinate structure from the * old bucket to a raw new one and adjust it as appropriate, * rather than destroying the old one and creating a completely * new bucket. * * Even if there is nothing more to read, don't close the socket here * as we have to use it to send any response :) We could shut it * down for reading, but there is no benefit to doing so. */ if (*len > 0) { apr_bucket_heap *h; /* Change the current bucket to refer to what we read */ a = apr_bucket_heap_make(a, buf, *len, apr_bucket_free); h = a->data; h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */ *str = buf; APR_BUCKET_INSERT_AFTER(a, apr_bucket_socket_create(p, a->list)); } else { apr_bucket_free(buf); a = apr_bucket_immortal_make(a, "", 0); *str = a->data; } return APR_SUCCESS; } APU_DECLARE(apr_bucket *) apr_bucket_socket_make(apr_bucket *b, apr_socket_t *p) { /* * XXX: We rely on a cleanup on some pool or other to actually * destroy the socket. We should probably explicitly call apr to * destroy it instead. * * Note that typically the socket is allocated from the connection pool * so it will disappear when the connection is finished. */ b->type = &apr_bucket_type_socket; b->length = (apr_size_t)(-1); b->start = -1; b->data = p; return b; } APU_DECLARE(apr_bucket *) apr_bucket_socket_create(apr_socket_t *p, apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; return apr_bucket_socket_make(b, p); } APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_socket = { "SOCKET", 5, APR_BUCKET_DATA, apr_bucket_destroy_noop, socket_bucket_read, apr_bucket_setaside_notimpl, apr_bucket_split_notimpl, apr_bucket_copy_notimpl };
001-log4cxx
trunk/src/apr-util/buckets/apr_buckets_socket.c
C
asf20
3,855
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * apr_date.c: date parsing utility routines * These routines are (hopefully) platform independent. * * 27 Oct 1996 Roy Fielding * Extracted (with many modifications) from mod_proxy.c and * tested with over 50,000 randomly chosen valid date strings * and several hundred variations of invalid date strings. * */ #include "apr.h" #include "apr_lib.h" #define APR_WANT_STRFUNC #include "apr_want.h" #if APR_HAVE_STDLIB_H #include <stdlib.h> #endif #if APR_HAVE_CTYPE_H #include <ctype.h> #endif #include "apr_date.h" /* * Compare a string to a mask * Mask characters (arbitrary maximum is 256 characters, just in case): * @ - uppercase letter * $ - lowercase letter * & - hex digit * # - digit * ~ - digit or space * * - swallow remaining characters * <x> - exact match for any other character */ APU_DECLARE(int) apr_date_checkmask(const char *data, const char *mask) { int i; char d; for (i = 0; i < 256; i++) { d = data[i]; switch (mask[i]) { case '\0': return (d == '\0'); case '*': return 1; case '@': if (!apr_isupper(d)) return 0; break; case '$': if (!apr_islower(d)) return 0; break; case '#': if (!apr_isdigit(d)) return 0; break; case '&': if (!apr_isxdigit(d)) return 0; break; case '~': if ((d != ' ') && !apr_isdigit(d)) return 0; break; default: if (mask[i] != d) return 0; break; } } return 0; /* We only get here if mask is corrupted (exceeds 256) */ } /* * Parses an HTTP date in one of three standard forms: * * Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 * Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 * Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format * * and returns the apr_time_t number of microseconds since 1 Jan 1970 GMT, * or APR_DATE_BAD if this would be out of range or if the date is invalid. * * The restricted HTTP syntax is * * HTTP-date = rfc1123-date | rfc850-date | asctime-date * * rfc1123-date = wkday "," SP date1 SP time SP "GMT" * rfc850-date = weekday "," SP date2 SP time SP "GMT" * asctime-date = wkday SP date3 SP time SP 4DIGIT * * date1 = 2DIGIT SP month SP 4DIGIT * ; day month year (e.g., 02 Jun 1982) * date2 = 2DIGIT "-" month "-" 2DIGIT * ; day-month-year (e.g., 02-Jun-82) * date3 = month SP ( 2DIGIT | ( SP 1DIGIT )) * ; month day (e.g., Jun 2) * * time = 2DIGIT ":" 2DIGIT ":" 2DIGIT * ; 00:00:00 - 23:59:59 * * wkday = "Mon" | "Tue" | "Wed" * | "Thu" | "Fri" | "Sat" | "Sun" * * weekday = "Monday" | "Tuesday" | "Wednesday" * | "Thursday" | "Friday" | "Saturday" | "Sunday" * * month = "Jan" | "Feb" | "Mar" | "Apr" * | "May" | "Jun" | "Jul" | "Aug" * | "Sep" | "Oct" | "Nov" | "Dec" * * However, for the sake of robustness (and Netscapeness), we ignore the * weekday and anything after the time field (including the timezone). * * This routine is intended to be very fast; 10x faster than using sscanf. * * Originally from Andrew Daviel <andrew@vancouver-webpages.com>, 29 Jul 96 * but many changes since then. * */ APU_DECLARE(apr_time_t) apr_date_parse_http(const char *date) { apr_time_exp_t ds; apr_time_t result; int mint, mon; const char *monstr, *timstr; static const int months[12] = { ('J' << 16) | ('a' << 8) | 'n', ('F' << 16) | ('e' << 8) | 'b', ('M' << 16) | ('a' << 8) | 'r', ('A' << 16) | ('p' << 8) | 'r', ('M' << 16) | ('a' << 8) | 'y', ('J' << 16) | ('u' << 8) | 'n', ('J' << 16) | ('u' << 8) | 'l', ('A' << 16) | ('u' << 8) | 'g', ('S' << 16) | ('e' << 8) | 'p', ('O' << 16) | ('c' << 8) | 't', ('N' << 16) | ('o' << 8) | 'v', ('D' << 16) | ('e' << 8) | 'c'}; if (!date) return APR_DATE_BAD; while (*date && apr_isspace(*date)) /* Find first non-whitespace char */ ++date; if (*date == '\0') return APR_DATE_BAD; if ((date = strchr(date, ' ')) == NULL) /* Find space after weekday */ return APR_DATE_BAD; ++date; /* Now pointing to first char after space, which should be */ /* start of the actual date information for all 4 formats. */ if (apr_date_checkmask(date, "## @$$ #### ##:##:## *")) { /* RFC 1123 format with two days */ ds.tm_year = ((date[7] - '0') * 10 + (date[8] - '0') - 19) * 100; if (ds.tm_year < 0) return APR_DATE_BAD; ds.tm_year += ((date[9] - '0') * 10) + (date[10] - '0'); ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0'); monstr = date + 3; timstr = date + 12; } else if (apr_date_checkmask(date, "##-@$$-## ##:##:## *")) { /* RFC 850 format */ ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0'); if (ds.tm_year < 70) ds.tm_year += 100; ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0'); monstr = date + 3; timstr = date + 10; } else if (apr_date_checkmask(date, "@$$ ~# ##:##:## ####*")) { /* asctime format */ ds.tm_year = ((date[16] - '0') * 10 + (date[17] - '0') - 19) * 100; if (ds.tm_year < 0) return APR_DATE_BAD; ds.tm_year += ((date[18] - '0') * 10) + (date[19] - '0'); if (date[4] == ' ') ds.tm_mday = 0; else ds.tm_mday = (date[4] - '0') * 10; ds.tm_mday += (date[5] - '0'); monstr = date; timstr = date + 7; } else if (apr_date_checkmask(date, "# @$$ #### ##:##:## *")) { /* RFC 1123 format with one day */ ds.tm_year = ((date[6] - '0') * 10 + (date[7] - '0') - 19) * 100; if (ds.tm_year < 0) return APR_DATE_BAD; ds.tm_year += ((date[8] - '0') * 10) + (date[9] - '0'); ds.tm_mday = (date[0] - '0'); monstr = date + 2; timstr = date + 11; } else return APR_DATE_BAD; if (ds.tm_mday <= 0 || ds.tm_mday > 31) return APR_DATE_BAD; ds.tm_hour = ((timstr[0] - '0') * 10) + (timstr[1] - '0'); ds.tm_min = ((timstr[3] - '0') * 10) + (timstr[4] - '0'); ds.tm_sec = ((timstr[6] - '0') * 10) + (timstr[7] - '0'); if ((ds.tm_hour > 23) || (ds.tm_min > 59) || (ds.tm_sec > 61)) return APR_DATE_BAD; mint = (monstr[0] << 16) | (monstr[1] << 8) | monstr[2]; for (mon = 0; mon < 12; mon++) if (mint == months[mon]) break; if (mon == 12) return APR_DATE_BAD; if ((ds.tm_mday == 31) && (mon == 3 || mon == 5 || mon == 8 || mon == 10)) return APR_DATE_BAD; /* February gets special check for leapyear */ if ((mon == 1) && ((ds.tm_mday > 29) || ((ds.tm_mday == 29) && ((ds.tm_year & 3) || (((ds.tm_year % 100) == 0) && (((ds.tm_year % 400) != 100))))))) return APR_DATE_BAD; ds.tm_mon = mon; /* ap_mplode_time uses tm_usec and tm_gmtoff fields, but they haven't * been set yet. * It should be safe to just zero out these values. * tm_usec is the number of microseconds into the second. HTTP only * cares about second granularity. * tm_gmtoff is the number of seconds off of GMT the time is. By * definition all times going through this function are in GMT, so this * is zero. */ ds.tm_usec = 0; ds.tm_gmtoff = 0; if (apr_time_exp_get(&result, &ds) != APR_SUCCESS) return APR_DATE_BAD; return result; } /* * Parses a string resembling an RFC 822 date. This is meant to be * leinent in its parsing of dates. Hence, this will parse a wider * range of dates than apr_date_parse_http. * * The prominent mailer (or poster, if mailer is unknown) that has * been seen in the wild is included for the unknown formats. * * Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 * Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 * Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format * Sun, 6 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 * Sun, 06 Nov 94 08:49:37 GMT ; RFC 822 * Sun, 6 Nov 94 08:49:37 GMT ; RFC 822 * Sun, 06 Nov 94 08:49 GMT ; Unknown [drtr@ast.cam.ac.uk] * Sun, 6 Nov 94 08:49 GMT ; Unknown [drtr@ast.cam.ac.uk] * Sun, 06 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85] * Sun, 6 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85] * Mon, 7 Jan 2002 07:21:22 GMT ; Unknown [Postfix] * Sun, 06-Nov-1994 08:49:37 GMT ; RFC 850 with four digit years * */ #define TIMEPARSE(ds,hr10,hr1,min10,min1,sec10,sec1) \ { \ ds.tm_hour = ((hr10 - '0') * 10) + (hr1 - '0'); \ ds.tm_min = ((min10 - '0') * 10) + (min1 - '0'); \ ds.tm_sec = ((sec10 - '0') * 10) + (sec1 - '0'); \ } #define TIMEPARSE_STD(ds,timstr) \ { \ TIMEPARSE(ds, timstr[0],timstr[1], \ timstr[3],timstr[4], \ timstr[6],timstr[7]); \ } APU_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date) { apr_time_exp_t ds; apr_time_t result; int mint, mon; const char *monstr, *timstr, *gmtstr; static const int months[12] = { ('J' << 16) | ('a' << 8) | 'n', ('F' << 16) | ('e' << 8) | 'b', ('M' << 16) | ('a' << 8) | 'r', ('A' << 16) | ('p' << 8) | 'r', ('M' << 16) | ('a' << 8) | 'y', ('J' << 16) | ('u' << 8) | 'n', ('J' << 16) | ('u' << 8) | 'l', ('A' << 16) | ('u' << 8) | 'g', ('S' << 16) | ('e' << 8) | 'p', ('O' << 16) | ('c' << 8) | 't', ('N' << 16) | ('o' << 8) | 'v', ('D' << 16) | ('e' << 8) | 'c' }; if (!date) return APR_DATE_BAD; /* Not all dates have text months at the beginning. */ if (!apr_isdigit(date[0])) { while (*date && apr_isspace(*date)) /* Find first non-whitespace char */ ++date; if (*date == '\0') return APR_DATE_BAD; if ((date = strchr(date, ' ')) == NULL) /* Find space after weekday */ return APR_DATE_BAD; ++date; /* Now pointing to first char after space, which should be */ } /* start of the actual date information for all 11 formats. */ if (apr_date_checkmask(date, "## @$$ #### ##:##:## *")) { /* RFC 1123 format */ ds.tm_year = ((date[7] - '0') * 10 + (date[8] - '0') - 19) * 100; if (ds.tm_year < 0) return APR_DATE_BAD; ds.tm_year += ((date[9] - '0') * 10) + (date[10] - '0'); ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0'); monstr = date + 3; timstr = date + 12; gmtstr = date + 20; TIMEPARSE_STD(ds, timstr); } else if (apr_date_checkmask(date, "##-@$$-## ##:##:## *")) {/* RFC 850 format */ ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0'); if (ds.tm_year < 70) ds.tm_year += 100; ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0'); monstr = date + 3; timstr = date + 10; gmtstr = date + 19; TIMEPARSE_STD(ds, timstr); } else if (apr_date_checkmask(date, "@$$ ~# ##:##:## ####*")) { /* asctime format */ ds.tm_year = ((date[16] - '0') * 10 + (date[17] - '0') - 19) * 100; if (ds.tm_year < 0) return APR_DATE_BAD; ds.tm_year += ((date[18] - '0') * 10) + (date[19] - '0'); if (date[4] == ' ') ds.tm_mday = 0; else ds.tm_mday = (date[4] - '0') * 10; ds.tm_mday += (date[5] - '0'); monstr = date; timstr = date + 7; gmtstr = NULL; TIMEPARSE_STD(ds, timstr); } else if (apr_date_checkmask(date, "# @$$ #### ##:##:## *")) { /* RFC 1123 format*/ ds.tm_year = ((date[6] - '0') * 10 + (date[7] - '0') - 19) * 100; if (ds.tm_year < 0) return APR_DATE_BAD; ds.tm_year += ((date[8] - '0') * 10) + (date[9] - '0'); ds.tm_mday = (date[0] - '0'); monstr = date + 2; timstr = date + 11; gmtstr = date + 20; TIMEPARSE_STD(ds, timstr); } else if (apr_date_checkmask(date, "## @$$ ## ##:##:## *")) { /* This is the old RFC 1123 date format - many many years ago, people * used two-digit years. Oh, how foolish. */ ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0'); if (ds.tm_year < 70) ds.tm_year += 100; ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0'); monstr = date + 3; timstr = date + 10; gmtstr = date + 19; TIMEPARSE_STD(ds, timstr); } else if (apr_date_checkmask(date, "# @$$ ## ##:##:## *")) { /* This is the old RFC 1123 date format - many many years ago, people * used two-digit years. Oh, how foolish. */ ds.tm_year = ((date[6] - '0') * 10) + (date[7] - '0'); if (ds.tm_year < 70) ds.tm_year += 100; ds.tm_mday = (date[0] - '0'); monstr = date + 2; timstr = date + 9; gmtstr = date + 18; TIMEPARSE_STD(ds, timstr); } else if (apr_date_checkmask(date, "## @$$ ## ##:## *")) { /* Loser format. This is quite bogus. */ ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0'); if (ds.tm_year < 70) ds.tm_year += 100; ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0'); monstr = date + 3; timstr = date + 10; gmtstr = NULL; TIMEPARSE(ds, timstr[0],timstr[1], timstr[3],timstr[4], '0','0'); } else if (apr_date_checkmask(date, "# @$$ ## ##:## *")) { /* Loser format. This is quite bogus. */ ds.tm_year = ((date[6] - '0') * 10) + (date[7] - '0'); if (ds.tm_year < 70) ds.tm_year += 100; ds.tm_mday = (date[0] - '0'); monstr = date + 2; timstr = date + 9; gmtstr = NULL; TIMEPARSE(ds, timstr[0],timstr[1], timstr[3],timstr[4], '0','0'); } else if (apr_date_checkmask(date, "## @$$ ## #:##:## *")) { /* Loser format. This is quite bogus. */ ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0'); if (ds.tm_year < 70) ds.tm_year += 100; ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0'); monstr = date + 3; timstr = date + 9; gmtstr = date + 18; TIMEPARSE(ds, '0',timstr[1], timstr[3],timstr[4], timstr[6],timstr[7]); } else if (apr_date_checkmask(date, "# @$$ ## #:##:## *")) { /* Loser format. This is quite bogus. */ ds.tm_year = ((date[6] - '0') * 10) + (date[7] - '0'); if (ds.tm_year < 70) ds.tm_year += 100; ds.tm_mday = (date[0] - '0'); monstr = date + 2; timstr = date + 8; gmtstr = date + 17; TIMEPARSE(ds, '0',timstr[1], timstr[3],timstr[4], timstr[6],timstr[7]); } else if (apr_date_checkmask(date, " # @$$ #### ##:##:## *")) { /* RFC 1123 format with a space instead of a leading zero. */ ds.tm_year = ((date[7] - '0') * 10 + (date[8] - '0') - 19) * 100; if (ds.tm_year < 0) return APR_DATE_BAD; ds.tm_year += ((date[9] - '0') * 10) + (date[10] - '0'); ds.tm_mday = (date[1] - '0'); monstr = date + 3; timstr = date + 12; gmtstr = date + 20; TIMEPARSE_STD(ds, timstr); } else if (apr_date_checkmask(date, "##-@$$-#### ##:##:## *")) { /* RFC 1123 with dashes instead of spaces between date/month/year * This also looks like RFC 850 with four digit years. */ ds.tm_year = ((date[7] - '0') * 10 + (date[8] - '0') - 19) * 100; if (ds.tm_year < 0) return APR_DATE_BAD; ds.tm_year += ((date[9] - '0') * 10) + (date[10] - '0'); ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0'); monstr = date + 3; timstr = date + 12; gmtstr = date + 21; TIMEPARSE_STD(ds, timstr); } else return APR_DATE_BAD; if (ds.tm_mday <= 0 || ds.tm_mday > 31) return APR_DATE_BAD; if ((ds.tm_hour > 23) || (ds.tm_min > 59) || (ds.tm_sec > 61)) return APR_DATE_BAD; mint = (monstr[0] << 16) | (monstr[1] << 8) | monstr[2]; for (mon = 0; mon < 12; mon++) if (mint == months[mon]) break; if (mon == 12) return APR_DATE_BAD; if ((ds.tm_mday == 31) && (mon == 3 || mon == 5 || mon == 8 || mon == 10)) return APR_DATE_BAD; /* February gets special check for leapyear */ if ((mon == 1) && ((ds.tm_mday > 29) || ((ds.tm_mday == 29) && ((ds.tm_year & 3) || (((ds.tm_year % 100) == 0) && (((ds.tm_year % 400) != 100))))))) return APR_DATE_BAD; ds.tm_mon = mon; /* tm_gmtoff is the number of seconds off of GMT the time is. * * We only currently support: [+-]ZZZZ where Z is the offset in * hours from GMT. * * If there is any confusion, tm_gmtoff will remain 0. */ ds.tm_gmtoff = 0; if (gmtstr && *gmtstr != '\0') { /* Do we have a GMT? */ if (*(++gmtstr) != '\0') { int offset; switch (*(gmtstr++)) { case '-': offset = atoi(gmtstr); ds.tm_gmtoff -= (offset / 100) * 60 * 60; ds.tm_gmtoff -= (offset % 100) * 60; break; case '+': offset = atoi(gmtstr); ds.tm_gmtoff += (offset / 100) * 60 * 60; ds.tm_gmtoff += (offset % 100) * 60; break; } } } /* apr_time_exp_get uses tm_usec field, but it hasn't been set yet. * It should be safe to just zero out this value. * tm_usec is the number of microseconds into the second. HTTP only * cares about second granularity. */ ds.tm_usec = 0; if (apr_time_exp_gmt_get(&result, &ds) != APR_SUCCESS) return APR_DATE_BAD; return result; }
001-log4cxx
trunk/src/apr-util/misc/apr_date.c
C
asf20
19,474
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_general.h" #include "apr_rmm.h" #include "apr_errno.h" #include "apr_lib.h" #include "apr_strings.h" /* The RMM region is made up of two doubly-linked-list of blocks; the * list of used blocks, and the list of free blocks (either list may * be empty). The base pointer, rmm->base, points at the beginning of * the shmem region in use. Each block is addressable by an * apr_rmm_off_t value, which represents the offset from the base * pointer. The term "address" is used here to mean such a value; an * "offset from rmm->base". * * The RMM region contains exactly one "rmm_hdr_block_t" structure, * the "header block", which is always stored at the base pointer. * The firstused field in this structure is the address of the first * block in the "used blocks" list; the firstfree field is the address * of the first block in the "free blocks" list. * * Each block is prefixed by an "rmm_block_t" structure, followed by * the caller-usable region represented by the block. The next and * prev fields of the structure are zero if the block is at the end or * beginning of the linked-list respectively, or otherwise hold the * address of the next and previous blocks in the list. ("address 0", * i.e. rmm->base is *not* a valid address for a block, since the * header block is always stored at that address). * * At creation, the RMM region is initialized to hold a single block * on the free list representing the entire available shm segment * (minus header block); subsequent allocation and deallocation of * blocks involves splitting blocks and coalescing adjacent blocks, * and switching them between the free and used lists as * appropriate. */ typedef struct rmm_block_t { apr_size_t size; apr_rmm_off_t prev; apr_rmm_off_t next; } rmm_block_t; /* Always at our apr_rmm_off(0): */ typedef struct rmm_hdr_block_t { apr_size_t abssize; apr_rmm_off_t /* rmm_block_t */ firstused; apr_rmm_off_t /* rmm_block_t */ firstfree; } rmm_hdr_block_t; #define RMM_HDR_BLOCK_SIZE (APR_ALIGN_DEFAULT(sizeof(rmm_hdr_block_t))) #define RMM_BLOCK_SIZE (APR_ALIGN_DEFAULT(sizeof(rmm_block_t))) struct apr_rmm_t { apr_pool_t *p; rmm_hdr_block_t *base; apr_size_t size; apr_anylock_t lock; }; static apr_rmm_off_t find_block_by_offset(apr_rmm_t *rmm, apr_rmm_off_t next, apr_rmm_off_t find, int includes) { apr_rmm_off_t prev = 0; while (next) { struct rmm_block_t *blk = (rmm_block_t*)((char*)rmm->base + next); if (find == next) return next; /* Overshot? */ if (find < next) return includes ? prev : 0; prev = next; next = blk->next; } return includes ? prev : 0; } static apr_rmm_off_t find_block_of_size(apr_rmm_t *rmm, apr_size_t size) { apr_rmm_off_t next = rmm->base->firstfree; apr_rmm_off_t best = 0; apr_rmm_off_t bestsize = 0; while (next) { struct rmm_block_t *blk = (rmm_block_t*)((char*)rmm->base + next); if (blk->size == size) return next; if (blk->size >= size) { /* XXX: sub optimal algorithm * We need the most thorough best-fit logic, since we can * never grow our rmm, we are SOL when we hit the wall. */ if (!bestsize || (blk->size < bestsize)) { bestsize = blk->size; best = next; } } next = blk->next; } if (bestsize > RMM_BLOCK_SIZE + size) { struct rmm_block_t *blk = (rmm_block_t*)((char*)rmm->base + best); struct rmm_block_t *new = (rmm_block_t*)((char*)rmm->base + best + size); new->size = blk->size - size; new->next = blk->next; new->prev = best; blk->size = size; blk->next = best + size; if (new->next) { blk = (rmm_block_t*)((char*)rmm->base + new->next); blk->prev = best + size; } } return best; } static void move_block(apr_rmm_t *rmm, apr_rmm_off_t this, int free) { struct rmm_block_t *blk = (rmm_block_t*)((char*)rmm->base + this); /* close the gap */ if (blk->prev) { struct rmm_block_t *prev = (rmm_block_t*)((char*)rmm->base + blk->prev); prev->next = blk->next; } else { if (free) { rmm->base->firstused = blk->next; } else { rmm->base->firstfree = blk->next; } } if (blk->next) { struct rmm_block_t *next = (rmm_block_t*)((char*)rmm->base + blk->next); next->prev = blk->prev; } /* now find it in the other list, pushing it to the head if required */ if (free) { blk->prev = find_block_by_offset(rmm, rmm->base->firstfree, this, 1); if (!blk->prev) { blk->next = rmm->base->firstfree; rmm->base->firstfree = this; } } else { blk->prev = find_block_by_offset(rmm, rmm->base->firstused, this, 1); if (!blk->prev) { blk->next = rmm->base->firstused; rmm->base->firstused = this; } } /* and open it up */ if (blk->prev) { struct rmm_block_t *prev = (rmm_block_t*)((char*)rmm->base + blk->prev); if (free && (blk->prev + prev->size == this)) { /* Collapse us into our predecessor */ prev->size += blk->size; this = blk->prev; blk = prev; } else { blk->next = prev->next; prev->next = this; } } if (blk->next) { struct rmm_block_t *next = (rmm_block_t*)((char*)rmm->base + blk->next); if (free && (this + blk->size == blk->next)) { /* Collapse us into our successor */ blk->size += next->size; blk->next = next->next; if (blk->next) { next = (rmm_block_t*)((char*)rmm->base + blk->next); next->prev = this; } } else { next->prev = this; } } } APU_DECLARE(apr_status_t) apr_rmm_init(apr_rmm_t **rmm, apr_anylock_t *lock, void *base, apr_size_t size, apr_pool_t *p) { apr_status_t rv; rmm_block_t *blk; apr_anylock_t nulllock; if (!lock) { nulllock.type = apr_anylock_none; nulllock.lock.pm = NULL; lock = &nulllock; } if ((rv = APR_ANYLOCK_LOCK(lock)) != APR_SUCCESS) return rv; (*rmm) = (apr_rmm_t *)apr_pcalloc(p, sizeof(apr_rmm_t)); (*rmm)->p = p; (*rmm)->base = base; (*rmm)->size = size; (*rmm)->lock = *lock; (*rmm)->base->abssize = size; (*rmm)->base->firstused = 0; (*rmm)->base->firstfree = RMM_HDR_BLOCK_SIZE; blk = (rmm_block_t *)((char*)base + (*rmm)->base->firstfree); blk->size = size - (*rmm)->base->firstfree; blk->prev = 0; blk->next = 0; return APR_ANYLOCK_UNLOCK(lock); } APU_DECLARE(apr_status_t) apr_rmm_destroy(apr_rmm_t *rmm) { apr_status_t rv; rmm_block_t *blk; if ((rv = APR_ANYLOCK_LOCK(&rmm->lock)) != APR_SUCCESS) { return rv; } /* Blast it all --- no going back :) */ if (rmm->base->firstused) { apr_rmm_off_t this = rmm->base->firstused; do { blk = (rmm_block_t *)((char*)rmm->base + this); this = blk->next; blk->next = blk->prev = 0; } while (this); rmm->base->firstused = 0; } if (rmm->base->firstfree) { apr_rmm_off_t this = rmm->base->firstfree; do { blk = (rmm_block_t *)((char*)rmm->base + this); this = blk->next; blk->next = blk->prev = 0; } while (this); rmm->base->firstfree = 0; } rmm->base->abssize = 0; rmm->size = 0; return APR_ANYLOCK_UNLOCK(&rmm->lock); } APU_DECLARE(apr_status_t) apr_rmm_attach(apr_rmm_t **rmm, apr_anylock_t *lock, void *base, apr_pool_t *p) { apr_anylock_t nulllock; if (!lock) { nulllock.type = apr_anylock_none; nulllock.lock.pm = NULL; lock = &nulllock; } /* sanity would be good here */ (*rmm) = (apr_rmm_t *)apr_pcalloc(p, sizeof(apr_rmm_t)); (*rmm)->p = p; (*rmm)->base = base; (*rmm)->size = (*rmm)->base->abssize; (*rmm)->lock = *lock; return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_rmm_detach(apr_rmm_t *rmm) { /* A noop until we introduce locked/refcounts */ return APR_SUCCESS; } APU_DECLARE(apr_rmm_off_t) apr_rmm_malloc(apr_rmm_t *rmm, apr_size_t reqsize) { apr_rmm_off_t this; reqsize = APR_ALIGN_DEFAULT(reqsize) + RMM_BLOCK_SIZE; APR_ANYLOCK_LOCK(&rmm->lock); this = find_block_of_size(rmm, reqsize); if (this) { move_block(rmm, this, 0); this += RMM_BLOCK_SIZE; } APR_ANYLOCK_UNLOCK(&rmm->lock); return this; } APU_DECLARE(apr_rmm_off_t) apr_rmm_calloc(apr_rmm_t *rmm, apr_size_t reqsize) { apr_rmm_off_t this; reqsize = APR_ALIGN_DEFAULT(reqsize) + RMM_BLOCK_SIZE; APR_ANYLOCK_LOCK(&rmm->lock); this = find_block_of_size(rmm, reqsize); if (this) { move_block(rmm, this, 0); this += RMM_BLOCK_SIZE; memset((char*)rmm->base + this, 0, reqsize - RMM_BLOCK_SIZE); } APR_ANYLOCK_UNLOCK(&rmm->lock); return this; } APU_DECLARE(apr_rmm_off_t) apr_rmm_realloc(apr_rmm_t *rmm, void *entity, apr_size_t reqsize) { apr_rmm_off_t this; apr_rmm_off_t old; struct rmm_block_t *blk; apr_size_t oldsize; if (!entity) { return apr_rmm_malloc(rmm, reqsize); } reqsize = APR_ALIGN_DEFAULT(reqsize); old = apr_rmm_offset_get(rmm, entity); if ((this = apr_rmm_malloc(rmm, reqsize)) == 0) { return 0; } blk = (rmm_block_t*)((char*)rmm->base + old - RMM_BLOCK_SIZE); oldsize = blk->size; memcpy(apr_rmm_addr_get(rmm, this), apr_rmm_addr_get(rmm, old), oldsize < reqsize ? oldsize : reqsize); apr_rmm_free(rmm, old); return this; } APU_DECLARE(apr_status_t) apr_rmm_free(apr_rmm_t *rmm, apr_rmm_off_t this) { apr_status_t rv; struct rmm_block_t *blk; /* A little sanity check is always healthy, especially here. * If we really cared, we could make this compile-time */ if (this < RMM_HDR_BLOCK_SIZE + RMM_BLOCK_SIZE) { return APR_EINVAL; } this -= RMM_BLOCK_SIZE; blk = (rmm_block_t*)((char*)rmm->base + this); if ((rv = APR_ANYLOCK_LOCK(&rmm->lock)) != APR_SUCCESS) { return rv; } if (blk->prev) { struct rmm_block_t *prev = (rmm_block_t*)((char*)rmm->base + blk->prev); if (prev->next != this) { APR_ANYLOCK_UNLOCK(&rmm->lock); return APR_EINVAL; } } else { if (rmm->base->firstused != this) { APR_ANYLOCK_UNLOCK(&rmm->lock); return APR_EINVAL; } } if (blk->next) { struct rmm_block_t *next = (rmm_block_t*)((char*)rmm->base + blk->next); if (next->prev != this) { APR_ANYLOCK_UNLOCK(&rmm->lock); return APR_EINVAL; } } /* Ok, it remained [apparently] sane, so unlink it */ move_block(rmm, this, 1); return APR_ANYLOCK_UNLOCK(&rmm->lock); } APU_DECLARE(void *) apr_rmm_addr_get(apr_rmm_t *rmm, apr_rmm_off_t entity) { /* debug-sanity checking here would be good */ return (void*)((char*)rmm->base + entity); } APU_DECLARE(apr_rmm_off_t) apr_rmm_offset_get(apr_rmm_t *rmm, void* entity) { /* debug, or always, sanity checking here would be good * since the primitive is apr_rmm_off_t, I don't mind penalizing * inverse conversions for safety, unless someone can prove that * there is no choice in some cases. */ return ((char*)entity - (char*)rmm->base); } APU_DECLARE(apr_size_t) apr_rmm_overhead_get(int n) { /* overhead per block is at most APR_ALIGN_DEFAULT(1) wasted bytes * for alignment overhead, plus the size of the rmm_block_t * structure. */ return RMM_HDR_BLOCK_SIZE + n * (RMM_BLOCK_SIZE + APR_ALIGN_DEFAULT(1)); }
001-log4cxx
trunk/src/apr-util/misc/apr_rmm.c
C
asf20
13,008
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr.h" #if APR_HAVE_STDIO_H #include <stdio.h> #endif #if APR_HAVE_STDLIB_H #include <stdlib.h> #endif #if APR_HAVE_UNISTD_H #include <unistd.h> #endif #include "apu.h" #include "apr_portable.h" #include "apr_thread_mutex.h" #include "apr_thread_cond.h" #include "apr_errno.h" #include "apr_queue.h" #if APR_HAS_THREADS /* * define this to get debug messages * #define QUEUE_DEBUG */ struct apr_queue_t { void **data; unsigned int nelts; /**< # elements */ unsigned int in; /**< next empty location */ unsigned int out; /**< next filled location */ unsigned int bounds;/**< max size of queue */ unsigned int full_waiters; unsigned int empty_waiters; apr_thread_mutex_t *one_big_mutex; apr_thread_cond_t *not_empty; apr_thread_cond_t *not_full; int terminated; }; #ifdef QUEUE_DEBUG static void Q_DBG(char*msg, apr_queue_t *q) { fprintf(stderr, "%ld\t#%d in %d out %d\t%s\n", apr_os_thread_current(), q->nelts, q->in, q->out, msg ); } #else #define Q_DBG(x,y) #endif /** * Detects when the apr_queue_t is full. This utility function is expected * to be called from within critical sections, and is not threadsafe. */ #define apr_queue_full(queue) ((queue)->nelts == (queue)->bounds) /** * Detects when the apr_queue_t is empty. This utility function is expected * to be called from within critical sections, and is not threadsafe. */ #define apr_queue_empty(queue) ((queue)->nelts == 0) /** * Callback routine that is called to destroy this * apr_queue_t when its pool is destroyed. */ static apr_status_t queue_destroy(void *data) { apr_queue_t *queue = data; /* Ignore errors here, we can't do anything about them anyway. */ apr_thread_cond_destroy(queue->not_empty); apr_thread_cond_destroy(queue->not_full); apr_thread_mutex_destroy(queue->one_big_mutex); return APR_SUCCESS; } /** * Initialize the apr_queue_t. */ APU_DECLARE(apr_status_t) apr_queue_create(apr_queue_t **q, unsigned int queue_capacity, apr_pool_t *a) { apr_status_t rv; apr_queue_t *queue; queue = apr_palloc(a, sizeof(apr_queue_t)); *q = queue; /* nested doesn't work ;( */ rv = apr_thread_mutex_create(&queue->one_big_mutex, APR_THREAD_MUTEX_UNNESTED, a); if (rv != APR_SUCCESS) { return rv; } rv = apr_thread_cond_create(&queue->not_empty, a); if (rv != APR_SUCCESS) { return rv; } rv = apr_thread_cond_create(&queue->not_full, a); if (rv != APR_SUCCESS) { return rv; } /* Set all the data in the queue to NULL */ queue->data = apr_pcalloc(a, queue_capacity * sizeof(void*)); queue->bounds = queue_capacity; queue->nelts = 0; queue->in = 0; queue->out = 0; queue->terminated = 0; queue->full_waiters = 0; queue->empty_waiters = 0; apr_pool_cleanup_register(a, queue, queue_destroy, apr_pool_cleanup_null); return APR_SUCCESS; } /** * Push new data onto the queue. Blocks if the queue is full. Once * the push operation has completed, it signals other threads waiting * in apr_queue_pop() that they may continue consuming sockets. */ APU_DECLARE(apr_status_t) apr_queue_push(apr_queue_t *queue, void *data) { apr_status_t rv; if (queue->terminated) { return APR_EOF; /* no more elements ever again */ } rv = apr_thread_mutex_lock(queue->one_big_mutex); if (rv != APR_SUCCESS) { return rv; } if (apr_queue_full(queue)) { if (!queue->terminated) { queue->full_waiters++; rv = apr_thread_cond_wait(queue->not_full, queue->one_big_mutex); queue->full_waiters--; if (rv != APR_SUCCESS) { apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } } /* If we wake up and it's still empty, then we were interrupted */ if (apr_queue_full(queue)) { Q_DBG("queue full (intr)", queue); rv = apr_thread_mutex_unlock(queue->one_big_mutex); if (rv != APR_SUCCESS) { return rv; } if (queue->terminated) { return APR_EOF; /* no more elements ever again */ } else { return APR_EINTR; } } } queue->data[queue->in] = data; queue->in = (queue->in + 1) % queue->bounds; queue->nelts++; if (queue->empty_waiters) { Q_DBG("sig !empty", queue); rv = apr_thread_cond_signal(queue->not_empty); if (rv != APR_SUCCESS) { apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } } rv = apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } /** * Push new data onto the queue. Blocks if the queue is full. Once * the push operation has completed, it signals other threads waiting * in apr_queue_pop() that they may continue consuming sockets. */ APU_DECLARE(apr_status_t) apr_queue_trypush(apr_queue_t *queue, void *data) { apr_status_t rv; if (queue->terminated) { return APR_EOF; /* no more elements ever again */ } rv = apr_thread_mutex_lock(queue->one_big_mutex); if (rv != APR_SUCCESS) { return rv; } if (apr_queue_full(queue)) { rv = apr_thread_mutex_unlock(queue->one_big_mutex); return APR_EAGAIN; } queue->data[queue->in] = data; queue->in = (queue->in + 1) % queue->bounds; queue->nelts++; if (queue->empty_waiters) { Q_DBG("sig !empty", queue); rv = apr_thread_cond_signal(queue->not_empty); if (rv != APR_SUCCESS) { apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } } rv = apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } /** * not thread safe */ APU_DECLARE(unsigned int) apr_queue_size(apr_queue_t *queue) { return queue->nelts; } /** * Retrieves the next item from the queue. If there are no * items available, it will block until one becomes available. * Once retrieved, the item is placed into the address specified by * 'data'. */ APU_DECLARE(apr_status_t) apr_queue_pop(apr_queue_t *queue, void **data) { apr_status_t rv; if (queue->terminated) { return APR_EOF; /* no more elements ever again */ } rv = apr_thread_mutex_lock(queue->one_big_mutex); if (rv != APR_SUCCESS) { return rv; } /* Keep waiting until we wake up and find that the queue is not empty. */ if (apr_queue_empty(queue)) { if (!queue->terminated) { queue->empty_waiters++; rv = apr_thread_cond_wait(queue->not_empty, queue->one_big_mutex); queue->empty_waiters--; if (rv != APR_SUCCESS) { apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } } /* If we wake up and it's still empty, then we were interrupted */ if (apr_queue_empty(queue)) { Q_DBG("queue empty (intr)", queue); rv = apr_thread_mutex_unlock(queue->one_big_mutex); if (rv != APR_SUCCESS) { return rv; } if (queue->terminated) { return APR_EOF; /* no more elements ever again */ } else { return APR_EINTR; } } } *data = queue->data[queue->out]; queue->nelts--; queue->out = (queue->out + 1) % queue->bounds; if (queue->full_waiters) { Q_DBG("signal !full", queue); rv = apr_thread_cond_signal(queue->not_full); if (rv != APR_SUCCESS) { apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } } rv = apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } /** * Retrieves the next item from the queue. If there are no * items available, return APR_EAGAIN. Once retrieved, * the item is placed into the address specified by 'data'. */ APU_DECLARE(apr_status_t) apr_queue_trypop(apr_queue_t *queue, void **data) { apr_status_t rv; if (queue->terminated) { return APR_EOF; /* no more elements ever again */ } rv = apr_thread_mutex_lock(queue->one_big_mutex); if (rv != APR_SUCCESS) { return rv; } if (apr_queue_empty(queue)) { rv = apr_thread_mutex_unlock(queue->one_big_mutex); return APR_EAGAIN; } *data = queue->data[queue->out]; queue->nelts--; queue->out = (queue->out + 1) % queue->bounds; if (queue->full_waiters) { Q_DBG("signal !full", queue); rv = apr_thread_cond_signal(queue->not_full); if (rv != APR_SUCCESS) { apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } } rv = apr_thread_mutex_unlock(queue->one_big_mutex); return rv; } APU_DECLARE(apr_status_t) apr_queue_interrupt_all(apr_queue_t *queue) { apr_status_t rv; Q_DBG("intr all", queue); if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) { return rv; } apr_thread_cond_broadcast(queue->not_empty); apr_thread_cond_broadcast(queue->not_full); if ((rv = apr_thread_mutex_unlock(queue->one_big_mutex)) != APR_SUCCESS) { return rv; } return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_queue_term(apr_queue_t *queue) { apr_status_t rv; if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) { return rv; } /* we must hold one_big_mutex when setting this... otherwise, * we could end up setting it and waking everybody up just after a * would-be popper checks it but right before they block */ queue->terminated = 1; if ((rv = apr_thread_mutex_unlock(queue->one_big_mutex)) != APR_SUCCESS) { return rv; } return apr_queue_interrupt_all(queue); } #endif /* APR_HAS_THREADS */
001-log4cxx
trunk/src/apr-util/misc/apr_queue.c
C
asf20
10,930
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <assert.h> #include "apu.h" #include "apr_reslist.h" #include "apr_errno.h" #include "apr_strings.h" #include "apr_thread_mutex.h" #include "apr_thread_cond.h" #include "apr_ring.h" #if APR_HAS_THREADS /** * A single resource element. */ struct apr_res_t { apr_time_t freed; void *opaque; APR_RING_ENTRY(apr_res_t) link; }; typedef struct apr_res_t apr_res_t; /** * A ring of resources representing the list of available resources. */ APR_RING_HEAD(apr_resring_t, apr_res_t); typedef struct apr_resring_t apr_resring_t; struct apr_reslist_t { apr_pool_t *pool; /* the pool used in constructor and destructor calls */ int ntotal; /* total number of resources managed by this list */ int nidle; /* number of available resources */ int min; /* desired minimum number of available resources */ int smax; /* soft maximum on the total number of resources */ int hmax; /* hard maximum on the total number of resources */ apr_interval_time_t ttl; /* TTL when we have too many resources */ apr_interval_time_t timeout; /* Timeout for waiting on resource */ apr_reslist_constructor constructor; apr_reslist_destructor destructor; void *params; /* opaque data passed to constructor and destructor calls */ apr_resring_t avail_list; apr_resring_t free_list; apr_thread_mutex_t *listlock; apr_thread_cond_t *avail; }; /** * Grab a resource from the front of the resource list. * Assumes: that the reslist is locked. */ static apr_res_t *pop_resource(apr_reslist_t *reslist) { apr_res_t *res; res = APR_RING_FIRST(&reslist->avail_list); APR_RING_REMOVE(res, link); reslist->nidle--; return res; } /** * Add a resource to the end of the list, set the time at which * it was added to the list. * Assumes: that the reslist is locked. */ static void push_resource(apr_reslist_t *reslist, apr_res_t *resource) { APR_RING_INSERT_TAIL(&reslist->avail_list, resource, apr_res_t, link); resource->freed = apr_time_now(); reslist->nidle++; } /** * Get an resource container from the free list or create a new one. */ static apr_res_t *get_container(apr_reslist_t *reslist) { apr_res_t *res; if (!APR_RING_EMPTY(&reslist->free_list, apr_res_t, link)) { res = APR_RING_FIRST(&reslist->free_list); APR_RING_REMOVE(res, link); } else res = apr_pcalloc(reslist->pool, sizeof(*res)); return res; } /** * Free up a resource container by placing it on the free list. */ static void free_container(apr_reslist_t *reslist, apr_res_t *container) { APR_RING_INSERT_TAIL(&reslist->free_list, container, apr_res_t, link); } /** * Create a new resource and return it. * Assumes: that the reslist is locked. */ static apr_status_t create_resource(apr_reslist_t *reslist, apr_res_t **ret_res) { apr_status_t rv; apr_res_t *res; res = get_container(reslist); rv = reslist->constructor(&res->opaque, reslist->params, reslist->pool); *ret_res = res; return rv; } /** * Destroy a single idle resource. * Assumes: that the reslist is locked. */ static apr_status_t destroy_resource(apr_reslist_t *reslist, apr_res_t *res) { return reslist->destructor(res->opaque, reslist->params, reslist->pool); } static apr_status_t reslist_cleanup(void *data_) { apr_status_t rv; apr_reslist_t *rl = data_; apr_res_t *res; apr_thread_mutex_lock(rl->listlock); while (rl->nidle > 0) { res = pop_resource(rl); rl->ntotal--; rv = destroy_resource(rl, res); if (rv != APR_SUCCESS) { return rv; } free_container(rl, res); } assert(rl->nidle == 0); assert(rl->ntotal == 0); apr_thread_mutex_destroy(rl->listlock); apr_thread_cond_destroy(rl->avail); return APR_SUCCESS; } /** * Perform routine maintenance on the resource list. This call * may instantiate new resources or expire old resources. */ static apr_status_t reslist_maint(apr_reslist_t *reslist) { apr_time_t now; apr_status_t rv; apr_res_t *res; int created_one = 0; apr_thread_mutex_lock(reslist->listlock); /* Check if we need to create more resources, and if we are allowed to. */ while (reslist->nidle < reslist->min && reslist->ntotal <= reslist->hmax) { /* Create the resource */ rv = create_resource(reslist, &res); if (rv != APR_SUCCESS) { free_container(reslist, res); apr_thread_mutex_unlock(reslist->listlock); return rv; } /* Add it to the list */ push_resource(reslist, res); /* Update our counters */ reslist->ntotal++; /* If someone is waiting on that guy, wake them up. */ rv = apr_thread_cond_signal(reslist->avail); if (rv != APR_SUCCESS) { apr_thread_mutex_unlock(reslist->listlock); return rv; } created_one++; } /* We don't need to see if we're over the max if we were under it before */ if (created_one) { apr_thread_mutex_unlock(reslist->listlock); return APR_SUCCESS; } /* Check if we need to expire old resources */ now = apr_time_now(); while (reslist->nidle > reslist->smax && reslist->nidle > 0) { /* Peak at the first resource in the list */ res = APR_RING_FIRST(&reslist->avail_list); /* See if the oldest entry should be expired */ if (now - res->freed < reslist->ttl) { /* If this entry is too young, none of the others * will be ready to be expired either, so we are done. */ break; } res = pop_resource(reslist); reslist->ntotal--; rv = destroy_resource(reslist, res); free_container(reslist, res); if (rv != APR_SUCCESS) { apr_thread_mutex_unlock(reslist->listlock); return rv; } } apr_thread_mutex_unlock(reslist->listlock); return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_reslist_create(apr_reslist_t **reslist, int min, int smax, int hmax, apr_interval_time_t ttl, apr_reslist_constructor con, apr_reslist_destructor de, void *params, apr_pool_t *pool) { apr_status_t rv; apr_reslist_t *rl; /* Do some sanity checks so we don't thrash around in the * maintenance routine later. */ if (min > smax || min > hmax || smax > hmax || ttl < 0) { return APR_EINVAL; } rl = apr_pcalloc(pool, sizeof(*rl)); rl->pool = pool; rl->min = min; rl->smax = smax; rl->hmax = hmax; rl->ttl = ttl; rl->constructor = con; rl->destructor = de; rl->params = params; APR_RING_INIT(&rl->avail_list, apr_res_t, link); APR_RING_INIT(&rl->free_list, apr_res_t, link); rv = apr_thread_mutex_create(&rl->listlock, APR_THREAD_MUTEX_DEFAULT, pool); if (rv != APR_SUCCESS) { return rv; } rv = apr_thread_cond_create(&rl->avail, pool); if (rv != APR_SUCCESS) { return rv; } rv = reslist_maint(rl); if (rv != APR_SUCCESS) { return rv; } apr_pool_cleanup_register(rl->pool, rl, reslist_cleanup, apr_pool_cleanup_null); *reslist = rl; return APR_SUCCESS; } APU_DECLARE(apr_status_t) apr_reslist_destroy(apr_reslist_t *reslist) { return apr_pool_cleanup_run(reslist->pool, reslist, reslist_cleanup); } APU_DECLARE(apr_status_t) apr_reslist_acquire(apr_reslist_t *reslist, void **resource) { apr_status_t rv; apr_res_t *res; apr_thread_mutex_lock(reslist->listlock); /* If there are idle resources on the available list, use * them right away. */ if (reslist->nidle > 0) { /* Pop off the first resource */ res = pop_resource(reslist); *resource = res->opaque; free_container(reslist, res); apr_thread_mutex_unlock(reslist->listlock); return APR_SUCCESS; } /* If we've hit our max, block until we're allowed to create * a new one, or something becomes free. */ else while (reslist->ntotal >= reslist->hmax && reslist->nidle <= 0) { if (reslist->timeout) { if ((rv = apr_thread_cond_timedwait(reslist->avail, reslist->listlock, reslist->timeout)) != APR_SUCCESS) { apr_thread_mutex_unlock(reslist->listlock); return rv; } } else apr_thread_cond_wait(reslist->avail, reslist->listlock); } /* If we popped out of the loop, first try to see if there * are new resources available for immediate use. */ if (reslist->nidle > 0) { res = pop_resource(reslist); *resource = res->opaque; free_container(reslist, res); apr_thread_mutex_unlock(reslist->listlock); return APR_SUCCESS; } /* Otherwise the reason we dropped out of the loop * was because there is a new slot available, so create * a resource to fill the slot and use it. */ else { rv = create_resource(reslist, &res); if (rv == APR_SUCCESS) { reslist->ntotal++; *resource = res->opaque; } free_container(reslist, res); apr_thread_mutex_unlock(reslist->listlock); return rv; } } APU_DECLARE(apr_status_t) apr_reslist_release(apr_reslist_t *reslist, void *resource) { apr_res_t *res; apr_thread_mutex_lock(reslist->listlock); res = get_container(reslist); res->opaque = resource; push_resource(reslist, res); apr_thread_cond_signal(reslist->avail); apr_thread_mutex_unlock(reslist->listlock); return reslist_maint(reslist); } APU_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist, apr_interval_time_t timeout) { reslist->timeout = timeout; } APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist, void *resource) { apr_status_t ret; apr_thread_mutex_lock(reslist->listlock); ret = reslist->destructor(resource, reslist->params, reslist->pool); reslist->ntotal--; apr_thread_mutex_unlock(reslist->listlock); return ret; } #endif /* APR_HAS_THREADS */
001-log4cxx
trunk/src/apr-util/misc/apr_reslist.c
C
asf20
11,348
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_general.h" /* for APR_STRINGIFY */ #include "apu.h" #include "apu_version.h" APU_DECLARE(void) apu_version(apr_version_t *pvsn) { pvsn->major = APU_MAJOR_VERSION; pvsn->minor = APU_MINOR_VERSION; pvsn->patch = APU_PATCH_VERSION; #ifdef APU_IS_DEV_VERSION pvsn->is_dev = 1; #else pvsn->is_dev = 0; #endif } APU_DECLARE(const char *) apu_version_string(void) { return APU_VERSION_STRING; }
001-log4cxx
trunk/src/apr-util/misc/apu_version.c
C
asf20
1,082
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <assert.h> #include <stdio.h> #include <stdlib.h> #include "apr_pools.h" #include "apr_tables.h" #include "apr.h" #include "apr_hooks.h" #include "apr_hash.h" #include "apr_optional_hooks.h" #include "apr_optional.h" #define APR_WANT_MEMFUNC #define APR_WANT_STRFUNC #include "apr_want.h" #if 0 #define apr_palloc(pool,size) malloc(size) #endif APU_DECLARE_DATA apr_pool_t *apr_hook_global_pool = NULL; APU_DECLARE_DATA int apr_hook_debug_enabled = 0; APU_DECLARE_DATA const char *apr_hook_debug_current = NULL; /** @deprecated @see apr_hook_global_pool */ APU_DECLARE_DATA apr_pool_t *apr_global_hook_pool = NULL; /** @deprecated @see apr_hook_debug_enabled */ APU_DECLARE_DATA int apr_debug_module_hooks = 0; /** @deprecated @see apr_hook_debug_current */ APU_DECLARE_DATA const char *apr_current_hooking_module = NULL; /* NB: This must echo the LINK_##name structure */ typedef struct { void (*dummy)(void *); const char *szName; const char * const *aszPredecessors; const char * const *aszSuccessors; int nOrder; } TSortData; typedef struct tsort_ { void *pData; int nPredecessors; struct tsort_ **ppPredecessors; struct tsort_ *pNext; } TSort; #ifdef NETWARE #include "apr_private.h" #define get_apd APP_DATA* apd = (APP_DATA*)get_app_data(gLibId); #define s_aHooksToSort ((apr_array_header_t *)(apd->gs_aHooksToSort)) #define s_phOptionalHooks ((apr_hash_t *)(apd->gs_phOptionalHooks)) #define s_phOptionalFunctions ((apr_hash_t *)(apd->gs_phOptionalFunctions)) #endif static int crude_order(const void *a_,const void *b_) { const TSortData *a=a_; const TSortData *b=b_; return a->nOrder-b->nOrder; } static TSort *prepare(apr_pool_t *p,TSortData *pItems,int nItems) { TSort *pData=apr_palloc(p,nItems*sizeof *pData); int n; qsort(pItems,nItems,sizeof *pItems,crude_order); for(n=0 ; n < nItems ; ++n) { pData[n].nPredecessors=0; pData[n].ppPredecessors=apr_pcalloc(p,nItems*sizeof *pData[n].ppPredecessors); pData[n].pNext=NULL; pData[n].pData=&pItems[n]; } for(n=0 ; n < nItems ; ++n) { int i,k; for(i=0 ; pItems[n].aszPredecessors && pItems[n].aszPredecessors[i] ; ++i) for(k=0 ; k < nItems ; ++k) if(!strcmp(pItems[k].szName,pItems[n].aszPredecessors[i])) { int l; for(l=0 ; l < pData[n].nPredecessors ; ++l) if(pData[n].ppPredecessors[l] == &pData[k]) goto got_it; pData[n].ppPredecessors[pData[n].nPredecessors]=&pData[k]; ++pData[n].nPredecessors; got_it: break; } for(i=0 ; pItems[n].aszSuccessors && pItems[n].aszSuccessors[i] ; ++i) for(k=0 ; k < nItems ; ++k) if(!strcmp(pItems[k].szName,pItems[n].aszSuccessors[i])) { int l; for(l=0 ; l < pData[k].nPredecessors ; ++l) if(pData[k].ppPredecessors[l] == &pData[n]) goto got_it2; pData[k].ppPredecessors[pData[k].nPredecessors]=&pData[n]; ++pData[k].nPredecessors; got_it2: break; } } return pData; } /* Topologically sort, dragging out-of-order items to the front. Note that this tends to preserve things that want to be near the front better, and changing that behaviour might compromise some of Apache's behaviour (in particular, mod_log_forensic might otherwise get pushed to the end, and core.c's log open function used to end up at the end when pushing items to the back was the methedology). Also note that the algorithm could go back to its original simplicity by sorting from the back instead of the front. */ static TSort *tsort(TSort *pData,int nItems) { int nTotal; TSort *pHead=NULL; TSort *pTail=NULL; for(nTotal=0 ; nTotal < nItems ; ++nTotal) { int n,i,k; for(n=0 ; ; ++n) { if(n == nItems) assert(0); /* we have a loop... */ if(!pData[n].pNext) { if(pData[n].nPredecessors) { for(k=0 ; ; ++k) { assert(k < nItems); if(pData[n].ppPredecessors[k]) break; } for(i=0 ; ; ++i) { assert(i < nItems); if(&pData[i] == pData[n].ppPredecessors[k]) { n=i-1; break; } } } else break; } } if(pTail) pTail->pNext=&pData[n]; else pHead=&pData[n]; pTail=&pData[n]; pTail->pNext=pTail; /* fudge it so it looks linked */ for(i=0 ; i < nItems ; ++i) for(k=0 ; k < nItems ; ++k) if(pData[i].ppPredecessors[k] == &pData[n]) { --pData[i].nPredecessors; pData[i].ppPredecessors[k]=NULL; break; } } pTail->pNext=NULL; /* unfudge the tail */ return pHead; } static apr_array_header_t *sort_hook(apr_array_header_t *pHooks, const char *szName) { apr_pool_t *p; TSort *pSort; apr_array_header_t *pNew; int n; apr_pool_create(&p, apr_hook_global_pool); pSort=prepare(p,(TSortData *)pHooks->elts,pHooks->nelts); pSort=tsort(pSort,pHooks->nelts); pNew=apr_array_make(apr_hook_global_pool,pHooks->nelts,sizeof(TSortData)); if(apr_hook_debug_enabled) printf("Sorting %s:",szName); for(n=0 ; pSort ; pSort=pSort->pNext,++n) { TSortData *pHook; assert(n < pHooks->nelts); pHook=apr_array_push(pNew); memcpy(pHook,pSort->pData,sizeof *pHook); if(apr_hook_debug_enabled) printf(" %s",pHook->szName); } if(apr_hook_debug_enabled) fputc('\n',stdout); return pNew; } #ifndef NETWARE static apr_array_header_t *s_aHooksToSort; #endif typedef struct { const char *szHookName; apr_array_header_t **paHooks; } HookSortEntry; APU_DECLARE(void) apr_hook_sort_register(const char *szHookName, apr_array_header_t **paHooks) { #ifdef NETWARE get_apd #endif HookSortEntry *pEntry; if(!s_aHooksToSort) s_aHooksToSort=apr_array_make(apr_hook_global_pool,1,sizeof(HookSortEntry)); pEntry=apr_array_push(s_aHooksToSort); pEntry->szHookName=szHookName; pEntry->paHooks=paHooks; } APU_DECLARE(void) apr_hook_sort_all(void) { #ifdef NETWARE get_apd #endif int n; for(n=0 ; n < s_aHooksToSort->nelts ; ++n) { HookSortEntry *pEntry=&((HookSortEntry *)s_aHooksToSort->elts)[n]; *pEntry->paHooks=sort_hook(*pEntry->paHooks,pEntry->szHookName); } } #ifndef NETWARE static apr_hash_t *s_phOptionalHooks; static apr_hash_t *s_phOptionalFunctions; #endif APU_DECLARE(void) apr_hook_deregister_all(void) { #ifdef NETWARE get_apd #endif int n; for(n=0 ; n < s_aHooksToSort->nelts ; ++n) { HookSortEntry *pEntry=&((HookSortEntry *)s_aHooksToSort->elts)[n]; *pEntry->paHooks=NULL; } s_aHooksToSort=NULL; s_phOptionalHooks=NULL; s_phOptionalFunctions=NULL; } APU_DECLARE(void) apr_hook_debug_show(const char *szName, const char * const *aszPre, const char * const *aszSucc) { int nFirst; printf(" Hooked %s",szName); if(aszPre) { fputs(" pre(",stdout); nFirst=1; while(*aszPre) { if(!nFirst) fputc(',',stdout); nFirst=0; fputs(*aszPre,stdout); ++aszPre; } fputc(')',stdout); } if(aszSucc) { fputs(" succ(",stdout); nFirst=1; while(*aszSucc) { if(!nFirst) fputc(',',stdout); nFirst=0; fputs(*aszSucc,stdout); ++aszSucc; } fputc(')',stdout); } fputc('\n',stdout); } /* Optional hook support */ APR_DECLARE_EXTERNAL_HOOK(apr,APU,void,_optional,(void)) APU_DECLARE(apr_array_header_t *) apr_optional_hook_get(const char *szName) { #ifdef NETWARE get_apd #endif apr_array_header_t **ppArray; if(!s_phOptionalHooks) return NULL; ppArray=apr_hash_get(s_phOptionalHooks,szName,strlen(szName)); if(!ppArray) return NULL; return *ppArray; } APU_DECLARE(void) apr_optional_hook_add(const char *szName,void (*pfn)(void), const char * const *aszPre, const char * const *aszSucc,int nOrder) { #ifdef NETWARE get_apd #endif apr_array_header_t *pArray=apr_optional_hook_get(szName); apr_LINK__optional_t *pHook; if(!pArray) { apr_array_header_t **ppArray; pArray=apr_array_make(apr_hook_global_pool,1, sizeof(apr_LINK__optional_t)); if(!s_phOptionalHooks) s_phOptionalHooks=apr_hash_make(apr_hook_global_pool); ppArray=apr_palloc(apr_hook_global_pool,sizeof *ppArray); *ppArray=pArray; apr_hash_set(s_phOptionalHooks,szName,strlen(szName),ppArray); apr_hook_sort_register(szName,ppArray); } pHook=apr_array_push(pArray); pHook->pFunc=pfn; pHook->aszPredecessors=aszPre; pHook->aszSuccessors=aszSucc; pHook->nOrder=nOrder; pHook->szName=apr_hook_debug_current; if(apr_hook_debug_enabled) apr_hook_debug_show(szName,aszPre,aszSucc); } /* optional function support */ APU_DECLARE(apr_opt_fn_t *) apr_dynamic_fn_retrieve(const char *szName) { #ifdef NETWARE get_apd #endif if(!s_phOptionalFunctions) return NULL; return (void(*)(void))apr_hash_get(s_phOptionalFunctions,szName,strlen(szName)); } /* Deprecated */ APU_DECLARE_NONSTD(void) apr_dynamic_fn_register(const char *szName, apr_opt_fn_t *pfn) { #ifdef NETWARE get_apd #endif if(!s_phOptionalFunctions) s_phOptionalFunctions=apr_hash_make(apr_hook_global_pool); apr_hash_set(s_phOptionalFunctions,szName,strlen(szName),(void *)pfn); } #if 0 void main() { const char *aszAPre[]={"b","c",NULL}; const char *aszBPost[]={"a",NULL}; const char *aszCPost[]={"b",NULL}; TSortData t1[]= { { "a",aszAPre,NULL }, { "b",NULL,aszBPost }, { "c",NULL,aszCPost } }; TSort *pResult; pResult=prepare(t1,3); pResult=tsort(pResult,3); for( ; pResult ; pResult=pResult->pNext) printf("%s\n",pResult->pData->szName); } #endif
001-log4cxx
trunk/src/apr-util/hooks/apr_hooks.c
C
asf20
10,329
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # SUBDIRS = main examples site test
001-log4cxx
trunk/src/Makefile.am
Makefile
asf20
818
// // HW02_HelloPolyAppDelegate.m // HW02_HelloPoly // // Created by 李 淑鳳 on 2011/7/29. // Copyright 2011年 頤德國際股份有限公司. All rights reserved. // #import "HW02_HelloPolyAppDelegate.h" #import "HW02_HelloPolyViewController.h" @implementation HW02_HelloPolyAppDelegate @synthesize window=_window; @synthesize viewController=_viewController; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; return YES; } - (void)applicationWillResignActive:(UIApplication *)application { /* Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. */ } - (void)applicationDidEnterBackground:(UIApplication *)application { /* Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. */ } - (void)applicationWillEnterForeground:(UIApplication *)application { /* Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. */ } - (void)applicationDidBecomeActive:(UIApplication *)application { /* Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. */ } - (void)applicationWillTerminate:(UIApplication *)application { /* Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. */ } - (void)dealloc { [_window release]; [_viewController release]; [super dealloc]; } @end
005-iphone-project
HW02_HelloPoly/HW02_HelloPoly/HW02_HelloPolyAppDelegate.m
Objective-C
gpl3
2,453
// // main.m // HW02_HelloPoly // // Created by 李 淑鳳 on 2011/7/29. // Copyright 2011年 頤德國際股份有限公司. All rights reserved. // #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; }
005-iphone-project
HW02_HelloPoly/HW02_HelloPoly/main.m
Objective-C
gpl3
378
// // HW02_HelloPolyAppDelegate.h // HW02_HelloPoly // // Created by 李 淑鳳 on 2011/7/29. // Copyright 2011年 頤德國際股份有限公司. All rights reserved. // #import <UIKit/UIKit.h> @class HW02_HelloPolyViewController; @interface HW02_HelloPolyAppDelegate : NSObject <UIApplicationDelegate> { } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet HW02_HelloPolyViewController *viewController; @end
005-iphone-project
HW02_HelloPoly/HW02_HelloPoly/HW02_HelloPolyAppDelegate.h
Objective-C
gpl3
466
// // HW02_HelloPolyViewController.h // HW02_HelloPoly // // Created by 李 淑鳳 on 2011/7/29. // Copyright 2011年 頤德國際股份有限公司. All rights reserved. // #import <UIKit/UIKit.h> @interface HW02_HelloPolyViewController : UIViewController { IBOutlet UILabel *m_NumOfSidesLabel; int m_NumOfSides; int test; } - (IBAction)increase; - (IBAction)decrease; @end
005-iphone-project
HW02_HelloPoly/HW02_HelloPoly/HW02_HelloPolyViewController.h
Objective-C
gpl3
399
// // HW02_HelloPolyViewController.m // HW02_HelloPoly // // Created by 李 淑鳳 on 2011/7/29. // Copyright 2011年 頤德國際股份有限公司. All rights reserved. // #import "HW02_HelloPolyViewController.h" @implementation HW02_HelloPolyViewController - (id)init { if (self = [super init]) { m_NumOfSides = 0; } return self; } - (void)dealloc { [m_NumOfSidesLabel release]; [super dealloc]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } #pragma mark - View lifecycle /* // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } */ - (void)viewDidUnload { [m_NumOfSidesLabel release]; m_NumOfSidesLabel = nil; [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } - (IBAction)increase { if (m_NumOfSides < 20) { m_NumOfSides++; m_NumOfSidesLabel.text = [NSString stringWithFormat: @"Number of Sides: %2d", m_NumOfSides]; } } - (IBAction)decrease { if (m_NumOfSides > 0) { m_NumOfSides--; m_NumOfSidesLabel.text = [NSString stringWithFormat: @"Number of Sides: %2d", m_NumOfSides]; } } @end
005-iphone-project
HW02_HelloPoly/HW02_HelloPoly/HW02_HelloPolyViewController.m
Objective-C
gpl3
1,621
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("Strings.php"); //--> String utils include_once("customerSession.inc.php"); include_once("Session.php"); //-- Session include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart $common = new Common(); $objStrings = new Strings(); $objCart = new Cart(); //--> Cart $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session session_start(); if($_SESSION['cart']) $objCart = unserialize($_SESSION['cart']); $isLogin = false; if($objSession->exist()) { $isLogin = true; } /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->caching = CACHING; $smarty->cache_lifetime = CACHE_LIFETIME; $smarty->assign('HOME_URL', HOME_URL); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('objCart', $objCart); $smarty->assign('objStrings', $objStrings); if(!$smarty->isCached('contact.html')){ include_once("includeCategory.php"); //--> include category include_once("includeSpec.php"); //--> include spec $smarty->assign('categorys', $categorys); $smarty->assign('topCategory', $topCategory); $smarty->assign('specProducts', $specProducts); } $smarty->assign('isLogin', $isLogin); $smarty->display('contact.html'); ?>
123gohelmetsv2
trunk/contact.php
PHP
asf20
1,845
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("customerSession.inc.php"); include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("Customer.php"); //--> Customer include_once("Validation.php"); //--> Validation include_once ("Session.php"); //-- Session include_once("Strings.php"); //--> String utils include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart require_once('includeHttps.php'); $common = new Common(); $objCustomer = new Customer(DB_TAG_SYSTEM, $uid); //--> Customer $objValidation = new Validation($uid); //--> Validation $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session $objCart = new Cart(); //--> Cart $objStrings = new Strings(); $customerid = 0; $isLogin = false; /*----- check session -----*/ if($objSession->exist()) { $isLogin = true; $customerid = $objSession->getUserID(); }else{ $location = './myaccount.php'; header("Location: $location"); exit; } if($_SESSION['cart']) $objCart = unserialize($_SESSION['cart']); $firstname = ''; $lastname = ''; $email = ''; $emailOld = ''; $telephone = ''; $fax = ''; if(!empty($customerid)){ $arrCustomer = $common->getRow(DB_TAG_PUBLIC, "SELECT * FROM customers WHERE id = $customerid"); $firstname = $arrCustomer['firstname']; $lastname = $arrCustomer['lastname']; $emailOld = $arrCustomer['email']; $email = $arrCustomer['email']; $telephone = $arrCustomer['telephone']; $fax = $arrCustomer['fax']; } if($_POST['email']){ $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $email = $_POST['email']; $telephone = $_POST['telephone']; $fax = $_POST['fax']; if(empty($firstname)) $error_message = 'The first name should\'t be empty.'; else if(empty($lastname)){ $error_message = 'The first name should\'t be empty.'; }else if(empty($email)){ $error_message = 'The email should\'t be empty.'; }else if(!$objValidation->isEmail($email)){ $error_message = 'The email format invalid.'; }else if($objCustomer->IsExistEmail($email) && $emailOld != $email){ $error_message = 'Your E-Mail Address already exists in our records - please log in with the e-mail address or create an account with a different address.'; } if(empty($error_message)){ $sql = "UPDATE customers SET modifiedTime = UTC_TIMESTAMP(), firstname = '$firstname', lastname = '$lastname', email = '$email', " . "telephone = '$telephone', fax='$fax' WHERE id = $customerid"; $isSuccess = $common->update(DB_TAG_SYSTEM, $sql); if($isSuccess){ $error_message = 'Changed successfully.'; }else{ $error_message = 'Changed failure.'; } } } include_once("includeCategory.php"); //--> include category include_once("includeSpec.php"); //--> include spec /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->force_compile = true; $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; $smarty->assign('HOME_URL', HOME_URL); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('error_message', $error_message); $smarty->assign('categorys', $categorys); $smarty->assign('topCategory', $topCategory); $smarty->assign('specProducts', $specProducts); $smarty->assign('objCart', $objCart); $smarty->assign('objStrings', $objStrings); $smarty->assign('firstname', $firstname); $smarty->assign('lastname', $lastname); $smarty->assign('email', $email); $smarty->assign('telephone', $telephone); $smarty->assign('fax', $fax); $smarty->assign('isLogin', $isLogin); $smarty->display('accountEdit.html'); ?>
123gohelmetsv2
trunk/accountEdit.php
PHP
asf20
4,221
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("Strings.php"); //--> String utils include_once("customerSession.inc.php"); include_once("Session.php"); //-- Session include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart $common = new Common(); $objStrings = new Strings(); $objCart = new Cart(); //--> Cart $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session session_start(); if($_SESSION['cart']) $objCart = unserialize($_SESSION['cart']); $isLogin = false; if($objSession->exist()) { $isLogin = true; } /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->caching = CACHING; $smarty->cache_lifetime = CACHE_LIFETIME; $smarty->assign('HOME_URL', HOME_URL); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('objCart', $objCart); $smarty->assign('objStrings', $objStrings); if(!$smarty->isCached('about.html')){ include_once("includeCategory.php"); //--> include category include_once("includeSpec.php"); //--> include spec $smarty->assign('categorys', $categorys); $smarty->assign('topCategory', $topCategory); $smarty->assign('specProducts', $specProducts); } $smarty->assign('isLogin', $isLogin); $smarty->display('shippingAndPayment.html'); ?>
123gohelmetsv2
trunk/shippingAndPayment.php
PHP
asf20
1,858
<?php /* * Created on Nov 8, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("customerSession.inc.php"); include_once ("Session.php"); //-- Session /*----- instance -----*/ $ins_session = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //----- session if($ins_session->exist()){ $ins_session->destroy(); } session_start(); unset($_SESSION['customerInfo']); unset($_SESSION['ordersInfo']); unset($_SESSION['paypalInfo']); $location = HOME_URL_HTTP; header("Location: $location"); ?>
123gohelmetsv2
trunk/logoff.php
PHP
asf20
676
<?php /* * Created on Nov 8, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var echo 'PARTNER_COOKIE_NAME='.$_COOKIE[PARTNER_COOKIE_NAME]; ?>
123gohelmetsv2
trunk/testCookie.php
PHP
asf20
297
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("customerSession.inc.php"); include_once ("Session.php"); //-- Session include_once("AddressBook.php"); //--> AddressBook include_once("Strings.php"); //--> String utils include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart require_once('includeHttps.php'); $common = new Common(); $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session $objCart = new Cart(); //--> Cart $objStrings = new Strings(); $customerid = 0; $isLogin = false; /*----- check session -----*/ if($objSession->exist()) { $isLogin = true; $customerid = $objSession->getUserID(); }else{ $location = './myaccount.php'; header("Location: $location"); exit; } if($_SESSION['cart']) $objCart = unserialize($_SESSION['cart']); /*----- delete address book -----*/ if(isset($_GET['action']) && $_GET['action'] == 'del'){ $addressid = $_GET['addressid']; $sql = "DELETE FROM address_book WHERE id = $addressid"; $common->update(DB_TAG_SYSTEM, $sql); } $customerInfo = $common->getHash(DB_TAG_SYSTEM, "SELECT id, default_address_id FROM customers WHERE id = $customerid"); $addresses = $common->getAllData(DB_TAG_SYSTEM, "SELECT a.id, a.firstname, a.lastname, a.street, a.city, a.state, a.countryid, a.postcode, c.name countryname FROM address_book a, countries c WHERE c.id = a.countryid AND a.customerID = $customerid"); include_once("includeCategory.php"); //--> include category include_once("includeSpec.php"); //--> include spec /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->force_compile = true; $smarty->debugging = false; $smarty->caching = true; $smarty->cache_lifetime = 120; $smarty->assign('error_message', $error_message); $smarty->assign('HOME_URL', HOME_URL); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('categorys', $categorys); $smarty->assign('topCategory', $topCategory); $smarty->assign('specProducts', $specProducts); $smarty->assign('objCart', $objCart); $smarty->assign('objStrings', $objStrings); $smarty->assign('addresses', $addresses); $smarty->assign('isLogin', $isLogin); $smarty->display('addressBookList.html'); ?>
123gohelmetsv2
trunk/addressBookList.php
PHP
asf20
2,830
<?php /* * Created on Apr 16, 2011 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ //if ($_SERVER["HTTPS"] <> "on") //{ // $xredir="https://".$_SERVER["SERVER_NAME"]. $_SERVER["REQUEST_URI"]; // header("Location: ".$xredir); //} ?>
123gohelmetsv2
trunk/includeHttps.php
PHP
asf20
333
.send-to-friend-email { z-index: 99999; background-color: #f5f5f5; padding: 10px; border: 1px solid #ccc } select { border: 1px solid #ccc; font: 11px 'Lucida Grande', Tahoma; padding: 0px; height: auto; width: auto } .generic-form { border: 1px solid #ccc; padding: 2px; color: #444 } .input-feddburner-top { border: 1px solid #ccc; padding: 2px; color: #444; width: 140px } .form-field { margin: 5px 0 10px 0 } .form-field-left { text-align: left; float: left; width: 110px; padding: 2px 0 0 0 } .form-field-right { text-align: left; float: left; width: auto } .form-update-textarea { width: 500px; height: 100px; font-size: 11px } input.signup-form { width: 250px } input.signup-form:focus { background-color: #f1f9ff } .form-validate-field { text-align: left } .form-view-expired { margin: -3px 3px 0 0; vertical-align: middle } .couponFormInput { border: 1px solid #ccc; padding: 4px; width: 300px; height: 22px; font: bold 18px Arial; color: #333 } .coupon-form-submit { font: bold 15px Arial } .couponFormSubmit { background: transparent url('/images/dp1/subscribe_red.gif') no-repeat 0 0; width: 119px; height: 30px; cursor: pointer; border: 0 } .couponFormSubmitLink { display: block } .couponFormTryAgain { background-position: 0 -30px } .dealAlertInputField { border: 1px solid #ccc; padding: 4px; width: 300px; height: 22px; font: bold 18px Arial; color: #999 } .dealAlertInputFieldSmall { border: 1px solid #ccc; padding: 2px; width: 245px; height: 20px; font: bold 16px Arial; color: #999 } .couponAlertIcon { background: transparent url('/images/dp2/alertIcon.gif') no-repeat 0 0; width: 45px; height: 28px; float: left; display: block } .dealAlertSubmitButton { font: bold 16px Arial } .keyword-search-alert-box { padding: 0 0 10px; font-size: 16px; margin-top: 9px } .keyword-search-alert-box-in { background-color: #FFF6BF; border: 2px solid #FFD324; color: #514721; padding: 15px; width: 266px } .keyword-search-alert-label { padding: 3px 0px 3px 1px; font-size: 12px; color: #555 } .questionTagInput { width: 200px; display: block; margin: 3px 0 } #searchQAButton { background-color: #a6d81b; color: white; border: solid 1px #84af0c; width: 53px; height: 26px; cursor: pointer } #searchQAButton:hover { background-color: #96be28; border: solid 1px #9acc0f } #searchQAInput { width: 236px; height: 20px; color: #777; font-weight: bold } img { border: 0 } .img-scaling { -ms-interpolation-mode: bicubic } .img-border { padding: 2px; border: 1px solid #ccc } .clear { clear: both } .noclear { clear: none } .block { display: block } .hide { display: none } .inline { display: inline } .absolute { position: absolute } .fleft { float: left } .fright { float: right } .va-top { vertical-align: top } .va-mid { vertical-align: middle } .va-bot { vertical-align: bottom } .ta-left { text-align: left } .ta-center { text-align: center } .ta-right { text-align: right } .bg-green { background: #add28b } .bg-grey { background: #d1e0e4 } .circleNumber { width: 13px; height: 17px; background-position: -312px -85px !important; padding: 2px 0 0 6px; font: bold 12px Arial; color: white } .pad0 { padding: 0 } .padt0 { padding-top: 0 } .padb0 { padding-bottom: 0 } .padl0 { padding-left: 0 } .padr0 { padding-right: 0 } .pad3 { padding: 3px } .padt3 { padding-top: 3px } .padb3 { padding-bottom: 3px } .padl3 { padding-left: 3px } .padr3 { padding-right: 3px } .pad5 { padding: 5px } .padt5 { padding-top: 5px } .padb5 { padding-bottom: 5px } .padl5 { padding-left: 5px } .padr5 { padding-right: 5px } .pad8 { padding: 8px } .padt8 { padding-top: 8px } .padb8 { padding-bottom: 8px } .padl8 { padding-left: 8px } .padr8 { padding-right: 8px } .pad10 { padding: 10px } .padt10 { padding-top: 10px } .padb10 { padding-bottom: 10px } .padl10 { padding-left: 10px } .padr10 { padding-right: 10px } .pad15 { padding: 15px } .padt15 { padding-top: 15px } .padb15 { padding-bottom: 15px } .padl15 { padding-left: 15px } .padr15 { padding-right: 15px } .pad20 { padding: 20px } .padt20 { padding-top: 20px } .padb20 { padding-bottom: 20px } .padl20 { padding-left: 20px } .padr20 { padding-right: 20px } .pad25 { padding: 25px } .padt25 { padding-top: 25px } .padb25 { padding-bottom: 25px } .padl25 { padding-left: 25px } .padr25 { padding-right: 25px } .pad30 { padding: 30px } .padt30 { padding-top: 30px } .padb30 { padding-bottom: 30px } .padl30 { padding-left: 30px } .padr30 { padding-right: 30px } .mar0 { margin: 0px } .mar3 { margin: 3px } .mart3 { margin-top: 3px } .marb3 { margin-bottom: 3px } .marl3 { margin-left: 3px } .marr3 { margin-right: 3px } .mar4 { margin: 4px } .mart4 { margin-top: 4px } .marb4 { margin-bottom: 4px } .marl4 { margin-left: 4px } .marr4 { margin-right: 4px } .mar5 { margin: 5px } .mart5 { margin-top: 5px } .marb5 { margin-bottom: 5px } .marl5 { margin-left: 5px } .marr5 { margin-right: 5px } .mar8 { margin: 8px } .mart8 { margin-top: 8px } .marb8 { margin-bottom: 8px } .marl8 { margin-left: 8px } .marr8 { margin-right: 8px } .mar10 { margin: 10px } .mart10 { margin-top: 10px } .marb10 { margin-bottom: 10px } .marl10 { margin-left: 10px } .marr10 { margin-right: 10px } .mar15 { margin: 15px } .mart15 { margin-top: 15px } .marb15 { margin-bottom: 15px } .marl15 { margin-left: 15px } .marr15 { margin-right: 15px } .mar20 { margin: 20px } .mart20 { margin-top: 20px } .marb20 { margin-bottom: 20px } .marl20 { margin-left: 20px } .marr20 { margin-right: 20px } .mar25 { margin: 25px } .mart25 { margin-top: 25px } .marb25 { margin-bottom: 25px } .marl25 { margin-left: 25px } .marr25 { margin-right: 25px } .mar30 { margin: 30px } .mart30 { margin-top: 30px } .marb30 { margin-bottom: 30px } .marl30 { margin-left: 30px } .marr30 { margin-right: 30px } ul { margin: 0; padding: 0 0 0 20px } ol { margin: 0; padding: 0 0 0 20px } li { margin: 0; padding: 0 } .generic-list { padding: 5px; border: 1px solid #ccc; background: #f2f2f2 } .generic-list li { margin: 0 0 0 20px } .shareLinks { float: right; right: 83px; position: relative; margin-top: 5px } .smallFacebookIcon,.smallTwitterIcon { position: relative; width: 30px; height: 30px; float: left } .smallFacebookIcon { background: url("/images/dp2/sprite.png?30") no-repeat scroll -81px 0 transparent } .smallTwitterIcon { background: url("/images/dp2/sprite.png?30") no-repeat scroll -111px 0 transparent } .deal-category-title { margin: 15px 0 5px 10px } ul.expired { margin: 5px 0 5px 15px; line-height: 16px } #why_sign_up ul.list-register { list-style-position: outside; list-style-type: disc; line-height: 17px; margin: 0 0 0 15px } .allDealsLoading { opacity: .5 } .product_image_grid { border: 1px solid #E1E1E1; width: 152px; height: 150px; position: relative } .deal_image_div { height: 150px; width: 152px; vertical-align: top; border: 1px solid #c3cdd6; color: white; position: relative } .deal_img_span { text-align: center; height: 150px; width: 152px; vertical-align: top; line-height: 150px; overflow: hidden } .deal_img_span img { vertical-align: middle } .deal_image_r_div { height: auto; width: 100%; color: white; position: relative } .deal_img_r_span { text-align: center; height: auto; width: 152px; vertical-align: top; padding-top: 3px; line-height: 100px; overflow: hidden } .deal_img_r_span img { vertical-align: middle } .product-grid-popular { background: transparent url('/images/icon/deal-icon-popular.gif') no-repeat 2px 0; position: absolute; top: 0px; left: 0px; z-index: 10; width: 90px; height: 16px } .product-grid-updated { background: transparent url('/images/icon/deal-icon-updated.gif') no-repeat 20px 0; position: absolute; top: 0px; left: 0px; z-index: 10; width: 90px; height: 16px } .product-grid-repost { background: transparent url('/images/icon/deal-icon-repost.gif') no-repeat 20px 0; position: absolute; top: 0px; left: 0px; z-index: 10; width: 90px; height: 16px } .product-grid-coupon { background: transparent url('/images/icon/deal-icon-coupon.gif') no-repeat 20px 0; position: absolute; top: 0px; left: 0px; z-index: 10; width: 90px; height: 16px } .product-grid-expired { background: transparent url('/images/icon/deal-icon-expired.gif') no-repeat 38px 0; position: absolute; top: 0px; left: 0px; z-index: 10; width: 90px; height: 16px } .product-image-overlay { display: block; height: 150px; margin: 3px 0 0 1px; width: 143px; color: black; background: #aaa; position: absolute; clear: left; z-index: 999999 } .product-options-grid { margin: 5px 0 10px 0 } .product-title-grid { height: 115px; width: 152px; overflow: hidden; margin: 0 2px 0 0 } .product-title-grid a.deal-title:hover { text-decoration: underline } .expDealDiv { text-align: center; background-color: #E3E2E2; border-bottom: 1px solid #9F9F9B; border-top: 1px solid #9F9F9B; color: #575757; font-size: 16px; font-weight: bold; opacity: 0.75; filter: alpha(opacity = 75); padding: 5px 0; position: absolute; top: 38%; left: 0; width: 100% } .staffPickDealDiv { width: 159px; height: 52px; background: transparent url('/images/dp2/sprite.png?30') no-repeat 101px -1250px; display: block; position: absolute; top: 100px } .staffPickDealDivRow { color: #777; font-size: 11px } .product-price-grid { padding: 5px 0 10px 0; height: 35px } .nprice-g { font-weight: bold; color: #0F054A; font-size: 16px } .nprice-g-s { font-weight: bold; color: #0F054A; font-size: 11px } .nprice-g-exp { font-weight: bold; color: #999 } .after-rebate-g { font-weight: bold; color: green } .after-rebate-g-exp { font-weight: bold; color: #999 } .oprice-g { text-decoration: line-through; color: #888 } .oprice-g-exp { text-decoration: line-through; color: #999 } .after-rebate-g-t { } .after-rebate-g-t-exp { color: #999 } a.rdLink { background-position: -313px -61px; padding: 1px 0 1px 12px; font-size: 11px; color: #585E74 } .product-poster-grid { border-bottom: 1px solid #eee; margin: 5px; height: 30px } .product-poster-grid .user-image { float: left; margin: 0 5px 0 0 } .product-poster-grid .user-text { float: left } .product-poster-grid .user-text .submitted { color: #333 } .product-poster-grid .user-text .time { color: #999 } .product-comments-grid { padding: 0 5px 15px 5px; height: 15px; border-bottom: 0px solid #ccc; margin: 0 0 0 0 } .product-comments-grid a:hover { text-decoration: underline } .DealPriceText { font-size: 11px; color: #555; padding-right: 2px; text-align: left; width: 57px; vertical-align: top } .DealPriceAmt { text-align: left; width: 400px } #welcome-spot h1 { margin: 5px 0 5px 10px; padding: 0; font: normal 18px Arial; color: #333 } #welcome-spot h2 { margin: 5px 0 5px 10px; padding: 0; font: normal 16px Arial; color: #57922b } #welcome-spot .info-container { margin: 30px 0 0 30px } #welcome-spot .info-box { float: left; margin: 0 20px 0 0 } #welcome-spot .info-box p { font: normal 14px Arial; color: #555; padding: 0; margin: 0; line-height: 22px } .user-cp-main { padding: 0 0 5px 0; margin: 0 5px 0 5px } .user-cp-main .user-cp-picture { float: left; margin: 0 15px 0 0 } .user-cp-main .user-cp-options { float: left; line-height: 16px } .user-cp-stats { line-height: 20px; margin: 5px 0 0 3px } .userFrontStatsTable th { font-weight: normal; border-bottom: solid 1px #ddd; text-align: left } .userFrontStatsGiveway { padding-top: 5px; margin-top: 5px; border-top: 1px solid #ddd } .userFrontDeal { border: 1px solid #ccc; padding: 3px 3px 0; margin: 0 3px 0 0; text-align: center; vertical-align: middle; width: 40px } .userFrontDealSelected { border: 1px solid #777; padding: 3px 3px 0; margin: 0 3px 0 0; text-align: center; vertical-align: middle; width: 40px } .userFrontDealArrow { display: block; width: 15px; height: 10px; background: url('/images/user_front_deals_arrow_02022010.gif') no-repeat } .userFrontDealInfo { padding: 5px; text-align: left } .userFrontDealTitle { font-size: 12px; font-weight: normal; margin-bottom: 5px; line-height: 18px } .userFrontDealPoster { margin: 0; font-size: 11px; color: #999 } .cat-page-title { font: bold 18px Arial; color: #333; margin: 15px 0 5px 10px } .notification { margin: 10px 0 10px 0; padding: 0 0 10px 0; border-bottom: 1px solid #e5e5e5 } .notification-image { width: 40px; text-align: center; padding: 3px; background: white; border: 1px solid #ddd } .notification-pic { width: 20px } .notification-info { margin: 5px 0 5px 0; padding: 5px } .notification-content { line-height: 16px; margin: 5px 0 5px 0; padding: 0 } .google-ad-deal { border-top: 1px solid #eee; padding-top: 10px; position: relative; width: 590px; height: 60px; margin: auto; text-align: center } #deal-info { width: 625px; margin: 2px 0 0 0; background: white } #dealInfoTable .dLeft { vertical-align: middle; padding: 10px 3px; width: 150px; border: 1px solid #C3CDD6; text-align: center } #dealInfoTable .dReft { vertical-align: middle; padding: 0 10px 0 10px } .deal-image { margin: 0; padding: 15px 0 15px 0; text-align: center; width: 150px; border: 1px solid #ddd; overflow: hidden } .deal-pricing { line-height: 18px } .DealPrice { font-weight: bold; color: #c00101; font-size: 16px } .DealPriceDP { font-weight: bold; color: #c00101; font-size: 20px } .DealListPrice { font-size: 14px; color: #999; text-decoration: line-through } .DealRebatePrice { font-weight: bold; color: #2f5313; font-size: 14px } .DealShipPrice { font-weight: normal; font-size: 12px; color: #333 } .RebatePrice { font-weight: normal; color: #333; font-size: 14px } .deal-oprice { font-weight: bold; color: #999; text-decoration: line-through } .deal-arprice { font-weight: bold; color: #2f5313; font-size: 14px } .deal-price-bar { font-size: 16px; color: gray } .deal-shipping { font-weight: normal; color: #333; font-size: 11px } .deal-users { margin: 0 0 10px; border-bottom: 1px solid #ddd } .deal-user { margin: 0 0 10px 0 } .deal-user .submit_text { margin: 0 0 5px 0; font-weight: bold } .deal-user .user_image { float: left; margin: 0 5px 0 0 } .deal-user .user_text { float: left; line-height: 18px; margin: 0 0 0 0 } .deal-user .user_text .time { color: #999; font-size: 11px } .deal-options { margin: 10px 0 0 0; border-bottom: 1px solid #eee; padding: 0 0 10px 0 } ul.deal-options-list { margin: 0 0 0 0; line-height: 18px; width: 100% } .deal-added { margin: 10px 0 0 0 } .DealOptions { line-height: 26px } .DealCoupons { margin: 15px 0 0; padding: 8px 5px 8px 14px; border: 2px dashed #a3a3a3; -moz-border-radius: 5px } .DealCouponScissor { width: 18px; height: 15px; position: absolute; margin: -16px 0 0 -6px; background: url('/images/icon/scissor.gif') no-repeat scroll 0 0 } #dealExpiredNotice { border: 2px solid #c14620; background-color: #fff; padding: 15px; width: 568px; margin-bottom: 10px } .dealExpiredIcon { background: url('/images/icon/expired_mail.gif') no-repeat; float: left; width: 75px; height: 75px; margin: 0 15px 0 0 } .dealExpiredText { font-size: 14px; padding: 5px 0 10px } .dealExpiredShare { padding-top: 10px } .dealExpiredShare span { width: 30px; height: 30px; float: left; margin-right: 5px; display: block } .dealExpiredShare .facebook { background-position: -81px 0 } .dealExpiredShare .twitter { background-position: -111px 0 } .dealExpiredShare a { float: left; font-size: 16px; padding-right: 10px; line-height: 30px } .dealExpiredHeader { font: 18px Arial; color: #972a09 } .deal-info-right { float: left; padding: 0; width: 435px; margin: 0 0 0 0 } .deal-how-to { margin: 0 0 20px 0; line-height: 18px } .deal-how-to-content-prod-page { background: #f4ffdb; padding: 5px; border: 1px solid #74B543 } .deal-how-to-content { } .deal-vote { margin: 10px 0 20px 0; border-bottom: 1px solid #eee; padding: 0 0 10px 0 } #seeItButton { width: 159px; height: 35px; background: transparent url('/images/dp2/spriteg.gif?30') no-repeat 0 0; display: block; margin-right: 10px } #seeItButton:hover { background-position: 0 -35px } #couponLinkAtDeal { background-position: -211px -820px; display: block; padding-left: 28px; height: 22px; line-height: 22px; font-size: 15px; text-decoration: none } #couponLinkAtDeal:hover { background-position: -211px -855px } #poll-deal-vote { margin: 0 0 10px; background: #f7f7f7; border: 1px solid #eee; float: left; padding: 5px } .poll-vote-text { font-size: 12px; color: #333; float: left; width: 150px; padding: 5px 10px 0 0; text-align: left } .poll-vote-buttons { float: left; padding-top: 1px } .poll-vote-thumbs { float: left } .option-plus-recommend { font-size: 14px; color: #777; padding: 2px 10px 0 0; text-align: left; width: 140px } .option-plus { margin: 10px 0 } #deal-options-tabs { width: 400px; margin: 10px 0 20px 0; height: auto } #deal-options-tabs .option-plus { padding: 0; margin: 10px 0 } #deal-options-tabs #option-tabs { height: 30px; width: 400px; padding: 0; border-bottom: 1px solid #ccc; background: url('/images/options_tab_bg.gif') repeat-x } #deal-options-tabs #option-tabs a.tab { display: block; float: left; width: auto; height: 23px; outline: none; font: bold 14px Arial; padding: 7px 26px 0; margin: 0 } #deal-options-tabs #option-tabs a.tab.on { text-decoration: none; color: #222; background: #fff; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 1px solid #ccc; border-bottom: 1px solid #fff } #deal-options-tabs #option-tabs a.tab.on:hover { background: #fff } #deal-options-tabs #option-tabs a.tab.on span { color: #034492 } #deal-options-tabs #option-tabs a.tab span { display: block; height: 18px; font: bold 12px Arial; color: #034492 } #deal-options-tabs #option-tabs a:hover.tab { text-decoration: underline; cursor: pointer } #deal-options-tabs #option-tabs a:hover.tab span,a:hover.tab span.on { text-decoration: none; color: #034492; cursor: pointer } #deal-options-tabs .option-content { width: 378px; height: auto; padding: 10px; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc } .dealOptionContainer { border: 1px solid #888; background: #f7f7f7; padding: 10px; line-height: 18px } .share-email-form { padding: 10px; border: 1px solid #888; background-color: #f7f7f7; line-height: 16px } .DealAlertOption { border: 1px solid #888; background: #f7f7f7; padding: 10px; line-height: 18px } .DealOptionFlag { border: 1px solid #888; background: white; padding: 10px; line-height: 16px } .DealOptionEdit { border: 1px solid #888; background: #f7f7f7; padding: 10px; line-height: 16px } #deal-info .popup-comment { position: absolute; border: 3px solid #ccc; background-color: #f5f5f5; color: #000 } #deal-info .comments-container { margin: 15px 0 0 0; border-top: 1px solid #ddd; padding: 20px 0 0 5px } #deal-info .comments { text-align: left; margin: 10px 0 0 0 } .comment { width: 610px; margin: 10px 0 0 0 } .comment .comment-user { float: left; width: 75px; margin: 0 } .comment .comment-content { float: left; height: auto } .comment .comment-content .top { width: 520px; height: 10px; background: transparent url('/images/dp1/box_cmmt_top.gif') no-repeat } .comment .comment-content .mid { width: 490px; height: auto; background: transparent url('/images/dp1/box_cmmt_mid.gif') repeat-y; padding: 5px 20px 10px 10px; overflow: hidden } .comment .comment-content .mid .comment-rating { float: right; margin: 10px 0 0 0 } .comment .comment-content .mid .comment-text { line-height: 18px; overflow: hidden } .comment .comment-content .mid .posted-by { float: left; margin: 10px 0 0 0; font-size: 11px; color: #888 } .comment .comment-content .bot { width: 520px; height: 13px; background: transparent url('/images/dp1/box_cmmt_bot.gif') no-repeat } .comment-user { font-size: 11px; color: #888 } .answerContentText { width: 495px; overflow: hidden; font-size: 13px; line-height: 19px } #deal-info .comment-form { margin: 15px 0 0 0; padding: 10px 0 0 5px; border-top: 1px solid #ddd } #deal-info .DealDescription { margin-top: 10px; line-height: 18px; padding-left: 7px; width: 590px } .comment-replies { padding: 15px 0 0 15px } .comment-reply { margin: 0 0 5px 0; padding: 0 0 10px 0; border-bottom: 1px solid #eee } .comment-reply-text { margin: 5px 0 5px 0; width: 431px; color: #555; line-height: 17px } .comment-reply-hidden { padding: 3px; background: #eee } .related-coupons { margin: 10px 0 10px 0; text-align: left } .related-coupons .store-logo { margin: 0 0 5px 5px } .related-coupons .store-title { margin: 0 0 0 5px; font-size: 14px; font-weight: bold } .related-coupons .coupons { text-align: left; padding: 5px 0 } .related-coupons .coupons a.coupon { display: block; padding: 5px; border-top: 1px dashed #ccc; margin: 0; color: #666 } .related-coupons .coupons div.coupon { display: block; padding: 5px; border-bottom: 1px dashed #ccc; margin: 0; color: #666 } .related-coupons .coupons a:hover.coupon,a:hover.coupon span { background: #74b543; text-decoration: none; color: white } .related-coupons h3 { padding: 0 0 7px 5px } .related-coupons li { margin-bottom: 5px } .related-coupons li a { text-decoration: underline } .featured_coupon_summary { padding: 2px 0 10px; color: #666 } .coupon-tag-list { list-style-type: none; margin: 0; padding: 0; white-space: nowrap } .coupon-tag-block { border: 1px solid #ccc; background-color: #F1F1F1; padding: 2px; float: left; margin: 3px 4px 1px 0 } .coupon-tag-block-bold { border: 1px solid #ccc; background-color: #F1F1F1; padding: 2px; float: left; margin: 3px 4px 1px 0; font-weight: bold } .related-products { width: 278px; min-height: 100px; height: auto !important; height: 100px; padding: 0 0 0 0 } .related-products .more-links { } .page-number { text-align: left; margin-bottom: 5px; padding: 5px 0 0 3px; float: left; display: inline } .page-number2 { text-align: left; margin-bottom: 5px; padding: 5px 0 0 3px; float: right; display: inline; font: bold 11px Arial; color: #333 } .product-list-vert { min-height: 50px; overflow: auto; padding: 2px; margin: 10px 0 10px 0; border-top: 1px solid #eee; text-align: left } .product-list-vert .related-product { width: auto; margin: 10px auto 10px auto; border-bottom: 1px solid #eee; padding: 0 0 10px 0 } .product-list-vert .related-product .related-img { float: left; width: 100px; text-align: center; padding-left: 10px } .product-list-vert .related-product .related-info { float: left; width: 150px; padding: 5px 0 0 10px } .product-list-horz { height: auto; width: auto; text-align: center; background: none; padding: 0 0 0 0 } .product-list-horz .related-product { float: left; margin: 0; width: 130px; min-width: 130px; min-height: 60px; border-right: 1px solid #ccc; padding: 0 5px 0 5px } .product-list-horz .related-product .product-title { padding: 5px 5px 0 } #top-five { margin: 15px 0 0 0 } #top-five .top-item { margin: 0 0 20px 0 } #top-five .top-item .numbers { float: left; width: 19px } #top-five .top-item .image { float: left; margin: 0 0 0 3px } #top-five .top-item .image2 { float: left; margin: 0 0 0 3px; border: 1px solid #eee; width: 80px; padding: 2px; text-align: center; overflow: hidden } #top-five .top-item .image img { padding: 2px; border: 1px solid #eee } #top-five .top-item .info { float: left; width: 148px; margin: 0 0 0 5px } #top-five .top-item .info2 { float: left; width: 135px; margin: 0 0 0 5px } #top-five .top-item .info2 .price { color: #c00101; font-weight: bold; padding-top: 5px } #top-five .top-item .info .title { font: bold 12px Arial; padding: 0 } #top-five .top-item .info .deals { font: 11px Tahoma } .signupReasonList { margin: 5px 0; font-size: 14px } .signupReasonList li { line-height: 22px } .input-field { float: left } .input-field input { width: 200px; border: 1px solid #ccc; background-color: #fff; padding: 2px } .coupons-list { margin: 0 0 10px 0 } .store-coupon { width: 587px; margin: 0 0 15px 0; height: auto } .store-coupon .store-coupon-top { width: 587px; height: 9px; background: transparent url('/images/coupon_top.png') no-repeat } .store-coupon .store-coupon-mid { width: 557px; height: auto; background: transparent url('/images/coupon_mid.png') repeat-y; padding: 15px 15px 15px 15px } .store-coupon .store-coupon-bot { width: 587px; height: 11px; background: transparent url('/images/coupon_bot.png') no-repeat } .store-coupon-info { float: left; width: 435px; margin: 0 0 0 10px } .store-coupon-vote { float: right; width: 130px; background: white; text-align: center; background: #F5F5F5 } table.coupon-details th { width: 70px; color: #555; text-align: right; font-weight: normal } table.coupon-details td { width: 350px } .store-coupon-field { margin: 0 0 10px 0 } .store-coupon-field-td { padding: 10px 5px 5px } .store-coupon-action-td { width: 130px; padding: 15px 10px 0 10px; background: #F9F9F9 } .store-coupon-field-top { line-height: 20px } .store-coupon-desc { width: auto } .popup-coupon-comment { position: absolute; margin-left: -90px; width: 235px; border: solid 3px #90bd6d; background-color: #fff; color: #000; z-index: 9999 } .popup-thumb-comment { position: absolute; margin-top: 30px; margin-left: 148px; width: 235px; border: solid 3px #90bd6d; background-color: #fff; color: #000; z-index: 9999 } #popup-thumb-comment-close { position: absolute; top: -5px; right: -5px; cursor: pointer } .popup-comment-top-title { padding: 5px 5px 0 5px; width: 225px } .coupon-vote th { font-weight: normal; color: #555; padding-left: 5px } .coupon-vote td { text-align: center; height: 30px } .mod-coupon { width: 587px; margin: 0 0 15px 0; height: auto } .mod-coupon .mod-coupon-top { width: 587px; height: 9px; background: transparent url('/images/coupon_top.png') no-repeat } .mod-coupon .mod-coupon-mid { width: 557px; height: auto; background: transparent url('/images/coupon_mid.png') repeat-y; padding: 15px 15px 15px 15px } .mod-coupon .mod-coupon-bot { width: 587px; height: 11px; background: transparent url('/images/coupon_bot.png') no-repeat } .coupon-logo { float: left; width: 150px; padding-top: } .coupon-info { float: left; min-width: 370px; width: 300px; margin: 0 0 0 10px } .coupon-info .coupon-code { line-height: 30px; margin-bottom: 5px } .coupon-info .coupon-desc { margin: 5px 0 0 0 } .coupon-info .coupon-desc .coupon-desc-text { margin: 5px 0 0 0; color: #555 } .coupon-links-box { border: 1px solid #ccc; text-align: center } .coupon-store-more { padding: 15px 0 3px } .coupon-store-more span { background: #eee; color: #777; padding: 3px 10px } .coupon-sub-category { display: block; padding: 0 0 2px 25px; font: normal 12px Arial } .coupon-sub-category-select { display: block; padding: 0 0 2px 25px; font: normal 12px Arial; color: #c00101 } a.coupon-code-printable { font: bold 14px Arial; text-decoration: none } .coupon-code-text { font: bold 15px Arial; text-decoration: none; padding: 1px 5px 1px 0; margin: 1px 0; background: white; text-align: center } .coupon-code-text a { } .coupon-code-text a:hover { text-decoration: none } .coupon-poster { color: #666; font-size: 11px } .coupon-poster img { vertical-align: middle } .store-alpha-section { float: left; margin: 0 10px 20px 0 } .store-alpha-letter { float: left; width: 20px; margin-right: 5px } .store-alpha-short-list { float: left; width: 155px } #store-alpha-list { width: auto; height: auto; margin: 0; padding: 10px } #store-alpha-list a.store-letter { display: block; float: left; border: 1px solid #ccc; padding: 3px; margin: 0 2px 2px 0; width: 8px; text-align: center } #store-alpha-list a.selected { background: #aaa; color: white } #store-alpha-list a.store-letter:hover { background: #eee } #subscribe-feed-info { padding: 15px 0 0 0; text-align: left } #subscribe-feed-info #subscribe-feed-icon { float: left; margin: 0 5px 0 0 } #subscribe-feed-info #subscribe-feed-text { width: 230px; float: left } #circulars { margin: 0; padding: 0 } #circulars .circular { float: left; width: 136px; height: 100px; border: 1px solid #ccc; text-align: center; margin: 0 2px 2px 0; padding: 4px } #coupon-store-logo { margin: 0 0 5px 0 } .couponMoreInfo { list-style-type: none; margin: 0; padding: 0 } .couponMoreInfo li { padding: 2px 0 } .couponMoreInfo a { padding: 2px 0 2px 25px; height: 25px } #coupon-store-options { line-height: 22px } #add-my-favorite { margin: 0 0 10px 0 } #store-alerts { margin: 10px 0 0 0 } .submit-coupon-code { margin: 0 0 3px 0; line-height: 20px } .submit-coupon-type { margin: 0 0 3px 0; line-height: 20px } select.coupon-type-select { font: normal 20px Arial } .more-view-title { font: bold 14px Arial; color: #ccc; padding: 5px 0 3px 2px } .more-view-title2 { font: bold 14px Arial; float: left; width: 500px; color: #ccc; padding: 5px 0 3px 2px } .coupon-comment-poster { padding-top: 10px; color: #888; font: 11px Arial } .coupon-comment-content { overflow: auto; min-height: 100px; max-height: 450px; padding: 15px 10px 10px 15px; margin: 2px 0 10px 0; background: white; width: 550px } .coupon-comment-desc { color: #666; line-height: 35px; font-size: 11px } .coupon-comment-desc img { vertical-align: middle } .coupon-comment-form { padding-top: 15px } .coupon-comment-form-title { font: bold 16px Arial; color: #333 } .coupon-title-desc { width: 911px; float: left } .coupon-title-desc h1 { font-size: 24px } .coupon-title-desc h1 a { color: #034492 } .coupon-plus { float: left; padding-top: 20px } .coupon-store-description { padding: 0 10px 5px 2px } .store-more-infomation { padding: 5px 0 0; color: #aaa; font-size: 14px } .store-more-infomation a { font-size: 12px } #store-description { color: #444 } #coupon-tag-description { padding: 0 0 10px; display: block; font-size: 12px; color: #333 } .coupon-tip { margin: 0 } .coupon-tip-content { float: left; width: 450px } .coupon-tip-comment-link { float: right } .coupon-tip-comments { margin: 10px 0 0 0 } .search-results-header { margin-top: 10px; padding: 5px 20px; background: #eee } .search-results-coupons { padding: 5px 20px } .search-results-coupon-col { float: left; margin-right: 35px; line-height: 18px } .search-result-deal { margin: 0 0 10px 0; padding: 0 0 10px 0; border-bottom: 1px solid #ddd } .search-result-deal-img { float: left; display: block; width: 46px; margin-right: 10px; padding: 1px; border: 1px solid #ddd; text-align: center } .search-result-deal-title { float: left; width: 198px } .search-empty { padding: 0 } .search-additional { padding: 10px; border: 1px solid #eee; margin: 10px 0 10px 0; line-height: 18px } .searchTip { background: #f4ffdb; padding: 10px; line-height: 20px } .pg-search { padding: 10px 0 } .pg-result { margin: 0 0 15px 0; padding: 0 0 15px; border-bottom: 1px solid #ddd } .messages-profile-pic { float: left } .messages-username { float: left; margin: 4px 0 0 5px; color: #777 } #profile-picture { float: left; padding-bottom: 2px; width: auto } #profile-user-info-main { float: left; margin-left: 10px; width: 475px; overflow: hidden } #profile-user-info-side { float: left; margin-left: 10px; width: 150px } #profile-username { font: bold 20px Arial; color: #333; line-height: 18px } #profile-headline-main { width: 470px; font: italic 11px Arial; color: #333; padding: 5px 0 5px 0 } #profile-headline-side { width: 150px; font: italic 11px Arial; color: #333; padding: 5px 0 5px 0 } #profile-options { font: 12px Arial; color: #333; padding: 5px 0 5px 0; line-height: 18px } #profile-stats { margin: 10px 0 0 0; padding: 10px 0 0 0; border-top: 1px solid #ddd; text-align: left } .profile_table th { font-size: 11px; color: #333; border-bottom: 1px solid #ccc; border-top: 1px solid #ccc } .profile_table tr.head { background: url('/images/dp1/profile_alert_grad_bg.gif') repeat-x } .add-profile-comment-form { } #recent-activity { } .recent-activity-icon { float: left; margin: -3px 5px 0 0 } .recent-activity-text { float: left; color: #888; width: 225px; margin: 0 0 10px 0; padding: 0 0 10px 0; border-bottom: 1px solid #ddd } .recent-activity-text-big { float: left; color: #888; width: 525px; margin: 0 0 10px 0; padding: 0 0 10px 0; border-bottom: 1px solid #ccc } .recent-activity-img { float: left; width: 40px; height: 40px; margin: 0 5px 0 0; overflow: hidden } .recent-activity-img-big { float: left; width: 100px; height: 100px; margin: 5px 5px 0 0; overflow: hidden } .userDealRss { float: left; margin-top: 2px } .user-photo-view { border-bottom: solid 1px #ccc; padding-bottom: 10px; margin-bottom: 10px; text-align: center } .user-photo-view img { padding: 3px; border: 1px solid #ccc } div.user-photo-thumb { display: block; float: left; margin: 0 10px 0 0 } div.user-photo-thumb img { padding: 3px; border: 1px solid #aaa } .user-photo-more { margin: 0 } .user-photo-options { width: 200px; margin: 15px auto 0 auto; border: 1px solid #ccc; padding: 10px; background: #f5f5f5; text-align: left } .user-photo-caption-form { margin: 10px 0 0 0 } .recent-comment { border-bottom: 1px solid #eee; background: white; padding: 5px 5px 10px 5px; margin: 0 0 10px 0 } .recent-comment-content { padding: 5px; margin: 3px; background: white; color: #555 } .recent-comment-small td { padding: 10px 5px; border-bottom: 1px solid #eee; vertical-align: top } .list_items_content { min-height: 180px; height: auto !important; height: 180px } .list-items-inner { float: left; text-align: center } .list-box-profile { display: inline; text-align: center; padding: 0 3px 0 0 } .list-box { display: inline; float: left; text-align: center; padding: 0 3px 0 0 } .list-box-img { background: transparent url('/images/list_bg.gif') no-repeat center; height: 140px } .list-box-num-items { float: left; width: 69px; text-align: center; font: 10px 'Lucida Grande', Tahoma; color: #555; padding: 2px 0 0 0; position: absolute } .list-box-td { height: 140px } .list-box-title { margin: 2px 0 0 0; height: 45px; text-align: left } .list-box-info { width: 140px; padding: 5px 0 0 2px; color: #888; text-align: left } .list-box-info-user { float: left; text-align: left; width: 115px; line-height: 14px } .list-box-info-label { } .list-box-b { margin: 2px 0 0 0 } .list-hole-box { display: inline; float: left; text-align: center; margin: 0 20px 20px 0 } .list-hole-box-img { background: transparent url(/images/dp1/list_box.gif) no-repeat center; width: 160px; height: 154px; overflow: hidden } .list-no-hole-box-img { background: transparent url(/images/dp1/list_box_no_holes.gif) no-repeat center; width: 160px; height: 154px; overflow: hidden } .list-hole-box-td { height: 148px } .list-hole-box-b { margin: 2px 0 0 0 } .list-hole-box-title { margin: 2px 0 0 0; height: 30px; text-align: center } #list-items { margin: 0 } .list-item { margin: 10px 0; padding: 10px 0; border-bottom: 1px dashed #ccc } .list-item-title { font-size: 14px; font-weight: bold; margin: 0 0 10px 0 } .list-item-image { float: left; display: inline; width: 150px; text-align: center; margin: 0 20px 0 0; padding: 10px 0; border: 1px solid #ddd } .list-item-info { float: left; display: inline; overflow: hidden; width: 370px } .list-item-store { margin: 5px 0; font-weight: bold; float: left } .list-item-price { float: left; margin: 5px 0 } .list-item-plus-button { width: auto } .list-item-options { width: 200px; margin: 10px 0 0 0; border: 1px solid #ccc; padding: 5px; background: #f5f5f5; text-align: left } .latest-find { margin: 0 0 7px 0; padding: 0 0 7px 0; border-bottom: 1px solid #dedede } .latest-find-user { float: left; margin: 0 5px 0 0 } .latest-find-text { float: left; margin: 0 0 4px; width: 225px; color: #333 } .latest-find-deal { color: #333; width: 225px; color: #888; font-size: 12px; padding-bottom: 5px; } .prod-img-40 { width: 40px; height: 40px; overflow: hidden } .prod-img-60 { width: 60px; overflow: hidden } .prod-img-90 { width: 90px; overflow: hidden } .latest-find-time { margin: 8px 0 0 0; color: #888; font-size: 10px } .dealUpdateTable td { border-top: 1px solid #EEE; padding-top: 10px; padding-bottom: 10px } .friend-list { margin: 5px 0 15px 0 } .friend-list-image { float: left; width: 100px; margin: 0 5px 0 0; padding: 5px; border: 1px solid #ccc; text-align: center } .friend-list-info { float: left; width: 140px } .search-options { background: #eee; padding: 5px 20px } .store-popup-hint { width: 150px; position: absolute; padding: 5px; background: #fdfdfd; border: 1px solid #ccc } #rowViewRow td { vertical-align: top; padding: 10px 0 20px 0px } #rowViewRow .col1 { text-align: center; width: 80px; padding-top: 12px } #rowViewRow .col2 { padding: 7px 10px 20px 20px } #rowViewRow .title { font-size: 15px; text-decoration: underline } #rowViewRow .desc { padding-top: 5px; width: 465px; overflow: hidden } .rowViewPrice { padding: 5px 0 } .rowViewSite { padding: 4px 0 0 5px; float: left; font-size: 11px } .rowViewPrice,.rowViewPrice span { font-size: 16px } .rowViewPrice .bar { font-size: 18px; color: #ddd } .add-deal-form-container { margin: 0 } .add-deal-info { padding: 10px; border: 1px solid #888; background-color: #fff; margin: 40px 0 10px } .submit-section { width: 580px; padding: 0; margin: 0 0 20px 0 } .submit-number { width: 20px; padding: 0 } .submit-info { width: 560px; overflow: hidden } .submit-selected-image { padding: 3px; border: 1px solid #ccc; width: 100px; height: 100px } .submit-thumbnails { border: 1px solid #ccc; float: left; margin-left: 10px; width: 430px; padding: 3px } .submit-thumbnail { border: 1px solid #ccc; background-color: #fff; margin: 3px; padding: 2px; float: left; width: 48px; height: 48px } .submitImageTable td { vertical-align: top } .submit-add-step { font: bold 11px Tahoma; padding: 4px; border: 1px solid #bfdbb7; background-color: #f4fff1; width: 100px; margin: 10px 0 5px 0; text-align: center } .submit-module-header { margin: 0 } .submit-module-number { float: left; width: 20px; margin-right: 10px } .submit-details-container { margin: 0 } .submit-details-title h4 { font: bold 14px Arial; color: #333; padding: 0 0 10px 0; margin: 0; border-bottom: 1px solid #ddd } .submit-details-image { float: left; width: 150px; height: auto; border: 1px solid #ccc; padding: 5px; margin: 10px 20px 0 0; overflow: hidden; text-align: center } .submit-details-text { float: left; width: 650px; height: auto } .submit-edit { width: 920px; padding: 0 0 15px 0 } .submit-edit-header { margin: 0 0 10px 0; padding: 5px 0 5px 5px; background: #3d576f; color: white } #signup-form { margin: 0 auto } .signup-form-block { width: 350px; height: 55px; background: none; margin: 0 auto } .signup-form-block2 { width: 350px; height: 55px; background: none } .signup-form-name { width: 75px; margin: 4px 10px 0 0; text-align: right; background: none } .signup-form-field { width: 250px; height: auto; background: none } .signup-form-check-field { margin: 0; height: auto; width: 250px; background: none; text-align: left; line-height: 4px } .signup-message-success { color: #19af00; font: bold 10px 'Lucida Grande', Tahoma, Arial } .signup-message-fail { color: #fd2c2c; font: bold 10px 'Lucida Grande', Tahoma, Arial } .invite-loading { width: 600px; margin: 10px; padding: 20px; text-align: center } .invite-box { border: 1px solid #a8c3d6; background-color: #eef7ff; padding: 10px } .community-results-container { background: #eee } #community-guidelines { position: absolute; background: white; margin: 0 0 0 165px } .questionsTable th { color: #999; font-weight: normal; padding: 3px } .questionsTable td { border-top: 1px solid #e5e5e5; vertical-align: middle } .questionsTable .numAnswer { margin: 3px; background-color: #6084a4; color: white; padding: 5px 0 } .questionsTable .numAnswer2 { margin: 3px; background-color: #94a0ab; color: white; padding: 5px 0 } .questionsTable .answer { text-align: center; font-size: 16px; font-weight: bold; width: 50px } .questionsTable .vote { text-align: center; font-size: 14px; font-weight: bold; color: #666 } .questionsTable .view { text-align: center; font-size: 14px; font-weight: bold; color: #666 } .questionsTable .title { font-size: 14px; padding: 3px } .questionsTable .title a:visited { color: #551A8B } .questionsTable .posted { padding: 3px } .questionsTable .time { font-size: 11px; color: #999 } #questionGuidelines h5 { margin: 10px 0 5px } .answerRating { left: 586px; position: absolute; top: 0 } .answerTag { background-color: #ECF2DC; padding: 2px 8px; color: #4e6a02; border-color: #C6D3A4; border-style: solid; border-width: 0 1px 1px 0; margin: 0 5px 2px 0; display: block; float: left } .answerDiv { width: 625px; position: relative; margin-top: 20px } .answerDiv .user { float: left; width: 70px } .answerContentDiv { float: left; width: 517px } .answerContentDiv .top { background: url('/images/dp2/sprite.png?30') no-repeat 0 -950px; height: 6px; width: 517px } .answerContentDiv .mid { min-height: 59px; border-style: solid; border-color: #cbcbcb; border-width: 0 1px; width: 495px; padding: 10px; overflow: hidden; line-height: 1.5em } .answerContentDiv .bot { background: url('/images/dp2/sprite.png?30') no-repeat 0 -970px; height: 6px; width: 517px } .answerContentDiv .posted-by { color: #888; font-size: 11px; margin: 10px 0 0 } .answerRecentRepliesTopic { padding: 3px 0 10px 3px; color: #888; font-size: 11px } .answerRecentRepliesTopic a { font-size: 12px } .community-table { background: none } .community-table th { padding: 5px 0 5px 0; font: bold 12px Arial } .community-cell { padding: 20px 0 20px 10px; border-bottom: 1px solid #ddd } .community-topic { border: 1px solid #7292b2 } .community-topic h1 { background: #e7ebee; padding: 10px } #answersDiv { padding: 10px 0 0; margin: 15px 0 0; border-top: solid 1px #ddd } .qNAnswerLabel { color: #555; font: bold 18px Georgia } .community-user { float: left; background: none; width: 68px; padding: 10px 0 0 10px } .community-post { float: left; background: red; width: 538px; background: none; padding: 10px 0 } .community-post .inner { width: 505px; word-wrap: break-word } .community-post-options { margin: 15px 0 0 0 } .community-replies { margin: 0 20px 0 20px } .community-reply { margin: 15px 0 30px 0 } #form_comment { padding: 20px 0 } .reply-user { float: left; width: 110px; padding-left: 5px; background: none } .reply-user-low { float: left; width: 110px; padding-left: 5px; background: none } .reply-post { float: left; width: 540px; background: none } .faq-section { margin: 0 0 25px 0 } .faq-content { font: 12px Arial; padding: 10px; line-height: 18px; background: #f8f8f8; border: 1px solid #eee } .faq-question { margin-top: 10px; padding: 5px; font-weight: bold } #faq-questions { line-height: 20px; padding-left: 30px } #dp-tools { margin: 0; padding: 0 } .dp-tool { margin: 10px 0 10px 0; padding: 15px 0 20px 0; border-top: 1px solid #ddd } .dp-tool-icon { float: left; width: 60px; margin: 0 10px 0 0; text-align: center } .dp-tool-info { float: left; width: 515px } .dp-tool-title { font: bold 14px Arial } .dp-tool-desc { margin: 5px 0 0 0 } .dp-tool-code { margin: 5px 0 5px 0; background: #f6ffef; border: 1px solid #b6cea2; padding: 5px; font: 10px 'Courier New', Courier; color: #333 } .dp-tool-plus-example { margin: 15px 0 15px 0; padding: 0 0 15px 0; border-top: 1px solid #aaa } dl.param-details dt { margin-top: 1em; font-weight: bold } dl.param-details dd { margin-left: 0; padding-left: 15px } #join-graphic { background: transparent url('/images/dp1/front-banner-bg.gif') no-repeat; width: 259px; height: 241px } #join-container { padding: 39px 0 0 0 } p.join-text { font: 12px Arial; color: #555; margin: 0 0 14px 30px } #join-options { width: 255px } #join-video { width: 125px; float: left; text-align: center } #join-video span { font: bold 12px Arial } a.join-video-link { display: block; width: 66px; height: 45px; background: url('/images/dp1/video-tutorial-off.gif') no-repeat; margin: 10px auto 0 auto } a:hover.join-video-link { background: url('/images/dp1/video-tutorial-on.gif') no-repeat } #join-button { width: 130px; float: left; text-align: center } #join-button span { font: bold 12px Arial } a.join-button-link { display: block; width: 113px; height: 27px; background: url('/images/dp1/get-started-button-off.gif') no-repeat; margin: 13px auto 0 auto } a:hover.join-button-link { background: url('/images/dp1/get-started-button-on.gif') no-repeat } p.join-notice-text { font: 11px Arial; color: #555; margin: 17px 0 0 30px } .testimonial { margin: 0 0 10px 0 } .testimonial-name { margin: 0 0 5px 0 } .testimonial-quote { padding: 5px } .fresh-list-img { width: 48px; height: 48px } #community-today { margin: 10px 0 0 0 } .community-today-post { margin: 0 0 15px 0; padding: 3px 5px 15px 5px; border-bottom: 1px solid #ddd } #new-users { margin: 10px 0 0 0 } .new-user { margin: 0 0 10px 0; padding: 0 0 10px 0; border-bottom: 1px solid #ddd } .feedback-notification { padding: 10px; border: 1px solid #ccc; margin: 10px 0 } .applause { padding: 10px; margin: 0 0 10px 0; border: 1px solid #ccc } .applause-left { float: left; width: 18px; margin-right: 15px } .applause-right { float: left; width: 200px } .DealComparePriceCont { margin: 15px 0 15px 5px } table.PGPriceCompareTable { border: 1px solid #d5d5d5; width: 100%; text-align: center; color: #666; border-collapse: collapse; font-size: 11px; background: white } table.PGPriceCompareTable td { border: 1px solid #d5d5d5; padding: 5px } table.PGPriceCompareTable td.pg-price-cell { width: 125px } table.PGPriceCompareTable a.see-it { color: #034492; font-size: 12px; text-decoration: underline } .pg-compare-bubble { background: url('/images/dp1/compare_savings_bubble.gif') no-repeat; width: 190px; height: 29px } .prod-page { margin: 10px } .prod-page-image { float: left; margin: 0 10px 0 0; width: 135px } img.prod-page-img { padding: 5px; border: 1px solid #ddd } .prod-page-deal { padding: 15px 0; border-bottom: 1px solid #ddd } .prod-page-deal-user { float: left; width: 50px; margin-right: 10px } .prod-page-deal-info { float: left; width: 510px } .prod-page-deal-time { float: left; margin: 1px 5px 0 0 } .prod-page-deal-time { float: left } .verification-notice { float: left; width: 500px } .verification-image { float: left; width: 350px; margin-left: 45px } .notification-resend { border-top: 1px solid #ddd; margin: 10px 0 0 0; padding: 10px 0 0 0 } .associate-section { float: left; width: 190px; margin: 0; padding: 5px 0 5px 0 } .notification-stores-tabs { margin: 0; padding: 0 15px 15px 15px } .notification-store-tip { border-bottom: 1px solid #eee; padding: 0 0 5px 0; margin: 0 0 5px 15px } .notification-tab-content { border-bottom: 1px solid #ccc; padding-top: 10px } .notification-added-stores { padding: 0 } .added-stores { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 0 } .popular-coupon-top { background: #eef6e2 } .popular-coupon-list { list-style: none; list-style-position: inside; float: left; padding: 0 35px 0 0; width: auto; margin: 0; line-height: 18px } .popular-coupon-top-header { float: left; margin: 0; background: #eef6e2 url('/images/dp1/coupon_top_arrow.gif') no-repeat center right; width: 85px; height: 60px; text-align: left; font: bold 16px Arial; padding: 20px 0 0 20px } .popular-coupon-top-list { float: left; height: 67px; width: 545px; padding: 13px 20px 0; background: #dfead0 } .popular-coupon-top-search { float: left; width: 250px; padding: 9px 10px 9px 20px; background: #eef6e2 } .alertExampleText { margin: 0 0 0 90px } .couponBoxGrey { border: 1px solid #C3CDD6; padding: 10px 15px; margin: 0 0 15px } .couponBoxAlert { border: 2px solid #3a93a3; padding: 8px; margin: 0 0 15px } .couponBoxGrey2 { border: 1px solid #C3CDD6; padding: 10px 0; margin: 0 0 15px; min-height: 160px } .couponBoxAlertLogo { width: 150px; text-align: center; vertical-align: middle; padding-right: 15px } a.iPhone4Giveaway { display: block; background: url('/images/dp2/retweet_give-a-way_ad.jpg') no-repeat 0 0; color: white; float: right; height: 66px; width: 239px } a:hover.iPhone4Giveaway { background: url('/images/dp2/retweet_give-a-way_ad.jpg') no-repeat 0 -66px; text-decoration: none } .zoodak-code { text-align: center; padding: 5px 0; font: normal 12px Arial } a.dell-contest-logo { background: transparent url(/images/dp1/contest_dell_logo_07312009.gif) no-repeat; display: block; width: 92px; height: 42px; position: absolute; margin: 85px 0 0 10px } a.sears-contest-logo { background: transparent url(/images/dp1/contest_sears_logo_08032009.gif) no-repeat; display: block; width: 87px; height: 39px; position: absolute; margin: 85px 0 0 10px } a.hp-contest-logo { background: transparent url(/images/dp1/contest_hp_logo_08102009.gif) no-repeat; display: block; width: 87px; height: 39px; position: absolute; margin: 85px 0 0 10px } table.front-popular-coupon { width: 603px } table.front-popular-coupon td { width: 25% } td.front-coupon-logo { height: 50px; padding: 5px; vertical-align: middle; text-align: center; border: 1px solid #ddd; background-color: white } td.front-coupon-desc { vertical-align: top; text-align: center; padding: 3px 0 0 } .front-popular-computer { float: right; padding: 0 10px 0 0; line-height: 22px; color: #aaa; font-size: 16px } .front-popular-computer a { font-size: 12px } td.front-top-5-plus { border-top: 1px solid #eee; padding: 8px 0 5px; vertical-align: top; width: 58px; text-align: center } td.front-top-5-desc { border-top: 1px solid #eee; padding: 7px 0 5px; vertical-align: top } .google-ad-coupon { width: 577px; background-color: white; padding: 5px 0 5px 20px } .question_table td { background-color: #F0F0F0; vertical-align: top; padding-top: 10px } #fordGiveaway { background-position: -311px -508px; width: 200px; height: 25px; display: block; position: absolute; left: 749px; top: 6px } #fordGiveaway:hover { background-position: -311px -534px } .GoogleAFC .url { color: #111 } .GoogleAFC .url:hover { text-decoration: none } .GoogleAFC div { padding-bottom: 8px } .GoogleAFC .title { font-size: 14px; font-weight: bold; text-decoration: underline } .GoogleAFC2 { padding: 5px; background-color: #edf5eb; margin-bottom: 5px } .GoogleAFC2 .url { color: #111 } .GoogleAFC2 .url2 { color: #5e89bd } .GoogleAFC2 .url:hover { text-decoration: none } .GoogleAFC2 div { padding-bottom: 4px } .GoogleAFC2 .title { font-size: 14px; font-weight: bold; text-decoration: underline } .googleDealTop { padding: 0 5px; margin: 0 0 15px 5px; background-color: #ECEFF5 } .googleDealBottom { border: 1px solid #ddd; border-width: 1px 0 1px; padding: 15px 5px; margin-top: 15px } .twitterGiveaway { width: 300px; padding-bottom: 10px } .twitterGiveaway div.topsy { float: left; width: 60px } .facebookLikeBox { background-color: #eceff5; border-top: 1px solid #94a3c4; padding: 5px; width: 290px; margin-bottom: 10px; height: 80px } .facebookLikeBox .fTitle { font-weight: bold; color: #3b5998; padding-bottom: 5px } .moreCouponsSocial { background-color: #eceff5; padding: 8px 5px 0 8px; float: left; width: 226px; height: 54px; line-height: 19px } .moreCouponsSocial span { font-size: 13px; font-weight: bold; color: #3b5998; float: left; width: 152px; display: block } .moreCouponsSocial a.facebook { display: block; background: transparent url('/images/dp2/sprite.png?30') no-repeat -81px 0; width: 30px; height: 30px; float: left; margin: 0 5px 0 5px } .moreCouponsSocial a.twitter { display: block; background: transparent url('/images/dp2/sprite.png?30') no-repeat -111px 0; width: 30px; height: 30px; float: left } .topsyInline { float: left; width: 100px; height: 18px; overflow: hidden } .joinUsDiv { width: 300px; margin-bottom: 10px } .joinUsTitle { background-color: #374375; color: white; font-size: 14px; font-weight: bold; padding: 5px 10px } .joinUsContent { background-color: #e3e7ea; position: relative; height: 60px } .joinUsContent .facebookBox { position: absolute; left: 0 } .joinUsContent .twitterBox { position: absolute; top: 10px; left: 208px; width: 90px } .joinUsContent a.twitter { display: block; background: transparent url('/images/dp2/sprite.png?30') no-repeat -111px 0; width: 30px; height: 30px; float: left; margin-right: 7px } .weeklySponsor { width: 300px; margin-bottom: 10px } .weeklySponsor .title { font-size: 13px; font-weight: bold; padding: 5px 10px; background-color: #6686A2; color: white } .weeklySponsor .title a { color: white } .weeklySponsor .content { background-color: #f3f5f7; padding: 5px } .weeklySponsor .topLink { display: block; font-size: 14px; font-weight: bold; padding: 5px } #MMRightBanner { background: transparent url('/images/dp2/MM_300ad.png') no-repeat; width: 300px; height: 124px; color: white } #MMRightBanner .inner { padding: 12px 10px 10px 12px; font-size: 14px; line-height: 20px } #MMRightBanner a { color: #efffd4 } #MMFrontRightBanner { background: transparent url('/images/dp2/MMFrontPagebackground.gif') no-repeat; width: 300px; height: 121px; color: white; margin-bottom: 15px } #MMFrontRightBanner .inner { padding: 12px 10px 10px 12px; font-size: 13px; line-height: 17px } #MMFrontRightBanner a { color: #efffd4 } #widgetPromoBanner { background: transparent url('/images/dp2/widget_background.gif') no-repeat; width: 300px; height: 114px; color: #424141 } #widgetPromoBanner .inner { padding: 12px 10px 10px 12px; font-size: 13px; line-height: 18px } #widgetPromoBanner a { color: #4b769b } #MMTopBanner { border: 1px solid #f0d85b; background-color: #fffdf1; padding: 5px; margin-bottom: 10px } #MMGreenBox { border: 2px solid #3aba3a; background-color: #f4fff4; width: 276px; padding: 10px; margin-bottom: 15px } #MMGreenBox i { display: block; background: transparent url('/images/dp2/MM.gif?30') no-repeat 0 0; width: 51px; height: 30px; margin-right: 8px; float: left } #MMGreenBox h3 { font-size: 15px; line-height: 30px } table#listRecentQuestions { font-size: 11px; color: #999 } table#listRecentQuestions img { margin: 2px 5px 0 0 } table#listRecentQuestions td { vertical-align: top; padding: 5px 3px; border-top: 1px solid #EEE } table#listRecentQuestions a { font-size: 12px; font-weight: bold; color: #526E83 } .askLinkBoxSmall { display: block; float: right; background-color: #11578B; color: white; padding: 3px 10px; font-weight: bold } .smallHeartH4 { background: transparent url('/images/dp2/heartSm.gif?30') no-repeat 0 15px; padding-left: 25px; float: right; margin-top: 30px; font-size: 14px } .reportUser { padding: 5px; display: block; color: #777 } .googlePlusTable td { vertical-align: middle } .googlePlusTable .gButton { width: 60px } html,body { margin: 0; padding: 0; height: 100%; text-align: center; font-family: Arial, 'Lucida Grande', Tahoma, Verdana, 'Trebuchet MS', Sans-serif; font-size: 12px; color: #111 } #container { margin: 10px auto 20px; width: 950px; min-height: 350px } #main_content { text-align: left; padding-left: 5px } #header { background-color: #6484a1; height: 105px; background: url('/images/dp2/bg_pattern_01192010.gif') repeat } #header .box { margin: 0 auto; width: 950px; position: relative } #tagline { position: absolute; font: normal 12px Georgia; color: white; margin: 13px 0 0 39px; left: 0 } #logo { position: absolute; left: 3px; top: -2px } #search { width: 673px; float: right; margin: 12px 0 0; position: relative } #top-search { height: 88px; position: relative; float: right; width: 670px; margin: 14px 0 0 5px } #top-search .dealOn { background-position: 0 0 } #top-search .dealOff { background-position: 0 -70px; height: 21px } #top-search .couponOn { background-position: 0 -35px } #top-search .couponOff { background-position: 0 -95px; height: 21px } #top-search span { cursor: pointer; display: block; line-height: 21px; width: 81px; height: 31px; font: bold 14px Arial; text-align: center; padding: 4px 0 0; z-index: 1 } #top-search a { text-decoration: none; color: #036 } #top-search a:hover { color: #069 } #selectDeals { position: absolute; top: 0px; left: 0px } #selectCoupons { position: absolute; top: 0px; left: 80px } #search_div input { position: absolute; top: 24px; left: -14px; background: #efeff0 url('/images/dp2/search_input_bg_01192010.gif') repeat-x top left; border-top: 1px solid #446786; border-bottom: 1px solid #446786; border-left: 1px solid #446786; border-right: none; width: 428px; height: 34px; color: #bfbfbf; font: bold 24px Arial; padding: 6px 0 3px 5px } #topSearchKeywords { position: absolute; top: 73px; left: -1px; font-size: 11px } #topSearchKeywords a { color: white; padding: 0 3px } #top_search_bttn { position: absolute; top: 24px; left: 420px; background-position: 0 -120px; border-width: 0; font: bold 20px Arial; color: white; padding-left: 30px; width: 122px; height: 45px; cursor: pointer } #top_search_bttn:hover { background-position: 0 -165px } #submitButton { position: absolute; display: block; top: 24px; left: 557px; background-position: 0 -210px; width: 87px; height: 34px; font: bold 20px Arial; color: white; padding: 11px 0 0 26px; border-width: 0 } #submitButton:hover { background-position: 0 -255px } #topNavContainer { background: #162048; min-width: 100%; width: 100%; height: 30px; border-top: 1px solid #323663 } #topNavContainer .box { width: 945px; padding-left: 5px; margin: 0 auto; background: transparent; text-align: left } #topMenu { float: left; margin: 0; padding: 0; width: auto } #topMenu li { float: left; list-style-image: none; list-style-position: outside; list-style-type: none; text-align: center; margin-right: 3px } #topMenu li a { display: block; padding: 6px 15px 8px 15px; font: bold 14px Arial; color: white } #topMenu li.activeTab a { color: #1D2C5A; position: relative; background-color: #E1E5E9; margin-top: -4px; cursor: pointer; padding: 9px 14px } #topMenu li a:hover { text-decoration: none; color: #7f869b; cursor: pointer; position: relative } #userMenu { float: right; margin: 0; padding: 0; width: auto; font-size: 11px } #userMenu li { float: left; list-style-image: none; list-style-position: outside; list-style-type: none; text-align: center } #userMenu li a { border-left: 1px solid #32325c; display: inline-block; width: auto; padding: 2px 15px; margin-top: 3px; color: white } #userMenu li a.firstMenuLink { border-left: 0 } #userMenu li a:hover { text-decoration: none; color: #cff; background-color: #323663 } #userMenu span { font-size: 11px; font-weight: bold; color: #b3d5e9 } #subUserMenu { position: absolute; width: 150px; border: 1px solid #003; background-color: #eee; text-align: left; margin-top: 4px; z-index: 99999; padding: 0 } #subUserMenu li { list-style-image: none; list-style-position: outside; list-style-type: none; text-align: left; height: 30px } #subUserMenu li a { display: block; height: 24px; padding: 6px 0 0 10px; color: #069; border: 0; width: 140px } #subUserMenu li a:hover { background-color: #003; color: white } #top-search .search { float: right; width: 400px; height: 26px; background: transparent; text-align: right } #top-search .search label.search_text { font-weight: bold; color: #555; vertical-align: middle } #top-search .search select.search_type { font: bold 15px Arial; color: #555; vertical-align: middle; border: 1px solid #788e59 } #mainSearchBar { margin: 0 } input.search_input { width: 300px; height: 19px; font: normal 16px Arial; color: #999; vertical-align: middle } #top-search .search input:hover.search_button { background-position: 0 -22px } #top-nav { height: 26px } #menu-top { float: left; height: 26px; color: #ddd } #menu-top .coupon { line-height: 26px; padding: 0 1px; color: #555; font-size: 11px } #menu-top a.tab { display: block; float: left; width: 90px; height: 21px; background: url('/images/menu_tabs_01152010.gif') no-repeat 0 0; font: bold 13px Arial; text-align: center; color: #2c4618; padding: 5px 0 0 0; margin: 0 6px 0 0; outline: none } #menu-top a:hover.tab { text-decoration: none } #menu-top a.selected { background: url('/images/menu_tabs_01152010.gif') no-repeat 0 -26px; font: bold 14px Arial; color: white } #menu-top a.giveawayTab { background: url('/images/menu_tabs_01152010.gif') no-repeat 0 -78px; width: 97px; padding-left: 17px; font-weight: bold } #menu-top a.giveawayTabSelected { background: url('/images/menu_tabs_01152010.gif') no-repeat 0 -104px; width: 97px; padding-left: 17px; color: white } #menu-top a.blackTab { background: url('/images/menu_tabs_01152010.gif') no-repeat 0 -52px; width: 127px; color: white; font-weight: normal } #menu-top a.xmasTab { background: url('/images/menu_tab_xmas.gif') no-repeat; background: transparent url(/images/menu_tab_xmas.gif) no-repeat scroll 0 0; color: white; font-weight: bold; height: 20px; margin-top: -6px; padding: 12px 0; width: 163px } #menu-top a.hovered { background: url('/images/menu_tabs_01152010.gif') no-repeat 0 -26px; font: bold 14px Arial; color: white } #menu-top .header-coupons-ads { float: right; margin: 10px 0 0 0 } #subNav { background-color: #e1e5e9; height: 27px } .menu-cat { width: 950px; margin: 0 auto; text-align: left; padding: 0 0 0 18px; display: block } .menu-cat ul.menu,li.cat-drop { list-style-image: none; list-style-position: outside; list-style-type: none; margin: 0; padding: 0 } .menu-name-nodrop { padding-left: 9px !important; padding-right: 9px !important } li.cat-drop { width: auto; margin-right: 5px; float: left } a.cat-link { display: block; position: relative; float: left; font: bold 12px Arial; background: none } a.cat-link strong { display: block; color: #024379; background: none; padding: 6px 20px 6px 5px; width: auto; border-left: 2px solid #e1e5e9; font-weight: normal } a.cat-link em { display: block; height: 27px; width: 15px; position: absolute; top: 0; right: 0; text-indent: -2000em } a.cat-link:hover { outline: none; text-decoration: none; color: #333; background-color: #c5cdd4 } li.selected a.cat-link strong { outline: none; text-decoration: none; color: #1d2c5a; background-color: #c9d6e1; font-weight: bold } a.cat-link:hover strong { cursor: pointer; display: block } a.cat-link:hover em,li.selected em,li.selected a.cat-link em { background: transparent url('/images/dp2/sprite.png?30') no-repeat -133px -746px; display: block; cursor: pointer; background-color: #c2d2dc } li.cat-drop strong { padding-right: 22px } div.submenu-drop { display: none } .submenu-drop { display: none; float: none; position: absolute; text-align: left; margin-left: 0; top: 163px; width: auto; z-index: 999999 } .submenu-drop .left { float: left; height: 320px; width: 3px } .submenu-drop .mid-horiz { float: left; height: 305px; width: auto; padding: 0 0 10px; border-left: 2px solid #e1e5e9; border-right: 2px solid #e1e5e9; border-bottom: 2px solid #e1e5e9; background: #c5cdd4 } .submenu-drop .right { float: left; height: 320px; width: 3px } .submenu-drop .top { height: 4px; width: 175px } .submenu-drop .mid { height: auto; width: 171px; padding: 0 0 10px; border-left: 2px solid #e1e5e9; border-right: 2px solid #e1e5e9; border-bottom: 2px solid #e1e5e9; background: #c5cdd4 } .submenu-drop .bot { height: 4px; width: 175px } .submenu-drop a.submenu-option { display: block; background: transparent; padding: 7px 10px 7px; outline: none; color: #034492; line-height: 16px } .submenu-drop a.submenu-option:hover { background: #f5fbff; text-decoration: none } .submenu-drop .cat-section { float: left; border-right: 1px solid #e1e5e9; height: 315px; width: 160px; margin: 0; padding: 0 } .sortBar { height: 26px; width: 625px; margin: 0 auto 10px; text-align: left; background-color: #E3E7EA } .sortBarArrow { height: 6px; width: 970px; background: #74B543 url('/images/sort_arrow.gif') no-repeat 27px 100% } .frontPop { padding: 0 0 0 0; float: left; width: 490px } .frontPop .faqLink { float: left; padding-top: 5px } .popTitle { font: bold 12px Arial; float: left; margin: 1px 0; padding: 4px 5px 0 0 } .popMenu { float: left; list-style-type: none; margin: 0; padding: 0; white-space: nowrap } .popMenu .popOpt { float: left; margin: 0 10px 0 0; padding: 5px 6px; text-align: center } .popMenu .popOptSel { background: #6686a2 } .popMenu .popOptSel a { color: white } .popMenu .popOpt a.popOptLink { display: block; font: 12px Arial; padding-top: 1px; color: #024379 } .popMenu .popOptSel a.popOptLink { font-weight: bold; color: white } .popSubMenu { font-size: 13px; color: #ccc; float: left; padding-left: 5px } .popSubMenu .selected { color: #333; font-weight: bold } .sortOptions { padding: 4px 10px 0 0; float: right } .sortTitle { font: bold 12px Arial; display: block; float: right; margin: 2px 0 0 } .sortMenu { float: right; list-style-type: none; margin: 0; padding: 0; white-space: nowrap } .sortOpt,.sortOptT { float: left; margin-left: 5px; font-size: 11px; line-height: 16px } .sortMenu .sortOptT .sortOptExp { vertical-align: middle } .sortOpt a { display: block; height: 19px; width: 19px } a.sortBtnGridOff { background-position: 0 -1118px } a.sortBtnGridOn,a:hover.sortBtnGridOff { background-position: -19px -1118px } a.sortBtnRowOff { background-position: -38px -1118px } a.sortBtnRowOn,a:hover.sortBtnRowOff { background-position: -57px -1118px } a.sortBtn20Off { background-position: 0 -1137px } a.sortBtn20On,a:hover.sortBtn20Off { background-position: -19px -1137px } a.sortBtn40Off { background-position: -38px -1137px } a.sortBtn40On,a:hover.sortBtn40Off { background-position: -57px -1137px } a.sortExpShow,a.sortExpHide:hover { background-position: 0 -1156px } a.sortExpHide,a.sortExpShow:hover { background-position: -19px -1156px } .content_bg { width: 990px; height: auto; background: transparent url('/images/bg_content.png') repeat-y; margin: 0 auto } .content .single-col { width: auto; margin: 10px 20px 20px 0; background: white; text-align: left } .content .content_left { float: left; width: 625px; margin: 10px 0 0 0 } .content .content_right { float: right; width: auto; padding: 10px 0 0 0; background-color: white } .content .content_left3 { float: left; width: 700px; padding: 10px 0 0 0; background: white } .content .content_left4 { float: left; width: 625px; padding: 10px 0 0 0; background: white } .content .content_right3 { float: right; width: auto; padding: 10px 0 0 0; background: white } .content .content_right4 { float: right; width: auto; padding: 10px 0 0 0; background: white } .content .content_right2 { float: right; width: 625px; padding: 10px 0 0 0; background-color: white } .content .content_left2 { float: left; width: auto; padding: 10px 0 0 0; background-color: white } .content_bot { width: 990px; height: 18px; background: url('/images/bg_content_bot.png') no-repeat; margin: 0 auto } .content .verticle-deals { height: 600px; overflow: auto } .verticle-deals table td { border-bottom: 1px solid #eee; padding-top: 15px; padding-bottom: 15px } #footer { background-color: #003; background: url('/images/dp2/bg_pattern_01192010.gif') repeat; border-top: 35px solid #003; color: white; font-size: 11px } #footer .box { padding-left: 5px; text-align: left; width: 945px; margin: -15px auto 0; color: white; background-color: #263E58 } #footer h3 { color: white } #footer a { color: #cff } #footer .column { float: left; width: 160px; height: 310px; margin: 10px 10px 0 0; padding-right: 10px; border-right: 1px solid #445669; line-height: 18px } #copyright { font: 11px 'Lucida Grande', Tahoma; text-align: center; padding: 30px 0 5px } div.frontCoupon { padding-top: 3px !important; padding-bottom: 15px !important } .popCoupon { color: purple } .popCouponDiv { padding: 0 0 5px 2px } .popCouponDiv .box { border-bottom: 1px solid #ddd; padding: 10px 0 0 } .popCouponDiv .storeLogo { padding: 0 0 10px } .popCouponDiv a { font-size: 14px } .popCouponContent { color: #333; padding: 3px 0 } .popStoreTable { width: 276px } .popStoreTable td { border-bottom: 1px dashed #ddd; padding: 5px 0; height: 55px } .popStoreTable .tdLogo { text-align: center; width: 200px } .popStoreTable .tdTweet { text-align: right; width: 50px; overflow: hidden } .frontCoupon .view-more { padding: 5px 10px 0 0 } .popularCoupons { text-align: center } .popularCoupons a { line-height: 125%; color: #526e83; padding: 0 3px } .popularCoupons .selectedCoupon { background-color: #abbfcd; padding: 0 5px 1px; color: white } .popularCoupons .selectedCoupon:hover { background-color: #c8d5de; text-decoration: none } div.plusButtonInline { width: 103px; height: 21px; padding-bottom: 1px } div.plusButtonAbove { width: 50px; height: 61px } .plusButtonCount { text-align: center } .plusButtonInline .plusButtonCount { float: left; margin-right: 3px; display: block; width: 50px; height: 19px; text-decoration: none; line-height: 19px; background: transparent url('/images/dp2/sprite.png?30') no-repeat scroll 0 -373px } .plusButtonInline .plusButtonCount:hover { background-position: 0 -393px } .plusButtonAbove .plusButtonCount { display: block; width: 50px; height: 41px; text-decoration: none; background: url('/images/dp2/sprite.png?30') no-repeat 0 -437px; margin-bottom: 1px } .plusButtonAbove .plusButtonCount:hover { background-position: 0 -479px } .plusButtonCount span { line-height: 19px; color: #4e5e6c; text-decoration: none } .plusButtonInline .plusButtonCount span { width: 48px; font: bold 16px Arial; line-height: 19px; margin-right: 2px } .plusButtonAbove .plusButtonCount span { width: 50px; font-size: 22px; line-height: 36px } .PlusButtonLink { height: 19px; background: url('/images/dp2/sprite.png?30') no-repeat 0 -311px; text-decoration: none; display: block; width: 50px; float: left } a:hover.PlusButtonLink { background-position: 0 -332px } .PlusButtonLink.plussed,.PlusButtonLink.plussed:hover { background-position: 0 -353px } a.plus-lg { display: block; width: 53px; height: 29px; padding-top: 5px; color: #111838; background-position: 2px -521px; text-align: center; font: bold 14px Arial, Tahoma; line-height: 9px } a:hover.plus-lg { text-decoration: none } span.plus-lg-text { font: normal 10px Arial; color: #111838; text-decoration: none } div.tweet-button { width: 50px; height: 57px } a.tweet-count { display: block; width: 50px; height: 33px; padding-top: 4px; background: url('/images/dp1/tweet_07092009.gif') no-repeat 0 0; text-align: center; color: #333; font-size: 10px } a:hover.tweet-count { text-decoration: none } span.tweet-number { font: 16px Arial } a.tweet-link { display: block; width: 50px; height: 15px; padding-top: 5px; background: url('/images/dp1/tweet_07092009.gif') no-repeat 0 -37px; text-decoration: none; text-align: center; color: white; font-size: 11px } a:hover.tweet-link,a.tweeted { background: url('/images/dp1/tweet_07092009.gif') no-repeat 0 -57px; text-decoration: none; color: #6c9e1d } blockquote { border: 1px solid #ccc; background: #f3f3f3; padding: 10px } .error,.notice,.success { border: 2px solid #DDD; margin-bottom: 1em; padding: 0.8em } .error { background: #FBE3E4 none repeat scroll 0 0; border-color: #FBC2C4; color: #8A1F11 } .notice { background: #FFF6BF none repeat scroll 0 0; border-color: #FFD324; color: #514721 } .success { background: #E6EFC2 none repeat scroll 0 0; border-color: #C6D880; color: #264409 } a.arrow-up { background: url('/images/icon/arrow_up.gif') no-repeat scroll 0%; width: 11px; height: 17px; padding-right: 10px; margin-left: 4px; background-position: 0 2px; cursor: pointer } a.arrow-down { background: url('/images/icon/arrow_down.gif') no-repeat scroll 0%; width: 11px; height: 17px; padding-right: 10px; margin-left: 4px; background-position: 0 2px; cursor: pointer } .file-icon-map { background: url('/images/icon/file-icon-map.gif') no-repeat scroll 0%; float: left; padding-left: 25px; line-height: 28px; outline: none; clear: both } .file-gif { background-position: 0 3px; font-size: 14px } .file-pdf { background-position: 0 -19px; font-size: 14px } .file-jpg { background-position: 0 -41px; font-size: 14px } .iconUcp { background: url('/images/icon/icon_usercp_10092009.gif') no-repeat scroll 0%; padding-left: 17px; display: inline } .ucpInboxHov { background-position: 0 -37px } .ucpSettingsHov { background-position: 0 -0px } .ucpSubmitHov { background-position: 0 -20px } .ucpInviteHov { background-position: 0 -72px } .ucpLogoutHov { background-position: 0 -54px } .ucpProfileHov { background-position: 0 -89px } .ucpAlertHov { background-position: 0 -107px } .ucpInbox { background-position: 0 -162px } .ucpSettings { background-position: 0 -125px } .ucpSubmit { background-position: 0 -145px } .ucpInvite { background-position: 0 -197px } .ucpLogout { background-position: 0 -179px } .ucpProfile { background-position: 0 -214px } .ucpAlert { background-position: 0 -232px } .icon_ucp_white { background: url('/images/icon/icon_map_usercp-white.gif') no-repeat scroll 0%; padding-left: 18px; display: inline } .icon_ucp_green { background: url('/images/icon/icon_map_usercp-green.gif') no-repeat scroll 0%; padding-left: 18px; display: inline } .inbox { background-position: 0 -82px } .inbox_hov { background-position: 0 -67px } .settings { background-position: 0 -20px } .settings_hov { background-position: 0 -2px } .submit { background-position: 0 -52px } .submit_hov { background-position: 0 -37px } .invite { background-position: 0 -143px } .invite_hov { background-position: 0 -128px } .logout { background-position: 0 -113px } .logout_hov { background-position: 0 -97px } .profile { background-position: 0 -171px } .profile_hov { background-position: 0 -157px } .applaud-link { background: url('/images/icon/applaud_on.gif') no-repeat scroll 0%; padding-left: 15px; outline: none; font-size: 11px } .applaud-link-off { background: url('/images/icon/applaud_off.gif') no-repeat scroll 0%; padding-left: 15px; outline: none; color: #999; font-size: 11px } .mag-glass { background: url('/images/dp1/mag_glass.gif') no-repeat scroll 0%; padding-left: 15px; outline: none; color: #585E74 } .compare-prices { background: url('/images/icon/compare_prices.gif') no-repeat scroll 0%; padding-left: 15px; outline: none } .check-mark { background: url('/images/icon/checkmark.png') no-repeat scroll 0%; background-position: 0 2px; padding-left: 13px; outline: none } .x-mark { background: url('/images/icon/xmark.png') no-repeat scroll 0%; background-position: 0 2px; padding-left: 13px; outline: none } .rss-icon-sm { background: url('/images/icon/feed8.png') no-repeat scroll 0%; background-position: 0 2px; padding-left: 13px; outline: none } .rss-icon-md { background: url('/images/icon/feed-16.png') no-repeat scroll 0%; background-position: 3px 0; padding-left: 20px; display: block; float: left; height: 16px; outline: none } .single-balloon { background: url('/images/icon/balloon.gif') no-repeat scroll 0%; padding-left: 15px; outline: none } .balloon-pencil { background: url('/images/icon/balloon_pencil.gif') no-repeat scroll 0%; padding-left: 20px; outline: none } .icon_map-thumbs { background: url('/images/icon/dp_icon_map-thumbs.gif') no-repeat scroll 0%; padding-left: 10px; outline: none } .thumbs-up-c { background-position: 0 1px } .thumbs-down-c { background-position: 0 -13px } .thumbs-up-g { background-position: 0 -28px } .thumbs-down-g { background-position: 0 -42px } a.icon_map-thumbs-md,span.icon_map-thumbs-md { background: url('/images/icon/icon_map_thumbs.gif') no-repeat scroll 0%; font: bold 14px Arial; height: 25px; line-height: 25px; outline: none; padding: 3px 0 0 25px } a.thumbs-up-md-c { background-position: 0 -25px } a:hover.thumbs-up-md-c { background-position: 0 -69px } a.thumbs-down-md-c { background-position: 0 -3px } a:hover.thumbs-down-md-c { background-position: 0 -47px } span.thumbs-up-md-g { background-position: 0 -113px } span.thumbs-down-md-g { background-position: 0 -91px } a.iconMapThumbsMd { background: url('/images/icon/icon_map_thumbs.gif') no-repeat scroll 0%; height: 25px; line-height: 25px; outline: none; padding: 5px 0 0 22px } a.thumbsMdUC { background-position: 0 -25px } a:hover.thumbsMdUC { background-position: 0 -69px } a.thumbsMdDC { background-position: 0 -3px } a:hover.thumbsMdDC { background-position: 0 -47px } a.thumbsMdUG { background-position: 0 -113px } a:hover.thumbsMdUG { background-position: 0 -69px } a.thumbsMdDG { background-position: 0 -91px } a:hover.thumbsMdDG { background-position: 0 -47px } .icon_map-thumbs-lg { background: url('/images/dp2/icon-thumbs-lg.gif?v=5') no-repeat scroll 0%; font: bold 14px Arial; height: 40px; line-height: 40px; padding: 5px 0 7px 25px; outline: none; font-weight: bold; color: #2c4618 } a.thumbs-up-lg-c { background-position: 0 1px } a:hover.thumbs-up-lg-c { background-position: 0 -53px } .thumbs-up-lg-c-checked { background-position: 0 -107px } a.thumbs-down-lg-c { background-position: 0 -24px } a:hover.thumbs-down-lg-c { background-position: 0 -78px } .thumbs-down-lg-c-checked { background-position: 0 -132px } span.thumbs-up-lg-g { background-position: 0 -161px } span.thumbs-down-lg-g { background-position: 0 -186px } .iconThumbsMed { display: block; width: 23px; text-decoration: none; font-weight: bold; padding: 1px } .iconThumbsMed em { background: url('/images/dp2/icon-thumbs-lg.gif?v=5') no-repeat scroll 0%; height: 21px; line-height: 21px; display: block } .iconThumbsMed strong { display: block; width: 100%; text-align: center } .iconThumbsMed:hover { text-decoration: none } .thumbUpMedC { border: 1px solid #a4cc8c; background-color: #F0FFE7; color: #4C8627 } .thumbDownMedC { border: 1px solid #E7B4B6; border-top-width: 0; background-color: #f8eeef; color: #92191f } .thumbUpMedC em { background-position: 5px -214px } .thumbDownMedC em { background-position: 5px -232px } .thumbUpMedChecked { border: 1px solid #ccc; background-color: #efefef; color: #888 } .thumbDownMedChecked { border: 1px solid #ccc; border-top-width: 0; background-color: #efefef; color: #888 } .thumbUpMedChecked em { background-position: 5px -289px } .thumbDownMedChecked em { background-position: 5px -308px } .thumbUpMedC:hover { background-color: #dcf2cf } .thumbDownMedC:hover { background-color: #f4d7d8 } .dp_icon_map_g { background: url('/images/icon/dp_icon_map_g.gif?v=10') no-repeat scroll 0%; padding-left: 19px; float: left; line-height: 22px; outline: none; clear: both } .dp_icon_map_c { background: url('/images/icon/dp_icon_map_c.gif?v=10') no-repeat scroll 0%; padding-left: 19px; float: left; line-height: 22px; outline: none; clear: both } .dp_icon_map_c_g { background: url('/images/icon/dp_icon_map_c.gif?v=10') no-repeat scroll 0%; padding-left: 19px; line-height: 22px; outline: none; clear: both } .icon-friends { background-position: -5px -2px } .icon-friends-sm { background-position: -5px -2px } .icon-plus { background-position: -5px -22px } .icon-flag { background-position: -5px -47px } .icon-flag-sm { background-position: -5px -43px } .icon-update { background-position: -5px -69px } .icon-update-sm { background-position: -5px -66px } .icon-alert { background-position: -5px -93px } .icon-alert-sm { background-position: -5px -88px } .icon-share { background-position: -5px -110px } .icon-share-sm { background-position: -5px -111px } .icon-coupon { background-position: -5px -132px } .icon-deal { background-position: -5px -157px } .icon-balloon { background-position: -5px -177px; margin-top: -1px } .icon-balloon2 { background-position: -5px -180px; padding-left: 20px; float: none; cursor: pointer } .icon-arrow-left { background-position: -5px -219px } .icon-arrow-right { background-position: -5px -241px } .icon-compare-prices { background-position: -5px -198px } .icon-compare-prices-on { background-position: -5px -264px } .icon-list { background-position: -5px -287px } .icon-arrow-up { background-position: -5px -307px } .icon-magglass { background-position: -5px -330px } .icon-balloons { background-position: -5px -353px } .icon-applaud { background-position: -5px -373px } .icon-arrow-down { background-position: -5px -420px } .icon-xmark { background-position: -5px -440px } .icon-checkmark { background-position: -5px -462px } .icon-home { background-position: -5px -483px } .icon-topic { background-position: -5px -506px } .icon-message { background-position: -5px -528px } .icon-save { background-position: -5px -551px } .icon-move { background-position: -5px -572px } .icon-fans { background-position: -5px -594px } .icon-inbox { background-position: -5px -617px } .icon-message-all { background: url('/images/icon/dp_icon_map_c.gif?v=10') no-repeat scroll -5px -640px; padding-left: 19px; line-height: 22px } .icon-deal-popular { background-position: -5px -661px } .icon-deal-coupon { background-position: -5px -679px } .icon-deal-repost { background-position: -5px -697px } .icon-deal-expired { background-position: -5px -716px } .icon-alert-balloon { background-position: -5px -733px } .icon-alert-topic { background-position: -5px -756px } .icon-alert-deal { background-position: -5px -779px } .icon-alert-list { background-position: -5px -804px } .icon-list-add { background-position: -5px -844px } .icon-printer { background-position: -5px -867px } .icon-circular { background-position: -5px -889px } .icon-sazze { background-position: -5px -910px } .iconMap { background: url('/images/dp2/sprite.png?30') no-repeat } .iconBalloon { background-position: -312px -45px !important } .iconBalloonText { background-position: -312px -42px !important; padding: 1px 0 1px 18px; font-size: 11px; line-height: 13px; color: #555 } .RoundIconMap { background: url('/images/icon/round_icon_map.gif?v=4') no-repeat scroll 0%; padding: 0 0 2px 19px; outline: none } .RoundIconCompare { background-position: -312px -4px; padding: 1px 0 1px 18px; line-height: 20px } .RoundIconCompare:hover { background-position: -312px -23px } .RoundIconFacebook { background-position: 0 -44px } .RoundIconEmail { background-position: -312px -267px; padding: 2px 0 2px 20px } .RoundIconFlag { background-position: -312px -226px; padding: 2px 0 2px 20px } .RoundIconEdit { background-position: -312px -247px; padding: 2px 0 2px 20px } .RoundIconAlert { background-position: 0 -132px } .RoundIconAds { background-position: -312px -116px } .RoundIconLocation { background-position: -312px -201px } .RoundIconHour { background-position: -312px -137px } .RoundIconRss { background-position: -312px -159px } .RoundIconDeals { background-position: -312px -179px } .dpSmallIconMap { background: url('/images/icon/dp_icon_map_sm_10232009.gif') no-repeat scroll 0%; padding-left: 10px; outline: none } .dpSmallIconArrowUp { background-position: 0 5px; color: #5b9d00 } .dpSmallIconArrowDown { background-position: 0 -4px; color: #de0000 } .social-icon-map { background: url('/images/icon/social_icon_map.gif') no-repeat scroll 0%; padding-left: 19px; float: left; line-height: 22px; outline: none } .icon-facebook { background-position: 0 -4px } .icon-myspace { background-position: 0 -28px } .icon-twitter { background-position: 0 -52px } .iconTwitterBlock { background-position: 0 -55px; width: 16px; height: 17px; display: block; padding-left: 0 } .iconFacebookBlock { background-position: 0 -7px; width: 16px; height: 17px; display: block; padding-left: 0 } .prod-deal-icon-grid { position: absolute; width: 14px; height: 11px; top: 0px; left: 0px; padding-left: 5px } .deal-tool-tip { width: auto; text-align: left; color: #333; position: absolute; padding: 2px 5px; z-index: 10000; font: 11px Arial; clear: both } .deal-icon-popular { left: 0px } .deal-icon-coupon { left: 18px } .deal-icon-repost { left: 18px } .deal-icon-expired { left: 36px } .tt-popular { background: #68b835; margin: 0 0 0 18px } .tt-repost { background: #fbb939; margin: 0 0 0 36px } .tt-coupon { background: #68bcd1; margin: 0 0 0 36px } .tt-expired { background: #d3d3d3; margin: 0 0 0 54px } ul.stripped { list-style-image: none; list-style-position: outside; list-style-type: none; margin: 0 } .s_tag_icon { margin: 0; padding: 0 } .s_tag_icon ul,li { margin-left: 0; padding-left: 0 } .s_tag_icon li { background: transparent url('/images/icon/store_tag_icon.gif?v=6') no-repeat scroll 0 0; height: 16px; overflow: hidden; padding: 0 0 2px 19px; font-size: 13px; margin: 2px 0 0 0 } .s_tag_icon li.automotive { background-position: 0 0 } .s_tag_icon li.beauty { background-position: 0 -16px } .s_tag_icon li.bed_and_bath { background-position: 0 -32px } .s_tag_icon li.books { background-position: 0 -48px } .s_tag_icon li.car_rental { background-position: 0 -64px } .s_tag_icon li.children_and_baby { background-position: 0 -80px } .s_tag_icon li.clothing { background-position: 0 -96px } .s_tag_icon li.domains_and_web_hosting { background-position: 0 -112px } .s_tag_icon li.electronics { background-position: 0 -128px } .s_tag_icon li.flights { background-position: 0 -144px } .s_tag_icon li.travel { background-position: 0 -144px } .s_tag_icon li.flower { background-position: 0 -160px } .s_tag_icon li.food_and_drinks { background-position: 0 -176px } .s_tag_icon li.games { background-position: 0 -191px } .s_tag_icon li.gifts { background-position: 0 -207px } .s_tag_icon li.grocery_and_drug_stores { background-position: 0 -223px } .s_tag_icon li.halloween { background-position: 0 -240px } .s_tag_icon li.health_care { background-position: 0 -256px } .s_tag_icon li.home_and_garden { background-position: 0 -272px } .s_tag_icon li.hotel { background-position: 0 -288px } .s_tag_icon li.jewelry_and_watches { background-position: 0 -304px } .s_tag_icon li.kitchen { background-position: 0 -320px } .s_tag_icon li.mens_apparel { background-position: 0 -336px } .s_tag_icon li.office { background-position: 0 -352px } .s_tag_icon li.pets { background-position: 0 -368px } .s_tag_icon li.pizza { background-position: 0 -383px } .s_tag_icon li.restaurant { background-position: 0 -400px } .s_tag_icon li.shoes { background-position: 0 -416px } .s_tag_icon li.sports_and_outdoors { background-position: 0 -432px } .s_tag_icon li.tickets { background-position: 0 -448px } .s_tag_icon li.toys { background-position: 0 -464px } .s_tag_icon li.womens_apparel { background-position: 0 -480px } .s_tag_icon li.desktops_and_laptops { background-position: 0 -496px } .s_tag_icon li.circular { background-position: 0 -512px } .s_tag_icon li.printable { background-position: 0 -529px } .s_tag_icon li.grocery { background-position: 0 -546px } .user-level-container { background: transparent url('/images/icon/plus-off.gif') repeat-x; width: 75px; height: 16px; margin-top: 5px } .user-level div { background: transparent url('/images/icon/plus-on.gif') repeat-x; height: 16px } .user-level div.level0 { width: 0px } .user-level div.level1 { width: 15px } .user-level div.level2 { width: 30px } .user-level div.level3 { width: 45px } .user-level div.level4 { width: 60px } .user-level div.level5 { width: 75px } .tabnav { text-align: left; margin: 10px 0 10px 0; font: bold 12px Arial; border-bottom: 1px solid #ccc; list-style-type: none; padding: 3px 0 1px 0 } .tabnav li { display: inline; line-height: 24px } .tabnav li a { padding: 5px 10px; border: 1px solid #ccc; background: url('/images/tab_bg_off1.gif') repeat-x; color: #222; margin: 0 2px 0 0; text-decoration: none; border-bottom: none; outline: none } .tabnav li a:hover { background-color: #fff; color: #608110 } .tabnav li.selected a { background: #fff; color: #608110; position: relative; top: 0; padding-top: 6px; border-bottom: 1px solid #fff } .tabnav-alt { text-align: left; margin: 10px 0 10px 0; font: bold 12px Arial; border-bottom: 1px solid #ccc; list-style-type: none; padding: 3px 0 1px 0 } .tabnav-alt li { display: inline } .tabnav-alt li a { padding: 2px 7px; border: 1px solid #ccc; background: url('/images/tab_bg_off.gif') repeat-x; color: #222; margin: 0 2px 0 0; text-decoration: none; border-bottom: none; outline: none } .tabnav-alt li a:hover { background-color: #fff; color: #7fa71e } .tabnav-alt li.selected { border-bottom: 1px solid #fff; background-color: #fff } .tabnav-alt li.selected a { background-color: #fff; color: #7fa71e; position: relative; top: 2px; padding-top: 4px; background: url('/images/tab_bg_on.gif') repeat-x } .tabnav-lg { text-align: left; margin: 10px 0 10px 0; font: bold 12px Arial; border-bottom: 1px solid #ccc; list-style-type: none; padding: 3px 0 1px 0 } .tabnav-lg li { display: inline } .tabnav-lg li a { font-size: 14px; padding: 3px 7px; border: 1px solid #ccc; background: url('/images/tab_bg_off.gif') repeat-x; color: #222; margin: 0 2px 0 0; text-decoration: none; border-bottom: none; outline: none } .tabnav-lg li a:hover { background-color: #fff; color: #7fa71e } .tabnav-lg li.selected { border-bottom: 1px solid #fff; background-color: #fff } .tabnav-lg li.selected a { font-size: 14px; background-color: #fff; color: #7fa71e; position: relative; top: 1px; padding-top: 4px; background: url('/images/tab_bg_on.gif') repeat-x } .tabnav-coupons { text-align: left; margin: 0; font: bold 12px Arial; list-style-type: none; padding: 16px 0 0 0; background: white } .tabnav-coupons li { display: inline; line-height: 24px } .tabnav-coupons li a { padding: 5px 10px; border: 1px solid #ccc; border-bottom: none; color: #222; margin: 0 2px 0 0; text-decoration: none; outline: none } .tabnav-coupons li a:hover { color: #034492 } .tabnav-coupons li.selected-featured a { background: #c1db9f; color: white; position: relative; top: 0; padding-top: 6px; border: none; font: bold 14px Arial } .tabnav-coupons li.selected-recent a { background: #c0c9fe; color: white; position: relative; top: 0; padding-top: 6px; border: none; font: bold 14px Arial } .grad_lt_red { background: #f5e1e0 url('/images/module_grad_lt_red_bg.gif') repeat-x } .grad_lt_grey { background: white url('/images/module_grad_lt_grey_bg.gif') repeat-x } .grad_red { background: #fa4034 url('/images/module_grad_red_bg.gif') repeat-x } .grad_grey { background: white url('/images/module_grad_grey_bg.gif') repeat-x } .grad_grey2 { background: #efefef url('/images/module_grad_grey2_bg.gif') repeat-x } .grad_green { background: white url('/images/module_grad_green_bg.gif') repeat-x } .grad_lt_green { background: #d3f0be url('/images/module_grad_lt_green_bg.gif') repeat-x } .grad_oj { background: #febf04 url('/images/module_grad_oj_bg.gif') repeat-x } .grad_lt_blue { background: #e3f3ff url('/images/module_grad_lt_blue_bg.gif') repeat-x } #over-box-overlay { background: transparent; position: fixed; top: 0px; left: 0px; z-index: 1000; width: 100%; height: 100%; min-height: 100% } * html #over-box-overlay { background-color: #333; background-color: transparent; background-image: url(/images/x.gif) } #dark-overlay { background-image: url('/images/dp1/overlay.png'); position: fixed; top: 0px; left: 0px; z-index: 90; width: 100%; height: 100%; min-height: 100% } * html #dark-overlay { background-color: #333; background-color: transparent; background-image: url(/images/x.gif) } #over-box { width: 350px; background: #f2f2f3; padding: 10px; border: 2px solid #111034; text-align: center; color: #333 } #over-box-close { position: absolute; top: -17px; right: -17px; cursor: pointer } #video-box { width: 480px; background: #2d2d2d; padding: 10px; border: 5px solid #90bd6d; text-align: center; color: white } #video-close { position: absolute; top: -5px; right: -5px; cursor: pointer } #image-box { width: 600px; background: white; padding: 20px; border: 5px solid #90bd6d; text-align: center; color: white } #image-close { position: absolute; top: -5px; right: -5px; cursor: pointer } div.auto_complete { position: absolute; width: 250px; background-color: #efeff0; margin: 0px; padding: 0px; border: 1px solid #446686; text-align: left; z-index: 99999 } div.auto_complete iframe { display: none; display /**/: block; position: absolute; top: 0; left: 0; z-index: -1; filter: mask(); width: 3000px; height: 3000px } div.auto_complete ul { list-style-type: none; margin: 0px; padding: 0 } div.auto_complete ul li.selected { background-color: #ccc; color: #666 } div.auto_complete ul li { list-style-type: none; display: block; margin: 0; padding: 4px 2px 4px 5px; color: #666; font-size: 16px; cursor: pointer } .ac_loading { background: url('/images/dp1/loading-transparent-whitebg.gif') right center no-repeat } .ac_over { background-color: #ccc; color: #666 } .autoFillResults { float: left } .autoFillCouponDomain { font-weight: normal; font-size: 12px; color: gray } .autoFilldeals { float: right; padding-right: 3px; color: green; font-size: 12px; font-weight: bold } .autoFillcoupons { float: right; padding-right: 3px; color: #639; font-weight: normal; font-size: 12px; font-weight: bold } .comment-sm { width: 495px; margin: 0 0 15px 0; height: auto } .comment-sm .comment-sm-top { width: 495px; height: 8px; background: transparent url('/images/comment_sm_top.gif') no-repeat } .comment-sm .comment-sm-mid { width: 465px; height: auto; background: transparent url('/images/comment_sm_mid.gif') repeat-y; padding: 5px 20px 10px 10px; line-height: 17px } .comment-sm .comment-sm-bot { width: 495px; height: 10px; background: transparent url('/images/comment_sm_bot.gif') no-repeat } .comment-lg { width: 545px; margin: 0 0 15px 0; height: auto } .comment-lg .comment-lg-top { width: 545px; height: 8px; background: transparent url('/images/comment_lg_top.gif') no-repeat } .comment-lg .comment-lg-mid { width: 515px; height: auto; background: transparent url('/images/comment_lg_mid.gif') repeat-y; padding: 5px 20px 10px 10px; line-height: 17px } .comment-lg .comment-lg-bot { width: 545px; height: 10px; background: transparent url('/images/comment_lg_bot.gif') no-repeat } .deal_cmmt_div { background-color: white; text-align: center } .deal_cmmt_div * { vertical-align: middle } .img_i { line-height: 60px } .compare-popup { z-index: 10000 } .compare-popup { width: 408px; margin: 0; height: auto } .compare-popup .c-popup-top { width: 408px; height: 7px; background: transparent url('/images/dp1/comp_prices_top.png') no-repeat } .compare-popup .c-popup-mid { width: 388px; height: auto; background: transparent url('/images/dp1/comp_prices_mid.png') repeat-y; padding: 0 10px 10px 10px; line-height: 17px } .compare-popup .c-popup-bot { width: 408px; height: 12px; background: transparent url('/images/dp1/comp_prices_bot.png') no-repeat } .view_selection_div { display: inline; line-height: 20px; height: 20px; float: right } .sorting-option { height: 20px; vertical-align: middle; line-height: 20px; float: right } a.x-close-button { display: block; float: right; margin: 0 0 0 5px; border: 1px solid #aaa; background: url('/images/icon/xmark-grey.gif') no-repeat; width: 10px; height: 10px } a:hover.x-close-button { text-decoration: none } a:hover.box_a { background-color: #11578b; border: 1px solid #9f9f9f; color: white; text-decoration: none } .box_a { padding: 2px 4px; background: white; text-decoration: none; border: 1px solid #ccc } .box_selected { padding: 2px 4px; border: 1px solid #9f9f9f; font-weight: bold; background: #11578b; color: #fff } .page_number { padding: 0; padding: 15px 0 15px 0 } div.prodPop span { display: none; outline: none } div.prodPop:hover { position: relative; text-decoration: none; outline: none } div.prodPop:hover span { display: block; position: absolute; outline: none } div.prodPop:hover span { color: #0c0; background-color: transparent; color: #555; border: 1px solid #789067; text-decoration: none; width: 143px; height: 200px; outline: none } a.tooltip { color: white } a.tooltip span { display: none; outline: none } a.tooltip:hover { position: relative; text-decoration: none; outline: none } a.tooltip:hover span { display: inline; position: absolute; outline: none } a.tooltip:hover span { top: 11px; left: 0; padding: 5px; color: #0c0; background-color: #e6ffd3; color: #555; border: 1px solid #789067; text-decoration: none; width: 125px; outline: none } .couponCodeText { line-height: 24px; height: 24px; display: block; float: left } .couponCodeText strong { font-size: 16px; border: 1px dashed #196b9d; border-right: none; display: block; height: 22px; line-height: 22px; padding: 0px 5px 0 5px; float: left; letter-spacing: -1px } .couponCodeText em { font-size: 16px; background: url(/images/dp2/code_sprite.gif?v=2) no-repeat right -29px; display: block; height: 24px; width: 20px; line-height: 24px; float: left } .couponCodeText strong:hover,.couponCodeText.hover { background-color: #edfaff } .couponCodeText.copied { background-color: #edfaff } .couponCodeText em.hover { background-position: right 0px } .couponCopyDescription { background: url(/images/dp2/code_sprite.gif?v=2) no-repeat right -57px; display: none; height: 24px; width: 151px; line-height: 24px; float: left; margin-left: 2px } .couponCopyDescription.copied { background-position: left -85px } .couponCodeText:hover { text-decoration: none } .store-coupon-field-top { padding-right: 0px !important } .copy-tooltip { font-size: 18px; border: 1px dashed #196b9d; padding-left: 5px; letter-spacing: -1px; background: url(/images/dp2/code_sprite.gif) 0 0 } .copy-tooltip:hover { background-color: #edfaff; text-decoration: none } .copy-tooltip.hover { background-color: #edfaff; text-decoration: none } .copy-tooltip span { display: none; padding: 2px 3px; margin-left: 8px; width: auto } .copy-tooltip:hover span { display: block; position: absolute; background: green; color: white; padding: 2px; margin: 5px 0 0 -4px; text-align: left } a.block-highlight { display: block; padding: 5px; border-top: 1px solid #eee } a:hover.block-highlight { background: #74b543; text-decoration: none; color: white } a:hover.block-highlight span { color: white } a.block-highlight-selected { display: block; padding: 5px; border-top: 1px solid #eee; text-decoration: none; font-weight: bold } a.block-highlight-sm,div.block-highlight-sm { display: block; padding: 2px 2px 2px 5px } a:hover.block-highlight-sm { background: #003; text-decoration: none; color: white } a:hover.block-highlight-sm span { color: white } .small_img { } .med_img { padding: 2px; border: 1px solid #ccc } .my_friend_box { padding: 1px; border: 1px solid green; vertical-align: middle } .plusit-button { margin: 0 } .plus-number-float { height: 0px; position: absolute } a.plus-button { display: block; width: 47px; height: 19px; background: url('/images/dp1/plus_off.gif') no-repeat } a:hover.plus-button { background: url('/images/dp1/plus_on.gif') no-repeat } a.plusd-button { display: block; width: 47px; height: 19px; background: url('/images/dp1/plusd.gif') no-repeat } .score-user { font: bold 16px Arial; color: #f93; position: absolute } .user-image-name-link { margin: 0; padding: 0 } .sort-options { float: right; padding-bottom: 10px } .topH1Title { padding: 5px 0 10px 0px } .topH1Title h1 { display: inline; font-size: 14px; padding: 0 0 0 5px } .rss-feed { padding: 5px 0 10px 0px } .see-it-box { width: 590px; margin: 0; height: auto; margin-top: 3px; background: #f1f3f8 } .see-it-box .see-it-box-top { width: 590px; height: 20px; background: transparent url('/images/dp2/sprite.png?30') no-repeat 0 -891px } .see-it-box .see-it-box-mid { width: 568px; height: auto; border-left: 1px solid #3383b8; border-right: 1px solid #3383b8; padding: 5px 10px; overflow: hidden; line-height: 17px } .see-it-box .see-it-box-bot { width: 590px; height: 8px; background: transparent url('/images/dp2/sprite.png?30') no-repeat 0 -910px } .PGPriceCompare { } .PGPriceCompare { width: 421px; margin: 0; height: auto; padding-top: 2px } .PGPriceCompare .PGPriceCompareTop { width: 421px; height: 14px; background: transparent url('/images/dp1/dp_compare_top_09292009.gif') no-repeat } .PGPriceCompare .PGPriceCompareContent { width: 389px; height: auto; border-left: 1px solid #dbdbdb; border-right: 1px solid #dbdbdb; background: #eaeaea; padding: 10px 15px 0; overflow: hidden; line-height: 17px } .PGPriceCompare .PGPriceCompareBot { width: 421px; height: 5px; background: transparent url('/images/dp1/dp_compare_bot_09292009.gif') no-repeat } .module_popup { width: 338px; margin: 0 0 0 -5px; height: auto; position: absolute } .module_popup .popup-top { width: 338px; height: 12px; background: transparent url('/images/popup_top.png') no-repeat } .module_popup .popup-mid { width: 318px; height: auto; background: transparent url('/images/popup_mid.png') repeat-y; padding: 0 10px 10px; overflow: hidden } .module_popup .popup-bot { width: 338px; height: 14px; background: transparent url('/images/popup_bot.png') no-repeat } .module_xlg { width: 930px; margin: 0 0 15px 0; height: auto } .module_xlg .top { width: 930px; height: 4px; background: transparent url('/images/module_xlg_top.gif') no-repeat } .module_xlg .content { width: 898px; height: auto; background: transparent; padding: 5px 10px 10px 20px; border-left: 1px solid #ccc; border-right: 1px solid #ccc; overflow: hidden } .module_xlg .bot { width: 930px; height: 4px; background: transparent url('/images/module_xlg_bot.gif') no-repeat } .module_lg { width: 625px; margin: 0 0 15px 0; height: auto } .module_lg .top { width: 625px; height: 6px; background: transparent url('/images/dp2/sprite.png?30') no-repeat 0 -920px } .h3-grey { padding-left: 15px; line-height: 25px; height: 25px; font-weight: bold; font-size: 14px } .module_lg .content { width: 593px; height: auto; background: transparent; padding: 5px 15px 10px; border-left: 1px solid #c3cdd6; border-right: 1px solid #c3cdd6; overflow: hidden } .module_lg .bot { width: 625px; height: 6px; background: transparent url('/images/dp2/sprite.png?30') no-repeat 0 -927px } .module_sm { width: 300px; margin: 0 0 15px 0; height: auto } .module_sm .top { width: 300px; height: 6px; background: transparent url('/images/dp2/sprite.png?30') no-repeat 0 -934px } .module_sm .content { width: 278px; height: auto; background: transparent; padding: 3px 10px 10px 10px; border-left: 1px solid #c3cdd6; border-right: 1px solid #c3cdd6; overflow: hidden } .module_sm .content2 { width: 288px; height: auto; background: transparent; padding: 5px 0 10px 10px; border-left: 1px solid #c3cdd6; border-right: 1px solid #c3cdd6; overflow: hidden } .module_sm .content-ad { width: 278px; height: 188px; background: transparent; padding: 5px 10px 10px 10px; border-left: 1px solid #c3cdd6; border-right: 1px solid #c3cdd6; overflow: hidden } .module_sm .bot { width: 300px; height: 6px; background: transparent url('/images/dp2/sprite.png?30') no-repeat 0 -944px } .module_lg2 { width: 700px; margin: 0 0 15px 0; height: auto } .module_lg2 .top { width: 700px; height: 6px; background: transparent url('/images/module_lg2_top.gif') no-repeat } .module_lg2 .content { width: 668px; height: auto; background: transparent; padding: 5px 15px 10px 15px; border-left: 1px solid #ccc; border-right: 1px solid #ccc; overflow: hidden } .module_lg2 .bot { width: 700px; height: 6px; background: transparent url('/images/module_lg2_bot.gif') no-repeat } .coupon-border-lg { width: 597px; height: auto; margin-bottom: 7px; padding: 0; background: #fff } .FEATURED-border { border: 1px solid #ccc } .REGULAR-border { border: 1px solid #b3bdf7 } .EXPIRED-border { border: 1px solid #ccc } .SELECTED-border { border: 1px solid #b0c4de } .tour-image { margin-top: 15px; width: 617px; height: 403px; border: 1px solid #ccc } .tour-shadow { width: 619px; height: 42px; background: url('/images/tour/tour-shadow.gif') no-repeat top center } .button-link { display: block; width: 113px; height: 25px; border: 0; text-align: center; font: bold 12px Arial; cursor: pointer } .link-red { background: url('/images/dp1/button_link_red.gif') no-repeat 0 0; color: white } .link-red-hov { background: url('/images/dp1/button_link_red.gif') no-repeat 0 -25px; color: #f8ebeb } .formBlueBotton { background: url('/images/dp2/sprite.png?30') no-repeat -311px -562px; color: white; width: 102px; height: 26px; border: 0; text-align: center; font: bold 12px Arial; cursor: pointer; display: block; float: left; margin-left: 5px } .formBlueBotton:hover { background: url('/images/dp2/sprite.png?30') no-repeat -311px -589px } .aBlueButton { background-position: -311px -562px; display: block; width: 102px; height: 26px } .aBlueButton:hover { background-position: -311px -589px } .link-green { background: url('/images/dp1/button_link_green.gif') no-repeat 0 0; color: #454f12 } .link-green-hov { background: url('/images/dp1/button_link_green.gif') no-repeat 0 -25px; color: #323a0a } .list-browser-coupon { text-align: center; padding-left: 0; padding-right: 0 } .list-browser-coupon-title { text-align: left; padding: 0 15px } .list-browser-coupon-inner { float: left; width: 581px } a.list-arrow-left { display: block; float: left; width: 20px; height: 57px; margin-top: 25px; background: url('/images/dp2/sprite.png?30') no-repeat 0 -1035px } a:hover.list-arrow-left { background-position: -40px -1035px } a.list-arrow-right { display: block; float: right; width: 20px; height: 57px; margin-top: 25px; background: url('/images/dp2/sprite.png?30') no-repeat -20px -1035px } a:hover.list-arrow-right { background-position: -60px -1035px } .list-arrow-left-disabled { float: left; width: 20px; height: 57px; margin-top: 25px; background: url('/images/dp2/sprite.png?30') no-repeat -80px -1035px; cursor: default } .list-arrow-right-disabled { float: right; width: 20px; height: 57px; margin-top: 25px; background: url('/images/dp2/sprite.png?30') no-repeat -80px -1035px; cursor: default } .topSearchKeywords { padding: 0 10px 35px; background: transparent url('/images/dp2/sprite.png?30') no-repeat bottom center } .topSearchTable td { border-bottom: 1px solid #ddd; vertical-align: top } td.topSearchCell1 { width: 15px } .topSearchAlerts { background: white; padding: 5px 10px 10px } .dealAlertEnvelopeLeft { float: right; width: 96px; height: 72px; background: transparent url('/images/dp1/envelope_left.gif') no-repeat } .dealAlertFormGfx { float: right; width: 120px; height: 80px; background: url('/images/dp1/deal_alert_graphic_10092009.gif') no-repeat; margin-top: -5px } .dealAlertKeywordInput { margin: 0 0 5px } .dealAlertInputBox { padding-top: 10px } .dealAlertEmailInput { margin: 15px 0 10px } .dealAlertFormPar { margin: 0 } .facebookThisDeal { height: 25px } .facebookThisDeal span { line-height: 10px } .twitBookMacBook { display: block; width: 110px; height: 61px; color: #333; float: left; background: url('/images/dp1/macbook_pro_small.jpg') no-repeat top right } .twitBookText { line-height: 16px; margin-left: 10px; width: 138px; float: left; padding-top: 5px } a.fbFanButton,a.twitFollowButton { margin-top: 15px; display: block; width: 253px; height: 30px; background: url('/images/dp1/twitbook_buttons.gif') no-repeat scroll 0 0 } a:hover.fbFanButton { background-position: 0 -30px } a.twitFollowButton { margin-top: 10px; background-position: 0 -60px } a:hover.twitFollowButton { background-position: 0 -90px } .twitBookSmall { margin-top: 5px; font-size: 11px; color: #777 } a.macbookPageBanner2 { display: block; height: 80px; width: 300px; margin-bottom: 15px; background: url("/images/dp1/macbookbanner2.jpg") no-repeat 0 0 } a:hover.macbookPageBanner2 { background-position: 0 -80px } .ipodContest { padding: 10px 5px 5px } .ipodContest .ipodRules { float: left; padding-top: 8px; width: 60% } a.ipodTouchBanner { display: block; height: 80px; width: 280px; margin-bottom: 15px; background: url("/images/dp1/ipod_touch_contest_banner.gif") no-repeat 0 0 } a:hover.ipodTouchBanner { background-position: 0 -80px } a.dell15GivawayBanner { display: block; height: 110px; width: 300px; margin-bottom: 15px; background: url("/images/sponsors/Dell_giveaway_300px.jpg") no-repeat 0 0 } a:hover.dell15GivawayBanner { background-position: 0 -110px } .halloweenIcon { background: transparent url('/images/dp2/sprite.png?30') no-repeat -604px 2px; padding: 6px 5px 6px 25px; display: block; font-weight: normal } .holidayIcon { background: transparent url('/images/dp2/sprite.png?30') no-repeat -609px -43px; padding: 6px 5px 6px 23px; display: block; font-weight: normal } a { color: #034492; text-decoration: none; border: 0; outline: none } a:hover { text-decoration: underline } span.title-font { font: bold 14px Arial; color: #111 } span.code { font: 10px 'Courier New' } p { font: 12px Arial, 'Lucida Grande', Tahoma; color: #111; line-height: 19px; margin: 10px 0 5px 0 } ul,li { line-height: 18px } #deal-header { font: bold 14px Arial; color: #111; padding: 15px 0 5px 20px; background-color: white; margin: 0 } h1 { font: bold 18px Arial; color: #111; padding: 5px 20px 5px 0; background-color: white; margin: 0 } h1.notification-header { font: bold 20px Arial; color: #111; padding: 5px 0 5px 0; background: transparent; margin: 0 } h1 a { color: #333 } h1.deal-title { padding: 0px 0 10px 5px } h1.with-graphic { background: url('/images/icon/header_graphic.gif') no-repeat scroll 0%; padding-left: 24px; line-height: 22px } h1.category-title { font-size: 14px; display: inline; padding: 0 } h1.submit-title { float: right; height: 25px; padding: 0 0 0 25px; margin: 15px 80px 5px 20px; font-size: 18px; font-weight: bold; background: url('/images/icon/submit_plus.gif') no-repeat 0 0 } h1#homeH1 { font: normal 18px Georgia, Arial, Verdana; padding-top: 0 } h2 { font: 11px Arial; color: #555; margin: 0 0 5px 0; display: inline } h2#dealCategoryH2 { font: 12px Arial; display: block; margin: 10px 5px 5px 4px } h3 { font: normal 18px Georgia, Arial, Verdana; padding: 0 10px 8px 0; margin: 0 } h3.with-graphic { background: url('/images/icon/header_graphic.gif') no-repeat scroll 0%; padding-left: 24px; line-height: 22px } h3.even-margin { margin: 8px 0 } h3.h3Box { background-color: #6686A2; font: bold 14px Arial; color: white; padding: 5px 10px; margin-bottom: 5px } h3.featured { color: #7fa71e } h4.info-title { font: bold 14px Arial; color: #333; margin: 0 0 3px 0 } h4 { font: bold 12px Arial; color: #333; margin: 0 0 3px 0 } h4.deal-title { border-bottom: 1px solid #ddd; color: #444; margin: 0 0 7px 0; padding: 0 0 1px 0 } h4.deal-title-price { border-bottom: 1px solid #ddd; color: #777; margin: 0 0 7px 0; padding: 0 0 1px 0 } h5 { font: bold 12px Arial; color: #555; margin: 0 0 3px 5px } h6 { font: bold 11px 'Lucida Grande', Tahoma; color: #555; margin: 0 0 3px 0 } .arial { font-family: Arial } .verdana { font-family: Verdana } .tahoma { font-family: 'Lucida Grande', Tahoma } .bold { font-weight: bold } .normal { font-weight: normal } .no-underline { text-decoration: none } .underline { text-decoration: underline } .strikethrough { text-decoration: line-through } a:hover.no-underline { text-decoration: none } .lh12 { line-height: 12px } .lh13 { line-height: 13px } .lh14 { line-height: 14px } .lh15 { line-height: 15px } .lh16 { line-height: 16px } .lh18 { line-height: 18px } .lh19 { line-height: 19px } .lh20 { line-height: 20px } .lh500 { line-height: 500px } .height25 { height: 25px } .font10 { font-size: 10px } .font11 { font-size: 11px } .font12 { font-size: 12px } .font13 { font-size: 13px } .font14 { font-size: 14px } .font15 { font-size: 15px } .font16 { font-size: 16px } .font17 { font-size: 17px } .font18 { font-size: 18px } .font19 { font-size: 19px } .font20 { font-size: 20px } .font24 { font-size: 24px } .lt_grey { color: #888 } .md_grey { color: #555 } .lt_green { color: #8fff8c } .md_green { color: #5d9433 } .dk_green { color: #2c4618 } .olive_green { color: #589927 } .red { color: #c00101 } .green { color: green } .white { color: white } .dk_grey { color: #111 } .black { color: #000 } .orange { color: #d08c16 } .link-color { color: #105cb6 } .bg_lt_grey { background: #fafafa } .bg-selected-coupon { background: #b0c4de; padding: 18px 10px 10px 15px; margin-bottom: 15px } .bg-featured-coupon { background: #c1db9f } .bg-featured-coupon .content { border-width: 0 } .bg-featured-coupon h3,#coupon-tag-description { margin-top: 10px } .bg-recent-coupon { background: #c0c9fe } .bg-recent-coupon .content { border-width: 0 } .bg-recent-coupon h3 { margin-top: 10px } .bg-expired-coupon { background: #ddd; padding: 18px 10px 10px 15px; margin-bottom: 15px; border: 1px solid #ccc } span.hilite { font-size: 14px; font-weight: bold; background: yellow; color: #105cb6 } a.black-desc { color: black; padding: 3px 5px; border: 1px solid #bbb; background: white; text-decoration: none } a:hover.black-desc { color: black; padding: 3px 5px; background-color: #e0f1cf; border: solid 1px #94cf5b; text-decoration: none } a.blue-desc { color: blue; padding: 3px 5px; border: 1px solid #bbb; background: white; text-decoration: none } a:hover.blue-desc { background-color: #e0f1cf; border: 1px solid #94cf5b; text-decoration: none } .message-success { color: #19af00; font-weight: bold } .message-fail { color: #fd2c2c; font-weight: bold } ol.emailInstructions { margin: 0 } li.emailInstruction { margin-bottom: 5px; line-height: 18px } .view-more { display: block; float: right; text-align: right; font: bold 12px Arial; margin: 0 0 -5px 0 } .view-more-color { color: #589927 } .view-more-simple { font-weight: normal; font-size: 11px } .story-age { font-size: 11px; color: #888 } .warning_message { margin: 10px 0 10px 10px; font: bold 11px 'Lucida Grande', Tahoma; color: red }
123gohelmetsv2
trunk/test/test.css
CSS
asf20
117,811
*{word-wrap:break-word}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,textarea,p,blockquote,th,td{padding:0;margin:0}table{border-collapse:collapse;border-spacing:0}input{font-family:arial}fieldset,img{border:0}ol,ul{list-style:none}.disn{display:none}.disb{display:block}.cl{clear:both}body{color:#666;font-family:Arial,Helvetica,sans-serif;font-size:62.5%;background:#fff url(http://files.smarter.com/images/v6new/bg.gif) repeat-x}a:link,a:visited{color:#004E9E;text-decoration:none;font-size:1.2em}a:hover,a:active{color:#004E9E;text-decoration:underline;font-size:1.2em}.header{height:67px;min-width:992px;padding:0 4px}.header .content{max-width:1280px;min-width:992px;margin:0 auto}.logo{padding:15px 10px 0px 5px;float:left}.logo a{width:270px;height:36px;display:block;overflow:hidden;background:url(http://files.smarter.com/images/v6/logo.gif) no-repeat 0 0}.search{float:left;padding:11px 0 0 0;position:relative;z-index:5}.search input.txt{width:240px;padding:4px 4px;height:20px;line-height:20px;border:#bfbfbf 1px solid;vertical-align:middle;color:#c9c7c2;font-size:1.8em;font-family:tahoma}.search input.txtonfocus{font-style:normal;color:#000}.search input.but{background:url(http://files.smarter.com/images/v6new/search_but.png) no-repeat 0 2px;border:0;width:27px;height:27px;margin-left:8px;vertical-align:middle;cursor:pointer;padding-top:30px;overflow:hidden}.hotkeywords{padding:1px 0 0 0;color:#c6b0c8;position:relative}.hotkeywords a:link,.hotkeywords a:visited,.hotkeywords a:active,.hotkeywords a:hover{color:#9b9581;font-size:1.2em;font-style:italic;text-decoration:underline}.morekeywordsbox{position:absolute;z-index:11;right:-40px;top:18px;background:#fff;width:403px;text-align:left;border:#AEA997 1px solid}.morekeywordsbox ul{float:left;padding:10px 15px 10px 10px;width:175px;clear:none;border:0px;height:110px}.morekeywordsbox ul li{width:auto;line-height:22px;height:22px;padding-left:5px;overflow:hidden}.morekeywordsbox ul li a:link,.morekeywordsbox ul li a:active,.morekeywordsbox ul li a:visited{font-style:normal;color:#666;font-size:12px;text-decoration:none}.morekeywordsbox ul li a:hover{font-style:normal;color:#666;font-size:12px;text-decoration:underline;}.searchsuggestion{position:absolute;left:0px;top:38px;background:#fff;border:#BFBFBF 1px solid;border-top:#62675a 1px solid;width:248px;font-size:1.2em}.searchsuggestion ul{padding-bottom:5px}.searchsuggestion ul li{height:16px;line-height:16px;padding:2px 5px;color:#252623;overflow:hidden}.searchsuggestion ul li.tit{text-align:right;color:#8a8f81;font-variant:small-caps;padding:0 5px}.searchsuggestion ul li.over{color:#fff}.searchsuggestion ul li.over{background:#9B9581}.toplinkwrapper{position:relative;clear:both;z-index:200;float:right;height:0px;background:#ccc}.toplinkwrapper .toplinkcontent{position:absolute;width:580px;padding:5px 0;background:#fff;left:-582px;top:0px;border:#AEA997 1px solid}.toplinkwrapper .toplinkcontent .content{min-width:100px;width:auto}.toplinkwrapper ul li{padding:0 0 0 5px;margin:0;width:175px;float:left}.toplinkwrapper ul li a:link,.toplinkwrapper ul li a:visited,.toplinkwrapper ul li a:active{text-decoration:none;color:#666;line-height:18px}.toplinkwrapper ul li a:hover{text-decoration:underline;color:#666;line-height:18px}.tophot .toplinkcontent{width:390px;left:-500px}.tophot .toplinkcontent ul{width:180px;float:left;padding:2px 0 0 5px}.tophot .toplinkcontent ul li.tit{color:#000;font-size:1.2em;font-weight:bold}.footerwrapper{padding:0 15px;clear:both}.footersearch{width:630px;margin:0 auto;padding-top:10px}.footersearch .search{padding-bottom:10px;padding-left:0px}.footersearch .search input.but{background:url(http://files.smarter.com/images/v6/footersearch_but.png) no-repeat 0 2px;width:102px}.footersearch .search img{vertical-align:middle;margin-right:10px}.header .rightcol{float:right;padding:5px 0px 0 0;font-family:tahoma}.header .rightcol .toplink{text-align:right;color:#7d7c7c;padding:5px 10px 0 0}.header .rightcol .toplink a{color:#5b2220;font-size:1.3em}.header .rightcol .topalink{color:#fff;text-align:right;padding:20px 10px 0 0}.header .rightcol .topalink a{color:#9b9581;font-size:1.1em;margin-left:9px}.breadcrumb{padding:5px 0 5px 15px;color:#868b7d;font-size:1.1em;clear:both}.breadcrumb a:link,.breadcrumb a:active,.breadcrumb a:visited{color:#868b7d;font-size:1.0em}.breadcrumb a:hover{color:#868b7d;font-size:1.0em;text-decoration:underline}.splitfav{background:#fff url(http://files.smarter.com/images/v6new/fav_3_icon.gif) right 4px no-repeat;border:#C8C7C3 1px solid;margin-bottom:10px}.favbox{margin:10px}.favbox a{text-decoration:none}a.favtit:link,a.favtit:visited,a.favtit:active{color:#004e9e;font-size:1.6em;text-decoration:underline;font-weight:bold}a.favtit:hover{color:#004e9e;font-size:1.6em;text-decoration:underline;font-weight:bold}a.favdes:link,a.favdes:visited,a.favdes:hover,a.favdes:active{color:#5b5b5b;text-decoration:none;font-size:1.2em}a.favwww:link,a.favwww:visited,a.favwww:hover,a.favwww:active{color:#0E774A;text-decoration:none;font-size:1.2em}.favbox ul{margin-bottom:3px}.gridfav .favbox ul{width:31%;float:left;padding-right:1%;margin-bottom:5px}.listfav .favbox{padding-top:5px}.listfav .favbox ul{margin-bottom:7px;width:520px}.listfav .favbox ul li{display:inline;margin-right:5px}.sitelink ol li{display:inline}.sitelink ol li a{color:#004E9E;margin-right:10px}.sitelink ol li a:hover{color:#004E9E;text-decoration:underline}.sellerrating span.info{float:left;font-size:1.2em}.sellerrating .star-rating{margin:1px 3px 0 3px}.relatedmodule{margin:10px 0px;border:#dbdbdb 1px solid;padding:5px 7px 8px 7px;clear:left}.relatedmodule h2{font-size:1.4em;color:#161615;padding-bottom:5px}.relatedmodule ul{width:98%;float:left;_position:relative}.relatedmodule a:link,.relatedmodule a:visited,.relatedmodule a:active{font-size:1.3em;color:#004E9E}.relatedmodule a:hover{font-size:1.3em;color:#004E9E}.relatedmodule ul li{width:30%;padding:0 0 2px 20px;float:left;background:url(http://files.smarter.com/images/v6/all_cate_dot.gif) no-repeat 10px 8px}.relatedmodule ul li.disam{width:210px}.moreinfo{margin:0 0 10px 0px;border:#dbdbdb 1px solid;padding:5px 7px 0px 7px;clear:both;font-size:1.1em;color:#898989}.moreinfo h2{color:#161615;font-size:1.4em;padding-bottom:3px}.moreinfo a{font-size:1.1em}.moreinfo p{padding:0 0 5px 20px}#extrainfo{margin:0 auto;clear:both}#extrainfo .greybox{margin:0 auto;padding:0 10px}#extrainfo ul{padding:20px 0px 20px 0px;float:left;width:20%}#extrainfo ul li{line-height:16px;height:18px}#extrainfo ul strong{color:#989386;font-family:tahoma;font-size:1.3em}#extrainfo ul li em{color:#463913;font-size:1.2em;font-family:tahoma;font-style:normal}#extrainfo a:link,#extrainfo a:active,#extrainfo a:visited{color:#463913;font-size:1.2em;text-decoration:none;font-family:tahoma}#extrainfo a:hover{color:#463913;font-size:1.2em;text-decoration:underline;font-family:tahoma}#extrainfo a.jp{background:url(http://files.smarter.com/images/v6/bg_v6main.gif) no-repeat 0px 2px;padding-left:20px}#extrainfo a.kr{background:url(http://files.smarter.com/images/v6/bg_v6main.gif) no-repeat 0px -18px;padding-left:20px}#extrainfo a.cn{background:url(http://files.smarter.com/images/v6/bg_v6main.gif) no-repeat 0px -38px;padding-left:20px}#morelegalstuff{margin:0 auto;clear:both;padding:0 10px}#morelegalstuff p{color:#463913;font-size:1.1em}#morelegalstuff a:link,#morelegalstuff a:active,#morelegalstuff a:visited{font-size:1.0em;color:#463913;text-decoration:none}#morelegalstuff a:hover{font-size:1.0em;color:#463913;text-decoration:underline}#footer{height:50px;line-height:32px;padding-left:10px;font-size:1.1em;margin:0 auto;color:#463913}#footer a:link,#footer a:active,#footer a:visited{font-size:1em;color:#463913;text-decoration:none}#footer a:hover{font-size:1em;color:#463913;text-decoration:underline}.infoiconwrapper{height:25px}.infoicon img{margin-right:0px;vertical-align:middle;_margin-bottom:1px}.infoicon a.saved{color:#6b6b6b;font-size:13px;font-style:italic;text-decoration:none;font-weight:bold}.infoicon a.saved,.infoicon a.savetowishlist{position:relative;outline:none;text-decoration:none}.wishlistfull{background:url(http://files.smarter.com/images/v6/wishlist_alert_bg.gif) no-repeat 0 0;position:absolute;top:-38px;left:-5px;padding:2px 4px;width:165px;height:30px;font-size:0.85em;color:#7e634e;text-decoration:none;z-index:9999}.wishlistexist{background:url(http://files.smarter.com/images/v6/wishlist_alert_bg.gif) no-repeat 0 0;position:absolute;top:-38px;left:-5px;padding:2px 4px;width:165px;height:30px;font-size:0.85em;color:#7e634e;text-decoration:none;z-index:9999}.star-rating{float:left;cursor:pointer;position:relative;width:60px;height:12px;overflow:hidden;list-style:none;margin:0;padding:0;background:url(http://files.smarter.com/images/v6/newstar.gif) left top repeat-x;margin-right:3px}.star-rating .current-rating{position:absolute;top:0;left:0;text-indent:-1000em;height:12px;line-height:12px;outline:none;overflow:hidden;border:none;z-index:1;background:url(http://files.smarter.com/images/v6/newstar.gif) left bottom repeat-x;font-size:0px}.couponwrapper{margin:15px 15px 0 18px;#margin-top:0;width:430px}.couponwrapper .conponcontent{width:440px;text-align:left}.couponwrapper h3{font-size:14px;color:#000;line-height:25px;margin-top:1px}.couponwrapper .couponlist{background:url(http://files.smarter.com/images/v6/popup_content_bg.gif) no-repeat 0 5px;width:422px;height:150px;padding-top:23px;padding-bottom:12px}.couponwrapper div.merchantlogo{width:125px;text-align:center;float:left;padding:35px 0}.couponwrapper ul{width:290px;float:left}.couponwrapper li{line-height:24px;clear:both}.couponwrapper li strong{display:block;float:left;width:70px;padding-right:10px;line-height:24px;text-align:right;clear:left;font-size:1.1em;color:#737373;font-weight:normal}.couponwrapper li.code a{font-size:15px;display:block;float:left;margin-right:5px;font-weight:bold}.couponwrapper li.code a.codelink{background:url(http://files.smarter.com/images/v6/popup_content_bg.gif) no-repeat 0 -215px;width:15px;height:17px;text-indent:-9999px;overflow:hidden}.couponwrapper li.detail p{margin-left:80px;padding-right:18px;#margin-top:-25px;font-size:1.1em;line-height:16px;padding-top:4px}.couponwrapper li.restrictions{color:#a8a8a8;line-height:16px;overflow:hidden;padding-top:5px}.couponwrapper li.restrictions strong{margin-top:-5px}.couponwrapper li em{color:#C00;float:left}.couponwrapper li.code object{vertical-align:middle}.morecouponwrapper .morecoupon{height:370px;width:426px;overflow:hidden;overflow-y:auto}.couponwrapper li.code{height:24px;#overflow:hidden;float:left}.clipbox{position:relative;z-index:2;top:2px;left:35px;width:232px;border:#cdd4ff 4px solid;background:#fff;padding:3px;font-size:8pt;line-height:110%;display:none}.clipbox i{font-weight:bold}.clipbox .bottomcow{font-size:7pt;margin-top:5px}.clipbox .bottomcow span{color:#cb0a1b}.plblogwrapper{z-index:8;margin:20px 15px 0 15px}.plblogwrapper .blogcontent{height:250px;text-align:left;overflow:hidden;overflow-y:auto}.plblogwrapper h3{font-size:13px;display:inline;color:#004E9E}.plblogwrapper .date{font-size:1.1em;color:#acacac;padding:10px 0}.plblogwrapper .date a{font-size:1.0em;color:#004E9E}.plblogwrapper .blogimg{text-align:center;padding:20px 0}.plblogwrapper .desc{color:#555;line-height:140%;font-size:12px}.plblogwrapper .desc a{font-style:italic;color:#555;font-size:12px}.overlayhigh .moreblog{height:450px;width:493px;overflow:hidden;overflow-y:auto;float:left}.plreviewwrapper{z-index:8;margin:20px 15px 0 15px}.plreviewwrapper strong.toptitle{font-weight:bold;font-size:14px;color:#f6f6f6;line-height:36px;display:block}.plreviewwrapper .reviewcontent{width:490px;text-align:left}.plreviewwrapper .reviewcontent .tit{padding-bottom:10px;border-bottom:#e6eff9 1px solid}.plreviewwrapper .reviewcontent .tit strong{display:block;font-size:13px;color:#3a3a3a}.plreviewwrapper .reviewcontent .tit h3{display:inline;font-size:13px;color:#004E9E}.plreviewwrapper .reviewcontent .tit .rating a{float:right;font-size:36px;font-weight:bold}.plreviewwrapper .reviewcontent .tit .rating a span{font-size:24px;font-weight:normal}.plreviewwrapper .reviewlistbox{height:355px;overflow:hidden;overflow-y:auto;position:relative}.overlay .plreviewwrapper .reviewlistbox{height:200px}.plreviewwrapper .reviewlistbox .list{padding:10px 15px;border-bottom:#e6eff9 1px solid}.plreviewwrapper .reviewlistbox .list .coll{width:125px;padding-right:5px;float:left}.plreviewwrapper .reviewlistbox .list .coll ul{padding-top:5px}.plreviewwrapper .reviewlistbox .list .coll li{color:#2d2d2d;clear:both}.plreviewwrapper .reviewlistbox .list .coll li strong{display:block;color:#939393;font-weight:normal}.plreviewwrapper .reviewlistbox .list .coll li.rating{color:#689300;font-size:18px;font-weight:bold;padding-bottom:5px}.plreviewwrapper .reviewlistbox .list .colr li{padding-bottom:5px}.plreviewwrapper .reviewlistbox .list .colr li strong{font-size:14px;color:#333}.plreviewwrapper .reviewlistbox .list .colr li{color:#7d7878}.plreviewwrapper .reviewlistbox .list .colr{width:290px;float:left}.plreviewwrapper .reviewcontent .more{text-align:right;padding:10px 0 0 0;clear:both}.plrebateswrapper{margin:20px 15px 0 15px}.plrebateswrapper .rebatescontent{width:490px;text-align:left;overflow:hidden;overflow-y:auto}.plrebateswrapper strong{font-weight:bold;font-size:14px;color:#f6f6f6;line-height:36px;display:block}.plrebateswrapper div.download{width:185px;text-align:center;float:left;padding:10px 0}.plrebateswrapper div.download a:link,.plrebateswrapper div.download a:visited,.plrebateswrapper div.download a:active,.plrebateswrapper div.download a:hover{display:block;font-size:15px;padding:115px 10px 0 10px;background:#fff url(http://files.smarter.com/images/v5/pl_icons.png) no-repeat 43px -990px;width:165px}.plrebateswrapper ul{width:300px;float:left;padding-top:8px}.plrebateswrapper li{line-height:30px;clear:both;color:#3f3f3f}.plrebateswrapper li strong{display:block;float:left;width:100px;padding-right:10px;text-align:right;line-height:30px;clear:left;font-size:13px;color:#737373;font-weight:normal}.plrebateswrapper li em{color:#C00;float:left}.plrebateswrapper li.amount{font-size:22px;font-weight:bold}.plrebateswrapper li.restrictions{line-height:16px;padding-top:10px;height:100px;overflow:hidden}.plrebateswrapper li.restrictions strong{line-height:16px;height:130px}.plrebateswrapper .morerebates{width:505px;height:360px;overflow:hidden;overflow-y:auto}.plenlargewrapper{margin:20px 15px 0 15px}.plenlargewrapper .enlargecontent{text-align:center;left:10px;top:0px}.plenlargewrapper strong{font-weight:bold;font-size:14px;color:#f6f6f6;line-height:35px;float:left;display:block;width:80px;text-align:left;padding-left:22px;margin-top:1px}.plenlargewrapper .imgbox{padding:10px 0 10px 0;clear:both;height:300px}.plenlargewrapper .caption{padding-bottom:10px}.plenlargewrapper .store{color:#858585;padding-bottom:10px}.plenlargewrapper .store img{vertical-align:middle;margin-bottom:5px}.plenlargewrapper .store span{text-decoration:line-through}.plvideowrapper{margin:20px 15px 0 15px}.plvideowrapper .videocontent{text-align:left;left:16px;overflow:hidden;overflow-y:auto}.plvideowrapper h3{font-weight:bold;font-size:14px;color:#f6f6f6;line-height:36px;display:block;margin-bottom:20px;width:320px;background:url(http://files.smarter.com/images/v5/popup_video_bg.png) no-repeat -16px 0;_background:url(http://files.smarter.com/images/v5/popup_video_bg.gif) no-repeat -16px 0;overflow:hidden;cursor:move;height:36px}.plvideowrapper .wrap{width:320px;height:265px;padding-left:2px}.loadingwrapper{width:608px;height:340px;background:url(http://files.smarter.com/images/loadingwrapper_bg.gif)}.loadingwrapper .msg{font-size:26px;color:#222;width:400px;margin:0 auto;padding-top:110px;text-align:center}.loadingwrapper .keyword{font-size:28px;color:#196098;font-style:italic;text-align:center;padding:18px 0 25px 0;font-weight:bold}.loadingwrapper .img{text-align:center}.fullmylist{color:#c00}body.withtb{background-position:0 25px}.topbar{height:25px;background:url(http://files.smarter.com/images/v6/topbar_img.gif) 0 0 repeat-x}.topbar .content{margin:0 auto}.topbar .coll{float:left;line-height:25px;padding-left:8px;font-size:1.1em;color:#fff}.topbar .coll a{font-size:1.0em;color:#fff}.topbar .colr{float:right;padding-right:8px}.topbar .colr ul.nav{background:none;height:auto;margin:0;width:auto}.topbar .colr ul.nav li{float:left;position:relative;z-index:60001}.topbar .colr ul.nav li a.menu{display:block;padding:0 26px 0 11px;color:#5c5951;text-decoration:none;line-height:25px;background:url(http://files.smarter.com/images/v6/topbar_img.gif) right -25px no-repeat}.topbar .colr ul.nav li a.menu:hover,.topbar .colr ul.nav li a.active{background-position:right -50px}.topbar .colr ul.nav li.active a.menu{background-position:right -50px}.topbar .popup{position:absolute;right:0;top:25px;width:245px;background:#fff;border:#9a9a9a 1px solid;border-top:0;display:none}.topbar .popup .seeall{padding:5px;text-align:right;clear:both}.topbar .topwishlist ol li{padding:5px 10px;width:225px;border-bottom:#f1f1f1 1px solid}.topbar .topwishlist ol li.over{background:#f3f3f4}.topbar .topwishlist ol img{float:left;margin-right:5px;border:#e3e3e3 1px solid}.topbar .topwishlist a{color:#1f1f1f}.topbar .topwishlist a.price{font-size:1.6em;color:#83300b;font-weight:bold}.topbar .topwishlist span.originalprice span{color:#070707;text-decoration:line-through;font-size:1.4em;margin-right:3px}.topbar .favoritestores ol li{padding:5px 10px;width:225px;border-bottom:#f1f1f1 1px solid}.topbar .favoritestores ol li.over{background:#f3f3f4}.topbar .favoritestores ol img{float:left;margin-right:5px;border:#e3e3e3 1px solid}.topbar .favoritestores a{color:#1f1f1f}.topbar .favoriteguides{width:195px}.topbar .favoriteguides ol li{padding:5px 35px;text-align:center;width:115px}.topbar .favoriteguides ol img{margin-right:5px;border:#e3e3e3 1px solid}.topbar .favoriteguides a{color:#1f1f1f}.topbar .favoriteguides .guidetitle{position:absolute;background:#fff;width:105px;height:65px;padding-top:40px;top:10px;left:41px;filter:alpha(opacity=80);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80);-moz-opacity:0.8;opacity:0.8;cursor:pointer}.header .content{width:1000px}.pagewrapper{width:1000px;margin:0 auto}.breadcrumb{padding:5px 0 5px 5px}.main{clear:both;padding:0 5px;background:url(http://files.smarter.com/images/v6/pagewrapper_bg.png) right 0 repeat-y}.main .maincontent{border:#c8c7c3 1px solid;background:#fff;padding:10px 10px 0 10px;position:relative;min-height:700px}.main .leftbox{width:160px;float:left;padding-right:10px;_position:relative}.main .rightbox{margin-left:170px;_margin-right:-3px}.main .rightcontent{float:left;width:100%;_position:relative}.mainbottom{background:url(http://files.smarter.com/images/v6/maincontent_bg.png) 0 bottom repeat-x;height:4px;font-size:0;margin:0 5px}.footerwrapper{padding:0 10px}.producttopcow{padding:0px 10px 5px 10px}.producttopcow .colr{float:right;padding:5px 0 0 0;_position:relative}.producttopcow .coll{color:#2f2f2f;font-size:1.1em;float:left;padding:5px 0 0 0;_position:relative}.producttopcow .coll strong{color:#666;font-weight:normal}.producttopcow em{font-style:normal;cursor:pointer}.producttopcow em span{background:url(http://files.smarter.com/images/v6/list_num_bg.gif) no-repeat center 0;padding:3px;margin:0 1px;color:#a9a28a;font-weight:bold}.producttopcow a:link,.producttopcow a:visited,.producttopcow a:active,.producttopcow a:hover{margin:0 1px;font-size:1.0em;color:#cacaca}.producttopcow img{vertical-align:middle;margin:0 0 1px 0;font-size:0}.producttopcow h1{color:#161615;font-size:1.8em;display:inline;margin:0 3px}.producttopcow select{vertical-align:middle}.producttopcow a{font-size:1.0em}.producttopcow span.sortbyselect{background:url(http://files.smarter.com/images/v6/sortby_arrow.gif) no-repeat right 6px;padding-right:10px;position:relative;z-index:100}.producttopcow span.sortbyselect em{font-style:normal;cursor:pointer}.producttopcow .sortbyselectmenu{border:1px solid #AEA997;background:#fff;position:absolute;top:19px;#top:25px;left:0;z-index:100}.producttopcow .sortbyselectmenu ul li{padding:2px 0px;width:110px}.producttopcow .sortbyselectmenu ul li a:link, .producttopcow .sortbyselectmenu ul li a:active, .producttopcow .sortbyselectmenu ul li a:visited{color:#666;text-decoration:none;display:block;padding:3px}.producttopcow .sortbyselectmenu ul li a:hover,.producttopcow .sortbyselectmenu ul li a.active{color:#fff;text-decoration:none;background:#9B9581}.sidebar{background:#efefef;border:#ccc 1px solid;padding:3px 3px 0 3px;float:left;margin-bottom:10px}.sbox{padding-bottom:3px;clear:both;float:left}.sbox div.tit{background:#fefefe;padding-left:8px;padding-top:1px;padding-bottom:2px;float:left;clear:both;width:144px}.sbox div.tit div.left{width:14px;float:left;padding:7px 0 0 0;font-size:0}.sbox div.tit div.right{width:130px;float:left}.sbox div.tit h3{display:inline;font-size:1em;color:#9B9581;height:22px;line-height:22px;padding:0px;font-weight:normal;text-transform:uppercase}.sbox div.tit img{font-size:0px;vertical-align:middle;cursor:pointer;width:7px;height:7px}.sbox div.tit a:link,.sbox div.tit a:active,.sbox div.tit a:visited,.sbox div.tit a:hover{color:#868b7d;text-decoration:none}.sbox ul{margin-top:0px;line-height:18px;float:left;background:#fff;clear:both}.sbox ul li{z-index:5;display:block;position:relative;float:left;width:146px;padding-left:6px;margin-bottom:0px}.sbox ul li a:link,.sbox ul li a:visited,.sbox ul li a:active,.sbox ul li a:hover{outline:none;text-decoration:none;color:#666;cursor:pointer;font-size:1.1em;background:url(http://files.smarter.com/images/v6/attr_select_bg.gif) no-repeat 0 3px;padding-left:16px;display:block;float:left}.sbox ul li a.selected:link,.sbox ul li a.selected:visited,.sbox ul li a.selected:active,.sbox ul li a.selected:hover{background-position:0 -82px}.sbox ul li.more a:link,.sbox ul li.more a:active,.sbox ul li.more a:visited,.sbox ul li.more a:hover{background:none;z-index:6;font-style:italic}.loadingleft{padding:20px 0;text-align:center}.inputprice{clear:both;padding-bottom:3px;line-height:28px;background:#fff}.inputprice .content{padding:4px 6px 0;clear:both;width:140px}.inputprice input.txt{width:46px;padding:2px;border:#ccc 1px solid;color:#a1a1a1;vertical-align:middle;font-style:italic}.inputprice input.but{margin-left:27px;margin-top:10px;width:110px;height:21px;line-height:21px;cursor:pointer;color:#999;font-weight:bold;font-size:12px;background:#aaa url(http://files.smarter.com/images/v6/bg_v6main.gif) no-repeat 0 -88px;border:0}.inputprice input.over{background:#aaa url(http://files.smarter.com/images/v6/bg_v6main.gif) no-repeat 0 -67px;color:#fff}.narrowsearch{border:#cecece 1px solid;background:#f7f7f7;padding:8px;clear:both;width:142px;margin-bottom:10px}.narrowsearch strong{font-size:1.2em;font-weight:bold;color:#3c3a3a}.narrowsearch input.txt{border:#c9c9c9 1px solid;width:140px;margin-top:6px;float:left;color:#a1a1a1}.narrowsearch input.txtonfocus{font-style:normal;color:#000}.narrowsearch input.but{margin:6px 0 0 0;float:right}.moreinformation{border:#cecece 1px solid;background:#f7f7f7;padding:8px;clear:both;width:142px;margin-bottom:10px}.moreinformation strong{font-size:1.2em;font-weight:bold;color:#3c3a3a;padding-bottom:5px;display:block}.moreinformation ul li{display:block;float:left;width:140px;padding-left:3px;padding-bottom:3px}.moreinformation ul li a:link,.moreinformation ul li a:visited,.moreinformation ul li a:active,.moreinformation ul li a:hover{font-size:1.1em;background:url(http://files.smarter.com/images/v6/moreinformation_icon.gif) no-repeat 0 5px;padding-left:10px}.topsearchesleft{border:#cecece 1px solid;padding:8px;clear:both;width:142px;margin-bottom:10px}.topsearchesleft strong{font-size:1.2em;font-weight:bold;color:#000;padding-bottom:5px;display:block}.topsearchesleft ul li{display:block;float:left;width:140px;padding-left:3px;padding-bottom:3px}.topsearchesleft ul li a:link,.topsearchesleft ul li a:visited,.topsearchesleft ul li a:active,.topsearchesleft ul li a:hover{font-size:1.1em;background:url(http://files.smarter.com/images/v6/moreinformation_icon.gif) no-repeat 0 5px;padding-left:10px}.wishlist{border:#cecece 1px solid;width:158px;clear:both;margin-bottom:10px}.wishlist h2{font-size:1.4em;color:#161615;padding:5px 8px 0px 8px}.wishlist ul li{clear:both;padding:6px 4px 6px 8px;width:146px;float:left}.wishlist ul li.over{background:#edecea}.wishlist ul li img{float:left;margin-right:8px}.wishlist ul li a:link,.wishlist ul li a:active,.wishlist ul li a:visited,.wishlist ul li a:hover{font-size:1.3em;font-weight:bold;color:#426fa2}.wishlist ul li span.remove{float:right;padding-right:0px;padding-top:0px}.wishlist ul li span.remove a:link,.wishlist ul li span.remove a:active,.wishlist ul li span.remove a:visited{background:url(http://files.smarter.com/images/v6/remove_icon.png) no-repeat;display:block;width:12px;height:12px;text-decoration:none;padding-left:0px;cursor:pointer}.wishlist ul li span.remove a:hover{background:url(http://files.smarter.com/images/v6/remove_icon.png) no-repeat;cursor:pointer}.wishlist .pageselect{width:148px;position:relative;padding:10px 0 5px 10px}.wishlist .pageselect p{text-align:center;line-height:30px;color:#111;font-size:11px;font-weight:bold;display:inline}.wishlist .pageselect p{*padding-right:3px \9}.wishlist .pageselect p{*padding-right:3px}.wishlist .pageselect p{_padding-right:3px}.wishlist .pageselect a:link,.wishlist.pageselect a:active,.wishlist .pageselect a:visited,.wishlist .pageselect a:hover{font-size:1.2em;font-weight:bold;color:#004E9E;border:#cecece 1px solid;padding:2px 4px}.wishlist .pageselect a.none:link,.wishlist.pageselect a.none:active,.wishlist .pageselect a.none:visited,.wishlist .pageselect a.none:hover{font-size:1.2em;font-weight:bold;color:#cecece;border:#cecece 1px solid;padding:2px 4px;text-decoration:none;cursor:default}.overmylist{background-color:#fff}.overmylist table{height:100%;width:100%}.overmylist td{vertical-align:middle;text-align:center}.banner120{margin-bottom:10px;background:url(http://files.smarter.com/images/v6/fav_300_bg.gif) no-repeat center 0px;padding-top:15px;width:160px;height:600px;cursor:hand}.pronofound{height:30px;line-height:30px;padding:0 7px;font-weight:bold;border:#c18e93 1px solid;background:#ffb7bb;margin-bottom:5px;color:#666}.pronofound a.close:link,.pronofound a.close:active,.pronofound a.close:visited{display:block;width:50px;height:18px;color:#929893;line-height:14px;font-size:12px;background:url(http://files.smarter.com/images/v5/pl_icons.png) no-repeat 35px -827px;overflow:hidden;text-decoration:none;float:right;margin:8px 0px 7px auto}.pronofound a.close:hover{text-decoration:underline}.plist{width:145px;height:245px;border:#fff 1px solid;text-align:center;margin:3px 0px 10px 10px;float:left;background:#fff}.plistover{border:#C8C7C3 1px solid;position:relative;z-index:99}.plist .imgbox{padding:3px 0;position:relative;z-index:4}.plist .imgbox .enlarge{position:absolute;top:0px;right:0}.plist .imgbox .enlarge a{display:block;width:47px;height:47px;background:url(http://files.smarter.com/images/v6/viewenlarge_icon.gif) no-repeat -49px 0}.plist .imgbox .onsale{width:54px;height:18px;position:absolute;top:120px;left:5px;background:url(http://files.smarter.com/images/v6/onsale_icon.gif) no-repeat}.plist .brand{height:30px;padding:0 10px;overflow:hidden}.plist .brand a{color:#004E9E;font-size:1.1em}.plist .price{color:#434343;font-size:1.2em;max-height:35px}.plist .price a{font-weight:bold;font-size:1.3em;color:#ce2424}.plist .originalprice span{text-decoration:line-through;color:#080808;font-size:1em}.plist .originalprice a{color:#ce2424}.plist .merchant a{font-size:1.1em;color:#868B7D}.plquickviewwrapper{height:0;z-index:999}.plquickviewwrapper .quickcontent{text-align:left;background:#fff;padding-bottom:15px;border:#C8C7C3 1px solid}.plquickviewwrapper .close a{float:right;font-size:1.0em;background:url(http://files.smarter.com/images/v6/close_icon.png) no-repeat right 3px;padding-right:10px;color:#9B9581;margin:4px 5px 0 0}.plquickviewwrapper .loading{margin:110px auto;text-align:center}.plquickviewwrapper .quicktwocolums{padding:25px 0px 10px 30px}.plquickviewwrapper .pimg{float:left;padding-right:15px;width:250px}.plquickviewwrapper .pimg .preload{height:250px;width:250px}.plquickviewwrapper .moresection{width:315px;float:left}.plquickviewwrapper .moresectionoverflow{height:321px;overflow-y:auto;overflow-x:hidden;position:relative}.plquickviewwrapper .moresection a.quicktitle{font-size:1.4em;font-weight:bold;color:#004E9E}.plquickviewwrapper .moresection .quickprice{padding-top:8px;clear:both;font-size:1.2em}.plquickviewwrapper .moresection .quickprice strong{padding-top:8px;font-size:1.4em;clear:both;color:#080808}.plquickviewwrapper .moresection p{padding:8px 8px 8px 0;color:#848484;font-size:1.1em}.plquickviewwrapper .moresection p a:link,.plquickviewwrapper .moresection p a:active,.plquickviewwrapper .moresection p a:visited,.plquickviewwrapper .moresection p a:hover{font-style:italic}.plquickviewwrapper .moresection .quickcompare{clear:both;padding:8px 0 10px 0}.plquickviewwrapper .moresection .quickcompare a{font-size:1.1em}.plquickviewwrapper .moresection .quickfeature{width:305px;padding:10px 0;overflow:hidden;border-top:#c8bdb0 1px solid}.plquickviewwrapper .moresection .featuredmerchant{float:left;width:115px;padding-top:4px;margin:0 12px 0 0;text-align:center;color:#959595;font-size:1.2em}.plquickviewwrapper .moresection .featuredmerchant a{font-size:1.0em}.plquickviewwrapper .moresection .featuredmerchant img{margin-top:-5px}.plquickviewwrapper .moresection .featuredprice{width:100px;float:left;margin-right:2px}.plquickviewwrapper .moresection .featuredprice a.price,.plquickviewwrapper .moresection .nofeaturedprice a.price{font-size:1.8em;font-weight:bold;color:#c00;line-height:26px}.plquickviewwrapper .moresection .seeitbox{float:left}.plquickviewwrapper .moresection .seeitbox input.seeit{background:url(http://files.smarter.com/images/v6/quickview_seeit_but.gif) no-repeat 0px 0px;border:0;cursor:pointer;margin:0 auto;display:block;width:63px;height:26px;text-indent:-9999px}.pagelist{text-align:center;padding:20px 0}.pagelist strong{font-size:1.4em;color:#bdaebe;font-weight:bold;border:#c8c7c3 1px solid;padding:5px 8px;margin-right:5px}.pagelist a:link,.pagelist a:active,.pagelist a:visited,.pagelist a:hover{font-size:1.4em;font-weight:bold;color:#004E9E;border:#c8c7c3 1px solid;padding:5px 8px;margin-right:5px}.splitfav{clear:both}.productlisttopcow{padding:0}.productlisttopcow .productlisttitle{padding-bottom:9px;border:0;background:url(http://files.smarter.com/images/v6/v6_repeat_x.gif) repeat-x 0 28px transparent}.productlisttopcow .productlisttitle img{vertical-align:middle}table.plisttable{width:100%;clear:both;padding:0;margin:0 0 0 0;border-collapse:collapse}table.plisttable td{border-bottom:#f1f1f1 1px solid}table.plisttable td.splitfav{border:1px solid #f1f1f1}table.plisttable tr.over td{background:#edecea}table.plisttable tr.last td{border:0}table.plisttable td.t1{width:80px;text-align:center;vertical-align:top;padding:10px}table.plisttable td.t1 .imgbox{position:relative;z-index:4;width:80px}table.plisttable td.t1 .imgbox .enlarge{position:absolute;top:0px;left:0}table.plisttable td.t1 .imgbox .enlarge a{display:block;width:32px;height:32px;background:url(http://files.smarter.com/images/v6/viewenlarge_s_icon.gif) -32px 0 no-repeat}table.plisttable td.t1 .imgbox .onsale{width:54px;height:18px;position:absolute;top:62px;right:0px;background:url(http://files.smarter.com/images/v6/onsale_icon.gif) no-repeat}table.plisttable td.t2{vertical-align:top;padding:10px 10px 10px 0px}table.plisttable .featured{color:#579308;font-weight:bold;padding-bottom:3px;font-size:11px;text-transform:uppercase}table.plisttable td.t2 a.title h3,table.plisttable td.t2 a.title{font-size:1.2em;text-decoration:underline;display:inline;color:#004E9E}table.plisttable td.t2 a.title:hover h3,table.plisttable td.t2 a.title:hover{text-decoration:underline;color:#004E9E}table.plisttable td.t2 p{color:#6b6b6b;padding:5px 0;width:395px}table.plisttable td.t2 p a:link,table.plisttable td.t2 p a:active,table.plisttable td.t2 p a:visited{color:#868B7D;text-decoration:underline;font-size:1.1em}table.plisttable td.t2 p a:hover{color:#868B7D;text-decoration:underline;font-size:1.1em}table.plisttable td.t2 .review{color:#696969;margin-top:5px}table.plisttable td.t2 .review img{vertical-align:middle;margin-right:3px}table.plisttable td.t2 .review a:link,table.plisttable td.t2 .review a:visited,table.plisttable td.t2 .review a:active,table.plisttable td.t2 .review a:hover{color:#004E9E;font-size:1.0em}table.plisttable td.t2 .review span{font-size:1.0em}table.plisttable td.t2 .review span a{font-size:1.0em;color:#004E9E;line-height:12px}table.plisttable td.t2 .merchantprice{padding-bottom:5px}table.plisttable td.t3{padding:25px 10px 0 10px;vertical-align:top}table.plisttable .normalmerchant{border:#c8c7c3 1px solid;padding:7px;background:#fff;width:92px}table.plisttable .normalmerchant img{border:#c8c7c3 1px solid}table.plisttable td.t4{text-align:right;padding:10px;vertical-align:top}table.plisttable td.t4 a.price{font-size:2.0em;font-weight:bold;color:#004E9E}table.plisttable td.t4 li{padding-bottom:4px}table.plisttable td.t4 li.price a{font-size:2.0em;font-weight:bold;color:#004E9E;letter-spacing:-1px}table.plisttable td.t4 li.originalprice a{color:#ce2424;font-size:1.8em}table.plisttable td.t4 li.originalprice span{color:#313131;text-decoration:line-through;font-size:1.4em;display:block}table.plisttable td.t4 li.stores{color:#595959;font-size:1.0em;padding-bottom:0}table.plisttable td.t4 li.stores a{color:#868B7D;font-size:1.0em;padding-bottom:0}table.plisttable td.t4 li.morefeaturedmerchant{padding-bottom:0}table.plisttable td.t4 li.morefeaturedmerchant a{color:#868B7D;font-size:1.0em}table.plisttable td.t4 li.freeshipping span{padding-left:25px;background:url(http://files.smarter.com/images/v6/freeshipping_icon.gif) no-repeat 0px 0px;font-size:1.0em;color:#969696}table.plisttable input.seeit,table.plisttable input.compare{display:block;margin:0 0 0 auto}table.plisttable .featuredmerchant{width:108px;height:69px;padding-top:4px;background:url(http://files.smarter.com/images/v6/featuredmerchant_bg.gif) no-repeat 0px 0px;text-align:center}table.plisttable .merchantprice a{margin-right:8px}.splitfav{border:1px solid #C8C7C3}.searchfavbottom{margin-bottom:15px}.searchfavbottom .favbox{padding-top:0;margin:18px 10px 10px 10px}.moreattributes{position:relative;clear:both;z-index:100}.moreattributes .wrapper{position:absolute;width:500px;padding:0;background:#fff;left:60px;top:-50px;border:#C8C7C3 1px solid}.moreattributes .close a{float:right;font-size:1.0em;background:url(http://files.smarter.com/images/google000/close_icon.png) no-repeat right 3px;padding-right:10px;color:#9B9581;margin:4px 5px 0 0}.moreattributes .content{width:490px;padding-left:10px;max-height:250px;overflow-y:auto;overflow-x:hidden;position:relative}.moreattributes .letterareawrapper{text-align:center;width:500px;padding:5px 0 5px 0;border-bottom:1px solid #E5DBE6;clear:both}.moreattributes .letterarea{color:#fff;font-size:1.3em;width:412px;margin:0px 35px 0px 45px}.moreattributes .letterarea a:link,.moreattributes .letterarea a:active,.moreattributes .letterarea a:visited{color:#004E9E;display:block;line-height:20px;height:20px;padding-left:5px;float:left;margin-right:5px;margin-bottom:3px;font-size:1.15em;font-weight:bold;width:16px;border:1px solid #E5DBE6}.moreattributes .letterarea a:link span,.moreattributes .letterarea a:active span,.moreattributes .letterarea a:visited span{display:block;line-height:20px;height:20px;padding-right:5px;float:left;cursor:pointer;float:right}.moreattributes .letterarea a:hover{width:16px}.moreattributes .letterarea a:hover span{float:right;cursor:pointer}.moreattributes .letterarea a.first:link,.moreattributes .letterarea a.first:active,.moreattributes .letterarea a.first:visited,.moreattributes .letterarea a.first:hover{width:28px}.moreattributes .letterarea a.last:link,.moreattributes .letterarea a.last:active,.moreattributes .letterarea a.last:visited,.moreattributes .letterarea a.last:hover{margin-left:13px}.moreattributes .letterarea a.letteri:link span,.moreattributes .letterarea a.letteri:active span,.moreattributes .letterarea a.letteri:visited span,.moreattributes .letterarea a.letteri:hover span{padding-right:10px}.moreattributes .letterarea a.noresult:link,.moreattributes .letterarea a.noresult:active,.moreattributes .letterarea a.noresult:visited,.moreattributes .letterarea a.noresult:hover{color:#eee;text-decoration:none}.moreattributes .letterarea a.noresult:link span,.moreattributes .letterarea a.noresult:active span,.moreattributes .letterarea a.noresult:visited span,.moreattributes .letterarea a.noresult:hover span{color:#eee;cursor:default;text-decoration:none}.moreattributes table{height:100%;width:100%}.moreattributes td{vertical-align:middle;text-align:center;padding:115px 0}.moreattributes .content strong{display:block;clear:both;padding-left:10px;padding-top:5px;font-size:1.4em;color:#000}.moreattributes .content strong a:link,.moreattributes .content strong a:active,.moreattributes .content strong a:visited,.moreattributes .content strong a:hover{color:#000;text-decoration:none;font-size:1.0em}.moreattributes ul li{width:150px;padding:3px 0 3px 5px}.moreattributes ul li ul li{width:150px}.moreattributes ul li a:link,.moreattributes ul li a:visited,.moreattributes ul li a:active{text-decoration:none;color:#666;cursor:pointer;font-size:1.1em;background:none;display:inline;padding:0;float:none}.moreattributes ul li a:hover{text-decoration:underline;background:none;display:inline;padding:0;float:none}.main .disambiguation{margin:0}.featuredcate{padding:10px 0;float:left}.featuredcate h2{font-size:1.4em;color:#161615;padding-bottom:5px}.featuredcate ul{float:left}.featuredcate ul li{width:128px;height:165px;float:left;margin-right:11px;text-align:center;background:#f8f5f9;padding:10px}.featuredcate ul li img.pimg{border:#e5dbe6 1px solid;margin-bottom:5px;display:block}.featuredcate ul li a:link,.featuredcate ul li a:active,.featuredcate ul li a:visited,.featuredcate ul li a:hover{color:#004E9E;font-size:1.2em}.featuredcate a.morefclink{float:left;margin-top:170px}.morefc{position:relative;clear:both;z-index:100}.morefc .wrapper{position:absolute;width:500px;padding:0;background:#fff;left:490px;top:-170px;border:#7e634e 1px solid}.morefc .close a{float:right;font-size:1.0em;background:url(http://files.smarter.com/images/google000/close_icon.png) no-repeat right 3px;padding-right:10px;color:#7e634e;margin:4px 5px 0 0}.morefc .content{width:490px;padding-left:10px;max-height:250px;overflow-y:auto;overflow-x:hidden;position:relative}.morefc .letterareawrapper{text-align:center;width:500px;padding:5px 0 5px 0;border-bottom:1px solid #E5DBE6;clear:both}.morefc .letterarea{color:#fff;font-size:1.3em;width:412px;margin:0px 35px 0px 45px}.morefc .letterarea a:link,.morefc .letterarea a:active,.morefc .letterarea a:visited{color:#004E9E;display:block;line-height:20px;height:20px;padding-left:5px;float:left;margin-right:5px;margin-bottom:3px;font-size:1.15em;font-weight:bold;width:16px;border:1px solid #E5DBE6}.morefc .letterarea a:link span,.morefc .letterarea a:active span,.morefc .letterarea a:visited span{display:block;line-height:20px;height:20px;padding-right:5px;float:left;cursor:pointer;float:right}.morefc .letterarea a:hover{width:16px}.morefc .letterarea a:hover span{float:right;cursor:pointer}.morefc .letterarea a.first:link,.morefc .letterarea a.first:active,.morefc .letterarea a.first:visited,.morefc .letterarea a.first:hover{width:28px}.morefc .letterarea a.last:link,.morefc .letterarea a.last:active,.morefc .letterarea a.last:visited,.morefc .letterarea a.last:hover{margin-left:13px}.morefc .letterarea a.letteri:link span,.morefc .letterarea a.letteri:active span,.morefc .letterarea a.letteri:visited span,.morefc .letterarea a.letteri:hover span{padding-right:10px}.morefc .letterarea a.noresult:link,.morefc .letterarea a.noresult:active,.morefc .letterarea a.noresult:visited,.morefc .letterarea a.noresult:hover{color:#eee;text-decoration:none}.morefc .letterarea a.noresult:link span,.morefc .letterarea a.noresult:active span,.morefc .letterarea a.noresult:visited span,.morefc .letterarea a.noresult:hover span{color:#eee;cursor:default;text-decoration:none}.morefc table{height:100%;width:100%}.morefc td{vertical-align:middle;text-align:center;padding:115px 0}.morefc .content strong{display:block;clear:both;padding-left:10px;padding-top:5px;font-size:1.4em;color:#000}.morefc .content strong a:link,.morefc .content strong a:active,.morefc .content strong a:visited,.morefc .content strong a:hover{color:#000;text-decoration:none;font-size:1.0em}.morefc ul li{width:150px;padding:3px 0 3px 5px;float:left}.morefc ul li ul li{width:150px}.morefc ul li a:link,.morefc ul li a:visited,.morefc ul li a:active{text-decoration:none;color:#666;cursor:pointer;font-size:1.1em;background:none;display:inline;padding:0;float:none}.morefc ul li a:hover{text-decoration:underline;background:none;display:inline;padding:0;float:none}.overlay{display:none;z-index:11000;height:350px;width:522px}.overlayvideo{display:none;z-index:10000;height:355px;width:355px}.overlayenlarge{display:none;z-index:10000;height:355px;width:422px}.overlaypinfo{display:none;z-index:10000;height:350px;width:620px}.overlaycoupon{display:none;z-index:11000;height:350px;width:450px}.catetips{margin:10px 0;padding:5px 7px;border:#dbdbdb 1px solid;clear:both}.catetips h2{font-size:1.4em;color:#282828;padding:5px 0 3px 0}.catetips p{font-size:1.1em;color:#848484}.catetips a{font-size:1.0em}.editorpick{margin:10px 0;padding:5px 7px;border:#dbdbdb 1px solid}.editorpick h2{font-size:1.4em;color:#282828;padding:5px 0 3px 0}.editorpick .topcow{font-size:1.1em;color:#9a9a9a;padding-bottom:15px}.editorpick ul{width:30%;float:left;height:110px;_position:relative}.editorpick ul li{padding-bottom:5px;margin-right:5px}.editorpick ul li.imgbox{float:left}.editorpick ul li.name a{font-size:1.4em;font-weight:bold}.editorpick ul li.desc,.editorpick ul li.desc a{font-size:1.1em;color:#7f7f7f}.moreshoppingbox{border:#d8d4d1 1px solid;clear:both;padding:15px;margin-bottom:10px}.moreshoppingbox h2{font-size:1.4em;color:#2e2f30;padding-bottom:5px}.moreshoppingbox .moreshopping{padding-bottom:10px}.moreshoppingbox p{font-size:1.2em}.moreshoppingbox p a:link,.moreshoppingbox p a:active,.moreshoppingbox p a:visited,.moreshoppingbox p a:hover{font-size:1.0em}.listfav .favbox ul{width:auto}.listfav .favbox ul li.favwww{display:block}.shopbymenu{border:#e4e3df 1px solid;margin-bottom:10px;padding:3px 5px}.shopbymenu h2{font-size:1.2em;color:#9B9581;height:22px;line-height:22px;padding:0px;font-weight:normal;text-transform:uppercase}.shopbymenu ul li{background:url(http://files.smarter.com/images/v6/all_cate_dot.gif) no-repeat 3px 9px;padding-left:12px;line-height:20px}.shopbymenu ul li a{color:#545454}.shopbymenu ul li a.active{font-weight:bold;color:#000}.shopbyletter{background:url(http://files.smarter.com/images/v6/shopbyletter_bg.gif) repeat-x 0px 0px;height:45px}.shopbyletter h2{font-size:2.8em;color:#121212;font-weight:normal}.shopbyletter table{width:100%}.shopbyletter td{text-align:center;width:3.8%}.shopbyletter a:link,.shopbyletter a:active,.shopbyletter a:visited,.shopbyletter a:hover{color:#2d2d2d;font-size:1.6em;font-weight:bold;display:block;padding-top:5px;height:35px;line-height:35px}.shopbyletter a.noresult:link,.shopbyletter a.noresult:active,.shopbyletter a.noresult:visited,.shopbyletter a.noresult:hover{color:#dbdbdb}.shopbyletter a.selected:link,.shopbyletter a.selected:active,.shopbyletter a.selected:visited,.shopbyletter a.selected:hover{background:url(http://files.smarter.com/images/v6/shopbyselected_bg.gif) no-repeat 0px 0px;width:56px;padding:0;height:45px;line-height:45px;font-size:2.8em}.shopbylistwrapper{padding:10px;border-bottom:#e8e7e2 1px solid;margin-bottom:0px;min-width:778px}.shopbylistwrapperlast{border:0}.shopbylistwrapper h3{font-size:1.4em;color:#891704;padding-bottom:5px}.shopbyproduct{position:relative;width:125px;margin:0 15px 0 0px;text-align:center;float:left;padding:3px}.shopbylistwrapper .last{margin-right:0}.shopbyproduct a.prodimg{display:block;width:124px;height:160px;background:url(http://files.smarter.com/images/icon_loading.gif) center 40px no-repeat}.shopbyproduct a.dealoff{position:absolute;top:90px;left:-10px;display:block;width:58px;height:18px;line-height:18px;color:#fff;background:url(http://files.smarter.com/images/v6/deal_bg.gif) no-repeat 0px 0px;text-decoration:none;font-size:1em}.shopbyproduct .pcontent{position:absolute;bottom:0px;left:0px;width:125px;background:url(http://files.smarter.com/images/v6/shopbypname_bg.png) repeat 0px 0px;padding-bottom:3px}.shopbyproduct .pname{padding:3px 2px}.shopbyproduct .pname a{font-size:1.1em;font-weight:bold}.shopbyproduct .pname a strong{color:#029361}.shopbyproduct .pprice{padding:0}.shopbyproduct .pprice a{color:#b00000;font-size:1.1em;font-weight:bold}.shopbyproduct .pprice a.oprice{color:#303030;text-decoration:line-through}.shopbyproduct .pprice a.store{color:#004E9E;font-weight:normal}.shopbylistwrapper .seemore{padding-top:70px;float:left}.shopbyfav{border:0;background:#fff url(http://files.smarter.com/images/v6/fav_icon.gif) right 7px no-repeat;border-bottom:#e8e7e2 1px solid;margin-bottom:0;padding-top:12px}.topsellerfav{border:0}.shopbyfav .favbox{width:60%;margin:0 auto 0 0}.shopbyfav .favbox ul li.favwww{display:inline}.shopbyfav .favbox ul li.favtit{clear:both}.narrowfav .favbox{width:auto}.narrowfav .favbox ul{float:left;width:160px}.narrowfav .favbox ul li.favtit,.narrowfav .favbox ul li.favdes,.narrowfav .favbox ul li.favwww{display:block}.shopbyfav a.favtit:link,.shopbyfav a.favtit:visited,.shopbyfav a.favtit:active{color:#727272;font-size:1.6em;text-decoration:none;font-weight:bold}.shopbyfav a.favtit:hover{color:#727272;font-size:1.6em;text-decoration:underline;font-weight:bold}.shopbyfav a.favdes:link,.shopbyfav a.favdes:visited,.shopbyfav a.favdes:hover,.shopbyfav a.favdes:active{color:#595959;text-decoration:none;font-size:1.1em}.shopbyfav a.favwww:link,.shopbyfav a.favwww:visited,.shopbyfav a.favwww:hover,.shopbyfav a.favwww:active{color:#800404;text-decoration:none;font-size:1.1em}.narrowfav a.favtit:link,.narrowfav a.favtit:visited,.narrowfav a.favtit:active{color:#004E9E;font-size:1.6em;text-decoration:underline;font-weight:bold}.narrowfav a.favtit:hover{color:#004E9E;font-size:1.6em;text-decoration:underline;font-weight:bold}.narrowfav a.favwww:link,.narrowfav a.favwww:visited,.narrowfav a.favwww:hover,.narrowfav a.favwww:active{color:#0E774A;text-decoration:none;font-size:1.1em}.shopbyfav .sellerrating{}.narrowfav .sellerrating span{line-height:13px;float:left;word-wrap:normal}.shopbyfav .sellerrating span.info{font-size:1.1em}.shopbyfav .sellerrating span a{color:#595959}.shopbyfav .favbox ul{margin-bottom:10px}.topsellerwrapper{border:0}.topsellerwrapper .shopbyproduct{width:171px;height:244px;border:#e8e7e2 1px solid;margin-bottom:15px}.topsellerwrapper .shopbyproduct a.prodimg{width:170px;height:245px;background-position:center 77px}.topsellerwrapper .shopbyproduct a.dealoff{top:154px}.topsellerwrapper .shopbyproduct .pcontent{width:171px;left:3px}.shopbystoretit{padding:5px 0 0 0}.colstore{width:260px;float:left;padding-left:5px}.shopbystorewrapper{padding:5px 0;height:160px;overflow:hidden}.shopbystorewrapper .colstore{padding-left:0;float:left;text-align:center;padding-top:10px}.shopbystorewrapper .shopbyproduct{margin-right:15px;padding:0;margin-bottom:10px}.shopbystorewrapper .seemore{position:absolute;right:20px}.shopbystorewrapper .storeprice{color:#333;font-size:1.4em;padding:10px 0}.shopbystorewrapper .storeprice img{margin-right:3px}.shopbystorewrapper .storeprice a{font-size:1.3em;line-height:25px}.shopbystorewrapper .freeshipping{color:#234594;font-style:italic;font-size:1.2em}.shopbybrandwrapper{padding:10px 0 0 0}.shopbybrandwrapper .shopbyproduct{margin-right:10px;padding:0;margin-bottom:5px}.shopbybrandwrapper .shopbyproduct a.dealoff{top:70px;left:-3px}
123gohelmetsv2
trunk/test/css-2.css
CSS
asf20
49,097
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once('./configure/ppsdk_include_path.inc'); include_once("customerSession.inc.php"); include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("Session.php"); //-- Session include_once("Strings.php"); //--> String utils include_once ("orders/OrdersAccount.php"); //-- for payment include_once ("CustomerDao.php"); //-- for payment include_once ("AddressBookDao.php"); //-- for payment include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart include_once("orders/OrdersInfo.php"); //-- for payment include_once("CouponImpl.php"); //--> coupon impl include_once("CouponCustomer.php"); include_once("CouponDomain.php"); //--> coupon domain include_once ("paypal-app/PaypalInfo.php"); //-- for payment include_once ("paypal-app/PaymentPro.php"); //-- for payment include_once("Zone.php"); //--> Zone include_once("Country.php"); //--> Country include_once ("Password.php"); //-- Password require_once('includeHttps.php'); session_start(); $common = new Common(); $objCustomerDao = new CustomerDao(); $objOrdersInfo = new OrdersInfo(); $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session $objCart = new Cart(); //--> Cart $objStrings = new Strings(); $objPassword = new Password(); $objZone = new Zone(0); //--> Zone $objCountry = new Country(0); //--> Country $objPaymentPro = new PaymentPro(); $objPaypalInfo = new PaypalInfo(); /*----- check session -----*/ $isLogin = false; if($objSession->exist()) { $isLogin = true; $customerid = $objSession->getUserID(); $customer = $common->getRow(DB_TAG_SYSTEM, "SELECT * FROM customers WHERE id =$customerid"); $objCustomerDao->setID($customerid); $objCustomerDao->setFirstName($customer['firstname']); $objCustomerDao->setLastName($customer['lastname']); $objCustomerDao->setEmail($customer['email']); $objCustomerDao->setTelephone($customer['telephone']); $objCustomerDao->setFax($customer['fax']); $objCustomerDao->setNewsletter($customer['newsletter']); $objCustomerDao->setPaypalEC($customer['paypal_ec']); $objCustomerDao->setPaypalPayerid($customer['paypal_payerid']); $objCustomerDao->setPassword($customer['password']); $objCustomerDao->setCreatedTime('UTC_TIMESTAMP()'); $objCustomerDao->setModifiedTime('UTC_TIMESTAMP()'); $objCustomerDao->setCountryid($customer['countryid']); $objCustomerDao->setAddressid($customer['default_address_id']); $_SESSION['customerInfo'] = serialize($objCustomerDao); } if($_SESSION['cart']){ $objCart = unserialize($_SESSION['cart']); } if(isset($_SESSION['ordersInfo'])){ $objOrdersInfo = unserialize($_SESSION['ordersInfo']); } if($_SESSION['paypalInfo']){ $objPaypalInfo = unserialize($_SESSION['paypalInfo']); } $productTotal = $objCart->getAmount(); if($productTotal == 0){ $location = HOME_URL . "/viewCart.php"; header("Location: $location"); exit; } $zoneid = 0; $error_message = ''; $paymentMethod = ''; if(isset($_POST['Submit'])){ $comments = $_POST['comments']; $paymentMethod = $_POST['paymentMethod']; $objCart->setStatus(Cart::STATUS_LOOKED); $objOrdersInfo->setPaymentMethod($paymentMethod); $objOrdersInfo->setComments($comments); $_SESSION['ordersInfo'] = serialize($objOrdersInfo); $_SESSION['cart'] = serialize($objCart); if($paymentMethod == OrdersInfo::DIRECT_PAYMENT){ $cc_firstname = $_POST['cc_firstname']; $cc_lastname = $_POST['cc_lastname']; $cc_type = $_POST['cc_type']; $cc_number = $_POST['cc_number']; $cc_expires_year = $_POST['cc_expires_year']; $cc_expires_month = $_POST['cc_expires_month']; $cc_checkcode = $_POST['cc_checkcode']; $objPaypalInfo->setCCFirstName($cc_firstname); $objPaypalInfo->setCCLastName($cc_lastname); $objPaypalInfo->setCCType($cc_type); $objPaypalInfo->setCCNumber($cc_number); $objPaypalInfo->setCCYear($cc_expires_year); $objPaypalInfo->setCCExpiresMonth($cc_expires_month); $objPaypalInfo->setCCCheckCode($cc_checkcode); $_SESSION['paypalInfo'] = serialize($objPaypalInfo); if($isLogin){ $location = 'checkoutFinish.php'; }else{ $location = HOME_URL . "/viewCart.php"; } // if(empty($customerid)){ // $deliveryAddress = $objOrdersInfo->getDeliveryAddress(); // // $objCustomerDao->setID(0); // $objCustomerDao->setFirstName($deliveryAddress->getFirstName()); // $objCustomerDao->setLastName($deliveryAddress->getLastName()); // $objCustomerDao->setEmail(""); // $objCustomerDao->setTelephone($deliveryAddress->getPhoneNumber()); // $objCustomerDao->setFax(''); // $objCustomerDao->setNewsletter(0); // $objCustomerDao->setPaypalEC(1); // $objCustomerDao->setPaypalPayerid(0); // $objCustomerDao->setPassword(''); // $objCustomerDao->setCreatedTime('UTC_TIMESTAMP()'); // $objCustomerDao->setModifiedTime('UTC_TIMESTAMP()'); // $objCustomerDao->setCountryid($objOrdersInfo->getDeliveryAddress()->getCountryid()); // $objCustomerDao->setNewsletter('unsubscribed'); // // $_SESSION['customerInfo'] = serialize($objCustomerDao); // } $location = 'checkoutFinish.php'; header("Location: $location"); exit; }else if($paymentMethod == OrdersInfo::MONEY_ORDER){ if($isLogin){ $location = 'checkoutFinish.php'; }else{ $location = HOME_URL . "/viewCart.php"; } // if(empty($customerid)){ // $deliveryAddress = $objOrdersInfo->getDeliveryAddress(); // // $objCustomerDao->setID(0); // $objCustomerDao->setFirstName($deliveryAddress->getFirstName()); // $objCustomerDao->setLastName($deliveryAddress->getLastName()); // $objCustomerDao->setEmail(""); // $objCustomerDao->setTelephone($deliveryAddress->getPhoneNumber()); // $objCustomerDao->setFax(''); // $objCustomerDao->setNewsletter(0); // $objCustomerDao->setPaypalEC(1); // $objCustomerDao->setPaypalPayerid(0); // $objCustomerDao->setPassword(''); // $objCustomerDao->setCreatedTime('UTC_TIMESTAMP()'); // $objCustomerDao->setModifiedTime('UTC_TIMESTAMP()'); // $objCustomerDao->setCountryid($objOrdersInfo->getDeliveryAddress()->getCountryid()); // $objCustomerDao->setNewsletter('unsubscribed'); // // $_SESSION['customerInfo'] = serialize($objCustomerDao); // } // // $location = 'checkoutFinish.php'; header("Location: $location"); exit; }else if($paymentMethod == OrdersInfo::EXPRESS_CHECKOUT){ $location = "expressCheckout.php"; header("Location: $location"); exit; } } if(isset($_POST['address_submit'])){ $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $countryId = $_POST['countryId']; $zipcode = $_POST['zipcode']; $city = $_POST['city']; $street = $_POST['street']; $state = $_POST['state']; $zoneid = $_POST['zoneid']; $phoneNumber = $_POST['phoneNumber']; if(empty($firstname)) $error_message = 'First name is required.'; else if(empty($lastname)){ $error_message = 'Last name is required.'; }else if(empty($street)){ $error_message = 'Street address is required.'; }else if(empty($zipcode)){ $error_message = 'Zipcode is required.'; }else if(empty($city)){ $error_message = 'City is required.'; }else if(empty($state) && empty($zoneid)){ $error_message = 'State is required.'; }else if(empty($phoneNumber)){ $error_message = 'Phone number is required.'; } if(empty($error_message)){ if(!empty($zoneid)){ $sql = "SELECT code FROM zones WHERE id = $zoneid"; $state = $common->getColumn(DB_TAG_SYSTEM, $sql); } if(!empty($countryId)){ $sql = "SELECT name FROM countries WHERE id = $countryId"; $country = $common->getColumn(DB_TAG_SYSTEM, $sql); } $objAddressBookDao = new AddressBookDao(); $objAddressBookDao->setFirstName($firstname); $objAddressBookDao->setLastName($lastname); $objAddressBookDao->setCountryid($countryId); $objAddressBookDao->setStreet($street); $objAddressBookDao->setCity($city); $objAddressBookDao->setState($state); $objAddressBookDao->setZoneid($zoneid); $objAddressBookDao->setZipcode($zipcode); $objAddressBookDao->setPhoneNumber($phoneNumber); $objAddressBookDao->setCountry($country); $objOrdersInfo->setDeliveryAddress($objAddressBookDao); // rigester guest customer $guestEmail = $objOrdersInfo->getEmail(); if(!empty($guestEmail) && !$isLogin){ $customer = $common->getRow(DB_TAG_SYSTEM, "SELECT id FROM customers WHERE email ='$guestEmail'"); if(count($customer) == 0){ $salt = '46z3haZzegmn676PA3rUw2vrkhcLEn2p1c6gf7vp2ny4u3qqfqBh5j6kDhuLmyv9xf'; srand((double)microtime() * 1000000); $password = ''; for ($x = 0; $x < 7; $x++) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $password = $password . $tmp; } $objCustomerDao->setFirstName($firstname); $objCustomerDao->setLastName($lastname); $objCustomerDao->setEmail($guestEmail); $objCustomerDao->setTelephone($phoneNumber); $objCustomerDao->setFax(''); $objCustomerDao->setNewsletter(0); $objCustomerDao->setPaypalEC(1); $objCustomerDao->setPaypalPayerid(0); $objCustomerDao->setPassword($objPassword->encrypt($password)); $objCustomerDao->setCreatedTime('UTC_TIMESTAMP()'); $objCustomerDao->setModifiedTime('UTC_TIMESTAMP()'); $objCustomerDao->setCountryid($countryId); $objCustomerDao->setNewsletter('unsubscribed'); $objCustomerDao->setAutoRegister(1); // insert the data $customerid = $common->insertUpdate(DB_TAG_SYSTEM, 'customers', $objCustomerDao->getArray()); $objCustomerDao->setID($customerid); $objAddressBookDao->setCustomerid($customerid); // insert the data $addressid = $common->insertUpdate(DB_TAG_SYSTEM, 'address_book', $objAddressBookDao->getArray()); $objAddressBookDao->setID($addressid); $objCustomerDao->setAddressid($addressid); $sql = "UPDATE customers SET modifiedTime = UTC_TIMESTAMP(), default_address_id = '$addressid' WHERE id = $customerid"; $common->update(DB_TAG_SYSTEM, $sql); // login $arrdata = array(); $arrdata['uname'] = $lastname; //--> add login name to session if($customerid > 0 && is_array($objSession->start($customerid, $arrdata))){ } $_SESSION['customerInfo'] = serialize($objCustomerDao); } } $_SESSION['ordersInfo'] = serialize($objOrdersInfo); } } if(isset($_POST['address_edit'])){ $objOrdersInfo->setDeliveryAddress(null); $_SESSION['ordersInfo'] = serialize($objOrdersInfo); } if(isset($_SESSION['customerInfo'])){ $objCustomer = unserialize($_SESSION['customerInfo']); $customerid = $objCustomer->getID(); $addressid = $objCustomer->getAddressid(); }else if(!empty($customerid) && $customerid > 0){ $customer = $common->getRow(DB_TAG_SYSTEM, "SELECT * FROM customers WHERE id =$customerid"); $objCustomerDao->setID($customerid); $objCustomerDao->setFirstName($customer['firstname']); $objCustomerDao->setLastName($customer['lastname']); $objCustomerDao->setEmail($customer['email']); $objCustomerDao->setTelephone($customer['telephone']); $objCustomerDao->setFax($customer['fax']); $objCustomerDao->setNewsletter($customer['newsletter']); $objCustomerDao->setPaypalEC($customer['paypal_ec']); $objCustomerDao->setPaypalPayerid($customer['paypal_payerid']); $objCustomerDao->setPassword($customer['password']); $objCustomerDao->setCreatedTime('UTC_TIMESTAMP()'); $objCustomerDao->setModifiedTime('UTC_TIMESTAMP()'); $objCustomerDao->setCountryid($customer['countryid']); $objCustomerDao->setAddressid($customer['default_address_id']); if(!empty($customer['default_address_id'])){ $arrAddress = $common->getRow(DB_TAG_PUBLIC, "SELECT a.id, a.customerid, a.gender, a.company, a.firstname, a.lastname, a.street, a.suburb, a.postcode, a.city, a.state, a.countryid, a.zoneid, c.name countryname FROM address_book a, countries c WHERE a.countryid = c.id AND a.id = " . $customer['default_address_id']); $objAddressBookDao = new AddressBookDao(); $objAddressBookDao->setArray($arrAddress); $objOrdersInfo->setCustomerAddress($objAddressBookDao); $objOrdersInfo->setDeliveryAddress($objAddressBookDao); } $_SESSION['customerInfo'] = serialize($objCustomerDao); } $oDeliveryAddress = $objOrdersInfo->getDeliveryAddress(); if(is_object($oDeliveryAddress)){ $zoneid = $objOrdersInfo->getDeliveryAddress()->getZoneid(); $countryid = $objOrdersInfo->getDeliveryAddress()->getCountryid(); } $taxTotal = 0; $shippingTotal = 0; $saveDollar = 0; $shippingFeeLimit = 10000; // x 100. if product total amount more than this, than free shipping, only 48 zones for USA $shippingZoneId = 0; /*------------- shipping start ------------------*/ if($countryid == 223 && $zoneid != 2 && $zoneid != 21 && $zoneid != 52){ $shippingMethodID = 1; $shippingZoneId = 12;// for 48 zone of USA }else if($countryid == 223){// for PR, AK, HI $sql = "SELECT id FROM shipping_method WHERE id IN (SELECT shippingMethodID FROM shipping_fee WHERE zoneID = $shippingZoneId AND status='yes')"; $shippingMethodID = $common->getColumn(DB_TAG_PUBLIC, $sql); if(empty($shippingMethodID)){// default shipping method $shippingMethodID = 3; } }else{ $shippingMethodID = 4; } $sql = "SELECT id, name FROM shipping_method WHERE id = $shippingMethodID"; $arrShippingMethod = $common->getHash(DB_TAG_PUBLIC, $sql); $arrShippingTypeID = array(); $arrProductList = $objCart->getProductList(); foreach($arrProductList as $product){ $shippingTypeID = $product->getShippingTypeID(); $sql = "SELECT amount, amount2 FROM shipping_fee WHERE zoneID = $shippingZoneId AND shippingMethodID = $shippingMethodID AND shippingTypeID = $shippingTypeID"; $arrShippingFee = $common->getRow(DB_TAG_PUBLIC, $sql); if(count($arrShippingFee) > 0){ if( array_key_exists($shippingTypeID, $arrShippingTypeID)){ $shippingTotal += $arrShippingFee['amount2']; }else{ $shippingTotal += $arrShippingFee['amount']; } if($product->getQuantity() > 1){ $shippingTotal += ($product->getQuantity() - 1) * $arrShippingFee['amount2']; } $arrShippingTypeID[$shippingTypeID] = $shippingTypeID; }else{// default value if($countryid == 223){ if( array_key_exists($shippingTypeID, $arrShippingTypeID)){ $shippingTotal += 600; }else{ $shippingTotal += 995; } $arrShippingTypeID[$shippingTypeID] = $shippingTypeID; }else if($countryid == 38){//Canada if( array_key_exists($shippingTypeID, $arrShippingTypeID)){ $shippingTotal += 1400; }else{ $shippingTotal += 3495; } $arrShippingTypeID[$shippingTypeID] = $shippingTypeID; }else{//other countries if( array_key_exists($shippingTypeID, $arrShippingTypeID)){ $shippingTotal += 5000; }else{ $shippingTotal += 6500; } $arrShippingTypeID[$shippingTypeID] = $shippingTypeID; } } } if($productTotal > $shippingFeeLimit && $countryid == 223 && $shippingZoneId != 2 && $shippingZoneId != 21 && $shippingZoneId != 52){ $shippingTotal = 0; } /*------------- shipping end ------------------*/ /*------------- tax start ------------------*/ $arrTaxReal = array(); if($zoneid > 0){ $arrTax = $common->getHash(DB_TAG_PUBLIC, "SELECT tr.id, tr.rate FROM tax_class tc, tax_rates tr WHERE tc.id = tr.classID AND tr.zoneID = $zoneid ORDER BY priority"); foreach($arrTax as $key => $value){ $taxSubTotal = $value * $productTotal; $taxTotal += $taxSubTotal; } } /*------------- tax end ------------------*/ if(empty($countryId)) $countryId = 223; $arrCountries = $objCountry->getGroupList(); $arrZones = $objZone->getGroupList($countryId); if(count($arrZones) > 0) $hasZone = 'yes'; $taxTotal = round($taxTotal / 1000000 , 2); $saveDollar = round($objCart->getSaveOff() / 100, 2); $shippingTotal = round($shippingTotal / 100, 2); $productTotal = round($productTotal / 100, 2); $allTotal = $productTotal + $taxTotal + $shippingTotal; $objOrdersAccount = new OrdersAccount(); $objOrdersAccount->setTaxTotal($taxTotal); $objOrdersAccount->setShippingTotal($shippingTotal); $objOrdersAccount->setAllTotal($allTotal); $objOrdersAccount->setSaveOff($saveDollar); $objOrdersAccount->setProductTotal($productTotal); $objOrdersInfo->setAccount($objOrdersAccount); $objOrdersInfo->setShippingTypeID($shippingMethodID); $_SESSION['ordersInfo'] = serialize($objOrdersInfo); $_SESSION['cart'] = serialize($objCart); /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->force_compile = true; $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; $smarty->assign('HOME_URL', '.'); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('error_message', $error_message); $smarty->assign('firstname', $firstname); $smarty->assign('lastname', $lastname); $smarty->assign('zipcode', $zipcode); $smarty->assign('city', $city); $smarty->assign('street', $street); $smarty->assign('state', $state); $smarty->assign('phoneNumber', $phoneNumber); $smarty->assign('paymentMethod', $paymentMethod); $smarty->assign('arrZones', $arrZones); $smarty->assign('zoneid', $zoneid); $smarty->assign('hasZone', $hasZone); $smarty->assign('countryId', $countryId); $smarty->assign('arrCountries', $arrCountries); $smarty->assign('arrShippingMethod', $arrShippingMethod); $smarty->assign('shippingMethodId', $shippingMethodID); $smarty->assign('shippingTotal', $shippingTotal); $smarty->assign('taxTotal', $taxTotal); $smarty->assign('saveDollar', $saveDollar); $smarty->assign('productTotal', $productTotal); $smarty->assign('allTotal', $allTotal); $smarty->assign('objStrings', $objStrings); $smarty->assign('objCart', $objCart); $smarty->assign('objOrdersInfo', $objOrdersInfo); $smarty->assign('oDeliveryAddress', $oDeliveryAddress); $smarty->assign('objCustomerDao', $objCustomerDao); $smarty->assign('isLogin', $isLogin); $smarty->display('checkout.html'); ?>
123gohelmetsv2
trunk/checkout.php
PHP
asf20
19,380
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("customerSession.inc.php"); include_once ("Session.php"); //-- Session include_once("Orders.php"); //--> Orders include_once("Strings.php"); //--> String utils include_once("TimeZone.php"); //--> TimeZone include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart require_once('includeHttps.php'); $common = new Common(); $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session $objCart = new Cart(); //--> Cart $objStrings = new Strings(); $oTimeZone = new TimeZone(); //--> TimeZone $isLogin = false; /*----- check session -----*/ if($objSession->exist()) { $isLogin = true; $customerid = $objSession->getUserID(); }else{ $location = './login.php'; header("Location: $location"); exit; } session_start(); if($_SESSION['cart']) $objCart = unserialize($_SESSION['cart']); $objOrders = new Orders(DB_TAG_PUBLIC, $customerid); //--> Orders include_once("includeCategory.php"); //--> include category include_once("includeSpec.php"); //--> include spec $ordersid = $_GET['ordersid']; $arrOrders = $objOrders->getRow(DB_TAG_PUBLIC, "SELECT * FROM orders WHERE id = $ordersid"); $arrOrdersProducts = array(); $arrProducts = $objOrders->listCustom(DB_TAG_PUBLIC, '*', "orders_products WHERE ordersID=$ordersid", '', 0, 100, ''); foreach($arrProducts as $key => $row){ $arrAttribute = $common->getAllData(DB_TAG_PUBLIC, "SELECT * FROM orders_products_attributes WHERE productID = ".$row['productsID']." AND ordersID = $ordersid"); if(count($arrAttribute) > 0){ $row['attributes'] = $arrAttribute; } $arrOrdersProducts[] = $row; } $arrStatusList = array(); $arrAccountList = $objOrders->listCustom(DB_TAG_PUBLIC, '*', "orders_account WHERE ordersID=$ordersid", " ORDER BY classes", 0, 100, ''); $arrAllStatusList = $objOrders->listCustom(DB_TAG_PUBLIC, '*', "orders_status_history WHERE ordersID=$ordersid", " ORDER BY id", 0, 100, ''); foreach($arrAllStatusList as $row){ $DatePurchased = $oTimeZone->getTime($row['createdTime'], 'UTC', 'America/Los_Angeles'); $row['datePurchased'] = $DatePurchased; $arrStatusList[] = $row; } /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->force_compile = false; $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; $smarty->assign('error_message', $error_message); $smarty->assign('HOME_URL', HOME_URL); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('categorys', $categorys); $smarty->assign('topCategory', $topCategory); $smarty->assign('specProducts', $specProducts); $smarty->assign('arrOrders', $arrOrders); $smarty->assign('arrOrdersProducts', $arrOrdersProducts); $smarty->assign('arrAccountList', $arrAccountList); $smarty->assign('arrStatusList', $arrStatusList); $smarty->assign('objCart', $objCart); $smarty->assign('objStrings', $objStrings); $smarty->assign('isLogin', $isLogin); $smarty->display('ordersView.html'); ?>
123gohelmetsv2
trunk/ordersView.php
PHP
asf20
3,649
<?php /* * Created on Oct 19, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ phpinfo(); ?>
123gohelmetsv2
trunk/phpinfo.php
PHP
asf20
183
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("Strings.php"); //--> String utils include_once("customerSession.inc.php"); include_once("Session.php"); //-- Session include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart $common = new Common(); $objStrings = new Strings(); $objCart = new Cart(); //--> Cart $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session session_start(); $isLogin = false; if($objSession->exist()) { $isLogin = true; } if(isset($_GET['page'])) $page = $_GET['page']; else $page = 1; if(isset($_GET['keyword'])) $keyword = urldecode(trim(str_replace('~_~', '/', $_GET['keyword']))); else $location = HOME_URL . '/c/0/1/productList.html'; if($_SESSION['cart']) $objCart = unserialize($_SESSION['cart']); include_once("includeCategory.php"); //--> include category include_once("includeSpec.php"); //--> include spec $where = "products p, products_description pd WHERE p.status = 'normal' AND p.id = pd.productID AND pd.languageID = $LANGEUAGE_ID AND pd.name like '%$keyword%'"; $products = array(); $allproducts = $common->listCustom(DB_TAG_PUBLIC, 'p.id, p.price, pd.name',$where , 'ORDER BY p.id', $page, 15); foreach($allproducts as $key => $value){ $arrImages = $common->getHash(DB_TAG_PUBLIC, "SELECT u.id, u.extName FROM upload_files u, product_images p WHERE u.id = p.imageID AND p.productID = ".$value['id']." AND type = " . UploadFiles::TYPE_IMAGE . ' ORDER BY u.width desc LIMIT 1'); if(count($arrImages) > 0){ $value['imageid'] = key($arrImages); $value['imageExt'] = $arrImages[$value['imageid']]; } $products[] = $value; } /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->debugging = false; //$smarty->caching = true; $smarty->assign('HOME_URL', HOME_URL); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('objCart', $objCart); $smarty->assign('objStrings', $objStrings); $smarty->assign('categorys', $categorys); $smarty->assign('topCategory', $topCategory); $smarty->assign('specProducts', $specProducts); $smarty->assign('products', $products); $smarty->assign('pageList', $common->getPageList()); $smarty->assign('nextPage', $common->getNextPage()); $smarty->assign('prePage', $common->getPrePage()); $smarty->assign('pageCount', $common->getPageCount()); $smarty->assign('page', $page); $smarty->assign('keyword', $keyword); $smarty->assign('keywordEncode', urlencode(str_replace('/', '~_~', $keyword))); $smarty->assign('isLogin', $isLogin); $smarty->display('searches.html'); ?>
123gohelmetsv2
trunk/searches.php
PHP
asf20
3,197
<?php include_once("../configure/admin.config.inc.php"); //--> admin global var include_once("db.inc.php"); //--> db global var include_once("Smarty.class.php"); //--> out template include_once("Operation.php"); //--> Authority require_once("controlHeader.php"); //--> system control header include_once("ShippingFee.php"); //--> ShippingFee $objOperate = new Operation($objSession->getLanguage()); //--> Operation $objShippingFee = new ShippingFee(DB_TAG_SYSTEM, $uid); //--> ShippingFee $countryid = 0; $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(!empty($id)){ $arrData = $objShippingFee->getByID($arrOperate, $id); $zoneid = $arrData['zoneID']; $shippingMethodID = $arrData['shippingMethodID']; $shippingTypeID = $arrData['shippingTypeID']; $amount = $arrData['amount'] / 100; $amount2 = $arrData['amount2'] / 100; $summary = $arrData['summary']; $countryid = $objShippingFee->getColumn(DB_TAG_PUBLIC, "SELECT countryID FROM zones WHERE id = $zoneid"); } if(isset($_POST['countryid'])){ $countryid = $_POST['countryid']; } if(isset($_POST['Submit'])){ $zoneid = $_POST['zoneid']; $shippingMethodID = $_POST['shippingMethodID']; $shippingTypeID = $_POST['shippingTypeID']; $amount = $_POST['amount']; $amount2 = $_POST['amount2']; $summary = $_POST['summary']; if(empty($summary)){ $summary = $objShippingFee->getColumn(DB_TAG_PUBLIC, "SELECT code FROM zones WHERE id = $zoneid"); } if($amount == "") $error_message = 'Amount should\'t be empty.'; else if($amount2 == "") $error_message = 'Amount2 should\'t be empty.'; else{ $isReturn = $objShippingFee->edit($arrOperate, $id, $zoneid, $shippingMethodID, $shippingTypeID, $amount * 100, $amount2 * 100, $summary, $status = 'yes'); if($isReturn) $error_message = 'edit successfully.'; else $error_message = 'edit failure.'; } } $arrCountry = $objShippingFee->getHash(DB_TAG_PUBLIC, "SELECT id, name FROM countries WHERE id in (SELECT DISTINCT countryID FROM zones)"); if(empty($countryid)){ foreach($arrCountry as $key => $value){ $countryid = $key; break; } } if(!empty($countryid)) $arrZones = $objShippingFee->getHash(DB_TAG_PUBLIC, "SELECT id, name FROM zones WHERE countryID = $countryid"); $arrShippingType = $objShippingFee->getHash(DB_TAG_PUBLIC, "SELECT id, name FROM shipping_type"); $arrShippingMethod = $objShippingFee->getHash(DB_TAG_PUBLIC, "SELECT id, name FROM shipping_method"); /*----- out html -----*/ $smarty = new Smarty(); //----- out template $smarty->template_dir = TEMPLATE_SYS_DIR; $smarty->compile_dir = COMPILE_SYS_DIR; $smarty->assign('menuGid', $menuGid); $smarty->assign('menuid', $menuid); $smarty->assign('id', $id); $smarty->assign('backurl',$backurl); $smarty->assign('error_message', $error_message); $smarty->assign('arrZones', $arrZones); $smarty->assign('zoneid', $zoneid); $smarty->assign('arrCountry', $arrCountry); $smarty->assign('countryid', $countryid); $smarty->assign('arrShippingType', $arrShippingType); $smarty->assign('shippingTypeID', $shippingTypeID); $smarty->assign('arrShippingMethod', $arrShippingMethod); $smarty->assign('shippingMethodID', $shippingMethodID); $smarty->assign('amount', $amount); $smarty->assign('amount2', $amount2); $smarty->assign('summary', $summary); $smarty->display('listShippingFee_Edit.htm'); ?>
123gohelmetsv2
trunk/admin/shippingfee/listShippingFee_Edit.php
PHP
asf20
3,407
<?php include_once("../configure/admin.config.inc.php"); //--> admin global var include_once("db.inc.php"); //--> db global var include_once("Smarty.class.php"); //--> out template include_once("Operation.php"); //--> Operation include_once("ShippingFee.php"); //--> ShippingFee require_once("controlHeader.php"); //--> system control header $objOperate = new Operation($objSession->getLanguage()); //--> Operation $objShippingFee = new ShippingFee(DB_TAG_PUBLIC, $uid); //--> Attributes $error_message = ''; if(isset($_GET['page'])) $page = $_GET['page']; else $page = 1; $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(count($arrOperate) > 0){ $strQuery = $_SERVER["REQUEST_URI"]; $arrUrlInfo = pathinfo($strQuery); $selfFileName = $arrUrlInfo['filename']; $arrOperateAllInfo = $objOperate->listFromCustom($arrOperate, " WHERE id in (".implode(",", $arrOperate).") AND name != 'Add'"); $i = 0; foreach($arrOperateAllInfo as $key => $value){ $strFileName = $selfFileName."_".$value['name'].".php"; if(file_exists($strFileName)){ $arrOperateInfo[$i]['name'] = $value['name']; $arrOperateInfo[$i]['viewName'] = $value['name']; $i++; } } } $arrDataList = array(); $arrAllData = $objShippingFee->lists($arrOperate, $where, $order, $page, DISPLAY_DATA_SIZE, ''); foreach($arrAllData as $key => $value){ $value['type'] = $objShippingFee->getColumn(DB_TAG_PUBLIC, "SELECT name FROM shipping_type WHERE id = " . $value['shippingTypeID']); $value['method'] = $objShippingFee->getColumn(DB_TAG_PUBLIC, "SELECT name FROM shipping_method WHERE id = " . $value['shippingMethodID']); $value['zone'] = $objShippingFee->getColumn(DB_TAG_PUBLIC, "SELECT name FROM zones WHERE id = " . $value['zoneID']); $arrDataList[] = $value; } /*----- out html -----*/ $smarty = new Smarty(); //----- out template $smarty->template_dir = TEMPLATE_SYS_DIR; $smarty->compile_dir = COMPILE_SYS_DIR; $smarty->assign('error_message', $error_message); $smarty->assign('backurl',$backurl); $smarty->assign('menuGid', $menuGid); $smarty->assign('menuid', $menuid); $smarty->assign('selfFileName', $selfFileName); $smarty->assign('arrOperateInfo', $arrOperateInfo); $smarty->assign('arrDataList', $arrDataList); $smarty->assign('PAGE_BAR', $objShippingFee->pagenav); $smarty->display('listShippingFee.htm'); ?>
123gohelmetsv2
trunk/admin/shippingfee/listShippingFee.php
PHP
asf20
2,436
<?php include_once("../configure/admin.config.inc.php");//--> admin global var include_once("db.inc.php"); //--> db global var include_once("ShippingFee.php"); //--> ShippingFee include_once("Operation.php"); //--> Operation require_once("controlHeader.php"); //--> system control header $objShippingFee = new ShippingFee(DB_TAG_PUBLIC, $uid); //--> $objShippingFee $objOperate = new Operation($objSession->getLanguage()); //--> Operation instance $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(isset($_GET['id']) && !empty($_GET['id'])){ $id = $_GET['id']; $isReturn = $objShippingFee->setStatus($arrOperate, $id, "no"); if($isReturn){ $error_message = 'Stop successfully.'; }else $error_message = 'Stop failure.'; } echo "<script language='javascript'>"; echo "alert(\"$error_message\");"; echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";"; echo "</script>"; //$backurl = $_SERVER['HTTP_REFERER']; //header("Location: $backurl"); ?>
123gohelmetsv2
trunk/admin/shippingfee/listShippingFee_Stop.php
PHP
asf20
1,016
<?php include_once("../configure/admin.config.inc.php");//--> admin global var include_once("db.inc.php"); //--> db global var include_once("ShippingFee.php"); //--> ShippingFee include_once("Operation.php"); //--> Operation require_once("controlHeader.php"); //--> system control header $objShippingFee = new ShippingFee(DB_TAG_PUBLIC, $uid); //--> ShippingFee $objOperate = new Operation($objSession->getLanguage()); //--> Operation instance $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(isset($_GET['id']) && !empty($_GET['id'])){ $id = $_GET['id']; $isReturn = $objShippingFee->setStatus($arrOperate, $id, "yes"); if($isReturn){ $error_message = 'live successfully.'; }else $error_message = 'live failure.'; } echo "<script language='javascript'>"; echo "alert(\"$error_message\");"; echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";"; echo "</script>"; //$backurl = $_SERVER['HTTP_REFERER']; //header("Location: $backurl"); ?>
123gohelmetsv2
trunk/admin/shippingfee/listShippingFee_Live.php
PHP
asf20
1,012
<?php include_once("../configure/admin.config.inc.php"); //--> admin global var include_once("db.inc.php"); //--> db global var include_once("Smarty.class.php"); //--> out template include_once("Operation.php"); //--> Authority require_once("controlHeader.php"); //--> system control header include_once("ShippingFee.php"); //--> ShippingFee $objOperate = new Operation($objSession->getLanguage()); //--> Operation $objShippingFee = new ShippingFee(DB_TAG_SYSTEM, $uid); //--> ShippingFee $countryid = 0; if(isset($_POST['countryid'])){ $countryid = $_POST['countryid']; } $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(isset($_POST['Submit'])){ $zoneid = $_POST['zoneid']; $shippingMethodID = $_POST['shippingMethodID']; $shippingTypeID = $_POST['shippingTypeID']; $amount = $_POST['amount']; $amount2 = $_POST['amount2']; $summary = $_POST['summary']; if(empty($summary)){ $summary = $objShippingFee->getColumn(DB_TAG_PUBLIC, "SELECT code FROM zones WHERE id = $zoneid"); } if($amount == "") $error_message = 'Amount should\'t be empty.'; else if($amount2 == "") $error_message = 'Amount2 should\'t be empty.'; else{ $isReturn = $objShippingFee->add($arrOperate, $zoneid, $shippingMethodID, $shippingTypeID, $amount * 100, $amount2 * 100, $summary, $status = 'yes'); if($isReturn) $error_message = 'add successfully.'; else $error_message = 'add failure.'; } } $arrCountry = $objShippingFee->getHash(DB_TAG_PUBLIC, "SELECT id, name FROM countries WHERE id in (SELECT DISTINCT countryID FROM zones)"); if(empty($countryid)){ foreach($arrCountry as $key => $value){ $countryid = $key; break; } } if(!empty($countryid)) $arrZones = $objShippingFee->getHash(DB_TAG_PUBLIC, "SELECT id, name FROM zones WHERE countryID = $countryid"); $arrShippingType = $objShippingFee->getHash(DB_TAG_PUBLIC, "SELECT id, name FROM shipping_type"); $arrShippingMethod = $objShippingFee->getHash(DB_TAG_PUBLIC, "SELECT id, name FROM shipping_method"); /*----- out html -----*/ $smarty = new Smarty(); //----- out template $smarty->template_dir = TEMPLATE_SYS_DIR; $smarty->compile_dir = COMPILE_SYS_DIR; $smarty->assign('menuGid', $menuGid); $smarty->assign('menuid', $menuid); $smarty->assign('backurl',$backurl); $smarty->assign('error_message', $error_message); $smarty->assign('arrZones', $arrZones); $smarty->assign('zoneid', $zoneid); $smarty->assign('arrCountry', $arrCountry); $smarty->assign('countryid', $countryid); $smarty->assign('arrShippingType', $arrShippingType); $smarty->assign('shippingTypeID', $shippingTypeID); $smarty->assign('arrShippingMethod', $arrShippingMethod); $smarty->assign('shippingMethodID', $shippingMethodID); $smarty->assign('amount', $amount); $smarty->assign('amount2', $amount2); $smarty->assign('summary', $summary); $smarty->display('listShippingFee_Add.htm'); ?>
123gohelmetsv2
trunk/admin/shippingfee/listShippingFee_Add.php
PHP
asf20
3,015
<?php include_once("../configure/admin.config.inc.php");//--> admin global var include_once("db.inc.php"); //--> db global var include_once("Operation.php"); //--> Operation include_once("ShippingFee.php"); //--> ShippingFee require_once("controlHeader.php"); //--> system control header $objOperate = new Operation($objSession->getLanguage()); //--> Operation instance $objShippingFee = new ShippingFee(DB_TAG_SYSTEM, $uid); //--> ShippingFee $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(isset($_GET['id']) && !empty($_GET['id'])){ $id = $_GET['id']; $isReturn = $objShippingFee->delete($arrOperate, $id); if($isReturn) $error_message = 'delete successfully.'; else $error_message = 'delete fail.'; } echo "<script language='javascript'>"; echo "alert(\"$error_message\");"; echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";"; echo "</script>"; //$backurl = $_SERVER['HTTP_REFERER']; //header("Location: $backurl"); ?>
123gohelmetsv2
trunk/admin/shippingfee/listShippingFee_Delete.php
PHP
asf20
998
<?php include_once("../configure/admin.config.inc.php"); //--> admin global var include_once("db.inc.php"); //--> db global var include_once("Smarty.class.php"); //--> out template include_once("Operation.php"); //--> Operation include_once("Special.php"); //--> Special include_once("Product.php"); //--> Product require_once("controlHeader.php"); //--> system control header $objOperate = new Operation($objSession->getLanguage()); //--> Operation $objSpecial = new Special(DB_TAG_SYSTEM, $uid); //--> Special $oProduct = new Product(DB_TAG_SYSTEM, $uid); //--> Product $error_message = ''; $productID = ''; $expireDate = ''; $newPrice = ''; $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(!empty($id)){ $arrData = $objSpecial->getByID($arrOperate, $id); $productID = $arrData['productID']; $expireDate = substr($arrData['expireDate'], 0, 10); $newPrice = $arrData['newPrice'] / 100; } if(isset($_POST['Submit'])){ $id = $_POST['id']; $productID = $_POST['productID']; $expireDate = $_POST['expireDate']; $newPrice = $_POST['newPrice']; if(empty($expireDate)) $expireDate = '0000-00-00 00:00:00'; else $expireDate = $_POST['expireDate']; if(empty($productID)){ $error_message = 'The product ID should\'t be empty.'; }else if(empty($newPrice)){ $error_message = 'The new price should\'t be empty.'; } if(empty($error_message)){ $isReturnOrg = $objSpecial->edit($arrOperate, $id, $productID, $newPrice, $expireDate); if($isReturnOrg) $error_message = 'edit successfully.'; else{ $error_message = 'edit failure1.'; } } } /*--------- get product list ---------------------*/ $arrProducts = array(); $where = ' AND p.status in ("normal", "hot")'; $order = 'ORDER BY pd.name'; $arrDataList = $oProduct->lists($arrOperate, $LANGEUAGE_ID, $where, $order, 0, 10000, ''); foreach($arrDataList as $arrRow){ $arrProducts[$arrRow['id']] = $arrRow['name'] . " ($CURRENCY" . ($arrRow['price'] / 100) . ')'; } /*----- out html -----*/ $smarty = new Smarty(); //----- out template $smarty->template_dir = TEMPLATE_SYS_DIR; $smarty->compile_dir = COMPILE_SYS_DIR; $smarty->assign('menuGid', $menuGid); $smarty->assign('menuid', $menuid); $smarty->assign('id', $id); $smarty->assign('error_message', $error_message); $smarty->assign('backurl',$backurl); $smarty->assign('arrProducts', $arrProducts); $smarty->assign('newPrice', $newPrice); $smarty->assign('productID', $productID); $smarty->assign('expireDate', $expireDate); $smarty->display('listSpecial_Edit.htm'); ?>
123gohelmetsv2
trunk/admin/special/listSpecial_Edit.php
PHP
asf20
2,601
<?php include_once("../configure/admin.config.inc.php"); //--> admin global var include_once("db.inc.php"); //--> db global var include_once("Smarty.class.php"); //--> out template include_once("Operation.php"); //--> Operation include_once("Special.php"); //--> Special require_once("controlHeader.php"); //--> system control header $objOperate = new Operation($objSession->getLanguage()); //--> Operation $oSpecial = new Special(DB_TAG_SYSTEM, $uid); //--> Manufacturer $error_message = ''; $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(count($arrOperate) > 0){ $strQuery = $_SERVER["REQUEST_URI"]; $arrUrlInfo = pathinfo($strQuery); $selfFileName = $arrUrlInfo['filename']; $arrOperateAllInfo = $objOperate->listFromCustom($arrOperate, " WHERE id in (".implode(",", $arrOperate).") AND name != 'Add'"); $i = 0; foreach($arrOperateAllInfo as $key => $value){ $strFileName = $selfFileName."_".$value['name'].".php"; if(file_exists($strFileName)){ $arrOperateInfo[$i]['name'] = $value['name']; $arrOperateInfo[$i]['viewName'] = $value['name']; $i++; } } } $arrDataList = $oSpecial->lists($arrOperate, $LANGEUAGE_ID, ' ORDER BY s.id desc', $page, DISPLAY_DATA_SIZE, ''); /*----- out html -----*/ $smarty = new Smarty(); //----- out template $smarty->template_dir = TEMPLATE_SYS_DIR; $smarty->compile_dir = COMPILE_SYS_DIR; $smarty->assign('error_message', $error_message); $smarty->assign('menuGid', $menuGid); $smarty->assign('menuid', $menuid); $smarty->assign('selfFileName', $selfFileName); $smarty->assign('arrOperateInfo', $arrOperateInfo); $smarty->assign('arrDataList', $arrDataList); $smarty->assign('PAGE_BAR', $oSpecial->pagenav); $smarty->display('listSpecial.htm'); ?>
123gohelmetsv2
trunk/admin/special/listSpecial.php
PHP
asf20
1,788
<?php include_once("../configure/admin.config.inc.php");//--> admin global var include_once("db.inc.php"); //--> db global var include_once("Special.php"); //--> Special include_once("Operation.php"); //--> Operation require_once("controlHeader.php"); //--> system control header $objSpecial = new Special(DB_TAG_PUBLIC, $uid); //--> Special $objOperate = new Operation($objSession->getLanguage()); //--> Operation instance $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(isset($_GET['id']) && !empty($_GET['id'])){ $id = $_GET['id']; $isReturn = $objSpecial->setStatus($arrOperate, $id, "normal"); if($isReturn){ $error_message = 'live successfully.'; }else $error_message = 'live failure.'; } echo "<script language='javascript'>"; echo "alert(\"$error_message\");"; echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";"; echo "</script>"; //$backurl = $_SERVER['HTTP_REFERER']; //header("Location: $backurl"); ?>
123gohelmetsv2
trunk/admin/special/listSpecial_Live.php
PHP
asf20
993
<?php include_once("../configure/admin.config.inc.php"); //--> admin global var include_once("db.inc.php"); //--> db global var include_once("Smarty.class.php"); //--> out template include_once("Operation.php"); //--> Operation include_once("Special.php"); //--> Special include_once("Product.php"); //--> Product require_once("controlHeader.php"); //--> system control header $objOperate = new Operation($objSession->getLanguage()); //--> Operation $objSpecial = new Special(DB_TAG_SYSTEM, $uid); //--> Special $oProduct = new Product(DB_TAG_SYSTEM, $uid); //--> Product $error_message = ''; $productID = ''; $expireDate = ''; $newPrice = ''; $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(isset($_POST['Submit'])){ $productID = $_POST['productID']; $expireDate = $_POST['expireDate']; $newPrice = $_POST['newPrice']; if(empty($expireDate)) $expireDate = '0000-00-00 00:00:00'; else $expireDate = $_POST['expireDate']; if(empty($productID)){ $error_message = 'The product ID should\'t be empty.'; }else if(empty($newPrice)){ $error_message = 'The new price should\'t be empty.'; }else{ $isReturnOrg = $objSpecial->add($arrOperate, $productID, $newPrice, $expireDate); if($isReturnOrg) $error_message = 'add successfully.'; else{ $error_message = 'add failure.'; } } } $arrProducts = array(); $where = ' AND p.status in ("normal", "hot")'; $order = 'ORDER BY pd.name'; $arrDataList = $oProduct->lists($arrOperate, $LANGEUAGE_ID, $where, $order, 0, 10000, ''); foreach($arrDataList as $arrRow){ $arrProducts[$arrRow['id']] = $arrRow['name'] . " ($CURRENCY" . ($arrRow['price'] / 100) . ')'; } /*----- out html -----*/ $smarty = new Smarty(); //----- out template $smarty->template_dir = TEMPLATE_SYS_DIR; $smarty->compile_dir = COMPILE_SYS_DIR; $smarty->assign('menuGid', $menuGid); $smarty->assign('menuid', $menuid); $smarty->assign('error_message', $error_message); $smarty->assign('backurl',$backurl); $smarty->assign('arrProducts', $arrProducts); $smarty->assign('newPrice', $newPrice); $smarty->assign('productID', $productID); $smarty->assign('expireDate', $expireDate); $smarty->display('listSpecial_Add.htm'); ?>
123gohelmetsv2
trunk/admin/special/listSpecial_Add.php
PHP
asf20
2,250
<?php include_once("../configure/admin.config.inc.php");//--> admin global var include_once("db.inc.php"); //--> db global var include_once("Special.php"); //--> Product include_once("Operation.php"); //--> Operation require_once("controlHeader.php"); //--> system control header $objSpecial = new Special(DB_TAG_PUBLIC, $uid); //--> Special $objOperate = new Operation($objSession->getLanguage()); //--> Operation instance $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(isset($_GET['id']) && !empty($_GET['id'])){ $id = $_GET['id']; $isReturn = $objSpecial->setStatus($arrOperate, $id, "stop"); if($isReturn){ $error_message = 'Stop successfully.'; }else $error_message = 'Stop failure.'; } echo "<script language='javascript'>"; echo "alert(\"$error_message\");"; echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";"; echo "</script>"; //$backurl = $_SERVER['HTTP_REFERER']; //header("Location: $backurl"); ?>
123gohelmetsv2
trunk/admin/special/listSpecial_Stop.php
PHP
asf20
993
<?php include_once("../configure/admin.config.inc.php");//--> admin global var include_once("db.inc.php"); //--> db global var include_once("Operation.php"); //--> Operation include_once("Special.php"); //--> Special require_once("controlHeader.php"); //--> system control header $objOperate = new Operation($objSession->getLanguage()); //--> Operation instance $objSpecial = new Special(DB_TAG_SYSTEM, $uid); //--> Special $arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid); if(isset($_GET['id']) && !empty($_GET['id'])){ $id = $_GET['id']; $isReturn = $objSpecial->delete($arrOperate, $id); if($isReturn) $error_message = 'delete successfully.'; else $error_message = 'delete failure.'; } echo "<script language='javascript'>"; echo "alert(\"$error_message\");"; echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";"; echo "</script>"; //$backurl = $_SERVER['HTTP_REFERER']; //header("Location: $backurl"); ?>
123gohelmetsv2
trunk/admin/special/listSpecial_Delete.php
PHP
asf20
981
[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the integration file for Lasso. * * It defines the FCKeditor class ("custom type" in Lasso terms) that can * be used to create editor instances in Lasso pages on server side. */ define_type( 'editor', -namespace='fck_', -description='Creates an instance of FCKEditor.' ); local( 'instancename' = 'FCKEditor1', 'width' = '100%', 'height' = '200', 'toolbarset' = 'Default', 'initialvalue' = string, 'basepath' = '/fckeditor/', 'config' = array, 'checkbrowser' = true, 'displayerrors' = false ); define_tag( 'onCreate', -required='instancename', -type='string', -optional='width', -type='string', -optional='height', -type='string', -optional='toolbarset', -type='string', -optional='initialvalue', -type='string', -optional='basepath', -type='string', -optional='config', -type='array' ); self->instancename = #instancename; local_defined('width') ? self->width = #width; local_defined('height') ? self->height = #height; local_defined('toolbarset') ? self->toolbarset = #toolbarset; local_defined('initialvalue') ? self->initialvalue = #initialvalue; local_defined('basepath') ? self->basepath = #basepath; local_defined('config') ? self->config = #config; /define_tag; define_tag('create'); if(self->isCompatibleBrowser); local('out' = ' <input type="hidden" id="' + self->instancename + '" name="' + self->instancename + '" value="' + encode_html(self->initialvalue) + '" style="display:none" /> ' + self->parseConfig + ' <iframe id="' + self->instancename + '___Frame" src="' + self->basepath + 'editor/fckeditor.html?InstanceName=' + self->instancename + '&Toolbar=' + self->toolbarset + '" width="' + self->width + '" height="' + self->height + '" frameborder="0" scrolling="no"></iframe> '); else; local('out' = ' <textarea name="' + self->instancename + '" rows="4" cols="40" style="width: ' + self->width + '; height: ' + self->height + '">' + encode_html(self->initialvalue) + '</textarea> '); /if; return(@#out); /define_tag; define_tag('isCompatibleBrowser'); local('result' = false); if (client_browser->Find("MSIE") && !client_browser->Find("mac") && !client_browser->Find("Opera")); #result = client_browser->Substring(client_browser->Find("MSIE")+5,3)>=5.5; /if; if (client_browser->Find("Gecko/")); #result = client_browser->Substring(client_browser->Find("Gecko/")+6,8)>=20030210; /if; if (client_browser->Find("Opera/")); #result = client_browser->Substring(client_browser->Find("Opera/")+6,4)>=9.5; /if; if (client_browser->Find("AppleWebKit/")); #result = client_browser->Substring(client_browser->Find("AppleWebKit/")+12,3)>=522; /if; return(#result); /define_tag; define_tag('parseConfig'); if(self->config->size); local('out' = '<input type="hidden" id="' + self->instancename + '___Config" value="'); iterate(self->config, local('this')); loop_count > 1 ? #out += '&amp;'; #out += encode_html(#this->first) + '=' + encode_html(#this->second); /iterate; #out += '" style="display:none" />\n'; return(@#out); /if; /define_tag; /define_type; ]
123gohelmetsv2
trunk/admin/tools/fckeditor/fckeditor.lasso
Lasso
asf20
3,949
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page is used by all dialog box as the container. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <script type="text/javascript"> // <![CDATA[ // Domain relaxation logic. (function() { var d = document.domain ; while ( true ) { // Test if we can access a parent property. try { var parentDomain = ( Args().TopWindow || E ).document.domain ; if ( document.domain != parentDomain ) document.domain = parentDomain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. document.domain = d ; } })() ; var E = frameElement._DialogArguments.Editor ; // It seems referencing to frameElement._DialogArguments directly would lead to memory leaks in IE. // So let's use functions to access its members instead. function Args() { return frameElement._DialogArguments ; } function ParentDialog( dialog ) { return dialog ? dialog._ParentDialog : frameElement._ParentDialog ; } var FCK = E.FCK ; var FCKTools = E.FCKTools ; var FCKDomTools = E.FCKDomTools ; var FCKDialog = E.FCKDialog ; var FCKBrowserInfo = E.FCKBrowserInfo ; var FCKConfig = E.FCKConfig ; // Steal the focus so that the caret would no longer stay in the editor iframe. window.focus() ; // Sets the Skin CSS document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; // Sets the language direction. var langDir = E.FCKLang.Dir ; // For IE6-, the fck_dialog_ie6.js is loaded, used to fix limitations in the browser. if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) document.write( '<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>' ) ; FCKTools.RegisterDollarFunction( window ) ; // Resize related functions. var Sizer = function() { var bAutoSize = false ; var retval = { // Sets whether the dialog should auto-resize according to its content's height. SetAutoSize : function( autoSize ) { bAutoSize = autoSize ; this.RefreshSize() ; }, // Fit the dialog container's layout to the inner iframe's external size. RefreshContainerSize : function() { var frmMain = $( 'frmMain' ) ; if ( frmMain ) { // Get the container size. var height = $( 'contents' ).offsetHeight ; // Subtract the size of other elements. height -= $( 'TitleArea' ).offsetHeight ; height -= $( 'TabsRow' ).offsetHeight ; height -= $( 'PopupButtons' ).offsetHeight ; frmMain.style.height = Math.max( height, 0 ) + 'px' ; } }, // Resize and re-layout the dialog. // Triggers the onresize event for the layout logic. ResizeDialog : function( width, height ) { FCKDomTools.SetElementStyles( window.frameElement, { 'width' : width + 'px', 'height' : height + 'px' } ) ; // If the skin have defined a function for resize fixes, call it now. if ( typeof window.DoResizeFixes == 'function' ) window.DoResizeFixes() ; }, // if bAutoSize is true, automatically fit the dialog size and layout to // accomodate the inner iframe's internal height. // if bAutoSize is false, then only the layout logic for the dialog decorations // is run to accomodate the inner iframe's external height. RefreshSize : function() { if ( bAutoSize ) { var frmMain = $( 'frmMain' ) ; var innerDoc = frmMain.contentWindow.document ; var isStrict = FCKTools.IsStrictMode( innerDoc ) ; // Get the size of the frame contents. var innerWidth = isStrict ? innerDoc.documentElement.scrollWidth : innerDoc.body.scrollWidth ; var innerHeight = isStrict ? innerDoc.documentElement.scrollHeight : innerDoc.body.scrollHeight ; // Get the current frame size. var frameSize = FCKTools.GetViewPaneSize( frmMain.contentWindow ) ; var deltaWidth = innerWidth - frameSize.Width ; var deltaHeight = innerHeight - frameSize.Height ; // If the contents fits the current size. if ( deltaWidth <= 0 && deltaHeight <= 0 ) return ; var dialogWidth = frameElement.offsetWidth + Math.max( deltaWidth, 0 ) ; var dialogHeight = frameElement.offsetHeight + Math.max( deltaHeight, 0 ) ; this.ResizeDialog( dialogWidth, dialogHeight ) ; } this.RefreshContainerSize() ; } } /** * Safari seems to have a bug with the time when RefreshSize() is executed - it * thinks frmMain's innerHeight is 0 if we query the value too soon after the * page is loaded in some circumstances. (#1316) * TODO : Maybe this is not needed anymore after #35. */ if ( FCKBrowserInfo.IsSafari ) { var originalRefreshSize = retval.RefreshSize ; retval.RefreshSize = function() { FCKTools.SetTimeout( originalRefreshSize, 1, retval ) ; } } /** * IE6 has a similar bug where it sometimes thinks $('contents') has an * offsetHeight of 0 (#2114). */ if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { var originalRefreshContainerSize = retval.RefreshContainerSize ; retval.RefreshContainerSize = function() { FCKTools.SetTimeout( originalRefreshContainerSize, 1, retval ) ; } } window.onresize = function() { retval.RefreshContainerSize() ; } window.SetAutoSize = FCKTools.Bind( retval, retval.SetAutoSize ) ; return retval ; }() ; // Manages the throbber image that appears if the inner part of dialog is taking too long to load. var Throbber = function() { var timer ; var updateThrobber = function() { var throbberParent = $( 'throbberBlock' ) ; var throbberBlocks = throbberParent.childNodes ; var lastClass = throbberParent.lastChild.className ; // From the last to the second one, copy the class from the previous one. for ( var i = throbberBlocks.length - 1 ; i > 0 ; i-- ) throbberBlocks[i].className = throbberBlocks[i-1].className ; // For the first one, copy the last class (rotation). throbberBlocks[0].className = lastClass ; } return { Show : function( waitMilliseconds ) { // Auto-setup the Show function to be called again after the // requested amount of time. if ( waitMilliseconds && waitMilliseconds > 0 ) { timer = FCKTools.SetTimeout( this.Show, waitMilliseconds, this, null, window ) ; return ; } var throbberParent = $( 'throbberBlock' ) ; if (throbberParent.childNodes.length == 0) { // Create the throbber blocks. var classIds = [ 1,2,3,4,5,4,3,2 ] ; while ( classIds.length > 0 ) throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ; } // Center the throbber. var frm = $( 'contents' ) ; var frmCoords = FCKTools.GetDocumentPosition( window, frm ) ; var x = frmCoords.x + ( frm.offsetWidth - throbberParent.offsetWidth ) / 2 ; var y = frmCoords.y + ( frm.offsetHeight - throbberParent.offsetHeight ) / 2 ; throbberParent.style.left = parseInt( x, 10 ) + 'px' ; throbberParent.style.top = parseInt( y, 10 ) + 'px' ; // Show it. throbberParent.style.visibility = '' ; // Hide tabs and buttons: $( 'Tabs' ).style.visibility = 'hidden' ; $( 'PopupButtons' ).style.visibility = 'hidden' ; // Setup the animation interval. timer = setInterval( updateThrobber, 100 ) ; }, Hide : function() { if ( timer ) { clearInterval( timer ) ; timer = null ; } $( 'throbberBlock' ).style.visibility = 'hidden' ; // Show tabs and buttons: $( 'Tabs' ).style.visibility = '' ; $( 'PopupButtons' ).style.visibility = '' ; } } ; }() ; // Drag and drop handlers. var DragAndDrop = function() { var registeredWindows = [] ; var lastCoords ; var currentPos ; var cleanUpHandlers = function() { for ( var i = 0 ; i < registeredWindows.length ; i++ ) { FCKTools.RemoveEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ; FCKTools.RemoveEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ; } } var dragMouseMoveHandler = function( evt ) { if ( !lastCoords ) return ; if ( !evt ) evt = FCKTools.GetElementDocument( this ).parentWindow.event ; // Updated the last coordinates. var currentCoords = { x : evt.screenX, y : evt.screenY } ; currentPos = { x : currentPos.x + ( currentCoords.x - lastCoords.x ), y : currentPos.y + ( currentCoords.y - lastCoords.y ) } ; lastCoords = currentCoords ; frameElement.style.left = currentPos.x + 'px' ; frameElement.style.top = currentPos.y + 'px' ; if ( evt.preventDefault ) evt.preventDefault() ; else evt.returnValue = false ; } var dragMouseUpHandler = function( evt ) { if ( !lastCoords ) return ; if ( !evt ) evt = FCKTools.GetElementDocument( this ).parentWindow.event ; cleanUpHandlers() ; lastCoords = null ; } return { MouseDownHandler : function( evt ) { var view = null ; if ( !evt ) { view = FCKTools.GetElementDocument( this ).parentWindow ; evt = view.event ; } else view = evt.view ; var target = evt.srcElement || evt.target ; if ( target.id == 'closeButton' || target.className == 'PopupTab' || target.className == 'PopupTabSelected' ) return ; lastCoords = { x : evt.screenX, y : evt.screenY } ; // Save the current IFRAME position. currentPos = { x : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'left' ), 10 ), y : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'top' ), 10 ) } ; for ( var i = 0 ; i < registeredWindows.length ; i++ ) { FCKTools.AddEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ; FCKTools.AddEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ; } if ( evt.preventDefault ) evt.preventDefault() ; else evt.returnValue = false ; }, RegisterHandlers : function( w ) { registeredWindows.push( w ) ; } } }() ; // Selection related functions. //(Became simple shortcuts after the fix for #1990) var Selection = { /** * Ensures that the editing area contains an active selection. This is a * requirement for IE, as it looses the selection when the focus moves to other * frames. */ EnsureSelection : function() { // Move the focus to the Cancel button so even if the dialog contains a // contentEditable element the selection is properly restored in the editor #2496 window.focus() ; $( 'btnCancel' ).focus() ; FCK.Selection.Restore() ; }, /** * Get the FCKSelection object for the editor instance. */ GetSelection : function() { return FCK.Selection ; }, /** * Get the selected element in the editing area (for object selections). */ GetSelectedElement : function() { return FCK.Selection.GetSelectedElement() ; } } // Tab related functions. var Tabs = function() { // Only element ids should be stored here instead of element references since setSelectedTab and TabDiv_OnClick // would build circular references with the element references inside and cause memory leaks in IE6. var oTabs = new Object() ; var setSelectedTab = function( tabCode ) { for ( var sCode in oTabs ) { if ( sCode == tabCode ) $( oTabs[sCode] ).className = 'PopupTabSelected' ; else $( oTabs[sCode] ).className = 'PopupTab' ; } if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' ) window.frames["frmMain"].OnDialogTabChange( tabCode ) ; } function TabDiv_OnClick() { setSelectedTab( this.TabCode ) ; } window.AddTab = function( tabCode, tabText, startHidden ) { if ( typeof( oTabs[ tabCode ] ) != 'undefined' ) return ; var eTabsRow = $( 'Tabs' ) ; var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ; oCell.noWrap = true ; var oDiv = document.createElement( 'DIV' ) ; oDiv.className = 'PopupTab' ; oDiv.innerHTML = tabText ; oDiv.TabCode = tabCode ; oDiv.onclick = TabDiv_OnClick ; oDiv.id = Math.random() ; if ( startHidden ) oDiv.style.display = 'none' ; eTabsRow = $( 'TabsRow' ) ; oCell.appendChild( oDiv ) ; if ( eTabsRow.style.display == 'none' ) { var eTitleArea = $( 'TitleArea' ) ; eTitleArea.className = 'PopupTitle' ; oDiv.className = 'PopupTabSelected' ; eTabsRow.style.display = '' ; if ( window.onresize ) window.onresize() ; } oTabs[ tabCode ] = oDiv.id ; FCKTools.DisableSelection( oDiv ) ; } ; window.SetSelectedTab = setSelectedTab ; window.SetTabVisibility = function( tabCode, isVisible ) { var oTab = $( oTabs[ tabCode ] ) ; oTab.style.display = isVisible ? '' : 'none' ; if ( ! isVisible && oTab.className == 'PopupTabSelected' ) { for ( var sCode in oTabs ) { if ( $( oTabs[sCode] ).style.display != 'none' ) { setSelectedTab( sCode ) ; break ; } } } } ; }() ; // readystatechange handler for registering drag and drop handlers in cover // iframes, defined out here to avoid memory leak. // Do NOT put this function as a private function as it will induce memory leak // in IE and it's not detectable with Drip or sIEve and undetectable leaks are // really nasty (sigh). var onReadyRegister = function() { if ( this.readyState != 'complete' ) return ; DragAndDrop.RegisterHandlers( this.contentWindow ) ; } ; // The business logic of the dialog, dealing with operational things like // dialog open/dialog close/enable/disable/etc. (function() { var setOnKeyDown = function( targetDocument ) { targetDocument.onkeydown = function ( e ) { e = e || event || this.parentWindow.event ; switch ( e.keyCode ) { case 13 : // ENTER var oTarget = e.srcElement || e.target ; if ( oTarget.tagName == 'TEXTAREA' ) return true ; Ok() ; return false ; case 27 : // ESC Cancel() ; return false ; } return true ; } } ; var contextMenuBlocker = function( e ) { var sTagName = e.target.tagName ; if ( ! ( ( sTagName == "INPUT" && e.target.type == "text" ) || sTagName == "TEXTAREA" ) ) e.preventDefault() ; } ; var disableContextMenu = function( targetDocument ) { if ( FCKBrowserInfo.IsIE ) return ; targetDocument.addEventListener( 'contextmenu', contextMenuBlocker, true ) ; } ; // Program entry point. window.Init = function() { $( 'contents' ).dir = langDir; // Start the throbber timer. Throbber.Show( 1000 ) ; Sizer.RefreshContainerSize() ; LoadInnerDialog() ; FCKTools.DisableSelection( document.body ) ; // Make the title area draggable. var titleElement = $( 'header' ) ; titleElement.onmousedown = DragAndDrop.MouseDownHandler ; // Connect mousemove and mouseup events from dialog frame and outer window to dialog dragging logic. DragAndDrop.RegisterHandlers( window ) ; DragAndDrop.RegisterHandlers( Args().TopWindow ) ; // Disable the previous dialog if it exists. if ( ParentDialog() ) { ParentDialog().contentWindow.SetEnabled( false ) ; if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { var currentParent = ParentDialog() ; while ( currentParent ) { var blockerFrame = currentParent.contentWindow.$( 'blocker' ) ; if ( blockerFrame.readyState == 'complete' ) DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ; else blockerFrame.onreadystatechange = onReadyRegister ; currentParent = ParentDialog( currentParent ) ; } } else { var currentParent = ParentDialog() ; while ( currentParent ) { DragAndDrop.RegisterHandlers( currentParent.contentWindow ) ; currentParent = ParentDialog( currentParent ) ; } } } // If this is the only dialog on screen, enable the background cover. if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { var blockerFrame = FCKDialog.GetCover().firstChild ; if ( blockerFrame.readyState == 'complete' ) DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ; else blockerFrame.onreadystatechange = onReadyRegister; } // Add Enter/Esc hotkeys and disable context menu for the dialog. setOnKeyDown( document ) ; disableContextMenu( document ) ; } ; window.LoadInnerDialog = function() { if ( window.onresize ) window.onresize() ; // First of all, translate the dialog box contents. E.FCKLanguageManager.TranslatePage( document ) ; // Create the IFRAME that holds the dialog contents. $( 'innerContents' ).innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"><\/iframe>' ; } ; window.InnerDialogLoaded = function() { // If the dialog has been closed before the iframe is loaded, do nothing. if ( !frameElement.parentNode ) return null ; Throbber.Hide() ; var frmMain = $('frmMain') ; var innerWindow = frmMain.contentWindow ; var innerDoc = innerWindow.document ; // Show the loaded iframe. frmMain.style.visibility = '' ; // Set the language direction. innerDoc.documentElement.dir = langDir ; // Sets the Skin CSS. innerDoc.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; setOnKeyDown( innerDoc ) ; disableContextMenu( innerDoc ) ; Sizer.RefreshContainerSize(); DragAndDrop.RegisterHandlers( innerWindow ) ; innerWindow.focus() ; return E ; } ; window.SetOkButton = function( showIt ) { $('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ; } ; window.Ok = function() { Selection.EnsureSelection() ; var frmMain = window.frames["frmMain"] ; if ( frmMain.Ok && frmMain.Ok() ) CloseDialog() ; else frmMain.focus() ; } ; window.Cancel = function( dontFireChange ) { Selection.EnsureSelection() ; return CloseDialog( dontFireChange ) ; } ; window.CloseDialog = function( dontFireChange ) { Throbber.Hide() ; // Points the src to a non-existent location to avoid loading errors later, in case the dialog // haven't been completed loaded at this point. if ( $( 'frmMain' ) ) $( 'frmMain' ).src = FCKTools.GetVoidUrl() ; if ( !dontFireChange && !FCK.EditMode ) { // All dialog windows, by default, will fire the "OnSelectionChange" // event, no matter the Ok or Cancel button has been pressed. // It seems that OnSelectionChange may enter on a concurrency state // on some situations (#1965), so we should put the event firing in // the execution queue instead of executing it immediately. setTimeout( function() { FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, 0 ) ; } FCKDialog.OnDialogClose( window ) ; } ; window.SetEnabled = function( isEnabled ) { var cover = $( 'cover' ) ; cover.style.display = isEnabled ? 'none' : '' ; if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { if ( !isEnabled ) { // Inser the blocker IFRAME before the cover. var blocker = document.createElement( 'iframe' ) ; blocker.src = FCKTools.GetVoidUrl() ; blocker.hideFocus = true ; blocker.frameBorder = 0 ; blocker.id = blocker.className = 'blocker' ; cover.appendChild( blocker ) ; } else { var blocker = $( 'blocker' ) ; if ( blocker && blocker.parentNode ) blocker.parentNode.removeChild( blocker ) ; } } } ; })() ; // ]]> </script> </head> <body onload="Init();" class="PopupBody"> <div class="contents" id="contents"> <div id="header"> <div id="TitleArea" class="PopupTitle PopupTitleBorder"> <script type="text/javascript"> // <![CDATA[ document.write( Args().Title ) ; // ]]> </script> <div id="closeButton" onclick="Cancel();"></div> </div> <div id="TabsRow" class="PopupTabArea" style="display: none"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr id="Tabs"> <td class="PopupTabEmptyArea">&nbsp;</td> <td class="PopupTabEmptyArea" width="100%">&nbsp;</td> </tr> </table> </div> </div> <div id="innerContents"></div> <div id="PopupButtons" class="PopupButtons"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%">&nbsp;</td> <td nowrap="nowrap"> <input id="btnOk" style="visibility: hidden;" type="button" value="Ok" class="Button" onclick="Ok();" fckLang="DlgBtnOK" /> &nbsp; <input id="btnCancel" type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" /> </td> </tr> </table> </div> </div> <div class="tl"></div> <div class="tc"></div> <div class="tr"></div> <div class="ml"></div> <div class="mr"></div> <div class="bl"></div> <div class="bc"></div> <div class="br"></div> <div class="cover" id="cover" style="display:none"></div> <div id="throbberBlock" style="position: absolute; visibility: hidden"></div> <script type="text/javascript"> // <![CDATA[ // Set the class name for language direction. document.body.className += ' ' + langDir ; var cover = $( 'cover' ) ; cover.style.backgroundColor = FCKConfig.BackgroundBlockerColor ; FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ; // ]]> </script> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/fckdialog.html
HTML
asf20
22,915
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == --> <html> <head> <title></title> <style> #wsc_frames , #errorMessage{ position:absolute; top:0px; left:0px; width:500px; height:395px; margin:0px; padding:0px; border:0px; display:block; overflow: hidden; } #wsc_frames { z-index:10;} #errorMessage { color:red; display:none; font-size:16px; font-weight:bold; padding-top:160px; text-align:center; z-index:11; } #errorMessage p { color:#000; font-size:11px; text-align:left; font-weight: normal; padding-left:80px; } </style> <script type="text/javascript"> var oEditor = window.parent.InnerDialogLoaded() ; var FCKConfig = oEditor.FCKConfig; function doLoadScript(url) { if (!url) return false ; var s = document.createElement('script') ; s.type = 'text/javascript' ; s.src = url ; document.getElementsByTagName('head')[0].appendChild(s) ; return true ; } function Ok() { return window.parent.Cancel() ; } function _callOnCancel( dT ) { window.parent.Cancel() ; } function _callOnFinish( dT ) { oEditor.FCK.SetData( dT.value ) ; window.parent.CloseDialog( true ) ; } function _cancelOnError(m) { var _conId = 'errorMessage' ; var message = m || 'Sorry, but service is unavailable now.' ; if ( typeof( WSC_Error ) == 'undefined' ) { var _con = document.createElement( 'div' ) ; _con.setAttribute( 'id', _conId ) ; document.body.appendChild( _con ) ; dom_con = document.getElementById( _conId ) ; dom_con.innerHTML = message ; dom_con.style.display = 'block' ; } //return Ok() ; } function URL_abs2full( uri ) { return uri.match( 'http' ) ? uri : document.location.protocol + '//' + document.location.host + uri ; } function clearErrorUsermessage() { // empty error container var _con = document.getElementById( 'errorMessage' ) ; if ( !_con ) return ; _con.innerHTML = '' ; _con.style.display = 'none' ; } var gInterval ; function onLoad() { clearErrorUsermessage() ; var _errorMessage = 'The SpellChecker Service is currently unavailable.' ; if ( 'undefined' != typeof( oEditor.FCK.Config.WSChLoaderScript ) ) _errorMessage = '<div>The SpellChecker Service is currently unavailable.</div><p>Error loading application<br>service host: ' + oEditor.FCK.Config.WSChLoaderScript + '</p>'; var burnSpelling = function( oName, _eMessage ) { var i = 0 ; return function () { if ( typeof( window[oName] ) == 'function' ) initAndSpell() ; else if ( i++ == 180 ) _cancelOnError( _eMessage ) ; } } gInterval = window.setInterval( burnSpelling( 'doSpell', _errorMessage ), 250 ) ; // WSC CORE init section var protocol = document.location.protocol || 'http:' ; var baseUrl = protocol + '//loader.spellchecker.net/sproxy_fck/sproxy.php' ; var plugin = "fck2" ; var customerid = oEditor.FCK.Config.WSCnCustomerId || "1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk" ; var wscCoreUrl = oEditor.FCK.Config.WSChLoaderScript || ( baseUrl + '?' + 'plugin=' + plugin + '&' + 'customerid='+ customerid + '&' + 'cmd=script&doc=wsc&schema=22' ) ; // load WSC core doLoadScript( wscCoreUrl ) ; } function initAndSpell() { //xall from window.setInteval expected at once if ( typeof( gInterval ) == 'undefined' ) return null ; window.clearInterval( gInterval ) ; // global var is used in FCK specific core // change on equal var used in fckplugin.js gFCKPluginName = 'wsc' ; // get the data to be checked var sData = oEditor.FCK.GetData() ; // prepare content var ctrlId = 'myEditor' ; var dCurT = document.getElementById( ctrlId ) ; dCurT.value = sData ; // service paths corecting/preparing var sPath2Scin = URL_abs2full( oEditor.FCK.Config.SkinDialogCSS ) ; var sPathCiframe = FCKConfig.BasePath + 'wsc/ciframe.html' ; var sPathFrameset = FCKConfig.BasePath + 'wsc/tmpFrameset.html' ; // language abbr standarts comparer var LangComparer = new _SP_FCK_LangCompare() ; LangComparer.setDefaulLangCode( oEditor.FCK.Language.DefaultLanguage ) ; // clear user message console (if application was loaded more then after 2 seconds) clearErrorUsermessage() ; doSpell( { ctrl : ctrlId, lang : LangComparer.getSPLangCode( oEditor.FCK.Language.GetActiveLanguage() ), winType : 'wsc_frames',// if not defined app will run on winpopup // callback binding section onCancel :window._callOnCancel, onFinish :window._callOnFinish, // @TODO: basePath assingning // some manipulations with client static pages framesetPath : sPathFrameset, iframePath : sPathCiframe, // styles defining schemaURI : sPath2Scin } ) ; return true ; } </script> </head> <body onload="onLoad()" style="padding: 0px; overflow: hidden;"> <textarea style="display: none;" id="myEditor" rows="10" cols="40"></textarea> <iframe src="" name="wsc_frames" id="wsc_frames"></iframe> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/wsc/w.html
HTML
asf20
5,769
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == --> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function gup( name ) { name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ; var regexS = '[\\?&]' + name + '=([^&#]*)' ; var regex = new RegExp( regexS ) ; var results = regex.exec( window.location.href ) ; if( results == null ) return '' ; else return results[ 1 ] ; } function sendData2Master() { var destination = parent.parent ; try { if ( destination.XDTMaster ) { var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ; window.clearInterval( interval ) ; } } catch (e) {} } function onLoad() { interval = window.setInterval( sendData2Master, 100 ); } </script> </head> <body onload="onLoad()"> <p></p> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/wsc/ciframe.html
HTML
asf20
1,593
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == --> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function doLoadScript( url ) { if ( !url ) return false ; var s = document.createElement( "script" ) ; s.type = "text/javascript" ; s.src = url ; document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ; return true ; } function tryLoad () { if ( typeof( opener ) == 'undefined' || !opener ) opener = parent ; // get access to global parameters oParams = opener.oldFramesetPageParams ; // make frameset rows string prepare sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ; document.getElementById( 'itFrameset' ).rows = sFramesetRows ; // dynamic including init frames and crossdomain transport code // from config sproxy_js_frameset url var addScriptUrl = oParams.sproxy_js_frameset ; doLoadScript( addScriptUrl ) ; } </script> </head> <frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0"> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame> <frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame> </frameset> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/wsc/tmpFrameset.html
HTML
asf20
2,467
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This plugin register Toolbar items for the combos modifying the style to * not show the box. */ FCKToolbarItems.RegisterItem( 'SourceSimple' , new FCKToolbarButton( 'Source', FCKLang.Source, null, FCK_TOOLBARITEM_ONLYICON, true, true, 1 ) ) ; FCKToolbarItems.RegisterItem( 'StyleSimple' , new FCKToolbarStyleCombo( null, FCK_TOOLBARITEM_ONLYTEXT ) ) ; FCKToolbarItems.RegisterItem( 'FontNameSimple' , new FCKToolbarFontsCombo( null, FCK_TOOLBARITEM_ONLYTEXT ) ) ; FCKToolbarItems.RegisterItem( 'FontSizeSimple' , new FCKToolbarFontSizeCombo( null, FCK_TOOLBARITEM_ONLYTEXT ) ) ; FCKToolbarItems.RegisterItem( 'FontFormatSimple', new FCKToolbarFontFormatCombo( null, FCK_TOOLBARITEM_ONLYTEXT ) ) ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/simplecommands/fckplugin.js
JavaScript
asf20
1,342
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Plugin: automatically resizes the editor until a configurable maximun * height (FCKConfig.AutoGrowMax), based on its contents. */ var FCKAutoGrow = { MIN_HEIGHT : window.frameElement.offsetHeight, Check : function() { var delta = FCKAutoGrow.GetHeightDelta() ; if ( delta != 0 ) { var newHeight = window.frameElement.offsetHeight + delta ; newHeight = FCKAutoGrow.GetEffectiveHeight( newHeight ) ; if ( newHeight != window.frameElement.height ) { window.frameElement.style.height = newHeight + "px" ; // Gecko browsers use an onresize handler to update the innermost // IFRAME's height. If the document is modified before the onresize // is triggered, the plugin will miscalculate the new height. Thus, // forcibly trigger onresize. #1336 if ( typeof window.onresize == 'function' ) { window.onresize() ; } } } }, CheckEditorStatus : function( sender, status ) { if ( status == FCK_STATUS_COMPLETE ) FCKAutoGrow.Check() ; }, GetEffectiveHeight : function( height ) { if ( height < FCKAutoGrow.MIN_HEIGHT ) height = FCKAutoGrow.MIN_HEIGHT; else { var max = FCKConfig.AutoGrowMax; if ( max && max > 0 && height > max ) height = max; } return height; }, GetHeightDelta : function() { var oInnerDoc = FCK.EditorDocument ; var iFrameHeight ; var iInnerHeight ; if ( FCKBrowserInfo.IsIE ) { iFrameHeight = FCK.EditorWindow.frameElement.offsetHeight ; iInnerHeight = oInnerDoc.body.scrollHeight ; } else { iFrameHeight = FCK.EditorWindow.innerHeight ; iInnerHeight = oInnerDoc.body.offsetHeight + ( parseInt( FCKDomTools.GetCurrentElementStyle( oInnerDoc.body, 'margin-top' ), 10 ) || 0 ) + ( parseInt( FCKDomTools.GetCurrentElementStyle( oInnerDoc.body, 'margin-bottom' ), 10 ) || 0 ) ; } return iInnerHeight - iFrameHeight ; }, SetListeners : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return ; FCK.EditorWindow.attachEvent( 'onscroll', FCKAutoGrow.Check ) ; FCK.EditorDocument.attachEvent( 'onkeyup', FCKAutoGrow.Check ) ; } }; FCK.AttachToOnSelectionChange( FCKAutoGrow.Check ) ; if ( FCKBrowserInfo.IsIE ) FCK.Events.AttachEvent( 'OnAfterSetHTML', FCKAutoGrow.SetListeners ) ; FCK.Events.AttachEvent( 'OnStatusChange', FCKAutoGrow.CheckEditorStatus ) ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/autogrow/fckplugin.js
JavaScript
asf20
3,061
var FCKDragTableHandler = { "_DragState" : 0, "_LeftCell" : null, "_RightCell" : null, "_MouseMoveMode" : 0, // 0 - find candidate cells for resizing, 1 - drag to resize "_ResizeBar" : null, "_OriginalX" : null, "_MinimumX" : null, "_MaximumX" : null, "_LastX" : null, "_TableMap" : null, "_doc" : document, "_IsInsideNode" : function( w, domNode, pos ) { var myCoords = FCKTools.GetWindowPosition( w, domNode ) ; var xMin = myCoords.x ; var yMin = myCoords.y ; var xMax = parseInt( xMin, 10 ) + parseInt( domNode.offsetWidth, 10 ) ; var yMax = parseInt( yMin, 10 ) + parseInt( domNode.offsetHeight, 10 ) ; if ( pos.x >= xMin && pos.x <= xMax && pos.y >= yMin && pos.y <= yMax ) return true; return false; }, "_GetBorderCells" : function( w, tableNode, tableMap, mouse ) { // Enumerate all the cells in the table. var cells = [] ; for ( var i = 0 ; i < tableNode.rows.length ; i++ ) { var r = tableNode.rows[i] ; for ( var j = 0 ; j < r.cells.length ; j++ ) cells.push( r.cells[j] ) ; } if ( cells.length < 1 ) return null ; // Get the cells whose right or left border is nearest to the mouse cursor's x coordinate. var minRxDist = null ; var lxDist = null ; var minYDist = null ; var rbCell = null ; var lbCell = null ; for ( var i = 0 ; i < cells.length ; i++ ) { var pos = FCKTools.GetWindowPosition( w, cells[i] ) ; var rightX = pos.x + parseInt( cells[i].clientWidth, 10 ) ; var rxDist = mouse.x - rightX ; var yDist = mouse.y - ( pos.y + ( cells[i].clientHeight / 2 ) ) ; if ( minRxDist == null || ( Math.abs( rxDist ) <= Math.abs( minRxDist ) && ( minYDist == null || Math.abs( yDist ) <= Math.abs( minYDist ) ) ) ) { minRxDist = rxDist ; minYDist = yDist ; rbCell = cells[i] ; } } /* var rowNode = FCKTools.GetElementAscensor( rbCell, "tr" ) ; var cellIndex = rbCell.cellIndex + 1 ; if ( cellIndex >= rowNode.cells.length ) return null ; lbCell = rowNode.cells.item( cellIndex ) ; */ var rowIdx = rbCell.parentNode.rowIndex ; var colIdx = FCKTableHandler._GetCellIndexSpan( tableMap, rowIdx, rbCell ) ; var colSpan = isNaN( rbCell.colSpan ) ? 1 : rbCell.colSpan ; lbCell = tableMap[rowIdx][colIdx + colSpan] ; if ( ! lbCell ) return null ; // Abort if too far from the border. lxDist = mouse.x - FCKTools.GetWindowPosition( w, lbCell ).x ; if ( lxDist < 0 && minRxDist < 0 && minRxDist < -2 ) return null ; if ( lxDist > 0 && minRxDist > 0 && lxDist > 3 ) return null ; return { "leftCell" : rbCell, "rightCell" : lbCell } ; }, "_GetResizeBarPosition" : function() { var row = FCKTools.GetElementAscensor( this._RightCell, "tr" ) ; return FCKTableHandler._GetCellIndexSpan( this._TableMap, row.rowIndex, this._RightCell ) ; }, "_ResizeBarMouseDownListener" : function( evt ) { if ( FCKDragTableHandler._LeftCell ) FCKDragTableHandler._MouseMoveMode = 1 ; if ( FCKBrowserInfo.IsIE ) FCKDragTableHandler._ResizeBar.filters.item("DXImageTransform.Microsoft.Alpha").opacity = 50 ; else FCKDragTableHandler._ResizeBar.style.opacity = 0.5 ; FCKDragTableHandler._OriginalX = evt.clientX ; // Calculate maximum and minimum x-coordinate delta. var borderIndex = FCKDragTableHandler._GetResizeBarPosition() ; var offset = FCKDragTableHandler._GetIframeOffset(); var table = FCKTools.GetElementAscensor( FCKDragTableHandler._LeftCell, "table" ); var minX = null ; var maxX = null ; for ( var r = 0 ; r < FCKDragTableHandler._TableMap.length ; r++ ) { var leftCell = FCKDragTableHandler._TableMap[r][borderIndex - 1] ; var rightCell = FCKDragTableHandler._TableMap[r][borderIndex] ; var leftPosition = FCKTools.GetWindowPosition( FCK.EditorWindow, leftCell ) ; var rightPosition = FCKTools.GetWindowPosition( FCK.EditorWindow, rightCell ) ; var leftPadding = FCKDragTableHandler._GetCellPadding( table, leftCell ) ; var rightPadding = FCKDragTableHandler._GetCellPadding( table, rightCell ) ; if ( minX == null || leftPosition.x + leftPadding > minX ) minX = leftPosition.x + leftPadding ; if ( maxX == null || rightPosition.x + rightCell.clientWidth - rightPadding < maxX ) maxX = rightPosition.x + rightCell.clientWidth - rightPadding ; } FCKDragTableHandler._MinimumX = minX + offset.x ; FCKDragTableHandler._MaximumX = maxX + offset.x ; FCKDragTableHandler._LastX = null ; if (evt.preventDefault) evt.preventDefault(); else evt.returnValue = false; }, "_ResizeBarMouseUpListener" : function( evt ) { FCKDragTableHandler._MouseMoveMode = 0 ; FCKDragTableHandler._HideResizeBar() ; if ( FCKDragTableHandler._LastX == null ) return ; // Calculate the delta value. var deltaX = FCKDragTableHandler._LastX - FCKDragTableHandler._OriginalX ; // Then, build an array of current column width values. // This algorithm can be very slow if the cells have insane colSpan values. (e.g. colSpan=1000). var table = FCKTools.GetElementAscensor( FCKDragTableHandler._LeftCell, "table" ) ; var colArray = [] ; var tableMap = FCKDragTableHandler._TableMap ; for ( var i = 0 ; i < tableMap.length ; i++ ) { for ( var j = 0 ; j < tableMap[i].length ; j++ ) { var cell = tableMap[i][j] ; var width = FCKDragTableHandler._GetCellWidth( table, cell ) ; var colSpan = isNaN( cell.colSpan) ? 1 : cell.colSpan ; if ( colArray.length <= j ) colArray.push( { width : width / colSpan, colSpan : colSpan } ) ; else { var guessItem = colArray[j] ; if ( guessItem.colSpan > colSpan ) { guessItem.width = width / colSpan ; guessItem.colSpan = colSpan ; } } } } // Find out the equivalent column index of the two cells selected for resizing. colIndex = FCKDragTableHandler._GetResizeBarPosition() ; // Note that colIndex must be at least 1 here, so it's safe to subtract 1 from it. colIndex-- ; // Modify the widths in the colArray according to the mouse coordinate delta value. colArray[colIndex].width += deltaX ; colArray[colIndex + 1].width -= deltaX ; // Clear all cell widths, delete all <col> elements from the table. for ( var r = 0 ; r < table.rows.length ; r++ ) { var row = table.rows.item( r ) ; for ( var c = 0 ; c < row.cells.length ; c++ ) { var cell = row.cells.item( c ) ; cell.width = "" ; cell.style.width = "" ; } } var colElements = table.getElementsByTagName( "col" ) ; for ( var i = colElements.length - 1 ; i >= 0 ; i-- ) colElements[i].parentNode.removeChild( colElements[i] ) ; // Set new cell widths. var processedCells = [] ; for ( var i = 0 ; i < tableMap.length ; i++ ) { for ( var j = 0 ; j < tableMap[i].length ; j++ ) { var cell = tableMap[i][j] ; if ( cell._Processed ) continue ; if ( tableMap[i][j-1] != cell ) cell.width = colArray[j].width ; else cell.width = parseInt( cell.width, 10 ) + parseInt( colArray[j].width, 10 ) ; if ( tableMap[i][j+1] != cell ) { processedCells.push( cell ) ; cell._Processed = true ; } } } for ( var i = 0 ; i < processedCells.length ; i++ ) { if ( FCKBrowserInfo.IsIE ) processedCells[i].removeAttribute( '_Processed' ) ; else delete processedCells[i]._Processed ; } FCKDragTableHandler._LastX = null ; }, "_ResizeBarMouseMoveListener" : function( evt ) { if ( FCKDragTableHandler._MouseMoveMode == 0 ) return FCKDragTableHandler._MouseFindHandler( FCK, evt ) ; else return FCKDragTableHandler._MouseDragHandler( FCK, evt ) ; }, // Calculate the padding of a table cell. // It returns the value of paddingLeft + paddingRight of a table cell. // This function is used, in part, to calculate the width parameter that should be used for setting cell widths. // The equation in question is clientWidth = paddingLeft + paddingRight + width. // So that width = clientWidth - paddingLeft - paddingRight. // The return value of this function must be pixel accurate acorss all supported browsers, so be careful if you need to modify it. "_GetCellPadding" : function( table, cell ) { var attrGuess = parseInt( table.cellPadding, 10 ) * 2 ; var cssGuess = null ; if ( typeof( window.getComputedStyle ) == "function" ) { var styleObj = window.getComputedStyle( cell, null ) ; cssGuess = parseInt( styleObj.getPropertyValue( "padding-left" ), 10 ) + parseInt( styleObj.getPropertyValue( "padding-right" ), 10 ) ; } else cssGuess = parseInt( cell.currentStyle.paddingLeft, 10 ) + parseInt (cell.currentStyle.paddingRight, 10 ) ; var cssRuntime = cell.style.padding ; if ( isFinite( cssRuntime ) ) cssGuess = parseInt( cssRuntime, 10 ) * 2 ; else { cssRuntime = cell.style.paddingLeft ; if ( isFinite( cssRuntime ) ) cssGuess = parseInt( cssRuntime, 10 ) ; cssRuntime = cell.style.paddingRight ; if ( isFinite( cssRuntime ) ) cssGuess += parseInt( cssRuntime, 10 ) ; } attrGuess = parseInt( attrGuess, 10 ) ; cssGuess = parseInt( cssGuess, 10 ) ; if ( isNaN( attrGuess ) ) attrGuess = 0 ; if ( isNaN( cssGuess ) ) cssGuess = 0 ; return Math.max( attrGuess, cssGuess ) ; }, // Calculate the real width of the table cell. // The real width of the table cell is the pixel width that you can set to the width attribute of the table cell and after // that, the table cell should be of exactly the same width as before. // The real width of a table cell can be calculated as: // width = clientWidth - paddingLeft - paddingRight. "_GetCellWidth" : function( table, cell ) { var clientWidth = cell.clientWidth ; if ( isNaN( clientWidth ) ) clientWidth = 0 ; return clientWidth - this._GetCellPadding( table, cell ) ; }, "MouseMoveListener" : function( FCK, evt ) { if ( FCKDragTableHandler._MouseMoveMode == 0 ) return FCKDragTableHandler._MouseFindHandler( FCK, evt ) ; else return FCKDragTableHandler._MouseDragHandler( FCK, evt ) ; }, "_MouseFindHandler" : function( FCK, evt ) { if ( FCK.MouseDownFlag ) return ; var node = evt.srcElement || evt.target ; try { if ( ! node || node.nodeType != 1 ) { this._HideResizeBar() ; return ; } } catch ( e ) { this._HideResizeBar() ; return ; } // Since this function might be called from the editing area iframe or the outer fckeditor iframe, // the mouse point coordinates from evt.clientX/Y can have different reference points. // We need to resolve the mouse pointer position relative to the editing area iframe. var mouseX = evt.clientX ; var mouseY = evt.clientY ; if ( FCKTools.GetElementDocument( node ) == document ) { var offset = this._GetIframeOffset() ; mouseX -= offset.x ; mouseY -= offset.y ; } if ( this._ResizeBar && this._LeftCell ) { var leftPos = FCKTools.GetWindowPosition( FCK.EditorWindow, this._LeftCell ) ; var rightPos = FCKTools.GetWindowPosition( FCK.EditorWindow, this._RightCell ) ; var rxDist = mouseX - ( leftPos.x + this._LeftCell.clientWidth ) ; var lxDist = mouseX - rightPos.x ; var inRangeFlag = false ; if ( lxDist >= 0 && rxDist <= 0 ) inRangeFlag = true ; else if ( rxDist > 0 && lxDist <= 3 ) inRangeFlag = true ; else if ( lxDist < 0 && rxDist >= -2 ) inRangeFlag = true ; if ( inRangeFlag ) { this._ShowResizeBar( FCK.EditorWindow, FCKTools.GetElementAscensor( this._LeftCell, "table" ), { "x" : mouseX, "y" : mouseY } ) ; return ; } } var tagName = node.tagName.toLowerCase() ; if ( tagName != "table" && tagName != "td" && tagName != "th" ) { if ( this._LeftCell ) this._LeftCell = this._RightCell = this._TableMap = null ; this._HideResizeBar() ; return ; } node = FCKTools.GetElementAscensor( node, "table" ) ; var tableMap = FCKTableHandler._CreateTableMap( node ) ; var cellTuple = this._GetBorderCells( FCK.EditorWindow, node, tableMap, { "x" : mouseX, "y" : mouseY } ) ; if ( cellTuple == null ) { if ( this._LeftCell ) this._LeftCell = this._RightCell = this._TableMap = null ; this._HideResizeBar() ; } else { this._LeftCell = cellTuple["leftCell"] ; this._RightCell = cellTuple["rightCell"] ; this._TableMap = tableMap ; this._ShowResizeBar( FCK.EditorWindow, FCKTools.GetElementAscensor( this._LeftCell, "table" ), { "x" : mouseX, "y" : mouseY } ) ; } }, "_MouseDragHandler" : function( FCK, evt ) { var mouse = { "x" : evt.clientX, "y" : evt.clientY } ; // Convert mouse coordinates in reference to the outer iframe. var node = evt.srcElement || evt.target ; if ( FCKTools.GetElementDocument( node ) == FCK.EditorDocument ) { var offset = this._GetIframeOffset() ; mouse.x += offset.x ; mouse.y += offset.y ; } // Calculate the mouse position delta and see if we've gone out of range. if ( mouse.x >= this._MaximumX - 5 ) mouse.x = this._MaximumX - 5 ; if ( mouse.x <= this._MinimumX + 5 ) mouse.x = this._MinimumX + 5 ; var docX = mouse.x + FCKTools.GetScrollPosition( window ).X ; this._ResizeBar.style.left = ( docX - this._ResizeBar.offsetWidth / 2 ) + "px" ; this._LastX = mouse.x ; }, "_ShowResizeBar" : function( w, table, mouse ) { if ( this._ResizeBar == null ) { this._ResizeBar = this._doc.createElement( "div" ) ; var paddingBar = this._ResizeBar ; var paddingStyles = { 'position' : 'absolute', 'cursor' : 'e-resize' } ; if ( FCKBrowserInfo.IsIE ) paddingStyles.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=10,enabled=true)" ; else paddingStyles.opacity = 0.10 ; FCKDomTools.SetElementStyles( paddingBar, paddingStyles ) ; this._avoidStyles( paddingBar ); paddingBar.setAttribute('_fcktemp', true); this._doc.body.appendChild( paddingBar ) ; FCKTools.AddEventListener( paddingBar, "mousemove", this._ResizeBarMouseMoveListener ) ; FCKTools.AddEventListener( paddingBar, "mousedown", this._ResizeBarMouseDownListener ) ; FCKTools.AddEventListener( document, "mouseup", this._ResizeBarMouseUpListener ) ; FCKTools.AddEventListener( FCK.EditorDocument, "mouseup", this._ResizeBarMouseUpListener ) ; // IE doesn't let the tranparent part of the padding block to receive mouse events unless there's something inside. // So we need to create a spacer image to fill the block up. var filler = this._doc.createElement( "img" ) ; filler.setAttribute('_fcktemp', true); filler.border = 0 ; filler.src = FCKConfig.BasePath + "images/spacer.gif" ; filler.style.position = "absolute" ; paddingBar.appendChild( filler ) ; // Disable drag and drop, and selection for the filler image. var disabledListener = function( evt ) { if ( evt.preventDefault ) evt.preventDefault() ; else evt.returnValue = false ; } FCKTools.AddEventListener( filler, "dragstart", disabledListener ) ; FCKTools.AddEventListener( filler, "selectstart", disabledListener ) ; } var paddingBar = this._ResizeBar ; var offset = this._GetIframeOffset() ; var tablePos = this._GetTablePosition( w, table ) ; var barHeight = table.offsetHeight ; var barTop = offset.y + tablePos.y ; // Do not let the resize bar intrude into the toolbar area. if ( tablePos.y < 0 ) { barHeight += tablePos.y ; barTop -= tablePos.y ; } var bw = parseInt( table.border, 10 ) ; if ( isNaN( bw ) ) bw = 0 ; var cs = parseInt( table.cellSpacing, 10 ) ; if ( isNaN( cs ) ) cs = 0 ; var barWidth = Math.max( bw+100, cs+100 ) ; var paddingStyles = { 'top' : barTop + 'px', 'height' : barHeight + 'px', 'width' : barWidth + 'px', 'left' : ( offset.x + mouse.x + FCKTools.GetScrollPosition( w ).X - barWidth / 2 ) + 'px' } ; if ( FCKBrowserInfo.IsIE ) paddingBar.filters.item("DXImageTransform.Microsoft.Alpha").opacity = 10 ; else paddingStyles.opacity = 0.1 ; FCKDomTools.SetElementStyles( paddingBar, paddingStyles ) ; var filler = paddingBar.getElementsByTagName( "img" )[0] ; FCKDomTools.SetElementStyles( filler, { width : paddingBar.offsetWidth + 'px', height : barHeight + 'px' } ) ; barWidth = Math.max( bw, cs, 3 ) ; var visibleBar = null ; if ( paddingBar.getElementsByTagName( "div" ).length < 1 ) { visibleBar = this._doc.createElement( "div" ) ; this._avoidStyles( visibleBar ); visibleBar.setAttribute('_fcktemp', true); paddingBar.appendChild( visibleBar ) ; } else visibleBar = paddingBar.getElementsByTagName( "div" )[0] ; FCKDomTools.SetElementStyles( visibleBar, { position : 'absolute', backgroundColor : 'blue', width : barWidth + 'px', height : barHeight + 'px', left : '50px', top : '0px' } ) ; }, "_HideResizeBar" : function() { if ( this._ResizeBar ) // IE bug: display : none does not hide the resize bar for some reason. // so set the position to somewhere invisible. FCKDomTools.SetElementStyles( this._ResizeBar, { top : '-100000px', left : '-100000px' } ) ; }, "_GetIframeOffset" : function () { return FCKTools.GetDocumentPosition( window, FCK.EditingArea.IFrame ) ; }, "_GetTablePosition" : function ( w, table ) { return FCKTools.GetWindowPosition( w, table ) ; }, "_avoidStyles" : function( element ) { FCKDomTools.SetElementStyles( element, { padding : '0', backgroundImage : 'none', border : '0' } ) ; }, "Reset" : function() { FCKDragTableHandler._LeftCell = FCKDragTableHandler._RightCell = FCKDragTableHandler._TableMap = null ; } }; FCK.Events.AttachEvent( "OnMouseMove", FCKDragTableHandler.MouseMoveListener ) ; FCK.Events.AttachEvent( "OnAfterSetHTML", FCKDragTableHandler.Reset ) ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/dragresizetable/fckplugin.js
JavaScript
asf20
18,298
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Placeholder Plugin. --> <html> <head> <title>Placeholder Properties</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta content="noindex, nofollow" name="robots"> <script src="../../dialog/common/fck_dialog_common.js" type="text/javascript"></script> <script language="javascript"> var dialog = window.parent ; var oEditor = dialog.InnerDialogLoaded() ; var FCKLang = oEditor.FCKLang ; var FCKPlaceholders = oEditor.FCKPlaceholders ; window.onload = function () { // First of all, translate the dialog box texts oEditor.FCKLanguageManager.TranslatePage( document ) ; LoadSelected() ; // Show the "Ok" button. dialog.SetOkButton( true ) ; // Select text field on load. SelectField( 'txtName' ) ; } var eSelected = dialog.Selection.GetSelectedElement() ; function LoadSelected() { if ( !eSelected ) return ; if ( eSelected.tagName == 'SPAN' && eSelected._fckplaceholder ) document.getElementById('txtName').value = eSelected._fckplaceholder ; else eSelected == null ; } function Ok() { var sValue = document.getElementById('txtName').value ; if ( eSelected && eSelected._fckplaceholder == sValue ) return true ; if ( sValue.length == 0 ) { alert( FCKLang.PlaceholderErrNoName ) ; return false ; } if ( FCKPlaceholders.Exist( sValue ) ) { alert( FCKLang.PlaceholderErrNameInUse ) ; return false ; } FCKPlaceholders.Add( sValue ) ; return true ; } </script> </head> <body scroll="no" style="OVERFLOW: hidden"> <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td> <table cellSpacing="0" cellPadding="0" align="center" border="0"> <tr> <td> <span fckLang="PlaceholderDlgName">Placeholder Name</span><br> <input id="txtName" type="text"> </td> </tr> </table> </td> </tr> </table> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/placeholder/fck_placeholder.html
HTML
asf20
2,669
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Placeholder French language file. */ FCKLang.PlaceholderBtn = "Insérer/Modifier l'Espace réservé" ; FCKLang.PlaceholderDlgTitle = "Propriétés de l'Espace réservé" ; FCKLang.PlaceholderDlgName = "Nom de l'Espace réservé" ; FCKLang.PlaceholderErrNoName = "Veuillez saisir le nom de l'Espace réservé" ; FCKLang.PlaceholderErrNameInUse = "Ce nom est déjà utilisé" ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/placeholder/lang/fr.js
JavaScript
asf20
1,020
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Placholder German language file. */ FCKLang.PlaceholderBtn = 'Einfügen/editieren Platzhalter' ; FCKLang.PlaceholderDlgTitle = 'Platzhalter Eigenschaften' ; FCKLang.PlaceholderDlgName = 'Platzhalter Name' ; FCKLang.PlaceholderErrNoName = 'Bitte den Namen des Platzhalters schreiben' ; FCKLang.PlaceholderErrNameInUse = 'Der angegebene Namen ist schon in Gebrauch' ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/placeholder/lang/de.js
JavaScript
asf20
1,010
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Placholder Italian language file. */ FCKLang.PlaceholderBtn = 'Aggiungi/Modifica Placeholder' ; FCKLang.PlaceholderDlgTitle = 'Proprietà del Placeholder' ; FCKLang.PlaceholderDlgName = 'Nome del Placeholder' ; FCKLang.PlaceholderErrNoName = 'Digitare il nome del placeholder' ; FCKLang.PlaceholderErrNameInUse = 'Il nome inserito è già in uso' ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/placeholder/lang/it.js
JavaScript
asf20
993
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Placholder Spanish language file. */ FCKLang.PlaceholderBtn = 'Insertar/Editar contenedor' ; FCKLang.PlaceholderDlgTitle = 'Propiedades del contenedor ' ; FCKLang.PlaceholderDlgName = 'Nombre de contenedor' ; FCKLang.PlaceholderErrNoName = 'Por favor escriba el nombre de contenedor' ; FCKLang.PlaceholderErrNameInUse = 'El nombre especificado ya esta en uso' ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/placeholder/lang/es.js
JavaScript
asf20
1,006
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Placholder Polish language file. */ FCKLang.PlaceholderBtn = 'Wstaw/Edytuj nagłówek' ; FCKLang.PlaceholderDlgTitle = 'Właśności nagłówka' ; FCKLang.PlaceholderDlgName = 'Nazwa nagłówka' ; FCKLang.PlaceholderErrNoName = 'Proszę wprowadzić nazwę nagłówka' ; FCKLang.PlaceholderErrNameInUse = 'Podana nazwa jest już w użyciu' ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/placeholder/lang/pl.js
JavaScript
asf20
985
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Placholder English language file. */ FCKLang.PlaceholderBtn = 'Insert/Edit Placeholder' ; FCKLang.PlaceholderDlgTitle = 'Placeholder Properties' ; FCKLang.PlaceholderDlgName = 'Placeholder Name' ; FCKLang.PlaceholderErrNoName = 'Please type the placeholder name' ; FCKLang.PlaceholderErrNameInUse = 'The specified name is already in use' ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/placeholder/lang/en.js
JavaScript
asf20
984
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Plugin to insert "Placeholders" in the editor. */ // Register the related command. FCKCommands.RegisterCommand( 'Placeholder', new FCKDialogCommand( 'Placeholder', FCKLang.PlaceholderDlgTitle, FCKPlugins.Items['placeholder'].Path + 'fck_placeholder.html', 340, 160 ) ) ; // Create the "Plaholder" toolbar button. var oPlaceholderItem = new FCKToolbarButton( 'Placeholder', FCKLang.PlaceholderBtn ) ; oPlaceholderItem.IconPath = FCKPlugins.Items['placeholder'].Path + 'placeholder.gif' ; FCKToolbarItems.RegisterItem( 'Placeholder', oPlaceholderItem ) ; // The object used for all Placeholder operations. var FCKPlaceholders = new Object() ; // Add a new placeholder at the actual selection. FCKPlaceholders.Add = function( name ) { var oSpan = FCK.InsertElement( 'span' ) ; this.SetupSpan( oSpan, name ) ; } FCKPlaceholders.SetupSpan = function( span, name ) { span.innerHTML = '[[ ' + name + ' ]]' ; span.style.backgroundColor = '#ffff00' ; span.style.color = '#000000' ; if ( FCKBrowserInfo.IsGecko ) span.style.cursor = 'default' ; span._fckplaceholder = name ; span.contentEditable = false ; // To avoid it to be resized. span.onresizestart = function() { FCK.EditorWindow.event.returnValue = false ; return false ; } } // On Gecko we must do this trick so the user select all the SPAN when clicking on it. FCKPlaceholders._SetupClickListener = function() { FCKPlaceholders._ClickListener = function( e ) { if ( e.target.tagName == 'SPAN' && e.target._fckplaceholder ) FCKSelection.SelectNode( e.target ) ; } FCK.EditorDocument.addEventListener( 'click', FCKPlaceholders._ClickListener, true ) ; } // Open the Placeholder dialog on double click. FCKPlaceholders.OnDoubleClick = function( span ) { if ( span.tagName == 'SPAN' && span._fckplaceholder ) FCKCommands.GetCommand( 'Placeholder' ).Execute() ; } FCK.RegisterDoubleClickHandler( FCKPlaceholders.OnDoubleClick, 'SPAN' ) ; // Check if a Placholder name is already in use. FCKPlaceholders.Exist = function( name ) { var aSpans = FCK.EditorDocument.getElementsByTagName( 'SPAN' ) ; for ( var i = 0 ; i < aSpans.length ; i++ ) { if ( aSpans[i]._fckplaceholder == name ) return true ; } return false ; } if ( FCKBrowserInfo.IsIE ) { FCKPlaceholders.Redraw = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return ; var aPlaholders = FCK.EditorDocument.body.innerText.match( /\[\[[^\[\]]+\]\]/g ) ; if ( !aPlaholders ) return ; var oRange = FCK.EditorDocument.body.createTextRange() ; for ( var i = 0 ; i < aPlaholders.length ; i++ ) { if ( oRange.findText( aPlaholders[i] ) ) { var sName = aPlaholders[i].match( /\[\[\s*([^\]]*?)\s*\]\]/ )[1] ; oRange.pasteHTML( '<span style="color: #000000; background-color: #ffff00" contenteditable="false" _fckplaceholder="' + sName + '">' + aPlaholders[i] + '</span>' ) ; } } } } else { FCKPlaceholders.Redraw = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return ; var oInteractor = FCK.EditorDocument.createTreeWalker( FCK.EditorDocument.body, NodeFilter.SHOW_TEXT, FCKPlaceholders._AcceptNode, true ) ; var aNodes = new Array() ; while ( ( oNode = oInteractor.nextNode() ) ) { aNodes[ aNodes.length ] = oNode ; } for ( var n = 0 ; n < aNodes.length ; n++ ) { var aPieces = aNodes[n].nodeValue.split( /(\[\[[^\[\]]+\]\])/g ) ; for ( var i = 0 ; i < aPieces.length ; i++ ) { if ( aPieces[i].length > 0 ) { if ( aPieces[i].indexOf( '[[' ) == 0 ) { var sName = aPieces[i].match( /\[\[\s*([^\]]*?)\s*\]\]/ )[1] ; var oSpan = FCK.EditorDocument.createElement( 'span' ) ; FCKPlaceholders.SetupSpan( oSpan, sName ) ; aNodes[n].parentNode.insertBefore( oSpan, aNodes[n] ) ; } else aNodes[n].parentNode.insertBefore( FCK.EditorDocument.createTextNode( aPieces[i] ) , aNodes[n] ) ; } } aNodes[n].parentNode.removeChild( aNodes[n] ) ; } FCKPlaceholders._SetupClickListener() ; } FCKPlaceholders._AcceptNode = function( node ) { if ( /\[\[[^\[\]]+\]\]/.test( node.nodeValue ) ) return NodeFilter.FILTER_ACCEPT ; else return NodeFilter.FILTER_SKIP ; } } FCK.Events.AttachEvent( 'OnAfterSetHTML', FCKPlaceholders.Redraw ) ; // We must process the SPAN tags to replace then with the real resulting value of the placeholder. FCKXHtml.TagProcessors['span'] = function( node, htmlNode ) { if ( htmlNode._fckplaceholder ) node = FCKXHtml.XML.createTextNode( '[[' + htmlNode._fckplaceholder + ']]' ) ; else FCKXHtml._AppendChildNodes( node, htmlNode, false ) ; return node ; }
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/placeholder/fckplugin.js
JavaScript
asf20
5,416
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This plugin register the required Toolbar items to be able to insert the * table commands in the toolbar. */ FCKToolbarItems.RegisterItem( 'TableInsertRowAfter' , new FCKToolbarButton( 'TableInsertRowAfter' , FCKLang.InsertRowAfter, null, null, null, true, 62 ) ) ; FCKToolbarItems.RegisterItem( 'TableDeleteRows' , new FCKToolbarButton( 'TableDeleteRows' , FCKLang.DeleteRows, null, null, null, true, 63 ) ) ; FCKToolbarItems.RegisterItem( 'TableInsertColumnAfter' , new FCKToolbarButton( 'TableInsertColumnAfter' , FCKLang.InsertColumnAfter, null, null, null, true, 64 ) ) ; FCKToolbarItems.RegisterItem( 'TableDeleteColumns' , new FCKToolbarButton( 'TableDeleteColumns', FCKLang.DeleteColumns, null, null, null, true, 65 ) ) ; FCKToolbarItems.RegisterItem( 'TableInsertCellAfter' , new FCKToolbarButton( 'TableInsertCellAfter' , FCKLang.InsertCellAfter, null, null, null, true, 58 ) ) ; FCKToolbarItems.RegisterItem( 'TableDeleteCells' , new FCKToolbarButton( 'TableDeleteCells' , FCKLang.DeleteCells, null, null, null, true, 59 ) ) ; FCKToolbarItems.RegisterItem( 'TableMergeCells' , new FCKToolbarButton( 'TableMergeCells' , FCKLang.MergeCells, null, null, null, true, 60 ) ) ; FCKToolbarItems.RegisterItem( 'TableHorizontalSplitCell' , new FCKToolbarButton( 'TableHorizontalSplitCell' , FCKLang.SplitCell, null, null, null, true, 61 ) ) ; FCKToolbarItems.RegisterItem( 'TableCellProp' , new FCKToolbarButton( 'TableCellProp' , FCKLang.CellProperties, null, null, null, true, 57 ) ) ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/tablecommands/fckplugin.js
JavaScript
asf20
2,144
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample custom configuration settings used by the BBCode plugin. It simply * loads the plugin. All the rest is done by the plugin itself. */ // Add the BBCode plugin. FCKConfig.Plugins.Add( 'bbcode' ) ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/bbcode/_sample/sample.config.js
JavaScript
asf20
843
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - BBCode Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../../../../_samples/sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../../../fckeditor.js"></script> </head> <body> <h1> FCKeditor - BBCode Sample</h1> <p> This is a sample of custom Data Processor implementation for (very) basic BBCode syntax. Only <strong>[b]</strong>, <strong>[i]</strong>, <strong>[u]</strong> and <strong>[url]</strong> may be used. It may be extended, but this is out of this sample purpose. </p> <p> Note that the input and output of the editor is not HTML, but BBCode </p> <hr /> <form action="../../../../_samples/html/sampleposteddata.asp" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('editor')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; // Set the custom configurations file path (in this way the original file is mantained). oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + 'editor/plugins/bbcode/_sample/sample.config.js' ; oFCKeditor.Value = 'This is some [b]sample text[/b]. You are using [url=http://www.fckeditor.net/]FCKeditor[/url].' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/bbcode/_sample/sample.html
HTML
asf20
2,625
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is a sample implementation for a custom Data Processor for basic BBCode. */ FCK.DataProcessor = { /* * Returns a string representing the HTML format of "data". The returned * value will be loaded in the editor. * The HTML must be from <html> to </html>, eventually including * the DOCTYPE. * @param {String} data The data to be converted in the * DataProcessor specific format. */ ConvertToHtml : function( data ) { // Convert < and > to their HTML entities. data = data.replace( /</g, '&lt;' ) ; data = data.replace( />/g, '&gt;' ) ; // Convert line breaks to <br>. data = data.replace( /(?:\r\n|\n|\r)/g, '<br>' ) ; // [url] data = data.replace( /\[url\](.+?)\[\/url]/gi, '<a href="$1">$1</a>' ) ; data = data.replace( /\[url\=([^\]]+)](.+?)\[\/url]/gi, '<a href="$1">$2</a>' ) ; // [b] data = data.replace( /\[b\](.+?)\[\/b]/gi, '<b>$1</b>' ) ; // [i] data = data.replace( /\[i\](.+?)\[\/i]/gi, '<i>$1</i>' ) ; // [u] data = data.replace( /\[u\](.+?)\[\/u]/gi, '<u>$1</u>' ) ; return '<html><head><title></title></head><body>' + data + '</body></html>' ; }, /* * Converts a DOM (sub-)tree to a string in the data format. * @param {Object} rootNode The node that contains the DOM tree to be * converted to the data format. * @param {Boolean} excludeRoot Indicates that the root node must not * be included in the conversion, only its children. * @param {Boolean} format Indicates that the data must be formatted * for human reading. Not all Data Processors may provide it. */ ConvertToDataFormat : function( rootNode, excludeRoot, ignoreIfEmptyParagraph, format ) { var data = rootNode.innerHTML ; // Convert <br> to line breaks. data = data.replace( /<br(?=[ \/>]).*?>/gi, '\r\n') ; // [url] data = data.replace( /<a .*?href=(["'])(.+?)\1.*?>(.+?)<\/a>/gi, '[url=$2]$3[/url]') ; // [b] data = data.replace( /<(?:b|strong)>/gi, '[b]') ; data = data.replace( /<\/(?:b|strong)>/gi, '[/b]') ; // [i] data = data.replace( /<(?:i|em)>/gi, '[i]') ; data = data.replace( /<\/(?:i|em)>/gi, '[/i]') ; // [u] data = data.replace( /<u>/gi, '[u]') ; data = data.replace( /<\/u>/gi, '[/u]') ; // Remove remaining tags. data = data.replace( /<[^>]+>/g, '') ; return data ; }, /* * Makes any necessary changes to a piece of HTML for insertion in the * editor selection position. * @param {String} html The HTML to be fixed. */ FixHtml : function( html ) { return html ; } } ; // This Data Processor doesn't support <p>, so let's use <br>. FCKConfig.EnterMode = 'br' ; // To avoid pasting invalid markup (which is discarded in any case), let's // force pasting to plain text. FCKConfig.ForcePasteAsPlainText = true ; // Rename the "Source" buttom to "BBCode". FCKToolbarItems.RegisterItem( 'Source', new FCKToolbarButton( 'Source', 'BBCode', null, FCK_TOOLBARITEM_ICONTEXT, true, true, 1 ) ) ; // Let's enforce the toolbar to the limits of this Data Processor. A custom // toolbar set may be defined in the configuration file with more or less entries. FCKConfig.ToolbarSets["Default"] = [ ['Source'], ['Bold','Italic','Underline','-','Link'], ['About'] ] ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/plugins/bbcode/fckplugin.js
JavaScript
asf20
4,066
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Useful page that enumerates all icons in the skins strips. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - View Icons Strips</title> <style type="text/css"> .TB_Button_Image { overflow: hidden; width: 16px; height: 16px; margin: 3px; background-repeat: no-repeat; } .TB_Button_Image img { position: relative; } </style> <script type="text/javascript"> window.onload = function() { var eImg1 = document.createElement( 'img' ) ; eImg1.onload = Img_OnLoad ; eImg1.src = 'default/fck_strip.gif' ; var eImg2 = document.createElement( 'img' ) ; eImg2.onload = Img_OnLoad ; eImg2.src = 'office2003/fck_strip.gif' ; var eImg3 = document.createElement( 'img' ) ; eImg3.onload = Img_OnLoad ; eImg3.src = 'silver/fck_strip.gif' ; } var iTotalStrips = 3 ; var iMaxHeight = 0 ; function Img_OnLoad() { if ( iMaxHeight < this.height ) iMaxHeight = this.height ; iTotalStrips-- ; if ( iTotalStrips == 0 ) LoadIcons( iMaxHeight / 16 ) ; } function LoadIcons( total ) { var xIconsTable = document.getElementById( 'xIconsTable' ) ; for ( var i = 0 ; i < total ; i++ ) { var eRow = xIconsTable.insertRow(-1) ; var eCell = eRow.insertCell(-1) ; eCell.innerHTML = i + 1 ; eCell = eRow.insertCell(-1) ; eCell.align = 'center' ; eCell.style.border = '#dcdcdc 1px solid' ; eCell.innerHTML = '<div class="TB_Button_Image"><img src="default/fck_strip.gif" style="top:-' + ( i * 16 ) + 'px;"><\/div>' ; eCell = eRow.insertCell(-1) ; eCell.align = 'center' ; eCell.style.border = '#dcdcdc 1px solid' ; eCell.innerHTML = '<div class="TB_Button_Image"><img src="office2003/fck_strip.gif" style="top:-' + ( i * 16 ) + 'px;"><\/div>' ; eCell = eRow.insertCell(-1) ; eCell.align = 'center' ; eCell.style.border = '#dcdcdc 1px solid' ; eCell.innerHTML = '<div class="TB_Button_Image"><img src="silver/fck_strip.gif" style="top:-' + ( i * 16 ) + 'px;"><\/div>' ; } } </script> </head> <body> <table id="xIconsTable"> <tr> <td rowspan="2"> Index</td> <td align="center" colspan="3"> Skins</td> </tr> <tr> <td width="80" align="center"> default</td> <td width="80" align="center"> office2003</td> <td width="80" align="center"> silver</td> </tr> </table> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/_fckviewstrips.html
HTML
asf20
3,100
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == */ (function() { // IE6 doens't handle absolute positioning properly (it is always in quirks // mode). This function fixes the sizes and positions of many elements that // compose the skin (this is skin specific). var fixSizes = window.DoResizeFixes = function() { var fckDlg = window.document.body ; for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) { var child = fckDlg.childNodes[i] ; switch ( child.className ) { case 'contents' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 ) ; // -left -right child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 ) ; // -bottom -top break ; case 'blocker' : case 'cover' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 + 4 ) ; // -left -right + 4 child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 + 4 ) ; // -bottom -top + 4 break ; case 'tr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; break ; case 'tc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 16 - 16 ) ; break ; case 'ml' : child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'mr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'bl' : child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'br' : child.style.left = Math.max( 0, fckDlg.clientWidth - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'bc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 30 - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; } } } var closeButtonOver = function() { this.style.backgroundPosition = '-16px -687px' ; } ; var closeButtonOut = function() { this.style.backgroundPosition = '-16px -651px' ; } ; var fixCloseButton = function() { var closeButton = document.getElementById ( 'closeButton' ) ; closeButton.onmouseover = closeButtonOver ; closeButton.onmouseout = closeButtonOut ; } var onLoad = function() { fixSizes() ; fixCloseButton() ; window.attachEvent( 'onresize', fixSizes ) ; window.detachEvent( 'onload', onLoad ) ; } window.attachEvent( 'onload', onLoad ) ; })() ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/office2003/fck_dialog_ie6.js
JavaScript
asf20
3,108
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Styles used by the editor IFRAME and Toolbar. */ /* ### Basic Editor IFRAME Styles. */ body { padding: 1px; margin: 0; background-color: #ffffff; } #xEditingArea { border: #696969 1px solid; } .SourceField { padding: 5px; margin: 0px; font-family: Monospace; } /* Toolbar */ .TB_ToolbarSet, .TB_Expand, .TB_Collapse { cursor: default; background-color: #f7f8fd; } .TB_ToolbarSet { border-top: #f7f8fd 1px outset; border-bottom: #f7f8fd 1px outset; } .TB_ToolbarSet TD { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .TB_Toolbar { background-color: #d6dff7; background-image: url(images/toolbar.bg.gif); background-repeat: repeat-x; display: inline-table; } .TB_Separator { width: 1px; height: 16px; margin: 2px; background-color: #B2CBFF; } .TB_Start { background-image: url(images/toolbar.start.gif); background-repeat: no-repeat; background-position: center center; margin: 0px; width: 7px; height: 24px; } .TB_End { background-image: url(images/toolbar.end.gif); background-repeat: no-repeat; background-position: center left; height: 24px; width: 4px; } .TB_ExpandImg { background-image: url(images/toolbar.expand.gif); background-repeat: no-repeat; } .TB_CollapseImg { background-image: url(images/toolbar.collapse.gif); background-repeat: no-repeat; } .TB_SideBorder { background-color: #696969; } .TB_Expand, .TB_Collapse { padding: 2px 2px 2px 2px; border: #f7f8fd 1px outset; } .TB_Collapse { width: 5px; } .TB_Break { height: 24px; /* IE needs the height to be set, otherwise no break */ } /* Toolbar Button */ .TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled { margin: 1px; height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */ } .TB_Button_On { margin: 0px; border: #316ac5 1px solid; background-color: #c1d2ee; } .TB_Button_On_Over, .TB_Button_Off_Over { margin: 0px ; border: #316ac5 1px solid; background-color: #dff1ff; } .TB_Button_Off { filter: alpha(opacity=70); /* IE */ opacity: 0.70; /* Safari, Opera and Mozilla */ } .TB_Button_Disabled { filter: gray() alpha(opacity=30); /* IE */ opacity: 0.30; /* Safari, Opera and Mozilla */ } .TB_Button_Padding { visibility: hidden; width: 3px; height: 22px; } .TB_Button_Image { overflow: hidden; width: 16px; height: 16px; margin: 3px; background-repeat: no-repeat; } .TB_Button_Image img { position: relative; } .TB_Button_Off .TB_Button_Text { background-color: #d6dff7; /* Needed because of a bug on ClearType */ background-image: url(images/toolbar.bg.gif); background-repeat: repeat-x; } .TB_ConnectionLine { background-color: #f7f8fd; height: 1px; margin-left: 1px; /* ltr */ margin-right: 1px; /* rtl */ } .TB_Button_Off .TB_Text { background-color: #d6dff7; /* Needed because of a bug on ClearType */ background-image: url(images/toolbar.bg.gif); background-repeat: repeat-x; } .TB_Button_On_Over .TB_Text { background-color: #dff1ff ; /* Needed because of a bug on ClearType */ } /* Menu */ .MN_Menu { border: 1px solid #8f8f73; padding: 2px; background-color: #f7f8fd; cursor: default; } .MN_Menu, .MN_Menu .MN_Label { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .MN_Item_Padding { visibility: hidden; width: 3px; height: 20px; } .MN_Icon { background-color: #d6dff7; text-align: center; height: 20px; } .MN_Label { padding-left: 3px; padding-right: 3px; } .MN_Separator { height: 3px; } .MN_Separator_Line { border-top: #b9b99d 1px solid; } .MN_Item .MN_Icon IMG { filter: alpha(opacity=70); opacity: 0.70; } .MN_Item_Over { color: #ffffff; background-color: #7096FA; } .MN_Item_Over .MN_Icon { background-color: #466ca6; } .MN_Item_Disabled IMG { filter: gray() alpha(opacity=30); /* IE */ opacity: 0.30; /* Safari, Opera and Mozilla */ } .MN_Item_Disabled .MN_Label { color: #b7b7b7; } .MN_Arrow { padding-right: 3px; padding-left: 3px; } .MN_ConnectionLine { background-color: #f7f8fd; } .Menu .TB_Button_On, .Menu .TB_Button_On_Over { border: #8f8f73 1px solid; background-color: #f7f8fd; } /* ### Panel Styles */ .FCK_Panel { border: #8f8f73 1px solid; padding: 2px; background-color: #f7f8fd; } .FCK_Panel, .FCK_Panel TD { font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; font-size: 11px; } /* ### Special Combos */ .SC_Panel { overflow: auto; white-space: nowrap; cursor: default; border: 1px solid #8f8f73; padding-left: 2px; padding-right: 2px; } .SC_Panel, .SC_Panel TD { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .SC_Item, .SC_ItemSelected { margin-top: 2px; margin-bottom: 2px; background-position: left center; padding-left: 11px; padding-right: 3px; padding-top: 2px; padding-bottom: 2px; text-overflow: ellipsis; overflow: hidden; background-repeat: no-repeat; border: #dddddd 1px solid; } .SC_Item *, .SC_ItemSelected * { margin-top: 0px; margin-bottom: 0px; } .SC_ItemSelected { border: #9a9afb 1px solid; background-image: url(images/toolbar.arrowright.gif); } .SC_ItemOver { border: #316ac5 1px solid; } .SC_Field { margin-top: 2px ; border: #b7b7a6 1px solid; cursor: default; } .SC_FieldCaption { overflow: visible; padding-right: 5px; padding-left: 5px; opacity: 0.75; /* Safari, Opera and Mozilla */ filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ height: 23px; background-color: #d6dff7; /* Needed because of a bug on ClearType */ background-image: url(images/toolbar.bg.gif); background-repeat: repeat-x; /* background-color: inherit; Maybe this is needed wait to check */ } .SC_FieldLabel { white-space: nowrap; padding: 2px; width: 100%; cursor: default; background-color: #ffffff; text-overflow: ellipsis; overflow: hidden; } .SC_FieldButton { background-position: center center; background-image: url(images/toolbar.buttonarrow.gif); border-left: #b7b7a6 1px solid; width: 14px; background-repeat: no-repeat; } .SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text { opacity: 0.30; /* Safari, Opera and Mozilla */ filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ } .SC_FieldOver { border: #316ac5 1px solid; } .SC_FieldOver .SC_FieldButton { border-left: #316ac5 1px solid; } /* ### Color Selector Panel */ .ColorBoxBorder { border: #808080 1px solid; position: static; } .ColorBox { font-size: 1px; width: 10px; position: static; height: 10px; } .ColorDeselected, .ColorSelected { cursor: default; } .ColorDeselected { border: #ffffff 1px solid; padding: 2px; float: left; } .ColorSelected { border: #330066 1px solid; padding: 2px; float: left; background-color: #c4cdd6; }
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/office2003/fck_editor.css
CSS
asf20
8,478
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Styles used by the dialog boxes. */ html, body { background-color: transparent; margin: 0px; padding: 0px; } body { padding: 10px; } body, td, input, select, textarea { font-size: 11px; font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; } body, .BackColor { background-color: #f7f8fd; } .PopupBody { height: 100%; width: 100%; overflow: hidden; background-color: transparent; padding: 0px; } #header { cursor: move; } .PopupTitle { font-weight: bold; font-size: 14pt; color: #0e3460; background-color: #8cb2fd; padding: 3px 10px 3px 10px; } .PopupButtons { position: absolute; right: 0px; left: 0px; bottom: 0px; border-top: #466ca6 1px solid; background-color: #8cb2fd; padding: 7px 10px 7px 10px; } .Button { border: #1c3460 1px solid; color: #000a28; background-color: #7096d3; } #btnOk { width: 100px; } .DarkBackground { background-color: #eaf2f8; } .LightBackground { background-color: #ffffbe; } .PopupTitleBorder { border-bottom: #d5d59d 1px solid; } .PopupTabArea { color: #0e3460; background-color: #8cb2fd; } .PopupTabEmptyArea { padding-left: 10px ; border-bottom: #466ca6 1px solid; } .PopupTab, .PopupTabSelected { border-right: #466ca6 1px solid; border-top: #466ca6 1px solid; border-left: #466ca6 1px solid; padding: 3px 5px 3px 5px; color: #0e3460; } .PopupTab { margin-top: 1px; border-bottom: #466ca6 1px solid; cursor: pointer; cursor: hand; } .PopupTabSelected { font-weight: bold; cursor: default; padding-top: 4px; border-bottom: #f7f8fd 1px solid; background-color: #f7f8fd; } .PopupSelectionBox { border: #1e90ff 1px solid !important; background-color: #add8e6 !important; cursor: pointer; cursor: hand; } #tdBrowse { vertical-align: bottom; } /** * Dialog frame related styles. */ .contents { position: absolute; top: 2px; left: 16px; right: 16px; bottom: 20px; background-color: #f7f8fD; overflow: hidden; z-index: 1; } .tl, .tr, .tc, .bl, .br, .bc { position: absolute; background-image: url(images/sprites.png); background-repeat: no-repeat; } * html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc { background-image: url(images/sprites.gif); } .ml, .mr { position: absolute; background-image: url(images/dialog.sides.png); background-repeat: repeat-y; } * html .ml, * html .mr { background-image: url(images/dialog.sides.gif); } .rtl .ml, .rtl .mr { position: absolute; background-image: url(images/dialog.sides.rtl.png); background-repeat: repeat-y; } * html .rtl .ml, * html .rtl .mr { background-image: url(images/dialog.sides.gif); } .tl { top: 0px; left: 0px; width: 16px; height: 16px; background-position: -16px -16px; } .rtl .tl { background-position: -16px -397px; } .tr { top: 0px; right: 0px; width: 16px; height: 16px; background-position: -16px -76px; } .rtl .tr { background-position: -16px -457px; } .tc { top: 0px; right: 16px; left: 16px; height: 16px; background-position: 0px -136px; background-repeat: repeat-x; } .ml { top: 16px; left: 0px; width: 16px; bottom: 51px; background-position: 0px 0px; } .mr { top: 16px; right: 0px; width: 16px; bottom: 51px; background-position: -16px 0px; } .bl { bottom: 0px; left: 0px; width: 30px; height: 51px; background-position: -16px -196px; } .rtl .bl { background-position: -16px -517px; } .br { bottom: 0px; right: 0px; width: 30px; height: 51px; background-position: -16px -263px; } .rtl .br { background-position: -16px -584px; } .bc { bottom: 0px; right: 30px; left: 30px; height: 51px; background-position: 0px -330px; background-repeat: repeat-x; } /* For IE6. Do not change it. */ * html .blocker { position: absolute; width: 100%; height: 100%; z-index: 12; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); } /* The layer used to cover the dialog when opening a child dialog. */ .cover { position: absolute; top: 0px; left: 14px; right: 14px; bottom: 18px; z-index: 11; } #closeButton { position: absolute; right: 0px; top: 0px; margin-top: 5px; margin-right: 10px; width: 20px; height: 20px; cursor: pointer; background-image: url(images/sprites.png); background-repeat: no-repeat; background-position: -16px -651px; } * html #closeButton { cursor: hand; background-image: url(images/sprites.gif); } .rtl #closeButton { right: auto; left: 10px; margin-right: 0px; } #closeButton:hover { background-position: -16px -687px; } #throbberBlock { z-index: 10; } #throbberBlock div { float: left; width: 8px; height: 9px; margin-left: 2px; margin-right: 2px; font-size: 1px; /* IE6 */ } /* Color Gradient Generator: http://www.herethere.net/~samson/php/color_gradient/?cbegin=0E3460&cend=8cb2fd&steps=4 */ .throbber_1 { background-color: #0E3460; } .throbber_2 { background-color: #2D5387; } .throbber_3 { background-color: #4D73AE; } .throbber_4 { background-color: #6C92D5; } .throbber_5 { background-color: #8CB2FD; }
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/office2003/fck_dialog.css
CSS
asf20
5,990
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == */ (function() { // IE6 doens't handle absolute positioning properly (it is always in quirks // mode). This function fixes the sizes and positions of many elements that // compose the skin (this is skin specific). var fixSizes = window.DoResizeFixes = function() { var fckDlg = window.document.body ; for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) { var child = fckDlg.childNodes[i] ; switch ( child.className ) { case 'contents' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 ) ; // -left -right child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 ) ; // -bottom -top break ; case 'blocker' : case 'cover' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 + 4 ) ; // -left -right + 4 child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 + 4 ) ; // -bottom -top + 4 break ; case 'tr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; break ; case 'tc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 16 - 16 ) ; break ; case 'ml' : child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'mr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'bl' : child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'br' : child.style.left = Math.max( 0, fckDlg.clientWidth - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'bc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 30 - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; } } } var closeButtonOver = function() { this.style.backgroundPosition = '-16px -687px' ; } ; var closeButtonOut = function() { this.style.backgroundPosition = '-16px -651px' ; } ; var fixCloseButton = function() { var closeButton = document.getElementById ( 'closeButton' ) ; closeButton.onmouseover = closeButtonOver ; closeButton.onmouseout = closeButtonOut ; } var onLoad = function() { fixSizes() ; fixCloseButton() ; window.attachEvent( 'onresize', fixSizes ) ; window.detachEvent( 'onload', onLoad ) ; } window.attachEvent( 'onload', onLoad ) ; })() ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/default/fck_dialog_ie6.js
JavaScript
asf20
3,108
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Styles used by the editor IFRAME and Toolbar. */ /* ### Basic Editor IFRAME Styles. */ body { padding: 1px; margin: 0; background-color: #ffffff; } #xEditingArea { border: #696969 1px solid; } .SourceField { padding: 5px; margin: 0px; font-family: Monospace; } /* Toolbar */ .TB_ToolbarSet, .TB_Expand, .TB_Collapse { cursor: default; background-color: #efefde; } .TB_ToolbarSet { border-top: #efefde 1px outset; border-bottom: #efefde 1px outset; } .TB_ToolbarSet TD { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .TB_Toolbar { height: 24px; display: inline-table; /* inline = Opera jumping buttons bug */ } .TB_Separator { width: 1px; height: 16px; margin: 2px; background-color: #999966; } .TB_Start { background-image: url(images/toolbar.start.gif); margin: 2px; width: 3px; background-repeat: no-repeat; height: 16px; } .TB_End { display: none; } .TB_ExpandImg { background-image: url(images/toolbar.expand.gif); background-repeat: no-repeat; } .TB_CollapseImg { background-image: url(images/toolbar.collapse.gif); background-repeat: no-repeat; } .TB_SideBorder { background-color: #696969; } .TB_Expand, .TB_Collapse { padding: 2px 2px 2px 2px; border: #efefde 1px outset; } .TB_Collapse { width: 5px; } .TB_Break { height: 24px; /* IE needs the height to be set, otherwise no break */ } /* Toolbar Button */ .TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled { border: #efefde 1px solid; /* This is the default border */ height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */ } .TB_Button_On { border: #316ac5 1px solid; background-color: #c1d2ee; } .TB_Button_On_Over, .TB_Button_Off_Over { border: #316ac5 1px solid; background-color: #dff1ff; } .TB_Button_Off { filter: alpha(opacity=70); /* IE */ opacity: 0.70; /* Safari, Opera and Mozilla */ } .TB_Button_Disabled { filter: gray() alpha(opacity=30); /* IE */ opacity: 0.30; /* Safari, Opera and Mozilla */ } .TB_Button_Padding { visibility: hidden; width: 3px; height: 22px; } .TB_Button_Image { overflow: hidden; width: 16px; height: 16px; margin: 3px; background-repeat: no-repeat; } .TB_Button_Image img { position: relative; } .TB_Button_Off .TB_Button_Text { background-color: #efefde; /* Needed because of a bug on Clear Type */ } .TB_ConnectionLine { background-color: #ffffff; height: 1px; margin-left: 1px; /* ltr */ margin-right: 1px; /* rtl */ } .TB_Text { height: 22px; } .TB_Button_Off .TB_Text { background-color: #efefde ; /* Needed because of a bug on ClearType */ } .TB_Button_On_Over .TB_Text { background-color: #dff1ff ; /* Needed because of a bug on ClearType */ } /* Menu */ .MN_Menu { border: 1px solid #8f8f73; padding: 2px; background-color: #ffffff; cursor: default; } .MN_Menu, .MN_Menu .MN_Label { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .MN_Item_Padding { visibility: hidden; width: 3px; height: 20px; } .MN_Icon { background-color: #e3e3c7; text-align: center; height: 20px; } .MN_Label { padding-left: 3px; padding-right: 3px; } .MN_Separator { height: 3px; } .MN_Separator_Line { border-top: #b9b99d 1px solid; } .MN_Item .MN_Icon IMG { filter: alpha(opacity=70); opacity: 0.70; } .MN_Item_Over { color: #ffffff; background-color: #8f8f73; } .MN_Item_Over .MN_Icon { background-color: #737357; } .MN_Item_Disabled IMG { filter: gray() alpha(opacity=30); /* IE */ opacity: 0.30; /* Safari, Opera and Mozilla */ } .MN_Item_Disabled .MN_Label { color: #b7b7b7; } .MN_Arrow { padding-right: 3px; padding-left: 3px; } .MN_ConnectionLine { background-color: #ffffff; } .Menu .TB_Button_On, .Menu .TB_Button_On_Over { border: #8f8f73 1px solid; background-color: #ffffff; } /* ### Panel Styles */ .FCK_Panel { border: #8f8f73 1px solid; padding: 2px; background-color: #ffffff; } .FCK_Panel, .FCK_Panel TD { font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; font-size: 11px; } /* ### Special Combos */ .SC_Panel { overflow: auto; white-space: nowrap; cursor: default; border: 1px solid #8f8f73; padding-left: 2px; padding-right: 2px; } .SC_Panel, .SC_Panel TD { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .SC_Item, .SC_ItemSelected { margin-top: 2px; margin-bottom: 2px; background-position: left center; padding-left: 11px; padding-right: 3px; padding-top: 2px; padding-bottom: 2px; text-overflow: ellipsis; overflow: hidden; background-repeat: no-repeat; border: #dddddd 1px solid; } .SC_Item *, .SC_ItemSelected * { margin-top: 0px; margin-bottom: 0px; } .SC_ItemSelected { border: #9a9afb 1px solid; background-image: url(images/toolbar.arrowright.gif); } .SC_ItemOver { border: #316ac5 1px solid; } .SC_Field { border: #b7b7a6 1px solid; cursor: default; } .SC_FieldCaption { overflow: visible; padding-right: 5px; padding-left: 5px; opacity: 0.75; /* Safari, Opera and Mozilla */ filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ height: 23px; background-color: #efefde; } .SC_FieldLabel { white-space: nowrap; padding: 2px; width: 100%; cursor: default; background-color: #ffffff; text-overflow: ellipsis; overflow: hidden; } .SC_FieldButton { background-position: center center; background-image: url(images/toolbar.buttonarrow.gif); border-left: #b7b7a6 1px solid; width: 14px; background-repeat: no-repeat; } .SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text { opacity: 0.30; /* Safari, Opera and Mozilla */ filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ } .SC_FieldOver { border: #316ac5 1px solid; } .SC_FieldOver .SC_FieldButton { border-left: #316ac5 1px solid; } /* ### Color Selector Panel */ .ColorBoxBorder { border: #808080 1px solid; position: static; } .ColorBox { font-size: 1px; width: 10px; position: static; height: 10px; } .ColorDeselected, .ColorSelected { cursor: default; } .ColorDeselected { border: #ffffff 1px solid; padding: 2px; float: left; } .ColorSelected { border: #330066 1px solid; padding: 2px; float: left; background-color: #c4cdd6; }
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/default/fck_editor.css
CSS
asf20
7,906
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Styles used by the dialog boxes. */ html, body { background-color: transparent; margin: 0px; padding: 0px; } body { padding: 10px; } body, td, input, select, textarea { font-size: 11px; font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; } body, .BackColor { background-color: #f1f1e3; } .PopupBody { height: 100%; width: 100%; overflow: hidden; background-color: transparent; padding: 0px; } #header { cursor: move; } .PopupTitle { font-weight: bold; font-size: 14pt; color: #737357; background-color: #e3e3c7; padding: 3px 10px 3px 10px; } .PopupButtons { position: absolute; right: 0px; left: 0px; bottom: 0px; border-top: #d5d59d 1px solid; background-color: #e3e3c7; padding: 7px 10px 7px 10px; } .Button { border: #737357 1px solid; color: #3b3b1f; background-color: #c7c78f; } #btnOk { width: 100px; } .DarkBackground { background-color: #eaead1; } .LightBackground { background-color: #ffffbe; } .PopupTitleBorder { border-bottom: #d5d59d 1px solid; } .PopupTabArea { color: #737357; background-color: #e3e3c7; } .PopupTabEmptyArea { padding-left: 10px; border-bottom: #d5d59d 1px solid; } .PopupTab, .PopupTabSelected { border-right: #d5d59d 1px solid; border-top: #d5d59d 1px solid; border-left: #d5d59d 1px solid; padding: 3px 5px 3px 5px; color: #737357; } .PopupTab { margin-top: 1px; border-bottom: #d5d59d 1px solid; cursor: pointer; cursor: hand; } .PopupTabSelected { font-weight: bold; cursor: default; padding-top: 4px; border-bottom: #f1f1e3 1px solid; background-color: #f1f1e3; } .PopupSelectionBox { border: #ff9933 1px solid !important; background-color: #fffacd !important; cursor: pointer; cursor: hand; } #tdBrowse { vertical-align: bottom; } /** * Dialog frame related styles. */ .contents { position: absolute; top: 2px; left: 16px; right: 16px; bottom: 20px; background-color: #f1f1e3; overflow: hidden; z-index: 1; } .tl, .tr, .tc, .bl, .br, .bc { position: absolute; background-image: url(images/sprites.png); background-repeat: no-repeat; } * html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc { background-image: url(images/sprites.gif); } .ml, .mr { position: absolute; background-image: url(images/dialog.sides.png); background-repeat: repeat-y; } * html .ml, * html .mr { background-image: url(images/dialog.sides.gif); } .rtl .ml, .rtl .mr { position: absolute; background-image: url(images/dialog.sides.rtl.png); background-repeat: repeat-y; } * html .rtl .ml, * html .rtl .mr { background-image: url(images/dialog.sides.gif); } .tl { top: 0px; left: 0px; width: 16px; height: 16px; background-position: -16px -16px; } .rtl .tl { background-position: -16px -397px; } .tr { top: 0px; right: 0px; width: 16px; height: 16px; background-position: -16px -76px; } .rtl .tr { background-position: -16px -457px; } .tc { top: 0px; right: 16px; left: 16px; height: 16px; background-position: 0px -136px; background-repeat: repeat-x; } .ml { top: 16px; left: 0px; width: 16px; bottom: 51px; background-position: 0px 0px; } .mr { top: 16px; right: 0px; width: 16px; bottom: 51px; background-position: -16px 0px; } .bl { bottom: 0px; left: 0px; width: 30px; height: 51px; background-position: -16px -196px; } .rtl .bl { background-position: -16px -517px; } .br { bottom: 0px; right: 0px; width: 30px; height: 51px; background-position: -16px -263px; } .rtl .br { background-position: -16px -584px; } .bc { bottom: 0px; right: 30px; left: 30px; height: 51px; background-position: 0px -330px; background-repeat: repeat-x; } /* For IE6. Do not change it. */ * html .blocker { position: absolute; width: 100%; height: 100%; z-index: 12; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); } /* The layer used to cover the dialog when opening a child dialog. */ .cover { position: absolute; top: 0px; left: 14px; right: 14px; bottom: 18px; z-index: 11; } #closeButton { position: absolute; right: 0px; top: 0px; margin-top: 5px; margin-right: 10px; width: 20px; height: 20px; cursor: pointer; background-image: url(images/sprites.png); background-repeat: no-repeat; background-position: -16px -651px; } * html #closeButton { cursor: hand; background-image: url(images/sprites.gif); } .rtl #closeButton { right: auto; left: 10px; margin-right: 0px; } #closeButton:hover { background-position: -16px -687px; } #throbberBlock { z-index: 10; } #throbberBlock div { float: left; width: 8px; height: 9px; margin-left: 2px; margin-right: 2px; font-size: 1px; /* IE6 */ } /* Color Gradient Generator: http://www.herethere.net/~samson/php/color_gradient/?cbegin=737357&cend=E3E3C7&steps=4 */ .throbber_1 { background-color: #737357; } .throbber_2 { background-color: #8f8f73; } .throbber_3 { background-color: #abab8f; } .throbber_4 { background-color: #c7c7ab; } .throbber_5 { background-color: #e3e3c7; }
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/default/fck_dialog.css
CSS
asf20
5,989
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == */ (function() { // IE6 doens't handle absolute positioning properly (it is always in quirks // mode). This function fixes the sizes and positions of many elements that // compose the skin (this is skin specific). var fixSizes = window.DoResizeFixes = function() { var fckDlg = window.document.body ; for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) { var child = fckDlg.childNodes[i] ; switch ( child.className ) { case 'contents' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 ) ; // -left -right child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 ) ; // -bottom -top break ; case 'blocker' : case 'cover' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 + 4 ) ; // -left -right + 4 child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 + 4 ) ; // -bottom -top + 4 break ; case 'tr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; break ; case 'tc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 16 - 16 ) ; break ; case 'ml' : child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'mr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'bl' : child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'br' : child.style.left = Math.max( 0, fckDlg.clientWidth - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'bc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 30 - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; } } } var closeButtonOver = function() { this.style.backgroundPosition = '-16px -687px' ; } ; var closeButtonOut = function() { this.style.backgroundPosition = '-16px -651px' ; } ; var fixCloseButton = function() { var closeButton = document.getElementById ( 'closeButton' ) ; closeButton.onmouseover = closeButtonOver ; closeButton.onmouseout = closeButtonOut ; } var onLoad = function() { fixSizes() ; fixCloseButton() ; window.attachEvent( 'onresize', fixSizes ) ; window.detachEvent( 'onload', onLoad ) ; } window.attachEvent( 'onload', onLoad ) ; })() ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/silver/fck_dialog_ie6.js
JavaScript
asf20
3,108
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Styles used by the editor IFRAME and Toolbar. */ /* ### Basic Editor IFRAME Styles. */ body { padding: 1px; margin: 0; background-color: #ffffff; } #xEditingArea { border: #696969 1px solid; } .SourceField { padding: 5px; margin: 0px; font-family: Monospace; } /* Toolbar */ .TB_ToolbarSet, .TB_Expand, .TB_Collapse { cursor: default; background-color: #f7f7f7; } .TB_ToolbarSet { padding: 1px; border-top: #efefde 1px outset; border-bottom: #efefde 1px outset; } .TB_ToolbarSet TD { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .TB_Toolbar { display: inline-table; } .TB_Separator { width: 1px; height: 21px; margin: 2px; background-color: #C6C3BD; } .TB_Start { background-image: url(images/toolbar.start.gif); margin-left: 2px; margin-right: 2px; width: 3px; background-repeat: no-repeat; height: 27px; background-position: center center; } .TB_End { display: none; } .TB_ExpandImg { background-image: url(images/toolbar.expand.gif); background-repeat: no-repeat; } .TB_CollapseImg { background-image: url(images/toolbar.collapse.gif); background-repeat: no-repeat; } .TB_SideBorder { background-color: #696969; } .TB_Expand, .TB_Collapse { padding: 2px 2px 2px 2px; border: #efefde 1px outset; } .TB_Collapse { border: #efefde 1px outset; width: 5px; } .TB_Break { height: 27px; } /* Toolbar Button */ .TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled { padding: 1px ; margin:1px; height: 21px; } .TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled { border: #cec6b5 1px solid; } .TB_Button_On { border-color: #316ac5; background-color: #c1d2ee; } .TB_Button_On_Over, .TB_Button_Off_Over { border: #316ac5 1px solid; background-color: #dff1ff; } .TB_Button_Off { background: #efefef url(images/toolbar.buttonbg.gif) repeat-x; } .TB_Button_Off, .TB_Combo_Off { opacity: 0.70; /* Safari, Opera and Mozilla */ filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.70; Mozilla (Old) */ } .TB_Button_Disabled { opacity: 0.30; /* Safari, Opera and Mozilla */ filter: gray() alpha(opacity=30); /* IE */ } .TB_Button_Padding { visibility: hidden; width: 3px; height: 21px; } .TB_Button_Image { overflow: hidden; width: 16px; height: 16px; margin: 3px; margin-top: 4px; margin-bottom: 2px; background-repeat: no-repeat; } /* For composed button ( icon + text, icon + arrow ), we must compensate the table */ .TB_Button_On TABLE .TB_Button_Image, .TB_Button_Off TABLE .TB_Button_Image, .TB_Button_On_Over TABLE .TB_Button_Image, .TB_Button_Off_Over TABLE .TB_Button_Image, .TB_Button_Disabled TABLE .TB_Button_Image { margin-top: 3px; } .TB_Button_Image img { position: relative; } .TB_ConnectionLine { background-color: #ffffff; height: 1px; margin-left: 1px; /* ltr */ margin-right: 1px; /* rtl */ } /* Menu */ .MN_Menu { border: 1px solid #8f8f73; padding: 2px; background-color: #f7f7f7; cursor: default; } .MN_Menu, .MN_Menu .MN_Label { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .MN_Item_Padding { visibility: hidden; width: 3px; height: 20px; } .MN_Icon { background-color: #dedede; text-align: center; height: 20px; } .MN_Label { padding-left: 3px; padding-right: 3px; } .MN_Separator { height: 3px; } .MN_Separator_Line { border-top: #b9b99d 1px solid; } .MN_Item .MN_Icon IMG { filter: alpha(opacity=70); opacity: 0.70; } .MN_Item_Over { color: #ffffff; background-color: #8a857d; } .MN_Item_Over .MN_Icon { background-color: #6c6761; } .MN_Item_Disabled IMG { filter: gray() alpha(opacity=30); /* IE */ opacity: 0.30; /* Safari, Opera and Mozilla */ } .MN_Item_Disabled .MN_Label { color: #b7b7b7; } .MN_Arrow { padding-right: 3px; padding-left: 3px; } .MN_ConnectionLine { background-color: #ffffff; } .Menu .TB_Button_On, .Menu .TB_Button_On_Over { border: #8f8f73 1px solid; background-color: #ffffff; } /* ### Panel Styles */ .FCK_Panel { border: #8f8f73 1px solid; padding: 2px; background-color: #ffffff; } .FCK_Panel, .FCK_Panel TD { font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; font-size: 11px; } /* ### Special Combos */ .SC_Panel { overflow: auto; white-space: nowrap; cursor: default; border: 1px solid #8f8f73; padding-left: 2px; padding-right: 2px; } .SC_Panel, .SC_Panel TD { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; } .SC_Item, .SC_ItemSelected { margin-top: 2px; margin-bottom: 2px; background-position: left center; padding-left: 11px; padding-right: 3px; padding-top: 2px; padding-bottom: 2px; text-overflow: ellipsis; overflow: hidden; background-repeat: no-repeat; border: #dddddd 1px solid; } .SC_Item *, .SC_ItemSelected * { margin-top: 0px; margin-bottom: 0px; } .SC_ItemSelected { border: #9a9afb 1px solid; background-image: url(images/toolbar.arrowright.gif); } .SC_ItemOver { border: #316ac5 1px solid; } .SC_Field { margin-top:1px ; border: #b7b7a6 1px solid; cursor: default; } .SC_FieldCaption { padding-top: 1px ; overflow: visible; padding-right: 5px; padding-left: 5px; opacity: 0.75; /* Safari, Opera and Mozilla */ filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */ height: 23px; background-color: #f7f7f7; } .SC_FieldLabel { white-space: nowrap; padding: 2px; width: 100%; cursor: default; background-color: #ffffff; text-overflow: ellipsis; overflow: hidden; } .SC_FieldButton { background-position: center center; background-image: url(images/toolbar.buttonarrow.gif); border-left: #b7b7a6 1px solid; width: 14px; background-repeat: no-repeat; } .SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text { opacity: 0.30; /* Safari, Opera and Mozilla */ filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */ } .SC_FieldOver { border: #316ac5 1px solid; } .SC_FieldOver .SC_FieldButton { border-left: #316ac5 1px solid; } /* ### Color Selector Panel */ .ColorBoxBorder { border: #808080 1px solid; position: static; } .ColorBox { font-size: 1px; width: 10px; position: static; height: 10px; } .ColorDeselected, .ColorSelected { cursor: default; } .ColorDeselected { border: #ffffff 1px solid; padding: 2px; float: left; } .ColorSelected { border: #316ac5 1px solid; padding: 2px; float: left; background-color: #c1d2ee; }
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/silver/fck_editor.css
CSS
asf20
8,053
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Styles used by the dialog boxes. */ html, body { background-color: transparent; margin: 0px; padding: 0px; } body { padding: 10px; } body, td, input, select, textarea { font-size: 11px; font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; } body, .BackColor { background-color: #f7f7f7; } .PopupBody { height: 100%; width: 100%; overflow: hidden; background-color: transparent; padding: 0px; } #header { cursor: move; } .PopupTitle { font-weight: bold; font-size: 14pt; color: #504845; background-color: #dedede; padding: 3px 10px 3px 10px; } .PopupButtons { position: absolute; right: 0px; left: 0px; bottom: 0px; border-top: #cec6b5 1px solid; background-color: #DEDEDE; padding: 7px 10px 7px 10px; } .Button { border: #7a7261 1px solid; color: #504845; background-color: #cec6b5; } #btnOk { width: 100px; } .DarkBackground { background-color: #f2f2f2; } .LightBackground { background-color: #ffffbe; } .PopupTitleBorder { border-bottom: #cec6b5 1px solid; } .PopupTabArea { color: #504845; background-color: #DEDEDE; } .PopupTabEmptyArea { padding-left: 10px ; border-bottom: #cec6b5 1px solid; } .PopupTab, .PopupTabSelected { border-right: #cec6b5 1px solid; border-top: #cec6b5 1px solid; border-left: #cec6b5 1px solid; padding: 3px 5px 3px 5px; color: #504845; } .PopupTab { margin-top: 1px; border-bottom: #cec6b5 1px solid; cursor: pointer; cursor: hand; } .PopupTabSelected { font-weight:bold; cursor: default; padding-top: 4px; border-bottom: #f1f1e3 1px solid; background-color: #f7f7f7; } .PopupSelectionBox { border: #a9a9a9 1px solid !important; background-color: #dcdcdc !important; cursor: pointer; cursor: hand; } #tdBrowse { vertical-align: bottom; } /** * Dialog frame related styles. */ .contents { position: absolute; top: 2px; left: 16px; right: 16px; bottom: 20px; background-color: #f7f7f7; overflow: hidden; z-index: 1; } .tl, .tr, .tc, .bl, .br, .bc { position: absolute; background-image: url(images/sprites.png); background-repeat: no-repeat; } * html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc { background-image: url(images/sprites.gif); } .ml, .mr { position: absolute; background-image: url(images/dialog.sides.png); background-repeat: repeat-y; } * html .ml, * html .mr { background-image: url(images/dialog.sides.gif); } .rtl .ml, .rtl .mr { position: absolute; background-image: url(images/dialog.sides.rtl.png); background-repeat: repeat-y; } * html .rtl .ml, * html .rtl .mr { background-image: url(images/dialog.sides.gif); } .tl { top: 0px; left: 0px; width: 16px; height: 16px; background-position: -16px -16px; } .rtl .tl { background-position: -16px -397px; } .tr { top: 0px; right: 0px; width: 16px; height: 16px; background-position: -16px -76px; } .rtl .tr { background-position: -16px -457px; } .tc { top: 0px; right: 16px; left: 16px; height: 16px; background-position: 0px -136px; background-repeat: repeat-x; } .ml { top: 16px; left: 0px; width: 16px; bottom: 51px; background-position: 0px 0px; } .mr { top: 16px; right: 0px; width: 16px; bottom: 51px; background-position: -16px 0px; } .bl { bottom: 0px; left: 0px; width: 30px; height: 51px; background-position: -16px -196px; } .rtl .bl { background-position: -16px -517px; } .br { bottom: 0px; right: 0px; width: 30px; height: 51px; background-position: -16px -263px; } .rtl .br { background-position: -16px -584px; } .bc { bottom: 0px; right: 30px; left: 30px; height: 51px; background-position: 0px -330px; background-repeat: repeat-x; } /* For IE6. Do not change it. */ * html .blocker { position: absolute; width: 100%; height: 100%; z-index: 12; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); } /* The layer used to cover the dialog when opening a child dialog. */ .cover { position: absolute; top: 0px; left: 14px; right: 14px; bottom: 18px; z-index: 11; } #closeButton { position: absolute; right: 0px; top: 0px; margin-top: 5px; margin-right: 10px; width: 20px; height: 20px; cursor: pointer; background-image: url(images/sprites.png); background-repeat: no-repeat; background-position: -16px -651px; } * html #closeButton { cursor: hand; background-image: url(images/sprites.gif); } .rtl #closeButton { right: auto; left: 10px; margin-right: 0px; } #closeButton:hover { background-position: -16px -687px; } #throbberBlock { z-index: 10; } #throbberBlock div { float: left; width: 8px; height: 9px; margin-left: 2px; margin-right: 2px; font-size: 1px; /* IE6 */ } /* Color Gradient Generator: http://www.herethere.net/~samson/php/color_gradient/?cbegin=504845&cend=DEDEDE&steps=4 */ .throbber_1 { background-color: #504845; } .throbber_2 { background-color: #736D6B; } .throbber_3 { background-color: #979391; } .throbber_4 { background-color: #BAB8B7; } .throbber_5 { background-color: #DEDEDE; }
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/skins/silver/fck_dialog.css
CSS
asf20
5,989
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Compatibility code for Adobe AIR. */ if ( FCKBrowserInfo.IsAIR ) { var FCKAdobeAIR = (function() { /* * ### Private functions. */ var getDocumentHead = function( doc ) { var head ; var heads = doc.getElementsByTagName( 'head' ) ; if( heads && heads[0] ) head = heads[0] ; else { head = doc.createElement( 'head' ) ; doc.documentElement.insertBefore( head, doc.documentElement.firstChild ) ; } return head ; } ; /* * ### Public interface. */ return { FCKeditorAPI_Evaluate : function( parentWindow, script ) { // TODO : This one doesn't work always. The parent window will // point to an anonymous function in this window. If this // window is destroyied the parent window will be pointing to // an invalid reference. // Evaluate the script in this window. eval( script ) ; // Point the FCKeditorAPI property of the parent window to the // local reference. parentWindow.FCKeditorAPI = window.FCKeditorAPI ; }, EditingArea_Start : function( doc, html ) { // Get the HTML for the <head>. var headInnerHtml = html.match( /<head>([\s\S]*)<\/head>/i )[1] ; if ( headInnerHtml && headInnerHtml.length > 0 ) { // Inject the <head> HTML inside a <div>. // Do that before getDocumentHead because WebKit moves // <link css> elements to the <head> at this point. var div = doc.createElement( 'div' ) ; div.innerHTML = headInnerHtml ; // Move the <div> nodes to <head>. FCKDomTools.MoveChildren( div, getDocumentHead( doc ) ) ; } doc.body.innerHTML = html.match( /<body>([\s\S]*)<\/body>/i )[1] ; //prevent clicking on hyperlinks and navigating away doc.addEventListener('click', function( ev ) { ev.preventDefault() ; ev.stopPropagation() ; }, true ) ; }, Panel_Contructor : function( doc, baseLocation ) { var head = getDocumentHead( doc ) ; // Set the <base> href. head.appendChild( doc.createElement('base') ).href = baseLocation ; doc.body.style.margin = '0px' ; doc.body.style.padding = '0px' ; }, ToolbarSet_GetOutElement : function( win, outMatch ) { var toolbarTarget = win.parent ; var targetWindowParts = outMatch[1].split( '.' ) ; while ( targetWindowParts.length > 0 ) { var part = targetWindowParts.shift() ; if ( part.length > 0 ) toolbarTarget = toolbarTarget[ part ] ; } toolbarTarget = toolbarTarget.document.getElementById( outMatch[2] ) ; }, ToolbarSet_InitOutFrame : function( doc ) { var head = getDocumentHead( doc ) ; head.appendChild( doc.createElement('base') ).href = window.document.location ; var targetWindow = doc.defaultView; targetWindow.adjust = function() { targetWindow.frameElement.height = doc.body.scrollHeight; } ; targetWindow.onresize = targetWindow.adjust ; targetWindow.setTimeout( targetWindow.adjust, 0 ) ; doc.body.style.overflow = 'hidden'; doc.body.innerHTML = document.getElementById( 'xToolbarSpace' ).innerHTML ; } } ; })(); /* * ### Overrides */ ( function() { // Save references for override reuse. var _Original_FCKPanel_Window_OnFocus = FCKPanel_Window_OnFocus ; var _Original_FCKPanel_Window_OnBlur = FCKPanel_Window_OnBlur ; var _Original_FCK_StartEditor = FCK.StartEditor ; FCKPanel_Window_OnFocus = function( e, panel ) { // Call the original implementation. _Original_FCKPanel_Window_OnFocus.call( this, e, panel ) ; if ( panel._focusTimer ) clearTimeout( panel._focusTimer ) ; } FCKPanel_Window_OnBlur = function( e, panel ) { // Delay the execution of the original function. panel._focusTimer = FCKTools.SetTimeout( _Original_FCKPanel_Window_OnBlur, 100, this, [ e, panel ] ) ; } FCK.StartEditor = function() { // Force pointing to the CSS files instead of using the inline CSS cached styles. window.FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; window.FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; _Original_FCK_StartEditor.apply( this, arguments ) ; } })(); }
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/js/fckadobeair.js
JavaScript
asf20
4,995
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Main page that holds the editor. --> <html> <head> <title>FCKeditor</title> <meta name="robots" content="noindex, nofollow"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- @Packager.RemoveLine <meta http-equiv="Cache-Control" content="public"> @Packager.RemoveLine --> <script type="text/javascript"> // #1645: Alert the user if opening FCKeditor in FF3 from local filesystem // without security.fileuri.strict_origin_policy disabled. if ( document.location.protocol == 'file:' ) { try { window.parent.document.domain ; } catch ( e ) { window.addEventListener( 'load', function() { document.body.innerHTML = '\ <div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\ <p>\ <b>Your browser security settings don\'t allow FCKeditor to be opened from\ the local filesystem.<\/b>\ <\/p>\ <p>\ Please open the <b>about:config<\/b> page and disable the\ &quot;security.fileuri.strict_origin_policy&quot; option; then load this page again.\ <\/p>\ <p>\ Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\ for more information.\ <\/p>\ <\/div>' ; }, false ) ; } } // Save a reference to the default domain. var FCK_ORIGINAL_DOMAIN ; // Automatically detect the correct document.domain (#123). (function() { var d = FCK_ORIGINAL_DOMAIN = document.domain ; while ( true ) { // Test if we can access a parent property. try { var test = window.parent.document.domain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. try { document.domain = d ; } catch (e) { break ; } } })() ; // Save a reference to the detected runtime domain. var FCK_RUNTIME_DOMAIN = document.domain ; var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ; // Instead of loading scripts and CSSs using inline tags, all scripts are // loaded by code. In this way we can guarantee the correct processing order, // otherwise external scripts and inline scripts could be executed in an // unwanted order (IE). function LoadScript( url ) { document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ; } // Main editor scripts. var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ; /* @Packager.RemoveLine LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ; @Packager.RemoveLine */ // @Packager.Remove.Start LoadScript( '_source/fckconstants.js' ) ; LoadScript( '_source/fckjscoreextensions.js' ) ; if ( sSuffix == 'ie' ) LoadScript( '_source/classes/fckiecleanup.js' ) ; LoadScript( '_source/internals/fckbrowserinfo.js' ) ; LoadScript( '_source/internals/fckurlparams.js' ) ; LoadScript( '_source/classes/fckevents.js' ) ; LoadScript( '_source/classes/fckdataprocessor.js' ) ; LoadScript( '_source/internals/fck.js' ) ; LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ; LoadScript( '_source/internals/fckconfig.js' ) ; LoadScript( '_source/internals/fckdebug_empty.js' ) ; LoadScript( '_source/internals/fckdomtools.js' ) ; LoadScript( '_source/internals/fcktools.js' ) ; LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ; LoadScript( '_source/fckeditorapi.js' ) ; LoadScript( '_source/classes/fckimagepreloader.js' ) ; LoadScript( '_source/internals/fckregexlib.js' ) ; LoadScript( '_source/internals/fcklistslib.js' ) ; LoadScript( '_source/internals/fcklanguagemanager.js' ) ; LoadScript( '_source/internals/fckxhtmlentities.js' ) ; LoadScript( '_source/internals/fckxhtml.js' ) ; LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ; LoadScript( '_source/internals/fckcodeformatter.js' ) ; LoadScript( '_source/internals/fckundo.js' ) ; LoadScript( '_source/classes/fckeditingarea.js' ) ; LoadScript( '_source/classes/fckkeystrokehandler.js' ) ; LoadScript( 'dtd/fck_xhtml10transitional.js' ) ; LoadScript( '_source/classes/fckstyle.js' ) ; LoadScript( '_source/internals/fckstyles.js' ) ; LoadScript( '_source/internals/fcklisthandler.js' ) ; LoadScript( '_source/classes/fckelementpath.js' ) ; LoadScript( '_source/classes/fckdomrange.js' ) ; LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ; LoadScript( '_source/classes/fckw3crange.js' ) ; LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ; LoadScript( '_source/classes/fckdomrangeiterator.js' ) ; LoadScript( '_source/classes/fckenterkey.js' ) ; LoadScript( '_source/internals/fckdocumentprocessor.js' ) ; LoadScript( '_source/internals/fckselection.js' ) ; LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ; LoadScript( '_source/internals/fcktablehandler.js' ) ; LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ; LoadScript( '_source/classes/fckxml.js' ) ; LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ; LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ; LoadScript( '_source/commandclasses/fckstylecommand.js' ) ; LoadScript( '_source/commandclasses/fck_othercommands.js' ) ; LoadScript( '_source/commandclasses/fckshowblocks.js' ) ; LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ; LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ; LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ; LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ; LoadScript( '_source/commandclasses/fcktablecommand.js' ) ; LoadScript( '_source/commandclasses/fckfitwindow.js' ) ; LoadScript( '_source/commandclasses/fcklistcommands.js' ) ; LoadScript( '_source/commandclasses/fckjustifycommands.js' ) ; LoadScript( '_source/commandclasses/fckindentcommands.js' ) ; LoadScript( '_source/commandclasses/fckblockquotecommand.js' ) ; LoadScript( '_source/commandclasses/fckcorestylecommand.js' ) ; LoadScript( '_source/commandclasses/fckremoveformatcommand.js' ) ; LoadScript( '_source/internals/fckcommands.js' ) ; LoadScript( '_source/classes/fckpanel.js' ) ; LoadScript( '_source/classes/fckicon.js' ) ; LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ; LoadScript( '_source/classes/fcktoolbarbutton.js' ) ; LoadScript( '_source/classes/fckspecialcombo.js' ) ; LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ; LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ; LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ; LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ; LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ; LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ; LoadScript( '_source/internals/fckscayt.js' ) ; LoadScript( '_source/internals/fcktoolbaritems.js' ) ; LoadScript( '_source/classes/fcktoolbar.js' ) ; LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ; LoadScript( '_source/internals/fcktoolbarset.js' ) ; LoadScript( '_source/internals/fckdialog.js' ) ; LoadScript( '_source/classes/fckmenuitem.js' ) ; LoadScript( '_source/classes/fckmenublock.js' ) ; LoadScript( '_source/classes/fckmenublockpanel.js' ) ; LoadScript( '_source/classes/fckcontextmenu.js' ) ; LoadScript( '_source/internals/fck_contextmenu.js' ) ; LoadScript( '_source/classes/fckhtmliterator.js' ) ; LoadScript( '_source/classes/fckplugin.js' ) ; LoadScript( '_source/internals/fckplugins.js' ) ; // @Packager.Remove.End // Base configuration file. LoadScript( '../fckconfig.js' ) ; </script> <script type="text/javascript"> // Adobe AIR compatibility file. if ( FCKBrowserInfo.IsAIR ) LoadScript( 'js/fckadobeair.js' ) ; if ( FCKBrowserInfo.IsIE ) { // Remove IE mouse flickering. try { document.execCommand( 'BackgroundImageCache', false, true ) ; } catch (e) { // We have been reported about loading problems caused by the above // line. For safety, let's just ignore errors. } // Create the default cleanup object used by the editor. FCK.IECleanup = new FCKIECleanup( window ) ; FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ; FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ; } // The first function to be called on selection change must the the styles // change checker, because the result of its processing may be used by another // functions listening to the same event. FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ; // The config hidden field is processed immediately, because // CustomConfigurationsPath may be set in the page. FCKConfig.ProcessHiddenField() ; // Load the custom configurations file (if defined). if ( FCKConfig.CustomConfigurationsPath.length > 0 ) LoadScript( FCKConfig.CustomConfigurationsPath ) ; </script> <script type="text/javascript"> // Load configurations defined at page level. FCKConfig_LoadPageConfig() ; FCKConfig_PreProcess() ; // Load the full debug script. if ( FCKConfig.Debug ) LoadScript( '_source/internals/fckdebug.js' ) ; </script> <script type="text/javascript"> var FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; // @Packager.RemoveLine var FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; // @Packager.RemoveLine /* @Packager.RemoveLine // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ; var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ; @Packager.RemoveLine */ // Popup the debug window if debug mode is set to true. It guarantees that the // first debug message will not be lost. if ( FCKConfig.Debug ) FCKDebug._GetWindow() ; // Load the active skin CSS. document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ; // Load the language file. FCKLanguageManager.Initialize() ; LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ; </script> <script type="text/javascript"> // Initialize the editing area context menu. FCK_ContextMenu_Init() ; FCKPlugins.Load() ; </script> <script type="text/javascript"> // Set the editor interface direction. window.document.dir = FCKLang.Dir ; </script> <script type="text/javascript"> window.onload = function() { InitializeAPI() ; if ( FCKBrowserInfo.IsIE ) FCK_PreloadImages() ; else LoadToolbarSetup() ; } function LoadToolbarSetup() { FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ; } function LoadToolbar() { var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ; if ( oToolbarSet.IsLoaded ) StartEditor() ; else { oToolbarSet.OnLoad = StartEditor ; oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ; } } function StartEditor() { // Remove the onload listener. FCK.ToolbarSet.OnLoad = null ; FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ; FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ; // Start the editor. FCK.StartEditor() ; } function WaitForActive( editorInstance, newStatus ) { if ( newStatus == FCK_STATUS_ACTIVE ) { if ( FCKBrowserInfo.IsGecko ) FCKTools.RunFunction( window.onresize ) ; if ( !FCKConfig.PreventSubmitHandler ) _AttachFormSubmitToAPI() ; FCK.SetStatus( FCK_STATUS_COMPLETE ) ; // Call the special "FCKeditor_OnComplete" function that should be present in // the HTML page where the editor is located. if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' ) window.parent.FCKeditor_OnComplete( FCK ) ; } } // Gecko and Webkit browsers don't calculate well the IFRAME size so we must // recalculate it every time the window size changes. if ( FCKBrowserInfo.IsGecko || ( FCKBrowserInfo.IsSafari && !FCKBrowserInfo.IsSafari3 ) ) { window.onresize = function( e ) { // Running in Firefox's chrome makes the window receive the event including subframes. // we care only about this window. Ticket #1642. // #2002: The originalTarget from the event can be the current document, the window, or the editing area. if ( e && e.originalTarget && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document )) return ; var oCell = document.getElementById( 'xEditingArea' ) ; var eInnerElement = oCell.firstChild ; if ( eInnerElement ) { eInnerElement.style.height = '0px' ; eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ; } } } </script> </head> <body> <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed"> <tr id="xToolbarRow" style="display: none"> <td id="xToolbarSpace" style="overflow: hidden"> <table width="100%" cellpadding="0" cellspacing="0"> <tr id="xCollapsed" style="display: none"> <td id="xExpandHandle" class="TB_Expand" colspan="3"> <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> </tr> <tr id="xExpanded" style="display: none"> <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td> <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom"> <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> <td id="xToolbar" class="TB_ToolbarSet"></td> <td class="TB_SideBorder" style="width: 1px"></td> </tr> </table> </td> </tr> <tr> <td id="xEditingArea" valign="top" style="height: 100%"></td> </tr> </table> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/fckeditor.original.html
HTML
asf20
17,833
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Main page that holds the editor. --> <html> <head> <title>FCKeditor</title> <meta name="robots" content="noindex, nofollow"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Cache-Control" content="public"> <script type="text/javascript"> // #1645: Alert the user if opening FCKeditor in FF3 from local filesystem // without security.fileuri.strict_origin_policy disabled. if ( document.location.protocol == 'file:' ) { try { window.parent.document.domain ; } catch ( e ) { window.addEventListener( 'load', function() { document.body.innerHTML = '\ <div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\ <p>\ <b>Your browser security settings don\'t allow FCKeditor to be opened from\ the local filesystem.<\/b>\ <\/p>\ <p>\ Please open the <b>about:config<\/b> page and disable the\ &quot;security.fileuri.strict_origin_policy&quot; option; then load this page again.\ <\/p>\ <p>\ Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\ for more information.\ <\/p>\ <\/div>' ; }, false ) ; } } // Save a reference to the default domain. var FCK_ORIGINAL_DOMAIN ; // Automatically detect the correct document.domain (#123). (function() { var d = FCK_ORIGINAL_DOMAIN = document.domain ; while ( true ) { // Test if we can access a parent property. try { var test = window.parent.document.domain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. try { document.domain = d ; } catch (e) { break ; } } })() ; // Save a reference to the detected runtime domain. var FCK_RUNTIME_DOMAIN = document.domain ; var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ; // Instead of loading scripts and CSSs using inline tags, all scripts are // loaded by code. In this way we can guarantee the correct processing order, // otherwise external scripts and inline scripts could be executed in an // unwanted order (IE). function LoadScript( url ) { document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ; } // Main editor scripts. var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ; LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ; // Base configuration file. LoadScript( '../fckconfig.js' ) ; </script> <script type="text/javascript"> // Adobe AIR compatibility file. if ( FCKBrowserInfo.IsAIR ) LoadScript( 'js/fckadobeair.js' ) ; if ( FCKBrowserInfo.IsIE ) { // Remove IE mouse flickering. try { document.execCommand( 'BackgroundImageCache', false, true ) ; } catch (e) { // We have been reported about loading problems caused by the above // line. For safety, let's just ignore errors. } // Create the default cleanup object used by the editor. FCK.IECleanup = new FCKIECleanup( window ) ; FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ; FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ; } // The first function to be called on selection change must the the styles // change checker, because the result of its processing may be used by another // functions listening to the same event. FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ; // The config hidden field is processed immediately, because // CustomConfigurationsPath may be set in the page. FCKConfig.ProcessHiddenField() ; // Load the custom configurations file (if defined). if ( FCKConfig.CustomConfigurationsPath.length > 0 ) LoadScript( FCKConfig.CustomConfigurationsPath ) ; </script> <script type="text/javascript"> // Load configurations defined at page level. FCKConfig_LoadPageConfig() ; FCKConfig_PreProcess() ; // Load the full debug script. if ( FCKConfig.Debug ) LoadScript( '_source/internals/fckdebug.js' ) ; </script> <script type="text/javascript"> // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ; var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ; // Popup the debug window if debug mode is set to true. It guarantees that the // first debug message will not be lost. if ( FCKConfig.Debug ) FCKDebug._GetWindow() ; // Load the active skin CSS. document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ; // Load the language file. FCKLanguageManager.Initialize() ; LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ; </script> <script type="text/javascript"> // Initialize the editing area context menu. FCK_ContextMenu_Init() ; FCKPlugins.Load() ; </script> <script type="text/javascript"> // Set the editor interface direction. window.document.dir = FCKLang.Dir ; </script> <script type="text/javascript"> window.onload = function() { InitializeAPI() ; if ( FCKBrowserInfo.IsIE ) FCK_PreloadImages() ; else LoadToolbarSetup() ; } function LoadToolbarSetup() { FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ; } function LoadToolbar() { var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ; if ( oToolbarSet.IsLoaded ) StartEditor() ; else { oToolbarSet.OnLoad = StartEditor ; oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ; } } function StartEditor() { // Remove the onload listener. FCK.ToolbarSet.OnLoad = null ; FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ; FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ; // Start the editor. FCK.StartEditor() ; } function WaitForActive( editorInstance, newStatus ) { if ( newStatus == FCK_STATUS_ACTIVE ) { if ( FCKBrowserInfo.IsGecko ) FCKTools.RunFunction( window.onresize ) ; if ( !FCKConfig.PreventSubmitHandler ) _AttachFormSubmitToAPI() ; FCK.SetStatus( FCK_STATUS_COMPLETE ) ; // Call the special "FCKeditor_OnComplete" function that should be present in // the HTML page where the editor is located. if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' ) window.parent.FCKeditor_OnComplete( FCK ) ; } } // Gecko and Webkit browsers don't calculate well the IFRAME size so we must // recalculate it every time the window size changes. if ( FCKBrowserInfo.IsGecko || ( FCKBrowserInfo.IsSafari && !FCKBrowserInfo.IsSafari3 ) ) { window.onresize = function( e ) { // Running in Firefox's chrome makes the window receive the event including subframes. // we care only about this window. Ticket #1642. // #2002: The originalTarget from the event can be the current document, the window, or the editing area. if ( e && e.originalTarget && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document )) return ; var oCell = document.getElementById( 'xEditingArea' ) ; var eInnerElement = oCell.firstChild ; if ( eInnerElement ) { eInnerElement.style.height = '0px' ; eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ; } } } </script> </head> <body> <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed"> <tr id="xToolbarRow" style="display: none"> <td id="xToolbarSpace" style="overflow: hidden"> <table width="100%" cellpadding="0" cellspacing="0"> <tr id="xCollapsed" style="display: none"> <td id="xExpandHandle" class="TB_Expand" colspan="3"> <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> </tr> <tr id="xExpanded" style="display: none"> <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td> <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom"> <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> <td id="xToolbar" class="TB_ToolbarSet"></td> <td class="TB_SideBorder" style="width: 1px"></td> </tr> </table> </td> </tr> <tr> <td id="xEditingArea" valign="top" style="height: 100%"></td> </tr> </table> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/fckeditor.html
HTML
asf20
12,508
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DTD Test Page</title> <script type="text/javascript"> // Define an object for this test page, so the assignment to FCK.DTD works var FCK = {} ; </script> <script type="text/javascript" src="../_source/internals/fcktools.js"></script> <script type="text/javascript" src="fck_xhtml10transitional.js"></script> </head> <body> <h1> DTD Contents </h1> <table border="1"> <script type="text/javascript"> for ( var p in FCK.DTD ) { document.write( '<tr><td><b>' + p + '</b></td><td>' ) ; var isFirst = true ; for ( var c in FCK.DTD[p] ) { if ( !isFirst ) document.write( ', ' ) ; isFirst = false ; document.write( c ) ; } document.write( '</td></tr>' ) ; } </script> </table> </body> </html>
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/dtd/fck_dtd_test.html
HTML
asf20
945
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Contains the DTD mapping for XHTML 1.0 Transitional. * This file was automatically generated from the file: xhtml10-transitional.dtd */ FCK.DTD = (function() { var X = FCKTools.Merge ; var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ; A = {isindex:1, fieldset:1} ; B = {input:1, button:1, select:1, textarea:1, label:1} ; C = X({a:1}, B) ; D = X({iframe:1}, C) ; E = {hr:1, ul:1, menu:1, div:1, blockquote:1, noscript:1, table:1, center:1, address:1, dir:1, pre:1, h5:1, dl:1, h4:1, noframes:1, h6:1, ol:1, h1:1, h3:1, h2:1} ; F = {ins:1, del:1, script:1} ; G = X({b:1, acronym:1, bdo:1, 'var':1, '#':1, abbr:1, code:1, br:1, i:1, cite:1, kbd:1, u:1, strike:1, s:1, tt:1, strong:1, q:1, samp:1, em:1, dfn:1, span:1}, F) ; H = X({sub:1, img:1, object:1, sup:1, basefont:1, map:1, applet:1, font:1, big:1, small:1}, G) ; I = X({p:1}, H) ; J = X({iframe:1}, H, B) ; K = {img:1, noscript:1, br:1, kbd:1, center:1, button:1, basefont:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, font:1, '#':1, select:1, menu:1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, iframe:1, strong:1, textarea:1, noframes:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, strike:1, dir:1, map:1, dl:1, applet:1, del:1, isindex:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, u:1, s:1, tt:1, address:1, q:1, pre:1, p:1, em:1, dfn:1} ; L = X({a:1}, J) ; M = {tr:1} ; N = {'#':1} ; O = X({param:1}, K) ; P = X({form:1}, A, D, E, I) ; Q = {li:1} ; return { col: {}, tr: {td:1, th:1}, img: {}, colgroup: {col:1}, noscript: P, td: P, br: {}, th: P, center: P, kbd: L, button: X(I, E), basefont: {}, h5: L, h4: L, samp: L, h6: L, ol: Q, h1: L, h3: L, option: N, h2: L, form: X(A, D, E, I), select: {optgroup:1, option:1}, font: J, // Changed from L to J (see (1)) ins: P, menu: Q, abbr: L, label: L, table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, code: L, script: N, tfoot: M, cite: L, li: P, input: {}, iframe: P, strong: J, // Changed from L to J (see (1)) textarea: N, noframes: P, big: J, // Changed from L to J (see (1)) small: J, // Changed from L to J (see (1)) span: J, // Changed from L to J (see (1)) hr: {}, dt: L, sub: J, // Changed from L to J (see (1)) optgroup: {option:1}, param: {}, bdo: L, 'var': J, // Changed from L to J (see (1)) div: P, object: O, sup: J, // Changed from L to J (see (1)) dd: P, strike: J, // Changed from L to J (see (1)) area: {}, dir: Q, map: X({area:1, form:1, p:1}, A, F, E), applet: O, dl: {dt:1, dd:1}, del: P, isindex: {}, fieldset: X({legend:1}, K), thead: M, ul: Q, acronym: L, b: J, // Changed from L to J (see (1)) a: J, blockquote: P, caption: L, i: J, // Changed from L to J (see (1)) u: J, // Changed from L to J (see (1)) tbody: M, s: L, address: X(D, I), tt: J, // Changed from L to J (see (1)) legend: L, q: L, pre: X(G, C), p: L, em: J, // Changed from L to J (see (1)) dfn: L } ; })() ; /* Notes: (1) According to the DTD, many elements, like <b> accept <a> elements inside of them. But, to produce better output results, we have manually changed the map to avoid breaking the links on pieces, having "<b>this is a </b><a><b>link</b> test</a>", instead of "<b>this is a <a>link</a></b><a> test</a>". */
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/dtd/fck_xhtml10transitional.js
JavaScript
asf20
4,757
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Contains the DTD mapping for XHTML 1.0 Strict. * This file was automatically generated from the file: xhtml10-strict.dtd */ FCK.DTD = (function() { var X = FCKTools.Merge ; var H,I,J,K,C,L,M,A,B,D,E,G,N,F ; A = {ins:1, del:1, script:1} ; B = {hr:1, ul:1, div:1, blockquote:1, noscript:1, table:1, address:1, pre:1, p:1, h5:1, dl:1, h4:1, ol:1, h6:1, h1:1, h3:1, h2:1} ; C = X({fieldset:1}, B) ; D = X({sub:1, bdo:1, 'var':1, sup:1, br:1, kbd:1, map:1, samp:1, b:1, acronym:1, '#':1, abbr:1, code:1, i:1, cite:1, tt:1, strong:1, q:1, em:1, big:1, small:1, span:1, dfn:1}, A) ; E = X({img:1, object:1}, D) ; F = {input:1, button:1, textarea:1, select:1, label:1} ; G = X({a:1}, F) ; H = {img:1, noscript:1, br:1, kbd:1, button:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, select:1, '#':1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, strong:1, textarea:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, map:1, dl:1, del:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, address:1, tt:1, q:1, pre:1, p:1, em:1, dfn:1} ; I = X({form:1, fieldset:1}, B, E, G) ; J = {tr:1} ; K = {'#':1} ; L = X(E, G) ; M = {li:1} ; N = X({form:1}, A, C) ; return { col: {}, tr: {td:1, th:1}, img: {}, colgroup: {col:1}, noscript: N, td: I, br: {}, th: I, kbd: L, button: X(B, E), h5: L, h4: L, samp: L, h6: L, ol: M, h1: L, h3: L, option: K, h2: L, form: X(A, C), select: {optgroup:1, option:1}, ins: I, abbr: L, label: L, code: L, table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, script: K, tfoot: J, cite: L, li: I, input: {}, strong: L, textarea: K, big: L, small: L, span: L, dt: L, hr: {}, sub: L, optgroup: {option:1}, bdo: L, param: {}, 'var': L, div: I, object: X({param:1}, H), sup: L, dd: I, area: {}, map: X({form:1, area:1}, A, C), dl: {dt:1, dd:1}, del: I, fieldset: X({legend:1}, H), thead: J, ul: M, acronym: L, b: L, a: X({img:1, object:1}, D, F), blockquote: N, caption: L, i: L, tbody: J, address: L, tt: L, legend: L, q: L, pre: X({a:1}, D, F), p: L, em: L, dfn: L } ; })() ;
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/dtd/fck_xhtml10strict.js
JavaScript
asf20
3,433
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Chinese Traditional language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "隱藏面板", ToolbarExpand : "顯示面板", // Toolbar Items and Context Menu Save : "儲存", NewPage : "開新檔案", Preview : "預覽", Cut : "剪下", Copy : "複製", Paste : "貼上", PasteText : "貼為純文字格式", PasteWord : "自 Word 貼上", Print : "列印", SelectAll : "全選", RemoveFormat : "清除格式", InsertLinkLbl : "超連結", InsertLink : "插入/編輯超連結", RemoveLink : "移除超連結", VisitLink : "開啟超連結", Anchor : "插入/編輯錨點", AnchorDelete : "移除錨點", InsertImageLbl : "影像", InsertImage : "插入/編輯影像", InsertFlashLbl : "Flash", InsertFlash : "插入/編輯 Flash", InsertTableLbl : "表格", InsertTable : "插入/編輯表格", InsertLineLbl : "水平線", InsertLine : "插入水平線", InsertSpecialCharLbl: "特殊符號", InsertSpecialChar : "插入特殊符號", InsertSmileyLbl : "表情符號", InsertSmiley : "插入表情符號", About : "關於 FCKeditor", Bold : "粗體", Italic : "斜體", Underline : "底線", StrikeThrough : "刪除線", Subscript : "下標", Superscript : "上標", LeftJustify : "靠左對齊", CenterJustify : "置中", RightJustify : "靠右對齊", BlockJustify : "左右對齊", DecreaseIndent : "減少縮排", IncreaseIndent : "增加縮排", Blockquote : "引用文字", CreateDiv : "新增 Div 標籤", EditDiv : "變更 Div 標籤", DeleteDiv : "移除 Div 標籤", Undo : "復原", Redo : "重複", NumberedListLbl : "編號清單", NumberedList : "插入/移除編號清單", BulletedListLbl : "項目清單", BulletedList : "插入/移除項目清單", ShowTableBorders : "顯示表格邊框", ShowDetails : "顯示詳細資料", Style : "樣式", FontFormat : "格式", Font : "字體", FontSize : "大小", TextColor : "文字顏色", BGColor : "背景顏色", Source : "原始碼", Find : "尋找", Replace : "取代", SpellCheck : "拼字檢查", UniversalKeyboard : "萬國鍵盤", PageBreakLbl : "分頁符號", PageBreak : "插入分頁符號", Form : "表單", Checkbox : "核取方塊", RadioButton : "選項按鈕", TextField : "文字方塊", Textarea : "文字區域", HiddenField : "隱藏欄位", Button : "按鈕", SelectionField : "清單/選單", ImageButton : "影像按鈕", FitWindow : "編輯器最大化", ShowBlocks : "顯示區塊", // Context Menu EditLink : "編輯超連結", CellCM : "儲存格", RowCM : "列", ColumnCM : "欄", InsertRowAfter : "向下插入列", InsertRowBefore : "向上插入列", DeleteRows : "刪除列", InsertColumnAfter : "向右插入欄", InsertColumnBefore : "向左插入欄", DeleteColumns : "刪除欄", InsertCellAfter : "向右插入儲存格", InsertCellBefore : "向左插入儲存格", DeleteCells : "刪除儲存格", MergeCells : "合併儲存格", MergeRight : "向右合併儲存格", MergeDown : "向下合併儲存格", HorizontalSplitCell : "橫向分割儲存格", VerticalSplitCell : "縱向分割儲存格", TableDelete : "刪除表格", CellProperties : "儲存格屬性", TableProperties : "表格屬性", ImageProperties : "影像屬性", FlashProperties : "Flash 屬性", AnchorProp : "錨點屬性", ButtonProp : "按鈕屬性", CheckboxProp : "核取方塊屬性", HiddenFieldProp : "隱藏欄位屬性", RadioButtonProp : "選項按鈕屬性", ImageButtonProp : "影像按鈕屬性", TextFieldProp : "文字方塊屬性", SelectionFieldProp : "清單/選單屬性", TextareaProp : "文字區域屬性", FormProp : "表單屬性", FontFormats : "一般;已格式化;位址;標題 1;標題 2;標題 3;標題 4;標題 5;標題 6;一般 (DIV)", // Alerts and Messages ProcessingXHTML : "處理 XHTML 中,請稍候…", Done : "完成", PasteWordConfirm : "您想貼上的文字似乎是自 Word 複製而來,請問您是否要先清除 Word 的格式後再行貼上?", NotCompatiblePaste : "此指令僅在 Internet Explorer 5.5 或以上的版本有效。請問您是否同意不清除格式即貼上?", UnknownToolbarItem : "未知工具列項目 \"%1\"", UnknownCommand : "未知指令名稱 \"%1\"", NotImplemented : "尚未安裝此指令", UnknownToolbarSet : "工具列設定 \"%1\" 不存在", NoActiveX : "瀏覽器的安全性設定限制了本編輯器的某些功能。您必須啟用安全性設定中的「執行ActiveX控制項與外掛程式」項目,否則本編輯器將會出現錯誤並缺少某些功能", BrowseServerBlocked : "無法開啟資源瀏覽器,請確定所有快顯視窗封鎖程式是否關閉", DialogBlocked : "無法開啟對話視窗,請確定所有快顯視窗封鎖程式是否關閉", VisitLinkBlocked : "無法開啟新視窗,請確定所有快顯視窗封鎖程式是否關閉", // Dialogs DlgBtnOK : "確定", DlgBtnCancel : "取消", DlgBtnClose : "關閉", DlgBtnBrowseServer : "瀏覽伺服器端", DlgAdvancedTag : "進階", DlgOpOther : "<其他>", DlgInfoTab : "資訊", DlgAlertUrl : "請插入 URL", // General Dialogs Labels DlgGenNotSet : "<尚未設定>", DlgGenId : "ID", DlgGenLangDir : "語言方向", DlgGenLangDirLtr : "由左而右 (LTR)", DlgGenLangDirRtl : "由右而左 (RTL)", DlgGenLangCode : "語言代碼", DlgGenAccessKey : "存取鍵", DlgGenName : "名稱", DlgGenTabIndex : "定位順序", DlgGenLongDescr : "詳細 URL", DlgGenClass : "樣式表類別", DlgGenTitle : "標題", DlgGenContType : "內容類型", DlgGenLinkCharset : "連結資源之編碼", DlgGenStyle : "樣式", // Image Dialog DlgImgTitle : "影像屬性", DlgImgInfoTab : "影像資訊", DlgImgBtnUpload : "上傳至伺服器", DlgImgURL : "URL", DlgImgUpload : "上傳", DlgImgAlt : "替代文字", DlgImgWidth : "寬度", DlgImgHeight : "高度", DlgImgLockRatio : "等比例", DlgBtnResetSize : "重設為原大小", DlgImgBorder : "邊框", DlgImgHSpace : "水平距離", DlgImgVSpace : "垂直距離", DlgImgAlign : "對齊", DlgImgAlignLeft : "靠左對齊", DlgImgAlignAbsBottom: "絕對下方", DlgImgAlignAbsMiddle: "絕對中間", DlgImgAlignBaseline : "基準線", DlgImgAlignBottom : "靠下對齊", DlgImgAlignMiddle : "置中對齊", DlgImgAlignRight : "靠右對齊", DlgImgAlignTextTop : "文字上方", DlgImgAlignTop : "靠上對齊", DlgImgPreview : "預覽", DlgImgAlertUrl : "請輸入影像 URL", DlgImgLinkTab : "超連結", // Flash Dialog DlgFlashTitle : "Flash 屬性", DlgFlashChkPlay : "自動播放", DlgFlashChkLoop : "重複", DlgFlashChkMenu : "開啟選單", DlgFlashScale : "縮放", DlgFlashScaleAll : "全部顯示", DlgFlashScaleNoBorder : "無邊框", DlgFlashScaleFit : "精確符合", // Link Dialog DlgLnkWindowTitle : "超連結", DlgLnkInfoTab : "超連結資訊", DlgLnkTargetTab : "目標", DlgLnkType : "超連接類型", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "本頁錨點", DlgLnkTypeEMail : "電子郵件", DlgLnkProto : "通訊協定", DlgLnkProtoOther : "<其他>", DlgLnkURL : "URL", DlgLnkAnchorSel : "請選擇錨點", DlgLnkAnchorByName : "依錨點名稱", DlgLnkAnchorById : "依元件 ID", DlgLnkNoAnchors : "(本文件尚無可用之錨點)", DlgLnkEMail : "電子郵件", DlgLnkEMailSubject : "郵件主旨", DlgLnkEMailBody : "郵件內容", DlgLnkUpload : "上傳", DlgLnkBtnUpload : "傳送至伺服器", DlgLnkTarget : "目標", DlgLnkTargetFrame : "<框架>", DlgLnkTargetPopup : "<快顯視窗>", DlgLnkTargetBlank : "新視窗 (_blank)", DlgLnkTargetParent : "父視窗 (_parent)", DlgLnkTargetSelf : "本視窗 (_self)", DlgLnkTargetTop : "最上層視窗 (_top)", DlgLnkTargetFrameName : "目標框架名稱", DlgLnkPopWinName : "快顯視窗名稱", DlgLnkPopWinFeat : "快顯視窗屬性", DlgLnkPopResize : "可調整大小", DlgLnkPopLocation : "網址列", DlgLnkPopMenu : "選單列", DlgLnkPopScroll : "捲軸", DlgLnkPopStatus : "狀態列", DlgLnkPopToolbar : "工具列", DlgLnkPopFullScrn : "全螢幕 (IE)", DlgLnkPopDependent : "從屬 (NS)", DlgLnkPopWidth : "寬", DlgLnkPopHeight : "高", DlgLnkPopLeft : "左", DlgLnkPopTop : "右", DlnLnkMsgNoUrl : "請輸入欲連結的 URL", DlnLnkMsgNoEMail : "請輸入電子郵件位址", DlnLnkMsgNoAnchor : "請選擇錨點", DlnLnkMsgInvPopName : "快顯名稱必須以「英文字母」為開頭,且不得含有空白", // Color Dialog DlgColorTitle : "請選擇顏色", DlgColorBtnClear : "清除", DlgColorHighlight : "預覽", DlgColorSelected : "選擇", // Smiley Dialog DlgSmileyTitle : "插入表情符號", // Special Character Dialog DlgSpecialCharTitle : "請選擇特殊符號", // Table Dialog DlgTableTitle : "表格屬性", DlgTableRows : "列數", DlgTableColumns : "欄數", DlgTableBorder : "邊框", DlgTableAlign : "對齊", DlgTableAlignNotSet : "<未設定>", DlgTableAlignLeft : "靠左對齊", DlgTableAlignCenter : "置中", DlgTableAlignRight : "靠右對齊", DlgTableWidth : "寬度", DlgTableWidthPx : "像素", DlgTableWidthPc : "百分比", DlgTableHeight : "高度", DlgTableCellSpace : "間距", DlgTableCellPad : "內距", DlgTableCaption : "標題", DlgTableSummary : "摘要", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "儲存格屬性", DlgCellWidth : "寬度", DlgCellWidthPx : "像素", DlgCellWidthPc : "百分比", DlgCellHeight : "高度", DlgCellWordWrap : "自動換行", DlgCellWordWrapNotSet : "<尚未設定>", DlgCellWordWrapYes : "是", DlgCellWordWrapNo : "否", DlgCellHorAlign : "水平對齊", DlgCellHorAlignNotSet : "<尚未設定>", DlgCellHorAlignLeft : "靠左對齊", DlgCellHorAlignCenter : "置中", DlgCellHorAlignRight: "靠右對齊", DlgCellVerAlign : "垂直對齊", DlgCellVerAlignNotSet : "<尚未設定>", DlgCellVerAlignTop : "靠上對齊", DlgCellVerAlignMiddle : "置中", DlgCellVerAlignBottom : "靠下對齊", DlgCellVerAlignBaseline : "基準線", DlgCellType : "儲存格類型", DlgCellTypeData : "資料", DlgCellTypeHeader : "標題", DlgCellRowSpan : "合併列數", DlgCellCollSpan : "合併欄数", DlgCellBackColor : "背景顏色", DlgCellBorderColor : "邊框顏色", DlgCellBtnSelect : "請選擇…", // Find and Replace Dialog DlgFindAndReplaceTitle : "尋找與取代", // Find Dialog DlgFindTitle : "尋找", DlgFindFindBtn : "尋找", DlgFindNotFoundMsg : "未找到指定的文字。", // Replace Dialog DlgReplaceTitle : "取代", DlgReplaceFindLbl : "尋找:", DlgReplaceReplaceLbl : "取代:", DlgReplaceCaseChk : "大小寫須相符", DlgReplaceReplaceBtn : "取代", DlgReplaceReplAllBtn : "全部取代", DlgReplaceWordChk : "全字相符", // Paste Operations / Dialog PasteErrorCut : "瀏覽器的安全性設定不允許編輯器自動執行剪下動作。請使用快捷鍵 (Ctrl+X) 剪下。", PasteErrorCopy : "瀏覽器的安全性設定不允許編輯器自動執行複製動作。請使用快捷鍵 (Ctrl+C) 複製。", PasteAsText : "貼為純文字格式", PasteFromWord : "自 Word 貼上", DlgPasteMsg2 : "請使用快捷鍵 (<strong>Ctrl+V</strong>) 貼到下方區域中並按下 <strong>確定</strong>", DlgPasteSec : "因為瀏覽器的安全性設定,本編輯器無法直接存取您的剪貼簿資料,請您自行在本視窗進行貼上動作。", DlgPasteIgnoreFont : "移除字型設定", DlgPasteRemoveStyles : "移除樣式設定", // Color Picker ColorAutomatic : "自動", ColorMoreColors : "更多顏色…", // Document Properties DocProps : "文件屬性", // Anchor Dialog DlgAnchorTitle : "命名錨點", DlgAnchorName : "錨點名稱", DlgAnchorErrorName : "請輸入錨點名稱", // Speller Pages Dialog DlgSpellNotInDic : "不在字典中", DlgSpellChangeTo : "更改為", DlgSpellBtnIgnore : "忽略", DlgSpellBtnIgnoreAll : "全部忽略", DlgSpellBtnReplace : "取代", DlgSpellBtnReplaceAll : "全部取代", DlgSpellBtnUndo : "復原", DlgSpellNoSuggestions : "- 無建議值 -", DlgSpellProgress : "進行拼字檢查中…", DlgSpellNoMispell : "拼字檢查完成:未發現拼字錯誤", DlgSpellNoChanges : "拼字檢查完成:未更改任何單字", DlgSpellOneChange : "拼字檢查完成:更改了 1 個單字", DlgSpellManyChanges : "拼字檢查完成:更改了 %1 個單字", IeSpellDownload : "尚未安裝拼字檢查元件。您是否想要現在下載?", // Button Dialog DlgButtonText : "顯示文字 (值)", DlgButtonType : "類型", DlgButtonTypeBtn : "按鈕 (Button)", DlgButtonTypeSbm : "送出 (Submit)", DlgButtonTypeRst : "重設 (Reset)", // Checkbox and Radio Button Dialogs DlgCheckboxName : "名稱", DlgCheckboxValue : "選取值", DlgCheckboxSelected : "已選取", // Form Dialog DlgFormName : "名稱", DlgFormAction : "動作", DlgFormMethod : "方法", // Select Field Dialog DlgSelectName : "名稱", DlgSelectValue : "選取值", DlgSelectSize : "大小", DlgSelectLines : "行", DlgSelectChkMulti : "可多選", DlgSelectOpAvail : "可用選項", DlgSelectOpText : "顯示文字", DlgSelectOpValue : "值", DlgSelectBtnAdd : "新增", DlgSelectBtnModify : "修改", DlgSelectBtnUp : "上移", DlgSelectBtnDown : "下移", DlgSelectBtnSetValue : "設為預設值", DlgSelectBtnDelete : "刪除", // Textarea Dialog DlgTextareaName : "名稱", DlgTextareaCols : "字元寬度", DlgTextareaRows : "列數", // Text Field Dialog DlgTextName : "名稱", DlgTextValue : "值", DlgTextCharWidth : "字元寬度", DlgTextMaxChars : "最多字元數", DlgTextType : "類型", DlgTextTypeText : "文字", DlgTextTypePass : "密碼", // Hidden Field Dialog DlgHiddenName : "名稱", DlgHiddenValue : "值", // Bulleted List Dialog BulletedListProp : "項目清單屬性", NumberedListProp : "編號清單屬性", DlgLstStart : "起始編號", DlgLstType : "清單類型", DlgLstTypeCircle : "圓圈", DlgLstTypeDisc : "圓點", DlgLstTypeSquare : "方塊", DlgLstTypeNumbers : "數字 (1, 2, 3)", DlgLstTypeLCase : "小寫字母 (a, b, c)", DlgLstTypeUCase : "大寫字母 (A, B, C)", DlgLstTypeSRoman : "小寫羅馬數字 (i, ii, iii)", DlgLstTypeLRoman : "大寫羅馬數字 (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "一般", DlgDocBackTab : "背景", DlgDocColorsTab : "顯色與邊界", DlgDocMetaTab : "Meta 資料", DlgDocPageTitle : "頁面標題", DlgDocLangDir : "語言方向", DlgDocLangDirLTR : "由左而右 (LTR)", DlgDocLangDirRTL : "由右而左 (RTL)", DlgDocLangCode : "語言代碼", DlgDocCharSet : "字元編碼", DlgDocCharSetCE : "中歐語系", DlgDocCharSetCT : "正體中文 (Big5)", DlgDocCharSetCR : "斯拉夫文", DlgDocCharSetGR : "希臘文", DlgDocCharSetJP : "日文", DlgDocCharSetKR : "韓文", DlgDocCharSetTR : "土耳其文", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "西歐語系", DlgDocCharSetOther : "其他字元編碼", DlgDocDocType : "文件類型", DlgDocDocTypeOther : "其他文件類型", DlgDocIncXHTML : "包含 XHTML 定義", DlgDocBgColor : "背景顏色", DlgDocBgImage : "背景影像", DlgDocBgNoScroll : "浮水印", DlgDocCText : "文字", DlgDocCLink : "超連結", DlgDocCVisited : "已瀏覽過的超連結", DlgDocCActive : "作用中的超連結", DlgDocMargins : "頁面邊界", DlgDocMaTop : "上", DlgDocMaLeft : "左", DlgDocMaRight : "右", DlgDocMaBottom : "下", DlgDocMeIndex : "文件索引關鍵字 (用半形逗號[,]分隔)", DlgDocMeDescr : "文件說明", DlgDocMeAuthor : "作者", DlgDocMeCopy : "版權所有", DlgDocPreview : "預覽", // Templates Dialog Templates : "樣版", DlgTemplatesTitle : "內容樣版", DlgTemplatesSelMsg : "請選擇欲開啟的樣版<br> (原有的內容將會被清除):", DlgTemplatesLoading : "讀取樣版清單中,請稍候…", DlgTemplatesNoTpl : "(無樣版)", DlgTemplatesReplace : "取代原有內容", // About Dialog DlgAboutAboutTab : "關於", DlgAboutBrowserInfoTab : "瀏覽器資訊", DlgAboutLicenseTab : "許可證", DlgAboutVersion : "版本", DlgAboutInfo : "想獲得更多資訊請至 ", // Div Dialog DlgDivGeneralTab : "一般", DlgDivAdvancedTab : "進階", DlgDivStyle : "樣式", DlgDivInlineStyle : "CSS 樣式", ScaytTitle : "SCAYT", //MISSING ScaytTitleOptions : "Options", //MISSING ScaytTitleLangs : "Languages", //MISSING ScaytTitleAbout : "About" //MISSING };
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/lang/zh.js
JavaScript
asf20
17,920
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Malay language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Collapse Toolbar", ToolbarExpand : "Expand Toolbar", // Toolbar Items and Context Menu Save : "Simpan", NewPage : "Helaian Baru", Preview : "Prebiu", Cut : "Potong", Copy : "Salin", Paste : "Tampal", PasteText : "Tampal sebagai Text Biasa", PasteWord : "Tampal dari Word", Print : "Cetak", SelectAll : "Pilih Semua", RemoveFormat : "Buang Format", InsertLinkLbl : "Sambungan", InsertLink : "Masukkan/Sunting Sambungan", RemoveLink : "Buang Sambungan", VisitLink : "Open Link", //MISSING Anchor : "Masukkan/Sunting Pautan", AnchorDelete : "Remove Anchor", //MISSING InsertImageLbl : "Gambar", InsertImage : "Masukkan/Sunting Gambar", InsertFlashLbl : "Flash", //MISSING InsertFlash : "Insert/Edit Flash", //MISSING InsertTableLbl : "Jadual", InsertTable : "Masukkan/Sunting Jadual", InsertLineLbl : "Garisan", InsertLine : "Masukkan Garisan Membujur", InsertSpecialCharLbl: "Huruf Istimewa", InsertSpecialChar : "Masukkan Huruf Istimewa", InsertSmileyLbl : "Smiley", InsertSmiley : "Masukkan Smiley", About : "Tentang FCKeditor", Bold : "Bold", Italic : "Italic", Underline : "Underline", StrikeThrough : "Strike Through", Subscript : "Subscript", Superscript : "Superscript", LeftJustify : "Jajaran Kiri", CenterJustify : "Jajaran Tengah", RightJustify : "Jajaran Kanan", BlockJustify : "Jajaran Blok", DecreaseIndent : "Kurangkan Inden", IncreaseIndent : "Tambahkan Inden", Blockquote : "Blockquote", //MISSING CreateDiv : "Create Div Container", //MISSING EditDiv : "Edit Div Container", //MISSING DeleteDiv : "Remove Div Container", //MISSING Undo : "Batalkan", Redo : "Ulangkan", NumberedListLbl : "Senarai bernombor", NumberedList : "Masukkan/Sunting Senarai bernombor", BulletedListLbl : "Senarai tidak bernombor", BulletedList : "Masukkan/Sunting Senarai tidak bernombor", ShowTableBorders : "Tunjukkan Border Jadual", ShowDetails : "Tunjukkan Butiran", Style : "Stail", FontFormat : "Format", Font : "Font", FontSize : "Saiz", TextColor : "Warna Text", BGColor : "Warna Latarbelakang", Source : "Sumber", Find : "Cari", Replace : "Ganti", SpellCheck : "Semak Ejaan", UniversalKeyboard : "Papan Kekunci Universal", PageBreakLbl : "Page Break", //MISSING PageBreak : "Insert Page Break", //MISSING Form : "Borang", Checkbox : "Checkbox", RadioButton : "Butang Radio", TextField : "Text Field", Textarea : "Textarea", HiddenField : "Field Tersembunyi", Button : "Butang", SelectionField : "Field Pilihan", ImageButton : "Butang Bergambar", FitWindow : "Maximize the editor size", //MISSING ShowBlocks : "Show Blocks", //MISSING // Context Menu EditLink : "Sunting Sambungan", CellCM : "Cell", //MISSING RowCM : "Row", //MISSING ColumnCM : "Column", //MISSING InsertRowAfter : "Insert Row After", //MISSING InsertRowBefore : "Insert Row Before", //MISSING DeleteRows : "Buangkan Baris", InsertColumnAfter : "Insert Column After", //MISSING InsertColumnBefore : "Insert Column Before", //MISSING DeleteColumns : "Buangkan Lajur", InsertCellAfter : "Insert Cell After", //MISSING InsertCellBefore : "Insert Cell Before", //MISSING DeleteCells : "Buangkan Sel-sel", MergeCells : "Cantumkan Sel-sel", MergeRight : "Merge Right", //MISSING MergeDown : "Merge Down", //MISSING HorizontalSplitCell : "Split Cell Horizontally", //MISSING VerticalSplitCell : "Split Cell Vertically", //MISSING TableDelete : "Delete Table", //MISSING CellProperties : "Ciri-ciri Sel", TableProperties : "Ciri-ciri Jadual", ImageProperties : "Ciri-ciri Gambar", FlashProperties : "Flash Properties", //MISSING AnchorProp : "Ciri-ciri Pautan", ButtonProp : "Ciri-ciri Butang", CheckboxProp : "Ciri-ciri Checkbox", HiddenFieldProp : "Ciri-ciri Field Tersembunyi", RadioButtonProp : "Ciri-ciri Butang Radio", ImageButtonProp : "Ciri-ciri Butang Bergambar", TextFieldProp : "Ciri-ciri Text Field", SelectionFieldProp : "Ciri-ciri Selection Field", TextareaProp : "Ciri-ciri Textarea", FormProp : "Ciri-ciri Borang", FontFormats : "Normal;Telah Diformat;Alamat;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Perenggan (DIV)", // Alerts and Messages ProcessingXHTML : "Memproses XHTML. Sila tunggu...", Done : "Siap", PasteWordConfirm : "Text yang anda hendak tampal adalah berasal dari Word. Adakah anda mahu membuang semua format Word sebelum tampal ke dalam text?", NotCompatiblePaste : "Arahan ini bole dilakukan jika anda mempuunyai Internet Explorer version 5.5 atau yang lebih tinggi. Adakah anda hendak tampal text tanpa membuang format Word?", UnknownToolbarItem : "Toolbar item tidak diketahui\"%1\"", UnknownCommand : "Arahan tidak diketahui \"%1\"", NotImplemented : "Arahan tidak terdapat didalam sistem", UnknownToolbarSet : "Set toolbar \"%1\" tidak wujud", NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", //MISSING BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", //MISSING DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", //MISSING VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Batal", DlgBtnClose : "Tutup", DlgBtnBrowseServer : "Browse Server", DlgAdvancedTag : "Advanced", DlgOpOther : "<Lain-lain>", DlgInfoTab : "Info", //MISSING DlgAlertUrl : "Please insert the URL", //MISSING // General Dialogs Labels DlgGenNotSet : "<tidak di set>", DlgGenId : "Id", DlgGenLangDir : "Arah Tulisan", DlgGenLangDirLtr : "Kiri ke Kanan (LTR)", DlgGenLangDirRtl : "Kanan ke Kiri (RTL)", DlgGenLangCode : "Kod Bahasa", DlgGenAccessKey : "Kunci Akses", DlgGenName : "Nama", DlgGenTabIndex : "Indeks Tab ", DlgGenLongDescr : "Butiran Panjang URL", DlgGenClass : "Kelas-kelas Stylesheet", DlgGenTitle : "Tajuk Makluman", DlgGenContType : "Jenis Kandungan Makluman", DlgGenLinkCharset : "Linked Resource Charset", DlgGenStyle : "Stail", // Image Dialog DlgImgTitle : "Ciri-ciri Imej", DlgImgInfoTab : "Info Imej", DlgImgBtnUpload : "Hantar ke Server", DlgImgURL : "URL", DlgImgUpload : "Muat Naik", DlgImgAlt : "Text Alternatif", DlgImgWidth : "Lebar", DlgImgHeight : "Tinggi", DlgImgLockRatio : "Tetapkan Nisbah", DlgBtnResetSize : "Saiz Set Semula", DlgImgBorder : "Border", DlgImgHSpace : "Ruang Melintang", DlgImgVSpace : "Ruang Menegak", DlgImgAlign : "Jajaran", DlgImgAlignLeft : "Kiri", DlgImgAlignAbsBottom: "Bawah Mutlak", DlgImgAlignAbsMiddle: "Pertengahan Mutlak", DlgImgAlignBaseline : "Garis Dasar", DlgImgAlignBottom : "Bawah", DlgImgAlignMiddle : "Pertengahan", DlgImgAlignRight : "Kanan", DlgImgAlignTextTop : "Atas Text", DlgImgAlignTop : "Atas", DlgImgPreview : "Prebiu", DlgImgAlertUrl : "Sila taip URL untuk fail gambar", DlgImgLinkTab : "Sambungan", // Flash Dialog DlgFlashTitle : "Flash Properties", //MISSING DlgFlashChkPlay : "Auto Play", //MISSING DlgFlashChkLoop : "Loop", //MISSING DlgFlashChkMenu : "Enable Flash Menu", //MISSING DlgFlashScale : "Scale", //MISSING DlgFlashScaleAll : "Show all", //MISSING DlgFlashScaleNoBorder : "No Border", //MISSING DlgFlashScaleFit : "Exact Fit", //MISSING // Link Dialog DlgLnkWindowTitle : "Sambungan", DlgLnkInfoTab : "Butiran Sambungan", DlgLnkTargetTab : "Sasaran", DlgLnkType : "Jenis Sambungan", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Pautan dalam muka surat ini", DlgLnkTypeEMail : "E-Mail", DlgLnkProto : "Protokol", DlgLnkProtoOther : "<lain-lain>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Sila pilih pautan", DlgLnkAnchorByName : "dengan menggunakan nama pautan", DlgLnkAnchorById : "dengan menggunakan ID elemen", DlgLnkNoAnchors : "(Tiada pautan terdapat dalam dokumen ini)", DlgLnkEMail : "Alamat E-Mail", DlgLnkEMailSubject : "Subjek Mesej", DlgLnkEMailBody : "Isi Kandungan Mesej", DlgLnkUpload : "Muat Naik", DlgLnkBtnUpload : "Hantar ke Server", DlgLnkTarget : "Sasaran", DlgLnkTargetFrame : "<bingkai>", DlgLnkTargetPopup : "<tetingkap popup>", DlgLnkTargetBlank : "Tetingkap Baru (_blank)", DlgLnkTargetParent : "Tetingkap Parent (_parent)", DlgLnkTargetSelf : "Tetingkap yang Sama (_self)", DlgLnkTargetTop : "Tetingkap yang paling atas (_top)", DlgLnkTargetFrameName : "Nama Bingkai Sasaran", DlgLnkPopWinName : "Nama Tetingkap Popup", DlgLnkPopWinFeat : "Ciri Tetingkap Popup", DlgLnkPopResize : "Saiz bolehubah", DlgLnkPopLocation : "Bar Lokasi", DlgLnkPopMenu : "Bar Menu", DlgLnkPopScroll : "Bar-bar skrol", DlgLnkPopStatus : "Bar Status", DlgLnkPopToolbar : "Toolbar", DlgLnkPopFullScrn : "Skrin Penuh (IE)", DlgLnkPopDependent : "Bergantungan (Netscape)", DlgLnkPopWidth : "Lebar", DlgLnkPopHeight : "Tinggi", DlgLnkPopLeft : "Posisi Kiri", DlgLnkPopTop : "Posisi Atas", DlnLnkMsgNoUrl : "Sila taip sambungan URL", DlnLnkMsgNoEMail : "Sila taip alamat e-mail", DlnLnkMsgNoAnchor : "Sila pilih pautan berkenaaan", DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING // Color Dialog DlgColorTitle : "Pilihan Warna", DlgColorBtnClear : "Nyahwarna", DlgColorHighlight : "Terang", DlgColorSelected : "Dipilih", // Smiley Dialog DlgSmileyTitle : "Masukkan Smiley", // Special Character Dialog DlgSpecialCharTitle : "Sila pilih huruf istimewa", // Table Dialog DlgTableTitle : "Ciri-ciri Jadual", DlgTableRows : "Barisan", DlgTableColumns : "Jaluran", DlgTableBorder : "Saiz Border", DlgTableAlign : "Penjajaran", DlgTableAlignNotSet : "<Tidak diset>", DlgTableAlignLeft : "Kiri", DlgTableAlignCenter : "Tengah", DlgTableAlignRight : "Kanan", DlgTableWidth : "Lebar", DlgTableWidthPx : "piksel-piksel", DlgTableWidthPc : "peratus", DlgTableHeight : "Tinggi", DlgTableCellSpace : "Ruangan Antara Sel", DlgTableCellPad : "Tambahan Ruang Sel", DlgTableCaption : "Keterangan", DlgTableSummary : "Summary", //MISSING DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Ciri-ciri Sel", DlgCellWidth : "Lebar", DlgCellWidthPx : "piksel-piksel", DlgCellWidthPc : "peratus", DlgCellHeight : "Tinggi", DlgCellWordWrap : "Mengulung Perkataan", DlgCellWordWrapNotSet : "<Tidak diset>", DlgCellWordWrapYes : "Ya", DlgCellWordWrapNo : "Tidak", DlgCellHorAlign : "Jajaran Membujur", DlgCellHorAlignNotSet : "<Tidak diset>", DlgCellHorAlignLeft : "Kiri", DlgCellHorAlignCenter : "Tengah", DlgCellHorAlignRight: "Kanan", DlgCellVerAlign : "Jajaran Menegak", DlgCellVerAlignNotSet : "<Tidak diset>", DlgCellVerAlignTop : "Atas", DlgCellVerAlignMiddle : "Tengah", DlgCellVerAlignBottom : "Bawah", DlgCellVerAlignBaseline : "Garis Dasar", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Penggunaan Baris", DlgCellCollSpan : "Penggunaan Lajur", DlgCellBackColor : "Warna Latarbelakang", DlgCellBorderColor : "Warna Border", DlgCellBtnSelect : "Pilih...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Find and Replace", //MISSING // Find Dialog DlgFindTitle : "Carian", DlgFindFindBtn : "Cari", DlgFindNotFoundMsg : "Text yang dicari tidak dijumpai.", // Replace Dialog DlgReplaceTitle : "Gantian", DlgReplaceFindLbl : "Perkataan yang dicari:", DlgReplaceReplaceLbl : "Diganti dengan:", DlgReplaceCaseChk : "Padanan case huruf", DlgReplaceReplaceBtn : "Ganti", DlgReplaceReplAllBtn : "Ganti semua", DlgReplaceWordChk : "Padana Keseluruhan perkataan", // Paste Operations / Dialog PasteErrorCut : "Keselamatan perisian browser anda tidak membenarkan operasi suntingan text/imej. Sila gunakan papan kekunci (Ctrl+X).", PasteErrorCopy : "Keselamatan perisian browser anda tidak membenarkan operasi salinan text/imej. Sila gunakan papan kekunci (Ctrl+C).", PasteAsText : "Tampal sebagai text biasa", PasteFromWord : "Tampal dari perisian \"Word\"", DlgPasteMsg2 : "Please paste inside the following box using the keyboard (<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.", //MISSING DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING DlgPasteIgnoreFont : "Ignore Font Face definitions", //MISSING DlgPasteRemoveStyles : "Remove Styles definitions", //MISSING // Color Picker ColorAutomatic : "Otomatik", ColorMoreColors : "Warna lain-lain...", // Document Properties DocProps : "Ciri-ciri dokumen", // Anchor Dialog DlgAnchorTitle : "Ciri-ciri Pautan", DlgAnchorName : "Nama Pautan", DlgAnchorErrorName : "Sila taip nama pautan", // Speller Pages Dialog DlgSpellNotInDic : "Tidak terdapat didalam kamus", DlgSpellChangeTo : "Tukarkan kepada", DlgSpellBtnIgnore : "Biar", DlgSpellBtnIgnoreAll : "Biarkan semua", DlgSpellBtnReplace : "Ganti", DlgSpellBtnReplaceAll : "Gantikan Semua", DlgSpellBtnUndo : "Batalkan", DlgSpellNoSuggestions : "- Tiada cadangan -", DlgSpellProgress : "Pemeriksaan ejaan sedang diproses...", DlgSpellNoMispell : "Pemeriksaan ejaan siap: Tiada salah ejaan", DlgSpellNoChanges : "Pemeriksaan ejaan siap: Tiada perkataan diubah", DlgSpellOneChange : "Pemeriksaan ejaan siap: Satu perkataan telah diubah", DlgSpellManyChanges : "Pemeriksaan ejaan siap: %1 perkataan diubah", IeSpellDownload : "Pemeriksa ejaan tidak dipasang. Adakah anda mahu muat turun sekarang?", // Button Dialog DlgButtonText : "Teks (Nilai)", DlgButtonType : "Jenis", DlgButtonTypeBtn : "Button", //MISSING DlgButtonTypeSbm : "Submit", //MISSING DlgButtonTypeRst : "Reset", //MISSING // Checkbox and Radio Button Dialogs DlgCheckboxName : "Nama", DlgCheckboxValue : "Nilai", DlgCheckboxSelected : "Dipilih", // Form Dialog DlgFormName : "Nama", DlgFormAction : "Tindakan borang", DlgFormMethod : "Cara borang dihantar", // Select Field Dialog DlgSelectName : "Nama", DlgSelectValue : "Nilai", DlgSelectSize : "Saiz", DlgSelectLines : "garisan", DlgSelectChkMulti : "Benarkan pilihan pelbagai", DlgSelectOpAvail : "Pilihan sediada", DlgSelectOpText : "Teks", DlgSelectOpValue : "Nilai", DlgSelectBtnAdd : "Tambah Pilihan", DlgSelectBtnModify : "Ubah Pilihan", DlgSelectBtnUp : "Naik ke atas", DlgSelectBtnDown : "Turun ke bawah", DlgSelectBtnSetValue : "Set sebagai nilai terpilih", DlgSelectBtnDelete : "Padam", // Textarea Dialog DlgTextareaName : "Nama", DlgTextareaCols : "Lajur", DlgTextareaRows : "Baris", // Text Field Dialog DlgTextName : "Nama", DlgTextValue : "Nilai", DlgTextCharWidth : "Lebar isian", DlgTextMaxChars : "Isian Maksimum", DlgTextType : "Jenis", DlgTextTypeText : "Teks", DlgTextTypePass : "Kata Laluan", // Hidden Field Dialog DlgHiddenName : "Nama", DlgHiddenValue : "Nilai", // Bulleted List Dialog BulletedListProp : "Ciri-ciri senarai berpeluru", NumberedListProp : "Ciri-ciri senarai bernombor", DlgLstStart : "Start", //MISSING DlgLstType : "Jenis", DlgLstTypeCircle : "Circle", DlgLstTypeDisc : "Disc", //MISSING DlgLstTypeSquare : "Square", DlgLstTypeNumbers : "Nombor-nombor (1, 2, 3)", DlgLstTypeLCase : "Huruf-huruf kecil (a, b, c)", DlgLstTypeUCase : "Huruf-huruf besar (A, B, C)", DlgLstTypeSRoman : "Nombor Roman Kecil (i, ii, iii)", DlgLstTypeLRoman : "Nombor Roman Besar (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Umum", DlgDocBackTab : "Latarbelakang", DlgDocColorsTab : "Warna dan margin", DlgDocMetaTab : "Data Meta", DlgDocPageTitle : "Tajuk Muka Surat", DlgDocLangDir : "Arah Tulisan", DlgDocLangDirLTR : "Kiri ke Kanan (LTR)", DlgDocLangDirRTL : "Kanan ke Kiri (RTL)", DlgDocLangCode : "Kod Bahasa", DlgDocCharSet : "Enkod Set Huruf", DlgDocCharSetCE : "Central European", //MISSING DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING DlgDocCharSetCR : "Cyrillic", //MISSING DlgDocCharSetGR : "Greek", //MISSING DlgDocCharSetJP : "Japanese", //MISSING DlgDocCharSetKR : "Korean", //MISSING DlgDocCharSetTR : "Turkish", //MISSING DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING DlgDocCharSetWE : "Western European", //MISSING DlgDocCharSetOther : "Enkod Set Huruf yang Lain", DlgDocDocType : "Jenis Kepala Dokumen", DlgDocDocTypeOther : "Jenis Kepala Dokumen yang Lain", DlgDocIncXHTML : "Masukkan pemula kod XHTML", DlgDocBgColor : "Warna Latarbelakang", DlgDocBgImage : "URL Gambar Latarbelakang", DlgDocBgNoScroll : "Imej Latarbelakang tanpa Skrol", DlgDocCText : "Teks", DlgDocCLink : "Sambungan", DlgDocCVisited : "Sambungan telah Dilawati", DlgDocCActive : "Sambungan Aktif", DlgDocMargins : "Margin Muka Surat", DlgDocMaTop : "Atas", DlgDocMaLeft : "Kiri", DlgDocMaRight : "Kanan", DlgDocMaBottom : "Bawah", DlgDocMeIndex : "Kata Kunci Indeks Dokumen (dipisahkan oleh koma)", DlgDocMeDescr : "Keterangan Dokumen", DlgDocMeAuthor : "Penulis", DlgDocMeCopy : "Hakcipta", DlgDocPreview : "Prebiu", // Templates Dialog Templates : "Templat", DlgTemplatesTitle : "Templat Kandungan", DlgTemplatesSelMsg : "Sila pilih templat untuk dibuka oleh editor<br>(kandungan sebenar akan hilang):", DlgTemplatesLoading : "Senarai Templat sedang diproses. Sila Tunggu...", DlgTemplatesNoTpl : "(Tiada Templat Disimpan)", DlgTemplatesReplace : "Replace actual contents", //MISSING // About Dialog DlgAboutAboutTab : "Tentang", DlgAboutBrowserInfoTab : "Maklumat Perisian Browser", DlgAboutLicenseTab : "License", //MISSING DlgAboutVersion : "versi", DlgAboutInfo : "Untuk maklumat lanjut sila pergi ke", // Div Dialog DlgDivGeneralTab : "General", //MISSING DlgDivAdvancedTab : "Advanced", //MISSING DlgDivStyle : "Style", //MISSING DlgDivInlineStyle : "Inline Style", //MISSING ScaytTitle : "SCAYT", //MISSING ScaytTitleOptions : "Options", //MISSING ScaytTitleLangs : "Languages", //MISSING ScaytTitleAbout : "About" //MISSING };
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/lang/ms.js
JavaScript
asf20
19,492
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Khmer language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "បង្រួមរបាឧបរកណ៍", ToolbarExpand : "ពង្រីករបាឧបរណ៍", // Toolbar Items and Context Menu Save : "រក្សាទុក", NewPage : "ទំព័រថ្មី", Preview : "មើលសាកល្បង", Cut : "កាត់យក", Copy : "ចំលងយក", Paste : "ចំលងដាក់", PasteText : "ចំលងដាក់ជាអត្ថបទធម្មតា", PasteWord : "ចំលងដាក់ពី Word", Print : "បោះពុម្ភ", SelectAll : "ជ្រើសរើសទាំងអស់", RemoveFormat : "លប់ចោល ការរចនា", InsertLinkLbl : "ឈ្នាប់", InsertLink : "បន្ថែម/កែប្រែ ឈ្នាប់", RemoveLink : "លប់ឈ្នាប់", VisitLink : "Open Link", //MISSING Anchor : "បន្ថែម/កែប្រែ យុថ្កា", AnchorDelete : "Remove Anchor", //MISSING InsertImageLbl : "រូបភាព", InsertImage : "បន្ថែម/កែប្រែ រូបភាព", InsertFlashLbl : "Flash", InsertFlash : "បន្ថែម/កែប្រែ Flash", InsertTableLbl : "តារាង", InsertTable : "បន្ថែម/កែប្រែ តារាង", InsertLineLbl : "បន្ទាត់", InsertLine : "បន្ថែមបន្ទាត់ផ្តេក", InsertSpecialCharLbl: "អក្សរពិសេស", InsertSpecialChar : "បន្ថែមអក្សរពិសេស", InsertSmileyLbl : "រូបភាព", InsertSmiley : "បន្ថែម រូបភាព", About : "អំពី FCKeditor", Bold : "អក្សរដិតធំ", Italic : "អក្សរផ្តេក", Underline : "ដិតបន្ទាត់ពីក្រោមអក្សរ", StrikeThrough : "ដិតបន្ទាត់ពាក់កណ្តាលអក្សរ", Subscript : "អក្សរតូចក្រោម", Superscript : "អក្សរតូចលើ", LeftJustify : "តំរឹមឆ្វេង", CenterJustify : "តំរឹមកណ្តាល", RightJustify : "តំរឹមស្តាំ", BlockJustify : "តំរឹមសងខាង", DecreaseIndent : "បន្ថយការចូលបន្ទាត់", IncreaseIndent : "បន្ថែមការចូលបន្ទាត់", Blockquote : "Blockquote", //MISSING CreateDiv : "Create Div Container", //MISSING EditDiv : "Edit Div Container", //MISSING DeleteDiv : "Remove Div Container", //MISSING Undo : "សារឡើងវិញ", Redo : "ធ្វើឡើងវិញ", NumberedListLbl : "បញ្ជីជាអក្សរ", NumberedList : "បន្ថែម/លប់ បញ្ជីជាអក្សរ", BulletedListLbl : "បញ្ជីជារង្វង់មូល", BulletedList : "បន្ថែម/លប់ បញ្ជីជារង្វង់មូល", ShowTableBorders : "បង្ហាញស៊ុមតារាង", ShowDetails : "បង្ហាញពិស្តារ", Style : "ម៉ូត", FontFormat : "រចនា", Font : "ហ្វុង", FontSize : "ទំហំ", TextColor : "ពណ៌អក្សរ", BGColor : "ពណ៌ផ្ទៃខាងក្រោយ", Source : "កូត", Find : "ស្វែងរក", Replace : "ជំនួស", SpellCheck : "ពិនិត្យអក្ខរាវិរុទ្ធ", UniversalKeyboard : "ក្តារពុម្ភអក្សរសកល", PageBreakLbl : "ការផ្តាច់ទំព័រ", PageBreak : "បន្ថែម ការផ្តាច់ទំព័រ", Form : "បែបបទ", Checkbox : "ប្រអប់ជ្រើសរើស", RadioButton : "ប៉ូតុនរង្វង់មូល", TextField : "ជួរសរសេរអត្ថបទ", Textarea : "តំបន់សរសេរអត្ថបទ", HiddenField : "ជួរលាក់", Button : "ប៉ូតុន", SelectionField : "ជួរជ្រើសរើស", ImageButton : "ប៉ូតុនរូបភាព", FitWindow : "Maximize the editor size", //MISSING ShowBlocks : "Show Blocks", //MISSING // Context Menu EditLink : "កែប្រែឈ្នាប់", CellCM : "Cell", //MISSING RowCM : "Row", //MISSING ColumnCM : "Column", //MISSING InsertRowAfter : "Insert Row After", //MISSING InsertRowBefore : "Insert Row Before", //MISSING DeleteRows : "លប់ជួរផ្តេក", InsertColumnAfter : "Insert Column After", //MISSING InsertColumnBefore : "Insert Column Before", //MISSING DeleteColumns : "លប់ជួរឈរ", InsertCellAfter : "Insert Cell After", //MISSING InsertCellBefore : "Insert Cell Before", //MISSING DeleteCells : "លប់សែល", MergeCells : "បញ្ជូលសែល", MergeRight : "Merge Right", //MISSING MergeDown : "Merge Down", //MISSING HorizontalSplitCell : "Split Cell Horizontally", //MISSING VerticalSplitCell : "Split Cell Vertically", //MISSING TableDelete : "លប់តារាង", CellProperties : "ការកំណត់សែល", TableProperties : "ការកំណត់តារាង", ImageProperties : "ការកំណត់រូបភាព", FlashProperties : "ការកំណត់ Flash", AnchorProp : "ការកំណត់យុថ្កា", ButtonProp : "ការកំណត់ ប៉ូតុន", CheckboxProp : "ការកំណត់ប្រអប់ជ្រើសរើស", HiddenFieldProp : "ការកំណត់ជួរលាក់", RadioButtonProp : "ការកំណត់ប៉ូតុនរង្វង់", ImageButtonProp : "ការកំណត់ប៉ូតុនរូបភាព", TextFieldProp : "ការកំណត់ជួរអត្ថបទ", SelectionFieldProp : "ការកំណត់ជួរជ្រើសរើស", TextareaProp : "ការកំណត់កន្លែងសរសេរអត្ថបទ", FormProp : "ការកំណត់បែបបទ", FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", // Alerts and Messages ProcessingXHTML : "កំពុងដំណើរការ XHTML ។ សូមរងចាំ...", Done : "ចប់រួចរាល់", PasteWordConfirm : "អត្ថបទដែលលោកអ្នកបំរុងចំលងដាក់ ហាក់បីដូចជាត្រូវចំលងមកពីកម្មវិធី​Word​។ តើលោកអ្នកចង់សំអាតមុនចំលងអត្ថបទដាក់ទេ?", NotCompatiblePaste : "ពាក្យបញ្ជានេះប្រើបានតែជាមួយ Internet Explorer កំរិត 5.5 រឺ លើសនេះ ។ តើលោកអ្នកចង់ចំលងដាក់ដោយមិនចាំបាច់សំអាតទេ?", UnknownToolbarItem : "វត្ថុលើរបាឧបរកណ៍ មិនស្គាល់ \"%1\"", UnknownCommand : "ឈ្មោះពាក្យបញ្ជា មិនស្គាល់ \"%1\"", NotImplemented : "ពាក្យបញ្ជា មិនបានអនុវត្ត", UnknownToolbarSet : "របាឧបរកណ៍ \"%1\" ពុំមាន ។", NoActiveX : "ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះ​អាចធ្វើអោយលោកអ្នកមិនអាចប្រើមុខងារខ្លះរបស់កម្មវិធីតាក់តែងអត្ថបទនេះ ។ លោកអ្នកត្រូវកំណត់អោយ \"ActiveX និង​កម្មវិធីជំនួយក្នុង (plug-ins)\" អោយដំណើរការ ។ លោកអ្នកអាចជួបប្រទះនឹង បញ្ហា ព្រមជាមួយនឹងការបាត់បង់មុខងារណាមួយរបស់កម្មវិធីតាក់តែងអត្ថបទនេះ ។", BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", //MISSING DialogBlocked : "វីនដូវមិនអាចបើកបានទេ ។ សូមពិនិត្យចំពោះកម្មវិធីបិទ វីនដូវលោត (popup) ថាតើវាដំណើរការរឺទេ ។", VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "យល់ព្រម", DlgBtnCancel : "មិនយល់ព្រម", DlgBtnClose : "បិទ", DlgBtnBrowseServer : "មើល", DlgAdvancedTag : "កំរិតខ្ពស់", DlgOpOther : "<ផ្សេងទៅត>", DlgInfoTab : "ពត៌មាន", DlgAlertUrl : "សូមសរសេរ URL", // General Dialogs Labels DlgGenNotSet : "<មិនមែន>", DlgGenId : "Id", DlgGenLangDir : "ទិសដៅភាសា", DlgGenLangDirLtr : "ពីឆ្វេងទៅស្តាំ(LTR)", DlgGenLangDirRtl : "ពីស្តាំទៅឆ្វេង(RTL)", DlgGenLangCode : "លេខកូតភាសា", DlgGenAccessKey : "ឃី សំរាប់ចូល", DlgGenName : "ឈ្មោះ", DlgGenTabIndex : "លេខ Tab", DlgGenLongDescr : "អធិប្បាយ URL វែង", DlgGenClass : "Stylesheet Classes", DlgGenTitle : "ចំណងជើង ប្រឹក្សា", DlgGenContType : "ប្រភេទអត្ថបទ ប្រឹក្សា", DlgGenLinkCharset : "លេខកូតអក្សររបស់ឈ្នាប់", DlgGenStyle : "ម៉ូត", // Image Dialog DlgImgTitle : "ការកំណត់រូបភាព", DlgImgInfoTab : "ពត៌មានអំពីរូបភាព", DlgImgBtnUpload : "បញ្ជូនទៅកាន់ម៉ាស៊ីនផ្តល់សេវា", DlgImgURL : "URL", DlgImgUpload : "ទាញយក", DlgImgAlt : "អត្ថបទជំនួស", DlgImgWidth : "ទទឹង", DlgImgHeight : "កំពស់", DlgImgLockRatio : "អត្រាឡុក", DlgBtnResetSize : "កំណត់ទំហំឡើងវិញ", DlgImgBorder : "ស៊ុម", DlgImgHSpace : "គំលាតទទឹង", DlgImgVSpace : "គំលាតបណ្តោយ", DlgImgAlign : "កំណត់ទីតាំង", DlgImgAlignLeft : "ខាងឆ្វង", DlgImgAlignAbsBottom: "Abs Bottom", //MISSING DlgImgAlignAbsMiddle: "Abs Middle", //MISSING DlgImgAlignBaseline : "បន្ទាត់ជាមូលដ្ឋាន", DlgImgAlignBottom : "ខាងក្រោម", DlgImgAlignMiddle : "កណ្តាល", DlgImgAlignRight : "ខាងស្តាំ", DlgImgAlignTextTop : "លើអត្ថបទ", DlgImgAlignTop : "ខាងលើ", DlgImgPreview : "មើលសាកល្បង", DlgImgAlertUrl : "សូមសរសេរងាស័យដ្ឋានរបស់រូបភាព", DlgImgLinkTab : "ឈ្នាប់", // Flash Dialog DlgFlashTitle : "ការកំណត់ Flash", DlgFlashChkPlay : "លេងដោយស្វ័យប្រវត្ត", DlgFlashChkLoop : "ចំនួនដង", DlgFlashChkMenu : "បង្ហាញ មឺនុយរបស់ Flash", DlgFlashScale : "ទំហំ", DlgFlashScaleAll : "បង្ហាញទាំងអស់", DlgFlashScaleNoBorder : "មិនបង្ហាញស៊ុម", DlgFlashScaleFit : "ត្រូវល្មម", // Link Dialog DlgLnkWindowTitle : "ឈ្នាប់", DlgLnkInfoTab : "ពត៌មានអំពីឈ្នាប់", DlgLnkTargetTab : "គោលដៅ", DlgLnkType : "ប្រភេទឈ្នាប់", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "យុថ្កានៅក្នុងទំព័រនេះ", DlgLnkTypeEMail : "អ៊ីមែល", DlgLnkProto : "ប្រូតូកូល", DlgLnkProtoOther : "<ផ្សេងទៀត>", DlgLnkURL : "URL", DlgLnkAnchorSel : "ជ្រើសរើសយុថ្កា", DlgLnkAnchorByName : "តាមឈ្មោះរបស់យុថ្កា", DlgLnkAnchorById : "តាម Id", DlgLnkNoAnchors : "(No anchors available in the document)", //MISSING DlgLnkEMail : "អ៊ីមែល", DlgLnkEMailSubject : "ចំណងជើងអត្ថបទ", DlgLnkEMailBody : "អត្ថបទ", DlgLnkUpload : "ទាញយក", DlgLnkBtnUpload : "ទាញយក", DlgLnkTarget : "គោលដៅ", DlgLnkTargetFrame : "<ហ្វ្រេម>", DlgLnkTargetPopup : "<វីនដូវ លោត>", DlgLnkTargetBlank : "វីនដូវថ្មី (_blank)", DlgLnkTargetParent : "វីនដូវមេ (_parent)", DlgLnkTargetSelf : "វីនដូវដដែល (_self)", DlgLnkTargetTop : "វីនដូវនៅលើគេ(_top)", DlgLnkTargetFrameName : "ឈ្មោះហ្រ្វេមដែលជាគោលដៅ", DlgLnkPopWinName : "ឈ្មោះវីនដូវលោត", DlgLnkPopWinFeat : "លក្ខណះរបស់វីនដូលលោត", DlgLnkPopResize : "ទំហំអាចផ្លាស់ប្តូរ", DlgLnkPopLocation : "របា ទីតាំង", DlgLnkPopMenu : "របា មឺនុយ", DlgLnkPopScroll : "របា ទាញ", DlgLnkPopStatus : "របា ពត៌មាន", DlgLnkPopToolbar : "របា ឩបករណ៍", DlgLnkPopFullScrn : "អេក្រុងពេញ(IE)", DlgLnkPopDependent : "អាស្រ័យលើ (Netscape)", DlgLnkPopWidth : "ទទឹង", DlgLnkPopHeight : "កំពស់", DlgLnkPopLeft : "ទីតាំងខាងឆ្វេង", DlgLnkPopTop : "ទីតាំងខាងលើ", DlnLnkMsgNoUrl : "សូមសរសេរ អាស័យដ្ឋាន URL", DlnLnkMsgNoEMail : "សូមសរសេរ អាស័យដ្ឋាន អ៊ីមែល", DlnLnkMsgNoAnchor : "សូមជ្រើសរើស យុថ្កា", DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING // Color Dialog DlgColorTitle : "ជ្រើសរើស ពណ៌", DlgColorBtnClear : "លប់", DlgColorHighlight : "ផាត់ពណ៌", DlgColorSelected : "បានជ្រើសរើស", // Smiley Dialog DlgSmileyTitle : "បញ្ជូលរូបភាព", // Special Character Dialog DlgSpecialCharTitle : "តូអក្សរពិសេស", // Table Dialog DlgTableTitle : "ការកំណត់ តារាង", DlgTableRows : "ជួរផ្តេក", DlgTableColumns : "ជួរឈរ", DlgTableBorder : "ទំហំស៊ុម", DlgTableAlign : "ការកំណត់ទីតាំង", DlgTableAlignNotSet : "<មិនកំណត់>", DlgTableAlignLeft : "ខាងឆ្វេង", DlgTableAlignCenter : "កណ្តាល", DlgTableAlignRight : "ខាងស្តាំ", DlgTableWidth : "ទទឹង", DlgTableWidthPx : "ភីកសែល", DlgTableWidthPc : "ភាគរយ", DlgTableHeight : "កំពស់", DlgTableCellSpace : "គំលាតសែល", DlgTableCellPad : "គែមសែល", DlgTableCaption : "ចំណងជើង", DlgTableSummary : "សេចក្តីសង្ខេប", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "ការកំណត់ សែល", DlgCellWidth : "ទទឹង", DlgCellWidthPx : "ភីកសែល", DlgCellWidthPc : "ភាគរយ", DlgCellHeight : "កំពស់", DlgCellWordWrap : "បង្ហាញអត្ថបទទាំងអស់", DlgCellWordWrapNotSet : "<មិនកំណត់>", DlgCellWordWrapYes : "បាទ(ចា)", DlgCellWordWrapNo : "ទេ", DlgCellHorAlign : "តំរឹមផ្តេក", DlgCellHorAlignNotSet : "<មិនកំណត់>", DlgCellHorAlignLeft : "ខាងឆ្វេង", DlgCellHorAlignCenter : "កណ្តាល", DlgCellHorAlignRight: "Right", //MISSING DlgCellVerAlign : "តំរឹមឈរ", DlgCellVerAlignNotSet : "<មិនកណត់>", DlgCellVerAlignTop : "ខាងលើ", DlgCellVerAlignMiddle : "កណ្តាល", DlgCellVerAlignBottom : "ខាងក្រោម", DlgCellVerAlignBaseline : "បន្ទាត់ជាមូលដ្ឋាន", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "បញ្ជូលជួរផ្តេក", DlgCellCollSpan : "បញ្ជូលជួរឈរ", DlgCellBackColor : "ពណ៌ផ្នែកខាងក្រោម", DlgCellBorderColor : "ពណ៌ស៊ុម", DlgCellBtnSelect : "ជ្រើសរើស...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Find and Replace", //MISSING // Find Dialog DlgFindTitle : "ស្វែងរក", DlgFindFindBtn : "ស្វែងរក", DlgFindNotFoundMsg : "ពាក្យនេះ រកមិនឃើញទេ ។", // Replace Dialog DlgReplaceTitle : "ជំនួស", DlgReplaceFindLbl : "ស្វែងរកអ្វី:", DlgReplaceReplaceLbl : "ជំនួសជាមួយ:", DlgReplaceCaseChk : "ករណ៉ត្រូវរក", DlgReplaceReplaceBtn : "ជំនួស", DlgReplaceReplAllBtn : "ជំនួសទាំងអស់", DlgReplaceWordChk : "ត្រូវពាក្យទាំងអស់", // Paste Operations / Dialog PasteErrorCut : "ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះ​មិនអាចធ្វើកម្មវិធីតាក់តែងអត្ថបទ កាត់អត្ថបទយកដោយស្វ័យប្រវត្តបានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនេះ (Ctrl+X) ។", PasteErrorCopy : "ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះ​មិនអាចធ្វើកម្មវិធីតាក់តែងអត្ថបទ ចំលងអត្ថបទយកដោយស្វ័យប្រវត្តបានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនេះ (Ctrl+C)។", PasteAsText : "ចំលងដាក់អត្ថបទធម្មតា", PasteFromWord : "ចំលងពាក្យពីកម្មវិធី Word", DlgPasteMsg2 : "សូមចំលងអត្ថបទទៅដាក់ក្នុងប្រអប់ដូចខាងក្រោមដោយប្រើប្រាស់ ឃី ​(<STRONG>Ctrl+V</STRONG>) ហើយចុច <STRONG>OK</STRONG> ។", DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING DlgPasteIgnoreFont : "មិនគិតអំពីប្រភេទពុម្ភអក្សរ", DlgPasteRemoveStyles : "លប់ម៉ូត", // Color Picker ColorAutomatic : "ស្វ័យប្រវត្ត", ColorMoreColors : "ពណ៌ផ្សេងទៀត..", // Document Properties DocProps : "ការកំណត់ ឯកសារ", // Anchor Dialog DlgAnchorTitle : "ការកំណត់ចំណងជើងយុទ្ធថ្កា", DlgAnchorName : "ឈ្មោះយុទ្ធថ្កា", DlgAnchorErrorName : "សូមសរសេរ ឈ្មោះយុទ្ធថ្កា", // Speller Pages Dialog DlgSpellNotInDic : "គ្មានក្នុងវចនានុក្រម", DlgSpellChangeTo : "ផ្លាស់ប្តូរទៅ", DlgSpellBtnIgnore : "មិនផ្លាស់ប្តូរ", DlgSpellBtnIgnoreAll : "មិនផ្លាស់ប្តូរ ទាំងអស់", DlgSpellBtnReplace : "ជំនួស", DlgSpellBtnReplaceAll : "ជំនួសទាំងអស់", DlgSpellBtnUndo : "សារឡើងវិញ", DlgSpellNoSuggestions : "- គ្មានសំណើរ -", DlgSpellProgress : "កំពុងពិនិត្យអក្ខរាវិរុទ្ធ...", DlgSpellNoMispell : "ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: គ្មានកំហុស", DlgSpellNoChanges : "ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: ពុំមានផ្លាស់ប្តូរ", DlgSpellOneChange : "ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: ពាក្យមួយត្រូចបានផ្លាស់ប្តូរ", DlgSpellManyChanges : "ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: %1 ពាក្យបានផ្លាស់ប្តូរ", IeSpellDownload : "ពុំមានកម្មវិធីពិនិត្យអក្ខរាវិរុទ្ធ ។ តើចង់ទាញយកពីណា?", // Button Dialog DlgButtonText : "អត្ថបទ(តំលៃ)", DlgButtonType : "ប្រភេទ", DlgButtonTypeBtn : "Button", //MISSING DlgButtonTypeSbm : "Submit", //MISSING DlgButtonTypeRst : "Reset", //MISSING // Checkbox and Radio Button Dialogs DlgCheckboxName : "ឈ្មោះ", DlgCheckboxValue : "តំលៃ", DlgCheckboxSelected : "បានជ្រើសរើស", // Form Dialog DlgFormName : "ឈ្មោះ", DlgFormAction : "សកម្មភាព", DlgFormMethod : "វិធី", // Select Field Dialog DlgSelectName : "ឈ្មោះ", DlgSelectValue : "តំលៃ", DlgSelectSize : "ទំហំ", DlgSelectLines : "បន្ទាត់", DlgSelectChkMulti : "អនុញ្ញាតអោយជ្រើសរើសច្រើន", DlgSelectOpAvail : "ការកំណត់ជ្រើសរើស ដែលអាចកំណត់បាន", DlgSelectOpText : "ពាក្យ", DlgSelectOpValue : "តំលៃ", DlgSelectBtnAdd : "បន្ថែម", DlgSelectBtnModify : "ផ្លាស់ប្តូរ", DlgSelectBtnUp : "លើ", DlgSelectBtnDown : "ក្រោម", DlgSelectBtnSetValue : "Set as selected value", //MISSING DlgSelectBtnDelete : "លប់", // Textarea Dialog DlgTextareaName : "ឈ្មោះ", DlgTextareaCols : "ជូរឈរ", DlgTextareaRows : "ជូរផ្តេក", // Text Field Dialog DlgTextName : "ឈ្មោះ", DlgTextValue : "តំលៃ", DlgTextCharWidth : "ទទឹង អក្សរ", DlgTextMaxChars : "អក្សរអតិបរិមា", DlgTextType : "ប្រភេទ", DlgTextTypeText : "ពាក្យ", DlgTextTypePass : "ពាក្យសំងាត់", // Hidden Field Dialog DlgHiddenName : "ឈ្មោះ", DlgHiddenValue : "តំលៃ", // Bulleted List Dialog BulletedListProp : "កំណត់បញ្ជីរង្វង់", NumberedListProp : "កំណត់បញ្េជីលេខ", DlgLstStart : "Start", //MISSING DlgLstType : "ប្រភេទ", DlgLstTypeCircle : "រង្វង់", DlgLstTypeDisc : "Disc", DlgLstTypeSquare : "ការេ", DlgLstTypeNumbers : "លេខ(1, 2, 3)", DlgLstTypeLCase : "អក្សរតូច(a, b, c)", DlgLstTypeUCase : "អក្សរធំ(A, B, C)", DlgLstTypeSRoman : "អក្សរឡាតាំងតូច(i, ii, iii)", DlgLstTypeLRoman : "អក្សរឡាតាំងធំ(I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "ទូទៅ", DlgDocBackTab : "ផ្នែកខាងក្រោយ", DlgDocColorsTab : "ទំព័រ​និង ស៊ុម", DlgDocMetaTab : "ទិន្នន័យមេ", DlgDocPageTitle : "ចំណងជើងទំព័រ", DlgDocLangDir : "ទិសដៅសរសេរភាសា", DlgDocLangDirLTR : "ពីឆ្វេងទៅស្ដាំ(LTR)", DlgDocLangDirRTL : "ពីស្ដាំទៅឆ្វេង(RTL)", DlgDocLangCode : "លេខកូតភាសា", DlgDocCharSet : "កំណត់លេខកូតភាសា", DlgDocCharSetCE : "Central European", //MISSING DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING DlgDocCharSetCR : "Cyrillic", //MISSING DlgDocCharSetGR : "Greek", //MISSING DlgDocCharSetJP : "Japanese", //MISSING DlgDocCharSetKR : "Korean", //MISSING DlgDocCharSetTR : "Turkish", //MISSING DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING DlgDocCharSetWE : "Western European", //MISSING DlgDocCharSetOther : "កំណត់លេខកូតភាសាផ្សេងទៀត", DlgDocDocType : "ប្រភេទក្បាលទំព័រ", DlgDocDocTypeOther : "ប្រភេទក្បាលទំព័រផ្សេងទៀត", DlgDocIncXHTML : "បញ្ជូល XHTML", DlgDocBgColor : "ពណ៌ខាងក្រោម", DlgDocBgImage : "URL របស់រូបភាពខាងក្រោម", DlgDocBgNoScroll : "ទំព័រក្រោមមិនប្តូរ", DlgDocCText : "អត្តបទ", DlgDocCLink : "ឈ្នាប់", DlgDocCVisited : "ឈ្នាប់មើលហើយ", DlgDocCActive : "ឈ្នាប់កំពុងមើល", DlgDocMargins : "ស៊ុមទំព័រ", DlgDocMaTop : "លើ", DlgDocMaLeft : "ឆ្វេង", DlgDocMaRight : "ស្ដាំ", DlgDocMaBottom : "ក្រោម", DlgDocMeIndex : "ពាក្យនៅក្នុងឯកសារ (ផ្តាច់ពីគ្នាដោយក្បៀស)", DlgDocMeDescr : "សេចក្តីអត្ថាធិប្បាយអំពីឯកសារ", DlgDocMeAuthor : "អ្នកនិពន្ធ", DlgDocMeCopy : "រក្សាសិទ្ធិ៏", DlgDocPreview : "មើលសាកល្បង", // Templates Dialog Templates : "ឯកសារគំរូ", DlgTemplatesTitle : "ឯកសារគំរូ របស់អត្ថន័យ", DlgTemplatesSelMsg : "សូមជ្រើសរើសឯកសារគំរូ ដើម្បីបើកនៅក្នុងកម្មវិធីតាក់តែងអត្ថបទ<br>(អត្ថបទនឹងបាត់បង់):", DlgTemplatesLoading : "កំពុងអានបញ្ជីឯកសារគំរូ ។ សូមរងចាំ...", DlgTemplatesNoTpl : "(ពុំមានឯកសារគំរូត្រូវបានកំណត់)", DlgTemplatesReplace : "Replace actual contents", //MISSING // About Dialog DlgAboutAboutTab : "អំពី", DlgAboutBrowserInfoTab : "ព៌តមានកម្មវិធីរុករក", DlgAboutLicenseTab : "License", //MISSING DlgAboutVersion : "ជំនាន់", DlgAboutInfo : "សំរាប់ព៌តមានផ្សេងទៀត សូមទាក់ទង", // Div Dialog DlgDivGeneralTab : "General", //MISSING DlgDivAdvancedTab : "Advanced", //MISSING DlgDivStyle : "Style", //MISSING DlgDivInlineStyle : "Inline Style", //MISSING ScaytTitle : "SCAYT", //MISSING ScaytTitleOptions : "Options", //MISSING ScaytTitleLangs : "Languages", //MISSING ScaytTitleAbout : "About" //MISSING };
123gohelmetsv2
trunk/admin/tools/fckeditor/editor/lang/km.js
JavaScript
asf20
28,920