[studentbooks15] r79 committed - Layout Changes: Added a footer, code for Left-side bar is now on separ...

0 views
Skip to first unread message

student...@googlecode.com

unread,
Dec 3, 2010, 10:11:04 PM12/3/10
to student...@googlegroups.com
Revision: 79
Author: sben...@fau.edu
Date: Fri Dec 3 19:06:02 2010
Log: Layout Changes: Added a footer, code for Left-side bar is now on
separate file. Search algorithms can now be partially filtered with the
category bar, but more fine-tuning is needed. TODO: Shopping cart, homepage.
http://code.google.com/p/studentbooks15/source/detail?r=79

Added:
/trunk/BookGet/Include/backend
/trunk/BookGet/Include/backend/AccountDB.php
/trunk/BookGet/Include/backend/Facebook.php
/trunk/BookGet/Include/backend/SearchEngine.php
/trunk/BookGet/Include/footer_bar.php
/trunk/BookGet/Include/header.html.scrap.php
/trunk/BookGet/Include/header.scrap.php
/trunk/BookGet/Include/jquery-1.4.4.js
/trunk/BookGet/Include/js
/trunk/BookGet/Include/js/jquery-1.4.4.js
/trunk/BookGet/Include/minicart.php
/trunk/BookGet/jcart
/trunk/BookGet/old
/trunk/BookGet/old/SearchISBN.php
/trunk/BookGet/old/indexmodifiedbydan.php
/trunk/BookGet/old/layout
/trunk/BookGet/old/layout/img
/trunk/BookGet/old/layout/img/box.jpg
/trunk/BookGet/old/layout/img/gift-card.jpg
/trunk/BookGet/old/layout/img/logo.gif
/trunk/BookGet/old/layout/img/logo_1.gif
/trunk/BookGet/old/layout/img/setting.png
/trunk/BookGet/old/layout/index.php
/trunk/BookGet/old/layout/registration.css
/trunk/BookGet/old/layout/registration.php
/trunk/BookGet/old/layout/search.css
/trunk/BookGet/old/layout/search.php
/trunk/BookGet/old/layout/style.css
/trunk/BookGet/old/layout/userpage.php
/trunk/BookGet/old/templates
/trunk/BookGet/old/templates/2.0
/trunk/BookGet/old/templates/2.0/example.html
/trunk/BookGet/old/templates/2.0/jquery-1.3.2.js
/trunk/BookGet/old/templates/2.0/links.xml
/trunk/BookGet/old/templates/2.0/xmenu.css
/trunk/BookGet/old/templates/2.0/xmenu.js
/trunk/BookGet/old/templates/Untitled-1.html
/trunk/BookGet/old/templates/Untitled-2.html
/trunk/BookGet/old/templates/Untitled-3.html
/trunk/BookGet/old/templates/Untitled-4.html
/trunk/BookGet/old/templates/layout.css
Deleted:
/trunk/BookGet/Include/AccountDB.php
/trunk/BookGet/Include/Facebook.php
/trunk/BookGet/Include/SearchISBN.php
/trunk/BookGet/Include/account_settings.php
/trunk/BookGet/indexmodifiedbydan.php
Modified:
/trunk/BookGet/Include/SearchEngine.php
/trunk/BookGet/Include/basic_style.php
/trunk/BookGet/Include/category_bar.php
/trunk/BookGet/Include/header_bar.php
/trunk/BookGet/book.php
/trunk/BookGet/index.php
/trunk/BookGet/login.php
/trunk/BookGet/registration.php
/trunk/BookGet/search.php
/trunk/BookGet/style/layout.css

=======================================
--- /dev/null
+++ /trunk/BookGet/Include/backend/AccountDB.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,136 @@
+<?php
+/**
+ * AccountDB - Class to manage user accounts. Creates and maintains
+ * a connection to the user database
+ *
+ * @author saul
+ */
+class AccountDB {
+
+ // We need to implement these!
+ public function create_user($email, $uname, $pwd, $firstname,
$lastname, $fbid=NULL) {
+ if ($fbid == null)
+ $info = $this->get_userId($uname);
+ else
+ $info = $this->get_fb_userId ($fbid);
+
+ if ($info == null)
+ {
+ $query = "INSERT INTO users (Email, Uname, Password,
FirstName, LastName, fb_uid) VALUES ".
+ "('". $email ."','". $uname ."','". $pwd ."','".
$firstname ."','". $lastname ."','". $fbid."')";
+ mysql_query($query);
+
+ } else {
+ throw new Exception("Account exists", 0);
+ }
+ }
+
+ public function create_from_fb($user) {
+ $this->get_fb_userId($user['id']);
+
+ if ($info != null)
+ return;
+
+ $this->create_user($user['email'], "", "", $user['first_name'],
+ $user['last_name'], $user['id']);
+ }
+
+ public function get_userId($name) {
+ $name = mysql_real_escape_string($name);
+ $query = "SELECT Id FROM users
+ WHERE Uname = '". $name ."'";
+
+ $result = mysql_query($query);
+
+ if ($result != null) {
+ if (mysql_num_rows($result) > 0) {
+ return mysql_result($result,0);
+ }
+ } else {
+ print("\$result was null D:\n");
+ return NULL;
+ }
+ }
+
+ public function verify_credentials($name, $pass) {
+ $name = mysql_real_escape_string($name);
+ $pass = mysql_real_escape_string($pass);
+
+ $query = "SELECT Password FROM users
+ WHERE Uname = '". $name ."'";
+ $object = mysql_query($query);
+ $result = false;
+
+ if ($object != null) {
+ if (mysql_num_rows($object) > 0) {
+ if(mysql_result($object,0) == "") {
+ $result = false;
+ } elseif(mysql_result($object,0) == $pass) {
+ $result = true;
+ }
+ }
+ }
+
+ return $result;
+ }
+
+ public function get_fb_userId($fbid) {
+ $name = mysql_real_escape_string($fbid);
+ $query = "SELECT Id FROM users
+ WHERE fb_uid = '". $fbid ."'";
+
+ $result = mysql_query($query);
+
+ if ($result != null) {
+ if (mysql_num_rows($result) > 0) {
+ return mysql_result($result,0);
+ }
+ } else {
+ //print("\$result was null D:\n");
+ return NULL;
+ }
+ }
+ public function verify_fb_credentials($fbid)
+ {
+// $query = "SELECT Id FROM users WHERE fb_uid = '". $fbid ."'";
+// $object= mysql_query($query);
+// $result = false;
+//
+// if ($object != null) {
+// if (mysql_num_rows($object) > 0) {
+// $result = true;
+// }
+// }
+// return $result;
+ return $this->get_fb_userId($fbid);
+ }
+
+ public static function getInstance() {
+ if (!self::$instance instanceof self) {
+ self::$instance = new AccountDB();
+ }
+
+ return self::$instance;
+ }
+
+ function __construct() {
+ $this->con = mysql_connect($this->dbHost, $this->user, $this->pass)
+ or die ("Could not connect to db: " . mysql_error());
+ mysql_query("SET NAMES 'utf8'");
+ mysql_select_db($this->dbName, $this->con)
+ or die ("Could not select db: " . mysql_error());
+ }
+
+ // db connection config vars
+ protected $user = "bookget";
+ protected $pass = "bookget15";
+ protected $dbName = "bookget";
+ protected $dbHost = "localhost";
+ protected $con = null;
+
+ // This class can only be instantiated once. This is the
+ // current instance:
+ private static $instance = null;
+
+}
+?>
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/backend/Facebook.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,40 @@
+<?php
+define('FACEBOOK_APP_ID', '158595547506014');
+define('FACEBOOK_SECRET', '578259a98628ad76edcb4884f48408f0');
+
+function get_facebook_cookie($app_id, $application_secret) {
+ $args = array();
+ parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args);
+ ksort($args);
+ $payload = '';
+ foreach ($args as $key => $value) {
+ if ($key != 'sig') {
+ $payload .= $key . '=' . $value;
+ }
+ }
+ if (md5($payload . $application_secret) != $args['sig']) {
+ return null;
+ }
+ return $args;
+}
+
+function Facebook_Footer()
+{
+ $str = <<<EOD
+<div id="fb-root"></div>
+<script src="http://connect.facebook.net/en_US/all.js"></script>
+<script>
+ FB.init({appId: '%FACEBOOK_APP_ID%', status: true, cookie: true,
xfbml: true});
+ FB.Event.subscribe('auth.sessionChange', function(response) {
+ if (response.session) {
+ } else {
+ // The user has logged out, and the cookie has been cleared
+ }
+ window.location.reload();
+ });
+</script>
+EOD;
+ $str = str_replace("%FACEBOOK_APP_ID%", FACEBOOK_APP_ID, $str);
+ print ($str);
+}
+?>
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/backend/SearchEngine.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,223 @@
+<?php
+/**
+ * Creates and maintains a connection to a book database
+ *
+ * @author saul
+ */
+class SearchEngine {
+
+ public function Search_Word($word, $field)
+ {
+ $query = "SELECT BookID FROM `Book Database` WHERE `". $field ."`
LIKE ".
+ "'%". $word. "%'";
+ $result = mysql_query($query);
+
+ if ($result != null) {
+ if (mysql_num_rows($result) > 0) {
+ while($row = mysql_fetch_array($result)) {
+ $book_table[] = $row; // Append the row to the table
+ }
+ $result = $book_table;
+ }
+ }
+
+ return $result;
+ }
+
+ public function Search_Phrase($phrase, $field)
+ {
+ $word_array = $this->strip_common_words($phrase);
+
+ $query = "SELECT * FROM `Book Database` WHERE ". $field ." LIKE ".
+ "'%". $word_array[0] . "%'";
+
+ // Remove the first word in the phrase
+ array_shift($word_array);
+
+ $tmp = mysql_query($query);
+ if ($tmp == null)
+ return $tmp;
+ $book_table = array();
+
+ // Convert the MySQL resource into an array of book arrays.
+ while($row = mysql_fetch_array($tmp)) {
+ $book_table[] = $row; // Append the row to the table
+ }
+
+ // If we have more than one result, we gotta use the other words to
+ // narrow it down.
+ if(count($book_table)-1) {
+ $results = array();
+ for($k=0; $k < count($word_array); $k++) {
+ for($i=0;$i< count($book_table);$i++)
+ {
+ /* If the book entry matches the word, add it to the
results
+ * array if it isnt already in there. */
+ if (preg_match('/'.$word_array[$k].'/',
$book_table[$i][$field])) {
+ //print ( $book_table[$i][$field] ." matches ".
$word_array[$k] ."<br/>");
+ if (in_array($book_table[$i], $results) == false)
+ $results[] = $book_table[$i];
+ }
+ }
+ }
+ }
+
+ if (count($results) == 0)
+ $results = $book_table;
+
+ return $results;
+
+ }
+
+ public function omnisearch($query) {
+ $db = $this;
+ $res = array();
+ $ret = array();
+
+ /* Search through each field */
+ $res[] = $db->Search_Phrase($query, "title");
+ $res[] = $db->Search_Phrase($query, "title");
+ $res[] = $db->Search_Phrase($query, "author");
+ $res[] = $db->Search_Phrase($query, "author_one");
+ $res[] = $db->Search_Phrase($query, "Description");
+ $res[] = $db->Search_Phrase($query, "ISBN");
+ $res[] = $db->Search_Phrase($query, "School");
+
+ /* Add the arrays together, removing duplicates */
+ foreach ($res as $row) {
+ foreach ($row as $item) {
+ if (!in_array($item,$ret)) {
+ $ret[] = $item;
+ }
+ }
+ }
+
+ return $ret;
+ }
+
+ function fieldsearch($field, $entry, $query) {
+ $db = SearchEngine::getInstance();
+
+ /* Get all the items in the field matching item */
+ $fieldsearch = $db->Search_Phrase($entry, $field);
+
+ /* Search through everything */
+ $omnisearch = $this->omnisearch($query);
+
+ if ((count($omnisearch) > 0) && (count($fieldsearch) > 0)) {
+ if (count($omnisearch) > count($fieldsearch))
+ $result = array_intersect($omnisearch, $fieldsearch);
+ else
+ $result = array_intersect($fieldsearch, $omnisearch);
+ } else {
+ $result = array();
+ }
+ return $result;
+ }
+
+ private function strip_common_words($phrase) {
+ if (strpos($phrase, " ")) {
+ $word_array = explode(" ", $phrase);
+ } else {
+ return array($phrase);
+ }
+ $word_array = explode(" ", $phrase);
+
+ $new_array = array();
+ for($i=0; $i<count($word_array); $i++) {
+ // Only put the main keywords in the new_table.
+ if (in_array($word_array[$i], $this->m_uselesswords) == false)
{
+ $new_array[] = $word_array[$i];
+ }
+ }
+
+ return $new_array;
+ }
+
+
+// public function Search_ISBN($isbnnum){
+// $num = $this->isbnfix($isbnnum);
+//
+// $query = "SELECT * FROM `Book Database` WHERE ISBN=". $isbnnum;
+//
+//
+// $tmp = mysql_query($query);
+// if ($tmp == null)
+// throw new Exception("Could not get anything from MySQL with
ISBN: ".$isbnnum);
+//
+// $results = array();
+//
+// if (mysql_num_rows($tmp) == 0)
+// return null;
+//
+// while($row = mysql_fetch_array($tmp)) {
+// $results[] = $row; // Append the row to the table
+// }
+//
+// if (count($results) == 0)
+// $results = null;
+//
+// /** DEBUG print count($results)."<br/>"; */
+// return $results;
+// }
+//
+// private function isbnfix($isbnnum) {
+// $numstring = $isbignum;
+// if(strpos($phrase, "-")) {
+// $num_array = explode("-", $isbnnum);
+// $numstring = implode($num_array);
+// }
+// $result = intval($numstring);
+// return $result;
+// }
+
+
+ public static function getInstance() {
+ if (!self::$instance instanceof self) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ public function get_book($id) {
+ $name = mysql_real_escape_string($name);
+ $query = "SELECT * FROM `Book Database`
+ WHERE BookID = '". $id ."'";
+
+ $result = mysql_query($query);
+
+ if ($result != null) {
+ if (mysql_num_rows($result) > 0) {
+ return mysql_fetch_array($result);
+ }
+ return $result;
+ } else {
+ print("\$result was null D:\n");
+ return NULL;
+ }
+ }
+
+ private function __construct() {
+ $this->con = mysql_connect($this->dbHost, $this->user, $this->pass)
+ or die ("Could not connect to db: " . mysql_error());
+ mysql_query("SET NAMES 'utf8'");
+ mysql_select_db($this->dbName, $this->con)
+ or die ("Could not select db: " . mysql_error());
+ }
+
+ // db connection config vars
+ protected $user = "bookget";
+ protected $pass = "bookget15";
+ protected $dbName = "bookget";
+ protected $dbHost = "localhost";
+ protected $con = null;
+
+
+ protected $m_uselesswords =
array("of", "an", "the", "The", "An", "but");
+
+ // This class can only be instantiated once. This is the
+ // current instance:
+ private static $instance = null;
+}
+?>
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/footer_bar.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,13 @@
+ <!--div id="pagewrapper"-->
+ <div id="footercontent" class="clearboth">
+ <h4>
+ <spacing>
+ <a href="about_us.php">About_Us</a>
+ <a href="faq.php">FAQ</a>
+ <a href="terms_of_use.php">Terms_of_Use</a>
+ <a href="privacy_policy.php">Privacy_Policy</a>
+ </spacing>
+ </h4>
+ </div>
+ <!--/div-->
+
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/header.html.scrap.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,27 @@
+ <link rel="stylesheet" href="style/layout.css" type="text/css" />
+ <link rel="icon"
+ type="image/ico"
+ href="img/icon.ico" />
+<div id="headerbar">
+ </div>
+ <div id="headerwrapper">
+ <div id="pageheader">
+ <div id="logodiv">
+ <span id="book">book</span><span id="get">get</span>
+ </div>
+ <div id="headercontent" class="clearboth">
+ <form method="get" action="search.php">
+ <div id="searchdiv" class="searchbar">
+ <input id="searchbox" type="text" name="query"
size="40" class="search" />
+ <button id="searchbutton" type="submit"
class="search"></button>
+ </div>
+ </form>
+
+ <div id="accountsettings">
+ <a href="settings.php">Settings</a>
+ <a href="account.php">Account</a>
+ <a href="login.php">Login</a>
+ </div>
+ </div>
+ </div>
+ </div>
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/header.scrap.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,27 @@
+ <link rel="stylesheet" href="style/layout.css" type="text/css" />
+ <link rel="icon"
+ type="image/ico"
+ href="img/icon.ico" />
+<div id="headerbar">
+ </div>
+ <div id="headerwrapper">
+ <div id="pageheader">
+ <div id="logodiv">
+ <span id="book">book</span><span id="get">get</span>
+ </div>
+ <div id="headercontent" class="clearboth">
+ <form method="get" action="search.php">
+ <div id="searchdiv" class="searchbar">
+ <input id="searchbox" type="text" name="query"
size="40" class="search" />
+ <button id="searchbutton" type="submit"
class="search"></button>
+ </div>
+ </form>
+
+ <div id="accountsettings">
+ <a href="settings.php">Settings</a>
+ <a href="account.php">Account</a>
+ <a href="login.php">Login</a>
+ </div>
+ </div>
+ </div>
+ </div>
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/jquery-1.4.4.js Fri Dec 3 19:06:02 2010
@@ -0,0 +1,7179 @@
+/*!
+ * jQuery JavaScript Library v1.4.4
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Nov 11 19:04:53 2010 -0500
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
+
+ // Is it a simple selector
+ isSimple = /^.[^:#\[\.,]*$/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+ rwhite = /\s/,
+
+ // Used for trimming whitespace
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Check for non-word characters
+ rnonword = /\W/,
+
+ // Check for digits
+ rdigit = /\d/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|
-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // Has the ready events already been bound?
+ readyBound = false,
+
+ // The functions to execute on DOM ready
+ readyList = [],
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ init: function( selector, context ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context && document.body ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = "body";
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ match = quickExpr.exec( selector );
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ doc = (context ? context.ownerDocument || context : document);
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+ selector = (ret.cacheable ? ret.fragment.cloneNode(true) :
ret.fragment).childNodes;
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $("#id")
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $("TAG")
+ } else if ( !context && !rnonword.test( selector ) ) {
+ this.selector = selector;
+ this.context = document;
+ selector = document.getElementsByTagName( selector );
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return (context || rootjQuery).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return jQuery( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if (selector.selector !== undefined) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.4.4",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = jQuery();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // If the DOM is already ready
+ if ( jQuery.isReady ) {
+ // Execute the function immediately
+ fn.call( document, jQuery );
+
+ // Otherwise, remember the function for later
+ } else if ( readyList ) {
+ // Add the function to the wait list
+ readyList.push( fn );
+ }
+
+ return this;
+ },
+
+ eq: function( i ) {
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, +i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || jQuery(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep
copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray =
jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ window.$ = _$;
+
+ if ( deep ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+ // A third-party is pushing the ready event forwards
+ if ( wait === true ) {
+ jQuery.readyWait--;
+ }
+
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
+ // Make sure body exists, at least, in case IE gets a little
overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ if ( readyList ) {
+ // Execute all of them
+ var fn,
+ i = 0,
+ ready = readyList;
+
+ // Reset the list of functions
+ readyList = null;
+
+ while ( (fn = ready[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
+ }
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyBound ) {
+ return;
+ }
+
+ readyBound = true;
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay
ready
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false
);
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ // A crude way of determining if an object is a window
+ isWindow: function( obj ) {
+ return obj && typeof obj === "object" && "setInterval" in obj;
+ },
+
+ isNaN: function( obj ) {
+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor
property.
+ // Make sure that DOM nodes and window objects don't pass through, as
well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType ||
jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw msg;
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test(data.replace(rvalidescape, "@")
+ .replace(rvalidtokens, "]")
+ .replace(rvalidbraces, "")) ) {
+
+ // Try to use the native JSON parser first
+ return window.JSON && window.JSON.parse ?
+ window.JSON.parse( data ) :
+ (new Function("return " + data))();
+
+ } else {
+ jQuery.error( "Invalid JSON: " + data );
+ }
+ },
+
+ noop: function() {},
+
+ // Evalulates a script in a global context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test(data) ) {
+ // Inspired by code by Andrea Giammarchi
+ //
http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+ var head = document.getElementsByTagName("head")[0] ||
document.documentElement,
+ script = document.createElement("script");
+
+ script.type = "text/javascript";
+
+ if ( jQuery.support.scriptEval ) {
+ script.appendChild( document.createTextNode( data ) );
+ } else {
+ script.text = data;
+ }
+
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709).
+ head.insertBefore( script, head.firstChild );
+ head.removeChild( script );
+ }
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() ===
name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction(object);
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false
) {
+ break;
+ }
+ }
+ } else {
+ for ( var value = object[0];
+ i < length && callback.call( value, i, value ) !== false; value =
object[++i] ) {}
+ }
+ }
+
+ return object;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // The extra typeof function check is to prevent crashes
+ // in Safari 2 (See: #3039)
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type(array);
+
+ if ( array.length == null || type === "string" || type === "function" |
| type === "regexp" || jQuery.isWindow( array ) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var i = first.length,
+ j = 0;
+
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var ret = [], retVal;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var ret = [], value;
+
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ proxy: function( fn, proxy, thisObject ) {
+ if ( arguments.length === 2 ) {
+ if ( typeof proxy === "string" ) {
+ thisObject = fn;
+ fn = thisObject[ proxy ];
+ proxy = undefined;
+
+ } else if ( proxy && !jQuery.isFunction( proxy ) ) {
+ thisObject = proxy;
+ proxy = undefined;
+ }
+ }
+
+ if ( !proxy && fn ) {
+ proxy = function() {
+ return fn.apply( thisObject || this, arguments );
+ };
+ }
+
+ // Set the guid of unique handler to the same of original handler, so it
can be removed
+ if ( fn ) {
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+ }
+
+ // So proxy can be declared as an argument
+ return proxy;
+ },
+
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can be optionally by executed if its a function
+ access: function( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ jQuery.access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key )
) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+ },
+
+ now: function() {
+ return (new Date()).getTime();
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp
Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+if ( indexOf ) {
+ jQuery.inArray = function( elem, array ) {
+ return indexOf.call( array, elem );
+ };
+}
+
+// Verify that \s matches non-breaking spaces
+// (IE fails on this test)
+if ( !rwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded,
false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous
(ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch(e) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
+
+})();
+
+
+(function() {
+
+ jQuery.support = {};
+
+ var root = document.documentElement,
+ script = document.createElement("script"),
+ div = document.createElement("div"),
+ id = "script" + jQuery.now();
+
+ div.style.display = "none";
+ div.innerHTML = " <link/><table></table><a href='/a'
style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+ var all = div.getElementsByTagName("*"),
+ a = div.getElementsByTagName("a")[0],
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return;
+ }
+
+ jQuery.support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText insted)
+ style: /red/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55$/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+ // Make sure that a selected-by-default option has a working selected
property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an
optgroup)
+ optSelected: opt.selected,
+
+ // Will be defined later
+ deleteExpando: true,
+ optDisabled: false,
+ checkClone: false,
+ scriptEval: false,
+ noCloneEvent: true,
+ boxModel: null,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableHiddenOffsets: true
+ };
+
+ // Make sure that the options inside disabled selects aren't marked as
disabled
+ // (WebKit marks them as diabled)
+ select.disabled = true;
+ jQuery.support.optDisabled = !opt.disabled;
+
+ script.type = "text/javascript";
+ try {
+ script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+ } catch(e) {}
+
+ root.insertBefore( script, root.firstChild );
+
+ // Make sure that the execution of code works by injecting a script
+ // tag with appendChild/createTextNode
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/js/jquery-1.4.4.js Fri Dec 3 19:06:02 2010
@@ -0,0 +1,7179 @@
+/*!
+ * jQuery JavaScript Library v1.4.4
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Nov 11 19:04:53 2010 -0500
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
+
+ // Is it a simple selector
+ isSimple = /^.[^:#\[\.,]*$/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+ rwhite = /\s/,
+
+ // Used for trimming whitespace
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Check for non-word characters
+ rnonword = /\W/,
+
+ // Check for digits
+ rdigit = /\d/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|
-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // Has the ready events already been bound?
+ readyBound = false,
+
+ // The functions to execute on DOM ready
+ readyList = [],
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ init: function( selector, context ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context && document.body ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = "body";
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ match = quickExpr.exec( selector );
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ doc = (context ? context.ownerDocument || context : document);
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+ selector = (ret.cacheable ? ret.fragment.cloneNode(true) :
ret.fragment).childNodes;
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $("#id")
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $("TAG")
+ } else if ( !context && !rnonword.test( selector ) ) {
+ this.selector = selector;
+ this.context = document;
+ selector = document.getElementsByTagName( selector );
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return (context || rootjQuery).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return jQuery( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if (selector.selector !== undefined) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.4.4",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = jQuery();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // If the DOM is already ready
+ if ( jQuery.isReady ) {
+ // Execute the function immediately
+ fn.call( document, jQuery );
+
+ // Otherwise, remember the function for later
+ } else if ( readyList ) {
+ // Add the function to the wait list
+ readyList.push( fn );
+ }
+
+ return this;
+ },
+
+ eq: function( i ) {
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, +i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || jQuery(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep
copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray =
jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ window.$ = _$;
+
+ if ( deep ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+ // A third-party is pushing the ready event forwards
+ if ( wait === true ) {
+ jQuery.readyWait--;
+ }
+
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
+ // Make sure body exists, at least, in case IE gets a little
overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ if ( readyList ) {
+ // Execute all of them
+ var fn,
+ i = 0,
+ ready = readyList;
+
+ // Reset the list of functions
+ readyList = null;
+
+ while ( (fn = ready[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
+ }
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyBound ) {
+ return;
+ }
+
+ readyBound = true;
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay
ready
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false
);
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ // A crude way of determining if an object is a window
+ isWindow: function( obj ) {
+ return obj && typeof obj === "object" && "setInterval" in obj;
+ },
+
+ isNaN: function( obj ) {
+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor
property.
+ // Make sure that DOM nodes and window objects don't pass through, as
well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType ||
jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw msg;
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test(data.replace(rvalidescape, "@")
+ .replace(rvalidtokens, "]")
+ .replace(rvalidbraces, "")) ) {
+
+ // Try to use the native JSON parser first
+ return window.JSON && window.JSON.parse ?
+ window.JSON.parse( data ) :
+ (new Function("return " + data))();
+
+ } else {
+ jQuery.error( "Invalid JSON: " + data );
+ }
+ },
+
+ noop: function() {},
+
+ // Evalulates a script in a global context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test(data) ) {
+ // Inspired by code by Andrea Giammarchi
+ //
http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+ var head = document.getElementsByTagName("head")[0] ||
document.documentElement,
+ script = document.createElement("script");
+
+ script.type = "text/javascript";
+
+ if ( jQuery.support.scriptEval ) {
+ script.appendChild( document.createTextNode( data ) );
+ } else {
+ script.text = data;
+ }
+
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709).
+ head.insertBefore( script, head.firstChild );
+ head.removeChild( script );
+ }
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() ===
name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction(object);
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false
) {
+ break;
+ }
+ }
+ } else {
+ for ( var value = object[0];
+ i < length && callback.call( value, i, value ) !== false; value =
object[++i] ) {}
+ }
+ }
+
+ return object;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // The extra typeof function check is to prevent crashes
+ // in Safari 2 (See: #3039)
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type(array);
+
+ if ( array.length == null || type === "string" || type === "function" |
| type === "regexp" || jQuery.isWindow( array ) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var i = first.length,
+ j = 0;
+
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var ret = [], retVal;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var ret = [], value;
+
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ proxy: function( fn, proxy, thisObject ) {
+ if ( arguments.length === 2 ) {
+ if ( typeof proxy === "string" ) {
+ thisObject = fn;
+ fn = thisObject[ proxy ];
+ proxy = undefined;
+
+ } else if ( proxy && !jQuery.isFunction( proxy ) ) {
+ thisObject = proxy;
+ proxy = undefined;
+ }
+ }
+
+ if ( !proxy && fn ) {
+ proxy = function() {
+ return fn.apply( thisObject || this, arguments );
+ };
+ }
+
+ // Set the guid of unique handler to the same of original handler, so it
can be removed
+ if ( fn ) {
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+ }
+
+ // So proxy can be declared as an argument
+ return proxy;
+ },
+
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can be optionally by executed if its a function
+ access: function( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ jQuery.access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key )
) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+ },
+
+ now: function() {
+ return (new Date()).getTime();
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp
Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+if ( indexOf ) {
+ jQuery.inArray = function( elem, array ) {
+ return indexOf.call( array, elem );
+ };
+}
+
+// Verify that \s matches non-breaking spaces
+// (IE fails on this test)
+if ( !rwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded,
false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous
(ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch(e) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
+
+})();
+
+
+(function() {
+
+ jQuery.support = {};
+
+ var root = document.documentElement,
+ script = document.createElement("script"),
+ div = document.createElement("div"),
+ id = "script" + jQuery.now();
+
+ div.style.display = "none";
+ div.innerHTML = " <link/><table></table><a href='/a'
style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+ var all = div.getElementsByTagName("*"),
+ a = div.getElementsByTagName("a")[0],
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return;
+ }
+
+ jQuery.support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText insted)
+ style: /red/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55$/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+ // Make sure that a selected-by-default option has a working selected
property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an
optgroup)
+ optSelected: opt.selected,
+
+ // Will be defined later
+ deleteExpando: true,
+ optDisabled: false,
+ checkClone: false,
+ scriptEval: false,
+ noCloneEvent: true,
+ boxModel: null,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableHiddenOffsets: true
+ };
+
+ // Make sure that the options inside disabled selects aren't marked as
disabled
+ // (WebKit marks them as diabled)
+ select.disabled = true;
+ jQuery.support.optDisabled = !opt.disabled;
+
+ script.type = "text/javascript";
+ try {
+ script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+ } catch(e) {}
+
+ root.insertBefore( script, root.firstChild );
+
+ // Make sure that the execution of code works by injecting a script
+ // tag with appendChild/createTextNode
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /trunk/BookGet/Include/minicart.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,3 @@
+<?php
+print("<span>blah<br/>blah<br/>blah<br/></span>");
+?>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/SearchISBN.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Creates and maintains a connection to a book database
+ *
+ * @author Dan
+ */
+class SearchISBN{
+
+ public function Search_num($num)
+ {
+ $query = "SELECT BookID FROM `Book Database` WHERE ". $ISBN ."
LIKE ".
+ "'%". $num. "%'";
+ $result = mysql_query($query);
+
+ if ($result != null) {
+ if (mysql_num_rows($result) > 0) {
+ while($row = mysql_fetch_array($result)) {
+ $book_table[] = $row; // Append the row to the table
+ }
+ $result = $book_table;
+ }
+ }
+ return $result;
+ }
+ public function Search_ISBN($isbnnum){
+ $num = $this->isbnfix($isbnnum);
+
+ $query = "SELECT * FROM `Book Database` WHERE ". $ISBN ." LIKE ".
+ "'%". $num . "%'";
+
+
+ $tmp = mysql_query($query);
+ $book_table = array();
+
+ // Convert the MySQL resource into an array of book arrays.
+ while($row = mysql_fetch_array($tmp)) {
+ $book_table[] = $row; // Append the row to the table
+ }
+
+ /** DEBUG
+ print count($book_table)."<br/>";
+ print count($num)."<br/>";
+ */
+
+ if(count($book_table)-1) {
+ $results = array();
+
+ for($i=0;$i< count($book_table);$i++)
+ {
+ /** DEBUG print $word_array[$k]."<br/>"; */
+
+ /* If the book entry matches the word, add it to the
results
+ * array if it isnt already in there. */
+ if (preg_match('/'.$num.'/', $book_table[$i][$ISBN])) {
+ //print ( $book_table[$i][$field] ." matches ".
$word_array[$k] ."<br/>");
+ if (in_array($book_table[$i], $results) == false)
+ $results[] = $book_table[$i];
+ }
+ }
+
+ }
+
+ if (count($results)-1 == 0)
+ $results = $book_table;
+
+ /** DEBUG print count($results)."<br/>";*/
+ return $results;
+
+
+
+ }
+ private function isbnfix($isbnnum) {
+ if(strpos($phrase, "-"))
+ $num_array = explode("-", $isbnnum);
+ $numstring = implode($num_array);
+ $num_array = explode("", $isbnnum);
+
+ $new_array = array();
+ for($i=0; $i<count($num_array); $i++) {
+ // Only put the main keywords in the new_table.
+ if (in_array($num_array[$i], $this->$m_symbols) == false) {
+ $new_string += $num_array[$i];
+ }
+ }
+ return $new_string;
+ }
+ public static function getInstance() {
+ if (!self::$instance instanceof self) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ private function __construct() {
+ $this->con = mysql_connect($this->dbHost, $this->user, $this->pass)
+ or die ("Could not connect to db: " . mysql_error());
+ mysql_query("SET NAMES 'utf8'");
+ mysql_select_db($this->dbName, $this->con)
+ or die ("Could not select db: " . mysql_error());
+ }
+
+ // db connection config vars
+ protected $user = "bookget";
+ protected $pass = "bookget15";
+ protected $dbName = "bookget";
+ protected $dbHost = "localhost";
+ protected $con = null;
+
+ protected $m_symbols = array("-");
+ // This class can only be instantiated once. This is the
+ // current instance:
+ private static $instance = null;
+}
+?>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/indexmodifiedbydan.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,162 @@
+<?php include "Include/mimetype.php" ?>
+ <head>
+ <meta http-equiv="X-UA-Compatible" content="IE=8" />
+ <title>BookGet.com</title>
+ <!--div id="footer"><link rel="stylesheet"
href="style/layout.css" type="text/css" />-->
+ <link rel="stylesheet" href="dan_templates/layout.css"
type="text/css" />
+ </head>
+ <body>
+ <div id="headerwrapper">
+
+
+ <div id="header">
+ <div id="banner_small">
+ <span id="book">book</span><span id="get">get</span>
+ </div>
+ <div id="searchbar" class="clearboth">
+ <form method="get" action="search.php">
+ <div id="searchdiv" class="searchbar">
+ <input id="searchbox" type="text" name="query"
size="40" class="search" />
+ <button id="searchbutton" type="submit"
class="search" />
+ </div>
+ </form>
+ </div>
+ <div id="quicklink1">
+ <a href="settings.php">Settings</a>
+
+
+ </div>
+ <div id="quicklink2"><a
href="account.php">Account</a></div>
+ <div id="quicklink3"><a
href="logout.php">Logout</a></div>
+
+ </div>
+ </div>
+
+ <div id="leftcol">
+ blah <br/>
+ blah <br/>
+ blah <br/>
+ </div>
+ <div id="searchtrace">add search trace script here</div>
+ <div id="content3"><p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.</p></div>
+ <div id="content1"><p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.</p>
+ <br/>
+ <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.</p>
+ <br/>
+ <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.
+
+ </p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.</p>
+ <br/>
+ <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.</p>
+ <br/>
+ <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.
+
+ </p>
+<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.</p>
+ <br/>
+ <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.</p>
+ <br/>
+ <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et
dolore<br/>
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
+ commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum
dolore eu<br/>
+ fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
+ non proident, sunt in culpa qui officia deserunt
mollit
+ anim id est laborum.
+
+ </p>
+ </div>
+ <div id="rightcol" >
+ blah <br/>
+ blah <br/>
+ blah <br/>
+
+
+ </div>
+
+
+ <div id="footer">
+ <a href="http://validator.w3.org/check?uri=referer">Valid
XHTML 1.1</a>,
+ <a
href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a>
+ <div id="quicklink4"><a href="ContactUs.php">Contact
Us</a></div>
+ <div id="quicklink5"><a href="FAQ.php">FAQ</a></div>
+ <div id="quicklink6"><a href="Returns.php">Returns</a></div>
+ <div id="quicklink7"><a
href="ShippingInfo.php">Shipping</a></div>
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/img/box.jpg Fri Dec 3 19:06:02 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/img/gift-card.jpg Fri Dec 3 19:06:02 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/img/logo.gif Fri Dec 3 19:06:02 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/img/logo_1.gif Fri Dec 3 19:06:02 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/img/setting.png Fri Dec 3 19:06:02 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/index.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,150 @@
+<?php
+ require_once("Include/AccountDB.php");
+ require_once("Include/Facebook.php");
+
+ $db = AccountDB::getInstance();
+ $cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET);
+
+ if ($cookie) {
+ $user =
json_decode(file_get_contents( 'https://graph.facebook.com/me?access_token=' .
+
$cookie['access_token']), true);
+
+ if ($db->verify_fb_credentials($user['id'])) {
+ session_start();
+ $_session["user"] = get_fb_UserID($cookie['uid']);
+ header('Location: userpage.php');
+ exit;
+ }
+ }
+
+ $logonSuccess = true;
+
+ // verify user's credentials
+ if ($_SERVER["REQUEST_METHOD"] == "POST"){
+ if ($db->verify_credentials($_POST["user"],
$_POST["userpassword"]) ) {
+ session_start();
+ $_SESSION["user"] = $_POST["user"];
+ header('Location: userpage.php');
+ exit;
+ }
+ $logonsuccess = false;
+ }
+?>
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" href="style.css" type="text/css" />
+<title>BookGet.Com -- Login</title>
+</head>
+
+<body bgcolor="#000033">
+<table width="99%" height="190" border="1" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
+ <tr>
+ <th width="12%" height="28" scope="col">&nbsp;</th>
+ <th colspan="2" scope="col">&nbsp;</th>
+ <th width="8%" scope="col">&nbsp;</th>
+ <th width="9%" scope="col"><p><u>Cart</u></p></th>
+ <th width="8%" scope="col"><fb:login-button
autologoutlink="true"></fb:login-button ></th>
+ <th width="10%" scope="col"><u>Register</u></th>
+ </tr>
+ <tr>
+ <th rowspan="2" scope="row"><p>Buy/Sell/Trade</p>
+ <p>Dropdown Menu</p></th>
+ <td colspan="5" rowspan="2"><div><img id="logo" src="img/logo.gif"
alt="logo"/></div></td>
+ <td><a href="search.php">Search</a></td>
+ </tr>
+ <tr>
+ <td>Class Search</td>
+ </tr>
+ <tr>
+ <th rowspan="5" scope="row"><p>Categories</p>
+ <p>(dropdown menus)</p></th>
+ <td style="border-bottom: none;" colspan="5">&nbsp;</td>
+ <td>My Info</td>
+ </tr>
+ <tr>
+ <td colspan="5" rowspan="4">
+ <table width="100%" height="166" border="1" cellpadding="0"
cellspacing="0" bgcolor="#FFFFFF">
+ <tr>
+ <th width="50%" height="126" scope="col"><a
href="registration.php">Register New User</a></th>
+ <th width="50%" scope="col">
+ <div id="logondiv" class="formdiv disappearing" >
+ <input id ="loginbutton" type="submit" value="Log On"
+ onclick="javascript:showHideLogonButton()" />
+
+ <form name="logon" action="index.php" method="POST"
+ style="visibility: hidden;">
+ Username: <input type="text" name="user" /><br />
+ Password <input type="password"
name="userpassword" />
+ <br />
+ <input type="submit" value="Submit." />
+ <?php
+ if (!$logonSuccess) {
+ echo "<div class=\"error\">\n";
+ echo "Invalid name and/or password\n";
+ echo "</div>\n";
+ } else {
+ echo $cookie['uid'];
+ }
+ ?>
+ </form>
+ </div>
+ </th>
+ </tr>
+ </table>
+ <h1>&nbsp;</h1></td>
+ <!--td rowspan="4">&nbsp;</td -->
+ <td>Registered Classes</td>
+ </tr>
+ <tr>
+ <td><p>Class1</p>
+ <p>Class 2</p>
+ <p>Class 3</p></td>
+ </tr>
+ <tr>
+ <td>Books Required</td>
+ </tr>
+ <tr>
+ <td><p>Books for class 1</p>
+ <p>Books for class 2</p>
+ <p>Books for class 3</p></td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <th width="44%" scope="row">&nbsp;</th>
+ <th width="9%" scope="row">Forum</th>
+ <th scope="row">Customer Service</th>
+ <th scope="row">Help</th>
+ <th scope="row">Contact</th>
+ <th scope="row">Package Tracking</th>
+ </tr>
+</table>
+
+
+<script type="text/javascript">
+ function showHideLogonButton() {
+ var div = document.getElementById("logondiv");
+ var form = document.getElementsByName("logon");
+ var button = document.getElementById("loginbutton");
+
+ if (div.style.visibility == "visible") {
+ div.style.visibility = "hidden";
+ button.style.visibility = "hidden"
+ } else {
+ div.style.visibility = "visible";
+ button.style.visibility = "hidden"
+ }
+
+ for(i=0; i< form.length; i++) {
+ if (form[i].style.visibility == "visible") {
+ form[i].style.visibility = "hidden";
+ } else {
+ form[i].style.visibility = "visible";
+ }
+ }
+ }
+</script>
+<?php Facebook_Footer() ?>
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/registration.css Fri Dec 3 19:06:02 2010
@@ -0,0 +1,23 @@
+/*
+ Document : registration
+ Created on : Nov 14, 2010, 10:08:12 PM
+ Author : saul
+ Description:
+ Purpose of the stylesheet follows.
+*/
+
+/*
+ TODO customize this sample style
+ Syntax recommendation http://www.w3.org/TR/REC-CSS2/
+*/
+
+table#registrationform
+{
+ margin: auto;
+}
+
+td.red
+{
+ color: red;
+ font-weight: bold;
+}
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/registration.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,222 @@
+<? require_once("Include/AccountDB.php");
+ require_once("Include/Facebook.php");
+
+ $cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET);
+
+ if ($cookie) {
+ $user = json_decode(file_get_contents(
+ 'https://graph.facebook.com/me?access_token=' .
$cookie['access_token']));
+ $user =
json_decode(file_get_contents('https://graph.facebook.com/me?access_token=' .
$cookie['access_token']))->me;
+
+
+ //create_user($user->email, $user->username, "", $firstname,
$lastname, $fbid=NULL);
+ }
+ /** other variables */
+ $userNameIsUnique = true;
+ $passwordIsValid = true;
+ $userIsEmpty = false;
+ $passwordIsEmpty = false;
+ $password2IsEmpty = false;
+ $emailIsEmpty = false;
+ $firstnameIsEmpty = false;
+ $lastnameIsEmpty = false;
+
+ if ($_SERVER["REQUEST_METHOD"] == "POST") {
+ if ($_POST["user"]=="")
+ $userIsEmpty = true;
+
+ $db = AccountDB::getInstance();
+ $userID = $db->get_userId($_POST["user"]);
+
+ if ($userID) {
+ $userNameIsUnique = false;
+ }
+
+ if ($_POST["password"] == "")
+ $passwordIsEmpty = true;
+ if ($_POST["password2"] == "")
+ $password2IsEmpty = true;
+ if ($_POST["password"] != $_POST["password2"])
+ $passwordIsValid = false;
+ if ($_POST["email"] == "")
+ $emailIsEmpty = true;
+ if ($_POST['firstname'] == "")
+ $firstnameIsempty = true;
+ if ($_POST['lastname'] == "")
+ $lastnameIsEmpty = true;
+
+
+ if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty &&
+ !$password2IsEmpty && !$emailIsEmpty && !$firstnameIsEmpty &&
+ !$lastnameIsEmpty && $passwordIsValid)
+ {
+ $db->Create_User($_POST["email"], $_POST["user"],
+ $_POST["password"], $_POST["firstname"],
+ $_POST["lastname"]);
+
+ session_start();
+ $_SESSION["user"] = $_POST["user"];
+
+ header('Location: userpage.php' );
+ exit;
+ }
+ }
+?>
+
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" href="style.css" type="text/css" />
+<link rel="stylesheet" href="registration.css" type="text/css" />
+<title>BookGet.Com -- Registration</title>
+</head>
+
+<body bgcolor="#000033">
+<table width="99%" height="190" border="1" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
+ <tr>
+ <th width="12%" height="28" scope="col">&nbsp;</th>
+ <th colspan="2" scope="col">&nbsp;</th>
+ <th width="8%" scope="col">&nbsp;</th>
+ <th width="9%" scope="col"><p><u>Cart</u></p></th>
+ <th width="8%" scope="col"><u>Login</u></th>
+ <th width="10%" scope="col"><u>Register</u></th>
+ </tr>
+ <tr>
+ <th rowspan="2" scope="row"><p>Buy/Sell/Trade</p>
+ <p>Dropdown Menu</p></th>
+ <td colspan="5" rowspan="2"><div><img id="logo" src="img/logo.gif"
alt="logo"/></div></td>
+ <td>Search</td>
+ </tr>
+ <tr>
+ <td>Class Search</td>
+ </tr>
+ <tr>
+ <th rowspan="5" scope="row"><p>Categories</p>
+ <p>(dropdown menus)</p></th>
+ <td style="border-bottom: none;" colspan="5">&nbsp;</td>
+ <td>My Info</td>
+ </tr>
+ <tr>
+ <td colspan="5" rowspan="4">
+ <fb:login-button perms="email"
autologoutlink="true"></fb:login-button>
+ <?php
+ if ($user) {
+ echo $user->name;
+ }
+ ?>
+
+ <table width="50%" height="166" border="1" cellpadding="0"
cellspacing="0" bgcolor="#FFFFFF"
+ id="registrationform">
+ <td>
+ <form id="registerform" name="register" method="post"
action="registration.php">
+
+ <table>
+ <tr>
+ <td>Email</td>
+ <td><input name="email" type="text" value="" size="50"
/></td>
+ </tr>
+
+ <tr>
+ <td>Username</td>
+ <td><input name="user" type="text" value="" size="20" /></td>
+ </tr>
+ <?php
+ if ($userIsEmpty) {
+ echo ("<tr><td class=\"red\">Enter your user name,
please!</td>");
+ echo ("<tr/>");
+ }
+ if (!$userNameIsUnique) {
+ echo ("<tr><td class=\"red\">The username already
exists.</td>");
+ echo ("<tr/>");
+ }
+ ?>
+
+ <tr>
+ <td>Password</td>
+ <td><input name="password" type="text" value=""
size="20"/></td>
+ </tr>
+ <?php
+ if ($passwordIsEmpty) {
+ echo ("<tr><td class=\"red\">Enter the password,
please!</td>");
+ echo ("<tr/>");
+ }
+ ?>
+
+ <tr>
+ <td>Confirm your password</td>
+ <td><input name="password2" type="text" value=""
size="20"/></td>
+ </tr>
+ <?php
+ if ($password2IsEmpty) {
+ echo ("<tr><td class=\"red\">Confirm your
password, please!</td>");
+ echo ("<tr/>");
+ }
+
+ if (!$password2IsEmpty && !$passwordIsValid) {
+ echo ("<tr><td class=\"red\">The passwords do not
match</td>");
+ echo ("<tr/>");
+ }
+ ?>
+ <tr>
+ <td>First Name</td>
+ <td><input name="firstname" type="text" value=""
size="24"/></td>
+ </tr>
+ <?php
+ if ($firstnameIsEmpty) {
+ echo ("<tr><td class=\"red\">Enter your first
name, please!</td>");
+ echo ("<tr/>");
+ }
+ ?>
+ <tr>
+ <td>Last Name</td>
+ <td><input name="lastname" type="text" value=""
size="24"/></td>
+ </tr>
+ <?php
+ if ($lastnameIsEmpty) {
+ echo ("<tr><td class=\"red\">Enter your last name,
please!</td>");
+ echo ("<tr/>");
+ }
+ ?>
+ <tr>
+ <td>School</td>
+ <td><input name="school" type="text" value="" size="50"
/></td>
+ </tr>
+ </table>
+
+ <input type="submit" name="submit" value="submit" />
+
+ <input type="reset" name="reset" value="reset" />
+ </form>
+ </td>
+ </table>
+ <h1>&nbsp;</h1></td>
+ <!--td rowspan="4">&nbsp;</td -->
+ <td>Registered Classes</td>
+ </tr>
+ <tr>
+ <td><p>Class1</p>
+ <p>Class 2</p>
+ <p>Class 3</p></td>
+ </tr>
+ <tr>
+ <td>Books Required</td>
+ </tr>
+ <tr>
+ <td><p>Books for class 1</p>
+ <p>Books for class 2</p>
+ <p>Books for class 3</p></td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <th width="44%" scope="row">&nbsp;</th>
+ <th width="9%" scope="row">Forum</th>
+ <th scope="row">Customer Service</th>
+ <th scope="row">Help</th>
+ <th scope="row">Contact</th>
+ <th scope="row">Package Tracking</th>
+ </tr>
+</table>
+<?php Facebook_Footer() ?>
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/search.css Fri Dec 3 19:06:02 2010
@@ -0,0 +1,32 @@
+/*
+ Document : search
+ Created on : Nov 16, 2010, 1:10:31 AM
+ Author : saul
+ Description:
+ Purpose of the stylesheet follows.
+*/
+
+
+table#results
+{
+ border-style: dashed;
+ border-width: 1px;
+ margin-left:auto;
+ margin-right:auto;
+
+}
+
+
+th.label
+{
+ background-color: #cccccc;
+ border-style: dashed;
+ border-color: #ffffff;
+}
+
+td.Results
+{
+ background-color: #cccccc;
+ border-style: dashed;
+ border-color: #ffffff;
+}
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/search.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,155 @@
+<?php
+ require_once("Include/SearchEngine.php");
+
+
+ $termsIsEmpty = true;
+ if ($_SERVER["REQUEST_METHOD"] == "POST") {
+ if ($_POST["terms"] !="") {
+ $termsIsEmpty= false;
+ $db = SearchEngine::getInstance();
+ $searchresults = $db->Search_Phrase($_POST["terms"],
$_POST["field"]);
+ if (count($searchresults) < 1) {
+ $termsIsEmpty = true;
+ $noResults = true;
+ }
+ } else {
+ $termsIsEmpty = true;
+ }
+ }
+?>
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" href="search.css" type="text/css" />
+<title>Search</title>
+</head>
+ <body bgcolor="#000033">
+
+
+<table width="99%" height="190" border="1" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
+ <tr>
+ <th width="12%" height="28" scope="col">&nbsp;</th>
+ <th colspan="2" scope="col">&nbsp;</th>
+ <th width="8%" scope="col">&nbsp;</th>
+ <th width="9%" scope="col"><p><u>Cart</u></p></th>
+ <th width="8%" scope="col"><u>Login</u></th>
+ <th width="10%" scope="col"><u>Register</u></th>
+ </tr>
+ <tr>
+ <th rowspan="2" scope="row"><p>Buy/Sell/Trade</p>
+ <p>Dropdown Menu</p></th>
+ <td colspan="5" rowspan="2"><h1 align="center"><img src="img/logo.gif"
alt="logo"/></h1></td>
+ <td>Search</td>
+ </tr>
+ <tr>
+ <td>Class Search</td>
+ </tr>
+ <tr>
+ <th rowspan="5" scope="row"><p>Categories</p>
+ <p>(dropdown menus)</p></th>
+ <td colspan="5">&nbsp;</td>
+ <td>My Info</td>
+ </tr>
+ <tr>
+ <td colspan="5" rowspan="4"><table width="100%" height="166"
border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
+ <tr>
+ <th width="50%" height="126" scope="col">Search for Books
+
+<p></p>
+
+<?php
+
+ if($termsIsEmpty) {
+ ?>
+<form name="search" method="post" action="search.php">
+<label>Search By:
+<select name="field">
+ <option>Title</option>
+ <option>Author</option>
+ <option>ISBN</option>
+</select>
+</label>
+<input name="terms" type="text" value="" size="50" /><br />
+
+
+<input type="submit" name="submit" value="submit" />
+
+<input type="reset" name="reset" value="reset" />
+</form>
+<?php
+ } else {
+ ?>
+
+
+ <table id="results">
+ <tr>
+ <th scope="col" class="label">ISBN</th>
+ <th scope="col" class="label">Title</th>
+ <th scope="col" class="label">Authors</th>
+ <th scope="col" class="label">Quality</th>
+ <th scope="col" class="label">Price</th>
+ <th scope="col" class="label">Quantity</th>
+
+ </tr>
+<?php
+ $quality_codes = array( 0 => "New",
+ 1 => "Great",
+ 2 => "Good",
+ 3 => "Used"
+ );
+
+ for($i=0; $i < count($searchresults); $i++) {
+ $Title = $searchresults[$i]["Title"];
+ $ISBN = $searchresults[$i]["ISBN"];
+ $Author = $searchresults[$i]["Author"];
+ $Author1 = $searchresults[$i]["Author1"];
+ $Price = $searchresults[$i]["Price"];
+ $Quality = $quality_codes[$searchresults[$i]["Quality"]];
+ $Qty = $searchresults[$i]["Qty"];
+
+ echo "<tr><td class=\"Results\">" . $ISBN ."</td>";
+ echo "<td class=\"Results\">" . $Title ."</td>";
+ echo "<td class=\"Results\">" .
$Author."<br/>$Author1</td>";
+
+ echo "<td class=\"Results\">" . $Quality ."</td>";
+ echo "<td class=\"Results\">" . $Price ."</td>";
+ echo "<td class=\"Results\">" . $Qty ."</td></tr>";
+ }
+ ?>
+ </table>
+<?php
+ }
+ ?>
+
+ </th>
+ </tr>
+ </table>
+ <h1>&nbsp;</h1></td>
+ <td>Registered Classes</td>
+ </tr>
+ <tr>
+ <td><p>Class1</p>
+ <p>Class 2</p>
+ <p>Class 3</p></td>
+ </tr>
+ <tr>
+ <td>Books Required</td>
+ </tr>
+ <tr>
+ <td><p>Books for class 1</p>
+ <p>Books for class 2</p>
+ <p>Books for class 3</p></td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <th width="44%" scope="row">&nbsp;</th>
+ <th width="9%" scope="row">Forum</th>
+ <th scope="row">Customer Service</th>
+ <th scope="row">Help</th>
+ <th scope="row">Contact</th>
+ <th scope="row">Package Tracking</th>
+ </tr>
+</table>
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/style.css Fri Dec 3 19:06:02 2010
@@ -0,0 +1,26 @@
+/*
+ Document : style.css
+ Created on : Nov 14, 2010, 7:10:35 PM
+ Author : saul
+ Description:
+ Purpose of the stylesheet follows.
+*/
+
+/*
+ TODO customize this sample style
+ Syntax recommendation http://www.w3.org/TR/REC-CSS2/
+*/
+
+
+root {
+ display: block;
+}
+
+body {
+ font-family: sans, Calibri, Arial;
+}
+
+img#logo {
+ display: block;
+ margin: auto;
+}
=======================================
--- /dev/null
+++ /trunk/BookGet/old/layout/userpage.php Fri Dec 3 19:06:02 2010
@@ -0,0 +1,126 @@
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>My Account</title>
+</head>
+
+<body bgcolor="#000033">
+<table width="99%" height="190" border="1" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
+ <tr>
+ <th width="12%" height="28" scope="col">&nbsp;</th>
+ <th colspan="2" scope="col">&nbsp;</th>
+ <th width="8%" scope="col">&nbsp;</th>
+ <th width="9%" scope="col"><p><u>Cart</u></p></th>
+ <th width="8%" scope="col"><u>Login</u></th>
+ <th width="10%" scope="col"><u>Register</u></th>
+ </tr>
+ <tr>
+ <th rowspan="2" scope="row"><p>Buy/Sell/Trade</p>
+ <p>Dropdown Menu</p></th>
+ <td colspan="5" rowspan="3"><h1 align="center"><img src="img/logo.gif"
width="393" height="205" /></h1></td>
+ <td>Search</td>
+ </tr>
+ <tr>
+ <td>Class Search</td>
+ </tr>
+ <tr>
+ <th rowspan="5" scope="row"><p>Categories</p>
+ <p>(dropdown menus)</p></th>
+ <td>My Info</td>
+ </tr>
+ <tr>
+ <td colspan="5" rowspan="4"><table width="100%" height="763"
border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
+ <tr>
+ <td height="20" colspan="2">Welcome Back </td>
+ </tr>
+ <tr>
+ <td height="20" colspan="2">&nbsp;</td>
+ </tr>
+ <tr>
+ <th height="194" scope="col"><h2><img src="img/box.jpg"
width="132" height="93" /></h2>
+ <h2>Buying</h2>
+ <p style="font-size: x-small">See &amp; Modify Recient
Orders</p></th>
+ <th scope="col" align="left"><h3><em>Purchases </em></h3>
+ <ul>
+ <li><a href="">View Current Orders </a></li>
+ <li><a href="">View Recent Orders</a></li>
+ <li><a href="">View Your Wish List </a></li>
+ <li><a href="">View Pre-Orders</a></li>
+ </ul>
+ <p>&nbsp;</p>
+ <p>&nbsp;</p></th>
+ </tr>
+ <tr>
+ <th height="5" scope="col" >&nbsp;</th>
+ <th scope="col" >&nbsp;</th>
+ </tr>
+ <tr>
+ <th width="29%" height="232" scope="col"><h2><img
src="img/gift-card.jpg" width="209" height="146" /></h2>
+ <h2>Payment</h2>
+ <p style="font-size: x-small">Credit Cards &amp; Gift Cards
</p></th>
+ <th align="left" scope="col"> <h3><em>Payment Methods </em></h3>
+ <ul>
+ <li><a href="">Manage Payment Options</a></li>
+ <li><a href="">Add a Credit Card</a></li>
+ <li><a href="">BookGet Credit Cards</a></li>
+ <li><a href="">View Gift Certificate/Card Balance</a></li>
+ <li><a href="">Apply a Gift Certificate/Card to Your
Account</a></li>
+ <li><a href="">Purchase a Gift Card</a></li>
+ </ul>
+ <p>&nbsp;</p>
+ <p>&nbsp;</p>
+ <p>&nbsp;</p></th>
+ </tr>
+ <tr>
+ <th height="5" scope="col">&nbsp; </th>
+ <th scope="col" align="left">&nbsp; </th>
+ </tr>
+ <tr>
+ <th height="5" scope="col"><h2><img src="img/setting.png"
width="128" height="128" /></h2>
+ <h2>Setting</h2>
+ <p style="font-size: x-small">Name, Password &amp; Email
</p></th>
+ <th scope="col" align="left" ><h3><em>Account Setting </em></h3>
+ <ul>
+ <li><a href="">Change Name </a></li>
+ <li><a href=""> Change Password </a></li>
+ <li><a href="">Change E-mail Adress </a></li>
+ <li><a href="">Manage Adress Book </a></li>
+ <li><a href="">Add New Adress</a></li>
+ <li><a href="">E-mail Preferences &amp;
Notifications</a></li>
+ </ul>
+ <p>&nbsp;</p>
+ <p>&nbsp;</p></th>
+ </tr>
+ <tr> </tr>
+ </table>
+  </td>
+
+ <td>Registered Classes</td>
+ </tr>
+ <tr>
+ <td><p>Class1</p>
+ <p>Class 2</p>
+ <p>Class 3</p></td>
+ </tr>
+ <tr>
+ <td>Books Required</td>
+ </tr>
+ <tr>
+ <td><p>Books for class 1</p>
+ <p>Books for class 2</p>
+ <p>Books for class 3</p></td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <th width="44%" scope="row">&nbsp;</th>
+ <th width="9%" scope="row">Forum</th>
+ <th scope="row">Customer Service</th>
+ <th scope="row">Help</th>
+ <th scope="row">Contact</th>
+ <th scope="row">Package Tracking</th>
+ </tr>
+</table>
+</body>
+</html>
+
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/2.0/example.html Fri Dec 3 19:06:02 2010
@@ -0,0 +1,44 @@
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Sample Setup</title>
+<style type="text/css">
+body { font-family:Arial, Helvetica, sans-serif;
+}
+</style>
+
+<script type="text/javascript" src="jquery-1.3.2.js"></script>
+<script type="text/javascript" src="xmenu.js"></script>
+<link href="xmenu.css" rel="stylesheet" type="text/css">
+
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('#menu').xmenu({url:"links.xml"});
+ });
+</script>
+</head>
+
+<body>
+<p>
+
+ Include jquery, xmenu javascript, and xmenu css in the header of html.
+ <br /><br />
+ And put &lt;div id=&quot;menu&quot;&gt;&lt;/div&gt;inside the body part
of html where you want to place your menu.
+ <Br /><br />
+ Construct xmenu in javascript.
+ <br />
+ <br />
+ View Page Source for referrence
+
+ <br />
+ <br />
+
+ <a href="http://www.the-di-lab.com/?cat=6" target="_blank">Home Page</a>
+
+
+ <div id="menu"></div>
+</p>
+
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/2.0/jquery-1.3.2.js Fri Dec 3 19:06:02
2010
@@ -0,0 +1,4376 @@
+/*!
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){
+
+var
+ // Will speed up references to window, and allows munging its name.
+ window = this,
+ // Will speed up references to undefined, and allows munging its name.
+ undefined,
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ jQuery = window.jQuery = window.$ = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
+ // Is it a simple selector
+ isSimple = /^.[^:#\[\.,]*$/;
+
+jQuery.fn = jQuery.prototype = {
+ init: function( selector, context ) {
+ // Make sure that a selection was provided
+ selector = selector || document;
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this[0] = selector;
+ this.length = 1;
+ this.context = selector;
+ return this;
+ }
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ var match = quickExpr.exec( selector );
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] )
+ selector = jQuery.clean( [ match[1] ], context );
+
+ // HANDLE: $("#id")
+ else {
+ var elem = document.getElementById( match[3] );
+
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem && elem.id != match[3] )
+ return jQuery().find( selector );
+
+ // Otherwise, we inject the element directly into the jQuery object
+ var ret = jQuery( elem || [] );
+ ret.context = document;
+ ret.selector = selector;
+ return ret;
+ }
+
+ // HANDLE: $(expr, [context])
+ // (which is just equivalent to: $(content).find(expr)
+ } else
+ return jQuery( context ).find( selector );
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) )
+ return jQuery( document ).ready( selector );
+
+ // Make sure that old selector state is passed along
+ if ( selector.selector && selector.context ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return this.setArray(jQuery.isArray( selector ) ?
+ selector :
+ jQuery.makeArray(selector));
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.3.2",
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num === undefined ?
+
+ // Return a 'clean' array
+ Array.prototype.slice.call( this ) :
+
+ // Return just the object
+ this[ num ];
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = jQuery( elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" )
+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
+ else if ( name )
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Force the current matched set of elements to become
+ // the specified array of elements (destroying the stack in the process)
+ // You should use pushStack() in order to do this, but maintain the stack
+ setArray: function( elems ) {
+ // Resetting the length to 0, then using the native Array push
+ // is a super-fast way to populate an object with array-like properties
+ this.length = 0;
+ Array.prototype.push.apply( this, elems );
+
+ return this;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem && elem.jquery ? elem[0] : elem
+ , this );
+ },
+
+ attr: function( name, value, type ) {
+ var options = name;
+
+ // Look for the case where we're accessing a style value
+ if ( typeof name === "string" )
+ if ( value === undefined )
+ return this[0] && jQuery[ type || "attr" ]( this[0], name );
+
+ else {
+ options = {};
+ options[ name ] = value;
+ }
+
+ // Check to see if we're setting style values
+ return this.each(function(i){
+ // Set all the styles
+ for ( name in options )
+ jQuery.attr(
+ type ?
+ this.style :
+ this,
+ name, jQuery.prop( this, options[ name ], type, i, name )
+ );
+ });
+ },
+
+ css: function( key, value ) {
+ // ignore negative width and height values
+ if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
+ value = undefined;
+ return this.attr( key, value, "curCSS" );
+ },
+
+ text: function( text ) {
+ if ( typeof text !== "object" && text != null )
+ return this.empty().append( (this[0] && this[0].ownerDocument ||
document).createTextNode( text ) );
+
+ var ret = "";
+
+ jQuery.each( text || this, function(){
+ jQuery.each( this.childNodes, function(){
+ if ( this.nodeType != 8 )
+ ret += this.nodeType != 1 ?
+ this.nodeValue :
+ jQuery.fn.text( [ this ] );
+ });
+ });
+
+ return ret;
+ },
+
+ wrapAll: function( html ) {
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).clone();
+
+ if ( this[0].parentNode )
+ wrap.insertBefore( this[0] );
+
+ wrap.map(function(){
+ var elem = this;
+
+ while ( elem.firstChild )
+ elem = elem.firstChild;
+
+ return elem;
+ }).append(this);
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ return this.each(function(){
+ jQuery( this ).contents().wrapAll( html );
+ });
+ },
+
+ wrap: function( html ) {
+ return this.each(function(){
+ jQuery( this ).wrapAll( html );
+ });
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function(elem){
+ if (this.nodeType == 1)
+ this.appendChild( elem );
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function(elem){
+ if (this.nodeType == 1)
+ this.insertBefore( elem, this.firstChild );
+ });
+ },
+
+ before: function() {
+ return this.domManip(arguments, false, function(elem){
+ this.parentNode.insertBefore( elem, this );
+ });
+ },
+
+ after: function() {
+ return this.domManip(arguments, false, function(elem){
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ });
+ },
+
+ end: function() {
+ return this.prevObject || jQuery( [] );
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: [].push,
+ sort: [].sort,
+ splice: [].splice,
+
+ find: function( selector ) {
+ if ( this.length === 1 ) {
+ var ret = this.pushStack( [], "find", selector );
+ ret.length = 0;
+ jQuery.find( selector, this[0], ret );
+ return ret;
+ } else {
+ return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
+ return jQuery.find( selector, elem );
+ })), "find", selector );
+ }
+ },
+
+ clone: function( events ) {
+ // Do the clone
+ var ret = this.map(function(){
+ if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
+ // IE copies events bound via attachEvent when
+ // using cloneNode. Calling detachEvent on the
+ // clone will also remove the events from the orignal
+ // In order to get around this, we use innerHTML.
+ // Unfortunately, this means some modifications to
+ // attributes in IE that are actually only stored
+ // as properties will not be copied (such as the
+ // the name attribute on an input).
+ var html = this.outerHTML;
+ if ( !html ) {
+ var div = this.ownerDocument.createElement("div");
+ div.appendChild( this.cloneNode(true) );
+ html = div.innerHTML;
+ }
+
+ return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|
null)"/g, "").replace(/^\s*/, "")])[0];
+ } else
+ return this.cloneNode(true);
+ });
+
+ // Copy the events from the original to the clone
+ if ( events === true ) {
+ var orig = this.find("*").andSelf(), i = 0;
+
+ ret.find("*").andSelf().each(function(){
+ if ( this.nodeName !== orig[i].nodeName )
+ return;
+
+ var events = jQuery.data( orig[i], "events" );
+
+ for ( var type in events ) {
+ for ( var handler in events[ type ] ) {
+ jQuery.event.add( this, type, events[ type ][ handler ], events[
type ][ handler ].data );
+ }
+ }
+
+ i++;
+ });
+ }
+
+ // Return the cloned set
+ return ret;
+ },
+
+ filter: function( selector ) {
+ return this.pushStack(
+ jQuery.isFunction( selector ) &&
+ jQuery.grep(this, function(elem, i){
+ return selector.call( elem, i );
+ }) ||
+
+ jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
+ return elem.nodeType === 1;
+ }) ), "filter", selector );
+ },
+
+ closest: function( selector ) {
+ var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) :
null,
+ closer = 0;
+
+ return this.map(function(){
+ var cur = this;
+ while ( cur && cur.ownerDocument ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {
+ jQuery.data(cur, "closest", closer);
+ return cur;
+ }
+ cur = cur.parentNode;
+ closer++;
+ }
+ });
+ },
+
+ not: function( selector ) {
+ if ( typeof selector === "string" )
+ // test special case where just one selector is passed in
+ if ( isSimple.test( selector ) )
+ return this.pushStack( jQuery.multiFilter( selector, this, true
), "not", selector );
+ else
+ selector = jQuery.multiFilter( selector, this );
+
+ var isArrayLike = selector.length && selector[selector.length - 1] !==
undefined && !selector.nodeType;
+ return this.filter(function() {
+ return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this !=
selector;
+ });
+ },
+
+ add: function( selector ) {
+ return this.pushStack( jQuery.unique( jQuery.merge(
+ this.get(),
+ typeof selector === "string" ?
+ jQuery( selector ) :
+ jQuery.makeArray( selector )
+ )));
+ },
+
+ is: function( selector ) {
+ return !!selector && jQuery.multiFilter( selector, this ).length > 0;
+ },
+
+ hasClass: function( selector ) {
+ return !!selector && this.is( "." + selector );
+ },
+
+ val: function( value ) {
+ if ( value === undefined ) {
+ var elem = this[0];
+
+ if ( elem ) {
+ if( jQuery.nodeName( elem, 'option' ) )
+ return (elem.attributes.value || {}).specified ? elem.value :
elem.text;
+
+ // We need to handle select boxes special
+ if ( jQuery.nodeName( elem, "select" ) ) {
+ var index = elem.selectedIndex,
+ values = [],
+ options = elem.options,
+ one = elem.type == "select-one";
+
+ // Nothing was selected
+ if ( index < 0 )
+ return null;
+
+ // Loop through all the selected options
+ for ( var i = one ? index : 0, max = one ? index + 1 :
options.length; i < max; i++ ) {
+ var option = options[ i ];
+
+ if ( option.selected ) {
+ // Get the specifc value for the option
+ value = jQuery(option).val();
+
+ // We don't need an array for one selects
+ if ( one )
+ return value;
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ }
+
+ // Everything else, we just grab the value
+ return (elem.value || "").replace(/\r/g, "");
+
+ }
+
+ return undefined;
+ }
+
+ if ( typeof value === "number" )
+ value += '';
+
+ return this.each(function(){
+ if ( this.nodeType != 1 )
+ return;
+
+ if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
+ this.checked = (jQuery.inArray(this.value, value) >= 0 ||
+ jQuery.inArray(this.name, value) >= 0);
+
+ else if ( jQuery.nodeName( this, "select" ) ) {
+ var values = jQuery.makeArray(value);
+
+ jQuery( "option", this ).each(function(){
+ this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
+ jQuery.inArray( this.text, values ) >= 0);
+ });
+
+ if ( !values.length )
+ this.selectedIndex = -1;
+
+ } else
+ this.value = value;
+ });
+ },
+
+ html: function( value ) {
+ return value === undefined ?
+ (this[0] ?
+ this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") :
+ null) :
+ this.empty().append( value );
+ },
+
+ replaceWith: function( value ) {
+ return this.after( value ).remove();
+ },
+
+ eq: function( i ) {
+ return this.slice( i, +i + 1 );
+ },
+
+ slice: function() {
+ return this.pushStack( Array.prototype.slice.apply( this, arguments ),
+ "slice", Array.prototype.slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function(elem, i){
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ andSelf: function() {
+ return this.add( this.prevObject );
+ },
+
+ domManip: function( args, table, callback ) {
+ if ( this[0] ) {
+ var fragment = (this[0].ownerDocument ||
this[0]).createDocumentFragment(),
+ scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]),
fragment ),
+ first = fragment.firstChild;
+
+ if ( first )
+ for ( var i = 0, l = this.length; i < l; i++ )
+ callback.call( root(this[i], first), this.length > 1 || i > 0 ?
+ fragment.cloneNode(true) : fragment );
+
+ if ( scripts )
+ jQuery.each( scripts, evalScript );
+ }
+
+ return this;
+
+ function root( elem, cur ) {
+ return table && jQuery.nodeName(elem, "table") &&
jQuery.nodeName(cur, "tr") ?
+ (elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+ elem;
+ }
+ }
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+function evalScript( i, elem ) {
+ if ( elem.src )
+ jQuery.ajax({
+ url: elem.src,
+ async: false,
+ dataType: "script"
+ });
+
+ else
+ jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || ""
);
+
+ if ( elem.parentNode )
+ elem.parentNode.removeChild( elem );
+}
+
+function now(){
+ return +new Date;
+}
+
+jQuery.extend = jQuery.fn.extend = function() {
+ // copy reference to target object
+ var target = arguments[0] || {}, i = 1, length = arguments.length, deep =
false, options;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep
copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) )
+ target = {};
+
+ // extend jQuery itself if only one argument is passed
+ if ( length == i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ )
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null )
+ // Extend the base object
+ for ( var name in options ) {
+ var src = target[ name ], copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy )
+ continue;
+
+ // Recurse if we're merging object values
+ if ( deep && copy && typeof copy === "object" && !copy.nodeType )
+ target[ name ] = jQuery.extend( deep,
+ // Never move original objects, clone them
+ src || ( copy.length != null ? [ ] : { } )
+ , copy );
+
+ // Don't bring in undefined values
+ else if ( copy !== undefined )
+ target[ name ] = copy;
+
+ }
+
+ // Return the modified object
+ return target;
+};
+
+// exclude the following css properties to add px
+var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
+ // cache defaultView
+ defaultView = document.defaultView || {},
+ toString = Object.prototype.toString;
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ window.$ = _$;
+
+ if ( deep )
+ window.jQuery = _jQuery;
+
+ return jQuery;
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return toString.call(obj) === "[object Function]";
+ },
+
+ isArray: function( obj ) {
+ return toString.call(obj) === "[object Array]";
+ },
+
+ // check if an element is in a (or is an) XML document
+ isXMLDoc: function( elem ) {
+ return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
+ !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
+ },
+
+ // Evalulates a script in a global context
+ globalEval: function( data ) {
+ if ( data && /\S/.test(data) ) {
+ // Inspired by code by Andrea Giammarchi
+ //
http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+ var head = document.getElementsByTagName("head")[0] ||
document.documentElement,
+ script = document.createElement("script");
+
+ script.type = "text/javascript";
+ if ( jQuery.support.scriptEval )
+ script.appendChild( document.createTextNode( data ) );
+ else
+ script.text = data;
+
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709).
+ head.insertBefore( script, head.firstChild );
+ head.removeChild( script );
+ }
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() ==
name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0, length = object.length;
+
+ if ( args ) {
+ if ( length === undefined ) {
+ for ( name in object )
+ if ( callback.apply( object[ name ], args ) === false )
+ break;
+ } else
+ for ( ; i < length; )
+ if ( callback.apply( object[ i++ ], args ) === false )
+ break;
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( length === undefined ) {
+ for ( name in object )
+ if ( callback.call( object[ name ], name, object[ name ] ) === false )
+ break;
+ } else
+ for ( var value = object[0];
+ i < length && callback.call( value, i, value ) !== false; value =
object[++i] ){}
+ }
+
+ return object;
+ },
+
+ prop: function( elem, value, type, i, name ) {
+ // Handle executable functions
+ if ( jQuery.isFunction( value ) )
+ value = value.call( elem, i );
+
+ // Handle passing in a number to a CSS property
+ return typeof value === "number" && type == "curCSS" && !exclude.test(
name ) ?
+ value + "px" :
+ value;
+ },
+
+ className: {
+ // internal only, use addClass("class")
+ add: function( elem, classNames ) {
+ jQuery.each((classNames || "").split(/\s+/), function(i, className){
+ if ( elem.nodeType == 1 && !jQuery.className.has( elem.className,
className ) )
+ elem.className += (elem.className ? " " : "") + className;
+ });
+ },
+
+ // internal only, use removeClass("class")
+ remove: function( elem, classNames ) {
+ if (elem.nodeType == 1)
+ elem.className = classNames !== undefined ?
+ jQuery.grep(elem.className.split(/\s+/), function(className){
+ return !jQuery.className.has( classNames, className );
+ }).join(" ") :
+ "";
+ },
+
+ // internal only, use hasClass("class")
+ has: function( elem, className ) {
+ return elem && jQuery.inArray( className, (elem.className ||
elem).toString().split(/\s+/) ) > -1;
+ }
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct
calculations
+ swap: function( elem, options, callback ) {
+ var old = {};
+ // Remember the old values, and insert the new ones
+ for ( var name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ callback.call( elem );
+
+ // Revert the old values
+ for ( var name in options )
+ elem.style[ name ] = old[ name ];
+ },
+
+ css: function( elem, name, force, extra ) {
+ if ( name == "width" || name == "height" ) {
+ var val, props = { position: "absolute", visibility: "hidden",
display:"block" }, which = name == "width" ? [ "Left", "Right" ] :
[ "Top", "Bottom" ];
+
+ function getWH() {
+ val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
+
+ if ( extra === "border" )
+ return;
+
+ jQuery.each( which, function() {
+ if ( !extra )
+ val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
+ if ( extra === "margin" )
+ val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
+ else
+ val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width",
true)) || 0;
+ });
+ }
+
+ if ( elem.offsetWidth !== 0 )
+ getWH();
+ else
+ jQuery.swap( elem, props, getWH );
+
+ return Math.max(0, Math.round(val));
+ }
+
+ return jQuery.curCSS( elem, name, force );
+ },
+
+ curCSS: function( elem, name, force ) {
+ var ret, style = elem.style;
+
+ // We need to handle opacity special in IE
+ if ( name == "opacity" && !jQuery.support.opacity ) {
+ ret = jQuery.attr( style, "opacity" );
+
+ return ret == "" ?
+ "1" :
+ ret;
+ }
+
+ // Make sure we're using the right name for getting the float value
+ if ( name.match( /float/i ) )
+ name = styleFloat;
+
+ if ( !force && style && style[ name ] )
+ ret = style[ name ];
+
+ else if ( defaultView.getComputedStyle ) {
+
+ // Only "float" is needed here
+ if ( name.match( /float/i ) )
+ name = "float";
+
+ name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
+
+ var computedStyle = defaultView.getComputedStyle( elem, null );
+
+ if ( computedStyle )
+ ret = computedStyle.getPropertyValue( name );
+
+ // We should always get a number back from opacity
+ if ( name == "opacity" && ret == "" )
+ ret = "1";
+
+ } else if ( elem.currentStyle ) {
+ var camelCase = name.replace(/\-(\w)/g, function(all, letter){
+ return letter.toUpperCase();
+ });
+
+ ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
+ // Remember the original values
+ var left = style.left, rsLeft = elem.runtimeStyle.left;
+
+ // Put in the new values to get a computed value out
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ style.left = ret || 0;
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ elem.runtimeStyle.left = rsLeft;
+ }
+ }
+
+ return ret;
+ },
+
+ clean: function( elems, context, fragment ) {
+ context = context || document;
+
+ // !context.createElement fails in IE with an error but returns
typeof 'object'
+ if ( typeof context.createElement === "undefined" )
+ context = context.ownerDocument || context[0] &&
context[0].ownerDocument || document;
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) {
+ var match = /^<(\w+)\s*\/?>$/.exec(elems[0]);
+ if ( match )
+ return [ context.createElement( match[1] ) ];
+ }
+
+ var ret = [], scripts = [], div = context.createElement("div");
+
+ jQuery.each(elems, function(i, elem){
+ if ( typeof elem === "number" )
+ elem += '';
+
+ if ( !elem )
+ return;
+
+ // Convert html string into DOM nodes
+ if ( typeof elem === "string" ) {
+ // Fix "XHTML"-style tags in all browsers
+ elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
+ return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|
embed)$/i) ?
+ all :
+ front + "></" + tag + ">";
+ });
+
+ // Trim whitespace, otherwise indexOf won't work as expected
+ var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase();
+
+ var wrap =
+ // option or optgroup
+ !tags.indexOf("<opt") &&
+ [ 1, "<select multiple='multiple'>", "</select>" ] ||
+
+ !tags.indexOf("<leg") &&
+ [ 1, "<fieldset>", "</fieldset>" ] ||
+
+ tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
+ [ 1, "<table>", "</table>" ] ||
+
+ !tags.indexOf("<tr") &&
+ [ 2, "<table><tbody>", "</tbody></table>" ] ||
+
+ // <thead> matched above
+ (!tags.indexOf("<td") || !tags.indexOf("<th")) &&
+ [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
+
+ !tags.indexOf("<col") &&
+ [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
+
+ // IE can't serialize <link> and <script> tags normally
+ !jQuery.support.htmlSerialize &&
+ [ 1, "div<div>", "</div>" ] ||
+
+ [ 0, "", "" ];
+
+ // Go to html and back, then peel off extra wrappers
+ div.innerHTML = wrap[1] + elem + wrap[2];
+
+ // Move to the right depth
+ while ( wrap[0]-- )
+ div = div.lastChild;
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ var hasBody = /<tbody/i.test(elem),
+ tbody = !tags.indexOf("<table") && !hasBody ?
+ div.firstChild && div.firstChild.childNodes :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[1] == "<table>" && !hasBody ?
+ div.childNodes :
+ [];
+
+ for ( var j = tbody.length - 1; j >= 0 ; --j )
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j
].childNodes.length )
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
+
+ }
+
+ // IE completely kills leading whitespace when innerHTML is used
+ if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
+ div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ),
div.firstChild );
+
+ elem = jQuery.makeArray( div.childNodes );
+ }
+
+ if ( elem.nodeType )
+ ret.push( elem );
+ else
+ ret = jQuery.merge( ret, elem );
+
+ });
+
+ if ( fragment ) {
+ for ( var i = 0; ret[i]; i++ ) {
+ if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type ||
ret[i].type.toLowerCase() === "text/javascript") ) {
+ scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild(
ret[i] ) : ret[i] );
+ } else {
+ if ( ret[i].nodeType === 1 )
+ ret.splice.apply( ret, [i + 1,
0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
+ fragment.appendChild( ret[i] );
+ }
+ }
+
+ return scripts;
+ }
+
+ return ret;
+ },
+
+ attr: function( elem, name, value ) {
+ // don't set attributes on text and comment nodes
+ if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
+ return undefined;
+
+ var notxml = !jQuery.isXMLDoc( elem ),
+ // Whether we are setting (or getting)
+ set = value !== undefined;
+
+ // Try to normalize/fix the name
+ name = notxml && jQuery.props[ name ] || name;
+
+ // Only do all the following if this is a node (faster for style)
+ // IE elem.getAttribute passes even for style
+ if ( elem.tagName ) {
+
+ // These attributes require special treatment
+ var special = /href|src|style/.test( name );
+
+ // Safari mis-reports the default selected property of a hidden option
+ // Accessing the parent's selectedIndex property fixes it
+ if ( name == "selected" && elem.parentNode )
+ elem.parentNode.selectedIndex;
+
+ // If applicable, access the attribute via the DOM 0 way
+ if ( name in elem && notxml && !special ) {
+ if ( set ){
+ // We can't allow the type property to be changed (since it causes
problems in IE)
+ if ( name == "type" && jQuery.nodeName( elem, "input" ) &&
elem.parentNode )
+ throw "type property can't be changed";
+
+ elem[ name ] = value;
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/2.0/links.xml Fri Dec 3 19:06:02 2010
@@ -0,0 +1,57 @@
+ÿþ< ? x m l v e r s i o n = " 1 . 0 "
e n c o d i n g = " U T F - 1 6 " ? >
+
+
+
+ < m e n u >
+
+
+
+ < g r o u p >
+
+
+
+ < t i t l e > M e n u - A < / t i t l e >
+
+
+
+ < l i n k
h r e f = " h t t p : / / w w w . t h e - d i - l a b . c o m " > L i n k
A < / l i n k >
+
+
+
+ < l i n k
h r e f = " h t t p : / / w w w . t h e - d i - l a b . c o m " > L i n k
B < / l i n k >
+
+
+
+ < l i n k
h r e f = " h t t p : / / w w w . t h e - d i - l a b . c o m " > L i n k
C < / l i n k >
+
+
+
+ < / g r o u p >
+
+
+
+ < g r o u p >
+
+
+
+ < t i t l e > M e n u - A < / t i t l e >
+
+
+
+ < l i n k
h r e f = " h t t p : / / w w w . t h e - d i - l a b . c o m " > L i n k
A < / l i n k >
+
+
+
+ < l i n k
h r e f = " h t t p : / / w w w . t h e - d i - l a b . c o m " > L i n k
B < / l i n k >
+
+
+
+ < l i n k
h r e f = " h t t p : / / w w w . t h e - d i - l a b . c o m " > L i n k
C < / l i n k >
+
+
+
+ < / g r o u p >
+
+
+
+ < / m e n u >
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/2.0/xmenu.css Fri Dec 3 19:06:02 2010
@@ -0,0 +1,56 @@
+/****************** ul style ************/
+.xmenu-ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ margin-left: 2px;
+}
+
+/****************** list style ************/
+.xmenu-li{
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ cursor: pointer;;
+}
+
+.xmenu-title {
+
+}
+
+.xmenu-item {
+
+}
+/****************** a style ************/
+.xmenu-a {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ display: block;
+ text-align: center;
+ width: 200px;
+ font-family: sans-serif;
+ color:#fff;
+}
+
+
+
+.xmenu-link-title {
+ background-color: #000;
+ height:50px;
+ font-weight: bold;
+ font-size: 36px;
+ margin-top:2px;
+}
+
+.xmenu-link-item {
+ height:30px;
+ background-color: #333333;
+ margin-top:2px;
+ font-size: 24px;
+}
+
+/****************** item hover css ************/
+.xmenu-item a:hover{
+ background-color: #999999;
+}
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/2.0/xmenu.js Fri Dec 3 19:06:02 2010
@@ -0,0 +1,199 @@
+/* Xml Menu
+ * Version 1.0
+ * Author The-Di-Lab
+ * URI: http://www.The-Di-Lab.com
+ * Released with the No MIT License:
+ * But it is totally Free :-)
+ */
+
+
+ (function($) {
+
+ $.fn.xmenu = function (options) {
+ var defaults = {
+ url: null,
+ open: "all",
+ init: "all",
+ effect:"slide"
+ }
+ var options = $.extend(defaults, options);
+
+ function UlItem (paraLabel) {
+ //v1.1
+ var eff = options.effect;
+ //v.1.1
+
+ var ulDom = document.createElement("ul");
+ var liDom = document.createElement("li");
+ var aDom = document.createElement("a");
+
+ $(ulDom).addClass("xmenu-ul");
+ $(liDom).addClass("xmenu-li xmenu-title");
+ $(aDom).addClass("xmenu-a xmenu-link-title");
+
+ $(aDom).append(paraLabel);
+ $(liDom).append(aDom);
+ $(ulDom).append(liDom);
+
+ $(liDom).click(function() {
+ if
($(this).siblings().css("display")==="none") {
+
+ //v1.1
+ if(eff=="fade"){
+
$(this).siblings().fadeIn();
+ } else {
+
$(this).siblings().slideDown();
+ }
+ //v.1.1
+
+ if(options.open==="single") {
+
$(this).parent().siblings().each(function(){
+
+ //v1.1 extra
animation option
+ if(eff=="fade"){
+
$(this).children().not(".xmenu-title").fadeOut();
+ } else {
+
$(this).children().not(".xmenu-title").slideUp();
+ }
+ //v.1.1 extra animation
option
+ });
+ }
+
+ } else {
+
+ //v1.1 extra
animation option
+
if(eff=="fade"){
+
$(this).siblings().fadeOut();
+ } else {
+
$(this).siblings().slideUp();
+ }
+ //v.1.1
extra animation option
+
+ if(options.open==="single") {
+
$(this).parent().siblings().each(function(){
+ //v1.1 extra
animation option
+
if(eff=="fade"){
+
$(this).children().not(".xmenu-title").fadeOut();
+ } else {
+
$(this).children().not(".xmenu-title").slideUp();
+ }
+ //v.1.1
extra animation option
+ });
+ }
+ }
+ });
+
+ var closeOthers = function() {
+
$(liDom).parent().siblings().each(function(){
+ if
($(this).children().not(".xmenu-title").css("display") === "block") {
+ //v1.1 extra
animation option
+
if(eff=="fade"){
+
$(this).children().not(".xmenu-title").fadeOut();
+ } else {
+
$(this).children().not(".xmenu-title").slideUp();
+ }
+ //v.1.1 extra
animation option
+ }
+ });
+ };
+
+ return ulDom;
+ }
+ function ListItem(paraLabel,paraUrl,status) {
+ var liDom = document.createElement("li");
+ var aDom = document.createElement("a");
+
+ if(status==="close") {
+ $(liDom).css("display","none");
+ } else {
+ $(liDom).css("display","block");
+ }
+
+ $(aDom).attr("href",paraUrl);
+ $(aDom).css("text-decoration","none");
+ $(aDom).attr("target","_blank");
+
+ $(liDom).addClass("xmenu-li xmenu-item");
+ $(aDom).addClass("xmenu-a xmenu-link-item");
+
+ $(aDom).append(paraLabel);
+ $(liDom).append(aDom);
+
+
+ return liDom;
+ }
+ return this.each(function(){
+
+ var o = options;
+ //some validation
+ if(o.url===null) {
+ alert("opps, please specify xml file name.");
+ return false;
+ }
+ //application logic
+ var thisObj = this;
+
+ $.ajax({
+ type: "GET",
+ url: o.url,
+ //dataType: "xml",
+ dataType: ($.browser.msie) ? "text" : "xml",
+ beforeSend: function() {
+ $(thisObj).text("Loading .......");
+
+ },
+ success: function(data) {
+
+ //Using the right MIME type
+ var xml;
+ if (typeof data == "string") {
+ xml = new ActiveXObject("Microsoft.XMLDOM");
+ xml.async = false;
+ xml.loadXML(data);
+ } else {
+ xml = data;
+ }
+ //Using the right MIME type
+
+
+ $(thisObj).empty();
+ $(xml).find('group').each(function(i){
+
+
+ var title = $(this).find("title").text();
+ var ulItem = UlItem(title);
+
+ //default openning menu
+ if(o.init=="all") {
+ var status="open";
+ }else if(i==o.init) {
+ var status="open";
+ } else {
+ var status="close";
+ }
+
+
+
+ $(this).find("link").each(function() {
+
+ var href = $(this).attr("href");
+ var label = $(this).text();
+ var listItem = ListItem(label,href,status);
+
+ $(ulItem).append(listItem);
+ }); //close each
+
+ $(thisObj).fadeIn().append(ulItem);
+
+ }); //close each
+ },
+ ajaxError: function() {
+ alert('5');
+ }
+ });
+
+ });
+
+
+ };
+ })(jQuery);
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/Untitled-1.html Fri Dec 3 19:06:02 2010
@@ -0,0 +1,113 @@
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Shopping Cart</title>
+</head>
+
+<body bgcolor="#000033">
+<table width="99%" height="190" border="1" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
+ <tr>
+ <th width="12%" height="28" scope="col">&nbsp;</th>
+ <th colspan="3" scope="col">&nbsp;</th>
+ <th width="9%" scope="col"><p><u>Cart</u></p></th>
+ <th width="8%" scope="col"><u>Login</u></th>
+ <th width="10%" scope="col"><u>Register</u></th>
+ </tr>
+ <tr>
+ <th rowspan="2" scope="row"><p>Buy/Sell/Trade</p>
+ <p>Dropdown Menu</p></th>
+ <td colspan="5" rowspan="2"><h1 align="center">Logo</h1></td>
+ <td>Search</td>
+ </tr>
+ <tr>
+ <td>Class Search</td>
+ </tr>
+ <tr>
+ <th rowspan="5" scope="row"><p>Categories</p>
+ <p>(dropdown menus)</p></th>
+ <td colspan="5">Username's Cart</td>
+ <td>My Info</td>
+ </tr>
+ <tr>
+ <td colspan="5" rowspan="3"><table width="100%" height="154"
border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
+ <tr>
+ <th width="25%" scope="col">Title</th>
+ <th width="20%" scope="col">ISBN</th>
+ <th width="23%" scope="col">Class</th>
+ <th width="14%" bgcolor="#FFFFFF" scope="col">Quantity</th>
+ <th width="18%" scope="col">Price</th>
+ </tr>
+ <tr>
+ <th scope="row">Book 1</th>
+ <td> 00000000000000</td>
+ <td>Biochem</td>
+ <td>1</td>
+ <td>00.00</td>
+ </tr>
+ <tr>
+ <th scope="row">Book 2</th>
+ <td>00000000000001</td>
+ <td>Biochem</td>
+ <td>1</td>
+ <td>00.00</td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>Total 00.00</td>
+ </tr>
+ </table>
+ <table width="100%" border="1" cellpadding="0" cellspacing="0"
bgcolor="#FFFFFF">
+ <tr>
+ <th rowspan="3" scope="col"><p>Shipping options</p>
+ <p>Ground</p></th>
+ <th scope="col"><p>Shipping Cost</p>
+ <p>00.00</p></th>
+ </tr>
+ <tr>
+ <th scope="col">Tax 00.00</th>
+ </tr>
+ <tr>
+ <th scope="col">Total 00.00</th>
+ </tr>
+ <tr>
+ <th scope="row">Billing Information</th>
+ <th scope="row">Shipping Information</th>
+ </tr>
+ </table>
+ <h1>&nbsp;</h1></td>
+ <td>Registered Classes</td>
+ </tr>
+ <tr>
+ <td><p>Class1</p>
+ <p>Class 2</p>
+ <p>Class 3</p></td>
+ </tr>
+ <tr>
+ <td>Books Required</td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>Submit</td>
+ <td width="8%">Update Cart</td>
+ <td>Continue Shopping</td>
+ <td>Automated Shopping Assistance</td>
+ <td><p>Books for class 1</p>
+ <p>Books for class 2</p>
+ <p>Books for class 3</p></td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <th width="44%" scope="row">&nbsp;</th>
+ <th width="9%" scope="row">Forum</th>
+ <th scope="row">Customer Service</th>
+ <th scope="row">Help</th>
+ <th scope="row">Contact</th>
+ <th scope="row">Package Tracking</th>
+ </tr>
+</table>
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/Untitled-2.html Fri Dec 3 19:06:02 2010
@@ -0,0 +1,68 @@
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Login Page</title>
+</head>
+
+<body bgcolor="#000033">
+<table width="99%" height="190" border="1" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
+ <tr>
+ <th width="12%" height="28" scope="col">&nbsp;</th>
+ <th colspan="2" scope="col">&nbsp;</th>
+ <th width="8%" scope="col">&nbsp;</th>
+ <th width="9%" scope="col"><p><u>Cart</u></p></th>
+ <th width="8%" scope="col"><u>Login</u></th>
+ <th width="10%" scope="col"><u>Register</u></th>
+ </tr>
+ <tr>
+ <th rowspan="2" scope="row"><p>Buy/Sell/Trade</p>
+ <p>Dropdown Menu</p></th>
+ <td colspan="5" rowspan="2"><h1 align="center">Logo</h1></td>
+ <td>Search</td>
+ </tr>
+ <tr>
+ <td>Class Search</td>
+ </tr>
+ <tr>
+ <th rowspan="5" scope="row"><p>Categories</p>
+ <p>(dropdown menus)</p></th>
+ <td colspan="5">&nbsp;</td>
+ <td>My Info</td>
+ </tr>
+ <tr>
+ <td colspan="4" rowspan="4"><table width="100%" height="166"
border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
+ <tr>
+ <th width="50%" height="126" scope="col">Register New User</th>
+ <th width="50%" scope="col">Account Login</th>
+ </tr>
+ </table>
+ <h1>&nbsp;</h1></td>
+ <td rowspan="4">&nbsp;</td>
+ <td>Registered Classes</td>
+ </tr>
+ <tr>
+ <td><p>Class1</p>
+ <p>Class 2</p>
+ <p>Class 3</p></td>
+ </tr>
+ <tr>
+ <td>Books Required</td>
+ </tr>
+ <tr>
+ <td><p>Books for class 1</p>
+ <p>Books for class 2</p>
+ <p>Books for class 3</p></td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <th width="44%" scope="row">&nbsp;</th>
+ <th width="9%" scope="row">Forum</th>
+ <th scope="row">Customer Service</th>
+ <th scope="row">Help</th>
+ <th scope="row">Contact</th>
+ <th scope="row">Package Tracking</th>
+ </tr>
+</table>
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/Untitled-3.html Fri Dec 3 19:06:02 2010
@@ -0,0 +1,70 @@
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Search Results</title>
+</head>
+
+<body bgcolor="#000033">
+<table width="99%" height="190" border="1" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
+ <tr>
+ <th width="12%" height="28" scope="col">&nbsp;</th>
+ <th colspan="2" scope="col">&nbsp;</th>
+ <th width="8%" scope="col">&nbsp;</th>
+ <th width="9%" scope="col"><p><u>Cart</u></p></th>
+ <th width="8%" scope="col"><u>Login</u></th>
+ <th width="10%" scope="col"><u>Register</u></th>
+ </tr>
+ <tr>
+ <th rowspan="2" scope="row"><p>Buy/Sell/Trade</p>
+ <p>Dropdown Menu</p></th>
+ <td colspan="5" rowspan="2"><h1 align="center">Logo</h1></td>
+ <td>Search</td>
+ </tr>
+ <tr>
+ <td>Class Search</td>
+ </tr>
+ <tr>
+ <th rowspan="5" scope="row"><p>Categories</p>
+ <p>(dropdown menus)</p></th>
+ <td colspan="5">Search Trace</td>
+ <td>My Info</td>
+ </tr>
+ <tr>
+ <td colspan="5" rowspan="4"><table width="99%" border="0"
cellspacing="0" cellpadding="0" id=header>
+ <tr>
+ <th width="25%" bgcolor="#FFFFFF" scope="col">Cover</th>
+ <th width="25%" bgcolor="#FFFFFF" scope="col">Title</th>
+ <th width="10%" bgcolor="#FFFFFF" scope="col">Author</th>
+ <th width="25%" bgcolor="#FFFFFF" scope="col">ISBN</th>
+
+ <th width="15%" bgcolor="#FFFFFF" scope="col"><p>Price</p></th>
+ </tr>
+ </table> <h1>&nbsp;</h1></td>
+ <td>Registered Classes</td>
+ </tr>
+ <tr>
+ <td><p>Class1</p>
+ <p>Class 2</p>
+ <p>Class 3</p></td>
+ </tr>
+ <tr>
+ <td>Books Required</td>
+ </tr>
+ <tr>
+ <td><p>Books for class 1</p>
+ <p>Books for class 2</p>
+ <p>Books for class 3</p></td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <th width="44%" scope="row">&nbsp;</th>
+ <th width="9%" scope="row">Forum</th>
+ <th scope="row">Customer Service</th>
+ <th scope="row">Help</th>
+ <th scope="row">Contact</th>
+ <th scope="row">Package Tracking</th>
+ </tr>
+</table>
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/Untitled-4.html Fri Dec 3 19:06:02 2010
@@ -0,0 +1,61 @@
+<!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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>XXXXXX's Homepage</title>
+</head>
+
+<body bgcolor="#000033">
+<table width="99%" height="190" border="1" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
+ <tr>
+ <th width="12%" height="28" scope="col">&nbsp;</th>
+ <th colspan="2" scope="col">&nbsp;</th>
+ <th width="8%" scope="col">&nbsp;</th>
+ <th width="9%" scope="col"><p><u>Cart</u></p></th>
+ <th width="8%" scope="col"><u>Login</u></th>
+ <th width="10%" scope="col"><u>Register</u></th>
+ </tr>
+ <tr>
+ <th rowspan="2" scope="row"><p>Buy/Sell/Trade</p>
+ <p>Dropdown Menu</p></th>
+ <td colspan="5" rowspan="2"><h1 align="center">Logo</h1></td>
+ <td>Search</td>
+ </tr>
+ <tr>
+ <td>Class Search</td>
+ </tr>
+ <tr>
+ <th rowspan="5" scope="row"><p>Categories</p>
+ <p>(dropdown menus)</p></th>
+ <td colspan="5">Homepage</td>
+ <td>My Info</td>
+ </tr>
+ <tr>
+ <td colspan="5" rowspan="4"><h1>Top Picks</h1></td>
+ <td>Registered Classes</td>
+ </tr>
+ <tr>
+ <td><p>Class1</p>
+ <p>Class 2</p>
+ <p>Class 3</p></td>
+ </tr>
+ <tr>
+ <td>Books Required</td>
+ </tr>
+ <tr>
+ <td><p>Books for class 1</p>
+ <p>Books for class 2</p>
+ <p>Books for class 3</p></td>
+ </tr>
+ <tr>
+ <th scope="row">&nbsp;</th>
+ <th width="44%" scope="row">&nbsp;</th>
+ <th width="9%" scope="row">Forum</th>
+ <th scope="row">Customer Service</th>
+ <th scope="row">Help</th>
+ <th scope="row">Contact</th>
+ <th scope="row">Package Tracking</th>
+ </tr>
+</table>
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/BookGet/old/templates/layout.css Fri Dec 3 19:06:02 2010
@@ -0,0 +1,294 @@
+@charset "utf-8";
+/* CSS Document */
+body {
+ font-family: "verdana", sans-serif;
+ font-size: 11px;
+
+ color: #333;
+ background-color: #015C65;
+}
+.search
+{
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+#searchbox
+{
+ margin-left: 2px;
+ border: 1px solid #015C65;
+}
+#searchbutton
+{
+ background-image:
url(http://b.static.ak.fbcdn.net/rsrc.php/zw/r/ZEKh4ZZQY74.png);
+ background-repeat: no-repeat;
+ background-position: 0 -159px;
+ cursor: pointer;
+
+ border: 1px solid #015C65;
+ width: 24px;
+ height:20px;
+}
+div#headerwrapper
+{
+ width: 96%;
+ min-height: 31px;
+ height: 31px;
+ margin-top: 10px;
+ margin-left: 2%;
+ margin-right: auto;
+ margin-bottom: 0;
+
+ /* temporary
+ border: 1px solid black; */
+}
+div#headerwrapper a:link
+{
+ font-family: "verdana", sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ color: white;
+ text-decoration: none;
+}
+
+div#headerwrapper a:active
+{
+ font-family: "verdana", sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ color: white;
+ text-decoration: underline;
+}
+div#headerwrapper a:visited
+{
+ font-family: "verdana", sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ color: white;
+ text-decoration: none;
+}
+div#headerwrapper a:hover
+{
+ font-family: "verdana", sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ color: white;
+ text-decoration: underline;
+}
+div#header{
+ background-color: #007046;
+ border: 1px solid #005736;
+ position: absolute;
+ top: 0%;
+ left: 0%;
+ width: 100%;
+ height: 10%;
+}
+div#headerfill{
+ background-color: #007046;
+
+ border: 1px solid #005736;
+ position: absolute;
+ top: 0%;
+ left: 20%;
+ width: 65%;
+ height: 5%;
+}
+#text {
+ font-family: "times new roman",times,serif;
+ font-size: 16px;
+ letter-spacing: 0.4pt;
+}
+
+div#banner_small{
+ background-image:url(../oldlayout/img/smallerlogo1.jpg);
+
+ position: absolute;
+ border: 1px solid #005736;
+ top: 0%;
+ left: 0%;
+ width: 20%;
+ height: 10%;
+}
+div#quicklink1 {
+
+ position: absolute;
+ top: 0%;
+ right: 0%;
+ width: 75px;
+ height: 5%;
+}
+div#quicklink2 {
+
+ position: absolute;
+ top: 0%;
+ right: 75px;
+ width: 75px;
+ height: 5%;
+}
+div#quicklink3 {
+
+ position: absolute;
+ top: 0%;
+ right: 150px;
+ width: 75px;
+ height: 5%;
+}
+div#quicklink4 {
+ position: absolute;
+
+ right: 225px;
+ width: 75px;
+ height: 5%;
+}
+div#quicklink5 {
+ position: absolute;
+
+ right: 150px;
+ width: 75px;
+ height: 5%;
+}
+div#quicklink6 {
+ position: absolute;
+
+ right: 75px;
+ width: 75px;
+ height: 5%;
+}
+div#quicklink7 {
+
+ position: absolute;
+
+ right: 0%;
+ width: 75px;
+ height: 5%;
+}
+div#searchbar {
+
+ position: absolute;
+ top: 25%;
+ right: 0%;
+ width: 50%;
+ height: 5%;
+}
+div#searchdiv
+{
+ height: 20px;
+ position: absolute;
+ top: 0%;
+ right:25px;
+
+ padding:0px;
+ margin:0px;
+}
+div#logodiv span#book
+{
+ color: white;
+}
+
+div#logodiv span#get
+{
+ color: #FF7F00;
+}
+#searchbutton
+{
+ position: absolute;
+ top: 0%;
+ right:0%;
+
+ background-image:
url(http://b.static.ak.fbcdn.net/rsrc.php/zw/r/ZEKh4ZZQY74.png);
+ background-repeat: no-repeat;
+ background-position: 0 -159px;
+ cursor: pointer;
+
+ border: 1px solid #015C65;
+ width: 24px;
+ height:20px;
+}
+div#welcome {
+ background: #000;
+ position: absolute;
+ top: 5%;
+ left: 70%;
+ width: 30%;
+ height: 5%;
+}
+div#leftcol {
+ background: #000;
+ position: absolute;
+ top: 10%;
+ left: 0%;
+ width: 10%;
+ height: 85%;
+ border-right: 1px solid #20815D;
+}
+div#rightcol {
+ background: #000;
+ position: absolute;
+ top: 10%;
+ left: 90%;
+ width: 10%;
+ height: 85%;
+ border-left: 1px solid #20815D;
+}
+div#content1 {
+ background: #fff;
+ position: absolute;
+ top: 25%;
+ left: 10%;
+ width: 80%;
+ height: 70%;
+ overflow: auto;
+ border: 1px solid #20815D;
+}
+
+div#content2 {
+ position: absolute;
+ top: 10%;
+ left: 10%;
+ width: 80%;
+ height: 15%;
+}
+div#content3 {
+
+ position: absolute;
+ top: 10%;
+ left: 10%;
+ width: 80%;
+ height: 12%;
+
+ overflow: auto;
+ border: 1px solid #20815D;
+}
+div#searchtrace{
+ background: #fff;
+ position: absolute;
+ top: 22%;
+ left: 10%;
+ width: 80%;
+ height: 16px;
+ min-height: 16px;
+}
+div#banner_large {
+
/*background-image:url(http://hci.cs.sfsu.edu/~fall2010.15/img/logo.gif);*/
+ position: absolute;
+ top: 10%;
+ left: 10%;
+ width: 80%;
+ height: 20%;
+}
+
+div#footer {
+ position: absolute;
+ bottom: 0%;
+ left: 0%;
+ width: 100%;
+ height: 5%;
+}
+div#footerfill {
+
+ position: absolute;
+ bottom: 5%;
+ left: 0%;
+ width: 80%;
+ height: 5%;
+}
=======================================
--- /trunk/BookGet/Include/AccountDB.php Tue Nov 30 15:56:57 2010
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-/**
- * AccountDB - Class to manage user accounts. Creates and maintains
- * a connection to the user database
- *
- * @author saul
- */
-class AccountDB {
-
- // We need to implement these!
- public function create_user($email, $uname, $pwd, $firstname,
$lastname, $fbid=NULL) {
- if ($fbid == null)
- $info = $this->get_userId($uname);
- else
- $info = $this->get_fb_userId ($fbid);
-
- if ($info == null)
- {
- $query = "INSERT INTO users (Email, Uname, Password,
FirstName, LastName, fb_uid) VALUES ".
- "('". $email ."','". $uname ."','". $pwd ."','".
$firstname ."','". $lastname ."','". $fbid."')";
- mysql_query($query);
-
- } else {
- throw new Exception("Account exists", 0);
- }
- }
-
- public function create_from_fb($user) {
- $this->get_fb_userId($user['id']);
-
- if ($info != null)
- return;
-
- $this->create_user($user['email'], "", "", $user['first_name'],
- $user['last_name'], $user['id']);
- }
-
- public function get_userId($name) {
- $name = mysql_real_escape_string($name);
- $query = "SELECT Id FROM users
- WHERE Uname = '". $name ."'";
-
- $result = mysql_query($query);
-
- if ($result != null) {
- if (mysql_num_rows($result) > 0) {
- return mysql_result($result,0);
- }
- } else {
- print("\$result was null D:\n");
- return NULL;
- }
- }
-
- public function verify_credentials($name, $pass) {
- $name = mysql_real_escape_string($name);
- $pass = mysql_real_escape_string($pass);
-
- $query = "SELECT Password FROM users
- WHERE Uname = '". $name ."'";
- $object = mysql_query($query);
- $result = false;
-
- if ($object != null) {
- if (mysql_num_rows($object) > 0) {
- if(mysql_result($object,0) == "") {
- $result = false;
- } elseif(mysql_result($object,0) == $pass) {
- $result = true;
- }
- }
- }
-
- return $result;
- }
-
- public function get_fb_userId($fbid) {
- $name = mysql_real_escape_string($fbid);
- $query = "SELECT Id FROM users
- WHERE fb_uid = '". $fbid ."'";
-
- $result = mysql_query($query);
-
- if ($result != null) {
- if (mysql_num_rows($result) > 0) {
- return mysql_result($result,0);
- }
- } else {
- //print("\$result was null D:\n");
- return NULL;
- }
- }
- public function verify_fb_credentials($fbid)
- {
-// $query = "SELECT Id FROM users WHERE fb_uid = '". $fbid ."'";
-// $object= mysql_query($query);
-// $result = false;
-//
-// if ($object != null) {
-// if (mysql_num_rows($object) > 0) {
-// $result = true;
-// }
-// }
-// return $result;
- return $this->get_fb_userId($fbid);
- }
-
- public static function getInstance() {
- if (!self::$instance instanceof self) {
- self::$instance = new AccountDB();
- }
-
- return self::$instance;
- }
-
- function __construct() {
- $this->con = mysql_connect($this->dbHost, $this->user, $this->pass)
- or die ("Could not connect to db: " . mysql_error());
- mysql_query("SET NAMES 'utf8'");
- mysql_select_db($this->dbName, $this->con)
- or die ("Could not select db: " . mysql_error());
- }
-
- // db connection config vars
- protected $user = "bookget";
- protected $pass = "bookget15";
- protected $dbName = "bookget";
- protected $dbHost = "localhost";
- protected $con = null;
-
- // This class can only be instantiated once. This is the
- // current instance:
- private static $instance = null;
-
-}
-?>
=======================================
--- /trunk/BookGet/Include/Facebook.php Mon Nov 29 01:13:44 2010
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-define('FACEBOOK_APP_ID', '158595547506014');
-define('FACEBOOK_SECRET', '578259a98628ad76edcb4884f48408f0');
-
-function get_facebook_cookie($app_id, $application_secret) {
- $args = array();
- parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args);
- ksort($args);
- $payload = '';
- foreach ($args as $key => $value) {
- if ($key != 'sig') {
- $payload .= $key . '=' . $value;
- }
- }
- if (md5($payload . $application_secret) != $args['sig']) {
- return null;
- }
- return $args;
-}
-
-function Facebook_Footer()
-{
- $str = <<<EOD
-<div id="fb-root"></div>
-<script src="http://connect.facebook.net/en_US/all.js"></script>
-<script>
- FB.init({appId: '%FACEBOOK_APP_ID%', status: true, cookie: true,
xfbml: true});
- FB.Event.subscribe('auth.sessionChange', function(response) {
- if (response.session) {
- } else {
- // The user has logged out, and the cookie has been cleared
- }
- window.location.reload();
- });
-</script>
-EOD;
- $str = str_replace("%FACEBOOK_APP_ID%", FACEBOOK_APP_ID, $str);
- print ($str);
-}
-?>
=======================================
--- /trunk/BookGet/Include/SearchISBN.php Mon Nov 15 21:32:58 2010
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-/**
- * Creates and maintains a connection to a book database
- *
- * @author Dan
- */
-class SearchISBN{
-
- public function Search_num($num)
- {
- $query = "SELECT BookID FROM `Book Database` WHERE ". $ISBN ."
LIKE ".
- "'%". $num. "%'";
- $result = mysql_query($query);
-
- if ($result != null) {
- if (mysql_num_rows($result) > 0) {
- while($row = mysql_fetch_array($result)) {
- $book_table[] = $row; // Append the row to the table
- }
- $result = $book_table;
- }
- }
- return $result;
- }
- public function Search_ISBN($isbnnum){
- $num = $this->isbnfix($isbnnum);
-
- $query = "SELECT * FROM `Book Database` WHERE ". $ISBN ." LIKE ".
- "'%". $num . "%'";
-
-
- $tmp = mysql_query($query);
- $book_table = array();
-
- // Convert the MySQL resource into an array of book arrays.
- while($row = mysql_fetch_array($tmp)) {
- $book_table[] = $row; // Append the row to the table
- }
-
- /** DEBUG
- print count($book_table)."<br/>";
- print count($num)."<br/>";
- */
-
- if(count($book_table)-1) {
- $results = array();
-
- for($i=0;$i< count($book_table);$i++)
- {
- /** DEBUG print $word_array[$k]."<br/>"; */
-
- /* If the book entry matches the word, add it to the
results
- * array if it isnt already in there. */
- if (preg_match('/'.$num.'/', $book_table[$i][$ISBN])) {
- //print ( $book_table[$i][$field] ." matches ".
$word_array[$k] ."<br/>");
- if (in_array($book_table[$i], $results) == false)
- $results[] = $book_table[$i];
- }
- }
-
- }
-
- if (count($results)-1 == 0)
- $results = $book_table;
-
- /** DEBUG print count($results)."<br/>";*/
- return $results;
-
-
-
- }
- private function isbnfix($isbnnum) {
- if(strpos($phrase, "-"))
- $num_array = explode("-", $isbnnum);
- $numstring = implode($num_array);
- $num_array = explode("", $isbnnum);
-
- $new_array = array();
- for($i=0; $i<count($num_array); $i++) {
- // Only put the main keywords in the new_table.
- if (in_array($num_array[$i], $this->$m_symbols) == false) {
- $new_string += $num_array[$i];
- }
- }
- return $new_string;
- }
- public static function getInstance() {
- if (!self::$instance instanceof self) {
- self::$instance = new self();
- }
-
- return self::$instance;
- }
-
- private function __construct() {
- $this->con = mysql_connect($this->dbHost, $this->user, $this->pass)
- or die ("Could not connect to db: " . mysql_error());
- mysql_query("SET NAMES 'utf8'");
- mysql_select_db($this->dbName, $this->con)
- or die ("Could not select db: " . mysql_error());
- }
-
- // db connection config vars
- protected $user = "bookget";
- protected $pass = "bookget15";
- protected $dbName = "bookget";
- protected $dbHost = "localhost";
- protected $con = null;
-
- protected $m_symbols = array("-");
- // This class can only be instantiated once. This is the
- // current instance:
- private static $instance = null;
-}
-?>
=======================================
--- /trunk/BookGet/Include/account_settings.php Mon Nov 29 01:13:44 2010
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-print("<span>blah<br/>blah<br/>blah<br/></span>");
-?>
=======================================
--- /trunk/BookGet/indexmodifiedbydan.php Mon Nov 22 14:42:45 2010
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php include "Include/mimetype.php" ?>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=8" />
- <title>BookGet.com</title>
- <!--div id="footer"><link rel="stylesheet"
href="style/layout.css" type="text/css" />-->
- <link rel="stylesheet" href="dan_templates/layout.css"
type="text/css" />
- </head>
- <body>
- <div id="headerwrapper">
-
-
- <div id="header">
- <div id="banner_small">
- <span id="book">book</span><span id="get">get</span>
- </div>
- <div id="searchbar" class="clearboth">
- <form method="get" action="search.php">
- <div id="searchdiv" class="searchbar">
- <input id="searchbox" type="text" name="query"
size="40" class="search" />
- <button id="searchbutton" type="submit"
class="search" />
- </div>
- </form>
- </div>
- <div id="quicklink1">
- <a href="settings.php">Settings</a>
-
-
- </div>
- <div id="quicklink2"><a
href="account.php">Account</a></div>
- <div id="quicklink3"><a
href="logout.php">Logout</a></div>
-
- </div>
- </div>
-
- <div id="leftcol">
- blah <br/>
- blah <br/>
- blah <br/>
- </div>
- <div id="searchtrace">add search trace script here</div>
- <div id="content3"><p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.</p></div>
- <div id="content1"><p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.</p>
- <br/>
- <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.</p>
- <br/>
- <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.
-
- </p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing
elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.</p>
- <br/>
- <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.</p>
- <br/>
- <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.
-
- </p>
-<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.</p>
- <br/>
- <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.</p>
- <br/>
- <p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et
dolore<br/>
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex
ea<br/>
- commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum
dolore eu<br/>
- fugiat nulla pariatur. Excepteur sint occaecat
cupidatat
- non proident, sunt in culpa qui officia deserunt
mollit
- anim id est laborum.
-
- </p>
- </div>
- <div id="rightcol" >
- blah <br/>
- blah <br/>
- blah <br/>
-
-
- </div>
-
-
- <div id="footer">
- <a href="http://validator.w3.org/check?uri=referer">Valid
XHTML 1.1</a>,
- <a
href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a>
- <div id="quicklink4"><a href="ContactUs.php">Contact
Us</a></div>
- <div id="quicklink5"><a href="FAQ.php">FAQ</a></div>
- <div id="quicklink6"><a href="Returns.php">Returns</a></div>
- <div id="quicklink7"><a
href="ShippingInfo.php">Shipping</a></div>
- </div>
- </body>
-</html>
=======================================
--- /trunk/BookGet/Include/SearchEngine.php Fri Dec 3 09:15:04 2010
+++ /trunk/BookGet/Include/SearchEngine.php Fri Dec 3 19:06:02 2010
@@ -101,17 +101,21 @@
/* Get all the items in the category */
$catsearch = $db->Search_Phrase($category, "Department");

+ if(count($catsearch) < 1) {
+ throw new Exception("Could not find anything in the category");
+ }
/* Search through everything */
$omnisearch = $this->omnisearch($query);
-
+ if(count($omnisearch) < 1) {
+ throw new Exception("Could not find anything in the category");
+ }
$result = array();

/* Only return the ones that are in both */
- foreach ($catsearch as $item) {
- foreach ($omnisearch as $candidate)
- if (in_array($candidate, $catsearch) &&
(!in_array($candidate, $result))) {
- $result[] = $candidate;
- }
+ foreach ($catsearch as $candidate) {
+ if (in_array($candidate, $omnisearch)) {
+ $result[] = $candidate;
+ }
}

return $result;
=======================================
--- /trunk/BookGet/Include/basic_style.php Thu Dec 2 23:26:16 2010
+++ /trunk/BookGet/Include/basic_style.php Fri Dec 3 19:06:02 2010
@@ -2,5 +2,19 @@
print <<<EOF
<link rel="stylesheet" href="style/layout.css" type="text/css" />
<link rel="icon" type="image/ico" href="img/icon.ico" />
+<script type="text/javascript" src="Include/js/jquery-1.4.4.js"></script>
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('#logodiv').mouseenter(function() {
+ $('#logodiv').toggleClass('logodivhover', 1);
+ });
+ $('#logodiv').mouseleave(function() {
+ $('#logodiv').toggleClass('logodivhover', 0);
+ });
+ $('#logodiv').click(function() {
+ document.location.href="index.php"
+ });
+});
+</script>
EOF
?>
=======================================
--- /trunk/BookGet/Include/category_bar.php Fri Dec 3 09:15:04 2010
+++ /trunk/BookGet/Include/category_bar.php Fri Dec 3 19:06:02 2010
@@ -1,46 +1,53 @@
-<?php
+<?php
{
$buffer = <<<EOF
<span><br /><h3><b>Categories</b></h3><br />


<b>Department</b><br />
- <a href='search.php?cat=Literature%q%'>Literature</a><br />
- <a href='search.php?cat=Math%q%'>Math</a><br />
- <a href='search.php?cat=Science%q%'>Science</a><br />
- <a href='search.php?cat=History%q%'>History</a><br />
- <a href='search.php?cat=Art%q%'>Art</a><br />
- <a href='search.php?cat=conomics%q%'>Economics</a><br />
- <a href='search.php?cat=Foreign%20Language%q%'>Foreign
Language</a><br />
- <a href='search.php?cat=Social%20Studies%q%'>Social Studies</a><br />
- <a href='search.php?cat=Computer%20Science%q%'>Computer
Science</a><br />
- <a href='search.php?cat=Engineering%q%'>Engineering</a><br />
- <a href='search.php?cat=Business%q%'>Business</a><br />
+ <a href="search.php?cat=Literature%q%">Literature</a><br />
+ <a href="search.php?cat=Math%q%">Math</a><br />
+ <a href="search.php?cat=Science%q%">Science</a><br />
+ <a href="search.php?cat=History%q%">History</a><br />
+ <a href="search.php?cat=Art%q%">Art</a><br />
+ <a href="search.php?cat=conomics%q%">Economics</a><br />
+ <a href="search.php?cat=Foreign%20Language%q%">Foreign
Language</a><br />
+ <a href="search.php?cat=Social%20Studies%q%">Social Studies</a><br />
+ <a href="search.php?cat=Computer%20Science%q%">Computer
Science</a><br />
+ <a href="search.php?cat=Engineering%q%">Engineering</a><br />
+ <a href="search.php?cat=Business%q%">Business</a><br />


<br /><b>Price</b><br />
- <a href=''>$0.01 - $9.99</a><br />
- <a href=''>$10.00 - $24.99</a><br />
- <a href=''>$25.00 - $49.99</a><br />
- <a href=''>$50.00 - $99.99</a><br />
- <a href=''>$100.00 > </a><br />
+ <a href="">$0.01 - $9.99</a><br />
+ <a href="">$10.00 - $24.99</a><br />
+ <a href="">$25.00 - $49.99</a><br />
+ <a href="">$50.00 - $99.99</a><br />
+ <a href="">$100.00 > </a><br />

<br /><b>Quality</b><br />
- <a href=''>Best</a><br />
- <a href=''>Good</a><br />
- <a href=''>Bad</a><br />
+ <a href="">Best</a><br />
+ <a href="">Good</a><br />
+ <a href="">Bad</a><br />

<br /><b>Schools</b><br />
- <a href='search.php?cat=FAU'>FAU</a><br />
- <a href='search.php?cat=SFSU'>SFSU</a><br />
+ <a href="search.php?school=FAU%q%%c%">FAU</a><br />
+ <a href="search.php?school=SFSU%q%%c%">SFSU</a><br />

</span>
EOF;
-
if ($query) {
- print(str_replace("%q%", "?query=".$query, $buffer));
+ $buffer = (str_replace("%q%", "?query=".$query, $buffer));
+ } else {
+ $buffer = str_replace("%q%", "", $buffer);
+ }
+
+ if ($cat) {
+ $buffer = (str_replace("%c%", "?cat=". $cat, $buffer));
} else {
- print(str_replace("%q%", "", $buffer));
- }
+ $buffer = (str_replace("%c%", "", $buffer));
+ }
+
+ print $buffer;
}
?>
=======================================
--- /trunk/BookGet/Include/header_bar.php Fri Dec 3 09:15:04 2010
+++ /trunk/BookGet/Include/header_bar.php Fri Dec 3 19:06:02 2010
@@ -5,7 +5,7 @@
<div id="headerwrapper">
<div id="pageheader">
<div id="logodiv">
- <a href="index.php"><span id="book">book</span><span
id="get">get</span></a>
+ <span id="book">book</span><span id="get">get</span>
</div>
<div id="headercontent" class="clearboth">
<form method="get" action="search.php">
=======================================
***Additional files exist in this changeset.***
Reply all
Reply to author
Forward
0 new messages