diff --git a/src/wp-content/plugins/wp-e-commerce/.phptidy-config.php b/src/wp-content/plugins/wp-e-commerce/.phptidy-config.php deleted file mode 100644 index 1b933ee..0000000 --- a/src/wp-content/plugins/wp-e-commerce/.phptidy-config.php +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/src/wp-content/plugins/wp-e-commerce/images/cc.gif b/src/wp-content/plugins/wp-e-commerce/images/cc.gif deleted file mode 100644 index 9930059..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/images/cc.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/images/google_checkout.gif b/src/wp-content/plugins/wp-e-commerce/images/google_checkout.gif deleted file mode 100644 index 3dffcb2..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/images/google_checkout.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/images/icon_window_collapse.gif b/src/wp-content/plugins/wp-e-commerce/images/icon_window_collapse.gif deleted file mode 100644 index 8bf6a96..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/images/icon_window_collapse.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/images/icon_window_expand.gif b/src/wp-content/plugins/wp-e-commerce/images/icon_window_expand.gif deleted file mode 100644 index 12270e6..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/images/icon_window_expand.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/images/indicator.gif b/src/wp-content/plugins/wp-e-commerce/images/indicator.gif deleted file mode 100644 index 529e72f..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/images/indicator.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/images/paypal.gif b/src/wp-content/plugins/wp-e-commerce/images/paypal.gif deleted file mode 100644 index 57bef3e..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/images/paypal.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/license.txt b/src/wp-content/plugins/wp-e-commerce/license.txt deleted file mode 100644 index 5fbe4a7..0000000 --- a/src/wp-content/plugins/wp-e-commerce/license.txt +++ /dev/null @@ -1,281 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - diff --git a/src/wp-content/plugins/wp-e-commerce/readme.txt b/src/wp-content/plugins/wp-e-commerce/readme.txt deleted file mode 100644 index 1f06cf3..0000000 --- a/src/wp-content/plugins/wp-e-commerce/readme.txt +++ /dev/null @@ -1,221 +0,0 @@ -=== WP e-Commerce === -Contributors: mufasa, jghazally, valentinas, mychelle -Donate link: http://getshopped.org -Tags: e-commerce, wp-e-commerce, shop, cart, paypal, authorize, stock control, ecommerce, shipping, tax -Requires at least: 3.0 -Tested up to: 3.1.1 -Stable tag: 3.8.4 - -WP e-Commerce is a Web 2.0 application designed with usability, aesthetics, and presentation in mind. - -== Description == - -The WP e-Commerce shopping cart plugin for WordPress is an elegant easy to use fully featured shopping cart application suitable for selling your products, services, and or fees online. - -WP e-Commerce is a Web 2.0 application designed with usability, aesthetics, and presentation in mind. - -Perfect for: - -* Bands & Record Labels -* Clothing Companies -* Crafters & Artists -* Books, DVDs & MP3 files -* Memberships -* Ticketing - -For more information visit [http://getshopped.org](http://getshopped.org "http://getshopped.org") - -== Installation == - -1. Upload the folder 'wp-e-commerce' to the '/wp-content/plugins/' directory -2. Activate the plugin through the 'Plugins' menu in WordPress - -= Updating = - -Before updating please make a backup of your existing files and database. Just in case. -After upgrading from earlier versions look for link "Update Store". This will update your database structure to work with new version. - - -== Changelog == -= 3.8.4 = -* Add: User can duplicate a product in admin panel -* Add: WooThemes integration support -* Change: Total in Cart widget now excludes shipping and tax -* Fix: Invalid country code in paypal-standard.merchant.php -* Fix: Tax is not passed properly to Paypal Pro -* Fix: Currency code preference not correctly selected in Paypal gateways -* Fix: Paypal gateways doesn't check whether the currency being sent to Paypal is accepted or not, resulting in wrong currency -* Fix: Checkout form selecting the wrong field when a previous field with the same uniquename was deleted -* Fix: Various issues with Google Checkout -* Fix: State data outside of US is not passed to payment gateways -* Fix: State is not displaying correctly in the users purchase history -* Fix: Wrong generated product permalink when a product is assigned multiple cats, and a product category is being viewed -* Fix: Submitting a checkout form with mandatory billing state only refreshes the form although everything is filled out correctly -* Fix: Billing Country is trimmed, and Billing State is not properly decoded -* Fix: Billing and shipping state no longer stored correctly -* Fix: Checkout form validation skips mandatory custom checkout fields on default form set -* Fix: Paystation does not properly update purchase logs -* Fix: When there's no product, and Sort Product By is set to 'dragndrop', viewing the admin product list would produce a Division by zero warning -* Fix: Store sub-pages return 404 error -* Fix: Only Purchase History in Your Account show the login option -* Fix: Weight on Variations contain too many decimals -* Fix: Add to Cart in grid view bypasses Variations selection -* Fix: get_queried_object() requires WP 3.1 -* Fix: Invalid version number in display-update.page.php -* Fix: Correct HTML, to stop Free Shipping Discount getting blanked -* Fix: Support taxonomy archives for product_tag taxonomy - -= 3.8.3 = -* New: Individual item details are sent to Paypal Express Checkout -* Change: Automatically reload database update page when PHP maximum execution time is detected -* Change: Add progress bar and estimated time remaining for database update tasks -* Change: Themes can now use taxonomy-wpsc_product_category-{$term}.php and taxonomy-wpsc_product_category.php templates, which take precedence over page.php when viewing a product category -* Change: Paypal Express Checkout API is updated to ver 71.0 -* Fix: Tax is calculated incorrectly when a coupon is used -* Fix: Update a large database of products and variations take ages -* Fix: Reloading database update page makes wpec scan the records from the beginning instead of continuing where it left off -* Fix: Reactivating the plugin causes Fatal Error (PHP Timeout) if there are a lot of attached images (not just post products, but all image attachments) -* Fix: Purchase logs' statuses are not properly updated when upgrading from 3.7.x -* Fix: Billing state is not sent to checkout -* Fix: Country name is truncated when sending to payment gateway -* Fix: Billing state code is not properly converted before sending to payment gateway -* Fix: Wrong USA country code is sent to Paypal Standard Payment -* Fix: Wrong sandbox gateway URL for Paypal Pro -* Fix: SSLVERIFY error when connecting to Paypal Pro Gateway -* Fix: Template hierarchy error with child themes -* Fix: Total amount is not visible when checking out with Paypal Express Checkout -* Fix: Transaction result page is inaccurate after checking out with Paypal Express Checkout -* Fix: Incompatibility with Thesis theme's loop when viewing product category, or paginated product listing - -= 3.8.2 = -* Add: Currency display for Google RSS feed -* Add: Third-party plugins can now filter 'wpsc-tax_rate' to provide their own tax solution -* Change: Merchant subclasses now have access to $this->address_keys -* Change: Grid Settings are now always visible -* Change: Total Shipping is no longer included in notification email when shipping is disabled -* Change: Thumbnail size for single product view now defaults to Single Product Page thumbnail size option -* Change: wpsc_the_product_thumbnail() defaults to 'medium-single-product' size when in single product view -* Fix: Update notice being displayed when it has already been completed -* Fix: Broken image in latest products widget -* Fix: Custom checkout field not always saved -* Fix: Downloadable file list not updated after existing files are selected -* Fix: Already attached downloadable files are duplicated each time you select an existing downloadable file -* Fix: Inconsistent behavior when adding a new field to a checkout form set -* Fix: Custom product slug not editable -* Fix: Incompatibility issues with shipping helper and modules -* Fix: Product meta are not included in Google product feed -* Fix: Incorrect variation "from" price -* Fix: Shortcode not working in single product description -* Fix: Item cost not correctly calculated in paypal-standard-merchant -* Fix: Invalid SSL URL for some images -* Fix: Select from wrong table in WPSC_Merchant::get_authcode() -* Fix: Wrong use of get_query_var() in wpsc_category_id() -* Fix: Table `wordpress.wp_wpsc_product_list` doesn't exist -* Fix: ?items_per_page=all is ignored -* Fix: Duplicate transaction result emails -* Fix: Wrong filter in wpsc_item_add_preview_file() -* Fix: Wrong display type when using advanced search view mode and viewing a category -* Fix: Category list is displayed in tag archive -* Fix: wpsc_display_products_page() outputs "Fail" when the product shortcode is used 10 times (no kidding) -* Fix: Single product view's thumbnail size is incorrect -* Fix: Wrong featured thumbnail is displayed in Single Product View when there are multiple attached product images -* Fix: Incorrect condition statements in WPSC_Coupons::compare_logic() -* Fix: Can't add new field to checkout form set in IE -* Fix: Missing trash icon when adding custom options to dropdowns in checkout form -* Fix: Custom select, checkbox and radio fields are displayed as textbox on [userlog] page -* Fix: Custom checkboxes, radios and select fields are not properly populated in Checkout form -* Fix: Attachment metadata are not properly generated when converting product thumbnails from 3.7.x to 3.8 - -= 3.8.1 = -* Fix: Special price mix-up when ugprade to 3.8 -* Fix: Missing database update notice -* Fix: Breadcrumb markup and style fixes -* Fix: Deprecate WPSC_Query() -* Fix: Deprecate wpsc_total_product_count() -* Fix: Deprecate wpsc_print_product_list() -* Change: Warning message for PHP 4 users. GoldCart requires PHP 5 or above. -* Change: Don't display categories when there's a search - -= 3.8 = -* Utilize custom post types for products -* Utilize custom taxonomy for categories and variations -* Database optimization -* Redesigned taxes and shipping systems -* New user interface -* Integrates with WordPress Media Manager -* Better template integration for designers -* Optimized for ticketing (Tikipress) - -= 3.7.5.3 = -* Support for WordPress 2.9 canonical URLs for Products and Categories - -= 3.7.5.2 = -* More Fixes to the Paypal Pro merchant file -* Image thumbnail size fixes -* Updated readme to mark plugin as working with 2.9 -* Purchase log filtering bug fixed -* Fix for a bug when no shipping module is used where the shipping country and region were not being changed -* Remove button on checkout page now clears stock claims - -= 3.7.5.1 = -* Fixes to the Paypal Pro merchant file -* Fixes to the Paypal Express Checkout merchant file -* Tracking email improvements -* HTML in descriptions does not break RSS (thanks to http://www.leewillis.co.uk) -* Category permalinks will now be regenerated properly on instalation -* Category list bug preventing viewing a product when viewing a category fixed. - - -= 3.7.5 = -* Added code for upgrades/additions from nielo.info and lsdev.biz, we will be using this for new modules in the future. -* All In One SEO Pack compatibility bugfixes and improvements. -* CSV has had some work done on it, it now takes larger files, and associates a CSV file to a single category of your choice. We'd love to be able to allow users to add the categories and images as part of the CSV file. We will look into it more at a later date. -* SSL we fixed the image issue from beta1 and used James Collis recommended fix (using is_ssl() for our conditions) Thanks James! -* Show list of Product Groupsí shows all Groups <- there may be some backwards compatibility issues (we havent encountered any but nevertheless if you spot any let us know) -* When duplicating products, their tags do not get duplicated for the new product. <- Oh yes they DO! -* Google Checkout now sends off Discount Coupons As well. And we fixed the `name` vs `code` Issue people mentioned in the forum -* Category shortcode backwards compatibility -* Fix Purchlogs - We had a lot of users that somehow by passed the 'fix purchase logs' page when upgrading from 3.6, so we added some better conditions to the mix and added it on to the debug page (a powerful wp-e-commerce page that is hidden from most users as it's usage is very corrosive backing up your DB and files is strongly recommended if not necessary when you work with this page). -* Valid XHTML for front end of wpec YAY! -* Fixed adding variations when adding products -* Sender from the 'resend email to buyer' link on the purchase log details page has been fixed -* Shipping Discount Bug that stopped shipping working at all. -* Categories Widget has had numerous changes ñ -* Better MU support. -* Canadian Tax ñ Fixes -* US Tax ñFixes -* Product Categories Caching Issue Resolved -* Coupons ñ ëApply to all Productsí and numerous bug fixes -* ëYour Accountí done some fixes to it. -* ëAccepted Paymentí goes straight to ëClosed Orderí -* Stock claims are now cleared when the cart is emptied -* Purchase log bulk actions now work -* PayPal gateway module fixes and improvements -* HTML Tables can now be added to product descriptions -* Flat Rate and Weight Rate improvements - - -= 3.7.4 = -* Changes to shipping to fix the bugs from 3.7.3 with shipping and the new shipping_discount feature -* Fixes for variations under grid view - - -== Frequently Asked Questions == - -= How do I customize WP e-Commerce = - -First of all you should check out the Presentation settings which are in the Settings->Store page. - -Advanced users can edit the CSS (and do just about anything). Not so advanced users can hire WP consultants developers and designers from [http://getshopped.org/resources/wp-consultants/](http://getshopped.org/resources/wp-consultants/ "http://getshopped.org/resources/wp-consultants/"). - -== Screenshots == - -1. Products list in WordPress backend -2. Edit Product screen -3. Single product page -4. Checkout page - -== Upgrade Notice == - -= 3.8.1 = -This version addresses several urgent issues when upgrading from 3.7.x to 3.8. \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/screenshot-1.png b/src/wp-content/plugins/wp-e-commerce/screenshot-1.png deleted file mode 100644 index 3308351..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/screenshot-1.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/screenshot-2.png b/src/wp-content/plugins/wp-e-commerce/screenshot-2.png deleted file mode 100644 index 4a6d982..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/screenshot-2.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/screenshot-3.png b/src/wp-content/plugins/wp-e-commerce/screenshot-3.png deleted file mode 100644 index 65f9606..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/screenshot-3.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/screenshot-4.png b/src/wp-content/plugins/wp-e-commerce/screenshot-4.png deleted file mode 100644 index c33bc16..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/screenshot-4.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/woo-integration/css/main_frame_style.css b/src/wp-content/plugins/wp-e-commerce/woo-integration/css/main_frame_style.css deleted file mode 100644 index 494e689..0000000 --- a/src/wp-content/plugins/wp-e-commerce/woo-integration/css/main_frame_style.css +++ /dev/null @@ -1,12 +0,0 @@ -/* CSS Document */ - -li.wpsc_presentation a{ - padding-left: 40px !important; - background: url(../../wpsc-core/images/credit_cards.png) no-repeat; - background-position: 12px center; -} - -iframe#wpsc-presentation{ - height: 2210px; - width: 100%; -} \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/woo-integration/css/style.css b/src/wp-content/plugins/wp-e-commerce/woo-integration/css/style.css deleted file mode 100644 index bc7f5bf..0000000 --- a/src/wp-content/plugins/wp-e-commerce/woo-integration/css/style.css +++ /dev/null @@ -1,155 +0,0 @@ -/* CSS Document */ - -*{ - font-family: 'Lucida Grande', Verdana, sans-serif; - font-size: 11px; - color: #666; - list-style: none; -} - -h3{ - font-size: 14px; - color: #333; - display: block; - border-bottom: solid 1px #e7e7e7; - padding-bottom: 7px; -} - -tr{ - display: block; - padding-bottom: 10px; -} - -th[scope=row], th[score=row]{ - text-align: left; -} - -input[type=text]{ - border: solid #CCC #EEE #EEE #CCC; - border-width: 1px; - background-color: #fafafa; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - -border-radius: 3px; - padding: 5px; - -webkit-bor -} - -input[type=text]:hover{ - background-color: #FFF; -} - -.allign_top{ - vertical-align: top; -} - -.button_settings_th{ - width: 180px; -} - -.button_settings_desc{ - width: 260px; - padding-left: 20px; -} - -.product_settings_th{ - width: 350px; -} - -.product_page_settings_th, .product_category_settings_th, .thumbnail_settings_th{ - width: 260px; - padding-right: 10px; -} - -.shopping_cart_settings_th{ - width: 240px; - padding-right: 10px; -} - -.pagination_settings_th{ - width: 200px; -} - -.wpsc_select_wrapper{ - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif; - font-size: 12px; - background: #FAFAFA url(../../functions/images/select.png) no-repeat right center; - border-color: #CCC #EEE #EEE #CCC; - border-style: solid; - border-width: 1px; - float: left; - height: 26px; - width: 280px; - margin: 0; - margin-bottom: 9px !important; - display: block; - color: #555; -} - -.wpsc_select{ - cursor: pointer; - height: 28px; - margin: 0; - opacity: 0; - padding: 0; - position: relative; - width: inherit; - z-index: 4; - -} - -.wpsc_select_span{ - height: 26px; - line-height: 26px; - position: absolute; - z-index: 2; - padding-left: 6px; -} - -.wpsc_select:hover{ - color: #333; - background: white; -} - -input[type=submit][name=updateoption]{ - border-color: #BBB !important; - cursor: pointer; - background-color: #FAFAFA; - border: 1px solid; - padding: 5px; - font-family: "Lucida Grande", Verdana, sans-serif; - color: #555; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -border-radius: 4px; - border-style: solid; - border-width: 1px; - position: fixed; - bottom: 10px; -} - -input[type=submit][name=updateoption]:hover{ - border-color: #666 !important; - color: black; -} - -.comment_settings_th{ - width: 250px; -} - -#message{ - position: fixed; - bottom: 10px; - right: 0px; - display: block; - width: 400px; - text-align: center; - background-color: #FFFFE0; - border: 1px solid #E6DB55; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -border-radius: 4px; -} \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/woo-integration/js/script.js b/src/wp-content/plugins/wp-e-commerce/woo-integration/js/script.js deleted file mode 100644 index 0324701..0000000 --- a/src/wp-content/plugins/wp-e-commerce/woo-integration/js/script.js +++ /dev/null @@ -1,51 +0,0 @@ -// JavaScript Document -$(document).ready(function() { - //Button Settings Block - $("h3:contains('Button Settings')").next().find('th[scope="row"]').addClass('button_settings_th allign_top'); - - var i = $("h3:contains('Button Settings')").next().find('td').first(); - i.html(i.html().replace('Buy Now Button only works for Paypal Standard, please activate Paypal Standard to enable this option.','')); - i.after("Buy Now Button only works for Paypal Standard, please activate Paypal Standard to enable this option."); - i.addClass('allign_top'); - - //Products Settings Block - $("h3:contains('Product Settings')").next().find('th[scope="row"]').addClass('product_settings_th allign_top'); - $("h3:contains('Product Settings')").next().find('th[score="row"]').addClass('product_settings_th allign_top'); - - //Product Page Settings - $("h3:contains('Product Page Settings')").next().find('th[scope="row"]').addClass('product_page_settings_th allign_top'); - - //Shopping Cart Settings - $("h3:contains('Shopping Cart Settings')").next().find('th[scope="row"]').addClass('shopping_cart_settings_th allign_top'); - - //Product category Settings - $("h3:contains('Product Category Settings')").next().find('th[scope="row"]').addClass('product_category_settings_th allign_top'); - - //Thumbnail Settings - $("h3:contains('Thumbnail Settings')").next().next().find('th[scope="row"]').addClass('thumbnail_settings_th'); - - //Pagination Settings - $("h3:contains('Pagination settings')").next().find('th[scope="row"]').addClass('pagination_settings_th'); - - //Comment Settings - $("h3:contains('Comment Settings')").next().find('th[scope="row"]').addClass('comment_settings_th'); - - //Select control - $("select").wrap('
'); - $("select").before(''); - $("select").addClass("wpsc_select"); - $("select").change(function (){ - $(this).prev().text($(this).find('option:selected').text()); - }); - - //Initialize select valua - $("select").each(function(index, element) { - $(this).prev().text($(this).find('option:selected').text()); - }); - - //Remove Advanced Theme Setting - $('#themes_and_appearance').remove(); - - //Remove redundant 0 after the form - $('body').html($('#cart_options')); -}); \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/woo-integration/options_presentation.php b/src/wp-content/plugins/wp-e-commerce/woo-integration/options_presentation.php deleted file mode 100644 index 9fa8fc0..0000000 --- a/src/wp-content/plugins/wp-e-commerce/woo-integration/options_presentation.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - Dirty Options Presentaion - - - - - \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/woo-integration/woo_integration.php b/src/wp-content/plugins/wp-e-commerce/woo-integration/woo_integration.php deleted file mode 100644 index a68a450..0000000 --- a/src/wp-content/plugins/wp-e-commerce/woo-integration/woo_integration.php +++ /dev/null @@ -1,61 +0,0 @@ - - - WPSC Presentation - - '; - - $return[0] .= '
- -
'; - - return $return; -} - -//Ajax respont for wp_ajax_print_wpsc_presentation -function woo_wpsc_presentation_menu(){ - require_once( WPSC_FILE_PATH . '/woo-integration/options_presentation.php' ); -} - -//Add main frame style sheet -function add_my_stylesheet() { - wp_register_style('gb_admin_style', get_bloginfo('template_url') . '/wpsc/css/main_frame_style.css' ); - wp_enqueue_style('gb_admin_style'); -} - - -function woo_wpsc_integration(){ - add_filter( 'wpsc_settings_tabs' , 'woo_wpsc_remove_presentation_tab'); - add_filter( 'woo_before_option_page' , 'woo_wpsc_filter_option'); - add_filter( 'wpsc_settings_redirect_url' , 'woo_wpsc_filter_redirect_url'); - add_action( 'wp_ajax_print_wpsc_presentation' , 'woo_wpsc_presentation_menu'); - add_action( 'admin_init' , 'add_my_stylesheet'); -} - -function wpsc_detect_woo(){ - if (function_exists('woo_version')){ - woo_wpsc_integration(); - } -} - -add_action('after_setup_theme', 'wpsc_detect_woo'); -?> \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wp-shopping-cart.php b/src/wp-content/plugins/wp-e-commerce/wp-shopping-cart.php deleted file mode 100644 index bc832b9..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wp-shopping-cart.php +++ /dev/null @@ -1,169 +0,0 @@ -GetShopped.org | Support Forum | Documentation - * Version: 3.8.4 - * Author: Instinct Entertainment - * Author URI: http://getshopped.org/ - **/ - -/** - * WP_eCommerce - * - * Main WPEC Plugin Class - * - * @package wp-e-commerce - */ -class WP_eCommerce { - - /** - * Start WPEC on plugins loaded - */ - function WP_eCommerce() { - add_action( 'plugins_loaded', array( $this, 'init' ), 8 ); - } - - /** - * Takes care of loading up WPEC - */ - function init() { - // Previous to initializing - do_action( 'wpsc_pre_init' ); - - // Initialize - $this->start(); - $this->constants(); - $this->includes(); - $this->load(); - - // Finished initializing - do_action( 'wpsc_init' ); - } - - /** - * Initialize the basic WPEC constants - */ - function start() { - // Set the core file path - define( 'WPSC_FILE_PATH', dirname( __FILE__ ) ); - - // Define the path to the plugin folder - define( 'WPSC_DIR_NAME', basename( WPSC_FILE_PATH ) ); - - // Define the URL to the plugin folder - define( 'WPSC_FOLDER', dirname( plugin_basename( __FILE__ ) ) ); - define( 'WPSC_URL', plugins_url( '', __FILE__ ) ); - - //load text domain - if( !load_plugin_textdomain( 'wpsc', false, '../languages/' ) ) - load_plugin_textdomain( 'wpsc', false, dirname( plugin_basename( __FILE__ ) ) . '/wpsc-languages/' ); - - // Finished starting - do_action( 'wpsc_started' ); - } - - /** - * Setup the WPEC core constants - */ - function constants() { - // Define globals and constants used by wp-e-commerce - require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-constants.php' ); - - // Load the WPEC core constants - wpsc_core_constants(); - - // Is WordPress Multisite - wpsc_core_is_multisite(); - - // Start the wpsc session - wpsc_core_load_session(); - - // Which version of WPEC - wpsc_core_constants_version_processing(); - - // WPEC Table names and related constants - wpsc_core_constants_table_names(); - - // Uploads directory info - wpsc_core_constants_uploads(); - - // Any additional constants can hook in here - do_action( 'wpsc_constants' ); - } - - /** - * Include the rest of WPEC's files - */ - function includes() { - require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-functions.php' ); - require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-installer.php' ); - require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-includes.php' ); - - // Any additional file includes can hook in here - do_action( 'wpsc_includes' ); - } - - /** - * Setup the WPEC core - */ - function load() { - // Before setup - do_action( 'wpsc_pre_load' ); - - // Legacy action - do_action( 'wpsc_before_init' ); - - // Setup the core WPEC globals - wpsc_core_setup_globals(); - - // Setup the core WPEC cart - wpsc_core_setup_cart(); - - // Load the thumbnail sizes - wpsc_core_load_thumbnail_sizes(); - - // Load the purchase log statuses - wpsc_core_load_purchase_log_statuses(); - - // Load unique names and checout form types - wpsc_core_load_checkout_data(); - - // Load the gateways - wpsc_core_load_gateways(); - - // Load the shipping modules - wpsc_core_load_shipping_modules(); - - // Set page title array for important WPSC pages - wpsc_core_load_page_titles(); - - // WPEC is fully loaded - do_action( 'wpsc_loaded' ); - } - - /** - * WPEC Activation Hook - */ - function install() { - global $wp_version; - if((float)$wp_version < 3.0){ - deactivate_plugins(plugin_basename(__FILE__)); // Deactivate ourselves - wp_die( __('Looks like you\'re running an older version of WordPress, you need to be running at least WordPress 3.0 to use WP e-Commerce 3.8', 'wpsc'), __('WP e-Commerce 3.8 not compatible', 'wpsc'), array('back_link' => true)); - return; - } - define( 'WPSC_FILE_PATH', dirname( __FILE__ ) ); - require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-installer.php' ); - $this->constants(); - wpsc_install(); - - } -} - -// Start WPEC -$wpec = new WP_eCommerce(); - -// Activation -register_activation_hook( __FILE__, array( $wpec, 'install' ) ); - -?> diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/admin-form-functions.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/admin-form-functions.php deleted file mode 100644 index af90978..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/admin-form-functions.php +++ /dev/null @@ -1,467 +0,0 @@ -\n\r"; - $output .= "\n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - - if($conditions != null){ - $output .= ""; - $output .= ""; - $output .= ""; - $output .= ""; - $output .= ""; - $output .= ""; - $output .= ""; - $output .= " \n\r"; - $i=0; - foreach ($conditions as $condition){ - $output .= ""; - $output .= ""; - $output .= ""; - $output .= ""; - $output .= ""; - $output .= ""; - $i++; - } - $output .= wpsc_coupons_conditions( $id); - }elseif($conditions == null){ - $output .= wpsc_coupons_conditions( $id); - - } - $output .= "
".__('Coupon Code', 'wpsc')."".__('Discount', 'wpsc')."".__('Start', 'wpsc')."".__('Expiry', 'wpsc')."".__('Use Once', 'wpsc')."".__('Active', 'wpsc')."".__('Apply On All Products', 'wpsc')."
\n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - - $output .= " "; - $output .= " \n\r"; - $output .= " \n\r"; - $coupon_start = explode(" ",$coupon['start']); - $output .= ""; - $output .= " \n\r"; - $coupon_expiry = explode(" ",$coupon['expiry']); - $output .= ""; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= "
"; - $output .= __("Conditions", 'wpsc'); - $output .= "
"; - $output .= __("Delete", 'wpsc'); - $output .= ""; - $output .= __("Property", 'wpsc'); - $output .= ""; - $output .= __("Logic", 'wpsc'); - $output .= ""; - $output .= __("Value", 'wpsc'); - $output .= "
"; - $output .= ""; - $output .= ""; - $output .= "" . __('Delete', 'wpsc' ) . ""; - $output .= ""; - $output .= $condition['property']; - $output .= ""; - $output .= $condition['logic']; - $output .= ""; - $output .= $condition['value']; - $output .= "
\n\r"; - $output .= "\n\r"; - echo $output; - return $output; - } -function wpsc_coupons_conditions($id){ -?> - - -' . __( 'Add Conditions', 'wpsc') . ' - -
-
- - - - - - - -
-
- - - - - - '; - - $nonced_url = wp_nonce_url("admin.php?wpsc_admin_action=wpsc-delete-coupon&delete_id=$id", 'delete-coupon'); - - $output.= " Delete"; - - $output.=' - - -'; -return $output; - -} -function setting_button(){ - $next_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']."?page=wpsc-edit-products"; - -// $output.="
"; - $output.="
| ".__('Settings', 'wpsc')." »"; - $output.="  
"; - - return $output; -} - -function wpsc_right_now() { - global $wpdb; - $year = date("Y"); - $month = date("m"); - $start_timestamp = mktime(0, 0, 0, $month, 1, $year); - $end_timestamp = mktime(0, 0, 0, ($month+1), 0, $year); - $product_count = $wpdb->get_var("SELECT COUNT(*) - FROM `".$wpdb->posts."` - WHERE `post_status` = 'publish' - AND `post_type` = 'wpsc-product'" - ); - $group_count = count(get_terms("wpsc_product_category")); - $sales_count = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `date` BETWEEN '".$start_timestamp."' AND '".$end_timestamp."'"); - $monthtotal = wpsc_currency_display( admin_display_total_price( $start_timestamp,$end_timestamp ) ); - $overaltotal = wpsc_currency_display( admin_display_total_price() ); - $variation_count = count(get_terms("wpsc-variation", array('parent' => 0))); - $pending_sales = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `processed` IN ('1','2')"); - $accept_sales = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `processed` IN ('3' ,'4', '5')"); - $theme = get_option('wpsc_selected_theme'); - ?> -
-

- - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
-
- " . __( 'Packing Slip', 'wpsc' ) . ""; - global $wpdb; - $purch_sql = "SELECT * FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `id`='".$purchase_id."'"; - $purch_data = $wpdb->get_row($purch_sql,ARRAY_A) ; - - //echo "

".__('Date', 'wpsc').":".date("jS M Y", $purch_data['date'])."

"; - - $cartsql = "SELECT * FROM `".WPSC_TABLE_CART_CONTENTS."` WHERE `purchaseid`=".$purchase_id.""; - $cart_log = $wpdb->get_results($cartsql,ARRAY_A) ; - $j = 0; - - if($cart_log != null) { - echo "
\n\r"; - echo apply_filters( 'wpsc_packing_slip_header', '

' . __( 'Packing Slip', 'wpsc' ) . "

\n\r" ); - echo "".__('Order', 'wpsc')." # ".$purchase_id."

\n\r"; - - echo "\n\r"; - - $form_sql = "SELECT * FROM `".WPSC_TABLE_SUBMITED_FORM_DATA."` WHERE `log_id` = '".(int)$purchase_id."'"; - $input_data = $wpdb->get_results($form_sql,ARRAY_A); - - foreach($input_data as $input_row) { - $rekeyed_input[$input_row['form_id']] = $input_row; - } - - - if($input_data != null) { - $form_data = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `active` = '1'",ARRAY_A); - - foreach($form_data as $form_field) { - - switch($form_field['type']) { - case 'country': - - $delivery_region_count = $wpdb->get_var("SELECT COUNT(`regions`.`id`) FROM `".WPSC_TABLE_REGION_TAX."` AS `regions` INNER JOIN `".WPSC_TABLE_CURRENCY_LIST."` AS `country` ON `country`.`id` = `regions`.`country_id` WHERE `country`.`isocode` IN('".$wpdb->escape( $purch_data['billing_country'])."')"); - - if(is_numeric($purch_data['billing_region']) && ($delivery_region_count > 0)) - echo " \n\r"; - - echo " \n\r"; - break; - - case 'delivery_country': - - if(is_numeric($purch_data['shipping_region']) && ($delivery_region_count > 0)) - echo " \n\r"; - - echo " \n\r"; - break; - - case 'heading': - - if($form_field['name'] == "Hidden Fields") - continue; - else - echo " \n\r"; - break; - - default: - - if( $form_field['name'] == "Cupcakes") { - parse_str($rekeyed_input[$form_field['id']]['value'], $cupcakes ); - - foreach( $cupcakes as $product_id => $quantity ) { - - $product = get_post($product_id); - $string .= "(".$quantity.") ".$product->post_title.", "; - - } - $string = rtrim($string, ", "); - echo " \n\r"; - - } else { - - if ($form_field['name']=="State" && !empty($purch_data['billing_region']) || $form_field['name']=="State" && !empty($purch_data['billing_region'])) - echo ""; - else - echo " \n\r"; - - } - - break; - } - - } - } else { - - echo " \n\r"; - echo " \n\r"; - echo " \n\r"; - echo " \n\r"; - } - - if ( 2 == get_option( 'payment_method' ) ) { - $gateway_name = ''; - $nzshpcrt_gateways = nzshpcrt_get_gateways(); - - foreach( $nzshpcrt_gateways as $gateway ) { - if ( $purch_data['gateway'] != 'testmode' ) { - if ( $gateway['internalname'] == $purch_data['gateway'] ) { - $gateway_name = $gateway['name']; - } - } else { - $gateway_name = __('Manual Payment', 'wpsc'); - } - } - } - - echo "
".__('State', 'wpsc').":".wpsc_get_region($purch_data['billing_region'])."
".wp_kses($form_field['name'], array() ).":".htmlentities(stripslashes($rekeyed_input[$form_field['id']]['value']), ENT_QUOTES, 'UTF-8')."
".__('State', 'wpsc').":".wpsc_get_region($purch_data['shipping_region'])."
".wp_kses($form_field['name'], array() ).":".htmlentities(stripslashes($rekeyed_input[$form_field['id']]['value']), ENT_QUOTES, 'UTF-8')."
".wp_kses($form_field['name'], array()).":
".wp_kses($form_field['name'], array() ).":".htmlentities(stripslashes($string), ENT_QUOTES, 'UTF-8')."
".wp_kses($form_field['name'], array() ).":".htmlentities(stripslashes($rekeyed_input[$form_field['id']]['value']), ENT_QUOTES, 'UTF-8')."
".__('Name', 'wpsc').":".$purch_data['firstname']." ".$purch_data['lastname']."
".__('Address', 'wpsc').":".$purch_data['address']."
".__('Phone', 'wpsc').":".$purch_data['phone']."
".__('Email', 'wpsc').":".$purch_data['email']."
\n\r"; - - - do_action ('wpsc_packing_slip_extra_info',$purchase_id); - - - echo ""; - - echo ""; - echo " "; - - echo " "; - - - echo " "; - - echo " "; - echo ''; - echo ''; - $endtotal = 0; - $all_donations = true; - $all_no_shipping = true; - $file_link_list = array(); - foreach($cart_log as $cart_row) { - $alternate = ""; - $j++; - if(($j % 2) != 0) { - $alternate = "class='alt'"; - } - // product ID will be $cart_row['prodid']. need to fetch name and stuff - - $variation_list = ''; - - if($cart_row['donation'] != 1) { - $all_donations = false; - } - - if($cart_row['no_shipping'] != 1) { - $shipping = $cart_row['pnp'] * $cart_row['quantity']; - $total_shipping += $shipping; - $all_no_shipping = false; - } else { - $shipping = 0; - } - - $price = $cart_row['price'] * $cart_row['quantity']; - $gst = $price - ($price / (1+($cart_row['gst'] / 100))); - - if($gst > 0) { - $tax_per_item = $gst / $cart_row['quantity']; - } - - - echo ""; - - - echo " "; - - echo " "; - - - echo " "; - - echo " "; - - - - echo ''; - echo ''; - } - echo "
".__('Quantity', 'wpsc')." ".__('Name', 'wpsc')."".__('Price', 'wpsc')." ".__('Shipping', 'wpsc')." ' . __('Tax', 'wpsc') . '
"; - echo $cart_row['quantity']; - echo " "; - echo $cart_row['name']; - echo stripslashes($variation_list); - echo " "; - echo wpsc_currency_display( $price ); - echo " "; - echo wpsc_currency_display($shipping ); - echo " '; - echo wpsc_currency_display( $cart_row['tax_charged'] ); - echo '
"; - - echo ''; - echo ''; - echo ''; - //wpec_taxes - if($purch_data['wpec_taxes_total'] != 0.00) - { - echo ''; - } - echo ''; - echo '
Base Shipping' . wpsc_currency_display( $purch_data['base_shipping'] ) . '
Total Shipping' . wpsc_currency_display( $purch_data['base_shipping'] + $total_shipping ) . '
Taxes' . wpsc_currency_display( $purch_data['wpec_taxes_total'] ) . '
Total Price' . wpsc_currency_display( $purch_data['totalprice'] ) . '
'; - - echo "
\n\r"; - } else { - echo "
".__('This users cart was empty', 'wpsc'); - } - -} - - - - - -function wpsc_product_item_row() { -} - -?> diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/admin.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/admin.php deleted file mode 100644 index 2885a60..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/admin.php +++ /dev/null @@ -1,908 +0,0 @@ -post_type) return $vars; - - $vars['posts_per_archive_page'] = 0; - if(is_admin() && isset($vars['orderby'])){ - $vars['orderby'] = 'date'; - $vars['order'] = 'desc'; - $vars['nopaging'] = false; - $posts_per_page = (int)get_user_option( 'edit_wpsc_product_per_page' ); - $vars['posts_per_page'] = ( $posts_per_page )?$posts_per_page:20; - } - if( 'dragndrop' == get_option('wpsc_sort_by') ){ - $vars['orderby'] = 'menu_order title'; - $vars['order'] = 'desc'; - $vars['nopaging'] = true; - } - - return $vars; -} - -/** - * setting the screen option to between 1 and 999 - * @access public - * - * @since 3.8 - * @param $status - * @param $option (string) name of option being saved - * @param $value (string) value of option being saved - * @return $value after changes... - */ -function wpsc_set_screen_option($status, $option, $value){ - if( in_array($option, array ("edit_wpsc_variation_per_page","edit_wpsc_product_per_page" )) ){ - if ( "edit_wpsc_variation_per_page" == $option ){ - global $user_ID; - update_user_option($user_ID,'edit_wpsc-variation_per_page',$value); - } - return $value; - } -} -add_filter('set-screen-option', 'wpsc_set_screen_option', 99, 3); - -/** - * When rearranging the products for drag and drop it is easiest to arrange them when they are all on the same page... - * @access public (wp-admin) - * - * @since 3.8 - * @param $per_page (int) number of products per page - * @param $post_type (string) name of current post type - * @return $per_page after changes... - */ -function wpsc_drag_and_drop_ordering($per_page, $post_type){ - global $wpdb; - if ( 'wpsc-product' == $post_type && 'dragndrop' == get_option( 'wpsc_sort_by' ) && $count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE `post_type`='wpsc-product' AND `post_parent`=0" ) ) - $per_page = $count; - return $per_page; -} -add_filter( 'request', 'wpsc_query_vars_product_list' ); -add_filter('edit_posts_per_page' , 'wpsc_drag_and_drop_ordering', 10, 2 ); -/** - * Checks whether to display or hide the update wp-e-commerce link - * - * @access public - * - * @since 3.8 - * @return boolean true - show link, false- hide link - */ -function wpsc_show_update_link() { - global $wpdb; - // Check if old product_list table exists - // If it exists AND get_option wpsc_upgrade_complete is not true then return true - $sql = 'SHOW TABLES LIKE "'.$wpdb->prefix.'wpsc_product_list"'; - $var = $wpdb->get_var( $sql ); - if ( !empty( $var ) && false == get_option( 'wpsc_hide_update' ) ) - return true; - else - return false; -} -/** - * wpsc_admin_pages function, all the definitons of admin pages are stores here. - * No parameters, returns nothing - * - * Fairly standard wordpress plugin API stuff for adding the admin pages, rearrange the order to rearrange the pages - * The bits to display the options page first on first use may be buggy, but tend not to stick around long enough to be identified and fixed - * if you find bugs, feel free to fix them. - * - * If the permissions are changed here, they will likewise need to be changed for the other sections of the admin that either use ajax - * or bypass the normal download system. - */ -function wpsc_admin_pages() { - - // Code to enable or disable the debug page - if ( isset( $_GET['wpsc_activate_debug_page'] ) ) { - if ( 'true' == $_GET['wpsc_activate_debug_page'] ) { - $_SESSION['wpsc_activate_debug_page'] = true; - } else if ( 'false' == $_GET['wpsc_activate_debug_page'] ) { - $_SESSION['wpsc_activate_debug_page'] = false; - } - } - - // Add to Dashboard - $page_hooks[] = $purchase_log_page = add_submenu_page( 'index.php', __( 'Store Sales', 'wpsc' ), __( 'Store Sales', 'wpsc' ), 'administrator', 'wpsc-sales-logs', 'wpsc_display_sales_logs' ); - - if ( wpsc_show_update_link() ) - $page_hooks[] = add_submenu_page( 'index.php', __( 'Update Store', 'wpsc' ), __( 'Store Update', 'wpsc' ), 'administrator', 'wpsc-update', 'wpsc_display_update_page' ); - - $page_hooks[] = add_submenu_page( 'index.php', __( 'Store Upgrades', 'wpsc' ), __( 'Store Upgrades', 'wpsc' ), 'administrator', 'wpsc-upgrades', 'wpsc_display_upgrades_page' ); - - // Set the base page for Products - $products_page = 'edit.php?post_type=wpsc-product'; - - $page_hooks[] = $edit_coupons_page = add_submenu_page( $products_page , __( 'Coupons', 'wpsc' ), __( 'Coupons', 'wpsc' ), 'administrator', 'wpsc-edit-coupons', 'wpsc_display_coupons_page' ); - - // Add Settings pages - $page_hooks[] = $edit_options_page = add_options_page( __( 'Store Settings', 'wpsc' ), __( 'Store', 'wpsc' ), 'administrator', 'wpsc-settings', 'wpsc_display_settings_page' ); - add_action( 'admin_print_scripts-' . $edit_options_page , 'wpsc_print_admin_scripts' ); - - // Debug Page - if ( ( defined( 'WPSC_ADD_DEBUG_PAGE' ) && ( WPSC_ADD_DEBUG_PAGE == true ) ) || ( isset( $_SESSION['wpsc_activate_debug_page'] ) && ( true == $_SESSION['wpsc_activate_debug_page'] ) ) ) - $page_hooks[] = add_options_page( __( 'Store Debug', 'wpsc' ), __( 'Store Debug', 'wpsc' ), 'administrator', 'wpsc-debug', 'wpsc_debug_page' ); - - - $header = '

' . __( 'For More Information', 'wpsc' ) . '

'; - - add_contextual_help( 'toplevel_page_wpsc-sales-logs', $header . __( "About the Sales Page", 'wpsc' ) ); - add_contextual_help( 'toplevel_page_wpsc-edit-products', $header . __( "About the Products Page", 'wpsc' ) ); - add_contextual_help( 'products_page_wpsc-edit-groups', $header . __( "About the Categories Page", 'wpsc' ) ); - add_contextual_help( 'products_page_edit-tags', $header . __( "About the Variations Page", 'wpsc' ) ); - add_contextual_help( 'settings_page_wpsc-settings', $header . __( "General Settings
Checkout Options
", 'wpsc' ) ); - add_contextual_help( 'products_page_wpsc-edit-coupons', $header . __( "Marketing Options
", 'wpsc' ) ); - - $page_hooks = apply_filters( 'wpsc_additional_pages', $page_hooks, $products_page ); - - do_action( 'wpsc_add_submenu' ); - - // Include the javascript and CSS for this page - // This is so important that I can't even express it in one line - - foreach ( $page_hooks as $page_hook ) { - add_action( 'load-' . $page_hook, 'wpsc_admin_include_css_and_js_refac' ); - - switch ( $page_hook ) { - - case $edit_options_page : - add_action( 'load-' . $page_hook, 'wpsc_admin_include_optionspage_css_and_js' ); - break; - - case $purchase_log_page : - add_action( 'admin_head', 'wpsc_product_log_rss_feed' ); - break; - - case $edit_coupons_page : - add_action( 'load-' . $page_hook, 'wpsc_admin_include_coupon_js' ); - break; - } - } - - // Some updating code is run from here, is as good a place as any, and better than some - if ( ( null == get_option( 'wpsc_trackingid_subject' ) ) && ( null == get_option( 'wpsc_trackingid_message' ) ) ) { - update_option( 'wpsc_trackingid_subject', __( 'Product Tracking Email', 'wpsc' ) ); - update_option( 'wpsc_trackingid_message', __( "Track & Trace means you may track the progress of your parcel with our online parcel tracker, just login to our website and enter the following Tracking ID to view the status of your order.\n\nTracking ID: %trackid%\n", 'wpsc' ) ); - } - - return; -} -function wpsc_product_log_rss_feed() { - echo ""; -} -function wpsc_admin_include_coupon_js() { - - // Variables - $siteurl = get_option( 'siteurl' ); - $version_identifier = WPSC_VERSION . "." . WPSC_MINOR_VERSION; - - // Coupon CSS - wp_enqueue_style( 'wp-e-commerce-admin_2.7', WPSC_URL . '/wpsc-admin/css/settingspage.css', false, false, 'all' ); - wp_enqueue_style( 'wp-e-commerce-admin', WPSC_URL . '/wpsc-admin/css/admin.css', false, $version_identifier, 'all' ); - - // Coupon JS - wp_enqueue_script( 'wp-e-commerce-admin-parameters', $siteurl . '/wp-admin/admin.php?wpsc_admin_dynamic_js=true', false, $version_identifier ); - wp_enqueue_script( 'livequery', WPSC_URL . '/wpsc-admin/js/jquery.livequery.js', array( 'jquery' ), '1.0.3' ); - wp_enqueue_script( 'datepicker-ui', WPSC_CORE_JS_URL . '/ui.datepicker.js', array( 'jquery-ui-core' ), $version_identifier ); - wp_enqueue_script( 'wp-e-commerce-admin_legacy', WPSC_URL . '/wpsc-admin/js/admin-legacy.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable', 'datepicker-ui' ), $version_identifier ); -} - -/** - * wpsc_admin_css_and_js function, includes the wpsc_admin CSS and JS - * No parameters, returns nothing - */ -function wpsc_admin_include_css_and_js( ) { - $siteurl = get_option( 'siteurl' ); - if ( is_ssl ( ) ) - $siteurl = str_replace( "http://", "https://", $siteurl ); - - wp_admin_css( 'dashboard' ); - //wp_admin_css( 'media' ); - - $version_identifier = WPSC_VERSION . "." . WPSC_MINOR_VERSION; - wp_enqueue_script( 'livequery', WPSC_URL . '/wpsc-admin/js/jquery.livequery.js', array( 'jquery' ), '1.0.3' ); - wp_enqueue_script( 'wp-e-commerce-admin-parameters', $siteurl . '/wp-admin/admin.php?wpsc_admin_dynamic_js=true', false, $version_identifier ); - wp_enqueue_script( 'wp-e-commerce-admin', WPSC_URL . '/wpsc-admin/js/admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable' ), $version_identifier, false ); - wp_enqueue_script( 'wp-e-commerce-legacy-ajax', WPSC_URL . '/wpsc-admin/js/ajax.js', false, $version_identifier ); // needs removing - wp_enqueue_script( 'wp-e-commerce-variations', WPSC_URL . '/wpsc-admin/js/variations.js', array( 'jquery' ), $version_identifier ); - - wp_enqueue_style( 'wp-e-commerce-admin', WPSC_URL . '/wpsc-admin/css/admin.css', false, $version_identifier, 'all' ); - wp_enqueue_style( 'wp-e-commerce-admin-dynamic', $siteurl . "/wp-admin/admin.php?wpsc_admin_dynamic_css=true", false, $version_identifier, 'all' ); - - // Prototype breaks dragging and dropping, I need it gone - wp_deregister_script( 'prototype' ); - - // remove the old javascript and CSS, we want it no more, it smells bad - remove_action( 'admin_head', 'wpsc_admin_css' ); - - // Localize scripts - wp_localize_script( 'wp-e-commerce-admin', 'wpsc_adminL10n', array( - 'unsaved_changes_detected' => __( 'Unsaved changes have been detected. Click OK to lose these changes and continue.', 'wpsc' ), - 'dragndrop_set' => ( get_option( 'wpsc_sort_by' ) == 'dragndrop' ? 'true' : 'false' ), - 'l10n_print_after' => 'try{convertEntities(wpsc_adminL10n);}catch(e){};' - ) ); -} - -/** - * wpsc_admin_include_optionspage_css_and_js function, includes the wpsc_admin CSS and JS for the specific options page - * No parameters, returns nothing - */ -function wpsc_admin_include_optionspage_css_and_js() { - $version_identifier = WPSC_VERSION . "." . WPSC_MINOR_VERSION; - wp_enqueue_script( 'wp-e-commerce-js-ajax', WPSC_URL . '/wpsc-core/js/ajax.js', false, $version_identifier ); - wp_enqueue_script( 'wp-e-commerce-js-ui-tabs', WPSC_URL . '/wpsc-admin/js/jquery-ui.js', false, $version_identifier ); - wp_enqueue_script( 'wp-e-commerce-js-dimensions', WPSC_URL . '/wpsc-admin/js/dimensions.js', false, $version_identifier ); - wp_enqueue_style( 'wp-e-commerce-admin_2.7', WPSC_URL . '/wpsc-admin/css/settingspage.css', false, false, 'all' ); - wp_enqueue_style( 'wp-e-commerce-ui-tabs', WPSC_URL . '/wpsc-admin/css/jquery.ui.tabs.css', false, $version_identifier, 'all' ); -} - -function wpsc_meta_boxes() { - global $post; - $pagename = 'wpsc-product'; - remove_meta_box( 'wpsc-variationdiv', 'wpsc-product', 'core' ); - - //if a variation page do not show these metaboxes - if ( is_object( $post ) && $post->post_parent == 0 ) { - add_meta_box( 'wpsc_product_variation_forms', __('Variations', 'wpsc'), 'wpsc_product_variation_forms', $pagename, 'normal', 'high' ); - add_meta_box( 'wpsc_product_external_link_forms', __('Off Site Product link', 'wpsc'), 'wpsc_product_external_link_forms', $pagename, 'normal', 'high' ); - } else if( is_object( $post ) && $post->post_status == "inherit" ) { - remove_meta_box( 'tagsdiv-product_tag', 'wpsc-product', 'core' ); - remove_meta_box( 'wpsc_product_external_link_forms', 'wpsc-product', 'core' ); - remove_meta_box( 'wpsc_product_categorydiv', 'wpsc-product', 'core' ); - } - - add_meta_box( 'wpsc_price_control_forms', __('Price Control', 'wpsc'), 'wpsc_price_control_forms', $pagename, 'side', 'low' ); - add_meta_box( 'wpsc_stock_control_forms', __('Stock Control', 'wpsc'), 'wpsc_stock_control_forms', $pagename, 'side', 'low' ); - add_meta_box( 'wpsc_product_taxes_forms', __('Taxes', 'wpsc'), 'wpsc_product_taxes_forms', $pagename, 'side', 'low' ); - add_meta_box( 'wpsc_additional_desc', __('Additional Description', 'wpsc'), 'wpsc_additional_desc', $pagename, 'normal', 'high' ); - add_meta_box( 'wpsc_product_download_forms', __('Product Download', 'wpsc'), 'wpsc_product_download_forms', $pagename, 'normal', 'high' ); - add_meta_box( 'wpsc_product_image_forms', __('Product Images', 'wpsc'), 'wpsc_product_image_forms', $pagename, 'normal', 'high' ); - add_meta_box( 'wpsc_product_shipping_forms', __('Shipping', 'wpsc'), 'wpsc_product_shipping_forms', $pagename, 'normal', 'high' ); - add_meta_box( 'wpsc_product_advanced_forms', __('Advanced Settings', 'wpsc'), 'wpsc_product_advanced_forms', $pagename, 'normal', 'high' ); - -} - -add_action( 'admin_footer', 'wpsc_meta_boxes' ); - -add_action( 'admin_head', 'wpsc_admin_include_css_and_js' ); -add_action( 'admin_head', 'wpsc_admin_include_css_and_js_refac' ); -add_action( 'admin_enqueue_scripts', 'wpsc_admin_include_css_and_js_refac' ); -function wpsc_admin_include_css_and_js_refac( $pagehook ) { - - global $post_type, $current_screen; - $siteurl = get_option( 'siteurl' ); - if ( is_ssl ( ) ) - $siteurl = str_replace( "http://", "https://", $siteurl ); - - wp_admin_css( 'dashboard' ); - - if($current_screen->id == 'dashboard_page_wpsc-sales-logs'){ - // jQuery - wp_enqueue_script( 'jquery' ); - wp_enqueue_script( 'jquery-ui-draggable' ); - wp_enqueue_script( 'jquery-ui-droppable' ); - wp_enqueue_script( 'jquery-ui-sortable' ); - - // Metaboxes - wp_enqueue_script( 'common' ); - wp_enqueue_script( 'wp-lists' ); - wp_enqueue_script( 'postbox' ); - } - - $version_identifier = WPSC_VERSION . "." . WPSC_MINOR_VERSION; - $pages = array( 'index.php', 'options-general.php', 'edit.php', 'post.php', 'post-new.php' ); - - if ( ( in_array( $pagehook, $pages ) && $post_type == 'wpsc-product' ) || $current_screen->id == 'edit-wpsc_product_category' || $current_screen->id == 'dashboard_page_wpsc-sales-logs' || $current_screen->id == 'settings_page_wpsc-settings' || $current_screen->id == 'wpsc-product_page_wpsc-edit-coupons' ) { - wp_enqueue_script( 'livequery', WPSC_URL . '/wpsc-admin/js/jquery.livequery.js', array( 'jquery' ), '1.0.3' ); - wp_enqueue_script( 'wp-e-commerce-admin-parameters', $siteurl . '/wp-admin/admin.php?wpsc_admin_dynamic_js=true', false, $version_identifier ); - wp_enqueue_script( 'wp-e-commerce-admin', WPSC_URL . '/wpsc-admin/js/admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable' ), $version_identifier, false ); - wp_enqueue_script( 'wp-e-commerce-legacy-ajax', WPSC_URL . '/wpsc-admin/js/ajax.js', false, $version_identifier ); // needs removing - wp_enqueue_script( 'wp-e-commerce-variations', WPSC_URL . '/wpsc-admin/js/variations.js', array( 'jquery' ), $version_identifier ); - wp_enqueue_script( 'inline-edit-post' ); - wp_enqueue_style( 'wp-e-commerce-admin', WPSC_URL . '/wpsc-admin/css/admin.css', false, $version_identifier, 'all' ); - wp_enqueue_style( 'wp-e-commerce-admin-dynamic', $siteurl . "/wp-admin/admin.php?wpsc_admin_dynamic_css=true", false, $version_identifier, 'all' ); - // Localize scripts - wp_localize_script( 'wp-e-commerce-admin', 'wpsc_adminL10n', array( - 'unsaved_changes_detected' => __( 'Unsaved changes have been detected. Click OK to lose these changes and continue.', 'wpsc' ), - 'dragndrop_set' => ( get_option( 'wpsc_sort_by' ) == 'dragndrop' ? 'true' : 'false' ), - 'l10n_print_after' => 'try{convertEntities(wpsc_adminL10n);}catch(e){};' - ) ); - } - if ( 'dashboard_page_wpsc-upgrades' == $pagehook || 'dashboard_page_wpsc-update' == $pagehook ) - wp_enqueue_style( 'wp-e-commerce-admin', WPSC_URL . '/wpsc-admin/css/admin.css', false, $version_identifier, 'all' ); - wp_deregister_script( 'prototype' ); - - // remove the old javascript and CSS, we want it no more, it smells bad - remove_action( 'admin_head', 'wpsc_admin_css' ); -} - -function wpsc_admin_dynamic_js() { - header( 'Content-Type: text/javascript' ); - header( 'Expires: ' . gmdate( 'r', mktime( 0, 0, 0, date( 'm' ), ( date( 'd' ) + 12 ), date( 'Y' ) ) ) . '' ); - header( 'Cache-Control: public, must-revalidate, max-age=86400' ); - header( 'Pragma: public' ); - - $siteurl = get_option( 'siteurl' ); - $hidden_boxes = get_option( 'wpsc_hidden_box' ); - - $form_types1 = get_option( 'wpsc_checkout_form_fields' ); - $unique_names1 = get_option( 'wpsc_checkout_unique_names' ); - - $form_types = ''; - foreach ( (array)$form_types1 as $form_type ) { - $form_types .= ""; - } - - $unique_names = ""; - foreach ( (array)$unique_names1 as $unique_name ) { - $unique_names.= ""; - } - - $hidden_boxes = implode( ',', (array)$hidden_boxes ); - - echo "var base_url = '" . $siteurl . "';\n\r"; - echo "var WPSC_URL = '" . WPSC_URL . "';\n\r"; - echo "var WPSC_IMAGE_URL = '" . WPSC_IMAGE_URL . "';\n\r"; - echo "var WPSC_DIR_NAME = '" . WPSC_DIR_NAME . "';\n\r"; - echo "var WPSC_IMAGE_URL = '" . WPSC_IMAGE_URL . "';\n\r"; - - // LightBox Configuration start - echo "var fileLoadingImage = '" . WPSC_CORE_IMAGES_URL . "/loading.gif';\n\r"; - echo "var fileBottomNavCloseImage = '" . WPSC_CORE_IMAGES_URL . "/closelabel.gif';\n\r"; - echo "var fileThickboxLoadingImage = '" . WPSC_CORE_IMAGES_URL . "/loadingAnimation.gif';\n\r"; - - echo "var resizeSpeed = 9;\n\r"; - - echo "var borderSize = 10;\n\r"; - - echo "var hidden_boxes = '" . $hidden_boxes . "';\n\r"; - echo "var IS_WP27 = '" . IS_WP27 . "';\n\r"; - echo "var TXT_WPSC_DELETE = '" . __( 'Delete', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_TEXT = '" . __( 'Text', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_EMAIL = '" . __( 'Email', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_COUNTRY = '" . __( 'Country', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_TEXTAREA = '" . __( 'Textarea', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_HEADING = '" . __( 'Heading', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_COUPON = '" . __( 'Coupon', 'wpsc' ) . "';\n\r"; - - echo "var HTML_FORM_FIELD_TYPES =\" " . $form_types . "; \" \n\r"; - echo "var HTML_FORM_FIELD_UNIQUE_NAMES = \" " . $unique_names . "; \" \n\r"; - - echo "var TXT_WPSC_LABEL = '" . __( 'Label', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_LABEL_DESC = '" . __( 'Label Description', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_ITEM_NUMBER = '" . __( 'Item Number', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_LIFE_NUMBER = '" . __( 'Life Number', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_PRODUCT_CODE = '" . __( 'Product Code', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_PDF = '" . __( 'PDF', 'wpsc' ) . "';\n\r"; - - echo "var TXT_WPSC_AND_ABOVE = '" . __( ' and above', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_IF_PRICE_IS = '" . __( 'If price is ', 'wpsc' ) . "';\n\r"; - echo "var TXT_WPSC_IF_WEIGHT_IS = '" . __( 'If weight is ', 'wpsc' ) . "';\n\r"; - - exit(); -} - -if ( isset( $_GET['wpsc_admin_dynamic_js'] ) && ( $_GET['wpsc_admin_dynamic_js'] == 'true' ) ) { - add_action( "admin_init", 'wpsc_admin_dynamic_js' ); -} - -function wpsc_admin_dynamic_css() { - header( 'Content-Type: text/css' ); - header( 'Expires: ' . gmdate( 'r', mktime( 0, 0, 0, date( 'm' ), ( date( 'd' ) + 12 ), date( 'Y' ) ) ) . '' ); - header( 'Cache-Control: public, must-revalidate, max-age=86400' ); - header( 'Pragma: public' ); - $flash = 0; - $flash = apply_filters( 'flash_uploader', $flash ); - - if ( $flash = 1 ) { -?> - div.flash-image-uploader { - display: block; - } - - div.browser-image-uploader { - display: none; - } - - div.flash-image-uploader { - display: none; - } - - div.browser-image-uploader { - display: block; - } -get_var( "SELECT COUNT(*) FROM `" . WPSC_TABLE_PURCHASE_LOGS . "`" ); - - /* - * This is the right hand side for the past 30 days revenue on the wp dashboard - */ - echo "
"; - echo "" . __( 'Current Month', 'wpsc' ) . "
"; - echo "

"; - // calculates total amount of orders for the month - $year = date( "Y" ); - $month = date( "m" ); - $start_timestamp = mktime( 0, 0, 0, $month, 1, $year ); - $end_timestamp = mktime( 0, 0, 0, ( $month + 1 ), 0, $year ); - $sql = "SELECT COUNT(*) FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `date` BETWEEN '$start_timestamp' AND '$end_timestamp' AND `processed` IN (2,3,4) ORDER BY `date` DESC"; - $currentMonthOrders = $wpdb->get_var( $sql ); - - //calculates amount of money made for the month - $currentMonthsSales = wpsc_currency_display( admin_display_total_price( $start_timestamp, $end_timestamp ) ); - echo $currentMonthsSales; - echo "" . _x( 'Sales', 'the total value of sales in dashboard widget', 'wpsc' ) . ""; - echo "

"; - echo "

"; - echo ""; - echo $currentMonthOrders; - echo ""; - echo "" . _n( 'Order', 'Orders', $currentMonthOrders, 'wpsc' ) . ""; - echo "

"; - echo "

"; - //calculates average sales amount per order for the month - if ( $currentMonthOrders > 0 ) { - $monthsAverage = ( (int)admin_display_total_price( $start_timestamp, $end_timestamp ) / (int)$currentMonthOrders ); - echo wpsc_currency_display( $monthsAverage ); - } - //echo ""; - echo "" . __( 'Avg Order', 'wpsc' ) . ""; - echo "

"; - echo "
"; - /* - * This is the left side for the total life time revenue on the wp dashboard - */ - - echo "
"; - echo "" . __( 'Total Income', 'wpsc' ) . "
"; - - echo "

"; - echo wpsc_currency_display( admin_display_total_price() ); - echo "" . _x( 'Sales', 'the total value of sales in dashboard widget', 'wpsc' ) . ""; - echo "

"; - echo "

"; - echo ""; - echo $totalOrders; - echo ""; - echo "" . _n( 'Order', 'Orders', $totalOrders, 'wpsc' ) . ""; - echo "

"; - echo "

"; - //calculates average sales amount per order for the month - if ( ( admin_display_total_price() > 0 ) && ( $totalOrders > 0 ) ) { - $totalAverage = ( (int)admin_display_total_price() / (int)$totalOrders ); - } else { - $totalAverage = 0; - } - echo wpsc_currency_display( $totalAverage ); - //echo ""; - echo "" . __( 'Avg Order', 'wpsc' ) . ""; - echo "

"; - echo "
"; - echo "
"; -} - -add_action( 'wpsc_admin_pre_activity', 'wpsc_admin_latest_activity' ); - - -/* - * Dashboard Widget Setup - * Adds the dashboard widgets if the user is an admin - * Since 3.6 - */ - -function wpsc_dashboard_widget_setup() { - if ( is_admin() && current_user_can( 'manage_options' ) ) { - $version_identifier = WPSC_VERSION . "." . WPSC_MINOR_VERSION; - // Enqueue the styles and scripts necessary - wp_enqueue_style( 'wp-e-commerce-admin', WPSC_URL . '/wpsc-admin/css/admin.css', false, $version_identifier, 'all' ); - wp_enqueue_script( 'datepicker-ui', WPSC_URL . "/wpsc-core/js/ui.datepicker.js", array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable' ), $version_identifier ); - // Add the dashboard widgets - wp_add_dashboard_widget( 'wpsc_dashboard_news', __( 'Getshopped News' , 'wpsc' ), 'wpsc_dashboard_news' ); - wp_add_dashboard_widget( 'wpsc_dashboard_widget', __( 'Sales Summary', 'wpsc' ), 'wpsc_dashboard_widget' ); - wp_add_dashboard_widget( 'wpsc_quarterly_dashboard_widget', __( 'Sales by Quarter', 'wpsc' ), 'wpsc_quarterly_dashboard_widget' ); - wp_add_dashboard_widget( 'wpsc_dashboard_4months_widget', __( 'Sales by Month', 'wpsc' ), 'wpsc_dashboard_4months_widget' ); - - // Sort the Dashboard widgets so ours it at the top - global $wp_meta_boxes; - $normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core']; - // Backup and delete our new dashbaord widget from the end of the array - $wpsc_widget_backup = array( 'wpsc_dashboard_news' => $normal_dashboard['wpsc_dashboard_news'] ); - $wpsc_widget_backup += array( 'wpsc_dashboard_widget' => $normal_dashboard['wpsc_dashboard_widget'] ); - $wpsc_widget_backup += array( 'wpsc_quarterly_dashboard_widget' => $normal_dashboard['wpsc_quarterly_dashboard_widget'] ); - $wpsc_widget_backup += array( 'wpsc_dashboard_4months_widget' => $normal_dashboard['wpsc_dashboard_4months_widget'] ); - - unset( $normal_dashboard['wpsc_dashboard_news'] ); - unset( $normal_dashboard['wpsc_dashboard_widget'] ); - unset( $normal_dashboard['wpsc_quarterly_dashboard_widget'] ); - unset( $normal_dashboard['wpsc_dashboard_4months_widget'] ); - - // Merge the two arrays together so our widget is at the beginning - - $sorted_dashboard = array_merge( $wpsc_widget_backup, $normal_dashboard ); - - // Save the sorted array back into the original metaboxes - - $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard; - } -} - -/* - * Registers the widgets on the WordPress Dashboard - */ - -add_action( 'wp_dashboard_setup', 'wpsc_dashboard_widget_setup' ); - -function wpsc_dashboard_news() { - $rss = fetch_feed( 'http://getshopped.org/category/wp-e-commerce-plugin/' ); - $args = array( 'show_author' => 1, 'show_date' => 1, 'show_summary' => 1, 'items'=>3 ); - wp_widget_rss_output( $rss, $args ); - -} - -function wpsc_get_quarterly_summary() { - (int)$firstquarter = get_option( 'wpsc_first_quart' ); - (int)$secondquarter = get_option( 'wpsc_second_quart' ); - (int)$thirdquarter = get_option( 'wpsc_third_quart' ); - (int)$fourthquarter = get_option( 'wpsc_fourth_quart' ); - (int)$finalquarter = get_option( 'wpsc_final_quart' ); - - $results[] = admin_display_total_price( $thirdquarter + 1, $fourthquarter ); - $results[] = admin_display_total_price( $secondquarter + 1, $thirdquarter ); - $results[] = admin_display_total_price( $firstquarter + 1, $secondquarter ); - $results[] = admin_display_total_price( $finalquarter, $firstquarter ); - return $results; -} - -function wpsc_quarterly_dashboard_widget() { - if ( get_option( 'wpsc_business_year_start' ) == false ) { -?> -
- - ' name='add_start' /> - - - -
- -
-

- - -

-
-

- 01  () -

-

- 02  () -

-

- 03  () -

-

- 04  () - -

-
-
-get_results( "SELECT `cart`.`prodid`, - `cart`.`name` - FROM `" . WPSC_TABLE_CART_CONTENTS . "` AS `cart` - INNER JOIN `" . WPSC_TABLE_PURCHASE_LOGS . "` AS `logs` - ON `cart`.`purchaseid` = `logs`.`id` - WHERE `logs`.`processed` >= 2 - AND `logs`.`date` >= " . $months[0] . " - GROUP BY `cart`.`prodid` - ORDER BY SUM(`cart`.`price` * `cart`.`quantity`) DESC - LIMIT 4", ARRAY_A ); //get 4 products with top income in 4 last months. - - $timeranges[0]["start"] = mktime( 0, 0, 0, $this_month - 3, 1, $this_year ); //make array of time ranges - $timeranges[0]["end"] = mktime( 0, 0, 0, $this_month - 2, 1, $this_year ); - $timeranges[1]["start"] = mktime( 0, 0, 0, $this_month - 2, 1, $this_year ); - $timeranges[1]["end"] = mktime( 0, 0, 0, $this_month - 1, 1, $this_year ); - $timeranges[2]["start"] = mktime( 0, 0, 0, $this_month - 1, 1, $this_year ); - $timeranges[2]["end"] = mktime( 0, 0, 0, $this_month, 1, $this_year ); - $timeranges[3]["start"] = mktime( 0, 0, 0, $this_month, 1, $this_year ); - $timeranges[3]["end"] = mktime(); - - $prod_data = array( ); - foreach ( (array)$products as $product ) { //run through products and get each product income amounts and name - $sale_totals = array( ); - foreach ( $timeranges as $timerange ) { //run through time ranges of product, and get its income over each time range - $prodsql = "SELECT - SUM(`cart`.`price` * `cart`.`quantity`) AS sum - FROM `" . WPSC_TABLE_CART_CONTENTS . "` AS `cart` - INNER JOIN `" . WPSC_TABLE_PURCHASE_LOGS . "` AS `logs` - ON `cart`.`purchaseid` = `logs`.`id` - WHERE `logs`.`processed` >= 2 - AND `logs`.`date` >= " . $timerange["start"] . " - AND `logs`.`date` < " . $timerange["end"] . " - AND `cart`.`prodid` = " . $product['prodid'] . " - GROUP BY `cart`.`prodid`"; //get the amount of income that current product has generaterd over current time range - $sale_totals[] = $wpdb->get_var( $prodsql ); //push amount to array - } - $prod_data[] = array( - 'sale_totals' => $sale_totals, - 'product_name' => $product['name'] ); //result: array of 2: $prod_data[0] = array(income) - $sums = array( ); //reset array //$prod_data[1] = product name - } - - $tablerow = 1; - ob_start(); - ?> -
- - - - - - - - - - - - - - - - -
- cap->edit_posts ) ) { - echo '({"error":"' . __( 'Error: you don\'t have required permissions to edit this product', 'wpsc' ) . '", "id": "'. $_POST['id'] .'"})'; - die(); - } - - $product = array( - 'ID' => $_POST['id'], - 'post_title' => $_POST['title'] - ); - - $id = wp_update_post( $product ); - if ( $id > 0 ) { - //need parent meta to know which weight unit we are using - $post = get_post( $id ); - $parent_meta = get_product_meta($post->post_parent, 'product_metadata', true ); - $product_meta = get_product_meta( $product['ID'], 'product_metadata', true ); - if ( is_numeric( $_POST['weight'] ) || empty( $_POST['weight'] ) ){ - $product_meta['weight'] = wpsc_convert_weight($_POST['weight'], $parent_meta['weight_unit'], 'pound', true); - $product_meta['weight_unit'] = $parent_meta['weight_unit']; - } - - update_product_meta( $product['ID'], 'product_metadata', $product_meta ); - update_product_meta( $product['ID'], 'price', (float)$_POST['price'] ); - update_product_meta( $product['ID'], 'special_price', (float)$_POST['special_price'] ); - update_product_meta( $product['ID'], 'sku', $_POST['sku'] ); - if ( !is_numeric($_POST['stock']) ) - update_product_meta( $product['ID'], 'stock', '' ); - else - update_product_meta( $product['ID'], 'stock', absint( $_POST['stock'] ) ); - - $post = get_post( $id ); - $meta = get_product_meta( $id, 'product_metadata', true ); - $price = get_product_meta( $id, 'price', true ); - $special_price = get_product_meta( $id, 'special_price', true ); - $sku = get_product_meta( $id, 'sku', true ); - $sku = ( $sku )?$sku:__('N/A', 'wpsc'); - $stock = get_product_meta( $id, 'stock', true ); - $stock = ( $stock === '' )?__('N/A', 'wpsc'):$stock; - $results = array( 'id' => $id, 'title' => $post->post_title, 'weight' => wpsc_convert_weight($meta['weight'], 'pound', $parent_meta['weight_unit']), 'price' => wpsc_currency_display( $price ), 'special_price' => wpsc_currency_display( $special_price ), 'sku' => $sku, 'stock' => $stock ); - echo '(' . json_encode( $results ) . ')'; - die(); - } else { - echo '({"error":"' . __( 'Error updating product', 'wpsc' ) . '", "id": "'. $_POST['id'] .'"})'; - } - die(); -} - -function wpsc_add_meta_boxes(){ - add_meta_box( 'dashboard_right_now', __('Current Month', 'wpsc'), 'wpsc_right_now', 'dashboard_page_wpsc-sales-logs', 'top' ); -} - -function wpsc_check_permalink_notice(){ - -?> -

-trac)' , 'wpsc' ), 'http://core.trac.wordpress.org/ticket/16736' ); ?> -

- diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/ajax-and-init.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/ajax-and-init.php deleted file mode 100644 index 022c9c9..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/ajax-and-init.php +++ /dev/null @@ -1,1826 +0,0 @@ - $value ) { - $parts = preg_split( '/^wpsc_trackingid/', $key ); - if ( count( $parts ) > '1' ) { - $id = $parts[1]; - $trackingid = $value; - $sql = "UPDATE `" . WPSC_TABLE_PURCHASE_LOGS . "` SET `track_id`='" . $trackingid . "' WHERE `id`=" . $id; - $wpdb->query( $sql ); - } - - } -} - -if ( isset( $_REQUEST['submit'] ) && ($_REQUEST['submit'] == 'Add Tracking ID') ) { - add_action( 'admin_init', 'wpsc_ajax_add_tracking' ); -} - -function wpsc_purchlog_email_trackid() { - global $wpdb; - $id = absint( $_POST['purchlog_id'] ); - $trackingid = $wpdb->get_var( "SELECT `track_id` FROM " . WPSC_TABLE_PURCHASE_LOGS . " WHERE `id`={$id} LIMIT 1" ); - - $message = get_option( 'wpsc_trackingid_message' ); - $message = str_replace( '%trackid%', $trackingid, $message ); - $message = str_replace( '%shop_name%', get_option( 'blogname' ), $message ); - - $email_form_field = $wpdb->get_var( "SELECT `id` FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `type` IN ('email') AND `active` = '1' ORDER BY `checkout_order` ASC LIMIT 1" ); - $email = $wpdb->get_var( "SELECT `value` FROM `" . WPSC_TABLE_SUBMITED_FORM_DATA . "` WHERE `log_id`=" . $id . " AND `form_id` = '$email_form_field' LIMIT 1" ); - - - $subject = get_option( 'wpsc_trackingid_subject' ); - $subject = str_replace( '%shop_name%', get_option( 'blogname' ), $subject ); - - add_filter( 'wp_mail_from', 'wpsc_replace_reply_address', 0 ); - add_filter( 'wp_mail_from_name', 'wpsc_replace_reply_name', 0 ); - - wp_mail( $email, $subject, $message); - - remove_filter( 'wp_mail_from_name', 'wpsc_replace_reply_name' ); - remove_filter( 'wp_mail_from', 'wpsc_replace_reply_address' ); - - exit( true ); -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'purchlog_email_trackid') ) { - add_action( 'admin_init', 'wpsc_purchlog_email_trackid' ); -} - -function wpsc_ajax_sales_quarterly() { - $lastdate = $_POST['add_start']; - $date = preg_split( '/-/', $lastdate ); - if ( !isset( $date[0] ) ) - $date[0] = 0; - if ( !isset( $date[1] ) ) - $date[1] = 0; - if ( !isset( $date[2] ) ) - $date[2] = 0; - $lastquart = mktime( 0, 0, 0, $date[1], $date[2], $date[0] ); - if ( $lastquart != get_option( 'wpsc_last_quarter' ) ) { - update_option( 'wpsc_last_date', $lastdate ); - update_option( 'wpsc_fourth_quart', $lastquart ); - $thirdquart = mktime( 0, 0, 0, $date[1] - 3, $date[2], $date[0] ); - update_option( 'wpsc_third_quart', $thirdquart ); - $secondquart = mktime( 0, 0, 0, $date[1] - 6, $date[2], $date[0] ); - update_option( 'wpsc_second_quart', $secondquart ); - $firstquart = mktime( 0, 0, 0, $date[1] - 9, $date[2], $date[0] ); - update_option( 'wpsc_first_quart', $firstquart ); - $finalquart = mktime( 0, 0, 0, $date[1], $date[2], $date[0] - 1 ); - update_option( 'wpsc_final_quart', $finalquart ); - } -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'wpsc_quarterly') ) { - add_action( 'admin_init', 'wpsc_ajax_sales_quarterly' ); -} - - -function wpsc_delete_file() { - global $wpdb; - $output = 0; - $row_number = absint( $_GET['row_number'] ); - $product_id = absint( $_GET['product_id'] ); - $file_name = basename( $_GET['file_name'] ); - check_admin_referer( 'delete_file_' . $file_name ); - - $sql = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_parent = %d AND post_type ='wpsc-product-file'", $file_name, $product_id ); - $product_id_to_delete = $wpdb->get_var( $sql ); - - wp_delete_post( $product_id_to_delete, true ); - - if ( $_POST['ajax'] !== 'true' ) { - $sendback = wp_get_referer(); - wp_redirect( $sendback ); - } - - echo "jQuery('#select_product_file_row_$row_number').fadeOut('fast',function() {\n"; - echo " jQuery(this).remove();\n"; - echo " jQuery('div.select_product_file p:even').removeClass('alt');\n"; - echo " jQuery('div.select_product_file p:odd').addClass('alt');\n"; - echo "});\n"; - - exit( "" ); -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'delete_file') ) { - add_action( 'admin_init', 'wpsc_delete_file' ); -} - -/** - Function and action for publishing or unpublishing single products - */ -function wpsc_ajax_toggle_published() { - $product_id = absint( $_GET['product'] ); - check_admin_referer( 'toggle_publish_' . $product_id ); - - $status = (wpsc_toggle_publish_status( $product_id )) ? ('true') : ('false'); - $sendback = add_query_arg( 'flipped', "1", wp_get_referer() ); - wp_redirect( $sendback ); - exit(); -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'toggle_publish') ) { - add_action( 'admin_init', 'wpsc_ajax_toggle_published' ); -} - -/** - Function and action for duplicating products, - Refactored for 3.8 - * Purposely not duplicating stick post status (logically, products are most often duplicated because they share many attributes, where products are generally 'featured' uniquely.) - */ -function wpsc_duplicate_product() { - - // Get the original post - $id = absint( $_GET['product'] ); - $post = get_post( $id ); - - // Copy the post and insert it - if ( isset( $post ) && $post != null ) { - $new_id = wpsc_duplicate_product_process( $post ); - - $duplicated = true; - $sendback = wp_get_referer(); - $sendback = add_query_arg( 'duplicated', (int)$duplicated, $sendback ); - - wp_redirect( $sendback ); - exit(); - } else { - wp_die( __( 'Sorry, for some reason, we couldn\'t duplicate this product because it could not be found in the database, check there for this ID: ' ) . $id ); - } -} - -function wpsc_duplicate_product_process( $post ) { - - $new_post_date = $post->post_date; - $new_post_date_gmt = get_gmt_from_date( $new_post_date ); - - $new_post_type = $post->post_type; - $post_content = str_replace( "'", "''", $post->post_content ); - $post_content_filtered = str_replace( "'", "''", $post->post_content_filtered ); - $post_excerpt = str_replace( "'", "''", $post->post_excerpt ); - $post_title = str_replace( "'", "''", $post->post_title ) . " (Duplicate)"; - $post_name = str_replace( "'", "''", $post->post_name ); - $comment_status = str_replace( "'", "''", $post->comment_status ); - $ping_status = str_replace( "'", "''", $post->ping_status ); - - $defaults = array( - 'post_status' => $post->post_status, - 'post_type' => $new_post_type, - 'ping_status' => $ping_status, - 'post_parent' => $post->post_parent, - 'menu_order' => $post->menu_order, - 'to_ping' => $post->to_ping, - 'pinged' => $post->pinged, - 'post_excerpt' => $post_excerpt, - 'post_title' => $post_title, - 'post_content' => $post_content, - 'post_content_filtered' => $post_content_filtered, - 'import_id' => 0 - ); - // Insert the new template in the post table - $new_post_id = wp_insert_post($defaults); - - // Copy the taxonomies - wpsc_duplicate_taxonomies( $post->ID, $new_post_id, $post->post_type ); - - // Copy the meta information - wpsc_duplicate_product_meta( $post->ID, $new_post_id ); - - // Finds children (Which includes product files AND product images), their meta values, and duplicates them. - wpsc_duplicate_children( $post->ID, $new_post_id ); - - return $new_post_id; -} - -/** - * Copy the taxonomies of a post to another post - */ -function wpsc_duplicate_taxonomies( $id, $new_id, $post_type ) { - $taxonomies = get_object_taxonomies( $post_type ); //array("category", "post_tag"); - foreach ( $taxonomies as $taxonomy ) { - $post_terms = wp_get_object_terms( $id, $taxonomy ); - for ( $i = 0; $i < count( $post_terms ); $i++ ) { - wp_set_object_terms( $new_id, $post_terms[$i]->slug, $taxonomy, true ); - } - } -} - -/** - * Copy the meta information of a post to another post - */ -function wpsc_duplicate_product_meta( $id, $new_id ) { - global $wpdb; - $post_meta_infos = $wpdb->get_results( "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$id" ); - - if ( count( $post_meta_infos ) != 0 ) { - $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) "; - - foreach ( $post_meta_infos as $meta_info ) { - $meta_key = $meta_info->meta_key; - $meta_value = addslashes( $meta_info->meta_value ); - - $sql_query_sel[] = "SELECT $new_id, '$meta_key', '$meta_value'"; - } - $sql_query.= implode( " UNION ALL ", $sql_query_sel ); - $wpdb->query( $sql_query ); - } -} - -/** - * Duplicates children product and children meta - */ -function wpsc_duplicate_children( $old_parent_id, $new_parent_id ) { - global $wpdb; - - //Get children products and duplicate them - $child_posts = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE post_parent = $old_parent_id" ); - - foreach ( $child_posts as $child_post ) { - - $new_post_date = $child_post->post_date; - $new_post_date_gmt = get_gmt_from_date( $new_post_date ); - - $new_post_type = $child_post->post_type; - $post_content = str_replace( "'", "''", $child_post->post_content ); - $post_content_filtered = str_replace( "'", "''", $child_post->post_content_filtered ); - $post_excerpt = str_replace( "'", "''", $child_post->post_excerpt ); - $post_title = str_replace( "'", "''", $child_post->post_title ); - $post_name = str_replace( "'", "''", $child_post->post_name ); - $comment_status = str_replace( "'", "''", $child_post->comment_status ); - $ping_status = str_replace( "'", "''", $child_post->ping_status ); - - //Definitely doing this wrong. - $wpdb->query( - "INSERT INTO $wpdb->posts - (post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_excerpt, post_status, post_type, comment_status, ping_status, post_password, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type) - VALUES - ('$child_post->post_author', '$new_post_date', '$new_post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$child_post->post_status', '$new_post_type', '$comment_status', '$ping_status', '$child_post->post_password', '$child_post->to_ping', '$child_post->pinged', '$new_post_date', '$new_post_date_gmt', '$new_parent_id', '$child_post->menu_order', '$child_post->post_mime_type')" ); - - $old_post_id = $child_post->ID; - $new_post_id = $wpdb->insert_id; - $child_meta = $wpdb->get_results( "SELECT post_id, meta_key, meta_value FROM $wpdb->postmeta WHERE post_id = $old_post_id" ); - - foreach ( $child_meta as $child_meta ) { - $wpdb->query( - "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) - VALUES('$new_post_id', '$child_meta->meta_key', '$child_meta->meta_value')" - ); - } - } -} - -function wpsc_purchase_log_csv() { - global $wpdb, $wpsc_gateways; - get_currentuserinfo(); - $count = 0; - if ( ($_GET['rss_key'] == 'key') && is_numeric( $_GET['start_timestamp'] ) && is_numeric( $_GET['end_timestamp'] ) && current_user_can( 'manage_options' ) ) { - $form_sql = "SELECT * FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `active` = '1' AND `type` != 'heading' ORDER BY `checkout_order` DESC;"; - $form_data = $wpdb->get_results( $form_sql, ARRAY_A ); - - $start_timestamp = $_GET['start_timestamp']; - $end_timestamp = $_GET['end_timestamp']; - $data = $wpdb->get_results( "SELECT * FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `date` BETWEEN '$start_timestamp' AND '$end_timestamp' ORDER BY `date` DESC", ARRAY_A ); - $csv = 'Purchase ID, Price, Firstname, Lastname, Email, Order Status, Data, '; - header( 'Content-Type: text/csv' ); - header( 'Content-Disposition: inline; filename="Purchase Log ' . date( "M-d-Y", $start_timestamp ) . ' to ' . date( "M-d-Y", $end_timestamp ) . '.csv"' ); - $headers = "\"Purchase ID\",\"Purchase Total\","; //capture the headers - - $headers2 ="\"Payment Gateway\","; - $headers2 .="\"Payment Status\",\"Purchase Date\","; - - - foreach ( (array)$data as $purchase ) { - $form_headers = ''; - $output .= "\"" . $purchase['id'] . "\","; //Purchase ID - $output .= "\"" . $purchase['totalprice'] . "\","; //Purchase Total - foreach ( (array)$form_data as $form_field ) { - $form_headers .="\"".$form_field['unique_name']."\","; - $collected_data_sql = "SELECT * FROM `" . WPSC_TABLE_SUBMITED_FORM_DATA . "` WHERE `log_id` = '" . $purchase['id'] . "' AND `form_id` = '" . $form_field['id'] . "' LIMIT 1"; - $collected_data = $wpdb->get_results( $collected_data_sql, ARRAY_A ); - $collected_data = $collected_data[0]; - $output .= "\"" . $collected_data['value'] . "\","; // get form fields - } - - $output .= "\"" . $wpsc_gateways[$purchase['gateway']]['display_name'] . "\","; //get gateway name - - - $status_name = wpsc_find_purchlog_status_name( $purchase['processed'] ); - - $output .= "\"" . $status_name . "\","; //get purchase status - $output .= "\"" . date( "jS M Y", $purchase['date'] ) . "\","; //date - - $cartsql = "SELECT `prodid`, `quantity`, `name` FROM `" . WPSC_TABLE_CART_CONTENTS . "` WHERE `purchaseid`=" . $purchase['id'] . ""; - $cart = $wpdb->get_results( $cartsql, ARRAY_A ); - - if($count < count($cart)) - $count = count($cart); - // Go through all products in cart and display quantity and sku - foreach ( (array)$cart as $item ) { - $skuvalue = get_product_meta($item['prodid'], 'sku', true); - if(empty($skuvalue)) $skuvalue = __('N/A', 'wpsc'); - $output .= "\"" . $item['quantity'] . " x " . str_replace( '"', '\"', $item['name'] ) . "\""; - $output .= "," . $skuvalue."," ; - } - $output .= "\n"; // terminates the row/line in the CSV file - } - // Get the most number of products and create a header for them - $headers3 = ""; - for($i = 0; $i < $count ;$i++){ - $headers3 .= "\"Quantity - Product Name \", \" SKU \""; - if($i < ($count-1)) - $headers3 .= ","; - } - - echo $headers . $form_headers . $headers2 . $headers3 . "\n". $output; - exit(); - } -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'wpsc_downloadcsv') ) { - add_action( 'admin_init', 'wpsc_purchase_log_csv' ); -} - -function wpsc_admin_ajax() { - global $wpdb; - - if ( isset( $_POST['action'] ) && $_POST['action'] == 'product-page-order' ) { - $current_order = get_option( 'wpsc_product_page_order' ); - $new_order = $_POST['order']; - - if ( isset( $new_order["advanced"] ) ) { - $current_order["advanced"] = array_unique( explode( ',', $new_order["advanced"] ) ); - } - if ( isset( $new_order["side"] ) ) { - $current_order["side"] = array_unique( explode( ',', $new_order["side"] ) ); - } - - update_option( 'wpsc_product_page_order', $current_order ); - exit( print_r( $order, 1 ) ); - } - - - if ( isset( $_POST['save_image_upload_state'] ) && $_POST['save_image_upload_state'] == 'true' && is_numeric( $_POST['image_upload_state'] ) ) { - $upload_state = (int)(bool)$_POST['image_upload_state']; - update_option( 'wpsc_use_flash_uploader', $upload_state ); - exit( "done" ); - } - - if ( isset( $_POST['remove_variation_value'] ) && $_POST['remove_variation_value'] == "true" && is_numeric( $_POST['variation_value_id'] ) ) { - $value_id = absint( $_GET['variation_value_id'] ); - echo wp_delete_term( $value_id, 'wpsc-variation' ); - exit(); - } - - if ( isset( $_POST['remove_form_field'] ) && $_POST['remove_form_field'] == "true" && is_numeric( $_POST['form_id'] ) ) { - if ( current_user_can( 'manage_options' ) ) { - $wpdb->query( $wpdb->prepare( "UPDATE `" . WPSC_TABLE_CHECKOUT_FORMS . "` SET `active` = '0' WHERE `id` = %d LIMIT 1 ;", $_POST['form_id'] ) ); - exit( ' ' ); - } - } - - - if ( isset( $_POST['hide_ecom_dashboard'] ) && $_POST['hide_ecom_dashboard'] == 'true' ) { - require_once (ABSPATH . WPINC . '/rss.php'); - $rss = fetch_rss( 'http://www.instinct.co.nz/feed/' ); - $rss->items = array_slice( $rss->items, 0, 5 ); - $rss_hash = sha1( serialize( $rss->items ) ); - update_option( 'wpsc_ecom_news_hash', $rss_hash ); - exit( 1 ); - } - - if ( isset( $_POST['remove_meta'] ) && $_POST['remove_meta'] == 'true' && is_numeric( $_POST['meta_id'] ) ) { - $meta_id = (int)$_POST['meta_id']; - if ( delete_meta( $meta_id ) ) { - echo $meta_id; - exit(); - } - echo 0; - exit(); - } - - if ( isset( $_REQUEST['log_state'] ) && $_REQUEST['log_state'] == "true" && is_numeric( $_POST['id'] ) && is_numeric( $_POST['value'] ) ) { - $newvalue = $_POST['value']; - if ( $_REQUEST['suspend'] == 'true' ) { - if ( $_REQUEST['value'] == 1 && function_exists('wpsc_member_dedeactivate_subscriptions')) - wpsc_member_dedeactivate_subscriptions( $_POST['id'] ); - elseif( function_exists('wpsc_member_deactivate_subscriptions')) - wpsc_member_deactivate_subscriptions( $_POST['id'] ); - - exit(); - } else { - - $log_data = $wpdb->get_row( "SELECT * FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `id` = '" . $_POST['id'] . "' LIMIT 1", ARRAY_A ); - if ( ($newvalue == 2) && function_exists( 'wpsc_member_activate_subscriptions' ) ) { - wpsc_member_activate_subscriptions( $_POST['id'] ); - } - - $update_sql = "UPDATE `" . WPSC_TABLE_PURCHASE_LOGS . "` SET `processed` = '" . $newvalue . "' WHERE `id` = '" . $_POST['id'] . "' LIMIT 1"; - $wpdb->query( $update_sql ); - if ( ($newvalue > $log_data['processed']) && ($log_data['processed'] < 2) ) { - transaction_results( $log_data['sessionid'], false ); - } - - $status_name = wpsc_find_purchlog_status_name( $purchase['processed'] ); - echo "document.getElementById(\"form_group_" . $_POST['id'] . "_text\").innerHTML = '" . $status_name . "';\n"; - - - $year = date( "Y" ); - $month = date( "m" ); - $start_timestamp = mktime( 0, 0, 0, $month, 1, $year ); - $end_timestamp = mktime( 0, 0, 0, ($month + 1 ), 0, $year ); - - echo "document.getElementById(\"log_total_month\").innerHTML = '" . addslashes( wpsc_currency_display( admin_display_total_price( $start_timestamp, $end_timestamp ) ) ) . "';\n"; - echo "document.getElementById(\"log_total_absolute\").innerHTML = '" . addslashes( wpsc_currency_display( admin_display_total_price() ) ) . "';\n"; - exit(); - } - } -} - -function wpsc_admin_sale_rss() { - global $wpdb; - if ( ($_GET['rss'] == "true") && ($_GET['rss_key'] == 'key') && ($_GET['action'] == "purchase_log") ) { - $sql = "SELECT * FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `date`!='' ORDER BY `date` DESC"; - $purchase_log = $wpdb->get_results( $sql, ARRAY_A ); - header( "Content-Type: application/xml; charset=UTF-8" ); - header( 'Content-Disposition: inline; filename="WP_E-Commerce_Purchase_Log.rss"' ); - $output = ''; - $output .= "\n\r"; - $output .= "\n\r"; - $output .= " \n\r"; - $output .= " WP e-Commerce Product Log\n\r"; - $output .= " " . get_option( 'siteurl' ) . "/wp-admin/admin.php?page=" . WPSC_DIR_NAME . "/display-log.php\n\r"; - $output .= " This is the WP e-Commerce Product Log RSS feed\n\r"; - $output .= " WP e-Commerce Plugin\n\r"; - - foreach ( (array)$purchase_log as $purchase ) { - $purchase_link = get_option( 'siteurl' ) . "/wp-admin/admin.php?page=" . WPSC_DIR_NAME . "/display-log.php&purchaseid=" . $purchase['id']; - $output .= " \n\r"; - $output .= " Purchase # " . $purchase['id'] . "\n\r"; - $output .= " $purchase_link\n\r"; - $output .= " This is an entry in the purchase log.\n\r"; - $output .= " " . date( "r", $purchase['date'] ) . "\n\r"; - $output .= " $purchase_link\n\r"; - $output .= " \n\r"; - } - $output .= " \n\r"; - $output .= ""; - echo $output; - exit(); - } -} - -function wpsc_display_invoice() { - $purchase_id = (int)$_GET['purchaselog_id']; - add_action('wpsc_packing_slip', 'wpsc_packing_slip'); - do_action('wpsc_before_packing_slip', $purchase_id); - do_action('wpsc_packing_slip', $purchase_id); - exit(); -} -//other actions are here -if ( isset( $_GET['display_invoice'] ) && ( 'true' == $_GET['display_invoice'] ) ) - add_action( 'admin_init', 'wpsc_display_invoice', 0 ); - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ( 'wpsc_display_invoice' == $_REQUEST['wpsc_admin_action'] ) ) - add_action( 'admin_init', 'wpsc_display_invoice' ); - -/** - * Purchase log ajax code starts here - */ -function wpsc_purchlog_resend_email() { - global $wpdb; - $log_id = $_GET['email_buyer_id']; - $wpec_taxes_controller = new wpec_taxes_controller(); - if ( is_numeric( $log_id ) ) { - $selectsql = "SELECT `sessionid` FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `id`= " . $log_id . " LIMIT 1"; - $purchase_log = $wpdb->get_var( $selectsql ); - transaction_results( $purchase_log, false); - $sent = true; - } - $sendback = wp_get_referer(); - if ( isset( $sent ) ) { - $sendback = add_query_arg( 'sent', $sent, $sendback ); - } - wp_redirect( $sendback ); - exit(); -} - -if ( isset( $_REQUEST['email_buyer_id'] ) && is_numeric( $_REQUEST['email_buyer_id'] ) ) { - add_action( 'admin_init', 'wpsc_purchlog_resend_email' ); -} - -function wpsc_purchlog_clear_download_items() { - global $wpdb; - if ( is_numeric( $_GET['purchaselog_id'] ) ) { - $purchase_id = (int)$_GET['purchaselog_id']; - $downloadable_items = $wpdb->get_results( "SELECT * FROM `" . WPSC_TABLE_DOWNLOAD_STATUS . "` WHERE `purchid` IN ('$purchase_id')", ARRAY_A ); - - $clear_locks_sql = "UPDATE`" . WPSC_TABLE_DOWNLOAD_STATUS . "` SET `ip_number` = '' WHERE `purchid` IN ('$purchase_id')"; - $wpdb->query( $clear_locks_sql ); - $cleared = true; - - $email_form_field = $wpdb->get_var( "SELECT `id` FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `type` IN ('email') AND `active` = '1' ORDER BY `checkout_order` ASC LIMIT 1" ); - $email_address = $wpdb->get_var( "SELECT `value` FROM `" . WPSC_TABLE_SUBMITED_FORM_DATA . "` WHERE `log_id`='{$purchase_id}' AND `form_id` = '{$email_form_field}' LIMIT 1" ); - - foreach ( (array)$downloadable_items as $downloadable_item ) { - $download_links .= $siteurl . "?downloadid=" . $downloadable_item['uniqueid'] . "\n"; - } - - - wp_mail( $email_address, __( 'The administrator has unlocked your file', 'wpsc' ), str_replace( "[download_links]", $download_links, __( 'Dear CustomerWe are pleased to advise you that your order has been updated and your downloads are now active.Please download your purchase using the links provided below.[download_links]Thank you for your custom.', 'wpsc' ) ), "From: " . get_option( 'return_email' ) . "" ); - - - $sendback = wp_get_referer(); - - if ( isset( $cleared ) ) { - $sendback = add_query_arg( 'cleared', $cleared, $sendback ); - } - wp_redirect( $sendback ); - exit(); - } -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'clear_locks') ) { - add_action( 'admin_init', 'wpsc_purchlog_clear_download_items' ); -} - -//call to change view for purchase log - -function wpsc_purchlog_filter_by() { - wpsc_change_purchlog_view( $_POST['view_purchlogs_by'], $_POST['view_purchlogs_by_status'] ); -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'purchlog_filter_by') ) { - add_action( 'admin_init', 'wpsc_purchlog_filter_by' ); -} - -//bulk actions for purchase log -function wpsc_purchlog_bulk_modify() { - if ( $_POST['purchlog_multiple_status_change'] != -1 ) { - if ( is_numeric( $_POST['purchlog_multiple_status_change'] ) && $_POST['purchlog_multiple_status_change'] != 'delete' ) { - foreach ( (array)$_POST['purchlogids'] as $purchlogid ) { - wpsc_purchlog_edit_status( $purchlogid, $_POST['purchlog_multiple_status_change'] ); - $updated++; - } - } elseif ( $_POST['purchlog_multiple_status_change'] == 'delete' ) { - foreach ( (array)$_POST['purchlogids'] as $purchlogid ) { - - wpsc_delete_purchlog( $purchlogid ); - $deleted++; - } - } - } - $sendback = wp_get_referer(); - if ( isset( $updated ) ) { - $sendback = add_query_arg( 'updated', $updated, $sendback ); - } - if ( isset( $deleted ) ) { - $sendback = add_query_arg( 'deleted', $deleted, $sendback ); - } - if ( isset( $_POST['view_purchlogs_by'] ) ) { - $sendback = add_query_arg( 'view_purchlogs_by', $_POST['view_purchlogs_by'], $sendback ); - } - if ( isset( $_POST['view_purchlogs_by_status'] ) ) { - $sendback = add_query_arg( 'view_purchlogs_by_status', $_POST['view_purchlogs_by_status'], $sendback ); - } - wp_redirect( $sendback ); - exit(); -} - -if ( isset( $_REQUEST['wpsc_admin_action2'] ) && ($_REQUEST['wpsc_admin_action2'] == 'purchlog_bulk_modify') ) { - add_action( 'admin_init', 'wpsc_purchlog_bulk_modify' ); -} - -//edit purchase log status function -function wpsc_purchlog_edit_status( $purchlog_id='', $purchlog_status='' ) { - global $wpdb; - if ( empty($purchlog_id) && empty($purchlog_status) ) { - $purchlog_id = absint( $_POST['purchlog_id'] ); - $purchlog_status = absint( $_POST['purchlog_status'] ); - } - - $log_data = $wpdb->get_row( "SELECT * FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `id` = '{$purchlog_id}' LIMIT 1", ARRAY_A ); - $is_transaction = wpsc_check_purchase_processed($log_data['processed']); - if ( $is_transaction && function_exists('wpsc_member_activate_subscriptions')) { - wpsc_member_activate_subscriptions( $_POST['id'] ); - } - - //in the future when everyone is using the 2.0 merchant api, we should use the merchant class to update the staus, - // then you can get rid of this hook and have each person overwrite the method that updates the status. - do_action('wpsc_edit_order_status', array('purchlog_id'=>$purchlog_id, 'purchlog_data'=>$log_data, 'new_status'=>$purchlog_status)); - - $wpdb->query( "UPDATE `" . WPSC_TABLE_PURCHASE_LOGS . "` SET processed='{$purchlog_status}' WHERE id='{$purchlog_id}'" ); - - wpsc_clear_stock_claims(); - wpsc_decrement_claimed_stock($purchlog_id); - - if ( $purchlog_status == 3 ) - transaction_results($log_data['sessionid'],false,null); -} - -add_action( 'wp_ajax_purchlog_edit_status', 'wpsc_purchlog_edit_status' ); - -function wpsc_save_product_order() { - global $wpdb; - - $products = array( ); - foreach ( $_POST['post'] as $product ) { - $products[] = absint( $product ); - } - - print_r( $products ); - - foreach ( $products as $order => $product_id ) { - - $wpdb->query( $wpdb->prepare( "UPDATE `{$wpdb->posts}` SET `menu_order`='%d' WHERE `ID`='%d' LIMIT 1", $order, $product_id ) ); - } - $success = true; - - exit( (string)$success ); -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'save_product_order') ) { - add_action( 'admin_init', 'wpsc_save_product_order' ); -} - -function wpsc_save_checkout_order() { - global $wpdb; - $checkoutfields = $_POST['checkout']; - $order = 1; - foreach ( $checkoutfields as $checkoutfield ) { - $checkoutfield = absint( $checkoutfield ); - $wpdb->query( "UPDATE `" . WPSC_TABLE_CHECKOUT_FORMS . "` SET `checkout_order` = '" . $order . "' WHERE `id`=" . $checkoutfield ); - - $order++; - } - $success = true; - - exit( (string)$success ); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'save_checkout_order') ) - add_action( 'admin_init', 'wpsc_save_checkout_order' ); - -/* Start Order Notes (by Ben) */ -function wpsc_purchlogs_update_notes( $purchlog_id = '', $purchlog_notes = '' ) { - global $wpdb; - if ( wp_verify_nonce( $_POST['wpsc_purchlogs_update_notes_nonce'], 'wpsc_purchlogs_update_notes' ) ) { - if ( ($purchlog_id == '') && ($purchlog_notes == '') ) { - $purchlog_id = absint( $_POST['purchlog_id'] ); - $purchlog_notes = $wpdb->escape( $_POST['purchlog_notes'] ); - } - $wpdb->query( "UPDATE `" . WPSC_TABLE_PURCHASE_LOGS . "` SET notes='{$purchlog_notes}' WHERE id='{$purchlog_id}'" ); - } -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'purchlogs_update_notes' ) ) - add_action( 'admin_init', 'wpsc_purchlogs_update_notes' ); - -/* End Order Notes (by Ben) */ - -//delete a purchase log -function wpsc_delete_purchlog( $purchlog_id='' ) { - global $wpdb; - $deleted = 0; - if ( $purchlog_id == '' ) { - $purchlog_id = absint( $_GET['purchlog_id'] ); - check_admin_referer( 'delete_purchlog_' . $purchlog_id ); - } - - if ( is_numeric( $purchlog_id ) ) { - $delete_log_form_sql = "SELECT * FROM `" . WPSC_TABLE_CART_CONTENTS . "` WHERE `purchaseid`='$purchlog_id'"; - $cart_content = $wpdb->get_results( $delete_log_form_sql, ARRAY_A ); - } - - $purchlog_status = $wpdb->get_var( "SELECT `processed` FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `id`=" . $purchlog_id ); - if ( $purchlog_status == 5 || $purchlog_status == 1 ) { - $wpdb->query( "DELETE FROM `" . WPSC_TABLE_CLAIMED_STOCK . "` WHERE `cart_id` = '{$purchlog_id}' AND `cart_submitted` = '1'" ); - } - - $wpdb->query( "DELETE FROM `" . WPSC_TABLE_CART_CONTENTS . "` WHERE `purchaseid`='$purchlog_id'" ); - $wpdb->query( "DELETE FROM `" . WPSC_TABLE_SUBMITED_FORM_DATA . "` WHERE `log_id` IN ('$purchlog_id')" ); - $wpdb->query( "DELETE FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `id`='$purchlog_id' LIMIT 1" ); - - $deleted = 1; - - if ( is_numeric( $_GET['purchlog_id'] ) ) { - $sendback = wp_get_referer(); - $sendback = remove_query_arg( 'purchaselog_id', $sendback ); - if ( isset( $deleted ) ) { - $sendback = add_query_arg( 'deleted', $deleted, $sendback ); - } - wp_redirect( $sendback ); - exit(); - } -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'delete_purchlog') ) { - add_action( 'admin_init', 'wpsc_delete_purchlog' ); -} - -/* - * Get Shipping Form ajax call - */ - -function wpsc_ajax_get_shipping_form() { - $shippingname = $_REQUEST['shippingname']; - $_SESSION['previous_shipping_name'] = $shippingname; - $shipping_data = wpsc_get_shipping_form( $shippingname ); - $html_shipping_name = str_replace( Array( "\n", "\r" ), Array( "\\n", "\\r" ), addslashes( $shipping_data['name'] ) ); - $shipping_form = str_replace( Array( "\n", "\r" ), Array( "\\n", "\\r" ), addslashes( $shipping_data['form_fields'] ) ); - echo "shipping_name_html = '$html_shipping_name'; \n\r"; - echo "shipping_form_html = '$shipping_form'; \n\r"; - echo "has_submit_button = '{$shipping_data['has_submit_button']}'; \n\r"; - exit(); -} - -function wpsc_ajax_get_payment_form() { - $paymentname = $_REQUEST['paymentname']; - $_SESSION['previous_payment_name'] = $paymentname; - $payment_data = wpsc_get_payment_form( $paymentname ); - $html_payment_name = str_replace( Array( "\n", "\r" ), Array( "\\n", "\\r" ), addslashes( $payment_data['name'] ) ); - $payment_form = str_replace( Array( "\n", "\r" ), Array( "\\n", "\\r" ), addslashes( $payment_data['form_fields'] ) ); - echo "payment_name_html = '$html_payment_name'; \n\r"; - echo "payment_form_html = '$payment_form'; \n\r"; - echo "has_submit_button = '{$payment_data['has_submit_button']}'; \n\r"; - exit(); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'get_shipping_form') ) - add_action( 'admin_init', 'wpsc_ajax_get_shipping_form' ); - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'get_payment_form') ) - add_action( 'admin_init', 'wpsc_ajax_get_payment_form' ); - - -/* - * Submit Options from Settings Pages, - * takes an array of options checks to see whether it is empty or the same as the exisiting values - * and if its not it updates them. - */ - -function wpsc_submit_options( $selected='' ) { - global $wpdb, $wpsc_gateways; - $updated = 0; - - //This is to change the Overall target market selection - check_admin_referer( 'update-options', 'wpsc-update-options' ); - if ( isset( $_POST['change-settings'] ) ) { - if ( isset( $_POST['wpsc_also_bought'] ) && $_POST['wpsc_also_bought'] == 'on' ) - update_option( 'wpsc_also_bought', 1 ); - else - update_option( 'wpsc_also_bought', 0 ); - - if ( isset( $_POST['display_find_us'] ) && $_POST['display_find_us'] == 'on' ) - update_option( 'display_find_us', 1 ); - else - update_option( 'display_find_us', 0 ); - - if ( isset( $_POST['wpsc_share_this'] ) && $_POST['wpsc_share_this'] == 'on' ) - update_option( 'wpsc_share_this', 1 ); - else - update_option( 'wpsc_share_this', 0 ); - - } - if (empty($_POST['countrylist2']) && !empty($_POST['wpsc_options']['currency_sign_location'])) - $selected = 'none'; - - if ( !isset( $_POST['countrylist2'] ) ) - $_POST['countrylist2'] = ''; - if ( !isset( $_POST['country_id'] ) ) - $_POST['country_id'] = ''; - if ( !isset( $_POST['country_tax'] ) ) - $_POST['country_tax'] = ''; - - if ( $_POST['countrylist2'] != null || !empty($selected) ) { - $AllSelected = false; - if ( $selected == 'all' ) { - $wpdb->query( "UPDATE `" . WPSC_TABLE_CURRENCY_LIST . "` SET visible = '1'" ); - $AllSelected = true; - } - if ( $selected == 'none' ) { - $wpdb->query( "UPDATE `" . WPSC_TABLE_CURRENCY_LIST . "` SET visible = '0'" ); - $AllSelected = true; - } - if ( $AllSelected != true ) { - $countrylist = $wpdb->get_col( "SELECT id FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY country ASC " ); - //find the countries not selected - $unselectedCountries = array_diff( $countrylist, $_POST['countrylist2'] ); - foreach ( $unselectedCountries as $unselected ) { - $wpdb->query( "UPDATE `" . WPSC_TABLE_CURRENCY_LIST . "` SET visible = 0 WHERE id = '" . $unselected . "' LIMIT 1" ); - } - - //find the countries that are selected - $selectedCountries = array_intersect( $countrylist, $_POST['countrylist2'] ); - foreach ( $selectedCountries as $selected ) { - $wpdb->query( "UPDATE `" . WPSC_TABLE_CURRENCY_LIST . "` SET visible = 1 WHERE id = '" . $selected . "' LIMIT 1" ); - } - } - } - $previous_currency = get_option( 'currency_type' ); - - $regenerate = false; - - $regenerate_options = array('single_view_image_height', 'single_view_image_width','wpsc_gallery_image_width','wpsc_gallery_image_height', 'wpsc_crop_thumbnails','product_image_width','product_image_height'); - - //To update options - - if ( isset( $_POST['wpsc_options'] ) ) { - - foreach ( $_POST['wpsc_options'] as $key => $value ) { - - if ( in_array( $key, $regenerate_options ) && $value != get_option( $key ) ) { - $regenerate = true; - } - - if ( $value != get_option( $key ) ) { - update_option( $key, $value ); - $updated++; - - } - } - } - - if ( $previous_currency != get_option( 'currency_type' ) ) { - $currency_code = $wpdb->get_var( "SELECT `code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id` IN ('" . absint( get_option( 'currency_type' ) ) . "')" ); - - $selected_gateways = get_option( 'custom_gateway_options' ); - $already_changed = array( ); - foreach ( $selected_gateways as $selected_gateway ) { - if ( isset( $wpsc_gateways[$selected_gateway]['supported_currencies'] ) ) { - if ( in_array( $currency_code, $wpsc_gateways[$selected_gateway]['supported_currencies']['currency_list'] ) ) { - - $option_name = $wpsc_gateways[$selected_gateway]['supported_currencies']['option_name']; - - if ( !in_array( $option_name, $already_changed ) ) { - update_option( $option_name, $currency_code ); - $already_changed[] = $option_name; - } - } - } - } - } - - foreach ( $GLOBALS['wpsc_shipping_modules'] as $shipping ) { - if ( is_object( $shipping ) ) - $shipping->submit_form(); - } - - - //This is for submitting shipping details to the shipping module - if ( !isset( $_POST['update_gateways'] ) ) - $_POST['update_gateways'] = ''; - if ( !isset( $_POST['custom_shipping_options'] ) ) - $_POST['custom_shipping_options'] = null; - if ( $_POST['update_gateways'] == 'true' ) { - - update_option( 'custom_shipping_options', $_POST['custom_shipping_options'] ); - - $shipadd = 0; - foreach ( $GLOBALS['wpsc_shipping_modules'] as $shipping ) { - foreach ( (array)$_POST['custom_shipping_options'] as $shippingoption ) { - if ( $shipping->internal_name == $shippingoption ) { - $shipadd++; - } - } - } - } - - $sendback = wp_get_referer(); - - if ( $regenerate ) { - $sendback = add_query_arg( array('regenerate' => 'true', 'updated' => $updated), $sendback ); - } - if ( isset( $updated ) ) { - $sendback = add_query_arg( 'updated', $updated, $sendback ); - } - if ( isset( $shipadd ) ) { - $sendback = add_query_arg( 'shipadd', $shipadd, $sendback ); - } - - if ( !isset( $_SESSION['wpsc_settings_curr_page'] ) ) - $_SESSION['wpsc_settings_curr_page'] = ''; - if ( !isset( $_POST['page_title'] ) ) - $_POST['page_title'] = ''; - if ( isset( $_SESSION['wpsc_settings_curr_page'] ) ) { - $sendback = add_query_arg( 'tab', $_SESSION['wpsc_settings_curr_page'], $sendback ); - } - - $sendback = add_query_arg( 'page', 'wpsc-settings', $sendback ); - $sendback = apply_filters( 'wpsc_settings_redirect_url', $sendback ); - wp_redirect( $sendback ); - exit(); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'submit_options') ) - add_action( 'admin_init', 'wpsc_submit_options' ); - -function wpsc_change_currency() { - if ( is_numeric( $_POST['currencyid'] ) ) { - $currency_data = $wpdb->get_results( "SELECT `symbol`,`symbol_html`,`code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id`='" . $_POST['currencyid'] . "' LIMIT 1", ARRAY_A ); - $price_out = null; - if ( $currency_data[0]['symbol'] != '' ) { - $currency_sign = $currency_data[0]['symbol_html']; - } else { - $currency_sign = $currency_data[0]['code']; - } - echo $currency_sign; - } -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'change_currency') ) - add_action( 'admin_init', 'wpsc_change_currency' ); - -function wpsc_rearrange_images() { - global $wpdb; - $images = explode( ",", $_POST['order'] ); - $product_id = absint( $_POST['product_id'] ); - $timestamp = time(); - - $new_main_image = null; - $have_set_first_item = false; - $i = 0; - foreach ( $images as $image ) { - if ( $image > 0 ) { - $wpdb->query( $wpdb->prepare( "UPDATE `{$wpdb->posts}` SET `menu_order`='%d' WHERE `ID`='%d' LIMIT 1", $i, $image ) ); - $i++; - } - } - $output = wpsc_main_product_image_menu( $product_id ); - echo "image_menu = '';\n\r"; - echo "image_id = '" . $new_main_image . "';\n\r"; - exit(); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'rearrange_images') ) - add_action( 'admin_init', 'wpsc_rearrange_images' ); - -/** - * wpsc_update_page_urls gets the permalinks for products pages and stores them in the options for quick reference - * @public - * - * @since 3.6 - * @param $auto (Boolean) true if coming from WordPress Permalink Page, false otherwise - * @return nothing - */ -function wpsc_update_page_urls($auto = false) { - global $wpdb; - - $wpsc_pageurl_option['product_list_url'] = '[productspage]'; - $wpsc_pageurl_option['shopping_cart_url'] = '[shoppingcart]'; - $check_chekout = $wpdb->get_var( "SELECT `guid` FROM `{$wpdb->posts}` WHERE `post_content` LIKE '%[checkout]%' LIMIT 1" ); - if ( $check_chekout != null ) { - $wpsc_pageurl_option['checkout_url'] = '[checkout]'; - } else { - $wpsc_pageurl_option['checkout_url'] = '[checkout]'; - } - $wpsc_pageurl_option['transact_url'] = '[transactionresults]'; - $wpsc_pageurl_option['user_account_url'] = '[userlog]'; - $changes_made = false; - foreach ( $wpsc_pageurl_option as $option_key => $page_string ) { - $post_id = $wpdb->get_var( "SELECT `ID` FROM `{$wpdb->posts}` WHERE `post_type` IN('page','post') AND `post_content` LIKE '%$page_string%' LIMIT 1" ); - if ( ! $post_id ) - continue; - $the_new_link = _get_page_link( $post_id ); - if ( stristr( get_option( $option_key ), "https://" ) ) { - $the_new_link = str_replace( 'http://', "https://", $the_new_link ); - } - - update_option( $option_key, $the_new_link ); - } - - if(!$auto){ - $sendback = wp_get_referer(); - if ( isset( $updated ) ) - $sendback = add_query_arg( 'updated', $updated, $sendback ); - - if ( isset( $_SESSION['wpsc_settings_curr_page'] ) ) - $sendback = add_query_arg( 'tab', $_SESSION['wpsc_settings_curr_page'], $sendback ); - - wp_redirect( $sendback ); - exit(); - } -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'update_page_urls') ) - add_action( 'admin_init', 'wpsc_update_page_urls' ); - -function wpsc_clean_categories() { - global $wpdb, $wp_rewrite; - $sql_query = "SELECT `id`, `name`, `active` FROM `" . WPSC_TABLE_PRODUCT_CATEGORIES . "`"; - $sql_data = $wpdb->get_results( $sql_query, ARRAY_A ); - foreach ( (array)$sql_data as $datarow ) { - if ( $datarow['active'] == 1 ) { - $tidied_name = trim( $datarow['name'] ); - $tidied_name = strtolower( $tidied_name ); - $url_name = sanitize_title( $tidied_name ); - $similar_names = $wpdb->get_row( "SELECT COUNT(*) AS `count`, MAX(REPLACE(`nice-name`, '$url_name', '')) AS `max_number` FROM `" . WPSC_TABLE_PRODUCT_CATEGORIES . "` WHERE `nice-name` REGEXP '^($url_name){1}(\d)*$' AND `id` NOT IN ('{$datarow['id']}') ", ARRAY_A ); - $extension_number = ''; - if ( $similar_names['count'] > 0 ) { - $extension_number = (int)$similar_names['max_number'] + 2; - } - $url_name .= $extension_number; - $wpdb->query( "UPDATE `" . WPSC_TABLE_PRODUCT_CATEGORIES . "` SET `nice-name` = '$url_name' WHERE `id` = '{$datarow['id']}' LIMIT 1 ;" ); - $updated; - } else if ( $datarow['active'] == 0 ) { - $wpdb->query( "UPDATE `" . WPSC_TABLE_PRODUCT_CATEGORIES . "` SET `nice-name` = '' WHERE `id` = '{$datarow['id']}' LIMIT 1 ;" ); - $updated; - } - } - $wp_rewrite->flush_rules(); - $sendback = wp_get_referer(); - - if ( isset( $updated ) ) { - $sendback = add_query_arg( 'updated', $updated, $sendback ); - } - if ( isset( $_SESSION['wpsc_settings_curr_page'] ) ) { - $sendback = add_query_arg( 'tab', $_SESSION['wpsc_settings_curr_page'], $sendback ); - } - wp_redirect( $sendback ); - - exit(); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'clean_categories') ) - add_action( 'admin_init', 'wpsc_clean_categories' ); - -//change the regions tax settings -function wpsc_change_region_tax() { - global $wpdb; - if ( is_array( $_POST['region_tax'] ) ) { - foreach ( $_POST['region_tax'] as $region_id => $tax ) { - if ( is_numeric( $region_id ) && is_numeric( $tax ) ) { - $previous_tax = $wpdb->get_var( "SELECT `tax` FROM `" . WPSC_TABLE_REGION_TAX . "` WHERE `id` = '$region_id' LIMIT 1" ); - if ( $tax != $previous_tax ) { - $wpdb->query( "UPDATE `" . WPSC_TABLE_REGION_TAX . "` SET `tax` = '$tax' WHERE `id` = '$region_id' LIMIT 1" ); - $changes_made = true; - } - } - } - $sendback = wp_get_referer(); - wp_redirect( $sendback ); - } -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'change_region_tax') ) - add_action( 'admin_init', 'wpsc_change_region_tax' ); - -function wpsc_product_files_existing() { - //List all product_files, with checkboxes - - $product_id = absint( $_GET["product_id"] ); - $file_list = wpsc_uploaded_files(); - - $args = array( - 'post_type' => 'wpsc-product-file', - 'post_parent' => $product_id, - 'numberposts' => -1, - 'post_status' => 'all' - ); - $attached_files = (array)get_posts( $args ); - - foreach ( $attached_files as $key => $attached_file ) { - $attached_files_by_file[$attached_file->post_title] = & $attached_files[$key]; - } - - $output = "" . __( 'Choose a downloadable file for this product:', 'wpsc' ) . "
"; - $output .= "
"; - $output .= "
"; - $num = 0; - foreach ( (array)$file_list as $file ) { - $num++; - $checked_curr_file = ""; - if ( isset( $attached_files_by_file[$file['display_filename']] ) ) { - $checked_curr_file = "checked='checked'"; - } - - $output .= "

0) ? '' : "class='alt'") . " id='select_product_file_row_$num'>\n"; - $output .= " \n"; - $output .= " \n"; - $output .= "

\n"; - } - - $output .= "
"; - $output .= ""; - $output .= ""; - $output .= "
"; - $output .= "
"; - $output .= ""; - - - echo $output; -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'product_files_existing') ) - add_action( 'admin_init', 'wpsc_product_files_existing' ); - -function prod_upload() { - global $wpdb; - $product_id = absint( $_POST["product_id"] ); - $output = ''; - foreach ( $_POST["select_product_file"] as $selected_file ) { - // if we already use this file, there is no point doing anything more. - - $sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_type = 'wpsc-product-file' AND post_title = %s", $selected_file ); // TODO it's safer to select by post ID, in that case we will use get_posts() - $file_post_data = $wpdb->get_row( $sql, ARRAY_A ); - $selected_file_path = WPSC_FILE_DIR . basename( $selected_file ); - - if ( empty( $file_post_data ) ) { - $type = wpsc_get_mimetype( $selected_file_path ); - $attachment = array( - 'post_mime_type' => $type, - 'post_parent' => $product_id, - 'post_title' => $selected_file, - 'post_content' => '', - 'post_type' => "wpsc-product-file", - 'post_status' => 'inherit' - ); - $id = wp_insert_post( $attachment ); - } else { - // already attached - if ( $file_post_data['post_parent'] == $product_id ) - continue; - $type = $file_post_data["post_mime_type"]; - $url = $file_post_data["guid"]; - $title = $file_post_data["post_title"]; - $content = $file_post_data["post_content"]; - // Construct the attachment - $attachment = array( - 'post_mime_type' => $type, - 'guid' => $url, - 'post_parent' => absint( $product_id ), - 'post_title' => $title, - 'post_content' => $content, - 'post_type' => "wpsc-product-file", - 'post_status' => 'inherit' - ); - // Save the data - $id = wp_insert_post( $attachment ); - } - - $deletion_url = wp_nonce_url( "admin.php?wpsc_admin_action=delete_file&file_name={$attachment['post_title']}&product_id={$product_id}", 'delete_file_' . $attachment['post_title'] ); - - $output .= "

\n"; - $output .= " \n"; - $output .= " \n"; - $output .= " \n"; - $output .= " \n"; - $output .= "

\n"; - } - - echo $output; -} -if ( isset( $_GET['wpsc_admin_action'] ) && ($_GET['wpsc_admin_action'] == 'product_files_upload') ) - add_action( 'admin_init', 'prod_upload' ); - -//change the gateway settings -function wpsc_gateway_settings() { - //To update options - if ( isset( $_POST['wpsc_options'] ) ) { - foreach ( $_POST['wpsc_options'] as $key => $value ) { - if ( $value != get_option( $key ) ) { - update_option( $key, $value ); - } - } - unset( $_POST['wpsc_options'] ); - } - - - - if ( isset( $_POST['user_defined_name'] ) && is_array( $_POST['user_defined_name'] ) ) { - $payment_gateway_names = get_option( 'payment_gateway_names' ); - - if ( !is_array( $payment_gateway_names ) ) { - $payment_gateway_names = array( ); - } - $payment_gateway_names = array_merge( $payment_gateway_names, (array)$_POST['user_defined_name'] ); - update_option( 'payment_gateway_names', $payment_gateway_names ); - } - $custom_gateways = get_option( 'custom_gateway_options' ); - - $nzshpcrt_gateways = nzshpcrt_get_gateways(); - foreach ( $nzshpcrt_gateways as $gateway ) { - if ( in_array( $gateway['internalname'], $custom_gateways ) ) { - if ( isset( $gateway['submit_function'] ) ) { - call_user_func_array( $gateway['submit_function'], array( ) ); - $changes_made = true; - } - } - } - if ( (isset( $_POST['payment_gw'] ) && $_POST['payment_gw'] != null ) ) { - update_option( 'payment_gateway', $_POST['payment_gw'] ); - } - $sendback = wp_get_referer(); - - if ( isset( $updated ) ) { - $sendback = add_query_arg( 'updated', $updated, $sendback ); - } - if ( isset( $_SESSION['wpsc_settings_curr_page'] ) ) { - $sendback = add_query_arg( 'page', 'wpsc-settings', $sendback ); - $sendback = add_query_arg( 'tab', $_SESSION['wpsc_settings_curr_page'], $sendback ); - } - wp_redirect( $sendback ); - exit(); -} -if ( isset( $_REQUEST['wpsc_gateway_settings'] ) && ($_REQUEST['wpsc_gateway_settings'] == 'gateway_settings') ) - add_action( 'admin_init', 'wpsc_gateway_settings' ); - -function wpsc_check_form_options() { - global $wpdb; - - $id = $wpdb->escape( $_POST['form_id'] ); - $sql = 'SELECT `options` FROM `' . WPSC_TABLE_CHECKOUT_FORMS . '` WHERE `id`=' . $id; - $options = $wpdb->get_var( $sql ); - if ( $options != '' ) { - $options = maybe_unserialize( $options ); - if ( !is_array( $options ) ) { - $options = unserialize( $options ); - } - $output = "Please Save your changes before trying to Order your Checkout Forms again.\r\nLabelValue+ New Layer"; - - foreach ( (array)$options as $key => $value ) { - $output .=" "; - } - } else { - $output = ''; - } - exit( $output ); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'check_form_options') ) - add_action( 'admin_init', 'wpsc_check_form_options' ); - -//handles the editing and adding of new checkout fields -function wpsc_checkout_settings() { - global $wpdb; - $wpdb->show_errors = true; - $filter = isset( $_POST['selected_form_set'] ) ? $_POST['selected_form_set'] : '0'; - if ( ! isset( $_POST['new_form_mandatory'] ) ) - $_POST['new_form_mandatory'] = array(); - - if ( $_POST['new_form_set'] != null ) { - $checkout_sets = get_option( 'wpsc_checkout_form_sets' ); - $checkout_sets[] = $_POST['new_form_set']; - update_option( 'wpsc_checkout_form_sets', $checkout_sets ); - } - - /* - // Save checkout options - */ - $options = array( ); - if ( isset($_POST['wpsc_checkout_option_label']) && is_array( $_POST['wpsc_checkout_option_label'] ) ) { - foreach ( $_POST['wpsc_checkout_option_label'] as $form_id => $values ) { - $options = array( ); - foreach ( (array)$values as $key => $form_option ) { - $form_option = str_ireplace( "'", "", $form_option ); - $form_val = str_ireplace( "'", "", sanitize_title( $_POST['wpsc_checkout_option_value'][$form_id][$key] ) ); - $options[$form_option] = $form_val; - } - - $options = serialize( $options ); - $wpdb->update( - WPSC_TABLE_CHECKOUT_FORMS, - array( 'options' => $options ), - array( 'id' => $form_id ), - '%s', - '%d' - ); - } - } - - - if ( $_POST['form_name'] != null ) { - foreach ( $_POST['form_name'] as $form_id => $form_name ) { - $form_type = $_POST['form_type'][$form_id]; - $form_mandatory = 0; - if ( isset( $_POST['form_mandatory'][$form_id] ) && ($_POST['form_mandatory'][$form_id] == 1) ) { - $form_mandatory = 1; - } - $form_display_log = 0; - if ( isset( $_POST['form_display_log'][$form_id] ) && ($_POST['form_display_log'][$form_id] == 1) ) { - $form_display_log = 1; - } - $unique_name = ''; - if ( $_POST['unique_names'][$form_id] != '-1' ) { - $unique_name = $_POST['unique_names'][$form_id]; - } - $wpdb->update( - WPSC_TABLE_CHECKOUT_FORMS, - array( - 'name' => $form_name, - 'type' => $form_type, - 'mandatory' => $form_mandatory, - 'display_log' => $form_display_log, - 'unique_name' => $unique_name, - ), - array( 'id' => $form_id ), - '%s', - '%d' - ); - } - } - - if ( isset( $_POST['new_form_name'] ) ) { - $added = 0; - foreach ( $_POST['new_form_name'] as $form_id => $form_name ) { - $form_type = $_POST['new_form_type'][$form_id]; - $form_mandatory = 0; - if ( ! empty( $_POST['new_form_mandatory'][$form_id] ) ) { - $form_mandatory = 1; - } - $form_display_log = 0; - if ( isset( $_POST['new_form_display_log'][$form_id] ) && $_POST['new_form_display_log'][$form_id] == 1 ) { - $form_display_log = 1; - } - $form_unique_name = ''; - if ( $_POST['new_form_unique_name'][$form_id] != '-1' ) { - $form_unique_name = $_POST['new_form_unique_name'][$form_id]; - } - - $max_order_sql = "SELECT MAX(`checkout_order`) AS `checkout_order` FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `active` = '1';"; - - if ( isset( $_POST['new_form_order'][$form_id] ) && $_POST['new_form_order'][$form_id] != '' ) { - $order_number = $_POST['new_form_order'][$form_id]; - } else { - $max_order_sql = $wpdb->get_results( $max_order_sql, ARRAY_A ); - $order_number = $max_order_sql[0]['checkout_order'] + 1; - } - - $wpdb->insert( - WPSC_TABLE_CHECKOUT_FORMS, - array( - 'name' => $form_name, - 'type' => $form_type, - 'mandatory' => $form_mandatory, - 'display_log' => $form_display_log, - 'default' => '', - 'active' => '1', - 'checkout_order' => $order_number, - 'unique_name' => $form_unique_name, - 'checkout_set' => $filter, - ), - array( '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%s', '%s' ) - ); - - $added++; - } - } - - if ( isset( $_POST['wpsc_options'] ) ) { - foreach ( $_POST['wpsc_options'] as $key => $value ) { - if ( $value != get_option( $key ) ) { - update_option( $key, $value ); - $updated++; - } - } - } - - $sendback = wp_get_referer(); - if ( isset( $form_set_key ) ) { - $sendback = add_query_arg( 'checkout-set', $form_set_key, $sendback ); - } else if ( isset( $_POST['wpsc_form_set'] ) ) { - $filter = $_POST['wpsc_form_set']; - $sendback = add_query_arg( 'checkout-set', $filter, $sendback ); - } - - if ( isset( $updated ) ) { - $sendback = add_query_arg( 'updated', $updated, $sendback ); - } - if ( ! empty( $added ) ) { - $sendback = add_query_arg( 'added', $added, $sendback ); - } - if ( isset( $_SESSION['wpsc_settings_curr_page'] ) ) { - $sendback = add_query_arg( 'tab', $_SESSION['wpsc_settings_curr_page'], $sendback ); - } - $sendback = add_query_arg( 'page', 'wpsc-settings', $sendback ); - wp_redirect( $sendback ); - exit(); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'checkout_settings') ) - add_action( 'admin_init', 'wpsc_checkout_settings' ); - -function wpsc_google_shipping_settings() { - if ( isset( $_POST['submit'] ) ) { - foreach ( (array)$_POST['google_shipping'] as $key => $country ) { - if ( $country == 'on' ) { - $google_shipping_country[] = $key; - $updated++; - } - } - update_option( 'google_shipping_country', $google_shipping_country ); - $sendback = wp_get_referer(); - $sendback = remove_query_arg( 'googlecheckoutshipping', $sendback ); - - if ( isset( $updated ) ) { - $sendback = add_query_arg( 'updated', $updated, $sendback ); - } - - wp_redirect( $sendback ); - exit(); - } -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'google_shipping_settings') ) { - add_action( 'admin_init', 'wpsc_google_shipping_settings' ); -} - -//for ajax call of settings page tabs -function wpsc_settings_page_ajax() { - $html = ''; - $modified_page_title = $_POST['page_title']; - $page_title = str_replace( "tab-", "", $modified_page_title ); - - check_admin_referer( $modified_page_title ); - switch ( $page_title ) { - case 'checkout' : - require_once( WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/checkout.php' ); - wpsc_options_checkout(); - break; - - case 'gateway' : - require_once( WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/gateway.php' ); - wpsc_options_gateway(); - break; - - case 'shipping' : - require_once( WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/shipping.php' ); - wpsc_options_shipping(); - break; - - case 'admin' : - require_once( WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/admin.php' ); - wpsc_options_admin(); - break; - - case 'presentation' : - require_once( WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/presentation.php' ); - wpsc_options_presentation(); - break; - - case 'taxes' : - wpec_taxes_settings_page(); //see wpec-taxes view - break; - - case 'marketing' : - require_once( WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/marketing.php' ); - wpsc_options_marketing(); - break; - - case 'import' : - require_once( WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/import.php' ); - wpsc_options_import(); - break; - - case 'general' : - default; - require_once( WPSC_FILE_PATH . '/wpsc-admin/includes/settings-pages/general.php' ); - wpsc_options_general(); - break; - } - - $_SESSION['wpsc_settings_curr_page'] = $page_title; - - exit( $html ); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ($_REQUEST['wpsc_admin_action'] == 'settings_page_ajax') ) - add_action( 'admin_init', 'wpsc_settings_page_ajax' ); - -function wpsc_update_variations() { - $product_id = absint( $_POST["product_id"] ); - $product_type_object = get_post_type_object('wpsc-product'); - if (!current_user_can($product_type_object->cap->edit_post, $product_id)) - return; - - //Setup postdata - $post_data = array( ); - $post_data['edit_var_val'] = isset( $_POST['edit_var_val'] ) ? $_POST["edit_var_val"] : ''; - $post_data['description'] = isset( $_POST['description'] ) ? $_POST["description"] : ''; - $post_data['additional_description'] = isset( $_POST['additional_description'] ) ? $_POST['additional_description'] : ''; - $post_data['name'] = (!empty($_POST['name']))?$_POST['name']:$_POST["post_title"]; - - //Add or delete variations - wpsc_edit_product_variations( $product_id, $post_data ); - if (defined('DOING_AJAX') && DOING_AJAX) { - wpsc_admin_product_listing( $product_id ); - die(); - } -} - -if ( isset($_POST["edit_var_val"]) ) - add_action( 'admin_init', 'wpsc_update_variations', 50 ); -add_action('wp_ajax_wpsc_update_variations', 'wpsc_update_variations', 50 ); - -function wpsc_delete_variation_set() { - check_admin_referer( 'delete-variation' ); - - if ( is_numeric( $_GET['deleteid'] ) ) { - $variation_id = absint( $_GET['deleteid'] ); - - $variation_set = get_term( $variation_id, 'wpsc-variation', ARRAY_A ); - - - $variations = get_terms( 'wpsc-variation', array( - 'hide_empty' => 0, - 'parent' => $variation_id - ) ); - - foreach ( (array)$variations as $variation ) { - $return_value = wp_delete_term( $variation->term_id, 'wpsc-variation' ); - } - - if ( !empty( $variation_set ) ) { - $return_value = wp_delete_term( $variation_set['term_id'], 'wpsc-variation' ); - } - $deleted = 1; - } - - $sendback = wp_get_referer(); - if ( isset( $deleted ) ) { - $sendback = add_query_arg( 'deleted', $deleted, $sendback ); - } - $sendback = remove_query_arg( array( - 'deleteid', - 'variation_id' - ), $sendback ); - - wp_redirect( $sendback ); - exit(); -} - -function wpsc_force_flush_theme_transients() { - // Flush transients - wpsc_flush_theme_transients( true ); - - // Bounce back - $sendback = wp_get_referer(); - wp_redirect( $sendback ); - - exit(); -} -if ( isset( $_REQUEST['wpsc_flush_theme_transients'] ) && ( $_REQUEST['wpsc_flush_theme_transients'] == 'true' ) ) - add_action( 'admin_init', 'wpsc_force_flush_theme_transients' ); - -function wpsc_backup_theme() { - $wp_theme_path = get_stylesheet_directory(); - wpsc_recursive_copy( $wp_theme_path, WPSC_THEME_BACKUP_DIR ); - $_SESSION['wpsc_themes_backup'] = true; - $sendback = wp_get_referer(); - wp_redirect( $sendback ); - - exit(); -} -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ( $_REQUEST['wpsc_admin_action'] == 'backup_themes' ) ) - add_action( 'admin_init', 'wpsc_backup_theme' ); - - -function wpsc_delete_coupon(){ - global $wpdb; - - check_admin_referer( 'delete-coupon' ); - $coupon_id = (int)$_GET['delete_id']; - - if(isset($coupon_id)) { - $wpdb->query("DELETE FROM `".WPSC_TABLE_COUPON_CODES."` WHERE `id` = '$coupon_id' LIMIT 1;"); - - $deleted = 1; - } - $sendback = wp_get_referer(); - if ( isset( $deleted ) ) - $sendback = add_query_arg( 'deleted', $deleted, $sendback ); - - $sendback = remove_query_arg( array('deleteid',), $sendback ); - wp_redirect( $sendback ); - exit(); -} - -if ( isset( $_GET['action'] ) && ( 'purchase_log' == $_GET['action'] ) ) - add_action( 'admin_init', 'wpsc_admin_sale_rss' ); - -if ( isset( $_GET['purchase_log_csv'] ) && ( 'true' == $_GET['purchase_log_csv'] ) ) - add_action( 'admin_init', 'wpsc_purchase_log_csv' ); - -if ( isset( $_REQUEST['ajax'] ) && isset( $_REQUEST['admin'] ) && ($_REQUEST['ajax'] == "true") && ($_REQUEST['admin'] == "true") ) - add_action( 'admin_init', 'wpsc_admin_ajax' ); - -// Variation set deleting init code starts here -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ( 'wpsc-delete-variation-set' == $_REQUEST['wpsc_admin_action'] ) ) - add_action( 'admin_init', 'wpsc_delete_variation_set' ); - -//Delete Coupon -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ( 'wpsc-delete-coupon' == $_REQUEST['wpsc_admin_action'] ) ) - add_action( 'admin_init', 'wpsc_delete_coupon' ); - - -function flat_price( $price ) { - if ( isset( $price ) && !empty( $price ) && strchr( $price, '-' ) === false && strchr( $price, '+' ) === false && strchr( $price, '%' ) === false ) - return true; -} - -function percentile_price( $price ) { - if ( isset( $price ) && !empty( $price ) && ( strchr( $price, '-' ) || strchr( $price, '+' ) ) && strchr( $price, '%' ) ) - return true; -} - -function differential_price( $price ) { - if ( isset( $price ) && !empty( $price ) && ( strchr( $price, '-' ) || strchr( $price, '+' ) ) && strchr( $price, '%' ) === false ) - return true; -} - -/** - * If it doesn't exist, let's create a multi-dimensional associative array - * that will contain all of the term/price associations - * - * @param $variation - */ -function variation_price_field( $variation ) { - $term_prices = get_option( 'term_prices' ); - - if ( is_object( $variation ) ) - $term_id = $variation->term_id; - - if ( empty( $term_prices ) || !is_array( $term_prices ) ) { - - $term_prices = array( ); - if ( isset( $term_id ) ) { - $term_prices[$term_id] = array( ); - $term_prices[$term_id]["price"] = ''; - $term_prices[$term_id]["checked"] = ''; - } - add_option( 'term_prices', $term_prices ); - } - - if ( isset( $term_id ) && is_array( $term_prices ) && array_key_exists( $term_id, $term_prices ) ) - $price = esc_attr( $term_prices[$term_id]["price"] ); - else - $price = ''; - - if( !isset( $_GET['action'] ) ) { - ?> -
- -
- -
- - - - - - - -
- - - - term_id, $term_prices ) ) - $checked = ($term_prices[$variation->term_id]["checked"] == 'checked') ? 'checked' : ''; - else - $checked = ''; ?> - - - - - />every product using this variation. If you need to override it for any reason on a specific product, simply go to that product and change the price.', 'wpsc' ); ?> - - - $term_id - */ -function save_term_prices( $term_id ) { - - // First - Saves options from input - if ( isset( $_POST['variation_price'] ) || isset( $_POST["apply_to_current"] ) ) { - - $term_prices = get_option( 'term_prices' ); - - $term_prices[$term_id]["price"] = $_POST["variation_price"]; - $term_prices[$term_id]["checked"] = (isset( $_POST["apply_to_current"] )) ? "checked" : "unchecked"; - - update_option( 'term_prices', $term_prices ); - } - - // Second - If box was checked, let's then check whether or not it was flat, differential, or percentile, then let's apply the pricing to every product appropriately - if ( isset( $_POST["apply_to_current"] ) ) { - - //Check for flat, percentile or differential - $var_price_type = ''; - - if ( flat_price( $_POST["variation_price"] ) ) - $var_price_type = 'flat'; - elseif ( differential_price( $_POST["variation_price"] ) ) - $var_price_type = 'differential'; - elseif ( percentile_price( $_POST["variation_price"] ) ) - $var_price_type = 'percentile'; - - //Now, find all products with this term_id, update their pricing structure (terms returned include only parents at this point, we'll grab relevent children soon) - $products_to_mod = get_objects_in_term( $term_id, "wpsc-variation" ); - $product_parents = array( ); - - foreach ( (array)$products_to_mod as $get_parent ) { - - $post = get_post( $get_parent ); - - if ( !$post->post_parent ) - $product_parents[] = $post->ID; - } - - //Now that we have all parent IDs with this term, we can get the children (only the ones that are also in $products_to_mod, we don't want to apply pricing to ALL kids) - - foreach ( $product_parents as $parent ) { - $args = array( - 'post_parent' => $parent, - 'post_type' => 'wpsc-product' - ); - $children = get_children( $args, ARRAY_A ); - - foreach ( $children as $childrens ) { - $parent = $childrens["post_parent"]; - $children_ids[$parent][] = $childrens["ID"]; - $children_ids[$parent] = array_intersect( $children_ids[$parent], $products_to_mod ); - } - } - - //Got the right kids, let's grab their parent pricing and modify their pricing based on var_price_type - - foreach ( (array)$children_ids as $parents => $kids ) { - - $kids = array_values( $kids ); - $parent_pricing = get_product_meta( $parents, "price", true ); - - foreach ( $kids as $kiddos ) { - - $child_pricing = get_product_meta( $kiddos, "price", true ); - - if ( $var_price_type == 'flat' ) { - - update_product_meta( $kiddos, "price", floatval( $_POST["variation_price"] ) ); - } elseif ( $var_price_type == 'percentile' ) { - - //Are we decreasing or increasing the price? - - if ( strchr( $_POST["variation_price"], '-' ) ) - $positive = false; - else - $positive = true; - - //Now, let's get the parent product price, +/- by the percentage given - $percentage = (absint( $_POST["variation_price"] ) / 100); - - if ( $positive ) - $price = $parent_pricing + ($parent_pricing * $percentage); - else - $price = $parent_pricing - ($parent_pricing * $percentage); - - update_product_meta( $kiddos, "price", $price ); - } elseif ( $var_price_type == 'differential' ) { - - //Are we decreasing or increasing the price? - if ( strchr( $_POST["variation_price"], '-' ) ) - $positive = false; - else - $positive = true; - - //Now, let's get the parent product price, +/- by the differential given - $differential = (absint( $_POST["variation_price"] )); - - if ( $positive ) - $price = $parent_pricing + $differential; - else - $price = $parent_pricing - $differential; - update_product_meta( $kiddos, "price", $price ); - } - } - } - } -} -add_action( 'edited_wpsc-variation', 'save_term_prices' ); -add_action( 'created_wpsc-variation', 'save_term_prices' ); - -?> diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/admin.css b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/admin.css deleted file mode 100644 index d29ddb5..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/admin.css +++ /dev/null @@ -1,1793 +0,0 @@ -/* -* This is the new WPSC Admin CSS file - -*/ -.wpsc_trackingid_row{ - margin-left:20px; -} - -ul.children{ -padding-left:5px; -} -.category_indenter{ - - float:left; - width:auto; - -} -/** - *Dashboard Widget CSS - * -*/ -#leftDashboard{ - width:45%; - float:left; - text-align:right; - border-right:1px #999999 solid; - -} -#leftDashboard strong{ - float:left; - padding-left: 40px; -} -#rightDashboard strong{ - float:left; - padding-left: 40px; -} -#rightDashboard{ - width:45%; - float:right; - text-align:right; - -} -.pricedisplay, .salespricedisplay{ - /* width:40%; */ - /*float:left;*/ -} -.dashboardWidgetSpecial{ - font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif; - color:#21759B; - font-size:15px!important; - margin: 5px 0 5px 0; -} -.dashboardWidget{ - color:#777777; - padding-left:10px; - padding-right: 30px; - -} -span.wpsc_quart_left{ - width:40%; - float:left; -} -p.atglance{ - color:#777777; - font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif; - font-size:13px; - font-style:italic; -} -span.wpsc_quart_right{ - width:60%; - float:right; - text-align: right; -} -#box span{ - border-bottom: 1px solid #999999; -} -p.quarterly{ - color:#21759B; - font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif; - font-size:12px; - line-height: 140%; - margin:5px 0; -} -/* end of dashboard widget css */ -/* - *Display Purchase log Details CSS is HERE -*/ -#purchlogs_customfields{ - clear:both; -} -th#date{ - width:120px; -} -th#purchid{ - width:60px; -} -th#details{ - width:100px; -} -th#amount{ - width:75px; -} -th#name{ -/* width:220px; */ -} -th#track{ - width:75px; -} -th#delete{ - width:60px; -} -th#status{ - width:200px; -} -.google_checkout_logo{ - padding-right:10px; -} -#wpsc_items_ordered{ - clear:both; -} -#wpsc_items_ordered h3{ - margin-bottom:0em; -} -.wpsc_pushdown_img { - float:left; -} -#wpsc_purchlogitems_links{ - clear:both; - -} -#wpsc_purchlog_order_status{ - float:right; - width:250px; -} -#wpsc_purchlog_order_status .selector{ - margin-top:-.2em; -} - -#wpsc_purchlogitems_links a{ - text-decoration:none; - line-height:14pt; -} -#wpsc_purchlogitems_links img{ - padding-top:2px; - float:left; -} -#wpsc_shipping_details_box{ - width:45%; - float:left; - border:1px #d3d3d3 solid; - margin:.4em; - padding:.6em; - margin-right:5em; -} -#wpsc_billing_details_box{ - width:35%; - float:left; - margin:.4em; - padding:.6em; -} -#wpsc_purchlog_searchbox{ - width:100%; - text-align:right; - - -} -/* - * Display Purchase log Details CSS ends HERE - * Display Products CSS starts here -*/ -.tablenav select[name="bulkAction"] { - width:100px; -} -textarea#additional_description{ - border: 1px solid #dfdfdf; - /* width:465px !important; */ -} -.wpsc-separator { - background:transparent url(../../images/menu-arrows.gif) no-repeat scroll left 5px; - cursor:w-resize; - height:21px; - margin:0; - padding:0; -} - -#poststuff h3.form_heading { - font-size:1.1em; - margin: 40px 0px 10px 0px; - padding-left: 0px; -} - -#poststuff h3.form_heading span { - font-size:0.8em; -} - -div.search-box input#page-search-input { - width: 129px; - -} - - -#wpsc_product_list, -table.widefat { - width:100%; -} - -table.widefat .column-hidden_alerts { - display:none; -} - -#wpsc_product_list .column-cb, -table.widefat .column-cb { - /* width:24px; */ - vertical-align: middle; -} -#wpsc_product_list .column-image, #wpsc_product_list .product-image, -table.widefat .column-image, table.widefat .product-image { - padding-right: 0px; - /* width: 42px; */ -} - -#wpsc_product_list .column-categories, -table.widefat .column-categories{ - /* width: 70px; */ - padding-right:18px; -} - -#wpsc_product_list tbody tr td.column-title, -table.widefat tbody tr td.column-title { - border-right:none; -} - -#wpsc_product_list tbody tr td.product-image img, -table.widefat tbody tr td.product-image img { - margin-top: 4px; - cursor:move; -} - -.newCurrency{ - width:150px; -} -div.wpsc_floatleft{ - width:161px; - float:left; -} -div.wpsc_floatleft label { - line-height: 18px; - white-space: nowrap; -} - -/* Sortable product styling*/ - -table.product_editform { - width:100%; -} - - -#wpsc_product_list .ui-sortable-helper, -table.widefat .ui-sortable-helper { - width: 410px; - margin-left: -1px; - background-color: #FEFEFE; -} - -#wpsc_product_list .ui-sortable-helper td, #wpsc_product_list .ui-sortable-helper th, -table.widefat .ui-sortable-helper td, table.widefat .ui-sortable-helper th{ - border-top: 1px solid #DFDFDF; - opacity: .4; -} -.product-placeholder { - border-width: 1px; - border-style: dashed; - z-index: 900; - border-color: #bbb; - background-color: #eaeaea !important; - margin: -2px 0 0 -2px; - height: 50px; -} - -div#poststuff table tr td { - vertical-align:top; -} - -div#poststuff textarea { - width: 100%; -} - -div.admin_product_name label { - display: block; - float: left; -} - -div.admin_product_name { - position: relative; - - height: 30px; - background: #ffffff; - - border: 1px solid #dfdfdf; - -moz-border-radius: 6px; - -khtml-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; -} -div.admin_product_name input.wpsc_product_name { - border: none; -} - -div.admin_product_name a.shorttag_toggle { - position: absolute; - top: 0px; - right: 0px; - background:url(../../wpsc-core/images/info_icon.jpg) no-repeat scroll 5px 8px; - border-left:1px solid #DFDFDF; - display:block; - height:100%; - padding:0px 3px 0px 3px; - width:18px; -} - -div#icon_card -{ - float: left; - height: 36px; - margin: 20px 6px 0px 0px; - width: 36px; - background: url(../../wpsc-core/images/icon32.png) no-repeat center center; -} - -div.admin_product_shorttags { - width:93%; - min-width:396px; - max-width:558px; - - clear: both; - padding: 6px; - font-size: 8pt; - margin:0 0 0 6px !important; - border-left:1px solid #DFDFDF; - border-right:1px solid #DFDFDF; - border-bottom:1px solid #DFDFDF; - /* height: 28px; */ - display: none; - _width:396px; - background-color: #ffffff; -} - -#description { - margin:0; -/* width:100%; */ -} - -h4.product_action_link { - margin:4px 0px 0px 0px; - display:block; - font-weight:bold; -} - - - -/* custom meta styling */ -div.product_custom_meta { - display: block; - width: 100%; - vertical-align: top; -} -div#poststuff div.product_custom_meta input, div#poststuff div.product_custom_meta textarea { - width: 100%; -} - - -div.product_custom_meta a.add_more_meta { - display: block; - float: left; - margin-top: 18px; - margin-left: 4px; -} - -div.product_custom_meta a.remove_meta { - display: block; - margin-left: 4px; -} - - -div.product_custom_meta label { - display: block; - width: 170px; - float: left; -} - -div.product_custom_meta label input { - font-size:13px; - width: 160px !important; - margin:1px !important; - padding:3px !important; - display: block; -} - -div.product_custom_meta br { - clear: both; -} - -/* image form styling */ -div.flash-image-uploader { - display: none; -} - -#wpbody-content div.flash-image-uploader #media-items { - position: relative; - border: none; -} -#wpbody-content div.flash-image-uploader #media-items .progress{ - position: static; - margin:0 0 6px; - height: 16px; -} - - -button#add-product-image { - float: left; -} - -div#swfupload_img_indicator { - float: left; - height: 20px; - width: 20px; - display: none; -} - -div#swfupload_img_indicator img{ - margin: 4px 2px 2px 4px; -} - -ul#gallery_list{ - clear:both; - list-style-type:none; - list-style-position: inside; - cursor: pointer; - min-height:70px; - _height:70px; - padding-left:0px; - margin: 6px 0px 0px 6px; -} - -ul#gallery_list li{ - float:left; -} - -ul#gallery_list li *{ - z-index:79; -} -ul#gallery_list li.first *{ - z-index:80; -} -.ui-selected { - border:2px dashed #969696; -} - -img.deleteButton { - display:none; - position:absolute; - top:-5px; - right: -1px; - width:16px; - height:16px; - cursor:pointer; -} -a.editButton { - background:#FFFFFF none repeat scroll 0%; - height:20px; - display:none; - position:absolute; - right:0px; - top:0px; - padding-bottom:3px; - padding-left:3px; - cursor:pointer; -} - -div.image_settings_box { - position:absolute; - width:150px; - display:none; - margin: -66px 0px 0px 36px; - _margin: 0px 0px 0px -30px; - padding-top:2px; - width:252px; - z-index:69; - _z-index:80; -} - -a.thickbox img { - border:medium none; -} - -img.previewimage { - cursor:move; - height:60px; - margin-right:4px; - width:60px; -} - -div.lower_settings_box { - width:234px; - background-color:white; - border:1px solid black; - border-top:1px solid #CCCCCC; - float:right; - margin: -1px -6px 0px 0px; - padding: 2px 0 0 4px; - background-color:#EAF3FA; -} - -div.upper_settings_box { - width:250px; - background-color:white; - border:1px solid black; - padding:3px 1px 2px 5px; -} - -div.upper_image { - float:left; - /* border-bottom:1px solid black; */ - padding-left:5px; - margin-left:-5px; - _margin-left:-3px; - margin-right:-7px; - padding-bottom:4px; - _padding-bottom:6px; - _margin-bottom:-2px; -} - -div.upper_txt{ - padding-left:22px; - color:#666666; -} - -div.previewimage { - position:relative; -} - -tr.edit_product_image *{ - z-index:80; -} - -a.closeimagesettings{ - cursor:pointer; - margin-left:90px; -} - -div.browser-image-uploader { - -} - -div.browser-image-uploader h4{ - margin-bottom: 8px; -} - -div.image_resize_extra_forms { - display: none; -} - -#wpsc_product_category_and_tag_forms table { - width: 100%; -} - -#wpsc_product_category_and_tag_forms table td.itemfirstcol{ - padding-left:3pt; - width: 50%; -} - -/* variations CSS starts */ - -table.product_variation_listing{ - margin-bottom: 12px; -} - -table.product_variation_listing th.variation_name{ - color: #71A4C8; - font-style: italic; - text-align: left; - padding-bottom: 1px; -} - -table.product_variation_grid{ - margin-top: 12px; -} - -table.product_variation_grid th.variation_name{ - color: #71A4C8; - font-style: italic; - text-align: left; - padding-bottom: 1px; -} - -div#edit_variations_container { - margin-top: 12px; -} -table.product_variation_grid { - border-collapse: collapse; - margin-top: 0px; -} - -table.product_variation_grid tr td, table.product_variation_grid tr th { - border: 1px solid #cccccc; - border-collapse: collapse; - text-align: left; -} - -table.product_variation_grid tr th { - border-bottom: 1px solid #969696; -} - -table.product_variation_grid tr th.stock { - border-bottom: 1px solid #969696; - width: 50px; -} - -table.product_variation_grid tr th.price { - width: 78px; -} - -table.product_variation_grid tr td.variations, table.product_variation_grid tr th { - padding: 4px 0px 4px 10px; -} - -table.product_variation_grid tr td.variations, table.product_variation_grid tr th.variations { - width: 300px; -} - - -table.product_variation_grid tr td input{ - padding: 0px 3px 0px 3px; -} - -table.product_variation_grid tr.group_boundary td { - border-bottom: 1px solid #969696; -} - -a.about_this_page_sub { - text-decoration:underline; -} - -table.product_variation_grid tr td, table.product_variation_grid tr th { - border: 1px solid #cccccc; - border-collapse: collapse; - text-align: left; -} - -table.product_variation_grid tr.variation_row td { - border-bottom: none; -} - -table.product_variation_grid tr.settings_row td { - border-top: none; - padding: 0px !important; -} - - -table.product_variation_grid tr.settings_row td div.variation_settings { - display: none; - border-top: 1px dotted #cccccc; - width: 100%; - min-height: 30px; - padding: 4px 10px; - -} -table.product_variation_grid tr th { - border-bottom: 1px solid #969696; -} - -table.product_variation_grid tr th.stock { - border-bottom: 1px solid #969696; - width: 50px; -} - -table.product_variation_grid tr th.price { - width: 78px; -} - -table.product_variation_grid tr td.variations, table.product_variation_grid tr th { - padding: 4px 0px 4px 10px; -} - -table.product_variation_grid tr td.variations, table.product_variation_grid tr th.variations { - width: 300px; -} - - -table.product_variation_grid tr td input{ - padding: 0px 3px 0px 3px; -} - -table.product_variation_grid tr td input.checkbox{ - display: block; - margin:6px auto; -} - -table.product_variation_grid tr.group_boundary td { - border-bottom: 1px solid #969696; -} - -div#add_product_variation_details { - margin: 1ex 0px 0px 0px; -} - -div#add_product_variation_details table.product_variation_grid { - margin: 4px 0px 0px 0px; -} - -div.variation_checkboxes { - margin-bottom: 4px; -} - -div.variation_checkboxes label { - display: block; - margin-bottom: 2px; -} - -div.variation_checkboxes label input { - position: relative; - top: 2px; - margin-right: 3px; -} - -a.variation_edit_button { - display: block; - height: 16px; - width: 16px; - margin: 4px auto 0px auto; - -} - -div.variation_settings div.variation_settings_contents{ - padding-left: 10px; -} - -div.select_variation_file { - padding-left: 6px; -} -div.select_variation_file p { - margin:0 0 3px; -} - -div.select_variation_file p { - margin:0 0 3px; -} - -div.select_variation_file p input { - position: relative; - top: 2px; -} - - -label.variation_checkbox { - display: block; -} - -div.variation_set{ -} -div.variation{ - padding-left: 10px; -} -/* variations CSS ends */ - - -div#side-sortables input[type="file"] { - width:250px; -} -div.select_product_file, div.edit_select_product_file { - margin-bottom:0; - margin-top:3px; - overflow-x:hidden; - overflow-y:auto; - padding:2px 2px 6px; - position:relative; -} - -a.file_delete_button { - cursor:pointer; - float:right; - /* margin-top:-17px; */ - display: block; -} - -a.delete_button { - border-color:-moz-use-text-color -moz-use-text-color #FF0000; - border-style:none none solid; - border-width:medium medium 1px; - color:#FF0000; - font-size:11px; - padding:1px 2px; - text-decoration:none; -} -.greytext{ - color:#666666; -} -span.small_italic{ - font-style: italic; -} -/* Product details form styling ends */ -/* - * Display Products CSS ends here -*/ - -/* shipping options start here */ -div.wpsc_shipping_options{ - width:100%; - padding:3px 0; -} -.wpsc-shipping-actions{ - visibility:hidden; - font-size: 10px; - margin:2px 9em 0 0; - float:right; -} -div.wpsc_shipping_options:hover .wpsc-shipping-actions{ - font-size:10px; - visibility:visible; -} - -/* -* Product Groups styles start here -*/ -td.firstcol div.postbox div.inside{ - margin: 0px; - padding: 0px; -} - -table#productpage{ - width: 100%; - clear: both; - border-collapse: collapse; -} - -table#productpage tr td{ - vertical-align: top; - /* padding: 0px 0px 0px 6px; */ -} - -table#productpage tr td.secondcol{ - /* width: 60%; */ - /* margin-left: 20px; */ - padding: 0px 2px 0px 16px; - -} - - -table.category-edit { - border-collapse: collapse; - width: 100%; -} - -table.category-edit tr td { - border: none; -} -table.category-edit tr td.column-title { - width: 450px; -} - - -div.category-image-container { - width: 55px; - height: 30px; - -} - -div.category-image-container img { - float: left; -} -div.category-image-container img.category_indenter { - margin-right: 3px; - width:auto; - float:left; -} - - - - - -div#productform{ display: none; width: 99.5%; } - -div#edititem27{ display: none; width: 586px; } - -div#productform table tr td{ height: 11px !important; } - - - - -div#blank_item{ display: block;} - -#poststuff div#blank_item h3{ - margin-top: 0px; - -} - -div#additem{ display: none;} - -div#productform td.itemfirstcol{ padding-left:4px; vertical-align: top; } - - - - -div#productform input.text, div#additem input.text{ - width:386px; - border:1px solid #bbb; -} - - -table.category_forms { - width: 100%; -} -table.category_forms tr td { - padding: 0px; - padding-right: 8px; -} -table.category_forms tr td textarea { - width: 386px; -} - -div#edit_variation_values input.text{width:286px !important;border:1px solid #bbb;} - -input.image_resize{ position: relative; top: 4px; } - -div#additem table.additem input.wpsc_tag{ - width:180px; -} -div#additem label{ - font-style: normal; - font-size: 0.95em; -} - - - - - -.groupItem{ - border-top:1px solid #bbb; - width:385px; - height:35px; - clear: both; - /* margin-left:-6px; */ - padding: 0px 0px 4px 0px; -} - -.groupItem .itemHeader{ - width:65px; - line-height: 15px; - color: #000; - padding: 4px; - cursor: move; - height: 35px; - position: relative; - clear: both; -} - -.groupItem .itemHeader a{ - margin: 4px 0px 4px 0px; - font-weight: normal; - font-size: 11px; - text-decoration: none; -} -.sortHelper{ - border: 3px dashed #666; - width: auto; -} -.groupWrapper p{ - height: 1px; - overflow: hidden; - margin: 0; - padding: 0; -} - - -table#productpage tr td.secondcol.product_groups_page { - padding-left: 16px; -} - -table#productpage tr td.secondcol.product_groups_page h4 { - font-family: inherit; - margin-top: 20px; -} - -td.product_groups_page #additem .inside, td.product_groups_page #productform .inside { - margin: 0px 0px 15px 0px; -} - -div.editing_this_group { - margin-top: 8px; - margin-bottom: 8px; - /* border-bottom:1px dotted black; */ - width:100%; -} - -td.product_groups_page h4 { - margin-bottom: 1ex; -} -#editorcontainer{ - clear:both; -} -td.product_groups_page td.category_presentation_settings { - padding-bottom: 1ex; -} - -div.editing_this_group { - font-size:8pt; -} - -div.editing_this_group p { - padding:4px 4px 4px 8px; -} - -div.editing_this_group dl { - padding:4px 4px 4px 8px; -} - - -#blank_item a.add_category_link{ - display: block; - margin: 8px 8px 8px 0px; - text-decoration: underline; -} - -div.product_group { - margin: 12px 0px 10px 0px; -} - - -table#wpsc_category_list td div.subcategory img.category_indenter { - float: left; - margin: 8px 0px 0px 0px; -} - -table#wpsc_category_list td div.subcategory table.itemlist { - float: left; -} - - -label.select_categorisation_group, select#select_categorisation_group, a.add_categorisation_group, a.edit_categorisation_group, #submit_categorisation_form span { - display: block; - float: left; -} - -#submit_categorisation_form span { - display: block; - float: left; - margin-left: 10px; -} - -#submit_categorisation_form a span { - margin-left: 0px; -} - -label.select_categorisation_group { - padding-top: 4px; - /* color: #336699; */ - font-size: 11px; -} - -a.add_categorisation_group { - margin-left: 10px; -} - -a.edit_categorisation_group { - margin-left: 30px; -} - - - -div#add_categorisation, div#edit_categorisation{ - display: none; - border: 1px solid #BBBBBB; - padding: 4px; - margin-top: 6px; -} - -div#add_categorisation br, div#edit_categorisation br{ - clear: both; -} - - -div#add_categorisation fieldset, div#edit_categorisation fieldset{ - width: 230px; - float: left; - border: none; -} - -div#add_categorisation fieldset label, div#edit_categorisation fieldset label{ - display: block; -} - -ul.categorisation_links{ - list-style-type: none; - clear: both; - padding: 0px; -} -.wpsc_add_new_currency{ -text-decoration: none; -} -ul.categorisation_links li{ - display: block; - float: left; - list-style-type: none; - margin: 0px; - font-size: 14px; - padding: 4px; -} - -ul.categorisation_links li.selected a{ - color: #D54E21; -} - -.multiple-select { - background: white none repeat scroll 0px 0px; - border: 1px solid #DFDFDF; - display: inline-block; - height: 120px; - margin: 10px 0; - overflow-x: hidden; - overflow-y: auto; - padding: 0px; - position: relative; - width:98% -} - -table.category_forms a.delete_button { - display: block; - margin: 3px 0px 0px 8px; - float: left; -} - -table.category_forms td.last_row { - padding: 16px 0px 0px 0px; -} - -.wpsc_gold_float{ - min-width:45%; - float:left; - max-width:450px; - _width:450px; -} -.wpsc_gold_side{ - margin-top:90px; - float:right; - width:35%; -} -.wpsc_gold_text{ - width:70%; - float:left; - clear:both; -} - -.wpsc_gold_info{ - width:30%; - float:right; - text-align: center; - font-size:20px; -} -.wpsc_gold_module{ - width:100%; - float:left; - - border-bottom: 1px solid #DFDFDF; -} -.wpsc_gold_module strong{ -width:auto; -float:left; -} -#visitInstinct{ - float:right; - margin:5px 20px 0 0; -} - - -#gold_cart_form .postbox p img{ - padding-bottom:10px; -} -#wpsc_gold_options_outside{ - width:400px; -} -#gold_cart_form .postbox p{ - padding-left: 4px; -} -#gold_cart_form .postbox{ - width:100%; - max-width:500px; -} -#gold_cart_form .postbox p{ - padding-left:10px; -} -#gold_cart_form .postbox p label{ - width:80px; - float:left; -} - -a.admin_download { - display: block; - height: 26px; - border-bottom: none; - text-decoration: none; -} - -a.admin_download img{ - margin-right: 3px; -} - -a.admin_download span{ - text-decoration: underline; -} - -/* -* Product Groups styles end here -*/ -.wpsc_td_note{ - padding-bottom:0 !important; -} - -.wpsc_purchaselogs_options { - margin: 0px 0px 8px 0px; - -} - - -.add_new_form_set { - /* display: block; - float: left;*/ - text-decoration: underline; - font-weight: bold; - font-size:0.9em; -} - - -p.add_new_form_set_forms { - display: none; -} - -td.product-image a img.attachment-thumbnail { - height: 38px; - width: 38px; - -} - -#wpsc_product_category_and_tag_forms .tagchecklist { - font-size:11px; -} - -#categorydiv div{ - margin-top: 4px; -} - -a.variation_handle { - color: #CCCCCC; - text-decoration: none; - font-size: 15px; -} - -.toplevel_page_wpsc-edit-products .wrap h2 -{ - padding-bottom:0px; - border-bottom:1px solid #CCC; -} -#post-body #advanced-sortables -{ - margin-right:300px -} -#media-buttons #add_audio, -#media-buttons #add_video, -#media-buttons #add_media { - display:none; -} -.meta-box-sortables-wpec .postbox:hover .handlediv { - background: transparent url(../../wpsc-core/images/menu-bits.gif) no-repeat scroll 0% -111px; -} -/* Main Flora Style Sheet for jQuery UI ui-datepicker */ -#ui-datepicker-div, .ui-datepicker-inline { - font-family: Arial,Helvetica,sans-serif; - font-size: 14px; - padding: 0; - margin: 0; - background: #E0F4D7; - width: 185px; -} -#ui-datepicker-div { - display: none; - border: 1px solid #21759B; - z-index: 10; -} -.ui-datepicker-inline { - float: left; - display: block; - border: 0; -} -.ui-datepicker-rtl { - direction: rtl; -} -.ui-datepicker-dialog { - padding: 5px !important; - border: 4px ridge #fff !important; -} -button.ui-datepicker-trigger { - width: 25px; -} -img.ui-datepicker-trigger { - margin: 2px; - vertical-align: middle; -} -.ui-datepicker-prompt { - float: left; - padding: 2px; - background: #fff; - color: #000; -} -*html .ui-datepicker-prompt { - width: 185px; -} -.ui-datepicker-control, .ui-datepicker-links, .ui-datepicker-header, .ui-datepicker { - clear: both; - float: left; - width: 100%; - color: #FFF; -} -.ui-datepicker-control { - background: #fff; - padding: 2px 0px; - display:none; -} -.ui-datepicker-links { - background: #fff; - padding: 2px 0px; -} -.ui-datepicker-control, .ui-datepicker-links { - font-weight: bold; - font-size: 80%; - letter-spacing: 1px; -} -.ui-datepicker-links label { - padding: 2px 5px; - color: #fff; -} -.ui-datepicker-clear, .ui-datepicker-prev { - float: left; - width: 34%; -} -.ui-datepicker-rtl .ui-datepicker-clear, .ui-datepicker-rtl .ui-datepicker-prev { - float: right; - text-align: right; -} -.ui-datepicker-current { - float: left; - width: 30%; - text-align: center; -} -.ui-datepicker-close, .ui-datepicker-next { - float: right; - width: 34%; - text-align: right; -} -.ui-datepicker-rtl .ui-datepicker-close, .ui-datepicker-rtl .ui-datepicker-next { - float: left; - text-align: left; -} -.ui-datepicker-header { - padding: 1px 0 3px; - background: #fff; - text-align: center; - font-weight: bold; - height: 1.3em; -} -.ui-datepicker-header select { - background: #fff; - color: #000; - border: 0px; - font-weight: bold; -} -.ui-datepicker { - background: #fff; - text-align: center; - font-size: 100%; -} -.ui-datepicker a { - display: block; - width: 100%; -} -.ui-datepicker-title-row { - background: #fff; - color: #000; -} -.ui-datepicker-title-row .ui-datepicker-week-end-cell { - background: #fff; -} -.ui-datepicker-days-row { - background: #FFF; - color: #666; -} -.ui-datepicker-week-col { - background: #ededed; - color: #000; -} -.ui-datepicker-days-cell { - color: #000; - border: 1px solid #DDD; -} -.ui-datepicker-days-cell a { - display: block; -} -.ui-datepicker-week-end-cell { - background: #EAF2FA; -} -.ui-datepicker-unselectable { - color: #888; -} -.ui-datepicker-week-over, .ui-datepicker-week-over .ui-datepicker-week-end-cell { - background: #B1DB87 !important; -} -.ui-datepicker-days-cell-over, .ui-datepicker-days-cell-over.ui-datepicker-week-end-cell { - background: #FFF !important; - border: 1px solid #777; -} -* html .ui-datepicker-title-row .ui-datepicker-week-end-cell { - background: #ddd !important; -} -* html .ui-datepicker-week-end-cell { - background: #ddd !important; - border: 1px solid #DDD !important; -} -* html .ui-datepicker-days-cell-over { - background: #FFF !important; - border: 1px solid #777 !important; -} -* html .ui-datepicker-current-day { - background: #d3d3d3 !important; -} -.ui-datepicker-today { - background: #dddddd !important; -} -.ui-datepicker-current-day { - background: #d3d3d3 !important; -} -.ui-datepicker-status { - background: #fff; - width: 100%; - font-size: 80%; - text-align: center; -} -#ui-datepicker-div a, .ui-datepicker-inline a { - cursor: pointer; - margin: 0; - padding: 0; - background: none; - color: #000; -} -.ui-datepicker-inline .ui-datepicker-links a { - padding: 0 5px !important; -} -.ui-datepicker-control a, .ui-datepicker-links a { - padding: 2px 5px !important; - color: #000 !important; -} -.ui-datepicker-title-row a { - color: #000 !important; -} -.ui-datepicker-control a:hover { - background: #f1f1f1 !important; - color: #333 !important; -} -.ui-datepicker-links a:hover, .ui-datepicker-title-row a:hover { - background: #FFF !important; - color: #333 !important; -} -.ui-datepicker-multi .ui-datepicker { - /* border: 1px solid #83C948; */ -} -.ui-datepicker-one-month { - float: left; - width: 185px; -} -.ui-datepicker-new-row { - clear: left; -} -.ui-datepicker-cover { - display: none; - display: block; - position: absolute; - z-index: -1; - filter: mask(); - top: -4px; - left: -4px; - width: 193px; - height: 200px; -} -/* marketing / coupon page styling */ - -div.modify_coupon{ border: 1px solid #eeeeee; display: none; width: 100%; } -table.coupon_data{ - width: 100%; -} -table.add-coupon{width:100%;} -table.add-coupon tr th{ text-align: left; padding: 2px 5px 0px 5px; border: none;} -table.add-coupon tr td{ text-align: left; padding: 2px 5px 2px 5px; border: none;} -table.add-coupon tr td p{padding:0;margin:5px;} -#table_header{ - font-size:16px; - margin-top:20px; - font-weight: bold; -} -table.coupon-list{ width: 100%; } -table.coupon-list th{ text-align:left;} -table.coupon-list tr.toprow td{ text-align: left; font-weight:bold; } - -table.coupon-list tr td{ padding: 5px 5px 10px 10px; vertical-align: middle;} - -table.coupon-list tr.alt{ background-color: #eeeeee; } - -table.coupon-list tr.alt td{ background-color: #eeeeee; } -table.coupon-list tr.coupon_edit td{ padding:0; } -td#order_summary_container{ width: 80px; } -table.category_forms a.delete_button, span.delete_button { - color:#FF0000; - display:block; - float:left; - font-size:11px; - margin:3px 0 0 8px; - text-decoration:underline; -} -p span.input_label{ - font-size:1.2em; - width:180px; - float:left; -} -a.wpsc_featured_product_toggle { - display: block; - height: 18px; - width: 18px; - margin: 4px 0px 0px 6px; -} - -a.wpsc_featured_product_toggle img { - display: block; - margin: 0px auto 0px auto; - -} - -div.wpsc_clear { - clear: both; -} - -.wpsc_featured div.product_grid_display div.product_grid_item { - width: 100%; - height: auto !important; - margin: 4px 90px 8px 0; - position: relative; -} - - -.wpsc_featured .item_text { - float: left; - height: 240px; - width: auto; -} - -.wpsc_featured .item_image { - float: left; - height: 240px; - width: 340px; - margin-left: 20px; -} - -.wpsc_featured .item_image a { - display: block; - height: 240px; - width: 340px; - border: 1px solid #FEFAF1; - border-radius: 18px; - -moz-border-radius: 18px; - -webkit-border-radius: 18px; - background-repeat: no-repeat; -} - - -.wpsc_featured .item_text h3 { - font-size: 1.4em; - margin: 0px 0px 8px 0px; -} - -.wpsc_featured .item_text div.pricedisplay { - color: #9B9A96; - line-height: normal; - display: block; - margin: 0px 0px 4px 0px; - -} - -.wpsc_featured .item_text .wpsc_description { - font-size: 1em; - line-height:24px; - display:block; - float:left; - width: auto; - color: #9B9A96; - font-family: Georgia,"Bitstream Charter",serif; -} - -.wpsc_featured .item_text .wpsc_description p { - margin-bottom: 0px; -} - - -.wpsc_featured .item_text .wpsc_description a { - color:#9B9A96; -} - -ul.wpsc_categories { - clear: both; -} - -a.update_variations, a.update_variations_action -{ - float:left; - margin:10px; -} -a.update_variations_action { - display:none; -} -#search-products{ -width:auto; -float:right; -} -.productnav{ -height: 30px; -margin: 6px 0px 4px; -vertical-align: middle; -} - -.wpsc_stock_control_forms .edit_stock { - margin-top:0.5em; - line-height:16px; -} -.wpsc_stock_control_forms .unpublish_when_none_left { - margin:0.5em 0; -} -#media-upload form p.help { - text-align:left; - clear:both; -} -ul#category_list_li, ul.poll-options { -} -ul#category_list_li li div, -ul#category_list_li li div ul li div { -} -ul#category_list_li li div div, -ul#category_list_li li div ul li div div { - -} -ul#category_list_li li div:hover div{ -} - -ul#category_list_li li div ul li div:hover div { -} -ul#category_list_li li { -} -ul#category_list_li li:hover span.handle { -cursor: move; -} -.edit{ -} -ul#category_list_li li span.handle { - float:left; - - padding: 5px; - -} - -.category_admin_list_img a.row-title{ - text-decoration: none; -} - - -.category_admin_list_img:hover div.row-actions { - visibility:visible; -} - -ul#category_list_li ul { -margin-left:15px; -} - -.row-title img { -width:30px; -float:left; -padding-right:10px; -} -.row-title { - margin-right:5px; -} -body.edit-php form#posts-filter { - min-width:830px; -} -div#wpsc-variationdiv { - display:none; -} -input.wpsc_cat_image_size { - width:40px -} -input.wpsc_cat_box { - width:auto; - margin:6px; -} -.wpsc_ie_field, .wpsc_inline_actions { - display:none; -} -.wpsc_ie_field{ - width:100%; -} -.wpsc_inline_actions .loading_indicator { - position:relative; - top:3px; - left:2px; - visibility: hidden; -} -table.tags th#image { - width:60px; -} -/* quick edit product */ -fieldset.wpsc-cols { -width:30% !important; -float:left !important; -} - -.inline-edit-col-left { -width:35% !important; -} - -.wpsc-quick-edit { -width: 30%; -float:left; -} - -textarea.tax_input_product_tag { -width:50% !important; -height: 95px !important; -} - -ul.wpsc_product_category-checklist { -height: 280px; -} - -span.wpsc-quick-edit{ -width:75px; -display: block; -float: left; -} -.wpsc_var_description{ - margin:20px 0 0 20px !important; - color:red; -} - -.ajax-loading { - visibility: hidden; -} - -.dashboard_page_wpsc-update .wpsc-progress-bar { - position:relative; - height:20px; - width:300px; - border:1px solid #3a58cf; - margin:-0.75em 0 27px; -} - -.dashboard_page_wpsc-update .wpsc-progress-bar * { - position:absolute; - left:0; - top:0; - background:#f9f9f9; - font-size:12px; -} - -.dashboard_page_wpsc-update .wpsc-progress-bar .block { - background-color:#527dff; - z-index:-1; - height:20px; -} - -.dashboard_page_wpsc-update .wpsc-progress-bar span { - display:block; - left:310px; - line-height:20px; - width:200px; -} - -.dashboard_page_wpsc-update .wpsc-progress-bar .eta { - top:22px; - line-height:15px; - width:100%; -} \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/jquery.ui.tabs.css b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/jquery.ui.tabs.css deleted file mode 100644 index ee320bb..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/jquery.ui.tabs.css +++ /dev/null @@ -1,152 +0,0 @@ -/* Caution! Ensure accessibility in print and other media types... */ -@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */ - .ui-tabs-hide { - display: none; - } -} - -/* Hide useless elements in print layouts... */ -@media print { - .ui-tabs-nav { - display: none; - } -} - -/* Skin */ -#slider { - border-color:#EBEBEB rgb(204, 204, 204) rgb(204, 204, 204) rgb(235, 235, 235); - border-style:solid; - border-width:1px; - margin:0pt 15% 0pt 15px; - padding:2px; -} -#tabs{ - display: block; - background:#EAF3FA none repeat scroll 0%; - font-size:14px; - margin:0pt 0pt 10px; - overflow:hidden; -} - -.ui-tabs-nav { - list-style: none; - margin: 0; - padding: 0 0 0 4px; -} -.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */ - display: block; - clear: both; - content: " "; -} -.ui-tabs-nav li { - float: left; - padding:8px 5px; - min-width: 84px; /* be nice to Opera */ - margin: 2px 2px 0px 1px !important; - text-decoration: none; - list-style: none; -} -.ui-tabs-nav a, .ui-tabs-nav a span { - display: block; - padding: 0 10px; -} - -.ui-tabs-nav a { - margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */ - padding-left: 0; - color: #27537a; - line-height: 1.2; - text-align: center; - text-decoration: none; - white-space: nowrap; /* required in IE 6 */ - outline: 0; /* prevent dotted border in Firefox */ -} -.ui-tabs-nav .ui-tabs-selected{ - background:#CEE1EF none repeat scroll 0% 50%; - font-weight:bold; - -moz-border-radius-topright: 4px; - -khtml-border-top-right-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - -moz-border-radius-topleft: 4px; - -khtml-border-top-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; -} -.ui-tabs-nav .ui-tabs-selected a { - position: relative; - top: 1px; - z-index: 2; - margin-top: 0; - color:#333333; -} -.ui-tabs-nav li a:hover { - color:#D54E21; -} -.ui-tabs-nav a span { - width: 64px; /* IE 6 treats width as min-width */ - min-width: 64px; - height: 18px; /* IE 6 treats height as min-height */ - min-height: 18px; - padding-top: 6px; - padding-right: 0; -} -*>.ui-tabs-nav a span { /* hide from IE 6 */ - width: auto; - height: auto; -} -.ui-tabs-nav .ui-tabs-selected a span { - padding-bottom: 1px; -} -.ui-tabs-nav .ui-tabs-selected a, .ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active { - background-position: 100% -150px; -} -.ui-tabs-nav a, .ui-tabs-nav .ui-tabs-disabled a:hover, .ui-tabs-nav .ui-tabs-disabled a:focus, .ui-tabs-nav .ui-tabs-disabled a:active { - background-position: 100% -100px; -} -.ui-tabs-nav .ui-tabs-selected a span, .ui-tabs-nav a:hover span, .ui-tabs-nav a:focus span, .ui-tabs-nav a:active span { - background-position: 0 -50px; -} -.ui-tabs-nav a span, .ui-tabs-nav .ui-tabs-disabled a:hover span, .ui-tabs-nav .ui-tabs-disabled a:focus span, .ui-tabs-nav .ui-tabs-disabled a:active span { - background-position: 0 0; -} -.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited, .ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */ - cursor: text; -} -.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active, -.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */ - cursor: pointer; -} -.ui-tabs-disabled { - opacity: .4; - filter: alpha(opacity=40); -} -.ui-tabs-panel { - border-top: 1px solid #97a5b0 !important; - padding: 1em 8px; - background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */ - - /* overwrite wp-admin */ - border:none !important; - height:100% !important; - margin:0pt 0pt 0pt 0px !important; - overflow:visible !important; -} - -.ui-tabs-panel a { - display:inline; -} - -.ui-tabs-loading em { - padding: 0 0 0 20px; - background: url(loading.gif) no-repeat 0 50%; -} - -/* Additional IE specific bug fixes... */ -* html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */ - display: inline-block; -} -*:first-child+html .ui-tabs-nav { /* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */ - display: inline-block; -} - diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/settingspage.css b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/settingspage.css deleted file mode 100644 index bd3c718..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/css/settingspage.css +++ /dev/null @@ -1,191 +0,0 @@ -table#wpsc_checkout_list{ - width:100%; -} -th#trash{ - width:40px; -} -th#drag{ - width:29px; -} -tr.wpsc_grey{ - background-color: #ededed; -} -td.drag a:hover{ - - /*background-image: url(../../images/roll-over-drag.jpg); - background-repeat: no-repeat; - background-position: center;*/ - cursor: move; -} -th#mandatory{ - width:65px; -} -#wpsc_checkout_list th#name{ - width:180px; -} -td.mandatorycol{ - text-align: center; -} -tr.checkout-placeholder { - border-width: 1px; - border-style: dashed; - z-index: 900; - border-color: #bbb; - background-color: #f5f5f5; - margin: -2px 0 0 -2px; -} -#wpsc_checkout_list tbody { - width: 700px; - border-collapse:collapse; -} - -/* Removed to prevent overlapping the Contextual Help tab -#wpsc_options { - position: relative; -} -*/ - -#wpsc_options a.about_this_page { - position: absolute; - top: 10px; - right: 12px; -} - -#wpsc_options_page { - padding: 0px 0px 0px 5px; -} - -#options_presentation{ - min-width:850px; -} - -table#gateway_options tr td { - padding: 0; - vertical-align: top; -} -table#gateway_options tr td.gateway_settings { - padding: 0 0 8px 8px; - width:394px; -} -td.gateway_settings input[type=text]{ - width: 200px; -} -tr.rate_row td input[type=text]{ - width:50px; -} -div.wpsc_newlayer input[type=text]{ - width:50px; -} -td.gateway_settings textarea{ - width:100%; -} -td.gateway_settings h4{ - margin-top:0; -} - -.wpsc_shipping_options{ - border-top: 1px solid #e9e9e9; - -} -td.select_gateway p { - margin: 0px 15px 4px 5px; -} - -div#wpsc_shipwire_setting, div#shipping_discount_value { - display: none; -} - -table#gateway_options { - margin:0; - width:100%; -} -/* admin checkout page css */ -div#form_field_form_container{ padding: 0px; margin: 0px; } - -div#form_field_form_container div, div#form_field_form_container div table{ padding: 0px; margin: 0px; width: 100%; border-collapse: collapse; } -table#form_field_table tr td.namecol{ } - -table#form_field_table tr *.namecol{ width: 170px; padding-right: 8px; } -table#form_field_table tr *.namecol input{ width: 160px; } - -table#form_field_table tr *.typecol{ width: 120px; } -table#form_field_table tr *.typecol select{ width: 115px; } - -table#form_field_table tr *.mandatorycol{ width: 90px; text-align: center; } -table#form_field_table tr *.mandatorycol input{ } - -table#form_field_table tr *.logdisplaycol{ width: 70px; text-align: center; } -table#form_field_table tr *.logdisplaycol input{ } - -table#form_field_table tr *.ordercol{ width: 70px; text-align: center; } -table#form_field_table tr *.ordercol input{ } - -table#form_field_table tr th{ padding-left: 0px; padding-right: 0px; } - -.flag_email{ - width:16px; - float:right; -} - -#wpsc_settingpage_nav_spacer{ - width:35%; - float:right; - height:30px; - border-bottom:1px solid #dfdfdf; -} - -#wpsc_settings_nav_bar { - width:100%; -} - -#wpsc_settings_nav_bar ul { - width: 98%; - border-bottom: 1px solid #DFDFDF; - float: left; - margin: 10px auto 0; - padding-left: 15px; -} -#wpsc_settings_nav_bar ul li a{ - margin-bottom:-1px; -} - -#wpsc_settings_nav_bar ul li a.current { - background-color: #f9f9f9 !important; - border-bottom-color: transparent !important; -} - -h3.form_group { - clear: both; -} -h3.form_group a{ - color: #000; -} -div.product_and_button_settings { - width: 450px; - float: left; - -} - -div#themes_and_appearance { - border: 1px solid #DFDFDF; - width: 360px; - float: left; -} - -div#themes_and_appearance p { - font-size: 11px; -} - -span.display-path { - color:#666666; -} - -div#themes_and_appearance ol { - font-size: 11px; - list-style-type:decimal; - list-style-position:inside; -} - -div#themes_and_appearance ol li { - font-size: 11px; -} diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-coupons.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-coupons.php deleted file mode 100644 index d474fdd..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-coupons.php +++ /dev/null @@ -1,407 +0,0 @@ - $rule ) { - foreach ( $rule as $k => $r ) { - $new_rule[$k][$key] = $r; - } - } - - foreach ( $new_rule as $key => $rule ) { - if ( '' == $rule['value'] ) { - unset( $new_rule[$key] ); - } - } - - if ( $wpdb->query( "INSERT INTO `" . WPSC_TABLE_COUPON_CODES . "` ( `coupon_code` , `value` , `is-percentage` , `use-once` , `is-used` , `active` , `every_product` , `start` , `expiry`, `condition` ) VALUES ( '$coupon_code', '$discount', '$discount_type', '$use_once', '0', '$is_active', '$every_product', '$start_date' , '$end_date' , '" . serialize( $new_rule ) . "' );" ) ) - echo "

" . __( 'Thanks, the coupon has been added.', 'wpsc' ) . "

"; - - } - - if ( isset( $_POST['is_edit_coupon'] ) && ($_POST['is_edit_coupon'] == 'true') && !(isset( $_POST['delete_condition'] )) && !(isset( $_POST['submit_condition'] )) ) { - - foreach ( (array)$_POST['edit_coupon'] as $coupon_id => $coupon_data ) { - - $coupon_id = (int)$coupon_id; - $coupon_data['start'] = $coupon_data['start'] . " 00:00:00"; - $coupon_data['expiry'] = $coupon_data['expiry'] . " 00:00:00"; - $check_values = $wpdb->get_row( "SELECT `id`, `coupon_code`, `value`, `is-percentage`, `use-once`, `active`, `start`, `expiry`,`every_product` FROM `" . WPSC_TABLE_COUPON_CODES . "` WHERE `id` = '$coupon_id'", ARRAY_A ); - - // Sort both arrays to make sure that if they contain the same stuff, - // that they will compare to be the same, may not need to do this, but what the heck - if ( $check_values != null ) - ksort( $check_values ); - - ksort( $coupon_data ); - - if ( $check_values != $coupon_data ) { - - $insert_array = array(); - - foreach ( $coupon_data as $coupon_key => $coupon_value ) { - if ( ($coupon_key == "submit_coupon") || ($coupon_key == "delete_coupon") ) - continue; - - if ( isset( $check_values[$coupon_key] ) && $coupon_value != $check_values[$coupon_key] ) - $insert_array[] = "`$coupon_key` = '$coupon_value'"; - - } - - if ( isset( $check_values['every_product'] ) && $coupon_data['add_every_product'] != $check_values['every_product'] ) - $insert_array[] = "`every_product` = '$coupon_data[add_every_product]'"; - - if ( count( $insert_array ) > 0 ) - $wpdb->query( "UPDATE `" . WPSC_TABLE_COUPON_CODES . "` SET " . implode( ", ", $insert_array ) . " WHERE `id` = '$coupon_id' LIMIT 1;" ); - - unset( $insert_array ); - $rules = $_POST['rules']; - - foreach ( (array)$rules as $key => $rule ) { - foreach ( $rule as $k => $r ) { - $new_rule[$k][$key] = $r; - } - } - - foreach ( (array)$new_rule as $key => $rule ) { - if ( $rule['value'] == '' ) { - unset( $new_rule[$key] ); - } - } - - $conditions = $wpdb->get_var( "SELECT `condition` FROM `" . WPSC_TABLE_COUPON_CODES . "` WHERE `id` = '" . (int)$_POST['coupon_id'] . "' LIMIT 1" ); - $conditions = unserialize( $conditions ); - $new_cond = array(); - - if ( $_POST['rules']['value'][0] != '' ) { - $new_cond['property'] = $_POST['rules']['property'][0]; - $new_cond['logic'] = $_POST['rules']['logic'][0]; - $new_cond['value'] = $_POST['rules']['value'][0]; - $conditions [] = $new_cond; - } - - $sql = "UPDATE `" . WPSC_TABLE_COUPON_CODES . "` SET `condition`='" . serialize( $conditions ) . "' WHERE `id` = '" . (int)$_POST['coupon_id'] . "' LIMIT 1"; - $wpdb->query( $sql ); - } - } - } - - if ( isset( $_POST['delete_condition'] ) ) { - - $conditions = $wpdb->get_var( "SELECT `condition` FROM `" . WPSC_TABLE_COUPON_CODES . "` WHERE `id` = '" . (int)$_POST['coupon_id'] . "' LIMIT 1" ); - $conditions = unserialize( $conditions ); - - unset( $conditions[(int)$_POST['delete_condition']] ); - - $sql = "UPDATE `" . WPSC_TABLE_COUPON_CODES . "` SET `condition`='" . serialize( $conditions ) . "' WHERE `id` = '" . (int)$_POST['coupon_id'] . "' LIMIT 1"; - $wpdb->query( $sql ); - } - - if ( isset( $_POST['submit_condition'] ) ) { - $conditions = $wpdb->get_var( "SELECT `condition` FROM `" . WPSC_TABLE_COUPON_CODES . "` WHERE `id` = '" . (int)$_POST['coupon_id'] . "' LIMIT 1" ); - $conditions = unserialize( $conditions ); - - $new_cond = array(); - $new_cond['property'] = $_POST['rules']['property'][0]; - $new_cond['logic'] = $_POST['rules']['logic'][0]; - $new_cond['value'] = $_POST['rules']['value'][0]; - $conditions[] = $new_cond; - - $sql = "UPDATE `" . WPSC_TABLE_COUPON_CODES . "` SET `condition`='" . serialize( $conditions ) . "' WHERE `id` = '" . (int)$_POST['coupon_id'] . "' LIMIT 1"; - $wpdb->query( $sql ); - } - } ?> - - - -
-

- - - - -

- - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
-

- - - -

-
-

- - - -

-
-

- - - -

-
Conditions
-
-
- - - - - - - - - -
-
-
- - - -
-
-
-
- - __( 'Coupon Code', 'wpsc' ), - 'discount' => __( 'Discount', 'wpsc' ), - 'start' => __( 'Start', 'wpsc' ), - 'expiry' => __( 'Expiry', 'wpsc' ), - 'active' => __( 'Active', 'wpsc' ), - 'apply_on_prods' => __( 'Apply On All Products', 'wpsc' ), - 'edit' => __( 'Edit', 'wpsc' ) - ); - register_column_headers( 'display-coupon-details', $columns ); - ?> - - - - - - - - - - - - - - - - get_results( "SELECT * FROM `" . WPSC_TABLE_COUPON_CODES . "` ", ARRAY_A ); - - foreach ( (array)$coupon_data as $coupon ) { - $alternate = ""; - $i++; - if ( ($i % 2) != 0 ) { - $alternate = "class='alt'"; - } - echo "\n\r"; - - echo " \n\r"; - - echo " \n\r"; - - echo " \n\r"; - - echo " \n\r"; - - echo " \n\r"; - - echo " \n\r"; - echo " \n\r"; - echo " \n\r"; - echo " \n\r"; - echo " \n\r"; - echo " \n\r"; - } - ?> - -
\n\r"; - esc_attr_e( $coupon['coupon_code'] ); - echo " \n\r"; - if ( $coupon['is-percentage'] == 1 ) - echo esc_attr( $coupon['value'] ) . "%"; - - else if ( $coupon['is-percentage'] == 2 ) - echo __("Free Shipping", 'wpsc'); - - else - echo wpsc_currency_display( esc_attr( $coupon['value'] ) ); - - echo " \n\r"; - echo date( "d/m/Y", strtotime( esc_attr( $coupon['start'] ) ) ); - echo " \n\r"; - echo date( "d/m/Y", strtotime( esc_attr( $coupon['expiry'] ) ) ); - echo " \n\r"; - switch ( $coupon['active'] ) { - case 1: - echo ""; - break; - - case 0: default: - echo ""; - break; - } - echo " \n\r"; - switch ( $coupon['every_product'] ) { - case 1: - echo ""; - break; - - case 0: default: - echo ""; - break; - } - - echo " \n\r"; - echo "" . __( 'Edit', 'wpsc' ) . ""; - echo "
\n\r"; - echo "
\n\r"; - coupon_edit_form( $coupon ); - echo "
\n\r"; - echo "
- -

- Note: Due to a current PayPal limitation, when a purchase is made using a coupon we cannot send a detailed list of items through for processing. Instead we send the total amount of the purchase so the customer will see your shop name and the total within PayPal.', 'wpsc' ); ?> -

- -
- - \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-debug.page.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-debug.page.php deleted file mode 100644 index 20ca2ef..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-debug.page.php +++ /dev/null @@ -1,348 +0,0 @@ - -
-

Debugging Page

- -

- This is debugging and unsafe updating code to debug or fix specific problems on some sites that is either not safe to run automatically or not usually needed
- It is unwise to use anything on this page unless you know exactly what it will do and why you need to run it. -

-

Action List

- - -

Development Code List

-

And this code is probably useless for anything other than working out how to write better code to do the same thing, unless you want to do that, leave it alone

- - -
";
-			phpinfo();
-			echo "
";
-			break;
-
-		case 'wp-cron':
-			$cron = get_option( 'cron' );
-			print_r( $cron );
-			break;
-
-		case 'wp_get_object_terms':
-			global $wp_taxonomies;
-			$tags = wp_get_object_terms( 108, 'product_tag', array( 'fields' => 'names' ) );
-			print_r( $tags );
-			break;
-
-		case 'unicode_permalinks':
-			$original_string = "バンプ・オブ・チキン";
-			$sanitized_string = sanitize_title( $original_string );
-			$string_regex = str_replace( "%", "\x", $sanitized_string );
-			$full_regex = "/^({$string_regex}){1}$/";
-
-			echo "Original String: {$original_string} \n";
-			echo "Sanitized String: {$sanitized_string} \n";
-			echo "String regex: {$string_regex} \n";
-			echo "Full regex: {$full_regex} \n";
-
-			if ( preg_match( $full_regex, $original_string ) ) {
-				echo "Matches";
-			} else {
-				echo "Does Not Match";
-			}
-
-			break;
-	}
-	?>
-
- "; - echo "new_file:" . WPSC_THEMES_PATH . $file . "
"; - echo "
" . print_r( $success, true ) . "
"; - } - } - } -} - -function wpsc_group_and_update_download_links() { - if ( !current_user_can('manage_options') ) - wp_die("You don't look like an administrator."); - global $wpdb; - $unique_file_names = $wpdb->get_col( "SELECT DISTINCT `filename` FROM `" . WPSC_TABLE_PRODUCT_FILES . "`" ); - foreach ( (array)$unique_file_names as $filename ) { - echo "$filename \n"; - $file_id_list = array( ); - $file_data = $wpdb->get_results( "SELECT * FROM `" . WPSC_TABLE_PRODUCT_FILES . "` WHERE `filename` IN ('$filename')", ARRAY_A ); - foreach ( $file_data as $file_row ) { - $file_id_list[] = $file_row['id']; - } - $product_data = $wpdb->get_row( "SELECT * FROM `" . WPSC_TABLE_PRODUCT_LIST . "` WHERE `file` IN ('" . implode( "', '", $file_id_list ) . "') AND `active` IN('1') ORDER BY `id` DESC LIMIT 1 ", ARRAY_A ); - $product_id = $product_data['id']; - if ( $product_id > 0 ) { - if ( $wpdb->query( "UPDATE `" . WPSC_TABLE_PRODUCT_FILES . "` SET `product_id` = '{$product_id}' WHERE `id` IN ('" . implode( "', '", $file_id_list ) . "')" ) ) { - if ( $wpdb->query( "UPDATE `" . WPSC_TABLE_DOWNLOAD_STATUS . "` SET `product_id` = '{$product_id}' WHERE `fileid` IN ('" . implode( "', '", $file_id_list ) . "')" ) ) { - echo "$filename done \n"; - } - } - } - } -} - -/** - * wpsc_clean_product_url_names, cleans dupicates - */ -function wpsc_clean_product_url_names() { - if ( !current_user_can('manage_options') ) - wp_die("You don't look like an administrator."); - global $wpdb; - - $duplicated_meta_data = $wpdb->get_col( "SELECT `meta_value` FROM `" . WPSC_TABLE_PRODUCTMETA . "` WHERE `meta_key` IN('url_name') GROUP BY `meta_value` HAVING COUNT(`meta_value`) > 1 " ); - - $product_data = $wpdb->get_results( "SELECT DISTINCT `products`.* FROM `" . WPSC_TABLE_PRODUCTMETA . "` AS `meta` LEFT JOIN `" . WPSC_TABLE_PRODUCT_LIST . "` AS `products` ON `meta`.`product_id` = `products`.`id` WHERE `meta`.`meta_key` IN('url_name') AND `meta`.`meta_value` IN('" . implode( "', '", $duplicated_meta_data ) . "') AND `products`.`active` = '1' ORDER BY `meta`.`meta_value` DESC", ARRAY_A ); - - foreach ( (array)$product_data as $product_row ) { - if ( $product_row['name'] != '' ) { - $tidied_name = strtolower( trim( stripslashes( $product_row['name'] ) ) ); - $url_name = sanitize_title( $tidied_name ); - $similar_names = $wpdb->get_row( "SELECT COUNT(*) AS `count`, MAX(REPLACE(`meta_value`, '$url_name', '')) AS `max_number` FROM `" . WPSC_TABLE_PRODUCTMETA . "` WHERE `meta_key` IN ('url_name') AND `meta_value` REGEXP '^($url_name){1}[[:digit:]]*$' ", ARRAY_A ); - $extension_number = ''; - if ( $similar_names['count'] > 0 ) { - $extension_number = (int)$similar_names['max_number'] + 1; - } - $url_name .= $extension_number; - echo "{$product_row['name']} => {$url_name}\n\r"; - update_product_meta( $product_row['id'], 'url_name', $url_name ); - } - } -} - -/** - * wpsc_redo_product_url_names, deletes all product URL names, then remakes then - */ -function wpsc_redo_product_url_names() { - if ( !current_user_can('manage_options') ) - wp_die("You don't look like an administrator."); - global $wpdb; - - $product_data = $wpdb->get_results( "SELECT DISTINCT `products`.* FROM `" . WPSC_TABLE_PRODUCTMETA . "` AS `meta` LEFT JOIN `" . WPSC_TABLE_PRODUCT_LIST . "` AS `products` ON `meta`.`product_id` = `products`.`id` WHERE `products`.`active` = '1' ORDER BY `meta`.`meta_value` DESC", ARRAY_A ); - - foreach ( (array)$product_data as $product_row ) { - $product_id = $product_row['id']; - $post_data = $product_row; - - - if ( $post_data['name'] != '' ) { - $existing_name = get_product_meta( $product_id, 'url_name' ); - $tidied_name = strtolower( trim( stripslashes( $post_data['name'] ) ) ); - $url_name = sanitize_title( $tidied_name ); - - $similar_names = (array)$wpdb->get_col( "SELECT `meta_value` FROM `" . WPSC_TABLE_PRODUCTMETA . "` WHERE `product_id` NOT IN('{$product_id}}') AND `meta_key` IN ('url_name') AND `meta_value` REGEXP '^(" . $wpdb->escape( preg_quote( $url_name ) ) . "){1}[[:digit:]]*$' " ); - - echo "Product {$product_id}: {$product_row['name']}\n"; - echo "Current Name: {$existing_name}\n"; - echo "Originally Proposed Name: {$url_name}\n"; - - if ( array_search( $url_name, $similar_names ) !== false ) { - $i = 0; - do { - $i++; - echo "Proposed Name #$i: " . ($url_name . $i) . "\n"; - } while ( array_search( ($url_name . $i ), $similar_names ) !== false ); - $url_name .= $i; - } - echo "Accepted Name: {$url_name}\n"; - - - if ( $existing_name != $url_name ) { - update_product_meta( $product_id, 'url_name', $url_name ); - } - - echo "\n"; - } - } -} - -function wpsc_recreate_product_url_names() { - if ( !current_user_can('manage_options') ) - wp_die("You don't look like an administrator."); - global $wpdb; - - $product_data = $wpdb->get_results( "SELECT `id`, `name` FROM `" . WPSC_TABLE_PRODUCT_LIST . "` WHERE `active` IN ('1')", ARRAY_A ); - echo "
";
-	foreach ( $product_data as $product_row ) {
-		$product_id = $product_row['id'];
-		$tidied_name = trim( $product_row['name'] );
-		$tidied_name = strtolower( $tidied_name );
-		$url_name = sanitize_title( $tidied_name );
-
-		echo "Product {$product_id}: {$product_row['name']}\n";
-
-		echo "Originally Proposed Name: {$url_name}\n";
-		$similar_names = (array)$wpdb->get_col( "SELECT `meta_value` FROM `" . WPSC_TABLE_PRODUCTMETA . "` WHERE `product_id` NOT IN('{$product_id}}') AND `meta_key` IN ('url_name') AND `meta_value` REGEXP '^(" . $wpdb->escape( preg_quote( $url_name ) ) . "){1}[[:digit:]]*$' " );
-
-		if ( array_search( $url_name, $similar_names ) !== false ) {
-			// If it is, try to add a number to the end, if that is taken, try the next highest number...
-			$i = 0;
-			do {
-				$i++;
-				if ( $i > 100 ) {
-					break;
-				}
-				echo "Proposed Name #$i: " . ($url_name . $i) . "\n";
-			} while ( array_search( ($url_name . $i ), $similar_names ) !== false );
-			// Concatenate the first number found that wasn't taken
-			$url_name .= $i;
-		}
-
-		echo "Accepted Name: {$url_name}\n";
-		$existing_name = get_product_meta( $product_id, 'url_name', true );
-		if ( is_array( $existing_name ) ) {
-			$existing_name = array_pop( $existing_name );
-		}
-		if ( $existing_name != $url_name ) {
-			update_product_meta( $product_id, 'url_name', $url_name );
-		}
-
-		echo "\n\n\n";
-	}
-}
-
-function wpsc_mass_resize_thumbnails_and_clean_images() {
-	if ( !current_user_can('manage_options') )
-		wp_die("You don't look like an administrator.");
-	global $wpdb;
-
-	$height = get_option( 'product_image_height' );
-	$width = get_option( 'product_image_width' );
-
-	$product_data = $wpdb->get_results( "SELECT `product`.`id`, `product`.`image` AS `image_id`, `images`.`image` AS `file`  FROM `" . WPSC_TABLE_PRODUCT_LIST . "` AS `product` INNER JOIN  `" . WPSC_TABLE_PRODUCT_IMAGES . "` AS `images` ON `product`.`image` = `images`.`id` WHERE `product`.`image` > 0 ", ARRAY_A );
-	foreach ( (array)$product_data as $product ) {
-		$image_input = WPSC_IMAGE_DIR . $product['file'];
-		$image_output = WPSC_THUMBNAIL_DIR . $product['file'];
-		if ( ($product['file'] != '') and file_exists( $image_input ) ) {
-			image_processing( $image_input, $image_output, $width, $height );
-			update_product_meta( $product['id'], 'thumbnail_width', $width );
-			update_product_meta( $product['id'], 'thumbnail_height', $height );
-		} else {
-			$wpdb->query( "DELETE FROM `" . WPSC_TABLE_PRODUCT_IMAGES . "` WHERE `id` IN('{$product['image_id']}') LIMIT 1" );
-			$wpdb->query( "UPDATE `" . WPSC_TABLE_PRODUCT_LIST . "` SET `image` = NULL WHERE `id` = '" . $product['id'] . "' LIMIT 1" );
-		}
-	}
-	$wpdb->query( "DELETE FROM `" . WPSC_TABLE_PRODUCT_IMAGES . "` WHERE `product_id` IN('0')" );
-}
-
-?>
diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-items.page.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-items.page.php
deleted file mode 100644
index 2ce45a1..0000000
--- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-items.page.php
+++ /dev/null
@@ -1,377 +0,0 @@
-';
-    $columns['image'] = '';
-    $columns['title'] = __('Name', 'wpsc');
-    $columns['weight'] = __('Weight', 'wpsc');
-    $columns['stock'] = __('Stock', 'wpsc');
-    $columns['price'] = __('Price', 'wpsc');
-    $columns['sale_price'] = __('Sale Price', 'wpsc');
-    $columns['SKU'] = __('SKU', 'wpsc');
-    $columns['cats'] = __('Categories', 'wpsc');
-    $columns['featured'] = __('Featured', 'wpsc');
-    $columns['hidden_alerts'] = '';
-    $columns['date'] = __('Date', 'wpsc');
-
-    return $columns;
-}
-function wpsc_additional_sortable_column_names( $columns ){
-
-    $columns['stock'] = __('Stock', 'wpsc');
-    $columns['price'] = __('Price', 'wpsc');
-    $columns['sale_price'] = __('Sale Price', 'wpsc');
-    $columns['SKU'] = __('SKU', 'wpsc');
-
-    return $columns;
-}
-function wpsc_additional_column_name_variations( $columns ){
-    global $post;
-
-    if(isset($post) && $post->post_parent != '0' )
-       remove_meta_box( 'wpsc_product_variation_forms', 'wpsc-product', 'normal' );
-
-    $columns['image'] = '';
-    $columns['title'] = __('Name', 'wpsc');
-    $columns['weight'] = __('Weight', 'wpsc');
-    $columns['stock'] = __('Stock', 'wpsc');
-    $columns['price'] = __('Price', 'wpsc');
-    $columns['sale_price'] = __('Sale Price', 'wpsc');
-    $columns['SKU'] = __('SKU', 'wpsc');
-    $columns['hidden_alerts'] = '';
-
-    //For BC for 3.0 (hoping to remove for WPEC 3.9)
-    register_column_headers( 'wpsc-product_variants', $columns );
-
-    return apply_filters( 'wpsc_variation_column_headers', $columns);
-}
-
-/**
- * wpsc_additional_column_data.
- *
- * @access public
- * @param (array) $column
- * @return void
- * @todo Need to check titles / alt tags ( I don't think thumbnails have any in this code )
- * @desc Switch function to generate columns the right way...no more UI hacking!
- * 
- */
-function wpsc_additional_column_data( $column ) {
-    global $post;
-
-    $is_parent = ( bool )wpsc_product_has_children($post->ID);
-        switch ( $column ) :
-
-            case 'image' :
-
-                  $attached_images = get_posts( array(
-                      'post_type' => 'attachment',
-                      'numberposts' => 1,
-                      'post_parent' => $post->ID,
-                      'orderby' => 'menu_order',
-                      'order' => 'ASC'
-		    ) );
-
-                if( isset( $post->ID ) && has_post_thumbnail( $post->ID ) )
-                    echo get_the_post_thumbnail( $post->ID, 'admin-product-thumbnails' );
-                else if( !empty( $attached_images  ) ) {
-                    $attached_image = $attached_images[0];
-                    $src = wp_get_attachment_url( $attached_image->ID );
-                 ?>
-                    
- <?php _e( ' width='38' height='38' /> -
- - <?php _e( ' width='38' height='38' /> - ID, '' ); - foreach( $product_data['meta'] as $meta_name => $meta_value ) - $product_data['meta'][$meta_name] = maybe_unserialize( array_pop( $meta_value ) ); - - $product_data['transformed'] = array(); - if( !isset( $product_data['meta']['_wpsc_product_metadata']['weight'] ) ) - $product_data['meta']['_wpsc_product_metadata']['weight'] = ""; - if( !isset( $product_data['meta']['_wpsc_product_metadata']['weight_unit'] ) ) - $product_data['meta']['_wpsc_product_metadata']['weight_unit'] = ""; - - $product_data['transformed']['weight'] = wpsc_convert_weight( $product_data['meta']['_wpsc_product_metadata']['weight'], "pound", $product_data['meta']['_wpsc_product_metadata']['weight_unit'] ); - - $weight = $product_data['transformed']['weight']; - if( $weight == '' ) - $weight = '0'; - - $unit = $product_data['meta']['_wpsc_product_metadata']['weight_unit']; - - switch( $unit ) { - case "pound": - $unit = __(" lbs.", "wpsc"); - break; - case "ounce": - $unit = __(" oz.", "wpsc"); - break; - case "gram": - $unit = __(" g", "wpsc"); - break; - case "kilograms": - case "kilogram": - $unit = __(" kgs.", "wpsc"); - break; - } - echo $weight.$unit; - echo ''; - - endif; - break; - case 'stock' : - $stock = get_post_meta( $post->ID, '_wpsc_stock', true ); - if( $stock == '' ) - $stock = __('N/A', 'wpsc'); - if( !$is_parent ) { - echo $stock; - echo ''; - } - else - echo '~'.wpsc_variations_stock_remaining( $post->ID ); - break; - case 'price' : - $price = get_post_meta( $post->ID, '_wpsc_price', true ); - $has_var = '1'; - if( !$is_parent ) { - echo wpsc_currency_display( $price ); - echo ''; - $has_var = '0'; - } - else - echo wpsc_product_variation_price_available( $post->ID ).'+'; - echo ''; - - break; - case 'sale_price' : - $price = get_post_meta( $post->ID, '_wpsc_special_price', true ); - if( !$is_parent ) { - echo wpsc_currency_display( $price ); - echo ''; - } else - echo wpsc_product_variation_price_available( $post->ID ).'+'; - break; - case 'SKU' : - $sku = get_post_meta( $post->ID, '_wpsc_sku', true ); - if( $sku == '' ) - $sku = __('N/A', 'wpsc'); - - echo $sku; - echo ''; - break; - case 'cats' : - $categories = get_the_product_category( $post->ID ); - if ( !empty( $categories ) ) { - $out = array(); - foreach ( $categories as $c ) - $out[] = " " . esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'category', 'display' ) ) . ""; - echo join( ', ', $out ); - } else { - _e('Uncategorized', 'wpsc'); - } - break; - case 'featured' : - $featured_product_url = wp_nonce_url( "index.php?wpsc_admin_action=update_featured_product&product_id=$post->ID", 'feature_product_' . $post->ID); -?> - - ID, (array)get_option( 'sticky_products' ) ) ) : ?> - <?php _e( ' title='' /> - - <?php _e( ' title='' /> - - - - <?php echo $product_alert[' title='' class='product-alert-image' src='/product-alert.jpg' alt='' /> - query = wp_parse_args( $wp_query->query ); - - if( isset( $wp_query->query['orderby'] ) ) : - switch ( $wp_query->query['orderby'] ) : - case 'stock' : - $orderby = "(SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $wpdb->posts.ID AND meta_key = '_wpsc_stock') " . $wp_query->get('order'); - break; - case 'price' : - $orderby = "(SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $wpdb->posts.ID AND meta_key = '_wpsc_price') " . $wp_query->get('order'); - break; - case 'sale_price' : - $orderby = "(SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $wpdb->posts.ID AND meta_key = '_wpsc_special_price') " . $wp_query->get('order'); - break; - case 'SKU' : - $orderby = "(SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $wpdb->posts.ID AND meta_key = '_wpsc_sku') " . $wp_query->get('order'); - break; - endswitch; - endif; - - return $orderby; -} -function wpsc_cats_restrict_manage_posts() { - global $typenow; - - if ( $typenow == 'wpsc-product' ) { - - $filters = array( 'wpsc_product_category' ); - - foreach ( $filters as $tax_slug ) { - // retrieve the taxonomy object - $tax_obj = get_taxonomy( $tax_slug ); - $tax_name = $tax_obj->labels->name; - // retrieve array of term objects per taxonomy - // output html for taxonomy dropdown filter - echo ""; - } - } -} - -function wpsc_cats_restrict_manage_posts_print_terms($taxonomy, $parent = 0, $level = 0){ - $prefix = str_repeat( '   ' , $level ); - $terms = get_terms( $taxonomy, array( 'parent' => $parent ) ); - if( !($terms instanceof WP_Error) && !empty($terms) ) - foreach ( $terms as $term ){ - echo ''; - wpsc_cats_restrict_manage_posts_print_terms($taxonomy, $term->term_id, $level+1); - } -} - -/** - * wpsc no minors allowed - * Restrict the products page to showing only parent products and not variations. - * @since 3.8 - */ -function wpsc_no_minors_allowed( $vars ) { - global $current_screen; - - if( $current_screen->post_type != 'wpsc-product' ) - return $vars; - - $vars['post_parent'] = 0; - - return $vars; -} - -add_filter( 'request', 'wpsc_no_minors_allowed' ); -add_action( 'admin_head', 'wpsc_additional_column_name_variations' ); -add_action( 'restrict_manage_posts', 'wpsc_cats_restrict_manage_posts' ); -add_action( 'manage_pages_custom_column', 'wpsc_additional_column_data', 10, 2 ); -add_filter( 'manage_edit-wpsc-product_sortable_columns', 'wpsc_additional_sortable_column_names' ); -add_filter( 'manage_edit-wpsc-product_columns', 'wpsc_additional_column_names' ); -add_filter( 'manage_wpsc-product_posts_columns', 'wpsc_additional_column_names' ); -add_filter( 'posts_orderby', 'wpsc_column_sql_orderby', 10, 2 ); - - -/** - * wpsc_update_featured_products function. - * - * @access public - * @todo Should be refactored to e - * @return void - */ -function wpsc_update_featured_products() { - $is_ajax = (int)(bool)$_POST['ajax']; - $product_id = absint( $_GET['product_id'] ); - check_admin_referer( 'feature_product_' . $product_id ); - $status = get_option( 'sticky_products' ); - - $new_status = (in_array( $product_id, $status )) ? false : true; - - if ( $new_status ) { - - $status[] = $product_id; - } else { - $status = array_diff( $status, array( $product_id ) ); - $status = array_values( $status ); - } - update_option( 'sticky_products', $status ); - - if ( $is_ajax == true ) { - if ( $new_status == true ) : ?> - jQuery('.featured_toggle_').html("<?php _e( ' title='' />"); - - jQuery('.featured_toggle_').html("<?php _e( ' title='' />"); -post_type != "wpsc-product" ) - return $actions; - - $url = admin_url( 'edit.php' ); - $url = add_query_arg( array( 'wpsc_admin_action' => 'duplicate_product', 'product' => $post->ID ), $url ); - - $actions['duplicate'] = ''._x( 'Duplicate', 'row-actions', 'wpsc' ).''; - - return $actions; -} - -if ( isset( $_REQUEST['wpsc_admin_action'] ) && ( $_REQUEST['wpsc_admin_action'] == 'update_featured_product' ) ) - add_action( 'admin_init', 'wpsc_update_featured_products' ); - -if ( isset( $_GET['wpsc_admin_action'] ) && ( $_GET['wpsc_admin_action'] == 'duplicate_product' ) ) - add_action( 'admin_init', 'wpsc_duplicate_product' ); \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-options-settings.page.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-options-settings.page.php deleted file mode 100644 index 3f42525..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-options-settings.page.php +++ /dev/null @@ -1,312 +0,0 @@ - - -
-

-

- - -
- - - -
-
- - _x( 'General', 'General settings tab in Settings->Store page', 'wpsc' ), - 'presentation' => _x( 'Presentation', 'Presentation settings tab in Settings->Store page', 'wpsc' ), - 'admin' => _x( 'Admin', 'Admin settings tab in Settings->Store page', 'wpsc' ), - 'taxes' => _x( 'Taxes', 'Taxes settings tab in Settings->Store page', 'wpsc' ), - 'shipping' => _x( 'Shipping', 'Shipping settings tab in Settings->Store page', 'wpsc' ), - 'gateway' => _x( 'Payments', 'Payments settings tab in Settings->Store page', 'wpsc' ), - 'checkout' => _x( 'Checkout', 'Checkout settings tab in Settings->Store page', 'wpsc' ), - 'marketing' => _x( 'Marketing', 'Marketing settings tab in Settings->Store page', 'wpsc' ), - 'import' => _x( 'Import', 'Import settings tab in Settings->Store page', 'wpsc' ) - ); - - return apply_filters( 'wpsc_settings_tabs', $_default_tabs ); -} - -/* - * Display settings tabs - */ - -function wpsc_the_settings_tabs() { - global $redir_tab; - - $tabs = wpsc_settings_tabs(); - - if ( !empty( $tabs ) ) { - echo '
'; - echo "
    \n"; - - if ( isset( $redir_tab ) && array_key_exists( $redir_tab, $tabs ) ) { - $current = $redir_tab; - } elseif ( isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ) { - $current = $_GET['tab']; - } else { - $keys = array_keys( $tabs ); - $current = array_shift( $keys ); - } - - foreach ( $tabs as $callback => $text ) { - $class = ''; - - if ( $current == $callback ) - $class = " class='current'"; - - $href = add_query_arg( array( 'tab' => $callback, 's' => false, 'paged' => false, 'post_mime_type' => false, 'm' => false ) ); - $href = remove_query_arg( 'isocode', $href ); - $href = wp_nonce_url( $href, "tab-$callback" ); - $link = "$text"; - - echo "\t
  • $link
  • \n"; - } - - echo "
\n"; - echo '
'; - echo "
"; - } -} - -function country_list( $selected_country = null ) { - global $wpdb; - - $output = ''; - $output .= ""; - $country_data = $wpdb->get_results( "SELECT * FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY `country` ASC", ARRAY_A ); - - foreach ( (array)$country_data as $country ) { - $selected = ''; - - if ( $selected_country == $country['isocode'] ) - $selected = "selected='selected'"; - - $output .= ""; - } - - return $output; -} - -/* - * Get Shipping Form for wp-admin - */ -function wpsc_get_shipping_form( $shippingname ) { - global $wpsc_shipping_modules; - - if ( array_key_exists( $shippingname, $wpsc_shipping_modules ) ) { - $shipping_forms = $wpsc_shipping_modules[$shippingname]->getForm(); - $shipping_module_name = $wpsc_shipping_modules[$shippingname]->name; - $output = array( 'name' => $shipping_module_name, 'form_fields' => $shipping_forms, 'has_submit_button' => 1 ); - } else { - $output = array( 'name' => ' ', 'form_fields' => __( 'To configure a shipping module select one on the left.', 'wpsc' ), 'has_submit_button' => 0 ); - } - - return $output; -} - -/*** - * Get Payment Form for wp-admin - */ -function wpsc_get_payment_form( $paymentname ,$selected_gateway_data='') { - global $nzshpcrt_gateways; - - $payment_gateway_names = get_option('payment_gateway_names'); - $form = array(); - $output = array( 'name' => ' ', 'form_fields' => __( 'To configure a payment module select one on the left.', 'wpsc' ), 'has_submit_button' => 0 ); - - foreach ( $nzshpcrt_gateways as $gateway ) { - if ( $gateway["internalname"] != $paymentname ) { - continue; - } else { - $selected_gateway_data = $gateway; - $form = $gateway; - } - } - - if ( $form ) { - $output =''; - $output .=" - - ".__("Display Name", 'wpsc')." - - "; - - if (isset($payment_gateway_names[$paymentname]) ) { - $display_name = $payment_gateway_names[$paymentname]; - } elseif(!empty($selected_gateway_data['display_name'])){ - $display_name =$selected_gateway_data['display_name']; - }else{ - switch($selected_gateway_data['payment_type']) { - case "paypal"; - $display_name = "PayPal"; - break; - - case "manual_payment": - $display_name = "Manual Payment"; - break; - - case "google_checkout": - $display_name = "Google Checkout"; - break; - - case "credit_card": - default: - $display_name = "Credit Card"; - break; - } - } - - $output .="
- ".__('The text that people see when making a purchase', 'wpsc')." - - "; - $payment_forms = $form["form"](); - $payment_module_name = $form["name"]; - - $output = array( 'name' => $payment_module_name, 'form_fields' => $output.$payment_forms, 'has_submit_button' => 1 ); - } else { - $output = array( 'name' => ' ', 'form_fields' => __( 'To configure a payment module select one on the left.', 'wpsc' ), 'has_submit_button' => 0 ); - } - - return $output; -} - -function wpsc_settings_page_update_notification() { - - if ( isset( $_GET['skipped'] ) || isset( $_GET['updated'] ) || isset( $_GET['regenerate'] ) || isset( $_GET['deleted'] ) || isset( $_GET['shipadd'] ) ) { ?> - -

- -

- - \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-sales-logs.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-sales-logs.php deleted file mode 100644 index a33c968..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-sales-logs.php +++ /dev/null @@ -1,613 +0,0 @@ - -
-

-

Click here to return.'), remove_query_arg( 'subpage' ) ); ?>

-
- get_var( "SELECT COUNT(*) FROM " . WPSC_TABLE_PURCHASE_LOGS . " WHERE plugin_version IN ('3.6', '3.7')" ); - if ( $c > 0 ) - return true; - - update_option( '_wpsc_purchlogs_3.8_updated', true ); - return false; -} - - function wpsc_display_sales_log_index() { - - global $purchlogitem; - - ?> -
-

- - '', - 'purchid' => __( 'Order ID', 'wpsc' ), - 'date' => __( 'Date / Time', 'wpsc' ), - 'name' => '', - 'amount' => __( 'Amount', 'wpsc' ), - 'details' => __( 'Details', 'wpsc' ), - 'status' => __( 'Status', 'wpsc' ), - 'delete' => __( 'Delete', 'wpsc' ), - 'track' => __( 'Tracking ID', 'wpsc' ) - ); - register_column_headers('display-sales-list', $columns); - ///// start of update message section ////// - - $fixpage = get_option('siteurl').'/wp-admin/admin.php?page=wpsc-sales-logs&subpage=upgrade-purchase-logs'; - if (isset($_GET['skipped']) || isset($_GET['updated']) || isset($_GET['deleted']) || isset($_GET['locked']) ) { ?> -

- -

- -
Click Here', 'wpsc'), $fixpage); ?>
- -
click here to fix this problem.', 'wpsc'), WPSC_VERSION, add_query_arg( 'subpage', 'update-purchase-logs-3.8' ) ); ?>
- -
- -
-
- - -

-
- - -
- -
- -

-

- - - - __('Name','wpsc'), - 'sku' => __('SKU','wpsc'), - 'quantity' => __('Quantity','wpsc'), - 'price' => __('Price','wpsc'), - 'shipping' => __('Shipping','wpsc'), - 'tax' => '', - 'total' => __('Total','wpsc') - ); - - if(wpec_display_product_tax()) - { - $columns['tax'] = __('Tax Included','wpsc'); - }// if - - register_column_headers('display-purchaselog-details', $columns); - ?> -
- -
-

-

-

-
-
-
-
-

- -

- -
-
- -
-
- - -

-
- -
- -

-

-

-

-

- -

-

-

- -

- - -
- -
-
-

- - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - : - -
-
-
-

-
-
-
- - - - - - - - - -
-
- - -
-
- -
- -
-
- - - - - - - - - - -
- -

- - - - - - - - - - - - - - - -
-

-current_start_timestamp) && !isset($purchlogs->current_end_timestamp)){ - $purchlogs->current_start_timestamp = $purchlogs->earliest_timestamp; - $purchlogs->current_end_timestamp = $purchlogs->current_timestamp; - } - $arr_params = array('wpsc_admin_action' => 'wpsc_downloadcsv', - 'rss_key' => 'key', - 'start_timestamp' => $purchlogs->current_start_timestamp, - 'end_timestamp' => $purchlogs->current_end_timestamp); - - $piggy_url = 'http://www.bravenewcode.com/store/plugins/piggy/?utm_source=affiliate-6331&utm_medium=affiliates&utm_campaign=wpec#1'; - ?> -
-

' > - '>

-
-
- - - - - - - - - - '> - - - - - - - - - ' href='' onclick="if ( confirm(' ') ) { return true;}return false;">delete icon - - - - - - - - - - - - - - - - - - - - -
- - ' name='purchlogs_searchbox' id='purchlogs_searchbox' /> - -
- - - - - - - - - - - - -
-
-

-
- - - 0){ ?> -

:

- - 0){ ?> -

:

- -
-
-
- -
-
-

-
-
- - - ' /> -

-

-
-
-
-
- customcheckoutfields)){ - ?> -
-
-

-
- customcheckoutfields as $key=>$value){ - $value['value'] = maybe_unserialize($value['value']); - if(is_array($value['value'])){ - ?> -

:

- -

:

- -
-
-
- extrainfo->wpec_taxes_total == 0.00) ? true : false; -}// wpec_display_product_tax - -function wpsc_upgrade_purchase_logs() { - include(WPSC_FILE_PATH.'/wpsc-admin/includes/purchlogs_upgrade.php'); -} -?> diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-update.page.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-update.page.php deleted file mode 100644 index 0c2e1b3..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-update.page.php +++ /dev/null @@ -1,119 +0,0 @@ -get_var( "SHOW TABLES LIKE '" . WPSC_TABLE_PRODUCT_LIST . "'" ); - $product_count = empty( $table_exists ) ? 0 : $wpdb->get_var( "SELECT COUNT(*) FROM " . WPSC_TABLE_PRODUCT_LIST ); - - if ( $product_count > 0 ) { - - function wpsc_display_update_notice() { - echo "

" . __( 'WP e-Commerce is almost ready.', 'wpsc' ) . " " . sprintf( __( 'You must update your database to import all of your products.', 'wpsc' ), "admin.php?page=wpsc-update") . "

"; - } - - if ( ! isset( $_GET['page'] ) || $_GET['page'] != 'wpsc-update' ) - add_action( 'admin_notices', 'wpsc_display_update_notice' ); - - // There weren't any products, so mark the update as complete - } else { - update_option( 'wpsc_version', WPSC_VERSION ); - } -} - -if ( version_compare( PHP_VERSION, '5.0.0', '<' ) ) { - add_action( 'admin_notices', 'wpsc_display_php_version_notice' ); -} - -function wpsc_display_php_version_notice() { -?> -

- - -
-

-
- __( 'Updating Categories...' , 'wpsc' ), - 'convert_variation_sets' => __( 'Updating Variations...' , 'wpsc' ), - 'convert_products_to_posts' => __( 'Updating Products ...' , 'wpsc' ), - 'convert_variation_combinations' => __( 'Updating Child Products...', 'wpsc' ), - 'update_files' => __( 'Updating Product Files...' , 'wpsc' ), - 'update_purchase_logs' => __( 'Updating Purchase Logs... ', 'wpsc' ), - 'create_or_update_tables' => __( 'Updating Database...' , 'wpsc' ), - 'update_database' => '', - ); - - foreach ( $update_stages as $function => $message ) { - $wpsc_update->run( $function, $message ); - } - - echo '

' . __('WP e-Commerce updated successfully!', 'wpsc') . '
'; - if( '' != get_option('permalink_structure')){ ?> - here','wpsc' ) , admin_url('options-permalink.php') ); ?> - clean_up(); - ob_implicit_flush( false ); - else: - - - _e('Your WP e-Commerce database needs to be updated for WP e-Commerce 3.8. To perform this update, press the button below. It is highly recommended that you back up your database before performing this update.','wpsc'); -?>
-
- -
- -
- -

-
- -
- - diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-upgrades.page.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-upgrades.page.php deleted file mode 100644 index 0cb655a..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/display-upgrades.page.php +++ /dev/null @@ -1,170 +0,0 @@ - - -
-
-
- - -
-
-
- -

Add product search, multiple image upload, gallery view, Grid View and multiple payment gateway options to your shop

- $40 -
- -
-
- -

Impress your customers with our AJAX powered DropShop that lets your customers drag and drop products into their shopping cart

- $100 -
- -
-
- -

Create product memberships and sell them in your store. Use these memberships to restrict premium content on your posts and pages creating a "members only" area perfect for: Forums, Images and Movies and Podcasts

- $49 -
- -
-
- -

Display your products in a new and fancy way using the "Product Slider" module.

- $45 -
- -
-
- -

Make your Online photo gallery into an e-Commerce solution.

- $10 -
- -
-
- -

JPlayer is a Plugin that provides a Javascript powered MP3 player to each product. This is very similar to our alternative MP3 Player except that it uses CSS and Javascript to customize the look and feel of the player making it much easier for you to style it also comes with a range of skins.

- $40 -
-
-
- -

This plugin offers shop owners the ability to provide Fedex Shipping Quotes for products with weights..

- $40 -
-
-
- -

Your WP E-Commerce sales, in your pocket. Piggy is a web-app that provides mobile access to view sales data for your WP E-Commerce powered WordPress website. Works on iOS and Android.

- $39 -
- -
- -

-
-

-

- -
-
- - - -
-
-

- -

-
- -

-
-

-

-

-
-
- -
-

-

- - ' name='activation_name' id='activation_name' /> -

-

- - ' name='activation_key' id='activation_key' /> -

-

- - ' name='submit_values' /> -

-
- - -
-
-
-
- -

" . __( 'Your API key has been Reset', 'wpsc' ) . "

"; - } - } -} - -add_action( 'wpsc_gold_module_activation', 'wpsc_reset_api_key' ); - -?> \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/display-items-functions.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/display-items-functions.php deleted file mode 100644 index c338327..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/display-items-functions.php +++ /dev/null @@ -1,1302 +0,0 @@ - '0', - 'name' => '', - 'description' => '', - 'additional_description' => '', - 'price' => '0.00', - 'weight' => '0', - 'weight_unit' => 'pound', - 'pnp' => '0.00', - 'international_pnp' => '0.00', - 'file' => '0', - 'image' => '', - 'category' => '0', - 'brand' => '0', - 'quantity_limited' => '0', - 'quantity' => '0', - 'special' => '0', - 'special_price' => 0.00, - 'display_frontpage' => '0', - 'notax' => '0', - 'publish' => '1', - 'active' => '1', - 'donation' => '0', - 'no_shipping' => '0', - 'thumbnail_image' => '', - 'thumbnail_state' => '1', - 'meta' => - array( - 'external_link' => NULL, - 'external_link_text' => NULL, - 'external_link_target' => NULL, - 'merchant_notes' => NULL, - 'sku' => NULL, - 'engrave' => '0', - 'can_have_uploaded_image' => '0', - 'table_rate_price' => - array( - 'quantity' => - array( - 0 => '', - ), - 'table_price' => - array( - 0 => '', - ), - ), - ), -); -add_action( 'admin_head', 'wpsc_css_header' ); - -function wpsc_redirect_variation_update( $location, $post_id ) { - global $post; - if ( $post->post_parent > 0 && 'wpsc-product' == $post->post_type ) - wp_redirect( admin_url( 'post.php?post='.$post->post_parent.'&action=edit' ) ); - else - return $location; - -} - -add_filter( 'redirect_post_location', 'wpsc_redirect_variation_update', 10, 2 ); -function wpsc_css_header() { - global $post_type; -?> - - ID ); - $product_data['meta'] = maybe_unserialize( $product_data ); - - foreach ( $product_data['meta'] as $meta_key => $meta_value ) - $product_data['meta'][$meta_key] = $meta_value[0]; - - $product_meta = array(); - if ( !empty( $product_data["_wpsc_product_metadata"] ) ) - $product_meta = maybe_unserialize( $product_data["_wpsc_product_metadata"][0] ); - - if ( isset( $product_data['meta']['_wpsc_currency'] ) ) - $product_alt_currency = maybe_unserialize( $product_data['meta']['_wpsc_currency'] ); - - if ( !isset( $product_data['meta']['_wpsc_table_rate_price'] ) ) { - $product_data['meta']['_wpsc_table_rate_price'] = $wpsc_product_defaults['meta']['table_rate_price']; - } - if ( isset( $product_meta['_wpsc_table_rate_price'] ) ) { - $product_meta['table_rate_price']['state'] = 1; - $product_meta['table_rate_price'] += $product_meta['_wpsc_table_rate_price']; - $product_data['meta']['_wpsc_table_rate_price'] = $product_meta['_wpsc_table_rate_price']; - } - - - if ( !isset( $product_data['meta']['_wpsc_is_donation'] ) ) - $product_data['meta']['_wpsc_is_donation'] = $wpsc_product_defaults['donation']; - - if ( !isset( $product_meta['table_rate_price']['state'] ) ) - $product_meta['table_rate_price']['state'] = null; - - if ( !isset( $product_meta['table_rate_price']['quantity'] ) ) - $product_meta['table_rate_price']['quantity'] = $wpsc_product_defaults['meta']['table_rate_price']['quantity'][0]; - - if ( !isset( $product_data['meta']['_wpsc_price'] ) ) - $product_data['meta']['_wpsc_price'] = $wpsc_product_defaults['price']; - - if ( !isset( $product_data['special'] ) ) - $product_data['special'] = $wpsc_product_defaults['special']; - - if ( !isset( $product_data['meta']['_wpsc_special_price'] ) ) - $product_data['meta']['_wpsc_special_price'] = $wpsc_product_defaults['special_price']; - - $currency_data = $wpdb->get_results( "SELECT * FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY `country` ASC", ARRAY_A ); -?> - - - - - - ID ) ) : ?> - ID ); ?> -

Variation Controls below.' , 'wpsc' ); ?>

-

- - -
-
- ' /> -
-
; width:85px; margin-left:30px;'> - -
- ' name='meta[_wpsc_special_price]' /> -
-
-
-
- -
- -
-
- - : - - - -
- $alt_price ) { - $i++; ?> -
-
- - -
- -
 "; -?> -

/> - -
-
-
- - - - - - 0 ) { - foreach ( (array)$product_meta['table_rate_price']['quantity'] as $key => $quantity ) { - if ( $quantity != '' ) { - $table_price = number_format( $product_meta['table_rate_price']['table_price'][$key], 2, '.', '' ); -?> - - - - - - - - - - -
- - - -
-
- -ID ); - $product_data['meta'] = maybe_unserialize( $product_data ); - - foreach ( $product_data['meta'] as $meta_key => $meta_value ) - $product_data['meta'][$meta_key] = $meta_value[0]; - - $product_meta = array(); - if ( !empty( $product_data["_wpsc_product_metadata"] ) ) - $product_meta = maybe_unserialize( $product_data["_wpsc_product_metadata"][0] ); - - if ( !isset( $product_meta['unpublish_when_none_left'] ) ) - $product_meta['unpublish_when_none_left'] = ''; ?> - - -
- ' /> -
- -
name='meta[_wpsc_limited_stock]' /> - - ID > 0 ) { - if ( is_numeric( $product_data['meta']['_wpsc_stock'] ) ) {?> -
- - -ID ); - - $product_data['meta'] = $product_meta = array(); - if ( !empty( $product_data['_wpsc_product_metadata'] ) ) - $product_data['meta'] = $product_meta = maybe_unserialize( $product_data['_wpsc_product_metadata'][0] ); - - if ( !isset( $product_data['meta']['_wpsc_custom_tax'] ) ) - $product_data['meta']['_wpsc_custom_tax'] = ''; - $custom_tax = $product_data['meta']['_wpsc_custom_tax']; - - - if ( !isset( $product_meta['custom_tax'] ) ) { - $product_meta['custom_tax'] = 0.00; - } - - //Add New WPEC-Taxes Bands Here - $wpec_taxes_controller = new wpec_taxes_controller(); - - //display tax bands - $band_select_settings = array( - 'id' => 'wpec_taxes_band', - 'name' => 'meta[_wpsc_product_metadata][wpec_taxes_band]', - 'label' => __( 'Custom Tax Band', 'wpsc' ) - ); - $wpec_taxes_band = ''; - if ( isset( $product_meta['wpec_taxes_band'] ) ) { - $band = $wpec_taxes_controller->wpec_taxes->wpec_taxes_get_band_from_index( $product_meta['wpec_taxes_band'] ); - $wpec_taxes_band = array( 'index'=>$band['index'], 'name'=>$band['name'] ); - } - - $taxable_checkbox_settings = array( - 'type' => 'checkbox', - 'id' => 'wpec_taxes_taxable', - 'name' => 'meta[_wpsc_product_metadata][wpec_taxes_taxable]', - 'label' => __( 'This product is not taxable.', 'wpsc' ) - ); - - if ( isset( $product_meta['wpec_taxes_taxable'] ) && 'on' == $product_meta['wpec_taxes_taxable'] ) { - $taxable_checkbox_settings['checked'] = 'checked'; - } - - //add taxable amount only for exclusive tax - if ( !$wpec_taxes_controller->wpec_taxes_isincluded() ) { - $taxable_amount_input_settings = array( - 'id' => 'wpec_taxes_taxable_amount', - 'name' => 'meta[_wpsc_product_metadata][wpec_taxes_taxable_amount]', - 'label' => __( 'Taxable Amount', 'wpsc' ) - ); - - if ( isset( $product_meta['wpec_taxes_taxable_amount'] ) ) { - $taxable_amount_input_settings['value'] = $product_meta['wpec_taxes_taxable_amount']; - } - }// if - -?> -

wpec_taxes_display_tax_bands( $band_select_settings, $wpec_taxes_band ); ?>

-

- wpec_taxes_isincluded() ): ?> - wpec_taxes_build_input( $taxable_amount_input_settings );?> - -

-

wpec_taxes_build_input( $taxable_checkbox_settings ); ?>

-ID ); - $product_data['meta'] = maybe_unserialize( $product_data ); - - foreach ( $product_data['meta'] as $meta_key => $meta_value ) - $product_data['meta'][$meta_key] = $meta_value[0]; - - $product_meta = array(); - if ( !empty( $product_data["_wpsc_product_metadata"] ) ) - $product_meta = maybe_unserialize( $product_data["_wpsc_product_metadata"][0] ); - - $siteurl = get_option( 'siteurl' ); - $output = ''; - - // Get variation data from WP Terms - $product_term_data = wp_get_object_terms( $post->ID, 'wpsc-variation' ); - if ( !empty( $product_term_data ) ) { - foreach ( $product_term_data as $product_term ) - $product_terms[] = $product_term->term_id; - } else { - $product_terms = array(); - } -?> - post_title ) ) : ?> -

- -
-
- 0, - 'parent' => 0 - ) ); - // Loop through each variation set - foreach ( (array)$variation_sets as $variation_set ) : - $set_checked_state = ''; - - // If this Product includes this variation, check it - if ( in_array( $variation_set->term_id, $product_terms ) ) - $set_checked_state = "checked='checked'"; ?> -
- - - - 0, - 'parent' => $variation_set->term_id - ) ); - // Loop through the variations - foreach ( (array)$variations as $variation ) : - $checked_state = ''; - - if ( in_array( $variation->term_id, $product_terms ) ) - $checked_state = "checked='checked'"; - -?> - -
- -
- - - -
- - - -
- - -
- ID; - - $query = array( - 'post_type' => 'wpsc-product', - 'orderby' => 'menu_order post_title', - 'post_parent' => $parent_product, - 'post_status' => 'publish, inherit', - 'order' => "ASC" - ); - - $args = array( - 'post_type' => 'attachment', - 'numberposts' => 1, - 'post_status' => null, - 'post_parent' => $parent_product, - 'orderby' => 'menu_order', - 'order' => 'ASC' - ); - - $image_data = (array)get_posts( $args ); - $parent_product_data['image'] = array_shift( $image_data ); - - $wp_query = new WP_Query( $query ); - if ( !isset( $parent_product_data ) ) - $parent_product_data = null; -?> - -

 

- - - - - - - - - - - - - - - - -posts ) < 1 ) : -?> - - - - - - - -
- -
- - ID ); - $product_data['meta'] = maybe_unserialize( $product_data ); - - foreach ( $product_data['meta'] as $meta_key => $meta_value ) - $product_data['meta'][$meta_key] = $meta_value[0]; - - $product_meta = array(); - if ( !empty( $product_data["_wpsc_product_metadata"] ) ) - $product_meta = maybe_unserialize( $product_data["_wpsc_product_metadata"][0] ); - - $product_data['transformed'] = array(); - if ( !isset( $product_meta['weight'] ) ) - $product_meta['weight'] = ""; - - if( !isset( $product_meta['weight_unit'] ) ) - $product_meta['weight_unit'] = ''; - - $product_data['transformed']['weight'] = wpsc_convert_weight( $product_meta['weight'], "pound", $product_meta['weight_unit']); - - // Fix wp_debug notices - if(!isset($product_meta['dimensions'])){ - $product_meta['dimensions'] = array( - 'height' => 0, - 'width' => 0, - 'length' => 0 - ); - } - if( !isset($product_meta['display_weight_as']) ) - $product_meta['display_weight_as'] = ''; - - if( !isset( $product_meta['dimensions']['height_unit'] ) ) - $product_meta['dimensions']['height_unit'] = ''; - - if( !isset( $product_meta['dimensions']['width_unit'] ) ) - $product_meta['dimensions']['width_unit'] = ''; - - if( !isset( $product_meta['dimensions']['length_unit'] ) ) - $product_meta['dimensions']['length_unit'] = ''; - - if( !isset( $product_meta['shipping'] ) ){ - $product_meta['shipping']['local'] = ''; - $product_meta['shipping']['international'] = ''; - } - if( !isset( $product_meta['no_shipping'] ) ) - $product_meta['no_shipping'] = ''; -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - ' /> - -
- - - '> - -
- - - '> - -
- - - '> - -
- -
- - - ' /> -
- - - ' /> -
-
- />  -
-ID ); - - $product_data['meta'] = $product_meta = array(); - if ( !empty( $product_data['_wpsc_product_metadata'] ) ) - $product_data['meta'] = $product_meta = maybe_unserialize( $product_data['_wpsc_product_metadata'][0] ); - - $custom_fields = $wpdb->get_results( " - SELECT - `meta_id`, `meta_key`, `meta_value` - FROM - `{$wpdb->postmeta}` - WHERE - `post_id` = {$post->ID} - AND - `meta_key` NOT LIKE '\_%' - ORDER BY - LOWER(meta_key)", ARRAY_A - ); - if( !isset( $product_meta['engraved'] ) ) - $product_meta['engraved'] = ''; - - if( !isset( $product_meta['can_have_uploaded_image'] ) ) - $product_meta['can_have_uploaded_image'] = ''; - -?> - - - - - - - - - - - - - - - - - - - ID ); - ob_get_contents(); - ob_end_clean(); -?> - - - -
- :
- +

- - -
- - ' name='custom_meta[][name]' id='custom_meta_name_'> - - - -
-
- -
- :
-
- :
- -
-
-


- - - -

- :
- - id='add_engrave_text' /> - -
-
- - id='can_have_uploaded_image' /> - -
-
- - name='meta[_wpsc_product_metadata][google_prohibited]' id='add_google_prohibited' />
-

- :
- -
-
-ID ); - - $product_data['meta'] = $product_meta = array(); - if ( !empty( $product_data['_wpsc_product_metadata'] ) ) - $product_data['meta'] = $product_meta = maybe_unserialize( $product_data['_wpsc_product_metadata'][0] ); - - // Get External Link Values - $external_link_value = isset( $product_meta['external_link'] ) ? $product_meta['external_link'] : ''; - $external_link_text_value = isset( $product_meta['external_link_text'] ) ? $product_meta['external_link_text'] : ''; - $external_link_target_value = isset( $product_meta['external_link_target'] ) ? $product_meta['external_link_target'] : ''; - $external_link_target_value_selected[$external_link_target_value] = ' selected="selected"'; - if ( !isset( $external_link_target_value_selected['_self'] ) ) $external_link_target_value_selected['_self'] = ''; - if ( !isset( $external_link_target_value_selected['_blank'] ) ) $external_link_target_value_selected['_blank'] = ''; - -?> -

- - - - - - - - - - - - - - - -
- -
- - -

>

- - -ID ); - $output = ''; - $product_data['meta'] = $product_meta = array(); - if ( !empty( $product_data['_wpsc_product_metadata'] ) ) - $product_data['meta'] = $product_meta = maybe_unserialize( $product_data['_wpsc_product_metadata'][0] ); - - $upload_max = wpsc_get_max_upload_size(); -?> - ID ); ?> -

:

-
:

-

- -
-

-
- -

- - 'wpsc-preview-file', - 'post_parent' => $post->ID, - 'numberposts' => -1, - 'post_status' => 'all' - ); - - $preview_files = (array)get_posts( $args ); - - foreach ($preview_files as $preview) - echo $preview->post_title . '
'; - - ?> - -
- id != 'wpsc-product' ) - return $context; - return __( 'Upload Image%s', 'wpsc' ); -} -function change_link( $link ) { - global $post_ID, $current_screen; - - if ( $current_screen->id != 'wpsc-product' ) - return $link; - - $uploading_iframe_ID = $post_ID; - $media_upload_iframe_src = "media-upload.php?post_id=$uploading_iframe_ID"; - - return $media_upload_iframe_src . "&type=image&parent_page=wpsc-edit-products"; -} -function wpsc_form_multipart_encoding() { - echo ' enctype="multipart/form-data"'; -} - -add_action( 'post_edit_form_tag', 'wpsc_form_multipart_encoding' ); -add_filter( 'media_buttons_context', 'change_context' ); -add_filter( 'image_upload_iframe_src', "change_link" ); -/* -* Modifications to Media Gallery -*/ - -if ( ( isset( $_REQUEST['parent_page'] ) && ( $_REQUEST['parent_page'] == 'wpsc-edit-products' ) ) ) { - add_filter( 'media_upload_tabs', 'wpsc_media_upload_tab_gallery', 12 ); - add_filter( 'attachment_fields_to_save', 'wpsc_save_attachment_fields', 9, 2 ); - add_filter( 'media_upload_form_url', 'wpsc_media_upload_url', 9, 1 ); - add_action( 'admin_head', 'wpsc_gallery_css_mods' ); -} -add_filter( 'gettext', 'wpsc_filter_delete_text', 12 , 3 ); -add_filter( 'attachment_fields_to_edit', 'wpsc_attachment_fields', 11, 2 ); -add_filter( 'gettext', 'wpsc_filter_feature_image_text', 12, 3 ); -add_filter( 'gettext_with_context', 'wpsc_filter_gettex_with_context', 12, 4); - -if ( isset( $_REQUEST["save"] ) && isset( $_REQUEST["attachments"] ) && is_array( $_REQUEST["attachments"] ) ) { - //wpsc_regenerate_thumbnails(); -} - -/* - * This filter overrides string with context translations - * - * @param $translation The current translation - * @param $text The text being translated - * @param $context The domain for the translation - * @param $domain The domain for the translation - * @return string The translated / filtered text. - */ -function wpsc_filter_gettex_with_context( $translation, $text, $context, $domain ) { - - if ( 'Taxonomy Parent' == $context && 'Parent' == $text && isset($_GET['taxonomy']) && 'wpsc-variation' == $_GET['taxonomy'] ) { - $translations = &get_translations_for_domain( $domain ); - return $translations->translate( 'Variation set', 'wpsc' ); - //this will never happen, this is here only for gettex to pick up the translation - return __( 'Variation set', 'wpsc' ); - } - return $translation; -} - -/* - * This filter translates string before it is displayed - * specifically for the words 'Use as featured image' with 'Use as Product Thumbnail' when the user is selecting a Product Thumbnail - * using media gallery. - * - * @param $translation The current translation - * @param $text The text being translated - * @param $domain The domain for the translation - * @return string The translated / filtered text. - */ -function wpsc_filter_feature_image_text( $translation, $text, $domain ) { - - if ( 'Use as featured image' == $text && isset( $_REQUEST['post_id'] ) ) { - $post = get_post( $_REQUEST['post_id'] ); - if ( $post->post_type != 'wpsc-product' ) return $translation; - $translations = &get_translations_for_domain( $domain ); - return $translations->translate( 'Use as Product Thumbnail', 'wpsc' ); - //this will never happen, this is here only for gettex to pick up the translation - return __( 'Use as Product Thumbnail', 'wpsc' ); - } - if ( 'The name is how it appears on your site.' == $text && isset($_GET['taxonomy']) && 'wpsc-variation' == $_GET['taxonomy'] ){ - $translations = &get_translations_for_domain( $domain ); - return $translations->translate( 'The name is how it appears on your site.
Please read this carefully before starting to work with variations:
Variations in WP e-Commerce are divided into sets. For example set Color could have variations Red, Green, and Blue. To create a variation set simply enter the name and push Enter key on your keyboard or click Add New Variation/Set button in the bottom of this page. Then you will be able to select it from Variation set drop-down menu and add some variations to it. To add a new variation set just select None in Variation set drop-down menu.
', 'wpsc' ); - //this will never happen, this is here only for gettex to pick up the translation - return __( 'The name is how it appears on your site.
Please read this carefully before starting to work with variations:
Variations in WP e-Commerce are divided into sets. For example set Color could have variations Red, Green, and Blue. To create a set simply enter Name and push Enter key on your keyboard or click Add New Variation/Set button in the bottom of this page. Now you can select the variation set that you\'ve just created from Variation set drop-down menu and add some variations to it.
', 'wpsc' ); - } - - return $translation; -} -function wpsc_attachment_fields( $form_fields, $post ) { - $out = ''; - if(isset($_GET["post_id"])) - $parent_post = get_post( absint($_GET["post_id"]) ); - else - $parent_post = get_post( $post->post_parent ); - - if ( $parent_post->post_type == "wpsc-product" ) { - - //Unfortunate hack, as I'm not sure why the From Computer tab doesn't process filters the same way the Gallery does - - echo ' -'; - $size_names = array( 'small-product-thumbnail' => __( 'Default Product Thumbnail Size', 'wpsc' ), 'medium-single-product' => __( 'Single Product Image Size', 'wpsc' ), 'full' => __( 'Full Size', 'wpsc' ) ); - - $check = get_post_meta( $post->ID, '_wpsc_selected_image_size', true ); - if ( !$check ) - $check = 'medium-single-product'; - - // regenerate size metadata in case it's missing - if ( ! image_get_intermediate_size( $post->ID, $check ) ) { - $metadata = wp_get_attachment_metadata( $post->ID ); - $file = get_attached_file( $post->ID ); - $metadata = array_merge( wp_generate_attachment_metadata( $post->ID, $file ), $metadata ); - wp_update_attachment_metadata( $post->ID, $metadata ); - } - - //This loop attaches the custom thumbnail/single image sizes to this page - foreach ( $size_names as $size => $name ) { - $downsize = image_downsize( $post->ID, $size ); - - // is this size selectable? - $enabled = ( $downsize[3] || 'full' == $size ); - $css_id = "image-size-{$size}-{$post->ID}"; - // if this size is the default but that's not available, don't select it - - $html = "
"; - - $html .= ""; - // only show the dimensions if that choice is available - if ( $enabled ) - $html .= " "; - - $html .= '
'; - - $out .= $html; - } - - unset( $form_fields['post_excerpt'], $form_fields['image_url'], $form_fields['post_content'], $form_fields['post_title'], $form_fields['url'], $form_fields['align'], $form_fields['image_alt']['helps'], $form_fields["image-size"] ); - $form_fields['image_alt']['helps'] = __( 'Alt text for the product image, e.g. “Rockstar T-Shirt”', 'wpsc' ); - - $form_fields["image-size"] = array( - 'label' => __( 'Single Product Page Thumbnail:', 'wpsc' ), - 'input' => 'html', - 'html' => $out, - 'helps' => "" . __( 'This is the Thumbnail size that will be displayed on the Single Product page. You can change the default sizes under your store settings', 'wpsc' ) . "" - ); - - //This is for the custom thumbnail size. - - $custom_thumb_size_w = get_post_meta( $post->ID, "_wpsc_custom_thumb_w", true ); - $custom_thumb_size_h = get_post_meta( $post->ID, "_wpsc_custom_thumb_h", true ); - $custom_thumb_html = " - - X - - "; - $form_fields["wpsc_custom_thumb"] = array( - "label" => __( "Products Page Thumbnail Size:", 'wpsc' ), - "input" => "html", // this is default if "input" is omitted - "helps" => "" . __( 'Custom thumbnail size for this image on the main Product Page', 'wpsc') . "", - "html" => $custom_thumb_html - ); - - } - return $form_fields; - -} -function wpsc_save_attachment_fields( $post, $attachment ) { - - if ( isset ( $attachment['wpsc_custom_thumb_w'] ) ) - update_post_meta( $post['ID'], '_wpsc_custom_thumb_w', $attachment['wpsc_custom_thumb_w'] ); - - if ( isset ( $attachment['wpsc_custom_thumb_h'] ) ) - update_post_meta( $post['ID'], '_wpsc_custom_thumb_h', $attachment['wpsc_custom_thumb_h'] ); - - if ( isset ( $attachment['image-size'] ) ) - update_post_meta( $post['ID'], '_wpsc_selected_image_size', $attachment['image-size'] ); - - return $post; -} -function wpsc_media_upload_url( $form_action_url ) { - - $form_action_url = esc_url( add_query_arg( array( 'parent_page'=>'wpsc-edit-products' ) ) ); - - return $form_action_url; - -} -function wpsc_gallery_css_mods() { - - print ''; - print ' - '; -} -function wpsc_media_upload_tab_gallery( $tabs ) { - - unset( $tabs['gallery'] ); - $tabs['gallery'] = __( 'Product Image Gallery', 'wpsc' ); - - return $tabs; -} -function wpsc_filter_delete_text( $translation, $text, $domain ) { - - if ( 'Delete' == $text && isset( $_REQUEST['post_id'] ) && isset( $_REQUEST["parent_page"] ) ) { - $translations = &get_translations_for_domain( $domain ); - return $translations->translate( 'Trash' ) ; - } - return $translation; -} -function edit_multiple_image_gallery( $post ) { - global $wpdb; - //Make sure thumbnail isn't duplicated - $siteurl = get_option( 'siteurl' ); - - if ( $post->ID > 0 ) { - if ( has_post_thumbnail( $post->ID ) ) - echo get_the_post_thumbnail( $post->ID, 'admin-product-thumbnails' ); - - $args = array( - 'post_type' => 'attachment', - 'numberposts' => -1, - 'post_status' => null, - 'post_parent' => $post->ID, - 'orderby' => 'menu_order', - 'order' => 'ASC' - ); - - $attached_images = (array)get_posts( $args ); - - if ( count( $attached_images ) > 0 ) { - foreach ( $attached_images as $images ) { - $attached_image = wp_get_attachment_image( $images->ID, 'admin-product-thumbnails' ); - echo $attached_image. ' '; - } - } - - } -} - -/** - * wpsc_save_quickedit_box function - * Saves input for the various meta in the quick edit boxes - * - * @todo UI - * @todo Data validation / sanitization / security - * @todo AJAX should probably return weight unit - * @return $post_id (int) Post ID - */ - -function wpsc_save_quickedit_box( $post_id ) { - global $current_screen; - if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || empty( $current_screen ) || $current_screen->id != 'edit-wpsc-product' || ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) - return; - - $is_parent = ( bool )wpsc_product_has_children( $post_id ); - $product_meta = get_post_meta( $post_id, '_wpsc_product_metadata', true ); - - $weight_unit = $product_meta["weight_unit"]; - $weight = wpsc_convert_weight( $_POST["weight"], $weight_unit, "pound", true ); - - if ( isset( $product_meta["weight"] ) ) - unset( $product_meta["weight"] ); - - $product_meta["weight"] = $weight; - - if ( !$is_parent ) { - update_post_meta( $post_id, '_wpsc_product_metadata', $product_meta ); - if(is_numeric($_POST['stock'])) - update_post_meta( $post_id, '_wpsc_stock', $_POST['stock'] ); - else - update_post_meta( $post_id, '_wpsc_stock', '' ); - update_post_meta( $post_id, '_wpsc_price', $_POST['price'] ); - update_post_meta( $post_id, '_wpsc_special_price', $_POST['sale_price'] ); - } - if($_POST['sku'] == __('N/A', 'wpsc')) - update_post_meta( $post_id, '_wpsc_sku', '' ); - else - update_post_meta( $post_id, '_wpsc_sku', $_POST['sku'] ); - - return $post_id; -} - -/** - * wpsc_quick_edit_boxes function - * Creates inputs for the various meta in the quick edit boxes. - * - * @todo UI - * @internal The post_id cannot be accessed here because this gets output at the very end - * of the editor form, and injected within relevant rows using javascript. - */ - -function wpsc_quick_edit_boxes( $col_name, $_screen_post_type = null ) { - // Avoid outputting this on term edit screens. - // See http://core.trac.wordpress.org/ticket/16392#comment:9 - if ( current_filter() == 'quick_edit_custom_box' && $_screen_post_type == 'edit-tags' ) - return; -?> - -
-
-
- - - - - - - - - - - -
-
-
- \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/product-functions.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/product-functions.php deleted file mode 100644 index d74c820..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/product-functions.php +++ /dev/null @@ -1,1125 +0,0 @@ - $id, - 'post_type' => 'wpsc-product', - 'post_status' => 'inherit publish' - ); - $children = get_children($args); - if( empty($children) ) - return false; - else - return true; -} - -/** -* wpsc_admin_submit_product function -* @internal Was going to completely refactor sanitise forms and wpsc_insert_product, but they are also used by the import system - * which I'm not really familiar with...so I'm not touching them :) Erring on the side of redundancy and caution I'll just - * refactor this to do the job. -* @return nothing -*/ -function wpsc_admin_submit_product( $post_ID, $post ) { - global $current_screen, $wpdb; - - if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || empty( $current_screen ) || $current_screen->id != 'wpsc-product' || $post->post_type != 'wpsc-product' || empty( $_POST['meta'] ) ) - return $post_ID; - - //Type-casting ( not so much sanitization, which would be good to do ) - $post_data = $_POST; - $product_id = $post_ID; - $post_data['additional_description'] = isset($post_data['additional_description']) ? $post_data['additional_description'] : ''; - $post_meta['meta'] = (array)$_POST['meta']; - if ( isset( $post_data['meta']['_wpsc_price'] ) ) - $post_data['meta']['_wpsc_price'] = abs( (float) str_replace( ',', '', $post_data['meta']['_wpsc_price'] ) ); - if ( isset( $post_data['meta']['_wpsc_special_price'] ) ) - $post_data['meta']['_wpsc_special_price'] = abs((float)str_replace( ',','',$post_data['meta']['_wpsc_special_price'] )); - if($post_data['meta']['_wpsc_sku'] == __('N/A', 'wpsc')) - $post_data['meta']['_wpsc_sku'] = ''; - if( isset( $post_data['meta']['_wpsc_is_donation'] ) ) - $post_data['meta']['_wpsc_is_donation'] = 1; - else - $post_data['meta']['_wpsc_is_donation'] = 0; - if ( ! isset( $post_data['meta']['_wpsc_limited_stock'] ) ){ - $post_data['meta']['_wpsc_stock'] = false; - } else { - $post_data['meta']['_wpsc_stock'] = isset( $post_data['meta']['_wpsc_stock'] ) ? (int) $post_data['meta']['_wpsc_stock'] : 0; - } - - unset($post_data['meta']['_wpsc_limited_stock']); - if(!isset($post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left'])) $post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left'] = ''; - if(!isset($post_data['quantity_limited'])) $post_data['quantity_limited'] = ''; - if(!isset($post_data['special'])) $post_data['special'] = ''; - if(!isset($post_data['meta']['_wpsc_product_metadata']['no_shipping'])) $post_data['meta']['_wpsc_product_metadata']['no_shipping'] = ''; - - $post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left']; - $post_data['meta']['_wpsc_product_metadata']['quantity_limited'] = (int)(bool)$post_data['quantity_limited']; - $post_data['meta']['_wpsc_product_metadata']['special'] = (int)(bool)$post_data['special']; - $post_data['meta']['_wpsc_product_metadata']['no_shipping'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['no_shipping']; - - // Product Weight - if(!isset($post_data['meta']['_wpsc_product_metadata']['display_weight_as'])) $post_data['meta']['_wpsc_product_metadata']['display_weight_as'] = ''; - if(!isset($post_data['meta']['_wpsc_product_metadata']['display_weight_as'])) $post_data['meta']['_wpsc_product_metadata']['display_weight_as'] = ''; - - $weight = wpsc_convert_weight($post_data['meta']['_wpsc_product_metadata']['weight'], $post_data['meta']['_wpsc_product_metadata']['weight_unit'], "pound", true); - $post_data['meta']['_wpsc_product_metadata']['weight'] = (float)$weight; - $post_data['meta']['_wpsc_product_metadata']['display_weight_as'] = $post_data['meta']['_wpsc_product_metadata']['weight_unit']; - - // table rate price - $post_data['meta']['_wpsc_product_metadata']['table_rate_price'] = isset( $post_data['table_rate_price'] ) ? $post_data['table_rate_price'] : array(); - - // if table_rate_price is unticked, wipe the table rate prices - if ( empty( $post_data['table_rate_price']['state'] ) ) { - $post_data['meta']['_wpsc_product_metadata']['table_rate_price']['table_price'] = array(); - $post_data['meta']['_wpsc_product_metadata']['table_rate_price']['quantity'] = array(); - } - - if ( ! empty( $post_data['meta']['_wpsc_product_metadata']['table_rate_price']['table_price'] ) ) { - foreach ( (array) $post_data['meta']['_wpsc_product_metadata']['table_rate_price']['table_price'] as $key => $value ){ - if(empty($value)){ - unset($post_data['meta']['_wpsc_product_metadata']['table_rate_price']['table_price'][$key]); - unset($post_data['meta']['_wpsc_product_metadata']['table_rate_price']['quantity'][$key]); - } - } - } - - - $post_data['meta']['_wpsc_product_metadata']['shipping']['local'] = (float)$post_data['meta']['_wpsc_product_metadata']['shipping']['local']; - $post_data['meta']['_wpsc_product_metadata']['shipping']['international'] = (float)$post_data['meta']['_wpsc_product_metadata']['shipping']['international']; - - - // Advanced Options - $post_data['meta']['_wpsc_product_metadata']['engraved'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['engraved']; - $post_data['meta']['_wpsc_product_metadata']['can_have_uploaded_image'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['can_have_uploaded_image']; - if(!isset($post_data['meta']['_wpsc_product_metadata']['google_prohibited'])) $post_data['meta']['_wpsc_product_metadata']['google_prohibited'] = ''; - $post_data['meta']['_wpsc_product_metadata']['google_prohibited'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['google_prohibited']; - $post_data['meta']['_wpsc_product_metadata']['external_link'] = (string)$post_data['meta']['_wpsc_product_metadata']['external_link']; - $post_data['meta']['_wpsc_product_metadata']['external_link_text'] = (string)$post_data['meta']['_wpsc_product_metadata']['external_link_text']; - $post_data['meta']['_wpsc_product_metadata']['external_link_target'] = (string)$post_data['meta']['_wpsc_product_metadata']['external_link_target']; - - $post_data['meta']['_wpsc_product_metadata']['enable_comments'] = $post_data['meta']['_wpsc_product_metadata']['enable_comments']; - $post_data['meta']['_wpsc_product_metadata']['merchant_notes'] = $post_data['meta']['_wpsc_product_metadata']['merchant_notes']; - - $post_data['files'] = $_FILES; - - if(isset($post_data['post_title']) && $post_data['post_title'] != '') { - - $product_columns = array( - 'name' => '', - 'description' => '', - 'additional_description' => '', - 'price' => null, - 'weight' => null, - 'weight_unit' => '', - 'pnp' => null, - 'international_pnp' => null, - 'file' => null, - 'image' => '0', - 'quantity_limited' => '', - 'quantity' => null, - 'special' => null, - 'special_price' => null, - 'display_frontpage' => null, - 'notax' => null, - 'publish' => null, - 'active' => null, - 'donation' => null, - 'no_shipping' => null, - 'thumbnail_image' => null, - 'thumbnail_state' => null - ); - - foreach($product_columns as $column => $default) - { - if (!isset($post_data[$column])) $post_data[$column] = ''; - - if($post_data[$column] !== null) { - $update_values[$column] = stripslashes($post_data[$column]); - } else if(($update != true) && ($default !== null)) { - $update_values[$column] = stripslashes($default); - } - } - // if we succeed, we can do further editing (todo - if_wp_error) - - // if we have no categories selected, assign one. - if( isset( $post_data['tax_input']['wpsc_product_category'] ) && count( $post_data['tax_input']['wpsc_product_category'] ) == 1 && $post_data['tax_input']['wpsc_product_category'][0] == 0){ - $post_data['tax_input']['wpsc_product_category'][1] = wpsc_add_product_category_default($product_id); - - } - // and the meta - wpsc_update_product_meta($product_id, $post_data['meta']); - - // and the custom meta - wpsc_update_custom_meta($product_id, $post_data); - - // sort out the variations - wpsc_edit_product_variations( $product_id, $post_data ); - - //and the alt currency - if ( ! empty( $post_data['newCurrency'] ) ) { - foreach( (array) $post_data['newCurrency'] as $key =>$value ){ - wpsc_update_alt_product_currency( $product_id, $value, $post_data['newCurrPrice'][$key] ); - } - } - - if($post_data['files']['file']['tmp_name'] != '') { - wpsc_item_process_file($product_id, $post_data['files']['file']); - } else { - if (!isset($post_data['select_product_file'])) $post_data['select_product_file'] = null; - wpsc_item_reassign_file($product_id, $post_data['select_product_file']); - } - - if(isset($post_data['files']['preview_file']['tmp_name']) && ($post_data['files']['preview_file']['tmp_name'] != '')) { - wpsc_item_add_preview_file($product_id, $post_data['files']['preview_file']); - } - do_action('wpsc_edit_product', $product_id); - wpsc_ping(); - } - return $product_id; -} - - -function wpsc_pre_update( $data , $postarr ) { - if ( (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || $postarr["post_type"] != 'wpsc-product' ) - return $data; - if( isset( $postarr["additional_description"] ) && !empty( $postarr["additional_description"] ) ) - $data["post_excerpt"] = $postarr["additional_description"]; - - if( isset( $postarr["parent_post"] ) && !empty( $postarr["parent_post"] ) ) - $data["post_parent"] = $postarr["parent_post"]; - - // Sanitize status for variations (see #324) - if ( $data['post_parent'] && ( ! isset( $data['ID'] ) || $data['post_parent'] != $data['ID'] ) ) { - $data['post_status'] = 'inherit'; - } - - if ( !empty( $postarr['meta'] ) && ( $postarr['meta']['_wpsc_product_metadata']['enable_comments'] == 0 || empty( $postarr['meta']['_wpsc_product_metadata']['enable_comments'] ) ) ) - $data["comment_status"] = "closed"; - else - $data["comment_status"] = "open"; - - //Can anyone explain to me why this is here? - if ( isset( $sku ) && ( $sku != '' ) ) - $data['guid'] = $sku; - - return $data; -} -add_filter( 'wp_insert_post_data','wpsc_pre_update', 99, 2 ); -add_action( 'save_post', 'wpsc_admin_submit_product', 10, 2 ); -add_action( 'admin_notices', 'wpsc_admin_submit_notices' ); - -/** - * Remove category meta box from variation editor. This would disassociate variations - * with the default category. See #431 (http://code.google.com/p/wp-e-commerce/issues/detail?id=431) - * - */ -function wpsc_variation_remove_metaboxes() { - global $post; - if ( ! $post->post_parent ) - return; - - remove_meta_box( 'wpsc_product_categorydiv', 'wpsc-product', 'side' ); -} -add_action( 'add_meta_boxes_wpsc-product', 'wpsc_variation_remove_metaboxes', 99 ); - -function wpsc_admin_submit_notices() { - global $current_screen, $post; - - if( $current_screen->id != 'wpsc-product' || !isset( $_SESSION['product_error_messages'] ) ) - return; - foreach ( $_SESSION['product_error_messages'] as $error ) - echo "

".$error."

"; - unset( $_SESSION['product_error_messages'] ); -} - -/** - * wpsc_add_product_category_default, if there is no category assigned assign first product category as default - * - * @since 3.8 - * @param $product_id (int) the Post ID - * @return null - */ -function wpsc_add_product_category_default($product_id){ - $terms = get_terms( 'wpsc_product_category', array( 'orderby' => 'id', 'hide_empty' => 0 ) ); - wp_set_object_terms( $product_id , array( $terms[0]->slug ) , 'wpsc_product_category' ); -} -/** -* wpsc_sanitise_product_forms function -* -* @return array - Sanitised product details -*/ -function wpsc_sanitise_product_forms($post_data = null) { - if ( empty($post_data) ) { - $post_data = &$_POST; - } - - $product = get_post(absint($post_data['post_ID'])); - - $post_data['name'] = isset($post_data['post_title']) ? $post_data['post_title'] : ''; - $post_data['title'] = $post_data['name']; - $post_data['description'] = isset($post_data['content']) ? $post_data['content'] : ''; - $post_data['additional_description'] = isset($post_data['additional_description']) ? $post_data['additional_description'] : ''; - - if($product != null) { - $post_data['post_status'] = $product->post_status; - } else { - $post_data['post_status'] = 'draft'; - } - - if(isset($post_data['save']) && $product->post_status == 'inherit' && ( $product->post_parent == 0 || $product->post_parent == $product->ID ) ) { - $post_data['post_status'] = 'draft'; - } else if(isset($post_data['publish'])) { - $post_data['post_status'] = 'publish'; - } else if(isset($post_data['unpublish'])) { - $post_data['post_status'] = 'draft'; - } - - - - $post_meta['meta'] = (array)$_POST['meta']; - - $post_data['meta']['_wpsc_price'] = (float)str_replace( ',','',$post_data['meta']['_wpsc_price'] ); - $post_data['meta']['_wpsc_special_price'] = (float)str_replace( ',','',$post_data['meta']['_wpsc_special_price'] ); - $post_data['meta']['_wpsc_sku'] = $post_data['meta']['_wpsc_sku']; - if (!isset($post_data['meta']['_wpsc_is_donation'])) $post_data['meta']['_wpsc_is_donation'] = ''; - $post_data['meta']['_wpsc_is_donation'] = (int)(bool)$post_data['meta']['_wpsc_is_donation']; - $post_data['meta']['_wpsc_stock'] = (int)$post_data['meta']['_wpsc_stock']; - - if (!isset($post_data['meta']['_wpsc_limited_stock'])) $post_data['meta']['_wpsc_limited_stock'] = ''; - if((bool)$post_data['meta']['_wpsc_limited_stock'] != true) { - $post_data['meta']['_wpsc_stock'] = false; - } - unset($post_data['meta']['_wpsc_limited_stock']); - if(!isset($post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left'])) $post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left'] = ''; - if(!isset($post_data['quantity_limited'])) $post_data['quantity_limited'] = ''; - if(!isset($post_data['special'])) $post_data['special'] = ''; - if(!isset($post_data['meta']['_wpsc_product_metadata']['no_shipping'])) $post_data['meta']['_wpsc_product_metadata']['no_shipping'] = ''; - - $post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left']; - $post_data['meta']['_wpsc_product_metadata']['quantity_limited'] = (int)(bool)$post_data['quantity_limited']; - $post_data['meta']['_wpsc_product_metadata']['special'] = (int)(bool)$post_data['special']; - $post_data['meta']['_wpsc_product_metadata']['no_shipping'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['no_shipping']; - - // Product Weight - if(!isset($post_data['meta']['_wpsc_product_metadata']['display_weight_as'])) $post_data['meta']['_wpsc_product_metadata']['display_weight_as'] = ''; - if(!isset($post_data['meta']['_wpsc_product_metadata']['display_weight_as'])) $post_data['meta']['_wpsc_product_metadata']['display_weight_as'] = ''; - - $weight = wpsc_convert_weight($post_data['meta']['_wpsc_product_metadata']['weight'], $post_data['meta']['_wpsc_product_metadata']['weight_unit'], "pound", true); - $post_data['meta']['_wpsc_product_metadata']['weight'] = (float)$weight; - $post_data['meta']['_wpsc_product_metadata']['display_weight_as'] = $post_data['meta']['_wpsc_product_metadata']['weight_unit']; - - // table rate price - $post_data['meta']['_wpsc_product_metadata']['table_rate_price'] = $post_data['table_rate_price']; - // if table_rate_price is unticked, wipe the table rate prices - if(!isset($post_data['table_rate_price']['state'])) $post_data['table_rate_price']['state'] = ''; - if($post_data['table_rate_price']['state'] != 1) { - $post_data['meta']['_wpsc_product_metadata']['table_rate_price']['quantity'] = null; - $post_data['meta']['_wpsc_product_metadata']['table_rate_price']['table_price'] = null; - } - foreach((array)$post_data['meta']['_wpsc_product_metadata']['table_rate_price']['table_price'] as $key => $value){ - if(empty($value)){ - unset($post_data['meta']['_wpsc_product_metadata']['table_rate_price']['table_price'][$key]); - unset($post_data['meta']['_wpsc_product_metadata']['table_rate_price']['quantity'][$key]); - } - } - - - $post_data['meta']['_wpsc_product_metadata']['shipping']['local'] = (float)$post_data['meta']['_wpsc_product_metadata']['shipping']['local']; - $post_data['meta']['_wpsc_product_metadata']['shipping']['international'] = (float)$post_data['meta']['_wpsc_product_metadata']['shipping']['international']; - - - // Advanced Options - $post_data['meta']['_wpsc_product_metadata']['engraved'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['engraved']; - $post_data['meta']['_wpsc_product_metadata']['can_have_uploaded_image'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['can_have_uploaded_image']; - if(!isset($post_data['meta']['_wpsc_product_metadata']['google_prohibited'])) $post_data['meta']['_wpsc_product_metadata']['google_prohibited'] = ''; - $post_data['meta']['_wpsc_product_metadata']['google_prohibited'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['google_prohibited']; - $post_data['meta']['_wpsc_product_metadata']['external_link'] = (string)$post_data['meta']['_wpsc_product_metadata']['external_link']; - $post_data['meta']['_wpsc_product_metadata']['external_link_text'] = (string)$post_data['meta']['_wpsc_product_metadata']['external_link_text']; - $post_data['meta']['_wpsc_product_metadata']['external_link_target'] = (string)$post_data['meta']['_wpsc_product_metadata']['external_link_target']; - - $post_data['meta']['_wpsc_product_metadata']['enable_comments'] = $post_data['meta']['_wpsc_product_metadata']['enable_comments']; - $post_data['meta']['_wpsc_product_metadata']['merchant_notes'] = $post_data['meta']['_wpsc_product_metadata']['merchant_notes']; - - $post_data['files'] = $_FILES; - return $post_data; -} - - /** - * wpsc_insert_product function - * - * @param unknown - * @return unknown -*/ -function wpsc_insert_product($post_data, $wpsc_error = false) { - global $wpdb, $user_ID; - $adding = false; - $update = false; - if((int)$post_data['post_ID'] > 0) { - $product_id = absint($post_data['post_ID']); - $update = true; - } else if((int)$post_data['product_id'] > 0) { - $product_id = absint($post_data['product_id']); - $update = true; - } - - $product_columns = array( - 'name' => '', - 'description' => '', - 'additional_description' => '', - 'price' => null, - 'weight' => null, - 'weight_unit' => '', - 'pnp' => null, - 'international_pnp' => null, - 'file' => null, - 'image' => '0', - 'quantity_limited' => '', - 'quantity' => null, - 'special' => null, - 'special_price' => null, - 'display_frontpage' => null, - 'notax' => null, - 'publish' => null, - 'active' => null, - 'donation' => null, - 'no_shipping' => null, - 'thumbnail_image' => null, - 'thumbnail_state' => null - ); - - - foreach($product_columns as $column => $default) - { - if (!isset($post_data[$column])) $post_data[$column] = ''; - - if($post_data[$column] !== null) { - $update_values[$column] = stripslashes($post_data[$column]); - } else if(($update != true) && ($default !== null)) { - $update_values[$column] = stripslashes($default); - } - } - - $product_post_values = array( - 'ID' => $product_id, - 'post_author' => $user_ID, - 'post_content' => $post_data['description'], - 'post_excerpt' => $post_data['additional_description'], - 'post_title' => $post_data['name'], - 'post_status' => $post_data['post_status'], - 'post_type' => "wpsc-product", - 'post_name' => sanitize_title($post_data['name']) - ); - if ($post_data['meta']['_wpsc_product_metadata']['enable_comments'] == 0) { - $product_post_values["comment_status"] = "closed"; - }else { - $product_post_values["comment_status"] = "open"; - } - - if(isset($sku) && ($sku != '')) { - $product_post_array['guid'] = $sku; - } - - - - if($update === true) { - $where = array( 'id' => $product_id ); - $product_id = wp_update_post($product_post_values); - if ( isset ( $post_data["sticky"] ) ) { - stick_post($product_id); - }else { - unstick_post($product_id); - } - if ($product_id == 0) { - if ( $wpsc_error ) { - return new WP_Error('db_update_error', __( 'Could not update product in the database', 'wpsc' ), $wpdb->last_error); - } else { - return false; - } - } - } else { - $product_post_values += array( - 'post_date' => $product['date_added'] - ); - $product_id = wp_insert_post($product_post_values); - if ( isset ( $post_data["sticky"] ) ) { - stick_post($product_id); - }else { - unstick_post($product_id); - } - if ($product_id == 0 ) { - if ( $wp_error ) { - return new WP_Error('db_insert_error', __( 'Could not insert product into the database', 'wpsc' ), $wpdb->last_error); - } else { - return 0; - } - } - $adding = true; - } - - // if we succeed, we can do further editing - - // and the meta - wpsc_update_product_meta($product_id, $post_data['meta']); - - // and the custom meta - wpsc_update_custom_meta($product_id, $post_data); - - //and the alt currency - foreach((array)$post_data['newCurrency'] as $key =>$value){ - wpsc_update_alt_product_currency($product_id, $value, $post_data['newCurrPrice'][$key]); - } - - if($post_data['files']['file']['tmp_name'] != '') { - wpsc_item_process_file($product_id, $post_data['files']['file']); - } else { - if (!isset($post_data['select_product_file'])) $post_data['select_product_file'] = null; - wpsc_item_reassign_file($product_id, $post_data['select_product_file']); - } - - if(isset($post_data['files']['preview_file']['tmp_name']) && ($post_data['files']['preview_file']['tmp_name'] != '')) { - wpsc_item_add_preview_file($product_id, $post_data['files']['preview_file']); - } - do_action('wpsc_edit_product', $product_id); - wpsc_ping(); - return $product_id; -} - -/** - * term_id_price function - * Retreives associated price, if any, with term_id - * @param integer term ID - * @param integer parent product price - * @return integer modified price for child product, based on term ID price and parent price - */ - -function term_id_price($term_id, $parent_price) { - - $term_price_arr = get_option( 'term_prices' ); - - if ( isset($term_price_arr[$term_id]) ) { - $price = $term_price_arr[$term_id]["price"]; - } else { - $price = 0; - } - - //Check for flat, percentile or differential - $var_price_type = ''; - - if (flat_price($price)) { - $var_price_type = 'flat'; - $price = floatval($price); - } elseif ( differential_price($price) ) { - $var_price_type = 'differential'; - } elseif (percentile_price($price)) { - $var_price_type = 'percentile'; - } - - if (strchr($price, '-') ) { - $negative = true; - } else { - $positive = true; - } - - if ($positive) { - - if ( $var_price_type == 'differential' ) { - $differential = (floatval($price)); - $price = $parent_price + $differential; - } elseif ( $var_price_type == 'percentile' ) { - $percentage = (floatval($price) / 100); - $price = $parent_price + ($parent_price * $percentage); - } - - } else { - - if ( $var_price_type == 'differential' ) { - $differential = (floatval($price)); - $price = $parent_price - $differential; - } elseif ( $var_price_type == 'percentile' ) { - $percentage = (floatval($price) / 100); - $price = $parent_price - ($parent_price * $percentage); - } - } - return $price; -} - -/** - * wpsc_edit_product_variations function. - * this is the function to make child products using variations - * - * @access public - * @param mixed $product_id - * @param mixed $post_data - * @return void - */ -function wpsc_edit_product_variations($product_id, $post_data) { - global $wpdb, $user_ID; - $parent = $wpdb->get_var('SELECT post_parent FROM ' . $wpdb->posts . ' WHERE ID = '.$product_id); - if(!empty($parent)) - return; - $variations = array(); - $product_children = array(); - if (!isset($post_data['edit_var_val'])) - $post_data['edit_var_val'] = ''; - - $variations = (array)$post_data['edit_var_val']; - - // Generate the arrays for variation sets, values and combinations - $wpsc_combinator = new wpsc_variation_combinator($variations); - - // Retrieve the array containing the variation set IDs - $variation_sets = $wpsc_combinator->return_variation_sets(); - - // Retrieve the array containing the combinations of each variation set to be associated with this product. - $variation_values = $wpsc_combinator->return_variation_values(); - - // Retrieve the array containing the combinations of each variation set to be associated with this product. - $combinations = $wpsc_combinator->return_combinations(); - - $product_terms = wp_get_object_terms($product_id, 'wpsc-variation'); - - $variation_sets_and_values = array_merge($variation_sets, $variation_values); - $variation_sets_and_values = apply_filters('wpsc_edit_product_variation_sets_and_values', $variation_sets_and_values, $product_id); - wp_set_object_terms($product_id, $variation_sets_and_values, 'wpsc-variation'); - - $child_product_template = array( - 'post_author' => $user_ID, - 'post_content' => $post_data['description'], - 'post_excerpt' => $post_data['additional_description'], - 'post_title' => $post_data['name'], - 'post_status' => 'inherit', - 'post_type' => "wpsc-product", - 'post_name' => sanitize_title($post_data['name']), - 'post_parent' => $product_id - ); - - $child_product_meta = get_post_custom($product_id); - - // here we loop through the combinations, get the term data and generate custom product names - foreach($combinations as $combination) { - $term_names = array(); - $term_ids = array(); - $term_slugs = array(); - $product_values = $child_product_template; - - $combination_terms = get_terms('wpsc-variation', array( - 'hide_empty' => 0, - 'include' => implode(",", $combination), - 'orderby' => 'parent', - )); - - foreach($combination_terms as $term) { - $term_ids[] = $term->term_id; - $term_slugs[] = $term->slug; - $term_names[] = $term->name; - } - - $product_values['post_title'] .= " (".implode(", ", $term_names).")"; - $product_values['post_name'] = sanitize_title($product_values['post_title']); - - $selected_post = get_posts(array( - 'name' => $product_values['post_name'], - 'post_parent' => $product_id, - 'post_type' => "wpsc-product", - 'post_status' => 'all', - 'suppress_filters' => true - )); - $selected_post = array_shift($selected_post); - $child_product_id = wpsc_get_child_object_in_terms($product_id, $term_ids, 'wpsc-variation'); - $already_a_variation = true; - if($child_product_id == false) { - $already_a_variation = false; - if($selected_post != null) { - $child_product_id = $selected_post->ID; - } else { - $child_product_id = wp_update_post($product_values); - } - } else { - // sometimes there have been problems saving the variations, this gets the correct product ID - if(($selected_post != null) && ($selected_post->ID != $child_product_id)) { - $child_product_id = $selected_post->ID; - } - } - $product_children[] = $child_product_id; - if($child_product_id > 0) { - wp_set_object_terms($child_product_id, $term_slugs, 'wpsc-variation'); - } - //JS - 7.9 - Adding loop to include meta data in child product. - if(!$already_a_variation){ - foreach ($child_product_meta as $meta_key => $meta_value ) : - if ($meta_key == "_wpsc_product_metadata") { - update_post_meta($child_product_id, $meta_key, unserialize($meta_value[0])); - } else { - update_post_meta($child_product_id, $meta_key, $meta_value[0]); - } - - endforeach; - - //Adding this to check for a price on variations. Applying the highest price, seems to make the most sense. - if ( is_array ($term_ids) ) { - $price = array(); - foreach ($term_ids as $term_id_price) { - $price[] = term_id_price($term_id_price, $child_product_meta["_wpsc_price"][0]); - } - rsort($price); - $price = $price[0]; - - if($price > 0) { - update_post_meta($child_product_id, "_wpsc_price", $price); - } - } - } - } - - - //For reasons unknown, this code did not previously deal with variation deletions. - //Basically, we'll just check if any existing term associations are missing from the posted variables, delete if they are. - //Get posted terms (multi-dimensional array, first level = parent var, second level = child var) - $posted_term = $variations; - //Get currently associated terms - $currently_associated_var = $product_terms; - - foreach ($currently_associated_var as $current) { - $currently_associated_vars[] = $current->term_id; - } - - foreach ($posted_term as $term=>$val) { - $posted_terms[] = $term; - if(is_array($val)) { - foreach($val as $term2=>$val2) { - $posted_terms[] = $term2; - } - } - } - if(!empty($currently_associated_vars)){ - $term_ids_to_delete = array(); - $term_ids_to_delete = array_diff($currently_associated_vars, $posted_terms); - } - if(isset($_REQUEST["post_ID"])) - $post_id = $_REQUEST["post_ID"]; - elseif(isset($_REQUEST["product_id"])) - $post_id = $_REQUEST["product_id"]; - if(!empty($term_ids_to_delete) && (isset($_REQUEST["product_id"]) || isset($post_id))) { - $post_ids_to_delete = array(); - - // Whatever remains, find child products of current product with that term, in the variation taxonomy, and delete - $post_ids_to_delete = wpsc_get_child_object_in_terms_var($_REQUEST["product_id"], $term_ids_to_delete, 'wpsc-variation'); - - if(is_array($post_ids_to_delete) && !empty($post_ids_to_delete)) { - foreach($post_ids_to_delete as $object_ids) { - foreach($object_ids as $object_id) { - wp_delete_post($object_id); - } - } - } - } - $current_children = query_posts(array( - 'post_parent' => $post_id, - 'post_type' => "wpsc-product", - 'post_status' => 'all' - )); - - foreach((array)$current_children as $child_prod){ - $childs[] = $child_prod->ID; - } - if(!empty($childs)){ - $old_ids_to_delete = array_diff($childs, $product_children); - $old_ids_to_delete = apply_filters('wpsc_edit_product_variations_deletion', $old_ids_to_delete); - if(is_array($old_ids_to_delete) && !empty($old_ids_to_delete)) { - foreach($old_ids_to_delete as $object_ids) { - wp_delete_post($object_ids); - } - } - } -} - -function wpsc_update_alt_product_currency($product_id, $newCurrency, $newPrice){ - global $wpdb; -// exit($newCurrency.' '.$newPrice); - $old_curr = get_product_meta($product_id, 'currency',true); - $sql = "SELECT `isocode` FROM `".WPSC_TABLE_CURRENCY_LIST."` WHERE `id`=".$newCurrency; - $isocode = $wpdb->get_var($sql); - - $newCurrency = 'currency'; - $old_curr[$isocode] = $newPrice; - if(($newPrice != '') && ($newPrice > 0.00)){ - update_product_meta($product_id, $newCurrency, $old_curr); - } else { - if((empty($old_curr[$isocode]) || 0.00 == $old_curr[$isocode]) && is_array($old_curr)) - unset($old_curr[$isocode]); - update_product_meta($product_id, $newCurrency, $old_curr); - - } - -} - - /** - * wpsc_update_product_meta function - * - * @param integer product ID - * @param string comma separated tags - */ -function wpsc_update_product_meta($product_id, $product_meta) { - if($product_meta != null) { - foreach((array)$product_meta as $key => $value) { - update_post_meta($product_id, $key, $value); - } - } -} - -/** - * Called from javascript within product page to toggle publish status - AJAX - * @return bool publish status - */ -function wpsc_ajax_toggle_publish() { -/** - * @todo - Check Admin Referer - * @todo - Check Permissions - */ - $status = (wpsc_toggle_publish_status($_REQUEST['productid'])) ? ('true') : ('false'); - exit( $status ); -} -/* -/* END - Publish /No Publish functions -*/ - -function wpsc_update_custom_meta($product_id, $post_data) { - - if($post_data['new_custom_meta'] != null) { - foreach((array)$post_data['new_custom_meta']['name'] as $key => $name) { - $value = $post_data['new_custom_meta']['value'][(int)$key]; - if(($name != '') && ($value != '')) { - add_post_meta($product_id, $name, $value); - } - } - } - - if (!isset($post_data['custom_meta'])) $post_data['custom_meta'] = ''; - if($post_data['custom_meta'] != null) { - foreach((array)$post_data['custom_meta'] as $key => $values) { - if(($values['name'] != '') && ($values['value'] != '')) { - update_post_meta($product_id, $values['name'], $values['value']); - } - } - } -} - - /** - * wpsc_item_process_file function - * - * @param integer product ID - * @param array the file array from $_FILES - * @param array the preview file array from $_FILES - */ -function wpsc_item_process_file($product_id, $submitted_file, $preview_file = null) { - global $wpdb; - add_filter('upload_dir', 'wpsc_modify_upload_directory'); - $overrides = array('test_form'=>false); - - $time = current_time('mysql'); - if ( $post = get_post($product_id) ) { - if ( substr( $post->post_date, 0, 4 ) > 0 ) - $time = $post->post_date; - } - - $file = wp_handle_upload($submitted_file, $overrides, $time); - if ( isset($file['error']) ) - return new WP_Error( 'upload_error', $file['error'] ); - - $name_parts = pathinfo($file['file']); - $name = $name_parts['basename']; - - $url = $file['url']; - $type = $file['type']; - $file = $file['file']; - $title = $name; - $content = ''; - - // Construct the attachment array - $attachment = array( - 'post_mime_type' => $type, - 'guid' => $url, - 'post_parent' => $product_id, - 'post_title' => $title, - 'post_content' => $content, - 'post_type' => "wpsc-product-file", - 'post_status' => 'inherit' - ); - - // Save the data - $id = wp_insert_post($attachment, $file, $product_id); - remove_filter('upload_dir', 'wpsc_modify_upload_directory'); -} - -function wpsc_modify_upload_directory($input) { - $previous_subdir = $input['subdir']; - $download_subdir = str_replace($input['basedir'], '', WPSC_FILE_DIR); - $input['path'] = substr_replace(str_replace($previous_subdir, $download_subdir, $input['path']),'',-1); - $input['url'] = substr_replace(str_replace($previous_subdir, $download_subdir, $input['url']),'',-1); - $input['subdir'] = substr_replace(str_replace($previous_subdir, $download_subdir, $input['subdir']),'',-1); - return $input; -} - -function wpsc_modify_preview_directory($input) { - $previous_subdir = $input['subdir']; - $download_subdir = str_replace($input['basedir'], '', WPSC_PREVIEW_DIR); - - $input['path'] = substr_replace(str_replace($previous_subdir, $download_subdir, $input['path']),'',-1); - $input['url'] = substr_replace(str_replace($previous_subdir, $download_subdir, $input['url']),'',-1); - $input['subdir'] = substr_replace(str_replace($previous_subdir, $download_subdir, $input['subdir']),'',-1); - - return $input; -} - - /** - * wpsc_item_reassign_file function - * - * @param integer product ID - * @param string the selected file name; - */ -function wpsc_item_reassign_file($product_id, $selected_files) { - global $wpdb; - $product_file_list = array(); - // initialise $idhash to null to prevent issues with undefined variables and error logs - $idhash = null; - - $args = array( - 'post_type' => 'wpsc-product-file', - 'post_parent' => $product_id, - 'numberposts' => -1, - 'post_status' => 'any' - ); - - $attached_files = (array)get_posts($args); - - foreach($attached_files as $key => $attached_file) { - $attached_files_by_file[$attached_file->post_title] = $attached_files[$key]; - } - - /* if we are editing, grab the current file and ID hash */ - if(!$selected_files) { - // unlikely that anyone will ever upload a file called .none., so its the value used to signify clearing the product association - return null; - } - - - - foreach($selected_files as $selected_file) { - // if we already use this file, there is no point doing anything more. - $file_is_attached = false; - $selected_file_path = WPSC_FILE_DIR.basename($selected_file); - - if(isset($attached_files_by_file[$selected_file])) { - $file_is_attached = true; - } - - if($file_is_attached == false ) { - $type = wpsc_get_mimetype($selected_file_path); - $attachment = array( - 'post_mime_type' => $type, - 'post_parent' => $product_id, - 'post_title' => $selected_file, - 'post_content' => '', - 'post_type' => "wpsc-product-file", - 'post_status' => 'inherit' - ); - wp_insert_post($attachment); - } else { - $product_post_values = array( - 'ID' => $attached_files_by_file[$selected_file]->ID, - 'post_status' => 'inherit' - ); - wp_update_post($product_post_values); - } - } - - - foreach($attached_files as $attached_file) { - if(!in_array($attached_file->post_title, $selected_files)) { - $product_post_values = array( - 'ID' => $attached_file->ID, - 'post_status' => 'draft' - ); - wp_update_post($product_post_values); - } - } - - return $fileid; -} - - /** - * wpsc_delete_preview_file - * - * @param integer product ID - */ - -function wpsc_delete_preview_file($product_id) { - - $args = array( - 'post_type' => 'wpsc-preview-file', - 'post_parent' => $product_id, - 'numberposts' => -1, - 'post_status' => 'all' - ); - - $preview_files = (array)get_posts( $args ); - - foreach( $preview_files as $preview ) { - $preview_id = $preview->ID; - wp_delete_post($preview_id); - } - return true; -} - - /** - * wpsc_item_add_preview_file function - * - * @param integer product ID - * @param array the preview file array from $_FILES - */ -function wpsc_item_add_preview_file($product_id, $preview_file) { - global $wpdb; - - wpsc_delete_preview_file($product_id); - - add_filter('upload_dir', 'wpsc_modify_preview_directory'); - $overrides = array('test_form'=>false); - - $time = current_time('mysql'); - if ( $post = get_post($product_id) ) { - if ( substr( $post->post_date, 0, 4 ) > 0 ) - $time = $post->post_date; - } - - $file = wp_handle_upload($preview_file, $overrides, $time); - - if ( isset($file['error']) ) - return new WP_Error( 'upload_error', $file['error'] ); - - $name_parts = pathinfo($file['file']); - $name = $name_parts['basename']; - - $url = $file['url']; - $type = $file['type']; - $file = $file['file']; - $title = $name; - $content = ''; - - // Construct the attachment array - $attachment = array( - 'post_mime_type' => $type, - 'guid' => $url, - 'post_parent' => $product_id, - 'post_title' => $title, - 'post_content' => $content, - 'post_type' => "wpsc-preview-file", - 'post_status' => 'inherit' - ); - - // Save the data - $id = wp_insert_post($attachment, $file, $product_id); - remove_filter('upload_dir', 'wpsc_modify_preview_directory'); - return $id; - - -} - -/** - * wpsc_variation_combinator class. - * Produces all combinations of variations selected for this product - * this class is based off the example code from here: - * http://www.php.net/manual/en/ref.array.php#94910 - * Thanks, phektus, you are awesome, whoever you are. - */ -class wpsc_variation_combinator { - var $variation_sets = array(); - var $variation_values = array(); - var $reprocessed_array = array(); - var $combinations= array(); - -function wpsc_variation_combinator($variation_sets) { - if( $variation_sets ) { - foreach($variation_sets as $variation_set_id => $variation_set) { - $this->variation_sets[] = absint($variation_set_id); - $new_variation_set = array(); - if( $variation_set ) { - foreach($variation_set as $variation => $active) { - if($active == 1) { - $new_variation_set[] = array(absint($variation)); - $this->variation_values[] = $variation; - } - } - } - $this->reprocessed_array[] = $new_variation_set; - } - $this->get_combinations(array(), $this->reprocessed_array, 0); - } -} - - - function get_combinations($batch, $elements, $i) { - if ($i >= count($elements)) { - $this->combinations[] = $batch; - } else { - foreach ($elements[$i] as $element) { - $this->get_combinations(array_merge($batch, $element), $elements, $i + 1); - } - } - } - - function return_variation_sets() { - return $this->variation_sets; - } - - function return_variation_values() { - return $this->variation_values; - } - - function return_combinations() { - return $this->combinations; - - } -} - -function wpsc_variations_stock_remaining($product_id){ - global $wpdb; - return $wpdb->get_var(' - SELECT - sum(`pm`.`meta_value`) - FROM - `' . $wpdb->postmeta . '` `pm` - JOIN - `' . $wpdb->posts . '` `p` - ON - `pm`.`post_id` = `p`.`id` - WHERE - `p`.`post_type`= "wpsc-product" - AND - `p`.`post_parent` = ' . $product_id . ' - AND - `pm`.`meta_key` = "_wpsc_stock" - '); -} - -?> \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/products.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/products.php deleted file mode 100644 index afe13d8..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/products.php +++ /dev/null @@ -1,407 +0,0 @@ -query, array( 'posts_per_page' => '-1' ) ); - $wpsc_temp_query = query_posts( $args ); - if ( empty($wpsc_products) ) - $wpsc_products = &$wpsc_temp_query; - - foreach ( (array)$wpsc_products as $product ) { - wpsc_product_row($product, $parent_product); - } -} - -/** - * Adds the -trash status in the product row of manage products page - * @access public - * - * @since 3.8 - * @param $post_status (array) of current posts statuses - * @return $post_status (array) - */ -function wpsc_trashed_post_status($post_status){ - $post = get_post(get_the_ID()); - if( !empty($post) && 'wpsc-product' == $post->post_type && 'trash' == $post->post_status && !in_array('trash', $post_status)) - $post_status[] = 'Trash'; - - return $post_status; -} -add_filter('display_post_states','wpsc_trashed_post_status'); - -/** - * Spits out the current products details in a table row for manage products page and variations on edit product page. - * @access public - * - * @since 3.8 - * @param $product (Object), $parent_product (Int) Note: I believe parent_product is unused - */ -function wpsc_product_row(&$product, $parent_product = null) { - global $mode, $current_user; - - //is this good practice? - static $rowclass; - - $global_product = $product; - setup_postdata($product); - $product_post_type_object = get_post_type_object('wpsc-product'); - $current_user_can_edit_this_product = current_user_can( $product_post_type_object->cap->edit_post, $product->ID ); - - $rowclass = 'alternate' == $rowclass ? '' : 'alternate'; - $post_owner = ( $current_user->ID == $product->post_author ? 'self' : 'other' ); - $edit_link = get_edit_post_link( $product->ID ); - - $title = get_the_title( $product->ID ); - - if ( empty( $title ) ) - $title = __('(no title)', 'wpsc'); - - ?> - - post_status ); ?> iedit ' valign="top"> - '', 'title' => __('Name', 'wpsc') , 'weight' => __('Weight', 'wpsc'), 'stock' => __('Stock', 'wpsc'), 'price' => __('Price', 'wpsc'), 'sale_price' => __('Sale Price', 'wpsc'), 'SKU' => __('SKU', 'wpsc'), 'hidden_alerts' => ''); - - foreach ( $posts_columns as $column_name=>$column_display_name ) { - $class = "class=\"$column_name column-$column_name\""; - - $attributes = "$class"; - - switch ($column_name) { - - case 'date': /* !date case */ - if ( '0000-00-00 00:00:00' == $product->post_date && 'date' == $column_name ) { - $t_time = $h_time = __('Unpublished', 'wpsc'); - $time_diff = 0; - } else { - $t_time = get_the_time(__('Y/m/d g:i:s A', 'wpsc')); - $m_time = $product->post_date; - $time = get_post_time('G', true, $post); - - $time_diff = time() - $time; - - if ( $time_diff > 0 && $time_diff < 24*60*60 ) - $h_time = sprintf( __('%s ago', 'wpsc'), human_time_diff( $time ) ); - else - $h_time = mysql2date(__('Y/m/d', 'wpsc'), $m_time); - } - - echo ''; - if ( 'excerpt' == $mode ) - echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode); - else - echo '' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . ''; - echo '
'; - if ( 'publish' == $product->post_status ) { - _e('Published', 'wpsc'); - } elseif ( 'future' == $product->post_status ) { - if ( $time_diff > 0 ) - echo '' . __('Missed schedule', 'wpsc') . ''; - else - _e('Scheduled', 'wpsc'); - } else { - _e('Last Modified', 'wpsc'); - } - echo ''; - break; - - case 'title': /* !title case */ - $attributes = 'class="post-title column-title"'; - - $edit_link = wp_nonce_url( $edit_link, 'edit-product_'.$product->ID ); - ?> - > - - post_status != 'trash' ) { ?> - - - - -

- - - <?php echo $product_alert[' title='' class='product-alert-image' src='/product-alert.jpg' alt='' /> - -
- ID)) - $has_var = 'wpsc_has_variation'; - $actions = array(); - if ( $current_user_can_edit_this_product && 'trash' != $product->post_status ) { - $actions['edit'] = ''. __('Edit', 'wpsc') . ''; - $actions['quick_edit'] = "".__('Quick Edit', 'wpsc').""; - } - - if ( in_array($product->post_status, array('pending', 'draft')) ) { - if ( $current_user_can_edit_this_product ) { - $actions['view'] = ''.__('Preview', 'wpsc').''; - } - } else if ( 'trash' != $product->post_status ) { - $actions['view'] = ''.__('View', 'wpsc').''; - } - - $actions = apply_filters('post_row_actions', $actions, $product); - $action_count = count($actions); - $i = 0; - echo '
'; - - foreach ( $actions as $action => $link ) { - ++$i; - ( $i == $action_count ) ? $sep = '' : $sep = ' | '; - echo "$link$sep"; - } - - echo '
'; - get_inline_data($product); - ?> - - - - 'attachment', - 'numberposts' => 1, - 'post_status' => null, - 'post_parent' => $product->ID, - 'orderby' => 'menu_order', - 'order' => 'ASC' - )); - - - - if(isset($product->ID) && has_post_thumbnail($product->ID)){ - echo get_the_post_thumbnail($product->ID, 'admin-product-thumbnails'); - }elseif(!empty($attached_images)){ - $attached_image = $attached_images[0]; - - $src =wp_get_attachment_url($attached_image->ID); - ?> -
- <?php echo $title; ?> -
- - <?php echo $title; ?> - - - ID, 'price', true); - ?> - > - - - - ID, ''); - foreach($product_data['meta'] as $meta_name => $meta_value) { - $product_data['meta'][$meta_name] = maybe_unserialize(array_pop($meta_value)); - } - $product_data['transformed'] = array(); - if(!isset($product_data['meta']['_wpsc_product_metadata']['weight'])) $product_data['meta']['_wpsc_product_metadata']['weight'] = ""; - if(!isset($product_data['meta']['_wpsc_product_metadata']['weight_unit'])) $product_data['meta']['_wpsc_product_metadata']['weight_unit'] = ""; - - $product_data['transformed']['weight'] = wpsc_convert_weight($product_data['meta']['_wpsc_product_metadata']['weight'], "pound", $product_data['meta']['_wpsc_product_metadata']['weight_unit'], false); - $weight = $product_data['transformed']['weight']; - if($weight == ''){ - $weight = '0'; - } - ?> - > - - - - ID, '_wpsc_stock', true); - ?> - > - - - - - >ID); - if ( !empty( $categories ) ) { - $out = array(); - foreach ( $categories as $c ) - $out[] = " " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . ""; - echo join( ', ', $out ); - } else { - _e('Uncategorized', 'wpsc'); - } - ?> - - >ID); - if ( !empty( $tags ) ) { - $out = array(); - foreach ( $tags as $c ) - $out[] = " " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . ""; - echo join( ', ', $out ); - } else { - _e('No Tags', 'wpsc'); - } - ?> - ID, '_wpsc_sku', true); - ?> - > - - - - ID, '_wpsc_special_price', true); - ?> - > - - - - - >
- '; - comments_number("" . /* translators: comment count link */ _x('0', 'comment count', 'wpsc') . '', "" . /* translators: comment count link */ _x('1', 'comment count', 'wpsc') . '', "" . /* translators: comment count link: % will be substituted by comment count */ _x('%', 'comment count', 'wpsc') . ''); - if ( $pending_comments ) - echo ''; - ?> -
- - > - - - - " . __('Edit', 'wpsc') . ""; } ?> - - ID) . "' class='delete'>" . __('Delete', 'wpsc') . ""; } ?> - - ID); ?> - - >ID); ?> - - -get_var($purchlog); - $usersql = "SELECT DISTINCT `".WPSC_TABLE_SUBMITED_FORM_DATA."`.value, `".WPSC_TABLE_CHECKOUT_FORMS."`.* FROM `".WPSC_TABLE_CHECKOUT_FORMS."` LEFT JOIN `".WPSC_TABLE_SUBMITED_FORM_DATA."` ON `".WPSC_TABLE_CHECKOUT_FORMS."`.id = `".WPSC_TABLE_SUBMITED_FORM_DATA."`.`form_id` WHERE `".WPSC_TABLE_SUBMITED_FORM_DATA."`.log_id=".$id." ORDER BY `".WPSC_TABLE_CHECKOUT_FORMS."`.`checkout_order`" ; - $formfields = $wpdb->get_results($usersql); - - - - if(count($formfields) < 1){ - $usersql = "SELECT DISTINCT `".WPSC_TABLE_CHECKOUT_FORMS."`.* FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `type` != 'heading'"; - $formfields = $wpdb->get_results($usersql); - - } -if(isset($_POST)){ - foreach($_POST as $key=>$value){ - if($value != '-1'){ - $sql = "UPDATE `".WPSC_TABLE_CHECKOUT_FORMS."` SET `unique_name`='".$value."' WHERE id=".$key; - $complete = $wpdb->query($sql); - } - $numChaged++; - $numQueries ++; - } - - $sql = "UPDATE `".WPSC_TABLE_CHECKOUT_FORMS."` SET `unique_name`='delivertoafriend' WHERE `name` = '2. Shipping details'"; - $wpdb->query($sql); - - add_option('wpsc_purchaselogs_fixed',true); -} -function wpsc_select_options_purchlogs_fix($id){ - ?> - - - -
- -

'; - _e( 'Check Out Form Fields updated.', 'wpsc' ); - echo '

'; - } - - ?> - -

-

- -
-
- - name,$duplicate) && $fields->name != 'State'){ - echo '
'; - echo '

Billing '.$fields->name.'

'; - echo '
'; - echo ''; - echo wpsc_select_options_purchlogs_fix($fields->id); - echo '
'; - echo '
'; - $duplicate[] = $fields->name; - }else{ - echo '
'; - echo '

Shipping '.$fields->name.'

'; - echo '
'; - echo ''; - echo wpsc_select_options_purchlogs_fix($fields->id); - echo '
'; - echo '
'; - - } - - } - ?> - ' class='button-secondary action' /> -
-
-
\ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/save-data.functions.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/save-data.functions.php deleted file mode 100644 index af7f8b2..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/save-data.functions.php +++ /dev/null @@ -1,646 +0,0 @@ -$value ){ - if( !wpsc_update_meta( $value, 'sort_order', $key, 'wpsc_category' ) ) - $result = false; - } - -} - -/** - * Remove the AJAX response on the categories page. Necessary for allowing for image upload. - * @param nothing - * @return nothing - */ - -function wpsc_cat_kill_ajax() { - global $current_screen; - - if( $current_screen->id == 'edit-wpsc_product_category' ) { - wp_deregister_script( 'wp-ajax-response' ); - wp_deregister_script( 'admin-tags' ); - wp_deregister_script( 'inline-edit-post' ); - } -} - -add_action( 'admin_head', 'wpsc_cat_kill_ajax' ); -add_filter( 'manage_edit-wpsc_product_category_columns', 'wpsc_custom_category_columns' ); -add_filter( 'manage_wpsc_product_category_custom_column', 'wpsc_custom_category_column_data', 10, 3); -add_action( 'wpsc_product_category_add_form_fields', 'wpsc_admin_category_forms_add' ); // After left-col -add_action( 'wpsc_product_category_edit_form_fields', 'wpsc_admin_category_forms_edit' ); // After left-col -add_action( 'created_wpsc_product_category', 'wpsc_save_category_set', 10 , 2 ); //After created -add_action( 'edited_wpsc_product_category', 'wpsc_save_category_set', 10 , 2 ); //After saved - -/** - * wpsc_custom_category_columns - * Adds images column to category column. - * @internal Don't feel handle column is necessary, but you would add it here if you wanted to - * @param (array) columns | Array of columns assigned to this taxonomy - * @return (array) columns | Modified array of columns - */ - -function wpsc_custom_category_columns( $columns ) { - // Doing it this funny way to ensure that image stays in far left, even if other items are added via plugin. - unset( $columns["cb"] ); - - $custom_array = array( - 'cb' => '', - 'image' => __( 'Image', 'wpsc' ) - ); - - $columns = array_merge( $custom_array, $columns ); - - return $columns; -} -/** - * wpsc_custom_category_column_data - * Adds images to the custom category column - * @param (array) column_name | column name - * @return nada - */ - -function wpsc_custom_category_column_data( $string, $column_name, $term_id ) { - global $wpdb; - - $image = wpsc_get_categorymeta( $term_id, 'image' ); - $name = get_term_by( 'id', $term_id, 'wpsc_product_category' ); - $name = $name->name; - - if( !empty( $image ) ) - $image = "".$name.""; - else - $image = "".$name.""; - - - return $image; - -} - -/** - * wpsc_admin_get_category_array - * Recursively step through the categories and return it in a clean multi demensional array - * for use in other list functions - * @param int $parent_id - */ -function wpsc_admin_get_category_array($parent_id = null){ - global $wpdb; - $orderedList = array(); - if(!isset($parent_id)) $parent_id = 0; - $category_list = get_terms('wpsc_product_category','hide_empty=0&parent='.$parent_id); - if(!is_array($category_list)){ - return false; - } - foreach($category_list as $category){ - $category_order = wpsc_get_categorymeta($category->term_id, 'order'); - $category_image = wpsc_get_categorymeta($category->term_id, 'image'); - if(!isset($category_order) || $category_order == 0) $category_order = (count($orderedList) +1); - print ""; - $orderedList[$category_order]['id'] = $category->term_id; - $orderedList[$category_order]['name'] = $category->name; - $orderedList[$category_order]['image'] = $category_image; - $orderedList[$category_order]['parent_id'] = $parent_id; - $orderedList[$category_order]['children'] = wpsc_admin_get_category_array($category->term_id); - } - - ksort($orderedList); - return($orderedList); -} - -/** - * wpsc_admin_category_group_list, prints the left hand side of the add categories page - * nothing returned - */ -function wpsc_admin_category_forms_add() { - global $wpdb; - $category_value_count = 0; - ?> - -

- -
-

- -
- - - - - -

- - - - - - - - - - -

- - - - -

- - - - - - - - - - ' name='image_width' size='6'/> - ' name='image_height' size='6'/>
- - - -
-
- - -
-

-
get_results("SELECT id,country,visible FROM `".WPSC_TABLE_CURRENCY_LIST."` ORDER BY country ASC ",ARRAY_A); - $selectedCountries = wpsc_get_meta($category_id,'target_market','wpsc_category'); - $output = ''; - $output .= " \n\r"; - $output .= " \n\r"; - $output .= __('Target Markets', 'wpsc').":\n\r"; - $output .= " \n\r"; - $output .= " \n\r"; - - if(@extension_loaded('suhosin')) { - $output .= "".__("The Target Markets feature has been disabled because you have the Suhosin PHP extension installed on this server. If you need to use the Target Markets feature then disable the suhosin extension, if you can not do this, you will need to contact your hosting provider. - ",'wpsc').""; - - } else { - $output .= "Select: All  None
"; - $output .= "
\n\r"; - foreach($countrylist as $country){ - if(in_array($country['id'], (array)$selectedCountries)){ - $output .= " ".$country['country']."
\n\r"; - } else { - $output .= " ".$country['country']."
\n\r"; - } - } - $output .= "


"; - $output .= " Select the markets you are selling this category to.\n\r"; - } - $output .= " \n\r"; - $output .= " \n\r"; - - echo $output; - ?> -
-
- - -
-

-
- - - - - - - - - - - -
- - - -
- - - /> - /> -
-
-
- - - - - -
- - - - -

- - - - - - - - - -
- - - - - - - - -
-
- - - - - - - - - - ' name='image_width' size='6' /> - ' name='image_height' size='6' />
- - - - -

- - - - - - - - [wpsc_products category_url_name='']
- - - - - - - - - <?php echo wpsc_display_products_page( array( 'category_url_name'=>'' ) ); ?>
- - - - - - - - -

- - - get_results( "SELECT id,country,visible FROM `".WPSC_TABLE_CURRENCY_LIST."` ORDER BY country ASC ",ARRAY_A ); - $selectedCountries = wpsc_get_meta( $category_id,'target_market','wpsc_category' ); - ?> - - - - - - - - - - :  
-
- ".$country['country']."
"; - else - echo " ".$country['country']."
"; - } - ?> -
-
- - - - - - - -

- - - - - - - - -
- - - - - - - - - /> - /> -
- - - - 10 && (int) $_POST['width'] < 512 ) && ((int)$_POST['height'] > 10 && (int)$_POST['height'] < 512) ) { - $width = (int) $_POST['width']; - $height = (int) $_POST['height']; - image_processing( $_FILES['image']['tmp_name'], ( WPSC_CATEGORY_DIR.$_FILES['image']['name'] ), $width, $height ); - } else { - image_processing( $_FILES['image']['tmp_name'], ( WPSC_CATEGORY_DIR.$_FILES['image']['name'] ) ); - } - $image = $wpdb->escape( $_FILES['image']['name'] ); - } else { - $new_image_path = ( WPSC_CATEGORY_DIR.basename($_FILES['image']['name'] ) ); - move_uploaded_file( $_FILES['image']['tmp_name'], $new_image_path ); - $stat = stat( dirname( $new_image_path ) ); - $perms = $stat['mode'] & 0000666; - @ chmod( $new_image_path, $perms ); - $image = $wpdb->escape( $_FILES['image']['name'] ); - } - } else { - $image = ''; - } - //Good to here - - if( isset( $_POST['tag_ID'] ) ) { - //Editing - $category_id= $_POST['tag_ID']; - $category = get_term_by( 'id', $category_id, 'wpsc_product_category' ); - $url_name=$category->slug; - - } - if(isset($_POST['deleteimage']) && $_POST['deleteimage'] == 1) { - wpsc_delete_categorymeta($category_id, 'image'); - } else if($image != '') { - wpsc_update_categorymeta($category_id, 'image', $image); - } - - if ( !empty( $_POST['height'] ) && is_numeric( $_POST['height'] ) && !empty( $_POST['width'] ) && is_numeric( $_POST['width'] ) && $image == null ) { - $imagedata = wpsc_get_categorymeta($category_id, 'image'); - if($imagedata != null) { - $height = $_POST['height']; - $width = $_POST['width']; - $imagepath = WPSC_CATEGORY_DIR . $imagedata; - $image_output = WPSC_CATEGORY_DIR . $imagedata; - image_processing($imagepath, $image_output, $width, $height); - } - } - - wpsc_update_categorymeta($category_id, 'fee', '0'); - wpsc_update_categorymeta($category_id, 'active', '1'); - wpsc_update_categorymeta($category_id, 'order', '0'); - - if ( isset( $_POST['display_type'] ) ) - wpsc_update_categorymeta($category_id, 'display_type',$wpdb->escape(stripslashes($_POST['display_type']))); - - if ( isset( $_POST['image_height'] ) ) - wpsc_update_categorymeta($category_id, 'image_height', $wpdb->escape(stripslashes($_POST['image_height']))); - - if ( isset( $_POST['image_width'] ) ) - wpsc_update_categorymeta($category_id, 'image_width', $wpdb->escape(stripslashes($_POST['image_width']))); - - - if ( ! empty( $_POST['use_additional_form_set'] ) ) { - wpsc_update_categorymeta($category_id, 'use_additonal_form_set', $_POST['use_additonal_form_set']); - } else { - wpsc_delete_categorymeta($category_id, 'use_additonal_form_set'); - } - - if ( ! empty( $_POST['uses_billing_address'] ) ) { - wpsc_update_categorymeta($category_id, 'uses_billing_address', 1); - $uses_additional_forms = true; - } else { - wpsc_update_categorymeta($category_id, 'uses_billing_address', 0); - $uses_additional_forms = false; - } - - if( ! empty( $_POST['countrylist2'] ) && ($category_id > 0)){ - $AllSelected = false; - $countryList = $wpdb->get_col("SELECT `id` FROM `".WPSC_TABLE_CURRENCY_LIST."`"); - - if($AllSelected != true){ - $unselectedCountries = array_diff($countryList, $_POST['countrylist2']); - //find the countries that are selected - $selectedCountries = array_intersect($countryList, $_POST['countrylist2']); - wpsc_update_categorymeta( $category_id, 'target_market', $selectedCountries); - } - - } elseif ( ! isset($_POST['countrylist2'] ) ){ - wpsc_update_categorymeta( $category_id, 'target_market',''); - $AllSelected = true; - } - - } -} - - -?> \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/admin.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/admin.php deleted file mode 100644 index 5976981..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/admin.php +++ /dev/null @@ -1,174 +0,0 @@ - -
-
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
: - ' name='wpsc_options[max_downloads]' /> -
- : - - />   - />
-
- : - - />   - />
- - - - -
- : - - ' /> -
- : - - ' /> -
- : - - ' /> -
- : - - -
-

:

- - - - - - - - - - - - - - - - - - -
: %purchase_id%, %shop_name%, %product_list%, %total_price%, %total_shipping%, %find_us%, %total_tax%
- - - -
- - - -
- -

:

- - - - - - - - - - - - -
- - - -
' />
- - - -
- - - - -
-
-
- - \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/checkout.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/checkout.php deleted file mode 100644 index 5e75500..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/checkout.php +++ /dev/null @@ -1,233 +0,0 @@ - __('Drag', 'wpsc'), - 'name' => __('Name', 'wpsc'), - 'type' => __('Type', 'wpsc'), - 'unique_names' => __('Unique Names', 'wpsc'), - 'mandatory' => __('Mandatory', 'wpsc'), - 'trash' => __('Trash', 'wpsc'), - ); - register_column_headers('display-checkout-list', $columns); - - - ?> - -
-
- - - -
-
- -

-
- - - - - - - - - - - - - - - - - - - -
: - - />   - /> - - ' class='flag_email' href='#' > -
: - /> -   - /> - -
: - - />   - /> - - ' class='flag_email' href='#' > -
-
-
-
-

-

- -

- - - - -

- -

- - -

- - escape($_GET['checkout-set']); - $form_sql = "SELECT * FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `active` = '1' AND `checkout_set` IN ('".$filter."') ORDER BY `checkout_order`;"; - } - $email_form_field = $wpdb->get_row("SELECT `id` FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `type` IN ('email') AND `active` = '1' ORDER BY `checkout_order` ASC LIMIT 1",ARRAY_A); - - - $form_data = $wpdb->get_results($form_sql,ARRAY_A); - if (!isset($_GET['checkout-set'])) $_GET['checkout-set'] = ''; - - $selected_checkout_set = esc_attr($_GET['checkout-set']); - echo ""; - ?> - - - - - - - - - - - - - - - \n\r"; - echo ''; - echo ""; - - echo " "; - $checked = ""; - echo ""; - if($form_field['mandatory']) { - $checked = "checked='checked'"; - } - echo " "; - - - echo " "; - - echo " - "; - - } - ?> - - -
roll-over-drag"; - echo ""; - if(in_array($form_field['type'], array('select','radio','checkbox'))){ - echo "" . __('more options', 'wpsc') . ""; - } - echo "".__("; - - if($email_form_field['id'] == $form_field['id']) { - echo " "; - } - echo "
- -

- - - - ' /> - -

- -
- - \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/gateway.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/gateway.php deleted file mode 100644 index 7fa078a..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/gateway.php +++ /dev/null @@ -1,151 +0,0 @@ -" . esc_attr( $gateway['name'] ) . ""; - } - } - $nogw = ''; - $gatewaylist = "" . $gatewaylist; -?> - - - -
-
-
- - - - - - - - - -
-
-

-
-

-
- - -
- -

' id='_id' /> -

-
- -
- -

' id='_id' /> -

- -
- - ' name='updateoption' /> -
-
-
- -

- Sign up for PayPal and start accepting credit card payments instantly.

- Sign up for Google Checkout - -
-
- -

-
- - -
- -
> - - ' name='updateoption' /> -
-
-
-
-
-
- - \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/general.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/general.php deleted file mode 100644 index d7adbb6..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/general.php +++ /dev/null @@ -1,164 +0,0 @@ - -
-
-

- - - - - - - get_results( "SELECT id,country,visible FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY country ASC ", ARRAY_A ); - ?> - - - - -
: - - - get_results( "SELECT `" . WPSC_TABLE_REGION_TAX . "`.* FROM `" . WPSC_TABLE_REGION_TAX . "`, `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `" . WPSC_TABLE_CURRENCY_LIST . "`.`isocode` IN('" . esc_attr( get_option( 'base_country' ) ) . "') AND `" . WPSC_TABLE_CURRENCY_LIST . "`.`id` = `" . WPSC_TABLE_REGION_TAX . "`.`country_id`", ARRAY_A ); - if ( !empty( $region_list ) ) { ?> - - - - - -
-
- : - - 0) && (@ini_get( 'suhosin.post.max_vars' ) < 500) ) { - echo "" . __( "The Target Markets feature has been disabled because you have the Suhosin PHP extension installed on this server. If you need to use the Target Markets feature then disable the suhosin extension, if you can not do this, you will need to contact your hosting provider.", 'wpsc' ) . ""; - } else { - ?> - All None' , 'wpsc') , add_query_arg( array( 'selected_all' => 'all' ) ), add_query_arg( array( 'selected_all' => 'none' ) ) ); ?>
-
- - ' checked='checked' />
- - ' />
- -

- -
- -

:

- - - - - - - - - - - - - -
: - -
: - - /> -   - /> -   - /> -   - /> - -
: - :
- :
- 1000000 -
- -
- - - -
-
-
- \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/import.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/import.php deleted file mode 100644 index d55e787..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/import.php +++ /dev/null @@ -1,170 +0,0 @@ -Import - * @package WP e-Commerce - */ -function wpsc_options_import() { - global $wpdb; -?> -
' class='wpsc_form_track'> -
-You can import your products from a comma delimited text file.

An example of a csv import file would look like this:

Description, Additional Description, Product Name, Price, SKU, weight, weight unit, stock quantity, is limited quantity

', 'wpsc' ); ?> - - - - - - - -

-
- - -
-

-
- - -
- -
-
- -
-
-
- - $datum ) { -?> -
-

-
- - -
- - -
-
- -
-
-
- - - - -
-
" . __('There was an error while uploading your csv file.', 'wpsc'); - } - } - if ( isset( $_POST['csv_action'] ) && ('import' == $_POST['csv_action']) ) { - global $wpdb; - $cvs_data = $_SESSION['cvs_data']; - $column_data = $_POST['column']; - $value_data = $_POST['value_name']; - - $status = esc_attr($_POST['post_status']); - - $name = array( ); - foreach ( $value_data as $key => $value ) { - - $cvs_data2[$value] = $cvs_data[$key]; - } - $num = count( $cvs_data2['name'] ); - - for ( $i = 0; $i < $num; $i++ ) { - $product_columns = array( - 'post_title' => esc_attr( $cvs_data2['name'][$i] ), - 'content' => esc_attr( $cvs_data2['description'][$i] ), - 'additional_description' => esc_attr( $cvs_data2['additional_description'][$i] ), - 'price' => esc_attr( str_replace( '$', '', $cvs_data2['price'][$i] ) ), - 'weight' => esc_attr( $cvs_data2['weight'][$i] ), - 'weight_unit' => esc_attr( $cvs_data2['weight_unit'][$i] ), - 'pnp' => null, - 'international_pnp' => null, - 'file' => null, - 'image' => '0', - 'quantity_limited' => esc_attr( $cvs_data2['quantity_limited'][$i] ), - 'quantity' => esc_attr( $cvs_data2['quantity'][$i] ), - 'special' => null, - 'special_price' => null, - 'display_frontpage' => null, - 'notax' => null, - 'active' => null, - 'donation' => null, - 'no_shipping' => null, - 'thumbnail_image' => null, - 'thumbnail_state' => null, - 'meta' => array( - '_wpsc_price' => esc_attr( str_replace( '$', '', $cvs_data2['price'][$i] ) ), - '_wpsc_sku' => esc_attr( $cvs_data2['sku'][$i] ), - '_wpsc_stock' => esc_attr( $cvs_data2['quantity'][$i] ), - '_wpsc_limited_stock' => esc_attr( $cvs_data2['quantity_limited'][$i] ), - '_wpsc_product_metadata' => array( - 'weight' => esc_attr( $cvs_data2['weight'][$i] ), - 'weight_unit' => esc_attr( $cvs_data2['weight_unit'][$i] ), - ) - ) - ); - $product_columns = wpsc_sanitise_product_forms( $product_columns ); - // status needs to be set here because wpsc_sanitise_product_forms overwrites it :/ - $product_columns['post_status'] = $status; - $product_id = wpsc_insert_product( $product_columns ); - wp_set_object_terms( $product_id , array( (int)$_POST['category'] ) , 'wpsc_product_category' ); - } - echo "

". sprintf(__("Success, your products have been upload.", "wpsc"), admin_url('edit.php?post_type=wpsc-product')); - } -?> -
-
- diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/marketing.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/marketing.php deleted file mode 100644 index a362bff..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/marketing.php +++ /dev/null @@ -1,108 +0,0 @@ - Marketing page - * @access public - * - * @since 3.8 - * @param null - * @return null - */ -function wpsc_options_marketing() { - - /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ - wpsc_settings_page_update_notification(); ?> - -
- - -
- - - - -
- -

- - type='checkbox' name='wpsc_also_bought' /> - -


-

- - type='checkbox' name='wpsc_share_this' /> - -


-

- - type='checkbox' name='display_find_us' /> - -


-

- - - type='checkbox' name='wpsc_options[wpsc_facebook_like]' /> - -


-
- - - ' name='form_submit' /> -
-
- - - -

-

:

- - - -

Google Merchant Centre so that they appear within Google Product Search results, sign up for a Google Merchant Centre account and add a scheduled data feed with the following URL:', 'wpsc' ); ?>

- - - - - - diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/presentation.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/presentation.php deleted file mode 100644 index 5e26336..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/presentation.php +++ /dev/null @@ -1,1265 +0,0 @@ - Presentation - * - * @package wp-e-commerce - * @since 3.7 - */ - -/** - * Metabox for theme moving - * Location: Settings > Presentation page in WP-Admin - * @access public - * - * @since 3.8 - * @param null - * @return null - */ -function wpsc_theme_presentation_page_metabox(){ - - $wpsc_templates = wpsc_list_product_templates(); - $themes_location = wpsc_check_theme_location(); - $themes_copied = false; //Check to see whether themes have been copied to selected Theme Folder - $themes_backedup = false; //Check to see whether themes have recently been backedup - $themes_in_uploads = false; //Check to see whether themes live in the uploads directory - - if ( isset( $_SESSION['wpsc_themes_copied'] ) && ( true == $_SESSION['wpsc_themes_copied'] ) ) - $themes_copied = true; - - if ( isset( $_SESSION['wpsc_themes_backup'] ) && ( true == $_SESSION['wpsc_themes_backup'] ) ) - $themes_backedup = true; - - if ( wpsc_count_themes_in_uploads_directory() > 0 ) { - $themes_in_uploads = true; - - foreach( (array)$themes_location as $location ) - $new_location[] = str_ireplace( 'wpsc-','', $location ); - - $themes_location = $new_location; - } - - // Used to flush transients - @since 3.8-development - if ( true === $themes_copied ) - do_action( 'wpsc_move_theme' ); - -?> -
-
-

-
- - -
-

-
- -
- -

- -

- -
- -
-

-

URL:

-
- -

- - -

-

- -

-
    - -
  • value='' name='wpsc_templates_to_port[]' /> -
  • - -
-

- -

-

- -

- -

-

-

/wp-content/uploads/wpsc/theme_backup/

-

- Backup Your WordPress Theme', 'wpsc' ), wp_nonce_url( 'admin.php?wpsc_admin_action=backup_themes', 'backup_themes' ) ); ?> -
-

- -
-

-

Flush Theme Cache', 'wpsc' ), wp_nonce_url( 'admin.php?wpsc_flush_theme_transients=true', 'wpsc_flush_theme_transients' ) ); ?>

-
-
-
-
-
-"; - - if ( $current_default == 'all' ) - $selected = "selected='selected'"; - else - $selected = ''; - - $categorylist .= ""; - - if ( $current_default == 'list' ) - $selected = "selected='selected'"; - else - $selected = ''; - - $categorylist .= ""; - - $categorylist .= ""; - foreach ( $group_data as $group ) { - $selected = ""; - if ( $current_default == $group->term_id ) - $selected = "selected='selected'"; - else - $selected = ""; - - $categorylist .= ""; - $category_data = get_terms( 'wpsc_product_category', 'hide_empty=0&parent=' . $group->term_id ); - if ( $category_data != null ) { - foreach ( $category_data as $category ) { - if ( $current_default == $category->term_id ) - $selected = "selected='selected'"; - else - $selected = ""; - $categorylist .= ""; - } - } - } - $categorylist .= ""; - $categorylist .= ""; - return $categorylist; -} - -/** - * options presentation is the main function for displaying the WP-Admin : Settings > Presentation page - * @access public - * - * @since 3.7 - * @param null - * @return null - */ -function wpsc_options_presentation() { - global $wpdb; - -?> - -
-
- - - -
-

- - - - - - - - - - - -
: - - /> -  
- - type='radio' value='1' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow2' /> -
- -
: - - />   - /> -
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
: - - />   - /> -
- - - />   - />   -
- : - - - />   - /> -
: - - />   - /> -
: - - /> -   - /> - -
: - - /> -   - /> - -
-
- - - -
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
: - - - -
- ' /> -
- - - /> -
- - - /> -
- - - /> -
- - - /> -
- - - /> - -
- /> - /> -
-
: - -
- : - - -
: - - />   - /> -
- : - - - />   - /> -
- : - - - />   - /> -
: - - />   - /> - -
id='wpsc_advanced_search'> - - value='1' /> -
- - value='1' /> -
- - value='1' /> - -
-
: - - />   - /> -
: - - />   - /> -
- -

- - - - - - - - - - -
: - - />   - - />   - - ' title='' />   - - />   - - ' title='' />   - - /> -
-

- name="wpsc_options[dropshop_display]" /> - name="wpsc_options[dropshop_display]"/> -

-

- name="wpsc_options[wpsc_dropshop_theme]" /> - name="wpsc_options[wpsc_dropshop_theme]"/> - name="wpsc_options[wpsc_dropshop_theme]"/> - -

-
-
- : - - - />   - /> -
- -

- - - - - - - - - - - - - - - - - - - - - - - - - -
: - - />   - /> -
- : - - - />   - /> -
- : - - - />   - /> -
: - - />   - /> -
- - -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
: - :' /> - :' /> - -
- : - - :' /> - :' /> -
- : - - :' /> - :' /> -
- - : - - />   - />
- -
: - - />   - /> -
: - - />   - />
- -
: - - />   - />
-
- : - - - />   - /> -
- : - - :' /> - :' />
- -
- - -

- - - - - - - - - - -
- : - - - />   - />
-
> - ' /> -
-
- : - - />    - />   - />  -
-
- - -

- - - - - - - - - - - - -
- : - intensedebate-logo - - - />   - />
-
> - :
- ' />
- -
-
-
> - : -
-
-
> - />  - />  -
-
-
- - -
- - - -
-
-
- diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/shipping.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/shipping.php deleted file mode 100644 index bb286ef..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/shipping.php +++ /dev/null @@ -1,274 +0,0 @@ - $module ) { - if(empty($module))continue; - if ( isset( $module->is_external ) && ($module->is_external == true) ) { - $external_shipping_modules[$key] = $module; - } else { - $internal_shipping_modules[$key] = $module; - } - } - $currency_data = $wpdb->get_row( "SELECT `symbol`,`symbol_html`,`code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id`='" . get_option( 'currency_type' ) . "' LIMIT 1", ARRAY_A ); - if ( $currency_data['symbol'] != '' ) { - $currency_sign = $currency_data['symbol_html']; - } else { - $currency_sign = $currency_data['code']; - } - //get shipping options that are selected - $selected_shippings = get_option( 'custom_shipping_options' ); -?> -
- - -
-
- - - - - - -
-

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-: - - - />   - />
- -
- ' /> -
-
- ' /> -
-
- : - - />   - /> - -
> - - - - -
:
:
Sync product
-
-
- - - - />   - /> - -
  - -
id='shipping_discount_value'> - - will receive free shipping.', 'wpsc'), $currency_sign, $value ); ?> -
- - -
-
> - ' name='updateoption' /> -
-
-
-
- - - - - - -
- -
-

-
- -

- If you want to use fixed-price shipping options like "Pickup - $0, Overnight - $10, Same day - $20, etc." you can download a WordPress plugin from plugins directory for Simple shipping. It will appear in the list as "Fixed rate".', 'wpsc' ); ?> -

-
-

- -

- checked = ''; - if ( is_object( $shipping ) && in_array( $shipping->getInternalName(), (array)$selected_shippings ) ) - $shipping->checked = ' checked = "checked" '; - ?> - -
- - -

checked; ?> type='checkbox' value='internal_name; ?>' id='internal_name; ?>_id' />

-
- -
-

- - -
- -

- requires_curl) && ($shipping->requires_curl == true) && !function_exists( 'curl_init' ) ) { - $disabled = "disabled='disabled'"; - } - $shipping->checked = ''; - if ( in_array( $shipping->getInternalName(), (array)$selected_shippings ) ) - $shipping->checked = " checked='checked' "; - ?> -
- -

name='custom_shipping_options[]' checked; ?> type='checkbox' value='internal_name; ?>' id='internal_name; ?>_id' />

-
- - -
- - ' name='updateoption'/> -
- -
-
-
-
-

-
- - -
- -
> - ' name='updateoption' /> -
-
-
-
- -
-
- - diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/taxes.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/taxes.php deleted file mode 100644 index 821deda..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/taxes.php +++ /dev/null @@ -1,188 +0,0 @@ -wpec_taxes->wpec_taxes_get_options(); - - //include standard shopping cart notifications - wpsc_settings_page_update_notification(); -?> -
-
-

-

- -

-

- -

-

- -

-

-

- -

-

- -

- -

-

- -

-

- -

-

- -

-
-

-

- -

-

- -

-
-
-

-
- -wpec_taxes_isincluded() ) { - echo '

' . __( 'Note: Tax is not applied to shipping when product prices are tax inclusive.' ) . '

'; - }// if - **/ - - //get current tax rates - $tax_rates = $wpec_taxes_controller->wpec_taxes->wpec_taxes_get_rates(); - $tax_rate_count = 0; - if ( !empty( $tax_rates ) ) { - foreach ( $tax_rates as $tax_rate ) { - echo $wpec_taxes_controller->wpec_taxes_build_form( $tax_rate_count, $tax_rate ); - $tax_rate_count++; - }// foreach - }// if -?> - -

- -

-
-
-
-

-
- -' . __( 'Note: Tax Bands are special tax rules you can create and apply on a per-product basis.
Please visit the product page to apply your Tax Band.', 'wpsc' ) . '

'; - - //echo message regarding inclusive tax - if ( !$wpec_taxes_controller->wpec_taxes_isincluded() ) { - echo '

' . __( 'Note: Tax Bands do not take affect when product prices are tax exclusive.', 'wpsc' ) . '

'; - }// if - - $tax_bands = $wpec_taxes_controller->wpec_taxes->wpec_taxes_get_bands(); - $tax_band_count = 0; - if ( !empty( $tax_bands ) ) { - foreach ( $tax_bands as $tax_band ) { - echo $wpec_taxes_controller->wpec_taxes_build_form( $tax_band_count, $tax_band, 'bands' ); - $tax_band_count++; - }// foreach - }// if -?> -

- -

-
-
-
- -
- - - -
-
-
- diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/tax_and_shipping.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/tax_and_shipping.php deleted file mode 100644 index bf5e1e1..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/tax_and_shipping.php +++ /dev/null @@ -1,68 +0,0 @@ - -
-

- "; - } - ?> -
- get_row("SELECT * FROM `".WPSC_TABLE_CURRENCY_LIST."` WHERE `isocode` IN('".$country_isocode."') LIMIT 1",ARRAY_A); - if(($country_data['has_regions'] == 1)) - { - $region_data = $wpdb->get_results("SELECT `".WPSC_TABLE_REGION_TAX."`.* FROM `".WPSC_TABLE_REGION_TAX."` WHERE `".WPSC_TABLE_REGION_TAX."`.`country_id` IN('".$country_data['id']."') ",ARRAY_A) ; - $region_data = array_chunk($region_data, 14); - - echo "\n\r"; - echo " \n\r"; - foreach($region_data as $region_col) - { - echo " \n\r"; - } - echo " \n\r"; - echo "
\n\r"; - echo "\n\r"; - foreach($region_col as $region) - { - $tax_percentage = $region['tax']; - echo " \n\r"; - if($region['id'] == $base_region) - { - echo " \n\r"; - } - else - { - echo " \n\r"; - } - echo " \n\r"; - echo " \n\r"; - } - echo "
%
\n\r"; - echo "
\n\r"; - } - else - { - $tax_percentage = $country_data['tax']; - echo " "; - echo "%"; - } - ?> - - ' /> -
-
\ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/updating-functions.php b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/updating-functions.php deleted file mode 100644 index 19e3dc6..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/updating-functions.php +++ /dev/null @@ -1,882 +0,0 @@ -timeout = ini_get( 'max_execution_time' ); - $this->script_start = time(); - - if ( ! $this->stages = get_transient( 'wpsc_update_progress' ) ) { - $this->stages = array(); - } - } - - public function clean_up() { - delete_transient( 'wpsc_update_progress' ); - delete_transient( 'wpsc_update_product_offset' ); - delete_transient( 'wpsc_update_variation_comb_offset' ); - delete_transient( 'wpsc_update_current_product' ); - delete_transient( 'wpsc_update_current_child_products' ); - } - - public function check_timeout() { - $safety = 2; // refresh page within 2 seconds of PHP max execution time limit - $wiggle_room = $this->timeout - $safety; - - $terminate = time() - $this->script_start >= $wiggle_room; - - if ( $terminate ) { - do_action( 'wpsc_update_timeout_terminate' ); - $location = remove_query_arg( array( 'start_over', 'eta', 'current_percent' ) ); - $location = add_query_arg( 'run_updates', 1, $location ); - $location = apply_filters( 'wpsc_update_terminate_location', $location ); - ?> - - {$message}

"; - - if ( empty( $this->stages[$function] ) ) { - call_user_func( 'wpsc_' . $function ); - $this->stages[$function] = true; - set_transient( 'wpsc_update_progress', $this->stages, 604800 ); - } - } -} - -class WPSC_Update_Progress -{ - private $milestone; - private $start; - private $count; - private $current_percent = 0; - private $total; - private $eta; - private $i; - - public function __construct( $total ) { - $this->total = $total; - $this->milestone = $this->start = time(); - if ( ! empty( $_REQUEST['current_percent'] ) ) - $this->current_percent = (int) $_REQUEST['current_percent']; - - add_filter( 'wpsc_update_terminate_location', array( $this, 'filter_terminate_location' ) ); - - echo '
'; - if ( ! empty( $_REQUEST['start_over'] ) ) - return; - - if ( isset( $_REQUEST['current_percent'] ) ) { - echo "
 
"; - } - - if ( isset( $_REQUEST['eta'] ) ) { - $this->eta = (int) $_REQUEST['eta']; - $this->print_eta(); - } - - if ( isset( $_REQUEST['i'] ) ) - echo "{$_REQUEST['i']}/{$this->total}"; - } - - public function filter_terminate_location( $location ) { - $location = add_query_arg( array( - 'current_percent' => $this->current_percent, - 'i' => $this->i, - ), $location ); - if ( $this->eta !== null ) - $location = add_query_arg( 'eta', $this->eta, $location ); - else - $location = remove_query_arg( 'eta', $location ); - return $location; - } - - private function print_eta() { - echo '
'; - echo __( 'Estimated time left:', 'wpsc' ) . ' '; - if ( $this->eta == 0 ) - echo __( 'Under a minute', 'wpsc' ); - else - printf( _n( '%d minute', '%d minutes', $this->eta ), $this->eta ); - echo '
'; - } - - public function update( $i ) { - if ( empty( $this->count ) ) - $this->count = $i; - - $this->i = $i; - $now = time(); - $percent = min( floor( $i * 100 / $this->total ), 100 ); - - if ( $percent != $this->current_percent ) { - echo "
 
"; - $this->current_percent = $percent; - } - - echo "{$i}/{$this->total}"; - - if ( $now - $this->milestone >= 5 ) { - $processed = $i - $this->count + 1; - $this->eta = floor( ( $this->total - $i ) * ( $now - $this->start ) / ( $processed * 60 ) ); - $this->print_eta(); - $this->milestone = $now; - } - - if ( $percent == 100 ) { - remove_filter( 'wpsc_update_terminate_location', array( $this, 'filter_terminate_location' ) ); - echo '
Done!
'; - echo '
'; - } - } -} - -function wpsc_update_step( $i, $total ) { - static $current; - static $milestone; - static $start; - static $count; - static $current_percent; - - $now = time(); - - if ( $current != $total ) { - $current = $total; - $milestone = $start = $now; - $count = $i; - } - - $percent = min( round( $i * 100 / $total, 2 ), 100 ); - - if ( floor( $percent ) != $current_percent ) { - echo "
 
"; - $current_percent = floor( $percent ); - } - - if ( $now - $milestone == 5 ) { - $processed = $i - $count + 1; - $eta = floor( ( $total - $i ) * ( $now - $start ) / ( $processed * 60 ) ); - echo '
'; - echo __( 'Estimated time left:', 'wpsc' ) . ' '; - if ( $eta == 0 ) - echo __( 'Under a minute', 'wpsc' ); - else - printf( _n( '%d minute', '%d minutes', $eta ), $eta ); - echo '
'; - $milestone = $now; - } -} - -function wpsc_update_purchase_logs() { - global $wpdb; - - // bump all purchase log status - $wpdb->query( "UPDATE " . WPSC_TABLE_PURCHASE_LOGS . " SET processed = processed + 1, plugin_version = '" . WPSC_VERSION . "' WHERE plugin_version IN ('3.6', '3.7') " ); -} - -/** - * wpsc_convert_category_groups function. - * - * @access public - * @return void - */ -function wpsc_convert_category_groups() { - global $wpdb, $user_ID; - $wpsc_update = WPSC_Update::get_instance(); - - //if they're updating from 3.6, and they've got categories with no group, let's fix that problem, eh? - $categorisation_groups = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_CATEGORISATION_GROUPS."` WHERE `active` IN ('1')"); - if(count($categorisation_groups) == 0) { - $sql = "insert into `".WPSC_TABLE_CATEGORISATION_GROUPS."` set `id` = 1000, `name` = 'Default Group', `description` = 'This is your default category group', `active` = 1, `default` = 1;"; - $wpdb->query($sql); - $sql = "update `".WPSC_TABLE_PRODUCT_CATEGORIES."` set group_id = 1000"; - $wpdb->query($sql); - $categorisation_groups = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_CATEGORISATION_GROUPS."` WHERE `active` IN ('1')"); - } - - foreach((array)$categorisation_groups as $cat_group) { - $wpsc_update->check_timeout(); - - $category_id = wpsc_get_meta($cat_group->id, 'category_group_id', 'wpsc_category_group'); - - if(!is_numeric($category_id) || ( $category_id < 1)) { - $new_category = wp_insert_term( $cat_group->name, 'wpsc_product_category', array('description' => $cat_group->description)); - if(!is_wp_error($new_category)) - $category_id = $new_category['term_id']; - - } - if(is_numeric($category_id)) { - - wpsc_update_meta($cat_group->id, 'category_group_id', $category_id, 'wpsc_category_group'); - wpsc_update_categorymeta($category_id, 'category_group_id', $cat_group->id); - - wpsc_update_categorymeta($category_id, 'image', ''); - wpsc_update_categorymeta($category_id, 'uses_billing_address', 0); - } - - if(! isset( $new_category ) || !is_wp_error($new_category)) - wpsc_convert_categories($category_id, $cat_group->id); - } - delete_option("wpsc_product_category_children"); - _get_term_hierarchy('wpsc_product_category'); -} - -/** - * wpsc_convert_categories function. - * - * @access public - * @param int $parent_category. (default: 0) - * @return void - */ -function wpsc_convert_categories($new_parent_category, $group_id, $old_parent_category = 0) { - global $wpdb, $user_ID; - - if($old_parent_category > 0) { - $categorisation = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `active` IN ('1') AND `group_id` IN ('{$group_id}') AND `category_parent` IN ('{$old_parent_category}')"); - } else { - $categorisation = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `active` IN ('1') AND `group_id` IN ('{$group_id}') AND `category_parent` IN (0)"); - } - $wpsc_update = WPSC_Update::get_instance(); - - if($categorisation > 0) { - - foreach((array)$categorisation as $category) { - $wpsc_update->check_timeout(); - $category_id = wpsc_get_meta($category->id, 'category_id', 'wpsc_old_category'); - - if(!is_numeric($category_id) || ( $category_id < 1)) { - $new_category = wp_insert_term( $category->name, 'wpsc_product_category', array('description' => $category->description, 'parent' => $new_parent_category)); - if(!is_wp_error($new_category)) - $category_id = $new_category['term_id']; - } - - if(is_numeric($category_id)) { - - wpsc_update_meta($category->id, 'category_id', $category_id, 'wpsc_old_category'); - wpsc_update_categorymeta($category_id, 'category_id', $category->id); - - wpsc_update_categorymeta($category_id, 'image', $category->image); - wpsc_update_categorymeta($category_id, 'display_type', $category->display_type); - - wpsc_update_categorymeta($category_id, 'image_height', $category->image_height); - wpsc_update_categorymeta($category_id, 'image_width', $category->image_width); - - $use_additonal_form_set = wpsc_get_categorymeta($category->id, 'use_additonal_form_set'); - if($use_additonal_form_set != '') { - wpsc_update_categorymeta($category_id, 'use_additonal_form_set', $use_additonal_form_set); - } else { - wpsc_delete_categorymeta($category_id, 'use_additonal_form_set'); - } - - - wpsc_update_categorymeta($category_id, 'uses_billing_address', (bool)(int)wpsc_get_categorymeta($category->id, 'uses_billing_address')); - - - } - if($category_id > 0) { - wpsc_convert_categories($category_id, $group_id, $category->id); - } - - } - } -} - -function wpsc_convert_variation_sets() { - global $wpdb, $user_ID; - $variation_sets = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_PRODUCT_VARIATIONS."`"); - $wpsc_update = WPSC_Update::get_instance(); - - foreach((array)$variation_sets as $variation_set) { - $wpsc_update->check_timeout(); - $variation_set_id = wpsc_get_meta($variation_set->id, 'variation_set_id', 'wpsc_variation_set'); - - if(!is_numeric($variation_set_id) || ( $variation_set_id < 1)) { - $new_variation_set = wp_insert_term( $variation_set->name, 'wpsc-variation',array('parent' => 0)); - if(!is_wp_error($new_variation_set)) - $variation_set_id = $new_variation_set['term_id']; - } - - if(is_numeric($variation_set_id)) { - wpsc_update_meta($variation_set->id, 'variation_set_id', $variation_set_id, 'wpsc_variation_set'); - - - $variations = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_VARIATION_VALUES."` WHERE `variation_id` IN ({$variation_set->id})"); - foreach((array)$variations as $variation) { - $variation_id = wpsc_get_meta($variation->id, 'variation_id', 'wpsc_variation'); - - if(!is_numeric($variation_id) || ( $variation_id < 1)) { - $new_variation = wp_insert_term( $variation->name, 'wpsc-variation',array('parent' => $variation_set_id)); - - if(!is_wp_error($new_variation)) - $variation_id = $new_variation['term_id']; - } - if(is_numeric($variation_id)) { - wpsc_update_meta($variation->id, 'variation_id', $variation_id, 'wpsc_variation'); - - } - } - } - } -} - -/** - * wpsc_convert_products_to_posts function. - * - * @access public - * @return void - */ -function wpsc_convert_products_to_posts() { - global $wpdb, $user_ID; - // Select all products - $wpsc_update = WPSC_Update::get_instance(); - if ( ! empty($wpdb->charset) ) - $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; - if ( ! empty($wpdb->collate) ) - $charset_collate .= " COLLATE $wpdb->collate"; - - if ( ! $offset = get_transient( 'wpsc_update_product_offset' ) ) - $offset = 0; - $limit = 90; - $sql = " - SELECT * FROM " . WPSC_TABLE_PRODUCT_LIST . " - WHERE active = '1' - LIMIT %d, %d - "; - $post_created = get_transient( 'wpsc_update_current_product' ); - $total = $wpdb->get_var( "SELECT COUNT(*) FROM " . WPSC_TABLE_PRODUCT_LIST . " WHERE active='1'" ); - $progress = new WPSC_Update_Progress( $total ); - - while (true) { - $product_data = $wpdb->get_results( $wpdb->prepare( $sql, $offset, $limit ), ARRAY_A ); - $i = $offset; - - if ( empty( $product_data ) ) - break; - - foreach((array)$product_data as $product) { - $wpsc_update->check_timeout( '' ); - - $post_id = 0; - - // if a product is in the middle of being converted - if ( $post_created && ! empty( $post_created['original_id'] ) && $post_created['original_id'] == $product['id'] ) - $post_id = $post_created['post_id']; - - $sku = old_get_product_meta($product['id'], 'sku', true); - - if($post_id == 0) { - $post_status = "publish"; - if($product['publish'] != 1) { - $post_status = "draft"; - } - - //check the product added time with the current time to make sure its not out - this aviods the future post status - $product_added_time = strtotime($product['date_added']); - $current_time = time(); - - $post_date = $product['date_added']; - if ((int)$current_time < (int)$product_added_time) - $post_date = date("Y-m-d H:i:s"); - - $product_post_values = array( - 'post_author' => $user_ID, - 'post_date' => $post_date, - 'post_content' => $product['description'], - 'post_excerpt' => $product['additional_description'], - 'post_title' => $product['name'], - 'post_status' => $post_status, - 'post_type' => "wpsc-product", - 'post_name' => $product['name'] - ); - - $product['order'] = $wpdb->get_var( $wpdb->prepare( " - SELECT order FROM " . WPSC_TABLE_PRODUCT_ORDER . " - WHERE product_id = %d - " ), $product['id'] ); - - $product_post_values['menu_order'] = $product['order']; - - $post_id = wp_insert_post($product_post_values); - $post_created = array( - 'original_id' => $product['id'], - 'post_id' => $post_id, - ); - set_transient( 'wpsc_update_current_product', $post_created, 604800 ); - } - - $product_meta = $wpdb->get_results(" - SELECT IF( ( `custom` != 1 ), - CONCAT( '_wpsc_', `meta_key` ) , - `meta_key` - ) AS `meta_key`, - `meta_value` - FROM `".WPSC_TABLE_PRODUCTMETA."` - WHERE `product_id` = " . $product['id'] . " - AND `meta_value` != ''", ARRAY_A); - - $post_data = array(); - - foreach($product_meta as $k => $pm) : - if($pm['meta_value'] == 'om') - $pm['meta_value'] = 1; - $pm['meta_value'] = maybe_unserialize($pm['meta_value']); - if(strpos($pm['meta_key'], '_wpsc_') === 0) - $post_data['_wpsc_product_metadata'][$pm['meta_key']] = $pm['meta_value']; - else - update_post_meta($post_id, $pm['meta_key'], $pm['meta_value']); - endforeach; - - - $post_data['_wpsc_original_id'] = (int)$product['id']; - $post_data['_wpsc_price'] = (float)$product['price']; - $post_data['_wpsc_special_price'] = $post_data['_wpsc_price'] - (float)$product['special_price']; // special price get stored in a weird way in 3.7.x - $post_data['_wpsc_stock'] = (float)$product['quantity']; - $post_data['_wpsc_is_donation'] = $product['donation']; - $post_data['_wpsc_sku'] = $sku; - if((bool)$product['quantity_limited'] != true) { - $post_data['_wpsc_stock'] = false; - } - unset($post_data['_wpsc_limited_stock']); - - $post_data['_wpsc_product_metadata']['is_stock_limited'] = (int)(bool)$product['quantity_limited']; - - // Product Weight - $post_data['_wpsc_product_metadata']['weight'] = wpsc_convert_weight($product['weight'], $product['weight_unit'], "pound", true); - $post_data['_wpsc_product_metadata']['weight_unit'] = $product['weight_unit']; - $post_data['_wpsc_product_metadata']['display_weight_as'] = $product['weight_unit']; - - $post_data['_wpsc_product_metadata']['has_no_shipping'] = (int)(bool)$product['no_shipping']; - $post_data['_wpsc_product_metadata']['shipping'] = array('local' => $product['pnp'], 'international' => $product['international_pnp']); - - - $post_data['_wpsc_product_metadata']['quantity_limited'] = (int)(bool)$product['quantity_limited']; - $post_data['_wpsc_product_metadata']['special'] = (int)(bool)$product['special']; - if(isset($post_data['meta'])) { - $post_data['_wpsc_product_metadata']['unpublish_when_none_left'] = (int)(bool)$post_data['meta']['_wpsc_product_metadata']['unpublish_when_none_left']; - } - $post_data['_wpsc_product_metadata']['no_shipping'] = (int)(bool)$product['no_shipping']; - - foreach($post_data as $meta_key => $meta_value) { - // prefix all meta keys with _wpsc_ - update_post_meta($post_id, $meta_key, $meta_value); - } - - // get the wordpress upload directory data - $wp_upload_dir_data = wp_upload_dir(); - $wp_upload_basedir = $wp_upload_dir_data['basedir']; - - $category_ids = array(); - $category_data = $wpdb->get_col("SELECT `category_id` FROM `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."` WHERE `product_id` IN ('{$product['id']}')"); - foreach($category_data as $old_category_id) { - $category_ids[] = wpsc_get_meta($old_category_id, 'category_id', 'wpsc_old_category'); - - } - wp_set_product_categories($post_id, $category_ids); - - $product_data = get_post($post_id); - $image_data = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_PRODUCT_IMAGES."` WHERE `product_id` IN ('{$product['id']}') ORDER BY `image_order` ASC", ARRAY_A); - foreach((array)$image_data as $image_row) { - $wpsc_update->check_timeout( '' ); - // Get the image path info - $image_pathinfo = pathinfo($image_row['image']); - - // use the path info to clip off the file extension - $image_name = basename($image_pathinfo['basename'], ".{$image_pathinfo['extension']}"); - - // construct the full image path - $full_image_path = WPSC_IMAGE_DIR.$image_row['image']; - $attached_file_path = str_replace($wp_upload_basedir."/", '', $full_image_path); - $upload_dir = wp_upload_dir(); - $new_path = $upload_dir['path'].'/'.$image_name.'.'.$image_pathinfo['extension']; - if(is_file($full_image_path)){ - copy($full_image_path, $new_path); - }else{ - continue; - } - // construct the full image url - $subdir = $upload_dir['subdir'].'/'.$image_name.'.'.$image_pathinfo['extension']; - $subdir = substr($subdir , 1); - $attachment_id = (int)$wpdb->get_var("SELECT `ID` FROM `{$wpdb->posts}` WHERE `post_title` IN('$image_name') AND `post_parent` IN('$post_id') LIMIT 1"); - - // get the image MIME type - $mime_type_data = wpsc_get_mimetype($full_image_path, true); - if((int)$attachment_id == 0 ) { - // construct the image data array - $image_post_values = array( - 'post_author' => $user_ID, - 'post_parent' => $post_id, - 'post_date' => $product_data->post_date, - 'post_content' => $image_name, - 'post_title' => $image_name, - 'post_status' => "inherit", - 'post_type' => "attachment", - 'post_name' => sanitize_title($image_name), - 'post_mime_type' => $mime_type_data['mime_type'], - 'menu_order' => absint($image_row['image_order']), - 'guid' => $new_path - ); - $attachment_id = wp_insert_post($image_post_values); - } - - update_attached_file( $attachment_id, $new_path ); - wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $new_path ) ); - } - $i ++; - $progress->update( $i ); - set_transient( 'wpsc_update_product_offset', $i, 604800 ); - } - - $offset += $limit; - } - //Just throwing the payment gateway update in here because it doesn't really warrant it's own function :) - $custom_gateways = get_option('custom_gateway_options'); - array_walk($custom_gateways, "wpec_update_gateway"); - update_option('custom_gateway_options', $custom_gateways); -} - -function wpec_update_gateway(&$value,$key) { - if ( $value == "testmode" ) - $value = "wpsc_merchant_testmode"; - if ( $value == "paypal_certified" ) - $value = "wpsc_merchant_paypal_express"; - if ( $value == "paypal_multiple" ) - $value = "wpsc_merchant_paypal_standard"; - if ( $value == "paypal_pro" ) - $value = "wpsc_merchant_paypal_pro"; - -} -function wpsc_convert_variation_combinations() { - global $wpdb, $user_ID, $current_version_number; - $wpsc_update = WPSC_Update::get_instance(); - remove_filter( 'get_terms', 'wpsc_get_terms_category_sort_filter' ); - if ( ! $offset = get_transient( 'wpsc_update_variation_comb_offset' ) ) - $offset = 0; - $limit = 150; - wp_defer_term_counting( true ); - $sql = "SELECT * FROM {$wpdb->posts} WHERE post_type = 'wpsc-product' AND post_parent = 0 LIMIT %d, %d"; - - $total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = 'wpsc-product' AND post_parent = 0" ); - $progress = new WPSC_Update_Progress( $total ); - - while ( true ) { - // get the posts - // I use a direct SQL query here because the get_posts function sometimes does not function for a reason that is not clear. - $posts = $wpdb->get_results( $wpdb->prepare( $sql, $offset, $limit ) ); - $i = $offset; - if ( empty( $posts ) ) - break; - - foreach((array)$posts as $post) { - if ( ! $child_products = get_transient( 'wpsc_update_current_child_products' ) ) - $child_products = array(); - - $wpsc_update->check_timeout(); - $base_product_terms = array(); - //create a post template - $child_product_template = array( - 'post_author' => $user_ID, - 'post_content' => $post->post_content, - 'post_excerpt' => $post->post_excerpt, - 'post_title' => $post->post_title, - 'post_status' => 'inherit', - 'post_type' => "wpsc-product", - 'post_name' => $post->post_title, - 'post_parent' => $post->ID - ); - - // select the original product ID - $original_id = get_post_meta($post->ID, '_wpsc_original_id', true); - $parent_stock = get_post_meta($post->ID, '_wpsc_stock', true); - - // select the variation set associations - $variation_set_associations = $wpdb->get_col("SELECT `variation_id` FROM ".WPSC_TABLE_VARIATION_ASSOC." WHERE `associated_id` = '{$original_id}'"); - // select the variation associations if the count of variation sets is greater than zero - if(($original_id > 0) && (count($variation_set_associations) > 0)) { - $variation_associations = $wpdb->get_col("SELECT `value_id` FROM ".WPSC_TABLE_VARIATION_VALUES_ASSOC." WHERE `product_id` = '{$original_id}' AND `variation_id` IN(".implode(", ", $variation_set_associations).") AND `visible` IN ('1')"); - } else { - // otherwise, we have no active variations, skip to the next product - $i++; - $progress->update( $i ); - set_transient( 'wpsc_update_variation_comb_offset', $i, 604800 ); - continue; - } - - $variation_set_id_sql = "SELECT meta_value FROM " . WPSC_TABLE_META . " WHERE object_type='wpsc_variation_set' AND object_id IN (" . implode( ',', $variation_set_associations ) . ") AND meta_key = 'variation_set_id'"; - - $variation_set_terms = $wpdb->get_col( $variation_set_id_sql ); - - $variation_associations_sql = "SELECT meta_value FROM " . WPSC_TABLE_META . " WHERE object_type='wpsc_variation' AND object_id IN (" . implode( ',', $variation_associations ) . ") AND meta_key = 'variation_id'"; - - $variation_associations_terms = $wpdb->get_col( $variation_associations_sql ); - - $base_product_terms = array_merge( $base_product_terms, $variation_set_terms, $variation_associations_terms ); - - // Now that we have the term IDs, we need to retrieve the slugs, as wp_set_object_terms will not use IDs in the way we want - // If we pass IDs into wp_set_object_terms, it creates terms using the ID as the name. - $parent_product_terms = get_terms('wpsc-variation', array( - 'hide_empty' => 0, - 'include' => implode(",", $base_product_terms), - 'orderby' => 'parent' - )); - $base_product_term_slugs = array(); - foreach($parent_product_terms as $parent_product_term) { - $base_product_term_slugs[] = $parent_product_term->slug; - - } - - wp_set_object_terms($post->ID, $base_product_term_slugs, 'wpsc-variation'); - - // select all variation "products" - $variation_items = $wpdb->get_results("SELECT * FROM ".WPSC_TABLE_VARIATION_PROPERTIES." WHERE `product_id` = '{$original_id}'"); - - foreach((array)$variation_items as $variation_item) { - $wpsc_update->check_timeout(); - // initialize the requisite arrays to empty - $variation_ids = array(); - $term_data = array( - 'ids' => array(), - 'slugs' => array(), - 'names' => array(), - ); - // make a temporary copy of the product teplate - $product_values = $child_product_template; - - // select all values this "product" is associated with, then loop through them, getting the term id of the variation using the value ID - $variation_associations_combinations = $wpdb->get_results("SELECT * FROM ".WPSC_TABLE_VARIATION_COMBINATIONS." WHERE `priceandstock_id` = '{$variation_item->id}'"); - foreach((array)$variation_associations_combinations as $association) { - $variation_id = (int)wpsc_get_meta($association->value_id, 'variation_id', 'wpsc_variation'); - // discard any values that are null, as they break the selecting of the terms - if($variation_id > 0 && in_array($association->value_id, $variation_associations) ) { - $variation_ids[] = $variation_id; - } - } - - // if we have more than zero remaining terms, get the term data, then loop through it to convert it to a more useful set of arrays. - if(count($variation_ids) > 0 && ( count($variation_set_associations) == count($variation_ids) ) ) { - $combination_terms = get_terms('wpsc-variation', array( - 'hide_empty' => 0, - 'include' => implode(",", $variation_ids), - )); - - foreach($combination_terms as $term) { - $term_data['ids'][] = $term->term_id; - $term_data['slugs'][] = $term->slug; - $term_data['names'][] = $term->name; - } - - $product_values['post_title'] .= " (".implode(", ", $term_data['names']).")"; - $product_values['post_name'] = sanitize_title($product_values['post_title']); - - $selected_post = get_posts(array( - 'name' => $product_values['post_name'], - 'post_parent' => $post->ID, - 'post_type' => "wpsc-product", - 'post_status' => 'all', - 'suppress_filters' => true - )); - - $selected_post = array_shift($selected_post); - $key = md5( $post->ID . ':' . count( $term_data['ids'] ) . ':' . implode(',', $term_data['ids'] ) ); - $child_product_id = false; - - if ( ! empty( $child_products[$key] ) ) - $child_product_id = $child_products[$key]; - - $post_data = array(); - $post_data['_wpsc_price'] = (float)$variation_item->price; - $post_data['_wpsc_stock'] = (float)$variation_item->stock; - if( !is_numeric( $parent_stock ) ) - $post_data['_wpsc_stock'] = false; - - $post_data['_wpsc_original_variation_id'] = (float)$variation_item->id; - - // Product Weight - $post_data['_wpsc_product_metadata']['weight'] = wpsc_convert_weight($variation_item->weight, $variation_item->weight_unit, "pound", true); - $post_data['_wpsc_product_metadata']['display_weight_as'] = $variation_item->weight_unit; - $post_data['_wpsc_product_metadata']['weight_unit'] = $variation_item->weight_unit; - - $already_exists = true; - - if ( ! empty( $selected_post ) && $selected_post->ID != $child_product_id ) { - $child_product_id = $selected_post->ID; - } elseif ( empty( $child_product_id ) ) { - $child_product_id = wp_insert_post( $product_values ); - $already_exists = false; - } - - if($child_product_id > 0) { - - foreach($post_data as $meta_key => $meta_value) { - // prefix all meta keys with _wpsc_ - update_post_meta($child_product_id, $meta_key, $meta_value); - } - - - wp_set_object_terms($child_product_id, $term_data['slugs'], 'wpsc-variation'); - if ( ! $already_exists ) { - $child_products[$key] = $child_product_id; - set_transient( 'wpsc_update_current_child_products', $child_products, 604800 ); - } - } - - unset($term_data); - } - - } - $i++; - $progress->update( $i ); - set_transient( 'wpsc_update_variation_comb_offset', $i, 604800 ); - delete_transient( 'wpsc_update_current_child_products' ); - } - - $offset += $limit; - - } - delete_option("wpsc-variation_children"); -_get_term_hierarchy('wpsc-variation'); -delete_option("wpsc_product_category_children"); -_get_term_hierarchy('wpsc_product_category'); -} - -function wpsc_update_files() { - global $wpdb, $user_ID; - $product_files = $wpdb->get_results("SELECT * FROM ".WPSC_TABLE_PRODUCT_FILES.""); - $wpsc_update = WPSC_Update::get_instance(); - - foreach($product_files as $product_file) { - $wpsc_update->check_timeout(); - $variation_post_ids = array(); - if(!empty($product_file->product_id)){ - $product_post_id = (int)$wpdb->get_var($wpdb->prepare( "SELECT `post_id` FROM `{$wpdb->postmeta}` WHERE meta_key = %s AND `meta_value` = %d LIMIT 1", '_wpsc_original_id', $product_file->product_id )); - }else{ - $product_post_id = (int)$wpdb->get_var("SELECT `id` FROM ".WPSC_TABLE_PRODUCT_LIST." WHERE file=".$product_file->id); - $product_post_id = (int)$wpdb->get_var($wpdb->prepare( "SELECT `post_id` FROM `{$wpdb->postmeta}` WHERE meta_key = %s AND `meta_value` = %d LIMIT 1", '_wpsc_original_id', $product_post_id )); - } - $variation_items = $wpdb->get_col("SELECT `id` FROM ".WPSC_TABLE_VARIATION_PROPERTIES." WHERE `file` = '{$product_file->id}'"); - - if(count($variation_items) > 0) { - $variation_post_ids = $wpdb->get_col("SELECT `post_id` FROM `{$wpdb->postmeta}` WHERE meta_key = '_wpsc_original_variation_id' AND `meta_value` IN(".implode(", ", $variation_items).")"); - } - - $attachment_template = array( - 'post_mime_type' => $product_file->mimetype, - 'post_title' => $product_file->filename, - 'post_name' => $product_file->idhash, - 'post_content' => '', - 'post_parent' => $product_post_id, - 'post_type' => "wpsc-product-file", - 'post_status' => 'inherit' - ); - - $file_id = wpsc_get_meta($product_file->id, '_new_file_id', 'wpsc_files'); - - if($file_id == null && count($variation_post_ids) == 0) { - $file_data = $attachment_template; - $file_data['post_parent'] = $product_post_id; - $new_file_id = wp_insert_post($file_data); - wpsc_update_meta($product_file->id, '_new_file_id', $new_file_id, 'wpsc_files'); - } - if(count($variation_post_ids) > 0) { - foreach($variation_post_ids as $variation_post_id) { - $old_file_id = get_product_meta($variation_post_id, 'old_file_id', true); - if($old_file_id == null) { - $file_data = $attachment_template; - $file_data['post_parent'] = $variation_post_id; - $new_file_id = wp_insert_post($file_data); - update_product_meta($variation_post_id, 'old_file_id', $product_file->id, 'wpsc_files'); - } - } - } - - if(!empty($product_file->preview)){ - $preview_template = array( - 'post_mime_type' => $product_file->preview_mimetype, - 'post_title' => $product_file->preview, - 'post_name' => $product_file->filename, - 'post_content' => '', - 'post_parent' => $new_file_id, - 'post_type' => "wpsc-product-preview", - 'post_status' => 'inherit' - ); - wp_insert_post($preview_template); - - - } - } - - $download_ids = $wpdb->get_col("SELECT `id` FROM ".WPSC_TABLE_DOWNLOAD_STATUS.""); - foreach($download_ids as $download_id) { - if(wpsc_get_meta($download_id, '_is_legacy', 'wpsc_downloads') !== 'false') { - wpsc_update_meta($download_id, '_is_legacy', 'true', 'wpsc_downloads'); - } - } -} - -function wpsc_update_database() { - global $wpdb; - - $result = $wpdb->get_results("SHOW COLUMNS FROM ". WPSC_TABLE_PURCHASE_LOGS."", ARRAY_A); - if (!$result) { - echo 'Could not run query: ' . mysql_error(); - exit; - } - foreach($result as $row_key=>$value) { - $has_taxes = ($value["Field"] == "wpec_taxes_total" || $value["Field"] == "wpec_taxes_rate") ? true: false; - } - if (!$has_taxes) { - $add_fields = $wpdb->query($wpdb->prepare("ALTER TABLE ".WPSC_TABLE_PURCHASE_LOGS." ADD wpec_taxes_total decimal(11,2)")); - $add_fields = $wpdb->query($wpdb->prepare("ALTER TABLE ".WPSC_TABLE_PURCHASE_LOGS." ADD wpec_taxes_rate decimal(11,2)")); - } -} -/* - * The Old Get Product Meta for 3.7 Tables used in converting Products to Posts - */ - -function old_get_product_meta($product_id, $key, $single = false) { - global $wpdb, $post_meta_cache, $blog_id; - $product_id = (int)$product_id; - $meta_values = false; - if($product_id > 0) { - $meta_id = $wpdb->get_var("SELECT `id` FROM `".WPSC_TABLE_PRODUCTMETA."` WHERE `meta_key` IN('$key') AND `product_id` = '$product_id' LIMIT 1"); - //exit($meta_id); - if(is_numeric($meta_id) && ($meta_id > 0)) { - if($single != false) { - $meta_values = maybe_unserialize($wpdb->get_var("SELECT `meta_value` FROM `".WPSC_TABLE_PRODUCTMETA."` WHERE `meta_key` IN('$key') AND `product_id` = '$product_id' LIMIT 1")); - } else { - $meta_values = $wpdb->get_col("SELECT `meta_value` FROM `".WPSC_TABLE_PRODUCTMETA."` WHERE `meta_key` IN('$key') AND `product_id` = '$product_id'"); - $meta_values = array_map('maybe_unserialize', $meta_values); - } - } - } - if (is_array($meta_values) && (count($meta_values) == 1)) { - return array_pop($meta_values); - } else { - return $meta_values; - } -} -?> \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/admin-legacy.js b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/admin-legacy.js deleted file mode 100644 index bff4780..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/admin-legacy.js +++ /dev/null @@ -1,1103 +0,0 @@ -var someresults=function() { - document.getElementById('changenotice').innerHTML = "Thank you, your change has been saved"; -} - -var noresults=function() { -// see nothing, know nothing, do nothing -} - -if(typeof(select_min_height) == undefined) { - var select_min_height = 0; - var select_max_height = 200; -} - -jQuery(document).ready( - function() { - // jQuery('div.select_product_file').Resizable({ - // minWidth: 300, - // minHeight: select_min_height, - // maxWidth: 300, - // maxHeight: select_max_height, - // handlers: { - // s: '.select_product_handle' - // } - // }); - - jQuery("div.admin_product_name a.shorttag_toggle").toggle( - function () { - jQuery("div.admin_product_shorttags", jQuery(this).parent("div.admin_product_name")).css('display', 'block'); - }, - function () { - //jQuery("div#admin_product_name a.shorttag_toggle").toggleClass('toggled'); - jQuery("div.admin_product_shorttags", jQuery(this).parent("div.admin_product_name")).css('display', 'none'); - } - ); - enablebuttons(); - - } - ); - -function activate_resizable() { -// jQuery('div.edit_select_product_file').Resizable({ -// minWidth: 300, -// minHeight: select_min_height, -// maxWidth: 300, -// maxHeight: select_max_height, -// handlers: { -// s: '.edit_select_product_handle' -// } -// }); -} - - - -jQuery(document).ready(function(){ - // bind_shipping_rate_deletion(); - jQuery(function() { - // set us up some mighty fine tabs for the options page - - if (typeof jQuery('#wpsc_options > ul#tabs').tabs != "undefined") { - $tabs = jQuery('#wpsc_options > ul#tabs').tabs(); - } - // current_tab = window.location.href.split('#'); - - // this here code handles remembering what tab you were on - jQuery('#wpsc_options > ul').bind('tabsselect', function(event, ui) { - form_action = jQuery('#cart_options').attr('action').split('#'); //split at the # - form_action = form_action[0]+"#"+ui.panel.id; // get the first item, add the hash then our current tab ID - jQuery('#cart_options').attr('action', form_action); // stick it all back in the action attribute - // var current_tab = $tabs.data('selected.tabs'); - // alert(current_tab); - // if (current_tab == '3') { - // form_action = jQuery('#shipping_options').attr('action').split('#'); //split at the # - // form_action = form_action[0]+"#"+ui.panel.id; // get the first item, add the hash then our current tab ID - // - // jQuery('#shipping_options').attr('action', form_action); // stick it all back in the action attribute - // } - // if (current_tab == '4') { - // form_action = jQuery('#gateway_options').attr('action').split('#'); //split at the # - // form_action = form_action[0]+"#"+ui.panel.id; // get the first item, add the hash then our current tab ID - // jQuery('#gateway_options').attr('action', form_action); // stick it all back in the action attribute - // } - }); - jQuery('#wpsc_options > ul').bind('tabsload', function(event, ui) { - bind_shipping_rate_deletion(); - // form_action = jQuery('#cart_options').attr('action').split('#'); //split at the # - // form_action = form_action[0]+"#"+ui.panel.id; // get the first item, add the hash then our current tab ID - // jQuery('#cart_options').attr('action', form_action); // stick it all back in the action attribute - var current_tab = $tabs.data('selected.tabs'); - if (current_tab == '3') { - form_action = jQuery('#shipping_options').attr('action').split('#'); //split at the # - form_action = form_action[0]+"#"+ui.panel.id; // get the first item, add the hash then our current tab ID - jQuery('#shipping_options').attr('action', form_action); // stick it all back in the action attribute - } - if (current_tab == '4') { - form_action = jQuery('#gateway_options_tbl').attr('action').split('#'); //split at the # - form_action = form_action[0]+"#"+ui.panel.id; // get the first item, add the hash then our current tab ID - jQuery('#gateway_options_tbl').attr('action', form_action); // stick it all back in the action attribute - } - if (current_tab == '5') { - form_action = jQuery('#chekcout_options_tbl').attr('action').split('#'); //split at the # - form_action = form_action[0]+"#"+ui.panel.id; // get the first item, add the hash then our current tab ID - jQuery('#chekcout_options_tbl').attr('action', form_action); // stick it all back in the action attribute - } - if (current_tab == '6') { - form_action = jQuery('#gold_cart_form').attr('action').split('#'); //split at the # - form_action = form_action[0]+"#"+ui.panel.id; // get the first item, add the hash then our current tab ID - jQuery('#gold_cart_form').attr('action', form_action); // stick it all back in the action attribute - } - - }); - }); -}); - - -function categorylist(url) { - self.location = url; -} - -function submit_change_country() { - document.cart_options.submit(); -//document.cart_options.submit(); -} - -var getresults=function(results) { - document.getElementById('formcontent').innerHTML = results; - jQuery('form.edititem').css('display', 'block'); - jQuery('form.edititem').css('display', 'block'); - jQuery('#additem').css('display', 'none'); - jQuery('#productform').css('display', 'block'); - jQuery("#loadingindicator_span").css('visibility','hidden'); - enablebuttons(); - - jQuery('.meta-box-sortables').sortable( { - placeholder: 'sortable-placeholder', - connectWith: [ '.meta-box-sortables' ], - items: '> .postbox', - handle: '.hndle', - distance: 2, - tolerance: 'pointer', - sort: function(e,ui) { - if ( jQuery(document).width() - e.clientX < 300 ) { - if ( ! jQuery('#post-body').hasClass('has-sidebar') ) { - var pos = jQuery('#side-sortables').offset(); - - jQuery('#side-sortables').append(ui.item) - jQuery(ui.placeholder).css({ - 'top':pos.top, - 'left':pos.left - }).width(jQuery(ui.item).width()) - postboxes.expandSidebar(1); - } - } - }, - stop: function() { - var postVars = { - action: 'product-page-order', - ajax: 'true' - } - //jQuery(this).css("border","1px solid red"); - jQuery(this).each( function() { - postVars["order[" + this.id.split('-')[0] + "]"] = jQuery(this).sortable( 'toArray' ).join(','); - } ); - jQuery.post( 'index.php?admin=true&ajax=true', postVars, function() { - postboxes.expandSidebar(); - } ); - } - } ); - - - jQuery("#gallery_list").sortable({ - revert: false, - placeholder: "ui-selected", - start: function(e,ui) { - jQuery('#image_settings_box').hide(); - jQuery('a.editButton').hide(); - jQuery('img.deleteButton').hide(); - jQuery('ul#gallery_list').children('li').removeClass('first'); - }, - stop:function (e,ui) { - jQuery('ul#gallery_list').children('li:first').addClass('first'); - }, - update: function (e,ui){ - set = jQuery("#gallery_list").sortable('toArray'); - img_id = jQuery('#gallery_image_'+set[0]).parent('li').attr('id'); - - jQuery('#gallery_image_'+set[0]).children('img.deleteButton').remove(); - jQuery('#gallery_image_'+set[0]).append("Edit "); - jQuery('#gallery_image_'+set[0]).parent('li').attr('id', 0); - //for(i=1;i"); - //} - - for(i=1;i"); - - element_id = jQuery('#gallery_image_'+set[i]).parent('li').attr('id'); - if(element_id == 0) { - jQuery('#gallery_image_'+set[i]).parent('li').attr('id', img_id); - } - } - - order = set.join(','); - prodid = jQuery('#prodid').val(); - ajax.post("index.php",imageorderresults,"admin=true&ajax=true&prodid="+prodid+"&imageorder=true&order="+order); - }, - 'opacity':0.5 - }); - - function imageorderresults(results) { - eval(results); - - jQuery('#gallery_image_'+ser).append(output); - - enablebuttons(); - } - - jQuery("div.previewimage").hover( - function () { - jQuery(this).children('img.deleteButton').show(); - if(jQuery('#image_settings_box').css('display')!='block') - jQuery(this).children('a.editButton').show(); - }, - function () { - jQuery(this).children('img.deleteButton').hide(); - jQuery(this).children('a.editButton').hide(); - } - ); - - jQuery("a.closeimagesettings").click( - function (e) { - jQuery("div#image_settings_box").hide(); - } - ); - - jQuery("#table_rate_price").click( - function() { - if (this.checked) { - jQuery("#table_rate").slideDown("fast"); - } else { - jQuery("#table_rate").slideUp("fast"); - } - } - ); - - jQuery(".add_level").click( - function() { - jQuery(this).parent().children('table').append(' and above'); - } - ); - - - jQuery("#add_label").click( - function(){ - jQuery("#labels").append("
"+TXT_WPSC_LABEL+" :
"+TXT_WPSC_LIFE_NUMBER+" :
"+TXT_WPSC_ITEM_NUMBER+" :
"+TXT_WPSC_PRODUCT_CODE+" :
"+TXT_WPSC_PDF+" :
"); - } - ); - - jQuery(".remove_line").click( - function() { - jQuery(this).parent().parent('tr').remove(); - } - ); - - jQuery("div.admin_product_name a.shorttag_toggle").toggle( - function () { - jQuery("div.admin_product_shorttags", jQuery(this).parent("div.admin_product_name")).css('display', 'block'); - }, - function () { - //jQuery("div#admin_product_name a.shorttag_toggle").toggleClass('toggled'); - jQuery("div.admin_product_shorttags", jQuery(this).parent("div.admin_product_name")).css('display', 'none'); - } - ); - jQuery(".file_delete_button").click( - function() { - jQuery(this).parent().remove(); - file_hash = jQuery(this).siblings("input").val(); - ajax.post("index.php",noresults,"admin=true&ajax=true&del_file=true&del_file_hash="+file_hash); - } - ); - boxes = ["price_and_stock", "shipping", "variation", "advanced", "product_image", "product_download"]; - for (i=0;i 0) && (image_height <= 1024)) && ((image_width > 0) && (image_width <= 1024))) { - new_url = "index.php?productid="+prodid+"&height="+image_height+"&width="+image_width+""; - document.getElementById("preview_link").setAttribute('href',new_url); - } else { - new_url = "index.php?productid="+prodid+""; - document.getElementById("preview_link").setAttribute('href',new_url); - } - return false; -} - - -function add_variation_value(value_type) { - container_id = value_type+"_variation_values"; - //alert(container_id); - last_element_id = document.getElementById(container_id).lastChild.id; - // last_element_id = last_element_id.split("_"); - // last_element_id = last_element_id.reverse(); - date = new Date; - new_element_id = "variation_value_"+date.getTime(); - - - old_elements = document.getElementById(container_id).innerHTML; - new_element_contents = ""; - if(value_type == "edit") { - new_element_contents += ""; - } else { - new_element_contents += ""; - } - new_element_contents += " "+TXT_WPSC_DELETE+"
"; - //new_element_contents += ""; - - new_element = document.createElement('span'); - new_element.id = new_element_id; - - document.getElementById(container_id).appendChild(new_element); - document.getElementById(new_element_id).innerHTML = new_element_contents; - return false; -} - -function remove_variation_value(element,variation_value) { - var delete_variation_value=function(results) - { - } - - element_count = jQuery("div#edit_variation_values span").size(); - if(element_count > 1) { - ajax.post("index.php",delete_variation_value,"admin=true&ajax=true&remove_variation_value=true&variation_value_id="+variation_value); - jQuery(element).parent("span.variation_value").remove(); - } - return false; -} - - - - -function checkimageresize() { - document.getElementById('image_resize2').checked = true; -} - -function submit_status_form(id) { - document.getElementById(id).submit(); -} - -// pe.{ -var prevElement = null; -var prevOption = null; - -function hideOptionElement(id, option) { - if (prevOption == option) { - return; - } - if (prevElement != null) { - prevElement.style.display = "none"; - } - - if (id == null) { - prevElement = null; - } else { - prevElement = document.getElementById(id); - jQuery('#'+id).css( 'display','block'); - } - prevOption = option; -} - - -// }.pe - -function toggle_display_options(state) { - switch(state) { - case 'list': - document.getElementById('grid_view_options').style.display = 'none'; - document.getElementById('list_view_options').style.display = 'block'; - break; - - case 'grid': - document.getElementById('list_view_options').style.display = 'none'; - document.getElementById('grid_view_options').style.display = 'block'; - break; - - default: - document.getElementById('list_view_options').style.display = 'none'; - document.getElementById('grid_view_options').style.display = 'none'; - break; - } -} - -function log_submitform(id) { - value1 = document.getElementById(id); - if (ajax.serialize(value1).search(/value=3/)!=-1) { - document.getElementById("track_id_"+id).style.display="block"; - } else { - document.getElementById("track_id_"+id).style.display="none"; - } - var get_log_results=function(results) { - eval(results); - } - frm = document.getElementById(id); - ajax.post("index.php?admin=true&ajax=true&log_state=true",get_log_results,ajax.serialize(frm)); - return false; -} - -function save_tracking_id(id) { - value1 = document.getElementById('tracking_id_'+id).value; - value1 ="id="+id +"&value="+value1; - ajax.post("index.php?admin=true&ajax=true&save_tracking_id=true",noresults,value1); - return false; -} - -var select_min_height = 75; -var select_max_height = 50; -/* -//ToolTip JavaScript -jQuery('img').Tooltip( - { - className: 'inputsTooltip', - position: 'mouse', - delay: 200 - } -); -*/ -jQuery(window).load( function () { - - jQuery('a.closeEl').bind('click', toggleContent); - /* - jQuery('div.groupWrapper').sortable( { - accept: 'groupItem', - helperclass: 'sortHelper', - activeclass : 'sortableactive', - hoverclass : 'sortablehover', - handle: 'div.itemHeader', - tolerance: 'pointer', - onStart : function() { - jQuery.iAutoscroller.start(this, document.getElementsByTagName('body')); - }, - onStop : function() { - jQuery.iAutoscroller.stop(); - }, - update : function(e,ui) { - serial = jQuery('div.groupWrapper').sortable('toArray'); - category_id = jQuery("input#item_list_category_id").val(); - - ajax.post("index.php", noresults, "admin=true&ajax=true&changeorder=true&category_id="+category_id+"&sort1="+serial); - } - } - ); -*/ - - jQuery('a#close_news_box').click( function () { - jQuery('div.wpsc_news').css( 'display', 'none' ); - ajax.post("index.php", noresults, "ajax=true&admin=true&hide_ecom_dashboard=true"); - return false; - }); -}); -var toggleContent = function(e) -{ - var targetContent = $('div.itemContent', this.parentNode.parentNode); - if (targetContent.css('display') == 'none') { - targetContent.slideDown(300); - $(this).html('[-]'); - } else { - targetContent.slideUp(300); - $(this).html('[+]'); - } - return false; -}; - - -function hideelement1(id, item_value) -{ - //alert(value); - if(item_value == 5) { - jQuery(document.getElementById(id)).css('display', 'block'); - } else { - jQuery(document.getElementById(id)).css('display', 'none'); - } -} - - -function suspendsubs(user_id) -{ - var comm =jQuery("#suspend_subs"+user_id).attr("checked"); - //alert(comm); - if (comm == true){ - ajax.post("index.php",noresults,"admin=true&ajax=true&log_state=true&suspend=true&value=1&id="+user_id); - } else { - ajax.post("index.php",noresults,"admin=true&ajax=true&log_state=true&suspend=true&value=2&id="+user_id); - } - return false; -} - -function delete_extra_preview(preview_name, prodid) { - var preview_name_results=function(results) { - filleditform(prodid); - } - ajax.post("index.php",preview_name_results,"ajax=true&admin=true&prodid="+prodid+"&preview_name="+preview_name); -} - -function shipwire_sync() { - ajax.post("index.php",noresults,"ajax=true&shipwire_sync=ture"); -} - -function shipwire_tracking() { - ajax.post("index.php",noresults,"ajax=true&shipwire_tracking=ture"); -} - -function display_settings_button() { - jQuery("#settings_button").slideToggle(200); -//document.getElementById("settings_button").style.display='block'; -} - -function submittogoogle(id){ - value1=document.getElementById("google_command_list_"+id).value; - value2=document.getElementById("partial_amount_"+id).value; - reason=document.getElementById("cancel_reason_"+id).value; - comment=document.getElementById("cancel_comment_"+id).value; - message=document.getElementById("message_to_buyer_message_"+id).value; - document.getElementById("google_command_indicator").style.display='inline'; - ajax.post("index.php",submittogoogleresults,"ajax=true&submittogoogle=true&message="+message+"&value="+value1+"&amount="+value2+"&comment="+comment+"&reason="+reason+"&id="+id); - return true; -} - -var submittogoogleresults=function (results) { - window.location.reload(true); -} - -function display_partial_box(id){ - value1=document.getElementById("google_command_list_"+id).value; - if ((value1=='Refund') || (value1=='Charge')){ - document.getElementById("google_partial_radio_"+id).style.display='inline'; - if (value1=='Refund'){ - document.getElementById("google_cancel_"+id).style.display='block'; - document.getElementById("cancel_reason_"+id).style.display='inline'; - document.getElementById("cancel_div_comment_"+id).style.display='none'; - } - }else if ((value1=='Cancel')||(value1=='Refund')) { - document.getElementById("google_cancel_"+id).style.display='block'; - document.getElementById("cancel_reason_"+id).style.display='inline'; - }else if (value1=='Send Message') { - document.getElementById("message_to_buyer_"+id).style.display='block'; - } else { - document.getElementById("cancel_div_comment_"+id).style.display='none'; - document.getElementById("google_cancel_"+id).style.display='none'; - document.getElementById("cancel_reason_"+id).style.display='none'; - document.getElementById("message_to_buyer_"+id).style.display='none'; - document.getElementById("google_partial_radio_"+id).style.display='none'; - document.getElementById("partial_amount_"+id).style.display='none'; - } -} - -function add_more_meta(e) { - current_meta_forms = jQuery(e).parent().children("div.product_custom_meta:last"); // grab the form container - new_meta_forms = current_meta_forms.clone(true); // clone the form container - jQuery("label input", new_meta_forms).val(''); // reset all contained forms to empty - current_meta_forms.after(new_meta_forms); // append it after the container of the clicked element - return false; -} - -function remove_meta(e, meta_id) { - current_meta_form = jQuery(e).parent("div.product_custom_meta"); // grab the form container - //meta_name = jQuery("input#custom_meta_name_"+meta_id, current_meta_form).val(); - //meta_value = jQuery("input#custom_meta_value_"+meta_id, current_meta_form).val(); - returned_value = jQuery.ajax({ - type: "POST", - url: "admin.php?ajax=true", - data: "admin=true&remove_meta=true&meta_id="+meta_id+"", - success: function(results) { - if(results > 0) { - jQuery("div#custom_meta_"+meta_id).remove(); - } - } - }); - return false; -} - - -function wpsc_save_postboxes_state(page, container) { - var closed = jQuery(container+' .postbox').filter('.closed').map(function() { - return this.id; - }).get().join(','); - jQuery.post(postboxL10n.requestFile, { - action: 'closed-postboxes', - closed: closed, - closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(), - page: page - }); -} - -jQuery(document).ready(function(){ - - jQuery('.deleteproducts > button').click( - function () { - var ids='0'; - jQuery('.deletecheckbox:checked').each( - function () { - ids += ","+jQuery(this).val(); - } - ); - var r=confirm("Please confirm deletion"); - if (r==true) { - ajax.post("index.php",reloadresults,"admin=true&ajax=true&del_prod=true&del_prod_id="+ids); - } - } - ); - jQuery('#selectall').click( - function () { - if (this.checked) { - jQuery('.deletecheckbox').each(function(){ - this.checked = true; - }); - } else { - jQuery('.deletecheckbox').each(function(){ - this.checked = false; - }); - } - } - ); - - if (typeof jQuery('.pickdate').datepicker != "undefined") { - jQuery('.pickdate').datepicker({ - dateFormat: 'yy-mm-dd' - }); - } - filesizeLimit = 5120000; - - // alert('test 1'); - if (typeof SWFUpload != "undefined") { - var swfu = new SWFUpload({ - flash_url : WPSC_CORE_JS_URL + '/swfupload.swf', - upload_url: base_url+'/?action=wpsc_add_image', - button_placeholder_id : "spanButtonPlaceholder", - button_width: 103, - button_height: 24, - button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT, - button_cursor: SWFUpload.CURSOR.HAND, - post_params: { - "prodid" : 0 - }, - file_queue_limit : 1, - file_size_limit : filesizeLimit+'b', - file_types : "*.jpg;*.jpeg;*.png;*.gif;*.JPG;*.JPEG;*.PNG;*.GIF", - file_types_description : "Web-compatible Image Files", - file_upload_limit : filesizeLimit, - custom_settings : { - targetHolder : false, - progressBar : false, - sorting : false - }, - debug: false, - - file_queued_handler : imageFileQueued, - file_queue_error_handler : imageFileQueueError, - file_dialog_complete_handler : imageFileDialogComplete, - upload_start_handler : startImageUpload, - upload_progress_handler : imageUploadProgress, - upload_error_handler : imageUploadError, - upload_success_handler : imageUploadSuccess, - upload_complete_handler : imageUploadComplete, - queue_complete_handler : imageQueueComplete - }); - } - jQuery("#add-product-image").click(function(){ - swfu.selectFiles(); - }); -}); - -function addlayer(){ - jQuery("tr.addlayer").before(""+TXT_WPSC_IF_PRICE_IS+" "+TXT_WPSC_AND_ABOVE+"  "+TXT_WPSC_DELETE+""); - bind_shipping_rate_deletion(); -} - -function addweightlayer(){ - jQuery("tr.addlayer").before(""+TXT_WPSC_IF_WEIGHT_IS+" "+TXT_WPSC_AND_ABOVE+"  "+TXT_WPSC_DELETE+""); - bind_shipping_rate_deletion(); -} - -function removelayer() { - this.parent.parent.innerHTML=''; -} - -/** - * SWFUpload Image Uploading events - **/ - -function imageFileQueued (file) { - -} - -function imageFileQueueError (file, error, message) { - if (error == SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) { - alert("You selected too many files to upload at one time. " + (message === 0 ? "You have reached the upload limit." : "You may upload " + (message > 1 ? "up to " + message + " files." : "only one file."))); - return; - } - -} - -function imageFileDialogComplete (selected, queued) { - try { - this.startUpload(); - } catch (ex) { - this.debug(ex); - } -} - -function startImageUpload (file) { - // alert('start '+jQuery("div#swfupload_img_indicator").css('display')); - jQuery("div#swfupload_img_indicator").css('display', 'block'); - var cell = jQuery('
  • ').appendTo(jQuery('#gallery_list')); - var sorting = jQuery('').appendTo(cell); - var progress = jQuery('
    ').appendTo(cell); - var bar = jQuery('
    ').appendTo(progress); - var art = jQuery('
    ').appendTo(progress); - this.targetHolder = cell; - this.progressBar = bar; - this.sorting = sorting; - return true; -} - -function imageUploadProgress (file, loaded, total) { - var progress = Math.ceil((loaded/total)*76); - jQuery(this.progressBar).animate({ - 'width':progress+'px' - },100); -} - -function imageUploadError (file, error, message) { - console.log(error+": "+message); -} - -function imageUploadSuccess (file, results) { - //Don't delete, initiate id is neccesary. - var id = null; - var pid = null; - - jQuery("span.swfupload_loadingindicator").css('visibility', 'hidden'); - eval(results); - // jQuery(this).css('border', '1px solid red'); - if(pid >= 1) { - context = jQuery("div#productform"); - } else { - context = jQuery("div#additem"); - } - - if (id == null ) { - if(replacement_src != null) { - jQuery("li.first div.previewimage a.thickbox", context).attr('href', replacement_src); - jQuery("li.first div.previewimage a.thickbox img.previewimage", context).attr('src', replacement_src); - } else { - if (jQuery('#gold_present', context).val() != '1') { - jQuery('#add-product-image', context).remove(); - } - jQuery(this.sorting).attr({ - 'value':src - }); - var img = jQuery('
    ').appendTo(this.targetHolder).hide(); - set = jQuery("#gallery_list", context).sortable('toArray'); - - jQuery('#gallery_image_0', context).append("Edit "); - jQuery('#gallery_image_0', context).parent('li').addClass('first'); - jQuery('#gallery_image_0', context).parent('li').attr('id', 0); - jQuery('#gallery_image_0 img.deleteButton', context).remove(); - enablebuttons(); - } - } else { - //jQuery(this.targetHolder).attr({'id':'image-'+src}); - jQuery(this.targetHolder).attr({ - 'id':id - }); - div_id = 'gallery_image_'+id; - jQuery(this.targetHolder).html(''); - var img = jQuery('
    ').appendTo(this.targetHolder).hide(); - - jQuery('#gallery_image_0', context).append("Edit "); - jQuery('#gallery_image_0', context).parent('li').addClass('first'); - jQuery('#gallery_image_0', context).parent('li').attr('id', 0); - jQuery('#gallery_image_0 img.deleteButton', context).remove(); - - - if (jQuery('#gallery_list li', context).size() > 1) { - jQuery('#gallery_list', context).sortable('refresh'); - } else { - jQuery('#gallery_list', context).sortable(); - } - set = jQuery("#gallery_list", context).sortable('toArray'); - order = set.join(','); - prodid = jQuery('#prodid', context).val(); - - if(prodid == null) { - prodid = 0; - } - - function imageorderresults(results) { - eval(results); - jQuery('#gallery_image_'+ser).append(output); - enablebuttons(); - } - - ajax.post("index.php",imageorderresults,"admin=true&ajax=true&prodid="+prodid+"&imageorder=true&order="+order+""); - - - enablebuttons(); - - } - jQuery(this.progressBar).animate({ - 'width':'76px' - },250,function () { - jQuery(this).parent().fadeOut(500,function() { - jQuery(this).remove(); - jQuery(img).fadeIn('500'); - jQuery(img).append(''); - enablebuttons() - //enableDeleteButton(deleteButton); - }); - }); -} - -function imageUploadComplete (file) { - - jQuery("div#swfupload_img_indicator").css('display', 'none'); - if (jQuery('#gallery_list li').size() > 1) - jQuery('#gallery_list').sortable('refresh'); - else - jQuery('#gallery_list').sortable(); -} - -function imageQueueComplete (uploads) { - -} - -function enablebuttons(){ - jQuery("img.deleteButton").click( - function(){ - var r=confirm("Please confirm deletion"); - if (r==true) { - img_id = jQuery(this).parent().parent('li').attr('id'); - jQuery(this).parent().parent('li').remove(); - ajax.post("index.php",noresults,"admin=true&ajax=true&del_img=true&del_img_id="+img_id); - } - } - ); - - jQuery("a.delete_primary_image").click( - function(){ - var r=confirm("Please confirm deletion"); - if (r==true) { - img_id = jQuery(this).parents('li.first').attr('id'); - //ajax.post("index.php",noresults,"ajax=true&del_img=true&del_img_id="+img_id); - jQuery(this).parents('li.first').remove(); - - - - set = jQuery("#gallery_list").sortable('toArray'); - jQuery('#gallery_image_'+set[0]).children('img.deleteButton').remove(); - jQuery('#gallery_image_'+set[0]).append("Edit "); - jQuery('#gallery_image_'+set[0]).parent('li').addClass('first'); - jQuery('#gallery_image_'+set[0]).parent('li').attr('id', 0); - for(i=1;i"); - - if(element_id == 0) { - jQuery('#gallery_image_'+set[i]).parent('li').attr('id', img_id); - } - } - order = set.join(','); - prodid = jQuery('#prodid').val(); - ajax.post("index.php",imageorderresults,"admin=true&ajax=true&prodid="+prodid+"&imageorder=true&order="+order+"&delete_primary=true"); - - jQuery(this).parents('li.first').attr('id', '0'); - } - return false; - } - ); - - jQuery("div.previewimage").hover( - function () { - jQuery(this).children('img.deleteButton').show(); - if(jQuery('#image_settings_box').css('display')!='block') - jQuery(this).children('a.editButton').show(); - }, - function () { - jQuery(this).children('img.deleteButton').hide(); - jQuery(this).children('a.editButton').hide(); - } - ); - - jQuery("a.editButton").click( - function(){ - jQuery(this).hide(); - jQuery('#image_settings_box').show('fast'); - } - ); - - jQuery("a.closeimagesettings").click( - function (e) { - jQuery("div#image_settings_box").hide(); - } - ); - - function imageorderresults(results) { - eval(results); - jQuery('#gallery_image_'+ser).append(output); - enablebuttons(); - } - - jQuery("input.limited_stock_checkbox").click( function () { - parent_form = jQuery(this).parents('form'); - if(jQuery(this).attr('checked') == true) { - jQuery("div.edit_stock",parent_form).show(); - jQuery("th.stock, td.stock", parent_form).show(); - jQuery(".stock_limit_quantity", parent_form).show(); - } else { - jQuery("div.edit_stock", parent_form).hide(); - jQuery("th.stock, td.stock", parent_form).hide(); - jQuery(".stock_limit_quantity", parent_form).hide(); - } - }); -} - -function reloadresults(){ - window.location = window.location.href; -} - -jQuery(document).ready(function(){ - jQuery(".wpsc-row-actions").parent().parent("tr").mouseover( - function() { - jQuery(this).children("td").children(".wpsc-row-actions").css("visibility", "visible"); - } - ).mouseout( - function() { - jQuery(this).children("td").children(".wpsc-row-actions").css("visibility", "hidden"); - } - ); - /* - jQuery(".wpsc-shipping-actions").hide(); - jQuery("#wpsc_shipping_options").hover( - function() { - alert('hovering'); - jQuery(this).children(".wpsc-shipping-actions").css("visibility", "visible"); - } - ); -*//* -.mouseout( - function() { - jQuery(this).children(".wpsc-shipping-actions").css("visibility", "hidden"); - } - ); -*/ - - jQuery("#table_rate_price").click( - function() { - if (this.checked) { - jQuery("#table_rate").slideDown("fast"); - } else { - jQuery("#table_rate").slideUp("fast"); - } - } - ); - jQuery("#add_label").click( - function(){ - jQuery("#labels").append("
    "+TXT_WPSC_LABEL+" :
    "+TXT_WPSC_LABEL_DESC+" :
    "+TXT_WPSC_LIFE_NUMBER+" :
    "+TXT_WPSC_ITEM_NUMBER+" :
    "+TXT_WPSC_PRODUCT_CODE+" :
    "+TXT_WPSC_PDF+" :
    "); - } - ); - jQuery(".add_level").click( - function() { - added = jQuery(this).parent().children('table').append(' and above'); - } - ); - - jQuery(".file_delete_button").click( - function() { - jQuery(this).parent().remove(); - file_hash = jQuery(this).siblings("input").val(); - ajax.post("index.php",noresults,"admin=true&ajax=true&del_file=true&del_file_hash="+file_hash); - } - ); - - jQuery("table#itemlist .pricedisplay").each( - function () { - jQuery(this).attr("id",jQuery(this).parent().attr('id')); - } - ); - - jQuery("#submit_category_select").click( - function() { - new_url = jQuery("#category_select").children("option:selected").val(); - window.location = new_url; - } - ); -}); - - - -function wpsc_upload_switcher(target_state) { - switch(target_state) { - case 'flash': - jQuery("table.browser-image-uploader").css("display","none"); - jQuery("table.flash-image-uploader").css("display","block"); - ajax.post("index.php",noresults,"admin=true&ajax=true&save_image_upload_state=true&image_upload_state=1"); - break; - - case 'browser': - jQuery("table.flash-image-uploader").css("display","none"); - jQuery("table.browser-image-uploader").css("display","block"); - ajax.post("index.php",noresults,"admin=true&ajax=true&save_image_upload_state=true&image_upload_state=0"); - break; - } -} - - - -function open_variation_settings(element_id) { - jQuery("tr#"+element_id+" td div.variation_settings").toggle(); - return false; -} diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/admin.js b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/admin.js deleted file mode 100644 index 8a4ad24..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/admin.js +++ /dev/null @@ -1,1069 +0,0 @@ -// This is the wp-e-commerce front end javascript "library" - -jQuery(document).ready(function(){ - jQuery('td.hidden_alerts img').each(function(){ - var t = jQuery(this); - t.appendTo(t.parents('tr').find('td.column-title strong')); - }); - - jQuery('label[for=wpsc-variationdiv-hide]').css('display', 'none'); - - jQuery('a.update_variations_action').click(function(){ - jQuery("").insertAfter(this); - edit_var_val = jQuery('div.variation_checkboxes input:checked').serialize(); - description = jQuery('#content_ifr').contents().find('body').html(); - additional_description = jQuery('textarea#additional_description').text(); - name = jQuery('input#title').val(); - product_id = jQuery('input#product_id').val(); - post_values = edit_var_val + '&description=' + description + '&additional_description=' + additional_description + '&name=' + name + '&product_id=' + product_id; - jQuery('div#wpsc_product_variation_forms table.widefat tbody').fadeTo(200, 0, function(){ - jQuery.post(ajaxurl + '?action=wpsc_update_variations',post_values, function(returned_data){ - jQuery('div#wpsc_product_variation_forms table.widefat tbody').html(returned_data).fadeTo(200, 1); - jQuery('img.loading').hide(); - }); - }); - return false; - - }); - /* Coupon edit functionality */ - jQuery('.modify_coupon').hide(); - jQuery('.wpsc_edit_coupon').click(function(){ - id = jQuery(this).attr('rel'); - id = 'coupon_box_'+id; - if(jQuery('#'+id).hasClass('displaynone')){ - jQuery('#'+id).show(); - jQuery('#'+id).removeClass('displaynone'); - }else{ - jQuery('#'+id).addClass('displaynone'); - jQuery('#'+id).hide(); - } - - }); - jQuery("form[name='add_coupon'] input[name='submit_coupon']").click(function() { - var title = jQuery("form[name='add_coupon'] input[name='add_coupon_code']").val(); - if ( title == '') { - alert('Please enter a coupon code.'); - return false; - } - }); - //Animateedit products columns - jQuery('.wpsc-separator').livequery(function(){ - jQuery(this).click(function(){ - if(jQuery('#wpsc-col-left').css('width') == '20px'){ - left_col_width = '50%'; - right_col_width = '48%'; - - }else{ - left_col_width = '20px'; - right_col_width = '95%'; - } - if(left_col_width == '50%'){ - jQuery('.tablenav').show(); - jQuery('#posts-filter').show(); - }else{ - jQuery('.tablenav').hide(); - jQuery('#posts-filter').hide(); - - } - //jQuery(this).css('background-position','0'); - jQuery('#wpsc-col-left').animate( - { - width : left_col_width - }, - 50, - function(){ - //On complete - - } - ); - jQuery('#wpsc-col-right').animate( - { - width : right_col_width - }, - 50, - function(){ - //On complete - - } - ); - }); - - }); - - jQuery('.wpsc_prod_thumb_option').livequery(function(){ - jQuery(this).focus(function(){ - jQuery('.wpsc_mass_resize').css('visibility', 'visible'); - }); - }); - - jQuery('.wpsc_prod_thumb_option').livequery(function(){ - jQuery(this).blur(function(){ - jQuery('.wpsc_mass_resize').css('visibility', 'hidden'); - }); - }); - - - //Delete checkout options on settings>checkout page - jQuery('.wpsc_delete_option').livequery(function(){ - jQuery(this).click(function(event){ - jQuery(this).parent().parent('tr').remove(); - event.preventDefault(); - }); - - }); - //Changing the checkout fields page - jQuery('#wpsc_checkout_sets').livequery(function(){ - jQuery(this).change(function(){ - - }); - - }); - //checkboxes on checkout page - - jQuery('.wpsc_add_new_checkout_option').livequery(function(){ - jQuery(this).click(function(event){ - form_id = jQuery(this).attr('title'); - id = form_id.replace('form_options', ''); - output = " "+TXT_WPSC_DELETE+""; - jQuery(this).parent().parent('tr').after(output); - event.preventDefault(); - }); - - }); - - - jQuery('.wpsc_edit_checkout_options').livequery(function(){ - jQuery(this).click(function(event){ - if(!jQuery(this).hasClass('triggered')){ - jQuery(this).addClass('triggered'); - id = jQuery(this).attr('rel'); - id = id.replace('form_options[', ''); - id = id.replace(']', ''); - post_values = "form_id="+id; - jQuery.post('index.php?wpsc_admin_action=check_form_options',post_values, function(returned_data){ - if(returned_data != ''){ - jQuery('#checkout_'+id).after(returned_data); - }else{ - output = "Please Save your changes before trying to Order your Checkout Forms again.\r\nLabelValue+ New Option"; - output += "Delete"; - jQuery('#checkout_'+id).after(output); - - } - - }); - jQuery('table#wpsc_checkout_list').sortable('disable'); - } - event.preventDefault(); - }); - - - }); - - //grid view checkbox ajax to deselect show images only when other checkboxes are selected - jQuery('#show_images_only').livequery(function(){ - jQuery(this).click(function(){ - imagesonly = jQuery(this).is(':checked'); - if(imagesonly){ - jQuery('#display_variations').attr('checked', false); - jQuery('#display_description').attr('checked', false); - jQuery('#display_addtocart').attr('checked', false); - jQuery('#display_moredetails').attr('checked', false); - - } - }); - }); - jQuery('#display_variations, #display_description, #display_addtocart, #display_moredetails').livequery(function(){ - jQuery(this).click(function(){ - imagesonly = jQuery(this).is(':checked'); - - if(imagesonly){ - jQuery('#show_images_only').attr('checked', false); - - } - }); - }); - //new currency JS in admin product page - jQuery('div.new_layer').livequery(function(){ - jQuery(this).hide(); - - }); - var firstclick = true - jQuery('a.wpsc_add_new_currency').livequery(function(){ - jQuery(this).click(function(event){ - if(firstclick == true){ - jQuery('div.new_layer').show(); - html = jQuery('div.new_layer').html(); - firstclick = false; - }else{ - jQuery('div.new_layer').after('
    '+html+'
    '); - } - event.preventDefault(); - }); - }); - //delete currency layer in admin product page - jQuery('a.wpsc_delete_currency_layer').livequery(function(){ - jQuery(this).click(function(event){ - jQuery(this).prev('input').val(''); - jQuery(this).prev('select').val(''); - jQuery(this).parent('div:first').hide(); - event.preventDefault(); - }); - }); - - jQuery('form input.prdfil').livequery(function(){ - jQuery(this).click(function(event){ - var products = jQuery(this).parent("form.product_upload").find('input').serialize(); - var product_id = jQuery(this).parent("form.product_upload").find('input#hidden_id').val(); - post_values = products + '&product_id=' + product_id; - jQuery.post('admin.php?wpsc_admin_action=product_files_upload',post_values, function(returned_data){ - tb_remove(); - if (returned_data.length > 0) { - jQuery('#wpsc_product_download_forms .select_product_file').append(returned_data). - find('p.no-item').hide().end(). - find('p:even').removeClass('alt').end(). - find('p:odd').addClass('alt'); - } - }); - event.preventDefault(); - }); - }); - - - //delete currency layer in admin product page - jQuery('a.wpsc_mass_resize').livequery(function(){ - jQuery(this).click(function(event){ - this_href = jQuery(this).attr('href'); - parent_element = jQuery(this).parent(); - extra_parameters = jQuery("input[type=text]", parent_element).serialize(); - window.location = this_href+"&"+extra_parameters; - return false; - }); - }); - - //select all target markets in general settings page - jQuery('a.wpsc_select_all').livequery(function(){ - jQuery(this).click(function(event){ - jQuery('div#resizeable input:checkbox').attr('checked', true); - event.preventDefault(); - - }); - - }); - //select all target markets in general settings page - jQuery('a.wpsc_select_none').livequery(function(){ - jQuery(this).click(function(event){ - jQuery('div#resizeable input:checkbox').attr('checked', false); - event.preventDefault(); - - }); - - }); - if( pagenow == 'edit-wpsc_product_category' ) { - jQuery('table.tags').sortable({ - axis: 'y', - items : 'tr', - containment: 'table.tags tbody', - placeholder: 'product-placeholder', - cursor: 'move', - tolerance: 'pointer', - update: function(event, ui){ - categorySort(jQuery('table.tags').sortable('toArray'), 0); - } - }); - - function categorySort(order, parent){ - var data = { - action: 'category_sort_order', - sort_order: order, - parent_id: parent - }; - - var id = '#debugData_'; - - jQuery.post(ajaxurl, data, function(response) { - jQuery(id).append(response); - }); - return false; - } - - jQuery('.edit-tags-php form').attr('enctype', 'multipart/form-data').attr('encoding', 'multipart/form-data'); - - } - //Added for inline editing capabilities - jQuery('#wpsc_product_list a.wpsc_editinline').live('click', function() { - jQuery(this).parents('tr:first').find('a.row-title, td > span').hide(); - jQuery('.wpsc_ie_field').each(function(){ - jQuery(this).width( (jQuery(this).parents('td:first').innerWidth() - 14) + 'px' ); - }); - jQuery(this).parents('tr:first').find('td input.wpsc_ie_field, td .wpsc_inline_actions').show(); - return false; - }); - - jQuery('#wpsc_product_list .wpsc_ie_cancel').live('click', function(){ - jQuery(this).parents('tr:first').find('a.row-title, td > span').show(); - jQuery(this).parents('tr:first').find('td input.wpsc_ie_field, td .wpsc_inline_actions').hide(); - jQuery(this).parents('tr:first').find('.loading_indicator').css('visibility', 'hidden'); - }); - jQuery('#wpsc_product_list .wpsc_ie_save').live('click', function(){ - jQuery(this).parents('tr:first').find('.loading_indicator').css('visibility', 'visible'); - var id =jQuery(this).parents('tr:first').find('.wpsc_ie_id').val(); - var title = jQuery(this).parents('tr:first').find('.wpsc_ie_title').val(); - var weight = jQuery(this).parents('tr:first').find('.wpsc_ie_weight').val(); - var stock = jQuery(this).parents('tr:first').find('.wpsc_ie_stock').val(); - var price = jQuery(this).parents('tr:first').find('.wpsc_ie_price').val(); - var special_price = jQuery(this).parents('tr:first').find('.wpsc_ie_special_price').val(); - var sku = jQuery(this).parents('tr:first').find('.wpsc_ie_sku').val(); - //post stuff - var data = { - action: 'wpsc_ie_save', - id: id, - title: title, - weight: weight, - stock: stock, - price: price, - special_price: special_price, - sku: sku - }; - - jQuery.post(ajaxurl, data, function(response) { - response = eval(response); - if(response.error){ - alert(response.error); - jQuery('#post-' + response.id + ' a.row-title, #post-' + response.id + ' td > span').show(); - jQuery('#post-' + response.id + ' td input.wpsc_ie_field, #post-' + response.id + ' td .wpsc_inline_actions').hide(); - jQuery('#post-' + response.id + ' .loading_indicator').css('visibility', 'hidden'); - } - else{ - jQuery('#post-' + response.id + ' .post-title a.row-title').text(response.title); - jQuery('#post-' + response.id + ' .column-weight span').text(response.weight); - jQuery('#post-' + response.id + ' .column-stock span').text(response.stock); - jQuery('#post-' + response.id + ' .column-SKU span').text(response.sku); - - jQuery('#post-' + response.id + ' .column-price .pricedisplay').html(jQuery(response.price).text()); - jQuery('#post-' + response.id + ' .column-sale_price .pricedisplay').html(jQuery(response.special_price).text()); - - jQuery('#post-' + response.id + ' a.row-title, #post-' + response.id + ' td > span').show(); - jQuery('#post-' + response.id + ' td input.wpsc_ie_field, #post-' + response.id + ' td .wpsc_inline_actions').hide(); - jQuery('#post-' + response.id + ' .loading_indicator').css('visibility', 'hidden'); - } - }); - }); - - //As far as I can tell, WP provides no good way of unsetting elements in the bulk edit area...tricky jQuery action will do for now....not ideal whatsoever, nor eternally stable. - if( pagenow == 'edit-wpsc-product' ) { - //jQuery('fieldset.inline-edit-col-left .inline-edit-date').css('display','none'); - //jQuery('fieldset.inline-edit-col-center span.title:eq(1), ul.cat-checklist:eq(1)').css('display','none'); - jQuery("label:contains('Date')").css('display', 'none'); - jQuery(".inline-edit-group:contains('Password')").css('display', 'none'); - jQuery('fieldset.inline-edit-col-left.wpsc-cols').css({'float': 'right', 'clear' : 'right'}); - jQuery("label:contains('Parent')").css('display', 'none'); - jQuery("label:contains('Status')").css('display', 'none'); - jQuery("span:contains('Variations')").css('display', 'none'); - jQuery("ul.wpsc-variation-checklist").css('display', 'none'); - jQuery("div.inline-edit-date").css('display', 'none'); - } - if( wpsc_adminL10n.dragndrop_set == "true" && typenow == "wpsc-product" && adminpage == "edit-php" ) { - // this makes the product list table sortable - jQuery('table.widefat:not(.tags)').sortable({ - update: function(event, ui) { - category_id = jQuery('select#wpsc_product_category option:selected').val(); - product_order = jQuery('table.widefat').sortable( 'serialize' ); - post_values = "category_id="+category_id+"&"+product_order; - jQuery.post( 'index.php?wpsc_admin_action=save_product_order', post_values, function(returned_data) { }); - }, - items: 'tbody tr', - axis: 'y', - containment: 'table.widefat tbody', - placeholder: 'product-placeholder', - cursor: 'move', - cancel: 'tr.inline-edit-wpsc-product' - }); - } - - jQuery('table#wpsc_checkout_list').livequery(function(event){ - //this makes the checkout form fields sortable - jQuery(this).sortable({ - - items: 'tr.checkout_form_field', - axis: 'y', - containment: 'table#wpsc_checkout_list', - placeholder: 'checkout-placeholder', - handle: '.drag' - - }); - jQuery(this).bind('sortupdate', function(event, ui) { - - //post_values = jQuery(this).sortable(); - //post_values = "category_id="+category_id+"&"+checkout_order; - post_values = jQuery( 'table#wpsc_checkout_list').sortable( 'serialize'); - jQuery.post( 'index.php?wpsc_admin_action=save_checkout_order', post_values, function(returned_data) { }); - }); - - }); - - // this helps show the links in the product list table, it is partially done using CSS, but that breaks in IE6 - jQuery("tr.product-edit").hover( - function() { - jQuery(".wpsc-row-actions", this).css("visibility", "visible"); - }, - function() { - jQuery(".wpsc-row-actions", this).css("visibility", "hidden"); - } - ); - - jQuery('tr.wpsc_trackingid_row').hide(); - - jQuery('.wpsc_show_trackingid').click(function(event){ - purchlog_id = jQuery(this).attr('title'); - if(jQuery('tr.log'+purchlog_id).hasClass('wpsc_hastracking')){ - jQuery('tr.log'+purchlog_id).removeClass('wpsc_hastracking'); - jQuery('tr.log'+purchlog_id).hide(); - }else{ - jQuery('tr.log'+purchlog_id).addClass('wpsc_hastracking'); - jQuery('tr.log'+purchlog_id).show(); - } - event.preventDefault(); - }); - // this changes the purchase log item status - jQuery('.selector').change(function(){ - purchlog_id = jQuery(this).attr('title'); - purchlog_status = jQuery(this).val(); - post_values = "action=purchlog_edit_status&purchlog_id="+purchlog_id+"&purchlog_status="+purchlog_status; - var ajax_loading = jQuery(this).prev('.ajax-loading'); - ajax_loading.css('visibility', 'visible'); - jQuery.post( ajaxurl, post_values, function(returned_data) { - ajax_loading.css('visibility', 'hidden'); - }); - - if(purchlog_status == 4){ - jQuery('tr.log'+purchlog_id).show(); - - } - }); - - jQuery('.sendTrackingEmail').click(function(event){ - purchlog_id = jQuery(this).attr('title'); - post_values = "purchlog_id="+purchlog_id; - var ajax_loader = jQuery(this).prev('.ajax-loading'); - ajax_loader.css('visibility', 'visible'); - jQuery.post( 'index.php?wpsc_admin_action=purchlog_email_trackid', post_values, function(returned_data) { ajax_loader.css('visibility', 'hidden'); }); - event.preventDefault(); - }); - - jQuery("a.thickbox").livequery(function(){ - tb_init(this); - }); - - jQuery("div.admin_product_name a.shorttag_toggle").livequery(function(){ - jQuery(this).toggle( - function () { - jQuery("div.admin_product_shorttags", jQuery(this).parents("table.product_editform")).css('display', 'block'); - return false; - }, - function () { - //jQuery("div#admin_product_name a.shorttag_toggle").toggleClass('toggled'); - jQuery("div.admin_product_shorttags", jQuery(this).parents("table.product_editform")).css('display', 'none'); - return false; - } - ); - }); - jQuery('.editinline').live('click', function(){ - setTimeout('editinline_get_id()',200); - - }); - - jQuery('a.add_variation_item_form').livequery(function(){ - jQuery(this).click(function() { - form_field_container = jQuery(this).siblings('#variation_values'); - form_field = jQuery("div.variation_value", form_field_container).eq(0).clone(); - - jQuery('input.text',form_field).attr('name','new_variation_values[]'); - jQuery('input.text',form_field).val(''); - jQuery('input.variation_values_id',form_field).remove(); - - jQuery(form_field_container).append(form_field); - return false; - }); - }); - - - jQuery('div.variation_value a.delete_variation_value').livequery(function(){ - jQuery(this).click( function() { - element_count = jQuery("#variation_values div").size(); - - if(element_count > 1) { - - parent_element = jQuery(this).parent("div.variation_value"); - variation_value_id = jQuery("input.variation_values_id", parent_element).val(); - - delete_url = jQuery(this).attr('href'); - post_values = "remove_variation_value=true&variation_value_id="+variation_value_id; - jQuery.post( delete_url, "ajax=true", function(returned_data) { - jQuery("#variation_row_"+returned_data).fadeOut('fast', function() { - jQuery(this).remove(); - }); - }); - } - return false; - }); - }); - - jQuery('a.add_new_form_set').livequery(function(){ - jQuery(this).click( function() { - jQuery(".add_new_form_set_forms").toggle(); - return false; - }); - }); - - - jQuery("#add-product-image").click(function(){ - swfu.selectFiles(); - }); - - - jQuery('a.closeimagesettings').livequery(function(){ - jQuery(this).click( function() { - jQuery('.image_settings_box').hide(); - }); - }); - - - jQuery("#gallery_list").livequery(function(){ - jQuery(this).sortable({ - revert: false, - placeholder: "ui-selected", - start: function(e,ui) { - jQuery('#image_settings_box').hide(); - jQuery('a.editButton').hide(); - jQuery('img.deleteButton').hide(); - jQuery('ul#gallery_list').children('li').removeClass('first'); - }, - stop:function (e,ui) { - jQuery('ul#gallery_list').children('li:first').addClass('first'); - }, - update: function (e,ui){ - input_set = jQuery.makeArray(jQuery("#gallery_list li:not(.ui-sortable-helper) input.image-id")); - //console.log(input_set); - set = new Array(); - for( var i in input_set) { - set[i] = jQuery(input_set[i]).val(); - } - //console.log(set); - /* - img_id = jQuery('#gallery_image_'+set[0]).parent('li').attr('id'); - - jQuery('#gallery_image_'+set[0]).children('img.deleteButton').remove(); - jQuery('#gallery_image_'+set[0]).append("Edit "); -// jQuery('#gallery_image_'+set[0]).parent('li').attr('id', "product_image_"+img_id); - //for(i=1;i"); - //} - - for(i=1;i"); - - element_id = jQuery('#gallery_image_'+set[i]).parent('li').attr('id'); - if(element_id == 0) { -// jQuery('#gallery_image_'+set[i]).parent('li').attr('id', "product_image_"+img_id); - } - } - */ - order = set.join(','); - product_id = jQuery('#product_id').val(); - - postVars = "product_id="+product_id+"&order="+order; - jQuery.post( 'index.php?wpsc_admin_action=rearrange_images', postVars, function(returned_data) { - eval(returned_data); - jQuery('#gallery_image_'+image_id).children('a.editButton').remove(); - jQuery('#gallery_image_'+image_id).children('div.image_settings_box').remove(); - jQuery('#gallery_image_'+image_id).append(image_menu); - }); - - }, - 'opacity':0.5 - }); - }); - - - - - // show or hide the stock input forms - jQuery("input.limited_stock_checkbox").livequery(function(){ - jQuery(this).click( function () { - parent_form = jQuery(this).parents('form'); - if(jQuery(this).attr('checked') == true) { - jQuery("div.edit_stock",parent_form).show(); - jQuery("th.stock, td.stock", parent_form).show(); - } else { - jQuery("div.edit_stock", parent_form).hide(); - jQuery("th.stock, td.stock", parent_form).hide(); - } - }); - }); - - - jQuery("#table_rate_price").livequery(function(){ - if (!this.checked) { - jQuery("#table_rate").hide(); - } - jQuery(this).click( function() { - if (this.checked) { - jQuery("#table_rate").show(); - } else { - jQuery("#table_rate").hide(); - } - }); - }); - - jQuery("#custom_tax_checkbox").livequery(function(){ - jQuery(this).click( function() { - if (this.checked) { - jQuery("#custom_tax").show(); - } else { - jQuery("#custom_tax input").val(''); - jQuery("#custom_tax").hide(); - } - }); - }); - - jQuery(".add_level").livequery(function(){ - jQuery(this).click(function() { - added = jQuery(this).parent().children('table').append(' and above'); - }); - }); - - - jQuery(".remove_line").livequery(function(){ - jQuery(this).click(function() { - jQuery(this).parent().parent('tr').remove(); - }); - }); - /* shipping options start */ - // gets shipping form for admin page - // show or hide the stock input forms - - jQuery(".wpsc-payment-actions a").livequery(function(){ - jQuery(this).click( function () { - var module = jQuery(this).attr('rel'); - //console.log(module); - jQuery.ajax({ - method: "post", - url: "index.php", - data: "wpsc_admin_action=get_payment_form&paymentname="+module, - success: function(returned_data){ - // console.log(returned_data); - eval(returned_data); - //jQuery(".gateway_settings").children(".form-table").html(html) - jQuery('.gateway_settings h3.hndle').html(payment_name_html); - jQuery("td.gateway_settings table.form-table").html(''+payment_form_html); - if(has_submit_button != '') { - jQuery('.gateway_settings div.submit').css('display', 'block'); - } else { - jQuery('.gateway_settings div.submit').css('display', 'none'); - } - } - }); - return false; - - }); - }); - - jQuery('#addweightlayer').livequery(function(){ - jQuery(this).click(function(){ - jQuery(this).parent().append("
    "+TXT_WPSC_IF_WEIGHT_IS+" "+TXT_WPSC_AND_ABOVE+"  "+TXT_WPSC_DELETE+"
    "); - }); - - }); - - jQuery('#addlayer').livequery(function(){ - jQuery(this).click(function(){ - jQuery(this).parent().append("
    "+TXT_WPSC_IF_PRICE_IS+" "+TXT_WPSC_AND_ABOVE+"  "+TXT_WPSC_DELETE+"
    "); - //bind_shipping_rate_deletion(); - return false; - }); - - }); - - jQuery('table#gateway_options a.delete_button').livequery(function(){ - jQuery(this).click(function () { - this_row = jQuery(this).parent().parent('tr .rate_row'); - // alert(this_row); - //jQuery(this_row).hide(); - if(jQuery(this).hasClass('nosubmit')) { - // if the row was added using JS, just scrap it - this_row = jQuery(this).parent('div .wpsc_newlayer'); - jQuery(this_row).remove(); - } else { - // otherwise, empty it and submit it - jQuery('input', this_row).val(''); - jQuery(this).parents('form').submit(); - } - return false; - }); - }); - - // hover for gallery view - jQuery("div.previewimage").livequery(function(){ - jQuery(this).hover( - function () { - jQuery(this).children('img.deleteButton').show(); - if(jQuery('div.image_settings_box').css('display')!='block') - jQuery(this).children('a.editButton').show(); - }, - function () { - jQuery(this).children('img.deleteButton').hide(); - jQuery(this).children('a.editButton').hide(); - } - ); - }); - - - // display image editing menu - jQuery("a.editButton").livequery(function(){ - jQuery(this).click( function(){ - jQuery(this).hide(); - jQuery('div.image_settings_box').show('fast'); - }); - }); - // hide image editing menu - jQuery("a.closeimagesettings").livequery(function(){ - jQuery(this).click(function (e) { - jQuery("div#image_settings_box").hide(); - }); - }); - - // delete upload - jQuery(".file_delete_button").livequery(function(){ - jQuery(this).click(function() { - url = jQuery(this).attr('href'); - post_values = "ajax=true"; - jQuery.post( url, post_values, function(returned_data) { - eval(returned_data); - }); - return false; - }); - }); - - // Options page ajax tab display - jQuery('#sidemenu li').click(function(){ - page_title = jQuery(this).attr('id'); - - wpnonce = jQuery('a',this).attr('href').match(/_wpnonce=(\w{1,})/); - post_values = "wpsc_admin_action=settings_page_ajax&page_title="+page_title+"&_wpnonce="+wpnonce[1]; - jQuery.post('admin.php?', post_values, function(html){ - //console.log(html); - jQuery('a.current').removeClass('current'); - jQuery('#'+page_title+' a' ).addClass('current'); - jQuery('#wpsc_options_page').html(''); - jQuery('#wpsc_options_page').html(html); - - }); - return false; - - }); - - jQuery('.wpsc_featured_product_toggle').livequery(function(){ - jQuery(this).click(function(event){ - target_url = jQuery(this).attr('href'); - post_values = "ajax=true"; - jQuery.post(target_url, post_values, function(returned_data){ - eval(returned_data); - }); - return false; - }); - }); - - // Fill in values when inline editor appears. - jQuery('.inline-editor').livequery(function() { - var id = jQuery(this).attr('id'); - id = id.replace(/^edit-/, ''); - - if (!id || !parseInt(id)) { - return; - } - - var weight = jQuery('#inline_' + id + '_weight').text(), - stock = jQuery('#inline_' + id + '_stock').text(), - price = jQuery('#inline_' + id + '_price').text(), - sale_price = jQuery('#inline_' + id + '_sale_price').text(), - sku = jQuery('#inline_' + id + '_sku').text(); - - jQuery(this).find('.wpsc_ie_weight').val(weight); - jQuery(this).find('.wpsc_ie_stock').val(stock); - jQuery(this).find('.wpsc_ie_price').val(price); - jQuery(this).find('.wpsc_ie_sale_price').val(sale_price); - jQuery(this).find('.wpsc_ie_sku').val(sku); - }); - - // Form change tracking code. - jQuery('form.wpsc_form_track input, form.wpsc_form_track textarea').live('change', function() { - jQuery(this).parents('form.wpsc_form_track:first').addClass('wpsc_form_changed'); - }); - - jQuery('form.wpsc_form_track').live('submit', function() { - jQuery(this).removeClass('wpsc_form_changed'); - - }); - - // We'd ideally want to be using window.onbeforeonload to toss in a prompt, but that event is too - // unreliable from a browser to the next. Hooking onto anchors is the next best thing. - jQuery('form.wpsc_form_track a').live('click', function() { - if (jQuery(this).attr('href') && jQuery(this).attr('href') != '#' && !jQuery(this).hasClass('wpsc_select_all') && !jQuery(this).hasClass('wpsc_select_none')) { - if (jQuery('form.wpsc_form_changed').size()) { - if (!confirm(wpsc_adminL10n.unsaved_changes_detected)) { - return false; - } - } - } - }); -}); - -// function for adding more custom meta -function add_more_meta(e) { - current_meta_forms = jQuery(e).parent().children("div.product_custom_meta:last"); // grab the form container - new_meta_forms = current_meta_forms.clone(true); // clone the form container - jQuery("label input", new_meta_forms).val(''); // reset all contained forms to empty - current_meta_forms.after(new_meta_forms); // append it after the container of the clicked element - return false; -} - -// function for removing custom meta -function remove_meta(e, meta_id) { - current_meta_form = jQuery(e).parent("div.product_custom_meta"); // grab the form container - //meta_name = jQuery("input#custom_meta_name_"+meta_id, current_meta_form).val(); - //meta_value = jQuery("input#custom_meta_value_"+meta_id, current_meta_form).val(); - returned_value = jQuery.ajax({ - type: "POST", - url: "admin.php?ajax=true", - data: "admin=true&remove_meta=true&meta_id="+meta_id+"", - success: function(results) { - if(results > 0) { - jQuery("div#custom_meta_"+meta_id).remove(); - } - } - }); - return false; -} - - -// function for switching the state of the image upload forms -function wpsc_upload_switcher(target_state) { - switch(target_state) { - case 'flash': - jQuery("div.browser-image-uploader").css("display","none"); - jQuery("div.flash-image-uploader").css("display","block"); - jQuery.post( 'index.php?admin=true', "admin=true&ajax=true&save_image_upload_state=true&image_upload_state=1", function(returned_data) { }); - break; - - case 'browser': - jQuery("div.flash-image-uploader").css("display","none"); - jQuery("div.browser-image-uploader").css("display","block"); - jQuery.post( 'index.php?admin=true', "admin=true&ajax=true&save_image_upload_state=true&image_upload_state=0", function(returned_data) { }); - break; - } -} - -// function for switching the state of the extra resize forms -function image_resize_extra_forms(option) { - container = jQuery(option).parent(); - jQuery("div.image_resize_extra_forms").css('display', 'none'); - jQuery("div.image_resize_extra_forms",container).css('display', 'block'); -} - - -var prevElement = null; -var prevOption = null; - -function hideOptionElement(id, option) { - if (prevOption == option) { - return; - } - if (prevElement != null) { - prevElement.style.display = "none"; - } - - if (id == null) { - prevElement = null; - } else { - prevElement = document.getElementById(id); - jQuery('#'+id).css( 'display','block'); - } - prevOption = option; -} - -function hideelement(id) { - state = document.getElementById(id).style.display; - //alert(document.getElementById(id).style.display); - if(state != 'block') { - document.getElementById(id).style.display = 'block'; - } else { - document.getElementById(id).style.display = 'none'; - } -} - -/* - * Modified copy of the wordpress edToolbar function that does the same job, it uses document.write, we cannot. -*/ -function wpsc_edToolbar() { - //document.write('
    '); - output = ''; - for (i = 0; i < edButtons.length; i++) { - output += wpsc_edShowButton(edButtons[i], i); - } - output += ''; - output += ''; - // edShowLinks(); // disabled by default - //document.write('
    '); - jQuery('div#ed_toolbar').html(output); -} - - -/* - * Modified copy of the wordpress edShowButton function that does the same job, it uses document.write, we cannot. -*/ - -function wpsc_edShowButton(button, i) { - if (button.id == 'ed_img') { - output = ''; - } - else if (button.id == 'ed_link') { - output = ''; - } - else { - output = ''; - } - return output; -} - - - -function fillcategoryform(catid) { - post_values = 'ajax=true&admin=true&catid='+catid; - jQuery.post( 'index.php', post_values, function(returned_data) { - jQuery('#formcontent').html( returned_data ); - jQuery('form.edititem').css('display', 'block'); - jQuery('#additem').css('display', 'none'); - jQuery('#blank_item').css('display', 'none'); - jQuery('#productform').css('display', 'block'); - jQuery("#loadingindicator_span").css('visibility','hidden'); - }); -} - -function submit_status_form(id) { - document.getElementById(id).submit(); -} -function showaddform() { - jQuery('#blank_item').css('display', 'none'); - jQuery('#productform').css('display', 'none'); - jQuery('#additem').css('display', 'block'); - return false; -} -//used to add new form fields in the checkout setting page -function add_form_field(e) { - var time = new Date(), - new_element_number = time.getTime(), - new_element_id = "form_id_"+new_element_number, - new_element_contents = ''; - - new_element_contents += ""; - new_element_contents += "\n\r"; - new_element_contents += "\n\r"; - new_element_contents += "\n\r"; - new_element_contents += "\n\r"; - new_element_contents += ""+TXT_WPSC_DELETE+"\n\r"; - new_element_contents += ''; - jQuery("#wpsc_checkout_list_body").append(new_element_contents); - return false; -} - - - -function remove_new_form_field(id) { - element_count = document.getElementById("wpsc_checkout_list_body").childNodes.length; - if(element_count > 1) { - target_element = document.getElementById(id); - document.getElementById("wpsc_checkout_list_body").removeChild(target_element); - } - return false; -} - - -function submit_change_country() { - document.cart_options.submit(); -//document.cart_options.submit(); -} - -function getcurrency(id) { -//ajax.post("index.php",gercurrency,"wpsc_admin_action=change_currency¤cyid="+id); -} -//delete checkout fields from checkout settings page -function remove_form_field(id,form_id) { - var delete_variation_value=function(results) { } - element_count = document.getElementById("wpsc_checkout_list_body").childNodes.length; - if(element_count > 1) { - ajax.post("index.php",delete_variation_value,"admin=true&ajax=true&remove_form_field=true&form_id="+form_id); - target_element = document.getElementById(id); - document.getElementById("wpsc_checkout_list_body").removeChild(target_element); - } - return false; -} - -function showadd_categorisation_form() { - if(jQuery('div_categorisation').css('display') != 'block') { - jQuery('div#add_categorisation').css('display', 'block'); - jQuery('div#edit_categorisation').css('display', 'none'); - } else { - jQuery('div#add_categorisation').css('display', 'none'); - } - return false; -} - - -function showedit_categorisation_form() { - if(jQuery('div#edit_categorisation').css('display') != 'block') { - jQuery('div#edit_categorisation').css('display', 'block'); - jQuery('div#add_categorisation').css('display', 'none'); - } else { - jQuery('div#edit_categorisation').css('display', 'none'); - } - return false; -} - -function hideelement1(id, item_value) { - //alert(value); - if(item_value == 5) { - jQuery(document.getElementById(id)).css('display', 'block'); - } else { - jQuery(document.getElementById(id)).css('display', 'none'); - } -} - -function show_status_box(id,image_id) { - state = document.getElementById(id).style.display; - if(state != 'block') { - document.getElementById(id).style.display = 'block'; - document.getElementById(image_id).src = WPSC_CORE_IMAGES_URL + '/icon_window_collapse.gif'; - } else { - document.getElementById(id).style.display = 'none'; - document.getElementById(image_id).src = WPSC_CORE_IMAGES_URL + '/icon_window_expand.gif'; - } - return false; -} - -function editinline_get_id(){ - id = jQuery('.inline-edit-row').attr('id'); - id = id.replace('edit-',''); - has_var = jQuery('#inline_'+id+'_has_var').val(); - if( has_var == '1'){ - jQuery(".wpsc-cols").css('display', 'none'); - jQuery(".wpsc-cols:first").text('Quick Edit options are limited when editing products that have variations. You will need to edit the variations themselves.') - .addClass('wpsc_var_description') - .css('display','block'); - }else{ - jQuery(".wpsc-cols").css('display', 'block'); - } - - -} \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/ajax.js b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/ajax.js deleted file mode 100644 index a772c86..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/ajax.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 Timothy R. Morgan -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -// mini/ajax.js - http://timmorgan.org/mini -// var fvd = 0; -function ajax_item(e){if(typeof e=='string')e=document.getElementById(e);return e}; -function collect(a,f){var n=[];for(var i=0;i35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6(C){C.f={1w:{1l:6(E,F,H){8 G=C.f[E].2N;1z(8 D 6J H){G.2K[D]=G.2K[D]||[];G.2K[D].25([F,H[D]])}},1F:6(D,F,E){8 H=D.2K[F];5(!H){e}1z(8 G=0;G\').1b(D).h({W:"1r",7:"-4S",c:"-4S",3m:"43"}).1T("1e");C.f.3t[D]=!!((!(/2f|6F/).1h(E.h("1R"))||(/^[1-9]/).1h(E.h("q"))||(/^[1-9]/).1h(E.h("r"))||!(/4O/).1h(E.h("6K"))||!(/6L|6P\\(0, 0, 0, 0\\)/).1h(E.h("6O"))));6u{C("1e").4R(0).53(E.4R(0))}7f(F){}e C.f.3t[D]},74:6(D){C(D).1P("3v","54").h("4N","4O")},71:6(D){C(D).1P("3v","6Q").h("4N","")},5P:6(G,E){8 D=/7/.1h(E||"7")?"14":"13",F=o;5(G[D]>0){e z}G[D]=1;F=G[D]>0?z:o;G[D]=0;e F}};8 B=C.4a.1y;C.4a.1y=6(){C("*",4).1l(4).1N("1y");e B.2E(4,5n)};6 A(E,F,G){8 D=C[E][F].4C||[];D=(3s D=="41"?D.49(/,?\\s+/):D);e(C.3q(G,D)!=-1)}C.2k=6(E,D){8 F=E.49(".")[0];E=E.49(".")[1];C.4a[E]=6(J){8 H=(3s J=="41"),I=5I.2N.5N.1F(5n,1);5(H&&A(F,E,J)){8 G=C.v(4[0],E);e(G?G[J].2E(G,I):1U)}e 4.1n(6(){8 K=C.v(4,E);5(H&&K&&C.32(K[J])){K[J].2E(K,I)}11{5(!H){C.v(4,E,6g C[F][E](4,J))}}})};C[F][E]=6(I,H){8 G=4;4.2o=E;4.5k=F+"-"+E;4.b=C.2c({},C.2k.2v,C[F][E].2v,H);4.i=C(I).1X("2Y."+E,6(L,J,K){e G.2Y(J,K)}).1X("45."+E,6(K,J){e G.45(J)}).1X("1y",6(){e G.2i()});4.3f()};C[F][E].2N=C.2c({},C.2k.2N,D)};C.2k.2N={3f:6(){},2i:6(){4.i.2n(4.2o)},45:6(D){e 4.b[D]},2Y:6(D,E){4.b[D]=E;5(D=="12"){4.i[E?"1b":"1B"](4.5k+"-12")}},4z:6(){4.2Y("12",o)},4u:6(){4.2Y("12",z)}};C.2k.2v={12:o};C.f.3C={4b:6(){8 D=4;4.i.1X("6e."+4.2o,6(E){e D.58(E)});5(C.1O.2u){4.57=4.i.1P("3v");4.i.1P("3v","54")}4.68=o},44:6(){4.i.21("."+4.2o);(C.1O.2u&&4.i.1P("3v",4.57))},58:6(F){(4.27&&4.3k(F));4.3L=F;8 E=4,G=(F.6a==1),D=(3s 4.b.38=="41"?C(F.26).3w().1l(F.26).28(4.b.38).U:o);5(!G||D||!4.42(F)){e z}4.3J=!4.b.39;5(!4.3J){4.6b=3p(6(){E.3J=z},4.b.39)}5(4.4k(F)&&4.4i(F)){4.27=(4.33(F)!==o);5(!4.27){F.6c();e z}}4.4c=6(H){e E.5h(H)};4.4j=6(H){e E.3k(H)};C(l).1X("59."+4.2o,4.4c).1X("5a."+4.2o,4.4j);e o},5h:6(D){5(C.1O.2u&&!D.6d){e 4.3k(D)}5(4.27){4.2p(D);e o}5(4.4k(D)&&4.4i(D)){4.27=(4.33(4.3L,D)!==o);(4.27?4.2p(D):4.3k(D))}e!4.27},3k:6(D){C(l).21("59."+4.2o,4.4c).21("5a."+4.2o,4.4j);5(4.27){4.27=o;4.2O(D)}e o},4k:6(D){e(1m.3u(1m.1V(4.3L.1G-D.1G),1m.1V(4.3L.1L-D.1L))>=4.b.3y)},4i:6(D){e 4.3J},33:6(D){},2p:6(D){},2O:6(D){},42:6(D){e z}};C.f.3C.2v={38:1k,3y:1,39:0}})(3h);(6(A){A.2k("f.17",A.2c({},A.f.3C,{3f:6(){8 B=4.b;5(B.k=="4g"&&!(/(18|1r|1Z)/).1h(4.i.h("W"))){4.i.h("W","18")}4.i.1b("f-17");(B.12&&4.i.1b("f-17-12"));4.4b()},33:6(F){8 H=4.b;5(4.k||H.12||A(F.26).5e(".f-6f-30")){e o}8 C=!4.b.30||!A(4.b.30,4.i).U?z:o;A(4.b.30,4.i).3l("*").4M().1n(6(){5(4==F.26){C=z}});5(!C){e o}5(A.f.1A){A.f.1A.4P=4}4.k=A.32(H.k)?A(H.k.2E(4.i[0],[F])):(H.k=="2W"?4.i.2W():4.i);5(!4.k.3w("1e").U){4.k.1T((H.1T=="n"?4.i[0].1J:H.1T))}5(4.k[0]!=4.i[0]&&!(/(1Z|1r)/).1h(4.k.h("W"))){4.k.h("W","1r")}4.1c={c:(Z(4.i.h("4W"),10)||0),7:(Z(4.i.h("4X"),10)||0)};4.1K=4.k.h("W");4.d=4.i.d();4.d={7:4.d.7-4.1c.7,c:4.d.c-4.1c.c};4.d.t={c:F.1G-4.d.c,7:F.1L-4.d.7};4.X=4.k.X();8 B=4.X.d();5(4.X[0]==l.1e&&A.1O.6m){B={7:0,c:0}}4.d.n={7:B.7+(Z(4.X.h("2I"),10)||0),c:B.c+(Z(4.X.h("2H"),10)||0)};8 E=4.i.W();4.d.18=4.1K=="18"?{7:E.7-(Z(4.k.h("7"),10)||0)+4.X[0].14,c:E.c-(Z(4.k.h("c"),10)||0)+4.X[0].13}:{7:0,c:0};4.1D=4.2D(F);4.V={r:4.k.2C(),q:4.k.2B()};5(H.1s){5(H.1s.c!=1U){4.d.t.c=H.1s.c+4.1c.c}5(H.1s.3r!=1U){4.d.t.c=4.V.r-H.1s.3r+4.1c.c}5(H.1s.7!=1U){4.d.t.7=H.1s.7+4.1c.7}5(H.1s.3T!=1U){4.d.t.7=4.V.q-H.1s.3T+4.1c.7}}5(H.m){5(H.m=="n"){H.m=4.k[0].1J}5(H.m=="l"||H.m=="1H"){4.m=[0-4.d.18.c-4.d.n.c,0-4.d.18.7-4.d.n.7,A(H.m=="l"?l:1H).r()-4.d.18.c-4.d.n.c-4.V.r-4.1c.c-(Z(4.i.h("3X"),10)||0),(A(H.m=="l"?l:1H).q()||l.1e.1J.3W)-4.d.18.7-4.d.n.7-4.V.q-4.1c.7-(Z(4.i.h("3V"),10)||0)]}5(!(/^(l|1H|n)$/).1h(H.m)){8 D=A(H.m)[0];8 G=A(H.m).d();4.m=[G.c+(Z(A(D).h("2H"),10)||0)-4.d.18.c-4.d.n.c,G.7+(Z(A(D).h("2I"),10)||0)-4.d.18.7-4.d.n.7,G.c+1m.3u(D.4U,D.2M)-(Z(A(D).h("2H"),10)||0)-4.d.18.c-4.d.n.c-4.V.r-4.1c.c-(Z(4.i.h("3X"),10)||0),G.7+1m.3u(D.3W,D.2R)-(Z(A(D).h("2I"),10)||0)-4.d.18.7-4.d.n.7-4.V.q-4.1c.7-(Z(4.i.h("3V"),10)||0)]}}4.19("1M",F);4.V={r:4.k.2C(),q:4.k.2B()};5(A.f.1A&&!H.3Q){A.f.1A.4Q(4,F)}4.k.1b("f-17-40");4.2p(F);e z},1I:6(C,D){5(!D){D=4.W}8 B=C=="1r"?1:-1;e{7:(D.7+4.d.18.7*B+4.d.n.7*B-(4.1K=="1Z"||(4.1K=="1r"&&4.X[0]==l.1e)?0:4.X[0].14)*B+(4.1K=="1Z"?A(l).14():0)*B+4.1c.7*B),c:(D.c+4.d.18.c*B+4.d.n.c*B-(4.1K=="1Z"||(4.1K=="1r"&&4.X[0]==l.1e)?0:4.X[0].13)*B+(4.1K=="1Z"?A(l).13():0)*B+4.1c.c*B)}},2D:6(E){8 F=4.b;8 B={7:(E.1L-4.d.t.7-4.d.18.7-4.d.n.7+(4.1K=="1Z"||(4.1K=="1r"&&4.X[0]==l.1e)?0:4.X[0].14)-(4.1K=="1Z"?A(l).14():0)),c:(E.1G-4.d.t.c-4.d.18.c-4.d.n.c+(4.1K=="1Z"||(4.1K=="1r"&&4.X[0]==l.1e)?0:4.X[0].13)-(4.1K=="1Z"?A(l).13():0))};5(!4.1D){e B}5(4.m){5(B.c<4.m[0]){B.c=4.m[0]}5(B.7<4.m[1]){B.7=4.m[1]}5(B.c>4.m[2]){B.c=4.m[2]}5(B.7>4.m[3]){B.7=4.m[3]}}5(F.1q){8 D=4.1D.7+1m.3U((B.7-4.1D.7)/F.1q[1])*F.1q[1];B.7=4.m?(!(D<4.m[1]||D>4.m[3])?D:(!(D<4.m[1])?D-F.1q[1]:D+F.1q[1])):D;8 C=4.1D.c+1m.3U((B.c-4.1D.c)/F.1q[0])*F.1q[0];B.c=4.m?(!(C<4.m[0]||C>4.m[2])?C:(!(C<4.m[0])?C-F.1q[0]:C+F.1q[0])):C}e B},2p:6(B){4.W=4.2D(B);4.1C=4.1I("1r");4.W=4.19("29",B)||4.W;5(!4.b.2t||4.b.2t!="y"){4.k[0].2h.c=4.W.c+"2F"}5(!4.b.2t||4.b.2t!="x"){4.k[0].2h.7=4.W.7+"2F"}5(A.f.1A){A.f.1A.29(4,B)}e o},2O:6(C){8 D=o;5(A.f.1A&&!4.b.3Q){8 D=A.f.1A.5A(4,C)}5((4.b.24=="6o"&&!D)||(4.b.24=="6p"&&D)||4.b.24===z){8 B=4;A(4.k).3b(4.1D,Z(4.b.24,10)||3Z,6(){B.19("1E",C);B.2w()})}11{4.19("1E",C);4.2w()}e o},2w:6(){4.k.1B("f-17-40");5(4.b.k!="4g"&&!4.2Z){4.k.1y()}4.k=1k;4.2Z=o},2K:{},4f:6(B){e{k:4.k,W:4.W,3N:4.1C,b:4.b}},19:6(C,B){A.f.1w.1F(4,C,[B,4.4f()]);5(C=="29"){4.1C=4.1I("1r")}e 4.i.1N(C=="29"?C:"29"+C,[B,4.4f()],4.b[C])},2i:6(){5(!4.i.v("17")){e}4.i.2n("17").21(".17").1B("f-17");4.44()}}));A.2c(A.f.17,{2v:{1T:"n",2t:o,38:":5s",39:0,3y:1,k:"4g"}});A.f.1w.1l("17","1R",{1M:6(D,C){8 B=A("1e");5(B.h("1R")){C.b.2G=B.h("1R")}B.h("1R",C.b.1R)},1E:6(C,B){5(B.b.2G){A("1e").h("1R",B.b.2G)}}});A.f.1w.1l("17","1t",{1M:6(D,C){8 B=A(C.k);5(B.h("1t")){C.b.2S=B.h("1t")}B.h("1t",C.b.1t)},1E:6(C,B){5(B.b.2S){A(B.k).h("1t",B.b.2S)}}});A.f.1w.1l("17","1v",{1M:6(D,C){8 B=A(C.k);5(B.h("1v")){C.b.2U=B.h("1v")}B.h("1v",C.b.1v)},1E:6(C,B){5(B.b.2U){A(B.k).h("1v",B.b.2U)}}});A.f.1w.1l("17","3M",{1M:6(C,B){A(B.b.3M===z?"6k":B.b.3M).1n(6(){A(\'<2m 52="f-17-3M" 2h="6i: #62;">\').h({r:4.2M+"2F",q:4.2R+"2F",W:"1r",1v:"0.6j",1t:5w}).h(A(4).d()).1T("1e")})},1E:6(C,B){A("2m.6q").1n(6(){4.1J.53(4)})}});A.f.1w.1l("17","1Y",{1M:6(D,C){8 E=C.b;8 B=A(4).v("17");E.1p=E.1p||20;E.1o=E.1o||20;B.1j=6(F){3E{5(/2f|1Y/.1h(F.h("2e"))||(/2f|1Y/).1h(F.h("2e-y"))){e F}F=F.n()}35(F[0].1J);e A(l)}(4);B.1f=6(F){3E{5(/2f|1Y/.1h(F.h("2e"))||(/2f|1Y/).1h(F.h("2e-x"))){e F}F=F.n()}35(F[0].1J);e A(l)}(4);5(B.1j[0]!=l&&B.1j[0].2s!="2r"){B.2Q=B.1j.d()}5(B.1f[0]!=l&&B.1f[0].2s!="2r"){B.2L=B.1f.d()}},29:6(D,C){8 E=C.b;8 B=A(4).v("17");5(B.1j[0]!=l&&B.1j[0].2s!="2r"){5((B.2Q.7+B.1j[0].2R)-D.1L=0;H--){8 E=I.2A[H].c,B=E+I.2A[H].r,R=I.2A[H].7,M=R+I.2A[H].q;5(!((E-LJ[4.2a?"r":"q"])){e(I+4.d.t.7>K&&I+4.d.t.7F&&E+4.d.t.cJ[4.2a?"r":"q"])){5(!(I+4.d.t.7>K&&I+4.d.t.7F&&E+4.d.t.cF&&E+4.d.t.cF+J.r/2&&E+4.d.t.cK&&I+4.d.t.7K+J.q/2&&I+4.d.t.7F&&EC){e 1}}11{5(H>K&&IG){e 2}}}e o},4J:6(){4.3Y();4.3P()},3Y:6(){4.u=[];4.w=[4];8 D=4.u;8 C=4;8 F=[[B.32(4.b.u)?4.b.u.1F(4.i,1k,{b:4.b,1g:4.Y}):B(4.b.u,4.i),4]];5(4.b.4d){1z(8 G=4.b.4d.U-1;G>=0;G--){8 I=B(4.b.4d[G]);1z(8 E=I.U-1;E>=0;E--){8 H=B.v(I[E],"15");5(H&&!H.b.12){F.25([B.32(H.b.u)?H.b.u.1F(H.i):B(H.b.u,H.i),H]);4.w.25(H)}}}}1z(8 G=F.U-1;G>=0;G--){F[G][0].1n(6(){B.v(4,"15-1g",F[G][1]);D.25({1g:B(4),p:F[G][1],r:0,q:0,c:0,7:0})})}},3P:6(D){5(4.X){8 C=4.X.d();4.d.n={7:C.7+4.3i.7,c:C.c+4.3i.c}}1z(8 F=4.u.U-1;F>=0;F--){5(4.u[F].p!=4.3n&&4.3n&&4.u[F].1g[0]!=4.Y[0]){3g}8 E=4.b.4I?B(4.b.4I,4.u[F].1g):4.u[F].1g;5(!D){4.u[F].r=E[0].2M;4.u[F].q=E[0].2R}8 G=E.d();4.u[F].c=G.c;4.u[F].7=G.7}5(4.b.48&&4.b.48.5p){4.b.48.5p.1F(4)}11{1z(8 F=4.w.U-1;F>=0;F--){8 G=4.w[F].i.d();4.w[F].1S.c=G.c;4.w[F].1S.7=G.7;4.w[F].1S.r=4.w[F].i.2C();4.w[F].1S.q=4.w[F].i.2B()}}},2i:6(){4.i.1B("f-15 f-15-12").2n("15").21(".15");4.44();1z(8 C=4.u.U-1;C>=0;C--){4.u[C].1g.2n("15-1g")}},4h:6(E){8 C=E||4,F=C.b;5(F.1d.5J==7c){8 D=F.1d;F.1d={i:6(){e B("<2m>").1b(D)[0]},34:6(G,H){H.h(G.d()).h({r:G.2C(),q:G.2B()})}}}C.1d=B(F.1d.i.1F(C.i,C.Y)).1T("1e").h({W:"1r"});F.1d.34.1F(C.i,C.Y,C.1d)},5B:6(F){1z(8 D=4.w.U-1;D>=0;D--){5(4.4E(4.w[D].1S)){5(!4.w[D].1S.2z){5(4.3n!=4.w[D]){8 I=76;8 H=1k;8 E=4.1C[4.w[D].2a?"c":"7"];1z(8 C=4.u.U-1;C>=0;C--){5(!A(4.w[D].i[0],4.u[C].1g[0])){3g}8 G=4.u[C][4.w[D].2a?"c":"7"];5(1m.1V(G-E)=0;E--){4.w[E].19("4T",H,4)}}5(B.f.1A){B.f.1A.4P=4}5(B.f.1A&&!J.3Q){B.f.1A.4Q(4,H)}4.40=z;4.2p(H);e z},1I:6(D,E){5(!E){E=4.W}8 C=D=="1r"?1:-1;e{7:(E.7+4.d.n.7*C-(4.X[0]==l.1e?0:4.X[0].14)*C+4.1c.7*C),c:(E.c+4.d.n.c*C-(4.X[0]==l.1e?0:4.X[0].13)*C+4.1c.c*C)}},2D:6(F){8 G=4.b;8 C={7:(F.1L-4.d.t.7-4.d.n.7+(4.X[0]==l.1e?0:4.X[0].14)),c:(F.1G-4.d.t.c-4.d.n.c+(4.X[0]==l.1e?0:4.X[0].13))};5(!4.1D){e C}5(4.m){5(C.c<4.m[0]){C.c=4.m[0]}5(C.7<4.m[1]){C.7=4.m[1]}5(C.c>4.m[2]){C.c=4.m[2]}5(C.7>4.m[3]){C.7=4.m[3]}}5(G.1q){8 E=4.1D.7+1m.3U((C.7-4.1D.7)/G.1q[1])*G.1q[1];C.7=4.m?(!(E<4.m[1]||E>4.m[3])?E:(!(E<4.m[1])?E-G.1q[1]:E+G.1q[1])):E;8 D=4.1D.c+1m.3U((C.c-4.1D.c)/G.1q[0])*G.1q[0];C.c=4.m?(!(D<4.m[0]||D>4.m[2])?D:(!(D<4.m[0])?D-G.1q[0]:D+G.1q[0])):D}e C},2p:6(D){4.W=4.2D(D);4.1C=4.1I("1r");B.f.1w.1F(4,"22",[D,4.f()]);4.1C=4.1I("1r");4.k[0].2h.c=4.W.c+"2F";4.k[0].2h.7=4.W.7+"2F";1z(8 C=4.u.U-1;C>=0;C--){8 E=4.5u(4.u[C]);5(!E){3g}5(4.u[C].1g[0]!=4.Y[0]&&4.Y[E==1?"6y":"37"]()[0]!=4.u[C].1g[0]&&!A(4.Y[0],4.u[C].1g[0])&&(4.b.4s=="6C-6z"?!A(4.i[0],4.u[C].1g[0]):z)){4.5v=E==1?"5x":"6R";4.3O(D,4.u[C]);4.19("46",D);79}}4.5B(D);5(B.f.1A){B.f.1A.29(4,D)}4.i.1N("22",[D,4.f()],4.b.22);e o},3O:6(H,G,D,F){D?D[0].5q(4.Y[0]):G.1g[0].1J.4y(4.Y[0],(4.5v=="5x"?G.1g[0]:G.1g[0].7d));4.3a=4.3a?++4.3a:1;8 E=4,C=4.3a;1H.3p(6(){5(C==E.3a){E.3P(!F)}},0);5(4.b.1d){4.b.1d.34.1F(4.i,4.Y,4.1d)}},2O:6(E,D){5(B.f.1A&&!4.b.3Q){B.f.1A.5A(4,E)}5(4.b.24){8 C=4;8 F=C.Y.d();5(C.1d){C.1d.3b({1v:"5y"},(Z(4.b.24,10)||3Z)-50)}B(4.k).3b({c:F.c-4.d.n.c-C.1c.c+(4.X[0]==l.1e?0:4.X[0].13),7:F.7-4.d.n.7-C.1c.7+(4.X[0]==l.1e?0:4.X[0].14)},Z(4.b.24,10)||3Z,6(){C.2w(E)})}11{4.2w(E,D)}e o},2w:6(E,D){5(4.4e.37!=4.Y.37().3B(".f-15-k")[0]||4.4e.n!=4.Y.n()[0]){4.19("34",E,1k,D)}5(!A(4.i[0],4.Y[0])){4.19("1y",E,1k,D);1z(8 C=4.w.U-1;C>=0;C--){5(A(4.w[C].i[0],4.Y[0])){4.w[C].19("34",E,4,D);4.w[C].19("5H",E,4,D)}}}1z(8 C=4.w.U-1;C>=0;C--){4.w[C].19("5D",E,4,D);5(4.w[C].1S.2z){4.w[C].19("5C",E,4);4.w[C].1S.2z=0}}4.40=o;5(4.2Z){4.19("1E",E,1k,D);e o}B(4.Y).h("5t","");5(4.1d){4.1d.1y()}4.k.1y();4.k=1k;4.19("1E",E,1k,D);e z}}));B.2c(B.f.15,{4C:"5G 5E",2v:{k:"2W",3c:"4n",3y:1,39:0,1Y:z,1p:20,1o:20,38:":5s",u:"> *",1t:5w,5z:z,1T:"n"}});B.f.1w.1l("15","1R",{1M:6(E,D){8 C=B("1e");5(C.h("1R")){D.b.2G=C.h("1R")}C.h("1R",D.b.1R)},1E:6(D,C){5(C.b.2G){B("1e").h("1R",C.b.2G)}}});B.f.1w.1l("15","1t",{1M:6(E,D){8 C=D.k;5(C.h("1t")){D.b.2S=C.h("1t")}C.h("1t",D.b.1t)},1E:6(D,C){5(C.b.2S){B(C.k).h("1t",C.b.2S)}}});B.f.1w.1l("15","1v",{1M:6(E,D){8 C=D.k;5(C.h("1v")){D.b.2U=C.h("1v")}C.h("1v",D.b.1v)},1E:6(D,C){5(C.b.2U){B(C.k).h("1v",C.b.2U)}}});B.f.1w.1l("15","1Y",{1M:6(E,D){8 F=D.b;8 C=B(4).v("15");C.1j=6(G){3E{5(/2f|1Y/.1h(G.h("2e"))||(/2f|1Y/).1h(G.h("2e-y"))){e G}G=G.n()}35(G[0].1J);e B(l)}(C.Y);C.1f=6(G){3E{5(/2f|1Y/.1h(G.h("2e"))||(/2f|1Y/).1h(G.h("2e-x"))){e G}G=G.n()}35(G[0].1J);e B(l)}(C.Y);5(C.1j[0]!=l&&C.1j[0].2s!="2r"){C.2Q=C.1j.d()}5(C.1f[0]!=l&&C.1f[0].2s!="2r"){C.2L=C.1f.d()}},22:6(E,D){8 F=D.b;8 C=B(4).v("15");5(C.1j[0]!=l&&C.1j[0].2s!="2r"){5((C.2Q.7+C.1j[0].2R)-E.1L=4.$1u.U){I.1T(4.i);F.1T(4.i[0].1J)}11{I.4y(4.$1u[C]);F.4y(4.$1i[C])}G.12=A.3R(G.12,6(K,J){e K>=C?++K:K});4.3o();5(4.$j.U==1){I.1b(G.1x);F.1B(G.2l);8 B=A.v(4.$j[0],"1W.j");5(B){4.1W(C,B)}}4.i.1N("4Z",[4.2g("4Z"),4.f(4.$j[C],4.$1i[C])],G.1l)},1y:6(B){8 D=4.b,E=4.$1u.23(B).1y(),C=4.$1i.23(B).1y();5(E.31(D.1x)&&4.$j.U>1){4.36(B+(B+1<4.$j.U?1:-1))}D.12=A.3R(A.4D(D.12,6(G,F){e G!=B}),6(G,F){e G>=B?--G:G});4.3o();4.i.1N("4G",[4.2g("4G"),4.f(E.3l("a")[0],C[0])],D.1y)},4z:6(B){8 C=4.b;5(A.3q(B,C.12)==-1){e}8 D=4.$1u.23(B).1B(C.2x);5(A.1O.4F){D.h("3m","77-43");3p(6(){D.h("3m","43")},0)}C.12=A.4D(C.12,6(F,E){e F!=B});4.i.1N("4H",[4.2g("4H"),4.f(4.$j[B],4.$1i[B])],C.4z)},4u:6(C){8 B=4,D=4.b;5(C!=D.1a){4.$1u.23(C).1b(D.2x);D.12.25(C);D.12.22();4.i.1N("4L",[4.2g("4L"),4.f(4.$j[C],4.$1i[C])],D.4u)}},36:6(B){5(3s B=="41"){B=4.$j.2j(4.$j.28("[1Q$="+B+"]")[0])}4.$j.23(B).7e(4.b.2b)},1W:6(G,K){8 L=4,D=4.b,E=4.$j.23(G),J=E[0],H=K==1U||K===o,B=E.v("1W.j");K=K||6(){};5(!B||!H&&A.v(J,"2q.j")){K();e}8 M=6(N){8 O=A(N),P=O.3l("*:6X");e P.U&&P.5e(":3B(6r)")&&P||O};8 C=6(){L.$j.28("."+D.3e).1B(D.3e).1n(6(){5(D.3H){M(4).n().3z(M(4).v("3G.j"))}});L.3D=1k};5(D.3H){8 I=M(J).3z();M(J).6Z("<4p>").3l("4p").v("3G.j",I).3z(D.3H)}8 F=A.2c({},D.3F,{56:B,4q:6(O,N){A(J.2d).3z(O);C();5(D.2q){A.v(J,"2q.j",z)}A(L.i).1N("55",[L.2g("55"),L.f(L.$j[G],L.$1i[G])],D.1W);D.3F.4q&&D.3F.4q(O,N);K()}});5(4.3D){4.3D.6n();C()}E.1b(D.3e);3p(6(){L.3D=A.67(F)},0)},56:6(C,B){4.$j.23(C).2n("2q.j").v("1W.j",B)},2i:6(){8 B=4.b;4.i.21(".j").1B(B.4r).2n("j");4.$j.1n(6(){8 C=A.v(4,"1Q.j");5(C){4.1Q=C}8 D=A(4).21(".j");A.1n(["1Q","1W","2q"],6(E,F){D.2n(F+".j")})});4.$1u.1l(4.$1i).1n(6(){5(A.v(4,"2i.j")){A(4).1y()}11{A(4).1B([B.1x,B.4B,B.2x,B.3j,B.2l].5b(" "))}})},2g:6(B){e A.2b.63({4s:B,26:4.i[0]})}});A.f.j.2v={3A:o,2b:"t",12:[],2V:1k,3H:"6Yl;",2q:o,5g:"f-j-",3F:{},2T:1k,4K:\'<3I><4Y>#{3G}\',4A:"<2m>",4r:"f-j-65",1x:"f-j-1a",4B:"f-j-3A",2x:"f-j-12",3j:"f-j-5F",2l:"f-j-5y",3e:"f-j-64"};A.f.j.4C="U";A.2c(A.f.j.2N,{47:1k,6h:6(C,F){F=F||o;8 B=4,E=4.b.1a;6 G(){B.47=5V(6(){E=++E 0) - $.each(oEls, function(i, el) { - if ( $.inArray(el, els) < 0 ) - $.event.remove(el, query.type, query.fn); - }); - } - else { - // Call the first function for newly matched elements - nEls.each(function() { - query.fn.apply(this); - }); - - // Call the second function for elements no longer matched - if ( this.fn2 && oEls.length > 0 ) - $.each(oEls, function(i, el) { - if ( $.inArray(el, els) < 0 ) - query.fn2.apply(el); - }); - } - } -}; - -$.extend($.livequery, { - guid: 0, - queries: [], - queue: [], - running: false, - timeout: null, - - checkQueue: function() { - if ( $.livequery.running && $.livequery.queue.length ) { - var length = $.livequery.queue.length; - // Run each Live Query currently in the queue - while ( length-- ) - $.livequery.queries[ $.livequery.queue.shift() ].run(); - } - }, - - pause: function() { - // Don't run anymore Live Queries until restarted - $.livequery.running = false; - }, - - play: function() { - // Restart Live Queries - $.livequery.running = true; - // Request a run of the Live Queries - $.livequery.run(); - }, - - registerPlugin: function() { - $.each( arguments, function(i,n) { - // Short-circuit if the method doesn't exist - if (!$.fn[n]) return; - - // Save a reference to the original method - var old = $.fn[n]; - - // Create a new method - $.fn[n] = function() { - // Call the original method - var r = old.apply(this, arguments); - - // Request a run of the Live Queries - $.livequery.run(); - - // Return the original methods result - return r; - } - }); - }, - - run: function(id) { - if (id != undefined) { - // Put the particular Live Query in the queue if it doesn't already exist - if ( $.inArray(id, $.livequery.queue) < 0 ) - $.livequery.queue.push( id ); - } - else - // Put each Live Query in the queue if it doesn't already exist - $.each( $.livequery.queries, function(id) { - if ( $.inArray(id, $.livequery.queue) < 0 ) - $.livequery.queue.push( id ); - }); - - // Clear timeout if it already exists - if ($.livequery.timeout) clearTimeout($.livequery.timeout); - // Create a timeout to check the queue and actually run the Live Queries - $.livequery.timeout = setTimeout($.livequery.checkQueue, 20); - }, - - stop: function(id) { - if (id != undefined) - // Stop are particular Live Query - $.livequery.queries[ id ].stop(); - else - // Stop all Live Queries - $.each( $.livequery.queries, function(id) { - $.livequery.queries[ id ].stop(); - }); - } -}); - -// Register core DOM manipulation methods -$.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove'); - -// Run Live Queries when the Document is ready -$(function() { $.livequery.play(); }); - - -// Save a reference to the original init method -var init = $.prototype.init; - -// Create a new init method that exposes two new properties: selector and context -$.prototype.init = function(a,c) { - // Call the original init and save the result - var r = init.apply(this, arguments); - - // Copy over properties if they exist already - if (a && a.selector) - r.context = a.context, r.selector = a.selector; - - // Set properties - if ( typeof a == 'string' ) - r.context = c || document, r.selector = a; - - // Return the result - return r; -}; - -// Give the init function the jQuery prototype for later instantiation (needed after Rev 4091) -$.prototype.init.prototype = $.prototype; - -})(jQuery); -typenow = 'wpsc-product'; \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/jquery.tooltip.js b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/jquery.tooltip.js deleted file mode 100644 index 715ccf1..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/jquery.tooltip.js +++ /dev/null @@ -1,342 +0,0 @@ -/* - * jQuery Tooltip plugin 1.1 - * - * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ - * - * Copyright (c) 2006 Jrn Zaefferer, Stefan Petre - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Revision: $Id: jquery.tooltip.js 2237 2007-07-04 19:11:15Z joern.zaefferer $ - * - */ - -/** - * Display a customized tooltip instead of the default one - * for every selected element. The tooltip behaviour mimics - * the default one, but lets you style the tooltip and - * specify the delay before displaying it. In addition, it displays the - * href value, if it is available. - * - * Requires dimensions plugin. - * - * When used on a page with select elements, include the bgiframe plugin. It is used if present. - * - * To style the tooltip, use these selectors in your stylesheet: - * - * #tooltip - The tooltip container - * - * #tooltip h3 - The tooltip title - * - * #tooltip div.body - The tooltip body, shown when using showBody - * - * #tooltip div.url - The tooltip url, shown when using showURL - * - * - * @example $('a, input, img').Tooltip(); - * @desc Shows tooltips for anchors, inputs and images, if they have a title - * - * @example $('label').Tooltip({ - * delay: 0, - * track: true, - * event: "click" - * }); - * @desc Shows tooltips for labels with no delay, tracking mousemovement, displaying the tooltip when the label is clicked. - * - * @example // modify global settings - * $.extend($.fn.Tooltip.defaults, { - * track: true, - * delay: 0, - * showURL: false, - * showBody: " - ", - * fixPNG: true - * }); - * // setup fancy tooltips - * $('a.pretty').Tooltip({ - * extraClass: "fancy" - * }); - $('img.pretty').Tooltip({ - * extraClass: "fancy-img", - * }); - * @desc This example starts with modifying the global settings, applying them to all following Tooltips; Afterwards, Tooltips for anchors with class pretty are created with an extra class for the Tooltip: "fancy" for anchors, "fancy-img" for images - * - * @param Object settings (optional) Customize your Tooltips - * @option Number delay The number of milliseconds before a tooltip is display. Default: 250 - * @option Boolean track If true, let the tooltip track the mousemovement. Default: false - * @option Boolean showURL If true, shows the href or src attribute within p.url. Defaul: true - * @option String showBody If specified, uses the String to split the title, displaying the first part in the h3 tag, all following in the p.body tag, separated with
    s. Default: null - * @option String extraClass If specified, adds the class to the tooltip helper. Default: null - * @option Boolean fixPNG If true, fixes transparent PNGs in IE. Default: false - * @option Function bodyHandler If specified its called to format the tooltip-body, hiding the title-part. Default: none - * @option Number top The top-offset for the tooltip position. Default: 15 - * @option Number left The left-offset for the tooltip position. Default: 15 - * - * @name Tooltip - * @type jQuery - * @cat Plugins/Tooltip - * @author Jrn Zaefferer (http://bassistance.de) - */ - -/** - * A global flag to disable all tooltips. - * - * @example $("button.openModal").click(function() { - * $.Tooltip.blocked = true; - * // do some other stuff, eg. showing a modal dialog - * $.Tooltip.blocked = false; - * }); - * - * @property - * @name $.Tooltip.blocked - * @type Boolean - * @cat Plugins/Tooltip - */ - -/** - * Global defaults for tooltips. Apply to all calls to the Tooltip plugin after modifying the defaults. - * - * @example $.extend($.Tooltip.defaults, { - * track: true, - * delay: 0 - * }); - * - * @property - * @name $.Tooltip.defaults - * @type Map - * @cat Plugins/Tooltip - */ -(function($) { - - // the tooltip element - var helper = {}, - // the current tooltipped element - current, - // the title of the current element, used for restoring - title, - // timeout id for delayed tooltips - tID, - // IE 5.5 or 6 - IE = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent), - // flag for mouse tracking - track = false; - - $.Tooltip = { - blocked: false, - defaults: { - delay: 200, - showURL: true, - extraClass: "", - top: 15, - left: 15 - }, - block: function() { - $.Tooltip.blocked = !$.Tooltip.blocked; - } - }; - - $.fn.extend({ - Tooltip: function(settings) { - settings = $.extend({}, $.Tooltip.defaults, settings); - createHelper(); - return this.each(function() { - this.tSettings = settings; - // copy tooltip into its own expando and remove the title - this.tooltipText = this.title; - $(this).removeAttr("title"); - // also remove alt attribute to prevent default tooltip in IE - this.alt = ""; - }) - .hover(save, hide) - .click(hide); - }, - fixPNG: IE ? function() { - return this.each(function () { - var image = $(this).css('backgroundImage'); - if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) { - image = RegExp.$1; - $(this).css({ - 'backgroundImage': 'none', - 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" - }).each(function () { - var position = $(this).css('position'); - if (position != 'absolute' && position != 'relative') - $(this).css('position', 'relative'); - }); - } - }); - } : function() { return this; }, - unfixPNG: IE ? function() { - return this.each(function () { - $(this).css({'filter': '', backgroundImage: ''}); - }); - } : function() { return this; }, - hideWhenEmpty: function() { - return this.each(function() { - $(this)[ $(this).html() ? "show" : "hide" ](); - }); - }, - url: function() { - return this.attr('href') || this.attr('src'); - } - }); - - function createHelper() { - // there can be only one tooltip helper - if( helper.parent ) - return; - // create the helper, h3 for title, div for url - helper.parent = $('

    ') - // hide it at first - .hide() - // add to document - .appendTo('body'); - - // apply bgiframe if available - if ( $.fn.bgiframe ) - helper.parent.bgiframe(); - - // save references to title and url elements - helper.title = $('h3', helper.parent); - helper.body = $('div.body', helper.parent); - helper.url = $('div.url', helper.parent); - } - - // main event handler to start showing tooltips - function handle(event) { - // show helper, either with timeout or on instant - if( this.tSettings.delay ) - tID = setTimeout(show, this.tSettings.delay); - else - show(); - - // if selected, update the helper position when the mouse moves - track = !!this.tSettings.track; - $('body').bind('mousemove', update); - - // update at least once - update(event); - } - - // save elements title before the tooltip is displayed - function save() { - // if this is the current source, or it has no title (occurs with click event), stop - if ( $.Tooltip.blocked || this == current || !this.tooltipText ) - return; - - // save current - current = this; - title = this.tooltipText; - - if ( this.tSettings.bodyHandler ) { - helper.title.hide(); - helper.body.html( this.tSettings.bodyHandler.call(this) ).show(); - } else if ( this.tSettings.showBody ) { - var parts = title.split(this.tSettings.showBody); - helper.title.html(parts.shift()).show(); - helper.body.empty(); - for(var i = 0, part; part = parts[i]; i++) { - if(i > 0) - helper.body.append("
    "); - helper.body.append(part); - } - helper.body.hideWhenEmpty(); - } else { - helper.title.html(title).show(); - helper.body.hide(); - } - - // if element has href or src, add and show it, otherwise hide it - if( this.tSettings.showURL && $(this).url() ) - helper.url.html( $(this).url().replace('http://', '') ).show(); - else - helper.url.hide(); - - // add an optional class for this tip - helper.parent.addClass(this.tSettings.extraClass); - - // fix PNG background for IE - if (this.tSettings.fixPNG ) - helper.parent.fixPNG(); - - handle.apply(this, arguments); - } - - // delete timeout and show helper - function show() { - tID = null; - helper.parent.show(); - update(); - } - - /** - * callback for mousemove - * updates the helper position - * removes itself when no current element - */ - function update(event) { - if($.Tooltip.blocked) - return; - - // stop updating when tracking is disabled and the tooltip is visible - if ( !track && helper.parent.is(":visible")) { - $('body').unbind('mousemove', update) - } - - // if no current element is available, remove this listener - if( current == null ) { - $('body').unbind('mousemove', update); - return; - } - var left = helper.parent[0].offsetLeft; - var top = helper.parent[0].offsetTop; - if(event) { - // position the helper 15 pixel to bottom right, starting from mouse position - left = event.pageX + current.tSettings.left; - top = event.pageY + current.tSettings.top; - helper.parent.css({ - left: left + 'px', - top: top + 'px' - }); - } - var v = viewport(), - h = helper.parent[0]; - // check horizontal position - if(v.x + v.cx < h.offsetLeft + h.offsetWidth) { - left -= h.offsetWidth + 20 + current.tSettings.left; - helper.parent.css({left: left + 'px'}); - } - // check vertical position - if(v.y + v.cy < h.offsetTop + h.offsetHeight) { - top -= h.offsetHeight + 20 + current.tSettings.top; - helper.parent.css({top: top + 'px'}); - } - } - - function viewport() { - return { - x: $(window).scrollLeft(), - y: $(window).scrollTop(), - cx: $(window).width(), - cy: $(window).height() - }; - } - - // hide helper and restore added classes and the title - function hide(event) { - if($.Tooltip.blocked) - return; - // clear timeout if possible - if(tID) - clearTimeout(tID); - // no more current element - current = null; - - helper.parent.hide().removeClass( this.tSettings.extraClass ); - - if( this.tSettings.fixPNG ) - helper.parent.unfixPNG(); - } - -})(jQuery); diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/product_tagcloud.js b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/product_tagcloud.js deleted file mode 100644 index 8307ffb..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/product_tagcloud.js +++ /dev/null @@ -1,125 +0,0 @@ -//this contains a nearly exact copy of the wordpress product tag editing functions - -function new_tag_remove_tag() { - var id = jQuery( this ).attr( 'id' ); - var num = id.substr( 10 ); - var current_tags = jQuery( '#tags-input' ).val().split(','); - delete current_tags[num]; - var new_tags = []; - jQuery.each( current_tags, function( key, val ) { - if ( val && !val.match(/^\s+$/) && '' != val ) { - new_tags = new_tags.concat( val ); - } - }); - jQuery( '#tags-input' ).val( new_tags.join( ',' ).replace( /\s*,+\s*/, ',' ).replace( /,+/, ',' ).replace( /,+\s+,+/, ',' ).replace( /,+\s*$/, '' ).replace( /^\s*,+/, '' ) ); - tag_update_quickclicks(); - jQuery('#newtag').focus(); - return false; -} - -function tag_update_quickclicks() { - if ( jQuery( '#tags-input' ).length == 0 ) - return; - var current_tags = jQuery( '#tags-input' ).val().split(','); - jQuery( '#tagchecklist' ).empty(); - shown = false; -// jQuery.merge( current_tags, current_tags ); // this doesn't work anymore, need something to array_unique - jQuery.each( current_tags, function( key, val ) { - val = val.replace( /^\s+/, '' ).replace( /\s+$/, '' ); // trim - if ( !val.match(/^\s+$/) && '' != val ) { - txt = 'X ' + val + ' '; - jQuery( '#tagchecklist' ).append( txt ); - jQuery( '#tag-check-' + key ).click( new_tag_remove_tag ); - shown = true; - } - }); - if ( shown ) - jQuery( '#tagchecklist' ).prepend( 'Tags Used
    ' ); -} - -function tag_flush_to_text(e,a) { - a = a || false; - var text = a ? jQuery(a).text() : jQuery('#newtag').val(); - var newtags = jQuery('#tags-input').val(); - - var t = text.replace( /\s*([^,]+).*/, '$1,' ); - newtags += ',' - - if ( newtags.indexOf(t) != -1 ) - return false; - - newtags += text; - - // massage - newtags = newtags.replace( /\s+,+\s*/g, ',' ).replace( /,+/g, ',' ).replace( /,+\s+,+/g, ',' ).replace( /,+\s*$/g, '' ).replace( /^\s*,+/g, '' ); - jQuery('#tags-input').val( newtags ); - tag_update_quickclicks(); - if ( ! a ) { - jQuery('#newtag').val(''); - jQuery('#newtag').focus(); - } - return false; -} - -function tag_save_on_publish() { - if ( jQuery('#newtag').val() != postL10n.addTag ) - tag_flush_to_text(); -} - -function tag_press_key( e ) { - if ( 13 == e.keyCode ) { - tag_flush_to_text(); - return false; - } -}; - -(function($){ - tagCloud = { - init : function() { - $('#tagcloud-link').click(function(){tagCloud.get(); $(this).unbind().click(function(){return false;}); return false;}); - }, - - get : function() { - $.post('admin-ajax.php', {'action':'get-tagcloud'}, function(r, stat) { - if ( 0 == r || 'success' != stat ) - r = wpAjax.broken; - - r = '

    '+r+'

    '; - $('#tagcloud-link').after($(r)); - $('#the-tagcloud a').click(function(){ - tag_flush_to_text(0,this); - return false; - }); - }); - } - } -})(jQuery); - -jQuery(document).ready( function($) { - tagCloud.init(); - tag_update_quickclicks(); - jQuery('#tags-input').livequery(function(){ - jQuery(this).hide(); - - }) - - - - - // add the quickadd form - jQuery('#jaxtag').livequery(function(){ - jQuery(this).prepend(''); - jQuery('#tagadd').click( tag_flush_to_text ); - jQuery('#newtag').focus(function() { - // if ( this.value == postL10n.addTag ) - jQuery(this).val( '' ).removeClass( 'form-input-tip' ); - }); - tag_update_quickclicks(); - jQuery('#newtag').blur(function() { - if ( this.value == '' ) - jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' ); - }); - }); - -}); - \ No newline at end of file diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/variations.js b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/variations.js deleted file mode 100644 index 8fb996d..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/variations.js +++ /dev/null @@ -1,92 +0,0 @@ -/* -* this is the variations javascript file -*/ - -/** - - -.variation_checkboxes - -.variation_box -.variation_checkbox -.variation_checkbox input - -.variation_values_box -.variation_checkbox -.variation_checkbox input - -*/ -//Delete checkout options on settings>checkout page - - -jQuery('.variation_checkboxes').livequery(function(){ - - jQuery('label input:checkbox', this).click(function(){ - - jQuery('a.update_variations_action').show(); - }); - - jQuery("div.variation_set>label input:checkbox", this).click(function(event){ - is_checked = jQuery(this).attr('checked'); - - variation_set = jQuery(this).parents("div.variation_set"); - - switch(is_checked) { - case true: - jQuery('div.variation input:checkbox', variation_set).attr('checked', true); - jQuery('div.variation', variation_set).show(); - break; - - case false: - jQuery('div.variation input:checkbox', variation_set).attr('checked', false); - jQuery('div.variation', variation_set).hide(); - break; - - } - - //jQuery('input:checkbox' ,variation_set); - - }); - - - - jQuery("div.variation input:checkbox", this).click(function(event){ - is_checked = jQuery(this).attr('checked'); - variation_set = jQuery(this).parents("div.variation_set"); - variation = jQuery(this).parents("div.variation"); - switch(is_checked) { - case true: - jQuery('label.set_label input:checkbox', variation_set).attr('checked', true); - jQuery('div.variation', variation_set).show(); - break; - - case false: - checked_count = jQuery('div.variation input:checked', variation_set).length; - if(checked_count < 1) { - jQuery('div.variation', variation_set).hide(); - jQuery('label.set_label input:checkbox', variation_set).attr('checked', false); - } - break; - - } - - }); - - - jQuery("div.variation_set>label input:checkbox", this).livequery(function(event){ - }); - - jQuery("div.variation input:checkbox", this).livequery(function(event){ - is_checked = jQuery(this).attr('checked'); - variation_set = jQuery(this).parents("div.variation_set"); - checked_count = jQuery('div.variation input:checked', variation_set).length; - if(checked_count < 1) { - jQuery('div.variation', variation_set).hide(); - jQuery('label.set_label input:checkbox', variation_set).attr('checked', false); - } - }); - -}); - - - diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/wpsc-swfupload-handlers.js b/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/wpsc-swfupload-handlers.js deleted file mode 100644 index a24f495..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-admin/js/wpsc-swfupload-handlers.js +++ /dev/null @@ -1,362 +0,0 @@ -/** -* This is a nearly exact copy of the corresponding wordpress file, we needed to copy and modify it for our use of swfupoader as the wordpress handler code is specific to posts -*/ -// define a global variable for swfupload here so that we can later do things to it. -var swfu = null; - - -jQuery().ajaxComplete(function(event, XMLHttpRequest, ajaxOptions) { - // nonces are only regenerated on autosaving when ther product ID is created/changed - // we only want to edit the swfuploader parameters when that happens - if(/autosave-generate-nonces/.test(ajaxOptions.data)) { - window.swfu.removePostParam('product_id'); - window.swfu.addPostParam('product_id', parseInt(jQuery('#post_ID').val())); - } - //console.log(jQuery('#post_ID').val()); -}); - - -function wpsc_fileDialogStart() { - jQuery("#media-upload-error").empty(); -} - -// progress and success handlers for media multi uploads -function wpsc_fileQueued(fileObj) { - // Create a progress bar containing the filename - jQuery('#media-items').append('
    '); - // Display the progress div - jQuery('#media-item-' + fileObj.id + ' .progress').show(); - - // Disable the submit button - //jQuery('#insert-gallery').attr('disabled', 'disabled'); -} - -function wpsc_uploadStart(fileObj) {return true; } - -function wpsc_uploadProgress(fileObj, bytesDone, bytesTotal) { - // Lengthen the progress bar - jQuery('#media-item-' + fileObj.id + ' .bar').width(500*bytesDone/bytesTotal); - - if ( bytesDone == bytesTotal ) { - jQuery('#media-item-' + fileObj.id + ' .bar').html(''); - } -} - -function wpsc_prepareMediaItem(fileObj, serverData) { - // Move the progress bar to 100% - jQuery('#media-item-' + fileObj.id + ' .bar').remove(); - jQuery('#media-item-' + fileObj.id + ' .progress').hide(); - - var f = ( typeof shortform == 'undefined' ) ? 1 : 2; - // Old style: Append the HTML returned by the server -- thumbnail and form inputs - if ( isNaN(serverData) || !serverData ) { - jQuery('#media-item-' + fileObj.id).append(serverData); - prepareMediaItemInit(fileObj); - } - // New style: server data is just the attachment ID, fetch the thumbnail and form html from the server - else { - jQuery('#media-item-' + fileObj.id).load('async-upload.php', {attachment_id:serverData, fetch:f}, function(){prepareMediaItemInit(fileObj);updateMediaForm()}); - } -} - -function wpsc_prepareMediaItemInit(fileObj) { - - // Clone the thumbnail as a "pinkynail" -- a tiny image to the left of the filename - jQuery('#media-item-' + fileObj.id + ' .thumbnail').clone().attr('className', 'pinkynail toggle').prependTo('#media-item-' + fileObj.id); - - // Replace the original filename with the new (unique) one assigned during upload - jQuery('#media-item-' + fileObj.id + ' .filename.original').replaceWith(jQuery('#media-item-' + fileObj.id + ' .filename.new')); - - // Also bind toggle to the links - jQuery('#media-item-' + fileObj.id + ' a.toggle').bind('click', function(){jQuery(this).siblings('.slidetoggle').slideToggle(150, function(){var o=jQuery(this).offset();window.scrollTo(0,o.top-36);});jQuery(this).parent().eq(0).children('.toggle').toggle();jQuery(this).siblings('a.toggle').focus();return false;}); - - // Bind AJAX to the new Delete button - jQuery('#media-item-' + fileObj.id + ' a.delete').bind('click',function(){ - // Tell the server to delete it. TODO: handle exceptions - jQuery.ajax({url:'admin-ajax.php',type:'post',success:deleteSuccess,error:deleteError,id:fileObj.id,data:{ - id : this.id.replace(/[^0-9]/g,''), - action : 'delete-post', - _ajax_nonce : this.href.replace(/^.*wpnonce=/,'')} - }); - return false; - }); - - // Open this item if it says to start open (e.g. to display an error) - jQuery('#media-item-' + fileObj.id + '.startopen') - .removeClass('startopen') - .slideToggle(500) - .parent().eq(0).children('.toggle').toggle(); -} - -function wpsc_itemAjaxError(id, html) { - var error = jQuery('#media-item-error' + id); - - error.html('
    '+html+'
    '); - jQuery('#dismiss-'+id).click(function(){jQuery(this).parents('.file-error').slideUp(200, function(){jQuery(this).empty();})}); -} - -function wpsc_deleteSuccess(data, textStatus) { - if ( data == '-1' ) - return itemAjaxError(this.id, 'You do not have permission. Has your session expired?'); - if ( data == '0' ) - return itemAjaxError(this.id, 'Could not be deleted. Has it been deleted already?'); - - var item = jQuery('#media-item-' + this.id); - - // Decrement the counters. - if ( type = jQuery('#type-of-' + this.id).val() ) - jQuery('#' + type + '-counter').text(jQuery('#' + type + '-counter').text()-1); - if ( jQuery('.type-form #media-items>*').length == 1 && jQuery('#media-items .hidden').length > 0 ) { - jQuery('.toggle').toggle(); - jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden'); - } - - // Vanish it. - jQuery('#media-item-' + this.id + ' .filename:empty').remove(); - jQuery('#media-item-' + this.id + ' .filename').append(' '+swfuploadL10n.deleted+'').siblings('a.toggle').remove(); - jQuery('#media-item-' + this.id).children('.describe').css({backgroundColor:'#fff'}).end() - .animate({backgroundColor:'#ffc0c0'}, {queue:false,duration:50}) - .animate({minHeight:0,height:36}, 400, null, function(){jQuery(this).children('.describe').remove()}) - .animate({backgroundColor:'#fff'}, 400) - .animate({height:0}, 800, null, function(){jQuery(this).remove();updateMediaForm();}); - - return; -} - -function wpsc_deleteError(X, textStatus, errorThrown) { - // TODO -} - -function wpsc_updateMediaForm() { - storeState(); - // Just one file, no need for collapsible part - if ( jQuery('.type-form #media-items>*').length == 1 ) { - jQuery('#media-items .slidetoggle').slideDown(500).parent().eq(0).children('.toggle').toggle(); - jQuery('.type-form .slidetoggle').siblings().addClass('hidden'); - } - - // Only show Save buttons when there is at least one file. - if ( jQuery('#media-items>*').not('.media-blank').length > 0 ) - jQuery('.savebutton').show(); - else - jQuery('.savebutton').hide(); - - // Only show Gallery button when there are at least two files. - if ( jQuery('#media-items>*').length > 1 ) - jQuery('.insert-gallery').show(); - else - jQuery('.insert-gallery').hide(); -} - -function wpsc_uploadSuccess(fileObj, serverData) { - // if async-upload returned an error message, place it in the media item div and return - if ( serverData.match('media-upload-error') ) { - jQuery('#media-item-' + fileObj.id).html(serverData); - return; - } - //console.log(fileObj); - //console.log(serverData); - eval(serverData); - if(upload_status == 1 ) { - output_html = ""; - output_html +="\n"; - - image_count = jQuery("ul#gallery_list li.gallery_image div a img.previewimage").size(); - if(image_count < 1) { - replace_existing = 1; - } - //console.log(jQuery("ul#gallery_list li.gallery_image div a img.previewimage")); - //console.log(image_count); - - if(replace_existing == 1) { - jQuery("ul#gallery_list").html(output_html); - - input_set = jQuery.makeArray(jQuery("#gallery_list li:not(.ui-sortable-helper) input.image-id")); - set = new Array(); - for( var i in input_set) { - set[i] = jQuery(input_set[i]).val(); - } - //console.log(set); - - img_id = jQuery('#gallery_image_'+set[0]).parent('li').attr('id'); - - jQuery('#gallery_image_'+set[0]).children('img.deleteButton').remove(); - jQuery('#gallery_image_'+set[0]).append("Edit "); -// jQuery('#gallery_image_'+set[0]).parent('li').attr('id', 0); - - for(i=1;i"); - - element_id = jQuery('#gallery_image_'+set[i]).parent('li').attr('id'); - if(element_id == 0) { -// jQuery('#gallery_image_'+set[i]).parent('li').attr('id', img_id); - } - } - - order = set.join(','); - product_id = jQuery('#product_id').val(); - - - postVars = "product_id="+product_id+"&order="+order; - jQuery.post( 'index.php?wpsc_admin_action=rearrange_images', postVars, function(returned_data) { - eval(returned_data); - jQuery('#gallery_image_'+image_id).children('a.editButton').remove(); - jQuery('#gallery_image_'+image_id).children('div.image_settings_box').remove(); - jQuery('#gallery_image_'+image_id).append(image_menu); - }); - } else { - jQuery("ul#gallery_list").append(output_html); - ///jQuery("#gallery_list").trigger( 'update' ); - } - } - - //jQuery('#media-item-' + fileObj.id + ' .progress').show(); - //window.setInterval(function() { - jQuery("#media-item-" + fileObj.id + "").fadeOut("normal"); - //}, 5000); - - //prepareMediaItem(fileObj, serverData); - //updateMediaForm(); - -} - -function wpsc_uploadComplete(fileObj) { - // If no more uploads queued, enable the submit button - if ( swfu.getStats().files_queued == 0 ) - jQuery('#insert-gallery').attr('disabled', ''); -} - - -// wp-specific error handlers - -// generic message -function wpsc_wpQueueError(message) { - jQuery('#media-upload-error').show().text(message); -} - -// file-specific message -function wpsc_wpFileError(fileObj, message) { - jQuery('#media-item-' + fileObj.id + ' .filename').after('
    '+message+'
    ').siblings('.toggle').remove(); - jQuery('#dismiss-' + fileObj.id).click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})}); -} - -function wpsc_fileQueueError(fileObj, error_code, message) { - // Handle this error separately because we don't want to create a FileProgress element for it. - if ( error_code == SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED ) { - wpQueueError(swfuploadL10n.queue_limit_exceeded); - } - else if ( error_code == SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT ) { - fileQueued(fileObj); - wpFileError(fileObj, swfuploadL10n.file_exceeds_size_limit); - } - else if ( error_code == SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE ) { - fileQueued(fileObj); - wpFileError(fileObj, swfuploadL10n.zero_byte_file); - } - else if ( error_code == SWFUpload.QUEUE_ERROR.INVALID_FILETYPE ) { - fileQueued(fileObj); - wpFileError(fileObj, swfuploadL10n.invalid_filetype); - } - else { - wpQueueError(swfuploadL10n.default_error); - } -} - -function wpsc_fileDialogComplete(num_files_queued) { - try { - if (num_files_queued > 0) { - this.startUpload(); - } - } catch (ex) { - this.debug(ex); - } -} - -function wpsc_swfuploadPreLoad() { - var swfupload_element = jQuery('#'+swfu.customSettings.swfupload_element_id).get(0); - jQuery('#' + swfu.customSettings.degraded_element_id).hide(); - // Doing this directly because jQuery().show() seems to have timing problems - if ( swfupload_element && ! swfupload_element.style.display ) - swfupload_element.style.display = 'block'; -} - -function wpsc_swfuploadLoadFailed() { - jQuery('#' + swfu.customSettings.swfupload_element_id).hide(); - jQuery('#' + swfu.customSettings.degraded_element_id).show(); -} - -function wpsc_uploadError(fileObj, error_code, message) { - // first the file specific error - if ( error_code == SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL ) { - wpFileError(fileObj, swfuploadL10n.missing_upload_url); - } - else if ( error_code == SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED ) { - wpFileError(fileObj, swfuploadL10n.upload_limit_exceeded); - } - else { - wpFileError(fileObj, swfuploadL10n.default_error); - } - - // now the general upload status - if ( error_code == SWFUpload.UPLOAD_ERROR.HTTP_ERROR ) { - wpQueueError(swfuploadL10n.http_error); - } - else if ( error_code == SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED ) { - wpQueueError(swfuploadL10n.upload_failed); - } - else if ( error_code == SWFUpload.UPLOAD_ERROR.IO_ERROR ) { - wpQueueError(swfuploadL10n.io_error); - } - else if ( error_code == SWFUpload.UPLOAD_ERROR.SECURITY_ERROR ) { - wpQueueError(swfuploadL10n.security_error); - } - else if ( error_code == SWFUpload.UPLOAD_ERROR.FILE_CANCELLED ) { - wpQueueError(swfuploadL10n.security_error); - } -} - -// remember the last used image size, alignment and url -var storeState; -(function($){ - -storeState = function(){ - var align = getUserSetting('align') || '', imgsize = getUserSetting('imgsize') || ''; - - $('tr.align input[type="radio"]').click(function(){ - setUserSetting('align', $(this).val()); - }).filter(function(){ - if ( $(this).val() == align ) - return true; - return false; - }).attr('checked','checked'); - - $('tr.image-size input[type="radio"]').click(function(){ - setUserSetting('imgsize', $(this).val()); - }).filter(function(){ - if ( $(this).attr('disabled') || $(this).val() != imgsize ) - return false; - return true; - }).attr('checked','checked'); - - $('tr.url button').click(function(){ - var c = this.className || ''; - c = c.replace(/.*?(url[^ '"]+).*/, '$1'); - if (c) setUserSetting('urlbutton', c); - $(this).siblings('.urlfield').val( $(this).attr('title') ); - }); - - $('tr.url .urlfield').each(function(){ - var b = getUserSetting('urlbutton'); - $(this).val( $(this).siblings('button.'+b).attr('title') ); - }); -} -})(jQuery); diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/24bit-star.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/24bit-star.png deleted file mode 100644 index 118c9f8..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/24bit-star.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/arrowdown.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/arrowdown.gif deleted file mode 100644 index 9423be9..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/arrowdown.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/blank.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/blank.gif deleted file mode 100644 index 8e8cea2..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/blank.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/blue-star.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/blue-star.gif deleted file mode 100644 index 125e1b3..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/blue-star.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/buy_button.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/buy_button.jpg deleted file mode 100644 index 930c906..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/buy_button.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart-icon.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart-icon.gif deleted file mode 100644 index 2e3166f..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart-icon.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart.png deleted file mode 100644 index 1baf7b9..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_bg_top.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_bg_top.gif deleted file mode 100644 index 0d815e3..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_bg_top.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_leftarrow.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_leftarrow.png deleted file mode 100644 index 7b061fd..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_leftarrow.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_logo.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_logo.gif deleted file mode 100644 index a79fbf4..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_logo.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_rightarrow.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_rightarrow.png deleted file mode 100644 index 4e5c745..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cart_rightarrow.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cb_controls.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cb_controls.png deleted file mode 100644 index 65cfd1d..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cb_controls.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cb_loading.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cb_loading.gif deleted file mode 100644 index b4695d8..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cb_loading.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/checkout_logo.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/checkout_logo.jpg deleted file mode 100644 index a8e1741..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/checkout_logo.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/close.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/close.gif deleted file mode 100644 index ca517b6..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/close.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/closelabel.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/closelabel.gif deleted file mode 100644 index 87b4f8b..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/closelabel.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/credit_cards.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/credit_cards.png deleted file mode 100644 index 9dc6602..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/credit_cards.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cross.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cross.png deleted file mode 100644 index 1514d51..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/cross.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/default-off.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/default-off.gif deleted file mode 100644 index 69c9ccd..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/default-off.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/default-on.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/default-on.gif deleted file mode 100644 index 75ba19f..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/default-on.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/download.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/download.gif deleted file mode 100644 index a1ab85a..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/download.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/email_go.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/email_go.png deleted file mode 100644 index 4a6c5d3..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/email_go.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/exclamation.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/exclamation.png deleted file mode 100644 index c37bd06..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/exclamation.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/facebook_status_off.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/facebook_status_off.gif deleted file mode 100644 index b049b32..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/facebook_status_off.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/folder_edit.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/folder_edit.png deleted file mode 100644 index ad669cc..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/folder_edit.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gear__plus.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gear__plus.png deleted file mode 100644 index 17f7e90..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gear__plus.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gold-cart.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gold-cart.png deleted file mode 100644 index 7df1879..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gold-cart.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gold-star.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gold-star.gif deleted file mode 100644 index 8e4358f..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/gold-star.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/google_bmarks.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/google_bmarks.gif deleted file mode 100644 index 6196da3..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/google_bmarks.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grey-loader.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grey-loader.gif deleted file mode 100644 index 8659fbd..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grey-loader.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grey-star.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grey-star.gif deleted file mode 100644 index dd53019..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grey-star.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid-off.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid-off.gif deleted file mode 100644 index cb38ad2..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid-off.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid-on.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid-on.gif deleted file mode 100644 index 9c1323b..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid-on.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid_bg.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid_bg.png deleted file mode 100644 index 8cb1503..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/grid_bg.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/help.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/help.png deleted file mode 100644 index 5c87017..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/help.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon32.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon32.png deleted file mode 100644 index af788f5..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon32.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon_window_collapse.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon_window_collapse.gif deleted file mode 100644 index 8bf6a96..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon_window_collapse.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon_window_expand.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon_window_expand.gif deleted file mode 100644 index 12270e6..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/icon_window_expand.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/indenter.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/indenter.gif deleted file mode 100644 index bab3f01..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/indenter.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/indicator.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/indicator.gif deleted file mode 100644 index 529e72f..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/indicator.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/info_icon.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/info_icon.jpg deleted file mode 100644 index ee0a956..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/info_icon.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/intensedebate-logo.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/intensedebate-logo.png deleted file mode 100644 index f8cfe68..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/intensedebate-logo.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/list-off.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/list-off.gif deleted file mode 100644 index 69c9ccd..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/list-off.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/list-on.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/list-on.gif deleted file mode 100644 index 75ba19f..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/list-on.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/loading.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/loading.gif deleted file mode 100644 index f864d5f..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/loading.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/loadingAnimation.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/loadingAnimation.gif deleted file mode 100644 index 92c5c30..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/loadingAnimation.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/lock_open.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/lock_open.png deleted file mode 100644 index a471765..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/lock_open.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/menu-arrows.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/menu-arrows.gif deleted file mode 100644 index 00b29f3..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/menu-arrows.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/menu-bits.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/menu-bits.gif deleted file mode 100644 index 218e184..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/menu-bits.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/mini-arrow.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/mini-arrow.jpg deleted file mode 100644 index a79a3c9..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/mini-arrow.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/minus.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/minus.png deleted file mode 100644 index 38ea30a..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/minus.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/mobile.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/mobile.png deleted file mode 100644 index d60f979..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/mobile.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/next.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/next.gif deleted file mode 100644 index 1fe6ca1..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/next.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/nextlabel.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/nextlabel.gif deleted file mode 100644 index 7c66121..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/nextlabel.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no-image-uploaded.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no-image-uploaded.gif deleted file mode 100644 index a465eed..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no-image-uploaded.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no-star.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no-star.gif deleted file mode 100644 index cc91120..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no-star.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no_stock.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no_stock.gif deleted file mode 100644 index 0b469e8..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/no_stock.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_bottom.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_bottom.png deleted file mode 100644 index 18083f7..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_bottom.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_down.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_down.png deleted file mode 100644 index 9a0609b..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_down.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_top.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_top.png deleted file mode 100644 index fae9630..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_top.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_up.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_up.png deleted file mode 100644 index aaaffaa..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/order_up.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/package_add.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/package_add.png deleted file mode 100644 index 9c8a9da..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/package_add.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/paypal-referal.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/paypal-referal.gif deleted file mode 100644 index 3586157..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/paypal-referal.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/pencil.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/pencil.png deleted file mode 100644 index 0bfecd5..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/pencil.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/plus.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/plus.png deleted file mode 100644 index 095601c..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/plus.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/plus_icon.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/plus_icon.jpg deleted file mode 100644 index c6dbaaf..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/plus_icon.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/prev.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/prev.gif deleted file mode 100644 index aefa804..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/prev.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/prevlabel.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/prevlabel.gif deleted file mode 100644 index 0641876..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/prevlabel.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/printer.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/printer.png deleted file mode 100644 index a350d18..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/printer.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/product-alert.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/product-alert.jpg deleted file mode 100644 index ae35c45..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/product-alert.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/remove_item.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/remove_item.png deleted file mode 100644 index d2b09b4..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/remove_item.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/roll-over-drag.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/roll-over-drag.jpg deleted file mode 100644 index d9f982e..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/roll-over-drag.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/rss-icon.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/rss-icon.jpg deleted file mode 100644 index a18a7d9..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/rss-icon.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/blinklist.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/blinklist.gif deleted file mode 100644 index 0eea1f6..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/blinklist.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/blogmarks.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/blogmarks.gif deleted file mode 100644 index dfce3f8..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/blogmarks.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/delicious.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/delicious.gif deleted file mode 100644 index 11682e8..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/delicious.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/digg.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/digg.gif deleted file mode 100644 index f3a3b8c..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/digg.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/facebook.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/facebook.png deleted file mode 100644 index 081384c..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/facebook.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/favoriting.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/favoriting.gif deleted file mode 100644 index 2805223..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/favoriting.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/furl.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/furl.gif deleted file mode 100644 index f430ffa..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/furl.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/google_bmarks.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/google_bmarks.gif deleted file mode 100644 index 6196da3..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/google_bmarks.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/magnolia.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/magnolia.gif deleted file mode 100644 index ef18440..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/magnolia.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/netscape.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/netscape.gif deleted file mode 100644 index c1ac55e..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/netscape.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/newsvine.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/newsvine.gif deleted file mode 100644 index 02541a1..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/newsvine.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/reddit.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/reddit.gif deleted file mode 100644 index c909ccf..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/reddit.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/share-icon-16x16.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/share-icon-16x16.gif deleted file mode 100644 index 6888e86..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/share-icon-16x16.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/share-this-product.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/share-this-product.gif deleted file mode 100644 index ce8599d..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/share-this-product.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/stumbleupon.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/stumbleupon.gif deleted file mode 100644 index f5ab6be..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/stumbleupon.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/tailrank.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/tailrank.gif deleted file mode 100644 index 15e6c11..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/tailrank.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/technorati.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/technorati.gif deleted file mode 100644 index 65c6599..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/technorati.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/windows_live.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/windows_live.gif deleted file mode 100644 index c56fb78..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/windows_live.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/yahoo_myweb.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/yahoo_myweb.gif deleted file mode 100644 index 9932ce3..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/social_networking/yahoo_myweb.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/star.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/star.gif deleted file mode 100644 index 899b9ee..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/star.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/sub-category-divide.jpg b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/sub-category-divide.jpg deleted file mode 100644 index a3a545a..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/sub-category-divide.jpg and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/tick.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/tick.png deleted file mode 100644 index a9925a0..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/tick.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/toggle-arrow.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/toggle-arrow.gif deleted file mode 100644 index 86cb448..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/toggle-arrow.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/toolbar.png b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/toolbar.png deleted file mode 100644 index a803b8a..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/toolbar.png and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/transparent.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/transparent.gif deleted file mode 100644 index 15b1cb5..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/transparent.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/trash.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/trash.gif deleted file mode 100644 index 0da7b7a..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/trash.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/yes_stock.gif b/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/yes_stock.gif deleted file mode 100644 index a6a05b1..0000000 Binary files a/src/wp-content/plugins/wp-e-commerce/wpsc-core/images/yes_stock.gif and /dev/null differ diff --git a/src/wp-content/plugins/wp-e-commerce/wpsc-core/js/ajax.js b/src/wp-content/plugins/wp-e-commerce/wpsc-core/js/ajax.js deleted file mode 100644 index a772c86..0000000 --- a/src/wp-content/plugins/wp-e-commerce/wpsc-core/js/ajax.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 Timothy R. Morgan -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -// mini/ajax.js - http://timmorgan.org/mini -// var fvd = 0; -function ajax_item(e){if(typeof e=='string')e=document.getElementById(e);return e}; -function collect(a,f){var n=[];for(var i=0;i