source: wp-tags/tags/0.1.0/tags.php @ 1092

Revision 1092, 24.8 KB checked in by gzfelix, 7 years ago (diff)

fixes tags_shutdown does not exist.

Line 
1<?php
2/*
3Plugin Name: Tags
4Plugin URI: http://boke.name/c/blog/wordpress-tags
5Description: A plugin that tag each entry of the blog, and give a tag access method and tag list.
6Author: Felix Wong
7Author URI: http://boke.name/
8Version: 0.1 alpha
9Email: felix@cenrik.net
10
11It is compatible with Wordpress 1.5.
12
13Tags 0.1alpha
14Copyright(C) 2005, Felix Wong
15
16This program is free software; you can redistribute it and/or modify
17it under the terms of the GNU General Public License as published by
18the Free Software Foundation; either version 2 of the License, or
19any later version.
20
21This program is distributed in the hope that it will be useful,
22but WITHOUT ANY WARRANTY; without even the implied warranty of
23MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24GNU General Public License for more details.
25
26*/
27
28/*
29INSTALLATION NOTES
30
311. Put tags.php into wp-content/plugins.
32
332. To install this plugin, you have to modify 3 wordpress files for Tags support.
34        wp-admin/edit-form.php
35        wp-admin/edit-form-advanced.php
36        wp-admin/edit-page-form.php
37
38or you can use the patch instead.
39
40--- wp-admin/edit-form.php ---
41--- LOOK FOR ---
42    <fieldset id="titlediv">
43      <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
44          <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $edited_post_title; ?>" id="title" /></div>
45    </fieldset>
46
47-- ADD AFTER ---
48
49    <!-- Tags Plugin Begin -->
50    <fieldset id="titlediv">
51        <legend><a href="http://boke.name/c/blog/wordpress-tags"><?php _e('Tags'); ?></a></legend>
52        <div><input type="text" tabindex="2" name="post_tags" size="30" value="<?php echo $edited_post_tags; ?>" id="tags" /></div>
53    </fieldset>
54    <!-- Tags End -->
55
56--- wp-admin/edit-form-advanced.php ---
57--- LOOK FOR ---
58</fieldset>
59    <fieldset id="postpassworddiv">
60      <legend><a href="http://wordpress.org/docs/reference/post/#post_password" title="<?php _e('Help on post password') ?>"><?php _e('Post Password') ?></a></legend>
61          <div><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post_password ?>" /></div>
62    </fieldset>
63
64--- ADD AFTER ---
65    <!-- Tags Plugin Begin -->
66    <fieldset id="titlediv">
67        <legend><a href="http://boke.name/c/blog/wordpress-tags"><?php _e('Tags'); ?></a></legend>
68        <div><input type="text" tabindex="2" name="post_tags" size="30" value="<?php echo $edited_post_tags; ?>" id="tags" /></div>
69    </fieldset>
70    <!-- Tags End -->
71
72
73--- wp-admin/edit-page-form.php ---
74--- LOOK FOR ---
75    <fieldset id="pageparent">
76      <legend><?php _e('Page Parent') ?></legend>
77          <div><select name="parent_id">
78          <option value='0'><?php _e('Main Page (no parent)'); ?></option>
79                        <?php parent_dropdown($post_parent); ?>
80        </select>
81          </div>
82    </fieldset>
83
84--- ADD AFTER ---
85    <!-- Tags Plugin Begin -->
86    <fieldset id="titlediv">
87        <legend><a href="http://boke.name/c/blog/wordpress-tags"><?php _e('Tags'); ?></a></legend>
88        <div><input tabindex="2" type="text" name="post_tags" size="30" value="<?php echo $edited_post_tags; ?>" id="tags" /></div>
89    </fieldset>
90    <!-- Tags End -->
91
923. Activate the plugin, go to Manage/Tags page so the plugin can create
93a table for you. Then you can go to Options/Permal Link to generate
94new Rewrite rules.
95
964. DONE.
97You can access your tags with:
98        http://website/index.php?tags=tag1+tag2
99or, with permal link:
100        http://website/tags/tag1+tag2
101   
102*/
103
104function tags_add_menu() {
105        add_management_page(__('Tags Management'), __('Tags'), 8, __FILE__, 'tags_tags_page');
106        //add_options_page(__('Tags Management'), __('Tags'), 8, __FILE__, 'tags_settings_page');
107}
108
109function tags_tags_page() {
110        global $wpdb, $WP_TAGS_ITEMS;
111
112        $request = "SHOW TABLES;";
113        $rows = $wpdb->get_results($request);
114        $table1 = false;
115        foreach($rows as $table) {
116                foreach($table as $value) if($value==$WP_TAGS_ITEMS) $table1 = true;
117        }
118
119        if(!$table1) {
120                $request = "CREATE TABLE `wp_tags_items` (
121                        `tag_item_id` bigint(20) NOT NULL auto_increment,
122                        `post_id` mediumint(9) NOT NULL default '0',
123                        `tag_name` varchar(255) NOT NULL default '',
124                        PRIMARY KEY  (`tag_item_id`),
125                        KEY `post_id` (`post_id`,`tag_name`)
126                );";
127                $wpdb->query($request);
128?>
129        <div class="wrap">
130                <h2><?=_e("Installation")?></h2>
131                <p><?=_e("You are the first time to activate Tags plugin. The Tags table has been created for you to use Tags plugin. You may deactivate the plugin and delete the table manually.")?></p>
132        </div>
133<?
134        }
135       
136        $request = "SELECT tag_name AS tag, COUNT(tag_item_id) AS `count` FROM $WP_TAGS_ITEMS GROUP BY tag_name";
137        $rows = $wpdb->get_results($request);
138?>
139
140<div class="wrap">
141        <h2><?=_e('Tags List')?></h2>
142        <? foreach( $rows as $row ): ?>
143        <a href="/tags/<?=rawurlencode($row->tag)?>"><?=$row->tag?>(<?=$row->count?>)</a>&nbsp;
144        <? endforeach; ?>
145</div>
146<?
147
148}
149
150function tags_settings_page() {
151        echo "<div class=\"wrap\">\n";
152        echo "<h2>".__('Tag Settings')."</h2>\n";
153        echo "</div>\n";
154}
155
156
157function tags_parse_query(&$param) {
158        global $_tags;
159        $wp_query =& $param;
160        $tags = rawurldecode($wp_query->get('tags'));
161        //$tags = iconv('GB2312', 'UTF-8', $tags);
162        $tags = preg_split("/( )+/", $tags);
163        $_tags = $tags;
164}
165
166function &tags_add_tags_support(&$param) {
167        global $edited_post_tags, $wpdb, $WP_TAGS_ITEMS, $post_ID;
168        $request = "SELECT * FROM $WP_TAGS_ITEMS WHERE post_id=$post_ID";
169        $rows = $wpdb->get_results($request);
170        if(count($rows)==0) {
171                $edited_post_tags = "";
172                return $param;
173        }
174
175        $edited_post_tags = array();
176        for($i=0; $i<count($rows); $i++)
177                $edited_post_tags[] = $rows[$i]->tag_name;
178        $edited_post_tags = array_unique($edited_post_tags);
179        $edited_post_tags = join( ' ', $edited_post_tags );
180
181        return $param;
182}
183
184function tags_save_post($post_ID) {
185        global $wpdb, $WP_TAGS_ITEMS, $WP_TAGS;
186        $tags = rawurldecode($tags);
187        $tags = trim($_POST['post_tags']);
188        $tags = preg_split('/( )+/', $tags);
189        $tags = array_unique($tags);
190        $tags = array_filter( $tags, tags_empty_check );
191       
192        $request = "DELETE FROM $WP_TAGS_ITEMS WHERE post_id=$post_ID";
193        $wpdb->query($request);
194       
195        if(count($tags)==0)
196                return;
197
198        foreach($tags as $tag) {
199                $tag = addslashes(strtolower($tag));
200                $request = "INSERT INTO $WP_TAGS_ITEMS (post_id, tag_name) VALUES ($post_ID,'$tag')";
201                $wpdb->query($request);
202        }
203}
204
205function tags_shutdown(&$param) {
206        global $_tags;
207        unset($_tags);
208}
209
210function &tags_filter_query_vars(&$query_vars) {
211        $query_vars[] = 'tags';
212        return $query_vars;
213}
214
215function tags_empty_check(&$elem) {
216        return !empty($elem);
217}
218
219function &tags_filter_posts_join(&$join) {
220        global $_tags, $WP_TAGS_ITEMS, $WP_TAGS, $wpdb;
221
222        $_tags = array_filter( $_tags, tags_empty_check );
223        // if no tag is specified, return
224        if(count($_tags)==0)
225                return $join;
226
227        $join .= " ";
228        $join .= "JOIN $WP_TAGS_ITEMS ON ($wpdb->posts.ID=$WP_TAGS_ITEMS.post_id AND ( 0";
229        foreach($_tags as $tag) {
230                $tag = addslashes($tag);
231                $join .= " OR $WP_TAGS_ITEMS.tag_name='$tag'";
232        }
233        $join .= ")) ";
234       
235        return $join;
236}
237
238function &tags_filter_posts_where(&$where) {
239        global $_tags, $WP_TAGS_ITEMS, $WP_TAGS, $wpdb;
240       
241        $_tags = array_filter( $_tags, tags_empty_check );
242        $num_tags = count($_tags);
243        if($num_tags == 0)
244                return $where;
245       
246        $where .= " ";
247        return $where;
248}
249
250function &tags_filter_the_posts(&$the_posts) {
251        global $_tags, $WP_TAGS_ITEMS, $WP_TAGS, $wpdb;
252       
253        $_tags = array_filter( $_tags, tags_empty_check );
254        $num_tags = count($_tags);
255       
256        if($num_tags == 0)
257                return $the_posts;
258
259        foreach($the_posts as $key=>$post) {
260                $post_id = $post->ID;
261                $request = "SELECT DISTINCT COUNT(*) AS c FROM $WP_TAGS_ITEMS WHERE post_id='$post_id' AND (0";
262                foreach($_tags as $tag) {
263                        $tag = addslashes($tag);
264                        $request .= " OR tag_name='$tag'";
265                }
266                $request .= ")";
267                $rows = $wpdb->get_results($request);
268
269                if(count($rows)==0)
270                        continue;
271
272                $post_count = intval($rows[0]->c);
273                if($post_count < $num_tags) {
274                        unset($the_posts[$key]);
275                }
276        }
277       
278        if(count($the_posts)>0)
279                array_unshift( $the_posts, array_shift($the_posts) );
280        return $the_posts;
281}
282
283function &tags_filter_rewrite_rules_array(&$rules) {
284        $work["tags/?$"] = 'index.php?&tags=';
285        $work["tags/([^/]+)/?$"] = 'index.php?&tags=$1';
286        $work["tags/([^/]+)/([0-9]{4})/?$"] = 'index.php?year=$2&tags=$1';
287        $work["tags/([^/]+)/([0-9]{4})/([0-9]{1,2})/?$"] = 'index.php?year=$2&monthnum=$3&tags=$1';
288        $work["tags/([^/]+)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$"] = 'index.php?year=$2&monthnum=$3&day=$4&tags=$1';
289        $work["tags/([^/]+)/(feed|atom|rss|rss2|rdf)/?$"] = 'index.php?&tags=$1&feed=$2';
290        $work["tags/([^/]+)/([0-9]{4})/(feed|atom|rss|rss2|rdf)/?$"] = 'index.php?year=$2&tags=$1&feed=$3';
291        $work["tags/([^/]+)/([0-9]{4})/([0-9]{1,2})/(feed|atom|rss|rss2|rdf)/?$"] = 'index.php?year=$2&monthnum=$3&tags=$1&feed=$4';
292        $work["tags/([^/]+)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|atom|rss|rss2|rdf)/?$"] = 'index.php?year=$2&monthnum=$3&day=$4&tags=$1&feed=$5';
293        $work["tags/([^/]+)/page/?([0-9]{1,})/?$"] = 'index.php?&tags=$1&paged=$2';
294        $work["tags/([^/]+)/([0-9]{4})/page/?([0-9]{1,})/?$"] = 'index.php?year=$2&tags=$1&paged=$3';
295        $i = 0;
296        foreach($rules as $key => $value) {
297                if( ctype_alpha($key[0]) || ctype_digit($key[0]) )  break;
298                $i++;
299        }
300        $temp = array_splice($rules, $i);
301        $rules = array_merge( $rules, $work, $temp);
302        return $rules;
303}
304
305function tags_delete_post($post_ID) {
306        global $WP_TAGS_ITEMS, $wpdb;
307
308        $request = "DELETE FROM $WP_TAGS_ITEMS WHERE post_id=$post_ID";
309        $wpdb->query($request);
310}
311
312add_action('admin_menu', 'tags_add_menu');
313add_action('parse_query', 'tags_parse_query');
314add_action('shutdown', 'tags_shutdown');
315add_action('edit_post', 'tags_save_post');
316add_action('save_post', 'tags_save_post');
317add_action('delete_post', 'tags_delete_post');
318
319add_filter('query_vars', 'tags_filter_query_vars');
320add_filter('posts_join', 'tags_filter_posts_join');
321add_filter('posts_where', 'tags_filter_posts_where');
322add_filter('the_posts', 'tags_filter_the_posts');
323add_filter('rewrite_rules_array', 'tags_filter_rewrite_rules_array');
324add_filter('content_edit_pre', 'tags_add_tags_support');
325
326
327$WP_TAGS_ITEMS = $table_prefix . "tags_items";
328$_tags = array();
329
330
331/*****
332                    GNU GENERAL PUBLIC LICENSE
333                       Version 2, June 1991
334
335 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
336                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
337 Everyone is permitted to copy and distribute verbatim copies
338 of this license document, but changing it is not allowed.
339
340                            Preamble
341
342  The licenses for most software are designed to take away your
343freedom to share and change it.  By contrast, the GNU General Public
344License is intended to guarantee your freedom to share and change free
345software--to make sure the software is free for all its users.  This
346General Public License applies to most of the Free Software
347Foundation's software and to any other program whose authors commit to
348using it.  (Some other Free Software Foundation software is covered by
349the GNU Library General Public License instead.)  You can apply it to
350your programs, too.
351
352  When we speak of free software, we are referring to freedom, not
353price.  Our General Public Licenses are designed to make sure that you
354have the freedom to distribute copies of free software (and charge for
355this service if you wish), that you receive source code or can get it
356if you want it, that you can change the software or use pieces of it
357in new free programs; and that you know you can do these things.
358
359  To protect your rights, we need to make restrictions that forbid
360anyone to deny you these rights or to ask you to surrender the rights.
361These restrictions translate to certain responsibilities for you if you
362distribute copies of the software, or if you modify it.
363
364  For example, if you distribute copies of such a program, whether
365gratis or for a fee, you must give the recipients all the rights that
366you have.  You must make sure that they, too, receive or can get the
367source code.  And you must show them these terms so they know their
368rights.
369
370  We protect your rights with two steps: (1) copyright the software, and
371(2) offer you this license which gives you legal permission to copy,
372distribute and/or modify the software.
373
374  Also, for each author's protection and ours, we want to make certain
375that everyone understands that there is no warranty for this free
376software.  If the software is modified by someone else and passed on, we
377want its recipients to know that what they have is not the original, so
378that any problems introduced by others will not reflect on the original
379authors' reputations.
380
381  Finally, any free program is threatened constantly by software
382patents.  We wish to avoid the danger that redistributors of a free
383program will individually obtain patent licenses, in effect making the
384program proprietary.  To prevent this, we have made it clear that any
385patent must be licensed for everyone's free use or not licensed at all.
386
387  The precise terms and conditions for copying, distribution and
388modification follow.
389
390                    GNU GENERAL PUBLIC LICENSE
391   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
392
393  0. This License applies to any program or other work which contains
394a notice placed by the copyright holder saying it may be distributed
395under the terms of this General Public License.  The "Program", below,
396refers to any such program or work, and a "work based on the Program"
397means either the Program or any derivative work under copyright law:
398that is to say, a work containing the Program or a portion of it,
399either verbatim or with modifications and/or translated into another
400language.  (Hereinafter, translation is included without limitation in
401the term "modification".)  Each licensee is addressed as "you".
402
403Activities other than copying, distribution and modification are not
404covered by this License; they are outside its scope.  The act of
405running the Program is not restricted, and the output from the Program
406is covered only if its contents constitute a work based on the
407Program (independent of having been made by running the Program).
408Whether that is true depends on what the Program does.
409
410  1. You may copy and distribute verbatim copies of the Program's
411source code as you receive it, in any medium, provided that you
412conspicuously and appropriately publish on each copy an appropriate
413copyright notice and disclaimer of warranty; keep intact all the
414notices that refer to this License and to the absence of any warranty;
415and give any other recipients of the Program a copy of this License
416along with the Program.
417
418You may charge a fee for the physical act of transferring a copy, and
419you may at your option offer warranty protection in exchange for a fee.
420
421  2. You may modify your copy or copies of the Program or any portion
422of it, thus forming a work based on the Program, and copy and
423distribute such modifications or work under the terms of Section 1
424above, provided that you also meet all of these conditions:
425
426    a) You must cause the modified files to carry prominent notices
427    stating that you changed the files and the date of any change.
428
429    b) You must cause any work that you distribute or publish, that in
430    whole or in part contains or is derived from the Program or any
431    part thereof, to be licensed as a whole at no charge to all third
432    parties under the terms of this License.
433
434    c) If the modified program normally reads commands interactively
435    when run, you must cause it, when started running for such
436    interactive use in the most ordinary way, to print or display an
437    announcement including an appropriate copyright notice and a
438    notice that there is no warranty (or else, saying that you provide
439    a warranty) and that users may redistribute the program under
440    these conditions, and telling the user how to view a copy of this
441    License.  (Exception: if the Program itself is interactive but
442    does not normally print such an announcement, your work based on
443    the Program is not required to print an announcement.)
444
445These requirements apply to the modified work as a whole.  If
446identifiable sections of that work are not derived from the Program,
447and can be reasonably considered independent and separate works in
448themselves, then this License, and its terms, do not apply to those
449sections when you distribute them as separate works.  But when you
450distribute the same sections as part of a whole which is a work based
451on the Program, the distribution of the whole must be on the terms of
452this License, whose permissions for other licensees extend to the
453entire whole, and thus to each and every part regardless of who wrote it.
454
455Thus, it is not the intent of this section to claim rights or contest
456your rights to work written entirely by you; rather, the intent is to
457exercise the right to control the distribution of derivative or
458collective works based on the Program.
459
460In addition, mere aggregation of another work not based on the Program
461with the Program (or with a work based on the Program) on a volume of
462a storage or distribution medium does not bring the other work under
463the scope of this License.
464
465  3. You may copy and distribute the Program (or a work based on it,
466under Section 2) in object code or executable form under the terms of
467Sections 1 and 2 above provided that you also do one of the following:
468
469    a) Accompany it with the complete corresponding machine-readable
470    source code, which must be distributed under the terms of Sections
471    1 and 2 above on a medium customarily used for software interchange; or,
472
473    b) Accompany it with a written offer, valid for at least three
474    years, to give any third party, for a charge no more than your
475    cost of physically performing source distribution, a complete
476    machine-readable copy of the corresponding source code, to be
477    distributed under the terms of Sections 1 and 2 above on a medium
478    customarily used for software interchange; or,
479
480    c) Accompany it with the information you received as to the offer
481    to distribute corresponding source code.  (This alternative is
482    allowed only for noncommercial distribution and only if you
483    received the program in object code or executable form with such
484    an offer, in accord with Subsection b above.)
485
486The source code for a work means the preferred form of the work for
487making modifications to it.  For an executable work, complete source
488code means all the source code for all modules it contains, plus any
489associated interface definition files, plus the scripts used to
490control compilation and installation of the executable.  However, as a
491special exception, the source code distributed need not include
492anything that is normally distributed (in either source or binary
493form) with the major components (compiler, kernel, and so on) of the
494operating system on which the executable runs, unless that component
495itself accompanies the executable.
496
497If distribution of executable or object code is made by offering
498access to copy from a designated place, then offering equivalent
499access to copy the source code from the same place counts as
500distribution of the source code, even though third parties are not
501compelled to copy the source along with the object code.
502
503  4. You may not copy, modify, sublicense, or distribute the Program
504except as expressly provided under this License.  Any attempt
505otherwise to copy, modify, sublicense or distribute the Program is
506void, and will automatically terminate your rights under this License.
507However, parties who have received copies, or rights, from you under
508this License will not have their licenses terminated so long as such
509parties remain in full compliance.
510
511  5. You are not required to accept this License, since you have not
512signed it.  However, nothing else grants you permission to modify or
513distribute the Program or its derivative works.  These actions are
514prohibited by law if you do not accept this License.  Therefore, by
515modifying or distributing the Program (or any work based on the
516Program), you indicate your acceptance of this License to do so, and
517all its terms and conditions for copying, distributing or modifying
518the Program or works based on it.
519
520  6. Each time you redistribute the Program (or any work based on the
521Program), the recipient automatically receives a license from the
522original licensor to copy, distribute or modify the Program subject to
523these terms and conditions.  You may not impose any further
524restrictions on the recipients' exercise of the rights granted herein.
525You are not responsible for enforcing compliance by third parties to
526this License.
527
528  7. If, as a consequence of a court judgment or allegation of patent
529infringement or for any other reason (not limited to patent issues),
530conditions are imposed on you (whether by court order, agreement or
531otherwise) that contradict the conditions of this License, they do not
532excuse you from the conditions of this License.  If you cannot
533distribute so as to satisfy simultaneously your obligations under this
534License and any other pertinent obligations, then as a consequence you
535may not distribute the Program at all.  For example, if a patent
536license would not permit royalty-free redistribution of the Program by
537all those who receive copies directly or indirectly through you, then
538the only way you could satisfy both it and this License would be to
539refrain entirely from distribution of the Program.
540
541If any portion of this section is held invalid or unenforceable under
542any particular circumstance, the balance of the section is intended to
543apply and the section as a whole is intended to apply in other
544circumstances.
545
546It is not the purpose of this section to induce you to infringe any
547patents or other property right claims or to contest validity of any
548such claims; this section has the sole purpose of protecting the
549integrity of the free software distribution system, which is
550implemented by public license practices.  Many people have made
551generous contributions to the wide range of software distributed
552through that system in reliance on consistent application of that
553system; it is up to the author/donor to decide if he or she is willing
554to distribute software through any other system and a licensee cannot
555impose that choice.
556
557This section is intended to make thoroughly clear what is believed to
558be a consequence of the rest of this License.
559
560  8. If the distribution and/or use of the Program is restricted in
561certain countries either by patents or by copyrighted interfaces, the
562original copyright holder who places the Program under this License
563may add an explicit geographical distribution limitation excluding
564those countries, so that distribution is permitted only in or among
565countries not thus excluded.  In such case, this License incorporates
566the limitation as if written in the body of this License.
567
568  9. The Free Software Foundation may publish revised and/or new versions
569of the General Public License from time to time.  Such new versions will
570be similar in spirit to the present version, but may differ in detail to
571address new problems or concerns.
572
573Each version is given a distinguishing version number.  If the Program
574specifies a version number of this License which applies to it and "any
575later version", you have the option of following the terms and conditions
576either of that version or of any later version published by the Free
577Software Foundation.  If the Program does not specify a version number of
578this License, you may choose any version ever published by the Free Software
579Foundation.
580
581  10. If you wish to incorporate parts of the Program into other free
582programs whose distribution conditions are different, write to the author
583to ask for permission.  For software which is copyrighted by the Free
584Software Foundation, write to the Free Software Foundation; we sometimes
585make exceptions for this.  Our decision will be guided by the two goals
586of preserving the free status of all derivatives of our free software and
587of promoting the sharing and reuse of software generally.
588
589                            NO WARRANTY
590
591  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
592FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
593OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
594PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
595OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
596MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
597TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
598PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
599REPAIR OR CORRECTION.
600
601  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
602WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
603REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
604INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
605OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
606TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
607YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
608PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
609POSSIBILITY OF SUCH DAMAGES.
610
611                     END OF TERMS AND CONDITIONS
612*/
613?>
Note: See TracBrowser for help on using the repository browser.