[Cinemaru-svn] cinemaru-svn [186] タグ cinemaru-1 . 8 追加

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 3月 23日 (月) 00:07:34 JST


Revision: 186
          http://svn.sourceforge.jp/view?root=cinemaru&view=rev&rev=186
Author:   tokita
Date:     2009-03-23 00:07:33 +0900 (Mon, 23 Mar 2009)

Log Message:
-----------
タグ cinemaru-1.8 追加

Added Paths:
-----------
    tags/1.8/
    tags/1.8/cinemaru/
    tags/1.8/cinemaru/AUTHORS
    tags/1.8/cinemaru/CHANGES
    tags/1.8/cinemaru/COPYING
    tags/1.8/cinemaru/README
    tags/1.8/cinemaru/README.jp.txt
    tags/1.8/cinemaru/admin/
    tags/1.8/cinemaru/admin/groupperm.php
    tags/1.8/cinemaru/admin/index.php
    tags/1.8/cinemaru/admin/menu.php
    tags/1.8/cinemaru/admin/mygroupperm.php
    tags/1.8/cinemaru/admin/mygrouppermform.php
    tags/1.8/cinemaru/admin/mymenu.php
    tags/1.8/cinemaru/blocks/
    tags/1.8/cinemaru/blocks/cinemaru_block_hottag.php
    tags/1.8/cinemaru/blocks/cinemaru_block_random.php
    tags/1.8/cinemaru/blocks/cinemaru_block_thumb.php
    tags/1.8/cinemaru/constants.php
    tags/1.8/cinemaru/dot.htaccess
    tags/1.8/cinemaru/flash/
    tags/1.8/cinemaru/flash/player.zip
    tags/1.8/cinemaru/flash/star1.fla
    tags/1.8/cinemaru/flash/star1.swf
    tags/1.8/cinemaru/flash/star2.fla
    tags/1.8/cinemaru/flash/star2.swf
    tags/1.8/cinemaru/flash/star3.fla
    tags/1.8/cinemaru/flash/star3.swf
    tags/1.8/cinemaru/get_youtube_flv_url.php
    tags/1.8/cinemaru/header.php
    tags/1.8/cinemaru/images/
    tags/1.8/cinemaru/images/bg_02.gif
    tags/1.8/cinemaru/images/index.html
    tags/1.8/cinemaru/images/list.png
    tags/1.8/cinemaru/images/no_image.png
    tags/1.8/cinemaru/images/no_img_y.gif
    tags/1.8/cinemaru/images/thumb.png
    tags/1.8/cinemaru/include/
    tags/1.8/cinemaru/include/db.php
    tags/1.8/cinemaru/include/groupperm_function.php
    tags/1.8/cinemaru/include/gtickets.php
    tags/1.8/cinemaru/include/index.html
    tags/1.8/cinemaru/include/misc.php
    tags/1.8/cinemaru/include/notification.inc.php
    tags/1.8/cinemaru/include/pagenavi.class.php
    tags/1.8/cinemaru/include/search.inc.php
    tags/1.8/cinemaru/include/url.php
    tags/1.8/cinemaru/include/validator.php
    tags/1.8/cinemaru/index.php
    tags/1.8/cinemaru/language/
    tags/1.8/cinemaru/language/english/
    tags/1.8/cinemaru/language/english/admin.php
    tags/1.8/cinemaru/language/english/blocks.php
    tags/1.8/cinemaru/language/english/index.html
    tags/1.8/cinemaru/language/english/mail_template/
    tags/1.8/cinemaru/language/english/mail_template/global_newpost_notify.tpl
    tags/1.8/cinemaru/language/english/mail_template/global_update_notify.tpl
    tags/1.8/cinemaru/language/english/main.php
    tags/1.8/cinemaru/language/english/modinfo.php
    tags/1.8/cinemaru/language/index.html
    tags/1.8/cinemaru/language/ja_utf8/
    tags/1.8/cinemaru/language/ja_utf8/admin.php
    tags/1.8/cinemaru/language/ja_utf8/blocks.php
    tags/1.8/cinemaru/language/ja_utf8/index.html
    tags/1.8/cinemaru/language/ja_utf8/mail_template/
    tags/1.8/cinemaru/language/ja_utf8/mail_template/global_newpost_notify.tpl
    tags/1.8/cinemaru/language/ja_utf8/mail_template/global_update_notify.tpl
    tags/1.8/cinemaru/language/ja_utf8/main.php
    tags/1.8/cinemaru/language/ja_utf8/modinfo.php
    tags/1.8/cinemaru/language/japanese/
    tags/1.8/cinemaru/language/japanese/admin.php
    tags/1.8/cinemaru/language/japanese/blocks.php
    tags/1.8/cinemaru/language/japanese/index.html
    tags/1.8/cinemaru/language/japanese/mail_template/
    tags/1.8/cinemaru/language/japanese/mail_template/global_newpost_notify.tpl
    tags/1.8/cinemaru/language/japanese/mail_template/global_update_notify.tpl
    tags/1.8/cinemaru/language/japanese/main.php
    tags/1.8/cinemaru/language/japanese/modinfo.php
    tags/1.8/cinemaru/module_icon.php
    tags/1.8/cinemaru/module_icon.png
    tags/1.8/cinemaru/movie.php
    tags/1.8/cinemaru/movie_comment_delete.php
    tags/1.8/cinemaru/movie_comment_get.php
    tags/1.8/cinemaru/movie_comment_list.php
    tags/1.8/cinemaru/movie_comment_post.php
    tags/1.8/cinemaru/movie_delete.php
    tags/1.8/cinemaru/movie_delete_do.php
    tags/1.8/cinemaru/movie_do.php
    tags/1.8/cinemaru/movie_edit.php
    tags/1.8/cinemaru/movie_edit_do.php
    tags/1.8/cinemaru/movie_form.php
    tags/1.8/cinemaru/movie_report.php
    tags/1.8/cinemaru/movie_report_delete.php
    tags/1.8/cinemaru/movie_report_do.php
    tags/1.8/cinemaru/movie_report_list.php
    tags/1.8/cinemaru/movie_valid_do.php
    tags/1.8/cinemaru/notification_update.php
    tags/1.8/cinemaru/oninstall.php
    tags/1.8/cinemaru/onuninstall.php
    tags/1.8/cinemaru/onupdate.php
    tags/1.8/cinemaru/player.swf
    tags/1.8/cinemaru/prototype.js
    tags/1.8/cinemaru/sql/
    tags/1.8/cinemaru/sql/index.html
    tags/1.8/cinemaru/sql/mysql.sql
    tags/1.8/cinemaru/tag_add.php
    tags/1.8/cinemaru/tag_delete.php
    tags/1.8/cinemaru/tag_edit.php
    tags/1.8/cinemaru/tag_get.php
    tags/1.8/cinemaru/tag_list.php
    tags/1.8/cinemaru/templates/
    tags/1.8/cinemaru/templates/blocks/
    tags/1.8/cinemaru/templates/blocks/block_hottag.html
    tags/1.8/cinemaru/templates/blocks/block_random.html
    tags/1.8/cinemaru/templates/blocks/block_thumb.html
    tags/1.8/cinemaru/templates/cinemaru.css
    tags/1.8/cinemaru/templates/comment_list.html
    tags/1.8/cinemaru/templates/index.html
    tags/1.8/cinemaru/templates/list.html
    tags/1.8/cinemaru/templates/list_part.html
    tags/1.8/cinemaru/templates/movie.html
    tags/1.8/cinemaru/templates/movie_delete.html
    tags/1.8/cinemaru/templates/movie_flash_player.html
    tags/1.8/cinemaru/templates/movie_form.html
    tags/1.8/cinemaru/templates/report_form.html
    tags/1.8/cinemaru/templates/report_list.html
    tags/1.8/cinemaru/templates/tag_list.html
    tags/1.8/cinemaru/templates/tag_list_part.html
    tags/1.8/cinemaru/templates/thumb.html
    tags/1.8/cinemaru/templates/thumb_part.html
    tags/1.8/cinemaru/xoops_version.php

Added: tags/1.8/cinemaru/AUTHORS
===================================================================
--- tags/1.8/cinemaru/AUTHORS	                        (rev 0)
+++ tags/1.8/cinemaru/AUTHORS	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,7 @@
+
+contributors
+
+	tokita <BQB04****@nifty*****>
+	asben
+
+

Added: tags/1.8/cinemaru/CHANGES
===================================================================
--- tags/1.8/cinemaru/CHANGES	                        (rev 0)
+++ tags/1.8/cinemaru/CHANGES	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,140 @@
+[xlang:en]
+   
+1.7->1.8 (2009-3-18)
+
+- The easiness of the animation player to use has been improved
+- The bug when the directory name was changed and it installed it was corrected
+- Added tag cloud block
+
+1.6->1.7 (2008-11-14)
+
+- for Youtube bug fix
+- dir name bug fix
+
+1.5->1.6 (2008-7-7)
+
+- Flash player design refine
+- bug fix a bit
+
+1.4->1.5 (2008-3-25)
+
+- many bug fix
+
+1.3->1.4 (2008-3-16)
+
+- Flash player bug fix
+- Measures no socket_create() 
+
+1.2->1.3 (2008-3-15)
+
+- Plash player bug fix
+
+1.1->1.2 (2008-3-15)
+
+- Flash player bug fix;
+
+1.0->1.1 (2008-3-14)
+
+- The player has been improved
+
+0.9->1.0 (2008-3-14)
+
+- Edit bug fix
+
+0.8->0.9 (2008-3-14)
+
+- Supported YouTube URL
+
+0.7->0.8 (2008-3-12)
+
+- Blog paste
+- Form MAX_FILE_SIZE bug fix
+
+0.6->0.7 (2008-3-11)
+
+- comment list bug fix
+
+0.5->0.6 (2008-3-10)
+
+- added 
+- template bug fix
+- admin menu bug fix
+
+
+0.5 (2008-3-9)
+- The first release
+
+[/xlang:en]
+[xlang:ja]
+
+1.7->1.8 (2009-3-18)
+
+- 動画プレイヤーの使いやすさ改善
+- ディレクトリ名を変えて複数インストールしたときのバグを修正
+- 人気タグブロックを追加
+
+1.6->1.7 (2008-11-14)
+
+- Youtubeの動画再生されないバグを修正した。
+- ディレクトリ名を変えたときの不具合を修正した
+
+1.5->1.6 (2008-7-7)
+
+- 動画プレイヤーのデザイン修正-
+- 小バグ修正
+- モジュールD3化
+
+1.4->1.5 (2008-3-25)
+
+- アップロードした人が自分の動画を修正できなかった件を修正
+- 4.3.10 より前のバージョン PHP でアップロードできなかった件を修正
+- XOOPS-2.0.16a でゲストでタグ操作できなかった件を修正
+
+1.3->1.4 (2008-3-16)
+
+- IE6でFlashの実行時エラーが出たいた件を修正
+- socket_create() が使えない場合の対策を追加
+
+1.2->1.3 (2008-3-15)
+
+- プレイヤーで文字が動かないバグを修正
+
+1.1->1.2 (2008-3-15)
+
+- Flash のプレイヤーが重くなるバグを修正
+
+1.0->1.1 (2008-3-14)
+
+- 自動再生しない場合は、再生ボタンを押せないように変更
+- 停止・一時停止時はタイマーを止めるように変更
+- YouTube の動画がブログ貼り付けで再生できないバグを修正
+
+0.9->1.0 (2008-3-14)
+
+- 編集で動画タイプが変わるバグを修正
+
+0.8->0.9 (2008-3-14)
+
+- YouTube URL に対応
+
+0.7->0.8 (2008-3-12)
+
+- ブログ貼り付け機能追加
+- フォームのMAX_FILE_SIZEの指定の間違いを修正
+
+0.6->0.7 (2008-3-11)
+
+- コメント一覧で動画へのリンクが切れるバグを修正
+
+0.5->0.6 (2008-3-10)
+
+- language/ja_utf8 を追加
+- テンプレートのバグを修正
+- 管理者メニューのバグを修正
+
+
+0.5 (2008-3-9)
+
+- 最初のリリース
+
+[/xlang:ja]

Added: tags/1.8/cinemaru/COPYING
===================================================================
--- tags/1.8/cinemaru/COPYING	                        (rev 0)
+++ tags/1.8/cinemaru/COPYING	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,280 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, 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

Added: tags/1.8/cinemaru/README
===================================================================
--- tags/1.8/cinemaru/README	                        (rev 0)
+++ tags/1.8/cinemaru/README	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,18 @@
+
+Cinemaru Xoops Module
+
+Movie/MP3 player module for xoops
+
+---
+
+copyright
+
+program
+(C) Masahiko TOkita <BQB04****@nifty*****>
+
+Flash player design refine
+Yujiro Takahashi <yujir****@rakut*****> http://rakuto.net/
+
+Flash player Silk icon set 1.3
+Mark James http://www.famfamfam.com/lab/icons/silk/
+

Added: tags/1.8/cinemaru/README.jp.txt
===================================================================
--- tags/1.8/cinemaru/README.jp.txt	                        (rev 0)
+++ tags/1.8/cinemaru/README.jp.txt	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,157 @@
+
+This file is written by Shift-JIS.
+
+
+Cinemaru Xoops Module
+
+
+¡ŠT—v
+
+Cinemaru ‚Í“®‰æ/MP3‚ðÄ¶EŠÇ—‚ðs‚¤ Xoops ƒ‚ƒWƒ…[ƒ‹‚Å‚·B
+Ä¶’†‚ɃRƒƒ“ƒg‚ð•t‚¯‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
+
+Cinemaru ‚́u‚µ‚Ë‚Ü‚év‚Æ“Ç‚Ý‚Ü‚·B
+
+ˆÈ‰º‚̂悤‚È‹@”\‚ª‚ ‚è‚Ü‚·B
+E“®‰æ^MP3ƒtƒ@ƒCƒ‹‚̃Aƒbƒvƒ[ƒhAÄ¶
+E“®‰æ^MP3‚ÌURL‚Ü‚½‚Í YouTube ‚Ì“®‰æ‚ÌURL‚ðŽw’肵‚Ä“Še
+EÄ¶’†‚ɃRƒƒ“ƒg‚ð•t‚¯‚ê‚é
+E”CˆÓ‚ÌFLASHiSWFƒtƒ@ƒCƒ‹j‚𓮉æÄ¶’†‚É•\Ž¦‚Å‚«‚é
+Eƒ^ƒO•t‚¯‹y‚у^ƒOŒÅ’è
+Eˆá”½•ñ‹@”\
+E“®‰æ³”F‹@”\
+
+
+‚±‚̃‚ƒWƒ…[ƒ‹‚ðŽg‚Á‚Ä•s³ƒAƒbƒvƒ[ƒh‚ðs‚í‚È‚¢‚Å‚­‚¾‚³‚¢B
+
+
+¦Œ»Ý‚̓Aƒ‹ƒtƒ@ƒo[ƒWƒ‡ƒ“‚Å‚ ‚èA¡ŒãŒÝŠ·«‚Ì‚È‚¢•ÏX‚ª“ü‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+‚Ü‚½A\•ªƒeƒXƒg‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ‚Ì‚ÅŽ©ŒÈÓ”C‚Å—˜—p‚µ‚Ä‚­‚¾‚³‚¢B
+
+
+¡ƒ‰ƒCƒZƒ“ƒX
+
+ƒ‰ƒCƒZƒ“ƒX‚Í GPL Version 2 ‚Å‚·B
+Ú‚µ‚­‚Í COPYING ‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+
+Flash‚Ì“®‰æƒvƒŒƒCƒ„[‚̃\[ƒX‚à“Y•t‚³‚ê‚Ä‚¢‚Ü‚·B
+( flash/player.mxml ‹y‚Ñ flash/CommentLabel.as )
+
+
+¡ƒCƒ“ƒXƒg[ƒ‹
+
+Xoops ‚Ì modules/ ƒfƒBƒŒƒNƒgƒŠˆÈ‰º‚É cinemaru ‚ðƒRƒs[‚µ‚Ü‚·B
+ŠÇ—‰æ–ʁAƒ‚ƒWƒ…[ƒ‹ŠÇ—‚©‚ç cinemaru ƒ‚ƒWƒ…[ƒ‹‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚­‚¾‚³‚¢B
+ˆÈã‚Å‚·B
+
+‚Æ‚­‚Ƀp[ƒ~ƒbƒVƒ‡ƒ“‚ð•ÏX‚µ‚½‚è‚È‚Ç‚Í•K—v‚ ‚è‚Ü‚¹‚ñB
+“®‰æƒtƒ@ƒCƒ‹AMP3ƒtƒ@ƒCƒ‹AƒTƒ€ƒlƒCƒ‹‰æ‘œ‚Í XOOPS_ROOT_PATH/uploads/cinemaru/ 
+ˆÈ‰º‚ɍì‚ç‚ê‚Ü‚·B
+
+‚Ü‚½AƒfƒBƒŒƒNƒgƒŠ–¼‚ð•ÏX‚µ‚ăCƒ“ƒXƒg[ƒ‹‚Å‚«‚Ü‚·B•¡”ƒCƒ“ƒXƒg[ƒ‹‰Â”\‚Å‚·B
+
+
+¡Ý’è
+
+ƒT[ƒo‘¤F
+WebƒT[ƒo‚Ńtƒ@ƒCƒ‹ƒAƒbƒvƒ[ƒh‚̏ãŒÀ‚ª 2MB ‚ɐݒ肳‚ê‚Ä‚¢‚éê‡‚ª‘½‚¢‚Å‚·B
+ŠÇ—‰æ–ʂ́uƒAƒbƒvƒ[ƒhãŒÀv‚̐ݒè‚Í•\Ž¦‚݂̂ŁA‚»‚±‚ð•ÏX‚µ‚½‚¾‚¯‚Å‚Í—LŒø‚É‚È‚è‚Ü‚¹‚ñB
+
+.htaccess ‚̐ݒ肪—LŒø‚ȏꍇA.htaccess ‚̐ݒè‚݂̂ŃAƒbƒvƒ[ƒhãŒÀ‚ð•ÏX‚Å‚«
+‚éê‡‚ª‚ ‚è‚Ü‚·B
+‚æ‚è‘å‚«‚ȃtƒ@ƒCƒ‹‚ðƒAƒbƒvƒ[ƒh‚µ‚½‚¢ê‡‚́Adot.htaccess ‚ð .htaccess ‚É
+‘‚«Š·‚¦‚Ä cinemaru/ ˆÈ‰º‚É‚¨‚¢‚Ä‚­‚¾‚³‚¢B
+
+ŠÇ—‰æ–ʁAƒOƒ‹[ƒv‚Ì‘S‘Ì“I‚ÈŒ ŒÀ‚©‚猠ŒÀÝ’è‚ðs‚Á‚Ä‚­‚¾‚³‚¢B
+ƒfƒtƒHƒ‹ƒg‚ł̓‚ƒWƒ…[ƒ‹ŠÇ—ŽÒˆÈŠO‚Í‚È‚É‚à‚Å‚«‚È‚¢ó‘Ô‚Æ‚È‚Á‚Ä‚¢‚Ü‚·B
+
+
+¡Žg—p•û–@
+
+Flash Video(FLV) ‹y‚ÑMP3ƒtƒ@ƒCƒ‹‚𓊍e‰æ–Ê‚©‚çƒAƒbƒvƒ[ƒh‚µ‚Ü‚·B
+‚à‚µ‚­‚Í‚à‚µ‚­‚ÍURL‚ð“ü—Í‚µ‚Ü‚·B
+ƒTƒ€ƒlƒCƒ‹‰æ‘œ‚ðÝ’è‚Å‚«‚Ü‚·BƒTƒCƒ€ƒlƒCƒ‹‰æ‘œ‚̓ŠƒXƒg•\Ž¦Žž‚É—˜—p‚³‚ê‚Ü‚·B
+MP3ƒtƒ@ƒCƒ‹Ä¶Žž‚ɂ̓vƒŒƒCƒ„[•ÇŽ†‚Æ‚µ‚ÄŽg‚í‚ê‚Ü‚·B
+
+URL ‚Å‚Í YouTube ‚Ì“®‰æ‚ðŽw’è‚Å‚«‚Ü‚·B
+YouTube‚̏ꍇ‚Í http://???.youtube.com/watch?v=xxxxxxxxxxx ‚ÌŒ`Ž®‚ÅŽw’肵‚Ä‚­
+‚¾‚³‚¢B
+YouTube‘¤‚ÌŽd—l‚Ɉˑ¶‚·‚é‚Ì‚ÅYouTube‘¤‚ÌŽd—l•ÏX‚ÅŽg‚¦‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+
+ˆê”ʐݒè‚Łu“®‰æ’†‚̃Rƒƒ“ƒg‚ɃAƒoƒ^[‚ð‚‚¯‚év‚ª—LŒø‚É‚È‚Á‚Ä‚¢‚éê‡A
+XOOPS‚̃†[ƒUƒAƒoƒ^[‚ðƒRƒƒ“ƒg‚̐擪‚ɂ‚¯‚Ä•\Ž¦‚µ‚Ü‚·B
+
+ƒXƒyƒVƒƒƒ‹ƒRƒ}ƒ“ƒh‚ª‚ ‚è‚Ü‚·B
+ƒfƒtƒHƒ‹ƒgÝ’è‚ł́ucmd:starvAucmd:star2vAucmd:star3v‚ªŽg‚¦‚Ü‚·B
+‚±‚ê‚ðƒvƒŒƒCƒ„[ƒRƒƒ“ƒg—“‚É“ü—Í‚·‚é‚ƑΉž‚·‚éFLASHiSWFj‚ª•\Ž¦‚³‚ê‚Ü‚·B
+ƒRƒ}ƒ“ƒh–¼AFLASH‚Æ‚àŠÇ—‰æ–ʂ̈ê”ʐݒè‚æ‚è•ÏX‚Å‚«‚Ü‚·B
+‚½‚¾‚µƒhƒƒCƒ“‚ð‚Ü‚½‚¢‚ł̃tƒ@ƒCƒ‹‚̓ǂݍž‚Ý‚É‚ÍFLASH§ŒÀ‚ª“ü‚è‚Ü‚·‚Ì‚Å
+‚²’ˆÓ‚­‚¾‚³‚¢B
+•K—v‚ɉž‚¶‚Ä crossdomain.xml ‚̐ݒè‚ðs‚Á‚Ä‚­‚¾‚³‚¢B
+Ú‚µ‚­‚́ucrossdomain.xmlv‚ÅŒŸõ‚µ‚Ä‚Ý‚Ä‚­‚¾‚³‚¢B
+
+“®‰æ/MP3‚Ƀ^ƒO‚ð•t‚¯‚邱‚Æ‚ª‚Å‚«‚Ü‚·Bƒ^ƒO‚Í•¡”Ý’è‰Â”\‚Å‚·B
+
+
+¡ƒf[ƒ^Œ`Ž®‚ɂ‚¢‚Ä
+
+Flash Video(FLV) ‹y‚ÑMP3ƒtƒ@ƒCƒ‹‚ɑΉž‚µ‚Ü‚·B
+‰æ‘œ‚Í PNGAJPGAGIF ‚̂ݑΉž‚µ‚Ü‚·B
+
+
+¡FAQ
+
+Q.ƒgƒbƒvƒy[ƒW‰E‰º‚́uPowered by Cinemaru Projectv‚͍폜‚µ‚Ä‚¢‚¢‚Å‚·‚©H
+
+A.‚à‚¿‚ë‚ñíœ‚µ‚Ä‚©‚Ü‚¢‚Ü‚¹‚ñB
+
+Q.YouTube ‚̃Šƒ“ƒN‚ªÄ¶‚³‚ê‚Ü‚¹‚ñB
+
+A.php.ini‚Łuallow_url_fopen = Onv‚Æ‚·‚é•K—v‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB
+  WebƒT[ƒo‚̐ݒ莟‘æ‚Å‚·‚ª
+  .htaccess ‚Łuphp_value allow_url_fopen = Onv‚Æ‹Lq‚µ‚Ä—LŒø‚É‚Å‚«‚é‚©‚à
+  ‚µ‚ê‚Ü‚¹‚ñB
+
+Q.ƒTƒCƒY‚ª‘å‚«‚¢ƒtƒ@ƒCƒ‹‚ŃAƒbƒvƒ[ƒhƒGƒ‰[‚É‚È‚è‚Ü‚µ‚½B
+
+A.WebƒT[ƒo‚̐ݒ莟‘æ‚Å‚·‚ª
+  dot.htaccess ƒtƒ@ƒCƒ‹‚ð .htaccess ‚É–¼‘O•ÏX‚·‚邱‚ƂŃAƒbƒvƒ[ƒh‚Ì
+  ãŒÀƒTƒCƒY‚ð•ÏX‚Å‚«‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B
+  ‚Ü‚½AŠÇ—‰æ–Ê‚©‚çcinemaru‚́uˆê”ʐݒèv¨u“®‰æ‚̍őåƒtƒ@ƒCƒ‹ƒTƒCƒYv‚ð
+  ‘å‚«‚¢”Žš‚ðÝ’肵‚Ä‚­‚¾‚³‚¢B
+
+
+¡–Ɛӎ–€
+
+‚±‚̃‚ƒWƒ…[ƒ‹‚Í–³•ÛØ‚Å‚·B
+‚±‚̃‚ƒWƒ…[ƒ‹‚ðŽg—p‚µ‚Ä”­¶‚µ‚½‚¢‚©‚È‚éƒgƒ‰ƒuƒ‹A‚¢‚©‚Ȃ鑹ŠQ‚É‚àƒ‚ƒWƒ…[ƒ‹ì
+ŽÒ‚͐ӔC‚𕉂¢‚Ü‚¹‚ñB
+
+
+¡ŠJ”­ŠÂ‹«E˜A—æ
+
+sourceforege.jp ‚ɊԎ؂肵‚ÄŠJ”­‚µ‚Ä‚¢‚Ü‚·B
+
+ƒvƒƒWƒFƒNƒgƒy[ƒW
+http://cinemaru.net/
+
+ƒoƒO•ñAƒpƒbƒ`‘—•tA”˜A—Aƒlƒ^’ñ‹Ÿ‚ȂǁA‚±‚¿‚ç‚É‚Ç‚¤‚¼B
+
+ÅV”ł̃_ƒEƒ“ƒ[ƒh‚Í‚±‚¿‚ç‚©‚ç
+http://sourceforge.jp/projects/cinemaru/
+
+
+¡’˜ìŒ •\Ž¦
+
+ƒvƒƒOƒ‰ƒ€
+Žž“c³•F BQB04****@nifty*****
+
+“®‰æƒvƒŒƒCƒ„[ƒfƒUƒCƒ“C³
+Yujiro Takahashi <yujir****@rakut*****> http://rakuto.net/
+
+“®‰æƒvƒŒƒCƒ„[ƒAƒCƒRƒ“ Silk icon set 1.3
+Mark James http://www.famfamfam.com/lab/icons/silk/
+  “¯ƒAƒCƒRƒ“‚̓NƒŠƒGƒCƒeƒBƒuƒRƒ‚ƒ“ƒY 2.5 ‚ÉŠî‚¢‚Ä”z•z‚³‚ê‚Ä‚¢‚Ü‚·B
+  Creative Commons Attribution 2.5 License.
+  [ http://creativecommons.org/licenses/by/2.5/ ]
+

Added: tags/1.8/cinemaru/admin/groupperm.php
===================================================================
--- tags/1.8/cinemaru/admin/groupperm.php	                        (rev 0)
+++ tags/1.8/cinemaru/admin/groupperm.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,55 @@
+<?php
+
+require_once( '../../../include/cp_header.php' ) ;
+require_once( 'mygrouppermform.php' ) ;
+
+// for "Duplicatable"
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+if( ! preg_match( '/^(\D+)(\d*)$/' , $mydirname , $regs ) ) echo ( "invalid dirname: " . htmlspecialchars( $mydirname ) ) ;
+$mydirnumber = $regs[2] === '' ? '' : intval( $regs[2] ) ;
+
+require_once( XOOPS_ROOT_PATH."/modules/$mydirname/include/gtickets.php" ) ;
+
+
+if( ! empty( $_POST['submit'] ) ) {
+
+		// Ticket Check
+		if ( ! $xoopsGTicket->check( true , 'myblocksadmin' ) ) {
+				redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
+		}
+
+		include( "mygroupperm.php" ) ;
+		redirect_header( XOOPS_URL."/modules/$mydirname/admin/groupperm.php" , 1 , _AM_CINEMARU_DBUPDATED );
+		exit ;
+}
+
+require_once('../constants.php');
+
+$item_list = array(
+		constant($constpref.'_GROUPPERM_INSERTABLE') => _AM_GPERM_G_INSERTABLE ,
+		constant($constpref.'_GROUPPERM_SUPERINSERT') => _AM_GPERM_G_SUPERINSERT ,
+		constant($constpref.'_GROUPPERM_EDITABLE') => _AM_GPERM_G_EDITABLE ,
+		constant($constpref.'_GROUPPERM_SUPEREDIT') => _AM_GPERM_G_SUPEREDIT ,
+		constant($constpref.'_GROUPPERM_TOUCHOTHERS') => _AM_GPERM_G_TOUCHOTHERS,
+		constant($constpref.'_GROUPPERM_TAGINSERTABLE') => _AM_GPERM_G_TAGINSERTABLE,
+		constant($constpref.'_GROUPPERM_TAGDELETABLE') => _AM_GPERM_G_TAGDELETABLE,
+		constant($constpref.'_GROUPPERM_VALID') => _AM_GPERM_G_VALID,
+		constant($constpref.'_GROUPPERM_DELCOMMENT') => _AM_GPERM_G_DELCOMMENT,
+		constant($constpref.'_GROUPPERM_INSERTCOMMENT') => _AM_GPERM_G_INSERTCOMMENT,
+		constant($constpref.'_GROUPPERM_SHOWCOMMENT') => _AM_GPERM_G_SHOWCOMMENT,
+		constant($constpref.'_GROUPPERM_REPORT') => _AM_GPERM_G_REPORT,
+		constant($constpref.'_GROUPPERM_REPORT_LIST') => _AM_GPERM_G_REPORT_LIST,
+		   
+		) ;
+
+$form = new MyXoopsGroupPermForm( _AM_GROUPPERM , $xoopsModule->mid() , 'cinemaru_global' , _AM_GROUPPERMDESC ) ;
+foreach( $item_list as $item_id => $item_name) {
+		$form->addItem( $item_id , $item_name ) ;
+}
+
+xoops_cp_header();
+include( './mymenu.php' ) ;
+echo $form->render() ;
+xoops_cp_footer();
+
+?>

Added: tags/1.8/cinemaru/admin/index.php
===================================================================
--- tags/1.8/cinemaru/admin/index.php	                        (rev 0)
+++ tags/1.8/cinemaru/admin/index.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,3 @@
+<?php
+
+include 'groupperm.php';

Added: tags/1.8/cinemaru/admin/menu.php
===================================================================
--- tags/1.8/cinemaru/admin/menu.php	                        (rev 0)
+++ tags/1.8/cinemaru/admin/menu.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,8 @@
+<?php
+
+$mydirname = basename( dirname ( dirname (  __FILE__ ) ) ) ;
+$constpref = '_MI_' . strtoupper( $mydirname ) ;
+
+$adminmenu[0]['title'] = constant($constpref . '_ADMENU_GROUPPERM');
+$adminmenu[0]['link'] = "admin/groupperm.php";
+

Added: tags/1.8/cinemaru/admin/mygroupperm.php
===================================================================
--- tags/1.8/cinemaru/admin/mygroupperm.php	                        (rev 0)
+++ tags/1.8/cinemaru/admin/mygroupperm.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,95 @@
+<?php
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+function myDeleteByModule($DB, $gperm_modid, $gperm_name = null, $gperm_itemid = null)
+{
+		$criteria = new CriteriaCompo(new Criteria('gperm_modid', intval($gperm_modid)));
+		if (isset($gperm_name)) {
+				$criteria->add(new Criteria('gperm_name', $gperm_name));
+				if (isset($gperm_itemid)) {
+						$criteria->add(new Criteria('gperm_itemid', intval($gperm_itemid)));
+				}
+		}
+		$sql = "DELETE FROM ".$DB->prefix('group_permission').' '.$criteria->renderWhere();
+		if (!$result = $DB->query($sql)) {
+				return false;
+		}
+		return true;
+}
+
+
+
+// include '../../../include/cp_header.php'; GIJ
+$modid = isset($_POST['modid']) ? intval($_POST['modid']) : 1;
+// we dont want system module permissions to be changed here ( 1 -> 0 GIJ)
+if ($modid <= 0 || !is_object($xoopsUser) || !$xoopsUser->isAdmin($modid)) {
+		redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM);
+		exit();
+}
+$module_handler =& xoops_gethandler('module');
+$module =& $module_handler->get($modid);
+if (!is_object($module) || !$module->getVar('isactive')) {
+		redirect_header(XOOPS_URL.'/admin.php', 1, _MODULENOEXIST);
+		exit();
+}
+$member_handler =& xoops_gethandler('member');
+$group_list = $member_handler->getGroupList();
+if (is_array(@$_POST['perms'])) {
+		$gperm_handler = xoops_gethandler('groupperm');
+		foreach ($_POST['perms'] as $perm_name => $perm_data) {
+				foreach( $perm_data['itemname' ] as $item_id => $item_name ) {
+						// checking code
+						// echo "<pre>" ;
+						// var_dump( $_POST['perms'] ) ;
+						// exit ;
+						if (false != myDeleteByModule($gperm_handler->db,$modid,$perm_name,$item_id)) {
+								if( empty( $perm_data['groups'] ) ) continue ;
+								foreach ($perm_data['groups'] as $group_id => $item_ids) {
+		//								foreach ($item_ids as $item_id => $selected) {
+										$selected = isset( $item_ids[ $item_id ] ) ? $item_ids[ $item_id ] : 0 ;
+										if ($selected == 1) {
+												// make sure that all parent ids are selected as well
+												if ($perm_data['parents'][$item_id] != '') {
+														$parent_ids = explode(':', $perm_data['parents'][$item_id]);
+														foreach ($parent_ids as $pid) {
+																if ($pid != 0 && !in_array($pid, array_keys($item_ids))) {
+																		// one of the parent items were not selected, so skip this item
+																		$msg[] = sprintf(_AM_CINEMARU_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._AM_CINEMARU_PERMADDNGP.')';
+																		continue 2;
+																}
+														}
+												}
+												$gperm =& $gperm_handler->create();
+												$gperm->setVar('gperm_groupid', $group_id);
+												$gperm->setVar('gperm_name', $perm_name);
+												$gperm->setVar('gperm_modid', $modid);
+												$gperm->setVar('gperm_itemid', $item_id);
+												if (!$gperm_handler->insert($gperm)) {
+														$msg[] = sprintf(_AM_CINEMARU_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
+												} else {
+														$msg[] = sprintf(_AM_CINEMARU_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
+												}
+												unset($gperm);
+										}
+								}
+						} else {
+								$msg[] = sprintf(_AM_CINEMARU_PERMRESETNG, $module->getVar('name'));
+						}
+				}
+		}
+}
+/*
+$backlink = XOOPS_URL.'/admin.php';
+if ($module->getVar('hasadmin')) {
+		$adminindex = $module->getInfo('adminindex');
+		if ($adminindex) {
+				$backlink = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$adminindex;
+		}
+}
+
+$msg[] = '<br /><br /><a href="'.$backlink.'">'._BACK.'</a>';
+xoops_cp_header();
+xoops_result($msg);
+xoops_cp_footer();  GIJ */
+?>

Added: tags/1.8/cinemaru/admin/mygrouppermform.php
===================================================================
--- tags/1.8/cinemaru/admin/mygrouppermform.php	                        (rev 0)
+++ tags/1.8/cinemaru/admin/mygrouppermform.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,378 @@
+<?php
+// $Id: grouppermform.php,v 1.4 2003/09/29 18:25:27 okazu Exp $
+//  ------------------------------------------------------------------------ //
+//                XOOPS - PHP Content Management System                      //
+//                    Copyright (c) 2000-2003 XOOPS.org                           //
+//                       <http://www.xoops.org/>                             //
+//  ------------------------------------------------------------------------ //
+//  This program is free software; you can redistribute it and/or modify     //
+//  it under the terms of the GNU General Public License as published by     //
+//  the Free Software Foundation; either version 2 of the License, or        //
+//  (at your option) any later version.                                      //
+//                                                                           //
+//  You may not change or alter any portion of this comment or credits       //
+//  of supporting developers from this source code or any supporting         //
+//  source code which is considered copyrighted (c) material of the          //
+//  original comment or credit authors.                                      //
+//                                                                           //
+//  This program is distributed in the hope that it will be useful,          //
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
+//  GNU General Public License for more details.                             //
+//                                                                           //
+//  You should have received a copy of the GNU General Public License        //
+//  along with this program; if not, write to the Free Software              //
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
+//  ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu)                                          //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project                                                //
+// ------------------------------------------------------------------------- //
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php';
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php';
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php';
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php';
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php';
+
+/**
+ * Renders a form for setting module specific group permissions
+ * 
+ * @author		Kazumi Ono		<onoka****@myweb*****>
+ * @copyright		copyright (c) 2000-2003 XOOPS.org
+ * 
+ * @package     kernel
+ * @subpackage  form
+ */
+class MyXoopsGroupPermForm extends XoopsForm
+{
+
+		/**
+		 * Module ID
+		 * @var int
+		 */
+		var $_modid;
+		/**
+		 * Tree structure of items
+		 * @var array
+		 */
+		var $_itemTree = array() ;
+		/**
+		 * Name of permission
+		 * @var string
+		 */
+		var $_permName;
+		/**
+		 * Description of permission
+		 * @var string
+		 */
+		var $_permDesc;
+		/**
+		 * Appendix
+		 * @var array ('permname'=>,'itemid'=>,'itemname'=>,'selected'=>)
+		 */
+		var $_appendix = array() ;
+
+		/**
+		 * Constructor
+		 */
+		function MyXoopsGroupPermForm($title, $modid, $permname, $permdesc)
+		{
+//				$this->XoopsForm($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); GIJ
+				$this->XoopsForm($title, 'groupperm_form', '' , 'post');
+				$this->_modid = intval($modid);
+				$this->_permName = $permname;
+				$this->_permDesc = $permdesc;
+				$this->addElement(new XoopsFormHidden('modid', $this->_modid));
+		}
+
+		/**
+		 * Adds an item to which permission will be assigned
+		 *
+		 * @param string $itemName
+		 * @param int $itemId
+		 * @param int $itemParent
+		 * @access public
+		 */
+		function addItem($itemId, $itemName, $itemParent = 0)
+		{
+				$this->_itemTree[$itemParent]['children'][] = $itemId;
+				$this->_itemTree[$itemId]['parent'] = $itemParent;
+				$this->_itemTree[$itemId]['name'] = $itemName;
+				$this->_itemTree[$itemId]['id'] = $itemId;
+		}
+
+		/**
+		 * Add appendix
+		 *
+		 * @access public
+		 */
+		function addAppendix($permName,$itemId,$itemName)
+		{
+				$this->_appendix[] = array('permname'=>$permName,'itemid'=>$itemId,'itemname'=>$itemName,'selected'=>false);
+		}
+
+		/**
+		 * Loads all child ids for an item to be used in javascript
+		 *
+		 * @param int $itemId
+		 * @param array $childIds
+		 * @access private
+		 */
+		function _loadAllChildItemIds($itemId, &$childIds)
+		{
+				if (!empty($this->_itemTree[$itemId]['children'])) {
+						$first_child = $this->_itemTree[$itemId]['children'];
+						foreach ($first_child as $fcid) {
+								array_push($childIds, $fcid);
+								if (!empty($this->_itemTree[$fcid]['children'])) {
+										foreach ($this->_itemTree[$fcid]['children'] as $_fcid) {
+												array_push($childIds, $_fcid);
+												$this->_loadAllChildItemIds($_fcid, $childIds);
+										}
+								}
+						}
+				}
+		}
+
+		/**
+		 * Renders the form
+		 *
+		 * @return string
+		 * @access public
+		 */
+		function render()
+		{
+				global $xoopsGTicket ;
+		
+				// load all child ids for javascript codes
+				foreach (array_keys($this->_itemTree) as $item_id) {
+						$this->_itemTree[$item_id]['allchild'] = array();
+						$this->_loadAllChildItemIds($item_id, $this->_itemTree[$item_id]['allchild']);
+				}
+				$gperm_handler =& xoops_gethandler('groupperm');
+				$member_handler =& xoops_gethandler('member');
+				$glist = $member_handler->getGroupList();
+				foreach (array_keys($glist) as $i) {
+						// get selected item id(s) for each group
+						$selected = $gperm_handler->getItemIds($this->_permName, $i, $this->_modid);
+						$ele = new MyXoopsGroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected);
+						$ele->setOptionTree($this->_itemTree);
+
+						foreach( $this->_appendix as $key => $append ) {
+								$this->_appendix[$key]['selected'] = $gperm_handler->checkRight($append['permname'], $append['itemid'], $i, $this->_modid ) ;
+						}
+						$ele->setAppendix($this->_appendix);
+						$this->addElement($ele);
+						unset($ele);
+				}
+
+				// GIJ start
+				$jstray = new XoopsFormElementTray(' &nbsp; ');
+				$jsuncheckbutton = new XoopsFormButton('', 'none', _NONE, 'button');
+				$jsuncheckbutton->setExtra( "onclick=\"with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].type=='checkbox'){elements[i].checked=false;}}}\"" ) ;
+				$jscheckbutton = new XoopsFormButton('', 'all', _ALL, 'button');
+				$jscheckbutton->setExtra( "onclick=\"with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].type=='checkbox' && (elements[i].name.indexOf('module_admin')<0 || elements[i].name.indexOf('[groups][1]')>=0)){elements[i].checked=true;}}}\"" ) ;
+				$jstray->addElement( $jsuncheckbutton ) ;
+				$jstray->addElement( $jscheckbutton ) ;
+				$this->addElement($jstray);
+				// GIJ end
+
+				$tray = new XoopsFormElementTray('');
+				$tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
+				$tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+				$this->addElement($tray);
+
+				$ret = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br />';
+				$ret .= "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table width='100%' class='outer' cellspacing='1'>\n";
+				$elements =& $this->getElements();
+				foreach(array_keys($elements) as $i) {
+						if (!is_object($elements[$i])) {
+								$ret .= $elements[$i];
+						} elseif (!$elements[$i]->isHidden()) {
+								$ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption();
+								if ($elements[$i]->getDescription() != '') {
+										$ret .= '<br /><br /><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>';
+								}
+								$ret .= "</td>\n<td class='even'>\n".$elements[$i]->render()."\n</td></tr>\n";
+						} else {
+								$ret .= $elements[$i]->render();
+						}
+				}
+				$ret .= "</table>".$xoopsGTicket->getTicketHtml(__LINE__ , 1800 , 'myblocksadmin' )."</form>";
+				return $ret;
+		}
+}
+
+/**
+ * Renders checkbox options for a group permission form
+ * 
+ * @author		Kazumi Ono		<onoka****@myweb*****>
+ * @copyright		copyright (c) 2000-2003 XOOPS.org
+ * 
+ * @package     kernel
+ * @subpackage  form
+ */
+class MyXoopsGroupFormCheckBox extends XoopsFormElement
+{
+
+		/**
+		 * Pre-selected value(s)
+		 * @var array;
+		 */
+		var $_value;
+		/**
+		 * Group ID
+		 * @var int
+		 */
+		var $_groupId;
+		/**
+		 * Option tree
+		 * @var array
+		 */
+		var $_optionTree;
+		/**
+		 * Appendix
+		 * @var array ('permname'=>,'itemid'=>,'itemname'=>,'selected'=>)
+		 */
+		var $_appendix = array() ;
+
+		/**
+		 * Constructor
+		 */
+		function MyXoopsGroupFormCheckBox($caption, $name, $groupId, $values = null)
+		{
+				$this->setCaption($caption);
+				$this->setName($name);
+				if (isset($values)) {
+						$this->setValue($values);
+				}
+				$this->_groupId = $groupId;
+		}
+
+		/**
+		 * Sets pre-selected values
+		 *
+		 * @param mixed $value A group ID or an array of group IDs
+		 * @access public
+		 */
+		function setValue($value)
+		{
+				if (is_array($value)) {
+						foreach ($value as $v) {
+								$this->setValue($v);
+						}
+				} else {
+						$this->_value[] = $value;
+				}
+		}
+
+		/**
+		 * Sets the tree structure of items
+		 *
+		 * @param array $optionTree
+		 * @access public
+		 */
+		function setOptionTree(&$optionTree)
+		{
+				$this->_optionTree =& $optionTree;
+		}
+
+		/**
+		 * Sets appendix of checkboxes
+		 *
+		 * @access public
+		 */
+		function setAppendix($appendix)
+		{
+				$this->_appendix = $appendix ;
+		}
+
+		/**
+		 * Renders checkbox options for this group
+		 *
+		 * @return string
+		 * @access public
+		 */
+		function render()
+		{
+				$ret = '' ;
+
+				if( sizeof( $this->_appendix ) > 0 ) {
+						$ret .= '<table class="outer"><tr>';
+						$cols = 1;
+						foreach ($this->_appendix as $append) {
+								if ($cols > 4) {
+										$ret .= '</tr><tr>';
+										$cols = 1;
+								}
+								$checked = $append['selected'] ? 'checked="checked"' : '' ;
+								$name = 'perms['.$append['permname'].']' ;
+								$itemid = $append['itemid'] ;
+								$itemid = $append['itemid'] ;
+								$ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked />{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\" /><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\" /><br /></td>" ;
+								$cols++;
+						}
+						$ret .= '</tr></table>';
+				}
+
+				$ret .= '<table class="outer"><tr>';
+				$cols = 1;
+				if( ! empty( $this->_optionTree[0]['children'] ) ) {
+						foreach ($this->_optionTree[0]['children'] as $topitem) {
+								if ($cols > 4) {
+										$ret .= '</tr><tr>';
+										$cols = 1;
+								}
+								$tree = '<td class="odd">';
+								$prefix = '';
+								$this->_renderOptionTree($tree, $this->_optionTree[$topitem], $prefix);
+								$ret .= $tree.'</td>';
+								$cols++;
+						}
+				}
+				$ret .= '</tr></table>';
+				return $ret;
+		}
+
+		/**
+		 * Renders checkbox options for an item tree
+		 *
+		 * @param string $tree
+		 * @param array $option
+		 * @param string $prefix
+		 * @param array $parentIds
+		 * @access private
+		 */
+		function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
+		{
+				$tree .= $prefix."<input type=\"checkbox\" name=\"".$this->getName()."[groups][".$this->_groupId."][".$option['id']."]\" id=\"".$this->getName()."[groups][".$this->_groupId."][".$option['id']."]\" onclick=\"";
+				// If there are parent elements, add javascript that will
+				// make them selecteded when this element is checked to make
+				// sure permissions to parent items are added as well.
+				foreach ($parentIds as $pid) {
+						$parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']';
+						$tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if(ele.checked != true) {ele.checked = this.checked;}";
+				}
+				// If there are child elements, add javascript that will
+				// make them unchecked when this element is unchecked to make
+				// sure permissions to child items are not added when there
+				// is no permission to this item.
+				foreach ($option['allchild'] as $cid) {
+						$child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']';
+						$tree .= "var ele = xoopsGetElementById('".$child_ele."'); if(this.checked != true) {ele.checked = false;}";
+				}
+				$tree .= '" value="1"';
+				if ( isset( $this->_value ) && in_array($option['id'], $this->_value)) {
+						$tree .= ' checked="checked"';
+				}
+				$tree .= " />".$option['name']."<input type=\"hidden\" name=\"".$this->getName()."[parents][".$option['id']."]\" value=\"".implode(':', $parentIds)."\" /><input type=\"hidden\" name=\"".$this->getName()."[itemname][".$option['id']."]\" value=\"".htmlspecialchars($option['name'])."\" /><br />\n";
+				if( isset( $option['children'] ) ) foreach ($option['children'] as $child) {
+						array_push($parentIds, $option['id']);
+						$this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix.'&nbsp;-', $parentIds);
+				}
+		}
+}
+?>
\ No newline at end of file

Added: tags/1.8/cinemaru/admin/mymenu.php
===================================================================
--- tags/1.8/cinemaru/admin/mymenu.php	                        (rev 0)
+++ tags/1.8/cinemaru/admin/mymenu.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,103 @@
+<?php
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+if( empty( $mydirname ) ) $mydirname = basename(dirname(dirname(__FILE__))) ;
+
+if( ! defined( 'XOOPS_ORETEKI' ) ) {
+		// Skip for ORETEKI XOOPS
+
+		if( ! isset( $module ) || ! is_object( $module ) ) $module = $xoopsModule ;
+		else if( ! is_object( $xoopsModule ) ) die( '$xoopsModule is not set' )  ;
+
+		if( file_exists("../language/".$xoopsConfig['language']."/modinfo.php") ) {
+				include_once("../language/".$xoopsConfig['language']."/modinfo.php");
+		} else {
+				include_once("../language/english/modinfo.php");
+		}
+
+		include( './menu.php' ) ;
+
+//		array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => '../system/admin.php?fct=preferences&op=showmod&mod=' . $module->getvar('mid') ) ) ;
+		$menuitem_dirname = $module->getvar('dirname') ;
+
+		if( 0 && defined( 'XOOPS_TRUST_PATH' ) ) {
+
+				// with XOOPS_TRUST_PATH and altsys
+
+				if( file_exists( XOOPS_TRUST_PATH.'/libs/altsys/mytplsadmin.php' ) ) {
+						// mytplsadmin (TODO check if this module has tplfile)
+						$title = defined( '_MD_A_MYMENU_MYTPLSADMIN' ) ? _MD_A_MYMENU_MYTPLSADMIN : 'tplsadmin' ;
+						array_push( $adminmenu , array( 'title' => $title , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mytplsadmin' ) ) ;
+				}
+
+				if( file_exists( XOOPS_TRUST_PATH.'/libs/altsys/myblocksadmin.php' ) ) {
+						// myblocksadmin
+						$title = defined( '_MD_A_MYMENU_MYBLOCKSADMIN' ) ? _MD_A_MYMENU_MYBLOCKSADMIN : 'blocksadmin' ;
+						array_push( $adminmenu , array( 'title' => $title , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' ) ) ;
+				}
+
+				// preferences
+				$config_handler =& xoops_gethandler('config');
+				if( count( $config_handler->getConfigs( new Criteria( 'conf_modid' , $module->mid() ) ) ) > 0 ) {
+						if( file_exists( XOOPS_TRUST_PATH.'/libs/altsys/mypreferences.php' ) ) {
+								// mypreferences
+								$title = defined( '_MD_A_MYMENU_MYPREFERENCES' ) ? _MD_A_MYMENU_MYPREFERENCES : _PREFERENCES ;
+								array_push( $adminmenu , array( 'title' => $title , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences' ) ) ;
+						} else if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+								// Cube Legacy without altsys
+								array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $module->getvar('mid') ) ) ;
+						} else {
+								// system->preferences
+								array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$module->mid() ) ) ;
+						}
+				}
+
+		} else if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+				// Cube Legacy without altsys
+				if( $module->getvar('hasconfig') ) array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $module->getvar('mid') ) ) ;
+		} else {
+				// conventinal X2
+				if( $module->getvar('hasconfig') ) array_push( $adminmenu , array( 'title' => _PREFERENCES , 'link' => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getvar('mid') ) ) ;
+		}
+
+		$mymenu_uri = empty( $mymenu_fake_uri ) ? $_SERVER['REQUEST_URI'] : $mymenu_fake_uri ;
+		$mymenu_link = substr( strstr( $mymenu_uri , '/admin/' ) , 1 ) ;
+
+		// hilight
+		foreach( array_keys( $adminmenu ) as $i ) {
+				if( $mymenu_link == $adminmenu[$i]['link'] ) {
+						$adminmenu[$i]['color'] = '#FFCCCC' ;
+						$adminmenu_hilighted = true ;
+						$GLOBALS['altsysAdminPageTitle'] = $adminmenu[$i]['title'] ;
+				} else {
+						$adminmenu[$i]['color'] = '#DDDDDD' ;
+				}
+		}
+		if( empty( $adminmenu_hilighted ) ) {
+				foreach( array_keys( $adminmenu ) as $i ) {
+						if( stristr( $mymenu_uri , $adminmenu[$i]['link'] ) ) {
+								$adminmenu[$i]['color'] = '#FFCCCC' ;
+								$GLOBALS['altsysAdminPageTitle'] = $adminmenu[$i]['title'] ;
+								break ;
+						}
+				}
+		}
+
+		// link conversion from relative to absolute
+		foreach( array_keys( $adminmenu ) as $i ) {
+				if( stristr( $adminmenu[$i]['link'] , XOOPS_URL ) === false ) {
+						$adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/" . $adminmenu[$i]['link'] ;
+				}
+		}
+
+		// display
+		echo "<div style='text-align:left;width:98%;'>" ;
+		foreach( $adminmenu as $menuitem ) {
+				echo "<div style='float:left;height:1.5em;'><nobr><a href='".htmlspecialchars($menuitem['link'],ENT_QUOTES)."' style='background-color:{$menuitem['color']};font:normal normal bold 9pt/12pt;'>".htmlspecialchars($menuitem['title'],ENT_QUOTES)."</a> | </nobr></div>\n" ;
+		}
+		echo "</div>\n<hr style='clear:left;display:block;' />\n" ;
+
+}
+
+?>

Added: tags/1.8/cinemaru/blocks/cinemaru_block_hottag.php
===================================================================
--- tags/1.8/cinemaru/blocks/cinemaru_block_hottag.php	                        (rev 0)
+++ tags/1.8/cinemaru/blocks/cinemaru_block_hottag.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,54 @@
+<?php
+//--------------------------------------------------------------------------------
+// descript : Block of Hot TAG functions
+// function : b_cinemaru_block_hottag, b_cinemaru_block_hottag_edit
+// args     : $options: block option
+// author   : asben @ bookmark
+// date     : 2009/1/31
+// Reference keyword: block_of_hottag
+//--------------------------------------------------------------------------------
+if (! defined('__CINEMARU_BLOCK_HOTTAG_PHP__')) {
+
+define('__CINEMARU_BLOCK_HOTTAG_PHP__', 1);
+
+function b_cinemaru_block_hottag( $options )
+{
+    global $xoopsTpl;
+    global $xoopsConfig;
+
+    if (count($options) < 3 || $options[0] == '') {
+		$options = array('cinemaru', 'counter', 20);
+    }
+
+    $mydirname_cinemaru = $options[0];
+    //return array();
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname_cinemaru . '/include/db.php');
+     require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname_cinemaru . '/include/misc.php');
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname_cinemaru . '/constants.php');
+
+    $constpref = strtoupper( $mydirname_cinemaru ) ;
+    $xoopsTpl->assign('mydirname', $mydirname_cinemaru);
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname_cinemaru . '/language/' . $xoopsConfig['language']. '/main.php');
+
+	$tag_list = cinemaru_get_tag($mydirname_cinemaru, $options[2]);
+	// Reference keyword: tagcloud_size_set by asben
+	$tag_list = cinemaru_tagcloud_size_set($tag_list);
+	$xoopsTpl->assign('block_hot_taglist', $tag_list);
+    return $tag_list;
+}
+
+function b_cinemaru_block_hottag_edit($options)
+{
+    if (count($options) < 3 || $options[0] == '' || $options[0] == 'counter') {
+		$options = array('cinemaru', 'counter', 20);
+    }
+
+    $form  = '<input type="hidden" name="options[]" value="' . $options[0] . "\">\n";
+    $form .= '<input type="hidden" name="options[]" value="' . $options[1] . "\">\n";
+    $form .= "&nbsp;"._MB_CINEMARU_DISP."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />\n";
+    $form .= "&nbsp;"._MB_CINEMARU_ARTCLS."";
+    
+    return $form;
+}
+
+}
\ No newline at end of file

Added: tags/1.8/cinemaru/blocks/cinemaru_block_random.php
===================================================================
--- tags/1.8/cinemaru/blocks/cinemaru_block_random.php	                        (rev 0)
+++ tags/1.8/cinemaru/blocks/cinemaru_block_random.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,64 @@
+<?php
+
+if (! defined('__CINEMARU_BLOCK_RANDOM_PHP__')) {
+
+define('__CINEMARU_BLOCK_RANDOM_PHP__', 1);
+
+function b_cinemaru_block_random( $options )
+{
+    
+    global $xoopsTpl;
+    global $xoopsConfig;
+    
+    if (empty($options[0])) {
+	$mydirname_cinemaru = 'cinemaru';
+    } else {
+	$mydirname_cinemaru = $options[0];
+    }
+    $GLOBALS['mydirname'] = $mydirname_cinemaru;
+
+	$constpref = strtoupper($mydirname_cinemaru);
+
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname_cinemaru . '/include/db.php');
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname_cinemaru . '/include/misc.php');
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname_cinemaru . '/constants.php');
+    
+    
+    $constpref = strtoupper( $mydirname_cinemaru ) ;
+	$xoopsTpl->assign('file_type', constant($constpref.'_FORM_FILE_TYPE_YOUTUBE_URL'));
+
+    $xoopsTpl->assign('mydirname', $mydirname_cinemaru);
+    
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname_cinemaru . '/language/' . $xoopsConfig['language']. '/main.php');
+    
+    $arr = cinemaru_movie_get_min_max();
+
+    for ($i=0; $i < 20; $i++) {
+	$id = rand($arr['min'], $arr['max']);
+
+	$movie = cinemaru_movie_get_one($id);
+	if ($movie && $movie['valid']) {
+
+	    if (constant($constpref.'_THUMB_TITLE_LENGTH') < strlen($movie['title'])) {
+		$movie['title_trunc'] = cinemaru_mb_truncate($movie['title'], constant($constpref.'_THUMB_TITLE_LENGTH')) . '...';
+	    } else {
+		$movie['title_trunc'] = $movie['title'];
+	    }
+
+		// asben @ bookmark 2009/01/23------
+        $myts =& MyTextSanitizer::getInstance();
+	    if (constant($constpref.'_THUMB_DESC_LENGTH') < strlen($movie['desc'])) {
+		$movie['desc_trunc'] = cinemaru_mb_truncate($myts->displayTarea($movie['desc'], 0, 0, 1, 1, 0 ), constant($constpref.'_THUMB_DESC_LENGTH')) . '...';
+	    } else {
+		$movie['desc_trunc'] = $myts->displayTarea($movie['desc'], 0, 1, 1, 1, 0 );
+	    }
+	    //--------------------------------
+        $xoopsTpl->assign('cinemaru_block_randam', $movie);
+	    return $movie;
+	}
+    }
+   
+    return array();
+}
+
+}

Added: tags/1.8/cinemaru/blocks/cinemaru_block_thumb.php
===================================================================
--- tags/1.8/cinemaru/blocks/cinemaru_block_thumb.php	                        (rev 0)
+++ tags/1.8/cinemaru/blocks/cinemaru_block_thumb.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,63 @@
+<?php
+
+if (! defined('__CINEMARU_BLOCK_THUMB_PHP__')) {
+
+define('__CINEMARU_BLOCK_THUMB_PHP__', 1);
+
+function b_cinemaru_block_thumb($options)
+{
+    global $xoopsTpl;
+    global $xoopsConfig;
+    
+    if (count($options) < 5 || $options[0] == '') {
+	$options = array('cinemaru', 'counter', 10, 'sort', 1);
+    }
+    
+    $mydirname = $options[0];
+    $GLOBALS['mydirname'] = $mydirname;
+    
+	$constpref = strtoupper($mydirname);
+	$xoopsTpl->assign('file_type', constant($constpref.'_FORM_FILE_TYPE_YOUTUBE_URL'));
+
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/db.php');
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/misc.php');
+    require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $xoopsConfig['language']. '/main.php');
+
+    $movie_list = cinemaru_movie_get_list($options[2], 1, $options[4]);
+    $movie_list = cinemaru_movie_truncate($movie_list);
+    $xoopsTpl->assign('mydirname', $mydirname);
+    $xoopsTpl->assign($mydirname . '_movie_list', $movie_list);
+    $xoopsTpl->assign('movie_list', $movie_list);
+
+    return array(1);
+}
+
+function b_cinemaru_block_thumb_edit($options)
+{
+    if (count($options) < 5 || $options[0] == '' || $options[0] == 'counter') {
+	$options = array('cinemaru', 'counter', 10, 'sort', 1);
+    }
+    
+    $form = '<input type="hidden" name="options[]" value="' . $options[0] . "\">\n";
+    $form .= '<input type="hidden" name="options[]" value="' . $options[1] . "\">\n";
+    $form .= "&nbsp;"._MB_CINEMARU_DISP."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />\n";
+    $form .= "&nbsp;"._MB_CINEMARU_ARTCLS."";
+    $form .= "&nbsp;<br>";
+    $form .= "&nbsp;"._MB_CINEMARU_SORT."&nbsp;\n";
+    $form .= '<input type="hidden" name="options[]" value="' . $options[3] . '">' . "\n";
+    $form .= "<select name='options[]'>\n"; 
+    $form .= "<option value='1' " . (@$options[4]==1 ? 'SELECTED' : '') . ">" . _MB_CINEMARU_SORT_1 . "\n";
+    $form .= "<option value='2' " . (@$options[4]==2 ? 'SELECTED' : '') . ">" . _MB_CINEMARU_SORT_2 . "\n";
+    $form .= "<option value='3' " . (@$options[4]==3 ? 'SELECTED' : '') . ">" . _MB_CINEMARU_SORT_3 . "\n";
+    $form .= "<option value='4' " . (@$options[4]==4 ? 'SELECTED' : '') . ">" . _MB_CINEMARU_SORT_4 . "\n";
+    $form .= "<option value='5' " . (@$options[4]==5 ? 'SELECTED' : '') . ">" . _MB_CINEMARU_SORT_5 . "\n";
+    $form .= "<option value='6' " . (@$options[4]==6 ? 'SELECTED' : '') . ">" . _MB_CINEMARU_SORT_6 . "\n";
+    $form .= "<option value='7' " . (@$options[4]==7 ? 'SELECTED' : '') . ">" . _MB_CINEMARU_SORT_7 . "\n";
+    $form .= "<option value='8' " . (@$options[4]==8 ? 'SELECTED' : '') . ">" . _MB_CINEMARU_SORT_8 . "\n";
+    $form .= "</select>\n";
+    $form .= "&nbsp;<br>";
+    
+    return $form;
+}
+
+}
\ No newline at end of file

Added: tags/1.8/cinemaru/constants.php
===================================================================
--- tags/1.8/cinemaru/constants.php	                        (rev 0)
+++ tags/1.8/cinemaru/constants.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,38 @@
+<?php
+
+//if (defined('__CINEMARU_CONSTANTS_PHP__')) {
+//    return;
+//}
+//define('__CINEMARU_CONSTANTS_PHP__', 1);
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$constpref = strtoupper( $mydirname ) ;
+
+define($constpref.'_GROUPPERM_INSERTABLE', 1);
+define($constpref.'_GROUPPERM_SUPERINSERT', 2);
+define($constpref.'_GROUPPERM_EDITABLE', 4);
+define($constpref.'_GROUPPERM_SUPEREDIT', 8);
+define($constpref.'_GROUPPERM_SUPERDELETE', 32);
+define($constpref.'_GROUPPERM_TOUCHOTHERS', 64);
+define($constpref.'_GROUPPERM_TAGINSERTABLE', 128);
+define($constpref.'_GROUPPERM_TAGEDITABLE', 256);
+define($constpref.'_GROUPPERM_TAGDELETABLE', 512);
+define($constpref.'_GROUPPERM_VALID', 1024);
+define($constpref.'_GROUPPERM_DELCOMMENT', 2048);
+define($constpref.'_GROUPPERM_INSERTCOMMENT', 4096);
+define($constpref.'_GROUPPERM_SHOWCOMMENT', 8192);
+define($constpref.'_GROUPPERM_REPORT', 16384);
+define($constpref.'_GROUPPERM_REPORT_LIST', 32768);
+
+define($constpref.'_THUMB_TITLE_LENGTH', 20);
+define($constpref.'_THUMB_DESC_LENGTH', 30);
+
+define($constpref.'_FORM_FILE_TYPE_FLV_MP3', 1);
+define($constpref.'_FORM_FILE_TYPE_FILE_URL', 2);
+define($constpref.'_FORM_FILE_TYPE_YOUTUBE_URL', 3);
+
+define($constpref.'_FORM_FILE_TYPE_IMAGE', 3);
+define($constpref.'_FORM_FILE_TYPE_IMAGE_URL', 4);
+
+
+

Added: tags/1.8/cinemaru/dot.htaccess
===================================================================
--- tags/1.8/cinemaru/dot.htaccess	                        (rev 0)
+++ tags/1.8/cinemaru/dot.htaccess	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,5 @@
+
+php_value post_max_size 50M
+php_value upload_max_filesize 50M
+
+

Added: tags/1.8/cinemaru/flash/player.zip
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/flash/player.zip
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/flash/star1.fla
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/flash/star1.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/flash/star1.swf
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/flash/star1.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/flash/star2.fla
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/flash/star2.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/flash/star2.swf
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/flash/star2.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/flash/star3.fla
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/flash/star3.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/flash/star3.swf
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/flash/star3.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/get_youtube_flv_url.php
===================================================================
--- tags/1.8/cinemaru/get_youtube_flv_url.php	                        (rev 0)
+++ tags/1.8/cinemaru/get_youtube_flv_url.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,15 @@
+<?php
+
+include 'header.php';
+
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+require_once('include/url.php');
+
+if (preg_match('/v=(.+)&?/', $_GET['url'], $r) || preg_match('/([A-Z]+)/i', $_GET['url'], $r)) {
+    print cinemaru_get_youtube_flv_url('http://www.youtube.com/watch?v=' . addslashes($r[1]));
+}
+exit();
+

Added: tags/1.8/cinemaru/header.php
===================================================================
--- tags/1.8/cinemaru/header.php	                        (rev 0)
+++ tags/1.8/cinemaru/header.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,28 @@
+<?php
+//  ------------------------------------------------------------------------ //
+//                XOOPS - PHP Content Management System                      //
+//                    Copyright (c) 2000 XOOPS.org                           //
+//                       <http://www.xoops.org/>                             //
+//  ------------------------------------------------------------------------ //
+//  This program is free software; you can redistribute it and/or modify     //
+//  it under the terms of the GNU General Public License as published by     //
+//  the Free Software Foundation; either version 2 of the License, or        //
+//  (at your option) any later version.                                      //
+//                                                                           //
+//  You may not change or alter any portion of this comment or credits       //
+//  of supporting developers from this source code or any supporting         //
+//  source code which is considered copyrighted (c) material of the          //
+//  original comment or credit authors.                                      //
+//                                                                           //
+//  This program is distributed in the hope that it will be useful,          //
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
+//  GNU General Public License for more details.                             //
+//                                                                           //
+//  You should have received a copy of the GNU General Public License        //
+//  along with this program; if not, write to the Free Software              //
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
+//  ------------------------------------------------------------------------ //
+include "../../mainfile.php";
+
+?>

Added: tags/1.8/cinemaru/images/bg_02.gif
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/images/bg_02.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/images/index.html
===================================================================
--- tags/1.8/cinemaru/images/index.html	                        (rev 0)
+++ tags/1.8/cinemaru/images/index.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file

Added: tags/1.8/cinemaru/images/list.png
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/images/list.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/images/no_image.png
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/images/no_image.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/images/no_img_y.gif
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/images/no_img_y.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/images/thumb.png
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/images/thumb.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/include/db.php
===================================================================
--- tags/1.8/cinemaru/include/db.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/db.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,736 @@
+<?php
+
+if (! defined('__CINEMARU_DB_PHP__')) {
+
+define('__CINEMARU_DB_PHP__', 1);
+
+function cinemaru_movie_add($randam_code, $valid)
+{
+    global $xoopsDB;
+    global $mydirname;
+      
+    $sql = "INSERT INTO " . $xoopsDB->prefix($mydirname . '_movie');
+    $sql .= " ( ";
+    $sql .= " title, `file`, image_file, file_size, randam_code, `desc`, ";
+    $sql .= " genre, `valid`, owner, reg_time, reg_user ";
+    $sql .= " ) VALUES ( ";
+    $sql .= "'" . mysql_real_escape_string($_REQUEST['title']) . "', ";
+    $sql .= "'', ";
+    $sql .= "'', ";
+    $sql .= intval(@$_FILES['file']['size']) . ", ";
+    $sql .= "'" . mysql_real_escape_string($randam_code) . "', ";
+    $sql .= "'" . mysql_real_escape_string($_REQUEST['desc']) . "', ";
+    $sql .= "0, ";
+    $sql .= intval($valid) . ", ";
+    $sql .= intval(@$_SESSION['xoopsUserId']) . ", ";
+    $sql .= intval(time()) . ", ";
+    $sql .= intval(@$_SESSION['xoopsUserId']);
+    $sql .= " ) ";
+    
+    $xoopsDB->queryF($sql);
+
+    return $xoopsDB->getInsertId();
+}
+
+function cinemaru_movie_file_name_update($id, $randam_code, $movie_ext='', $image_ext='', $file_url='', $image_file_url='', $file_type=0)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $f = $id . '_' . $randam_code;
+      
+    $sql = 'UPDATE ' . $xoopsDB->prefix($mydirname . '_movie') . ' SET ';
+    $sql .= " `file` = '" . mysql_real_escape_string($f . '.flv') . "' ";
+    if ($movie_ext != '') {
+	$sql .= ", `file` = '" . mysql_real_escape_string($f . '.' . $movie_ext) . "' ";
+    }
+    if ($image_ext != '') {
+	$sql .= ", `image_file` = '" . mysql_real_escape_string($f . '.' . $image_ext) . "' ";
+    }
+    if ($file_url != '') {
+	$sql .= ", `file_url` = '" . mysql_real_escape_string($file_url) . "' ";
+    }
+    if ($image_file_url != '') {
+	$sql .= ", `image_file_url` = '" . mysql_real_escape_string($image_file_url) . "' ";
+    }
+    if (0 < $file_type) {
+	$sql .= ", `file_type` = " . intval($file_type);
+    }
+    $sql .= ' WHERE id = ' . intval($id);
+	      
+    $xoopsDB->queryF($sql);
+}
+
+function cinemaru_movie_valid_update($id, $valid)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'UPDATE ' . $xoopsDB->prefix($mydirname . '_movie') . ' SET ';
+    $sql .= " `valid` = " . intval($valid);
+    $sql .= ' WHERE id = ' . intval($id);
+	      
+    $xoopsDB->queryF($sql);
+
+    return $xoopsDB->getInsertId();
+}
+
+function cinemaru_movie_get_one($id)
+{
+    global $xoopsDB;
+    global $mydirname;
+      
+    $sql = "SELECT * FROM " . $xoopsDB->prefix($mydirname . '_movie');
+    $sql .= " WHERE id = " . intval($id) . ' LIMIT 1';
+
+    $result = $xoopsDB->query($sql);
+    
+    return $xoopsDB->fetchArray($result);
+}
+
+function cinemaru_movie_get_min_max()
+{
+    global $xoopsDB;
+    global $mydirname;
+      
+    $sql = "SELECT MIN(id) AS min, MAX(id) AS max FROM " . $xoopsDB->prefix($mydirname . '_movie');
+    
+    $result = $xoopsDB->query($sql);
+    
+    return $xoopsDB->fetchArray($result);
+}
+
+function cinemaru_comment_add($movie_id, $comment, $comment_time, $owner)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'INSERT INTO ' . $xoopsDB->prefix($mydirname . '_comment');
+    $sql .= ' ( ';
+    $sql .= '`movie_id`, `comment`, `comment_time`, `reg_time`, `reg_user`) VALUES ( ';
+    $sql .= intval($movie_id) . ',';
+    $sql .= "'" . mysql_real_escape_string($comment) . "', ";
+    $sql .= intval($comment_time) . ',';
+    $sql .= time() . ', ';
+    $sql .= intval($owner) . ' ';
+    $sql .= ' ) ';
+
+    $result = $xoopsDB->queryF($sql);
+}
+
+function cinemaru_comment_delete($comment_id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'DELETE FROM ' . $xoopsDB->prefix($mydirname . '_comment');
+    $sql .= ' WHERE id = ' . intval($comment_id);
+
+    $result = $xoopsDB->queryF($sql);
+}
+
+function cinemaru_comment_get($movie_id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT * FROM ' . $xoopsDB->prefix($mydirname . '_comment');
+    $sql .= ' WHERE `movie_id` = ' . intval($movie_id);
+    $sql .= ' ORDER BY reg_time DESC LIMIT 0, 100';
+
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+	$list[] = $row;
+    }
+    
+    return $list;
+}
+
+function cinemaru_comment_get_custom($offset=0, $limit=100, $id=0)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT id, movie_id, comment, comment_time, reg_time, mod_time, reg_user, mod_user FROM ' . $xoopsDB->prefix($mydirname. '_comment');
+    if ($id) {
+	$sql .= ' WHERE movie_id = ' . intval($id);
+    }
+    $sql .= ' ORDER BY reg_time DESC ';
+    $sql .= ' LIMIT ' . intval($offset) . ', ' . intval($limit);
+
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+	$t = intval($row['comment_time'] / 1000);
+	$hour = $t / 3600;
+	$min = $t / 60;
+	$sec = $t % 60;
+	$row['comment_time_f'] = sprintf('%02d:%02d:%02d', $hour, $min, $sec);
+	$list[] = $row;
+    }
+    
+    return $list;
+}
+
+function cinemaru_comment_get_count($id=0)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT count(id) AS cnt FROM ' . $xoopsDB->prefix($mydirname . '_comment');
+    if ($id) {
+	$sql .= ' WHERE `movie_id` = ' . intval($id);
+    }
+
+    $result = $xoopsDB->query($sql);
+    $row = $xoopsDB->fetchArray($result);
+
+    return intval(@$row['cnt']);
+}
+
+function cinemaru_movie_get_list($length=100, $valid=1, $sort=1)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT * FROM ' . $xoopsDB->prefix($mydirname . '_movie');
+    if ($valid) {
+	$sql .= ' WHERE `valid` = ' . intval($valid);
+    }
+    $sql .= ' ORDER BY ';
+    if ($sort == 1) {
+	$sql .= ' reg_time DESC ';
+    } else if ($sort == 2) {
+	$sql .= ' reg_time ';
+    } else if ($sort == 3) {
+	$sql .= ' counter DESC ';
+    } else if ($sort == 4) {
+	$sql .= ' counter ';
+    } else if ($sort == 5) {
+	$sql .= ' comment_up_time DESC ';
+    } else if ($sort == 6) {
+	$sql .= ' comment_up_time ';
+    } else if ($sort == 7) {
+	$sql .= ' comment DESC ';
+    } else if ($sort == 8) {
+	$sql .= ' comment ';
+    } else {
+	$sql .= ' comment_up_time DESC ';
+    }
+    
+    $sql .= ' LIMIT ' . intval($length);
+
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+	$list[] = $row;
+    }
+    
+    return $list;
+}
+
+function cinemaru_movie_get_count($auth_admin=0, $valid=0)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT count(id) AS cnt FROM ' . $xoopsDB->prefix($mydirname . '_movie');
+    if ($auth_admin == 1) {
+	if ($valid) {
+	    $sql .= ' WHERE `valid` = 0 ';
+	}
+    } else {
+	$sql .= ' WHERE `valid` = 1 ';
+    }
+
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    $row = $xoopsDB->fetchArray($result);
+
+    return intval(@$row['cnt']);
+}
+
+function cinemaru_movie_get_count_with_tag($tags_id, $auth_admin=0, $valid=0)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT count(m.id) AS cnt FROM ' . $xoopsDB->prefix($mydirname . '_movie') . ' AS m, ';
+    $sql .= $xoopsDB->prefix($mydirname . '_tag_movie') . ' AS tm ';
+    $sql .= ' WHERE tm.movie_id = m.id AND tm.tags_id = ' . intval($tags_id);
+    if ($auth_admin == 1) {
+	if ($valid) {
+	    $sql .= ' AND `valid` = 0 ';
+	}
+    } else {
+	$sql .= ' AND `valid` = 1 ';
+    }
+
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    $row = $xoopsDB->fetchArray($result);
+
+    return intval(@$row['cnt']);
+}
+
+function cinemaru_movie_get_list_custom($offset, $limit, $auth_admin=0, $valid=0, $sort=0)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT * FROM ' . $xoopsDB->prefix($mydirname . '_movie');
+    if ($auth_admin == 1) {
+	if ($valid) {
+	    $sql .= ' WHERE `valid` = 0 ';
+	}
+    } else {
+	$sql .= ' WHERE `valid` = 1 ';
+    }
+    $sql .= ' ORDER BY ';
+    if (@$sort == 0) {
+	$sql .= ' comment_up_time DESC, counter DESC ';
+    } else if (@$sort == 1) {
+	$sql .= ' reg_time DESC, comment_up_time DESC, counter DESC ';
+    } else if (@$sort == 2) {
+	$sql .= ' reg_time, comment_up_time DESC, counter DESC ';
+    } else if (@$sort == 3) {
+	$sql .= ' counter DESC, comment_up_time DESC ';
+    } else if (@$sort == 4) {
+	$sql .= ' counter, comment_up_time DESC ';
+    }
+    $sql .= ' LIMIT ' . intval($offset) . ', ' . intval($limit);
+
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+	$list[] = $row;
+    }
+    
+    return $list;
+}
+
+function cinemaru_movie_get_list_custom_with_tag($offset, $limit, $tags_id, $auth_admin=0, $valid=0, $sort=0)
+{
+    global $xoopsDB;
+    global $mydirname;
+
+    $columns = array(
+		     'id', 'title', 'file', 'image_file', 'image_file_url', 'total_time', 'file_type',
+		     'file_size', 'randam_code', 'desc', 'genre', 'valid', 'owner',
+		     'counter', 'comment', 'comment_up_time', 'reg_time',
+		     'mod_time', 'reg_user', 'mod_user'
+		     );
+    $c = array();
+    foreach ($columns as $val) {
+	$c[] = 'm.' . $val;
+    }
+    $c2 = join(', ', $c);
+    
+    $sql = 'SELECT  ' . $c2 . ' FROM ' . $xoopsDB->prefix($mydirname . '_movie') . ' AS m, ';
+    $sql .= $xoopsDB->prefix($mydirname . '_tag_movie') . ' AS tm ';
+    $sql .= ' WHERE tm.movie_id = m.id AND tm.tags_id = ' . intval($tags_id);
+    if ($auth_admin == 1) {
+	if ($valid) {
+	    $sql .= ' AND m.valid = 0 ';
+	}
+    } else {
+	$sql .= ' AND m.valid = 1 ';
+    }
+    $sql .= ' ORDER BY ';
+    if (@$sort == 0) {
+	$sql .= ' comment_up_time DESC, counter DESC ';
+    } else if (@$sort == 1) {
+	$sql .= ' m.reg_time DESC, comment_up_time DESC, counter DESC ';
+    } else if (@$sort == 2) {
+	$sql .= ' m.reg_time, comment_up_time DESC, counter DESC ';
+    } else if (@$sort == 3) {
+	$sql .= ' counter DESC, comment_up_time DESC ';
+    } else if (@$sort == 4) {
+	$sql .= ' counter, comment_up_time DESC ';
+    }
+    $sql .= ' LIMIT ' . intval($offset) . ', ' . intval($limit);
+    
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+	$list[] = $row;
+    }
+    
+    return $list;
+}
+
+function cinemaru_movie_counter_up($id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'UPDATE ' . $xoopsDB->prefix($mydirname . '_movie') . ' SET ';
+    $sql .= " `counter` = `counter` + 1 ";
+    $sql .= ' WHERE id = ' . intval($id);
+	      
+    $xoopsDB->queryF($sql);
+}
+
+function cinemaru_movie_comment_up($id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'UPDATE ' . $xoopsDB->prefix($mydirname . '_movie') . ' SET ';
+    $sql .= " `comment` = `comment` + 1, ";
+    $sql .= " `comment_up_time` = " . time() . " ";
+    $sql .= ' WHERE id = ' . intval($id);
+	      
+    $xoopsDB->queryF($sql);
+}
+
+function cinemaru_movie_title_desc_update($id, $title, $desc, $tag_lock, $file='', $image='', $valid=0, $file_url='', $image_file_url='', $file_type=0)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'UPDATE ' . $xoopsDB->prefix($mydirname . '_movie') . ' SET ';
+    $sql .= " `title` = '" . mysql_real_escape_string($title) . "', ";
+    $sql .= " `desc` = '" . mysql_real_escape_string($desc) . "', ";
+    $sql .= " `valid` = '" . intval($valid) . "', ";
+    $sql .= " `tag_lock` = '" . intval($tag_lock) . "', ";
+    $sql .= " `mod_time` = '" . intval(time()) . "', ";
+    $sql .= " `mod_user` = '" . intval(@$_SESSION['xoopsUserId']) . "' ";
+    if ($file != '') {
+	$sql .= ", `file` = '" . mysql_real_escape_string($file) . "' ";
+    }
+    if ($image != '') {
+	$sql .= ", `image_file` = '" . mysql_real_escape_string($image) . "' ";
+    }
+    if ($file_url != '') {
+	$sql .= ", `file_url` = '" . mysql_real_escape_string($file_url) . "' ";
+    }
+    if ($image_file_url != '') {
+	$sql .= ", `image_file_url` = '" . mysql_real_escape_string($image_file_url) . "' ";
+    }
+    if (0 < $file_type) {
+	$sql .= ", `file_type` = " . intval($file_type);
+    }
+    $sql .= ' WHERE id = ' . intval($id);
+
+    $xoopsDB->queryF($sql);
+
+    return $xoopsDB->getInsertId();
+}
+
+function cinemaru_movie_delete($id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'DELETE FROM ' . $xoopsDB->prefix($mydirname . '_movie');
+    $sql .= ' WHERE id = ' . intval($id);
+
+    $xoopsDB->queryF($sql);
+}
+
+function cinemaru_tag_get($movie_id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT t.id AS id, tm.id AS tags_movie_id, tm.tags_id AS tags_id, t.name AS name ';
+    $sql .= 'FROM ' . $xoopsDB->prefix($mydirname . '_tags') . ' AS t, ';
+    $sql .= $xoopsDB->prefix($mydirname . '_tag_movie') . ' AS tm ';
+    $sql .= ' WHERE ';
+    $sql .= 'tm.movie_id = ' . intval($movie_id) . ' AND ';
+    $sql .= 't.id = tm.tags_id ';
+
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+	$list[] = $row;
+    }
+    
+    return $list;
+}
+
+function cinemaru_get_tag_by_name($name)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT id FROM ' . $xoopsDB->prefix($mydirname . '_tags');
+    $sql .= " WHERE name = '" . mysql_real_escape_string($name) . "'";
+    
+    $result = $xoopsDB->query($sql);
+        
+    $row = $xoopsDB->fetchArray($result);
+        
+    if ($row) {
+	return $row['id'];
+    } else {
+	return '';
+    }
+}
+
+function cinemaru_get_tag_movie($movie_id, $tag_id)
+{
+    global $xoopsDB;
+    global $mydirname;
+
+    $sql = 'SELECT id FROM ' . $xoopsDB->prefix($mydirname . '_tag_movie');
+    $sql .= " WHERE tags_id = " . intval($tag_id) . ' AND ';
+    $sql .= ' movie_id = ' . intval($movie_id);
+    
+    $result = $xoopsDB->query($sql);
+        
+    $row = $xoopsDB->fetchArray($result);
+        
+    if ($row) {
+	return $row['id'];
+    } else {
+	return '';
+    }
+}
+
+function cinemaru_add_tag($tag_name, $user_id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $id = cinemaru_get_tag_by_name($tag_name);
+
+    if ($id) {
+	// Šù‚É“o˜^Ï‚Ý
+	return $id;
+    }
+        
+    $sql = 'INSERT INTO ' . $xoopsDB->prefix($mydirname . '_tags');
+    $sql .= ' ( ';
+    $sql .= 'name, reg_time, reg_user ) VALUES ( ';
+    $sql .= "'" . mysql_real_escape_string($tag_name) . "', ";
+    $sql .= time() . ', ';
+    $sql .= intval($user_id) . ' ';
+    $sql .= ' ) ';
+    
+    $result = $xoopsDB->queryF($sql);
+        
+    return mysql_insert_id();
+}
+
+function cinemaru_add_tag_to_movie($movie_id, $tag_name, $user_id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $tag_id = cinemaru_add_tag($tag_name, $user_id);
+
+    if (cinemaru_get_tag_movie($movie_id, $tag_id)) {
+	// Šù‚É“o˜^Ï‚Ý
+	return;
+    }
+        
+    $sql = 'INSERT INTO ' . $xoopsDB->prefix($mydirname . '_tag_movie');
+    $sql .= ' ( ';
+    $sql .= 'tags_id, movie_id, reg_time, reg_user ) VALUES ( ';
+    $sql .= intval($tag_id) . ', ';
+    $sql .= intval($movie_id) . ', ';
+    $sql .= time() . ', ';
+    $sql .= intval($user_id) . ' ';
+    $sql .= ' ) ';
+
+    $result = $xoopsDB->queryF($sql);
+}
+
+function cinemaru_delete_tag_to_movie($id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'DELETE FROM ' . $xoopsDB->prefix($mydirname . '_tag_movie');
+    $sql .= ' WHERE ';
+    $sql .= ' id = ' . intval($id);
+    
+    $result = $xoopsDB->queryF($sql);
+}
+
+function cinemaru_movie_report_add($movie_id, $category, $comment)
+{
+    global $xoopsDB;
+    global $mydirname;
+      
+    $sql = "INSERT INTO " . $xoopsDB->prefix($mydirname . '_report');
+    $sql .= " ( ";
+    $sql .= " movie_id, `category`, comment, ";
+    $sql .= " reg_time, reg_user ";
+    $sql .= " ) VALUES ( ";
+    $sql .= intval($movie_id) . ", ";
+    $sql .= intval($category) . ", ";
+    $sql .= "'" . mysql_real_escape_string($comment) . "', ";
+    $sql .= intval(time()) . ", ";
+    $sql .= intval(@$_SESSION['xoopsUserId']) . " ";
+    $sql .= " ) ";
+
+    $xoopsDB->queryF($sql);
+
+    return $xoopsDB->getInsertId();
+}
+
+function cinemaru_report_get_count()
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT count(id) AS cnt FROM ' . $xoopsDB->prefix($mydirname . '_report');
+    
+    $result = $xoopsDB->query($sql);
+    $row = $xoopsDB->fetchArray($result);
+
+    return intval(@$row['cnt']);
+}
+
+function cinemaru_report_get_custom($offset=0, $limit=100)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'SELECT id, movie_id, category, comment, reg_time, mod_time, reg_user, mod_user FROM ' . $xoopsDB->prefix($mydirname . '_report');
+    $sql .= ' ORDER BY reg_time DESC ';
+    $sql .= ' LIMIT ' . intval($offset) . ', ' . intval($limit);
+
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+	$list[] = $row;
+    }
+    
+    return $list;
+}
+
+function cinemaru_report_delete($report_id)
+{
+    global $xoopsDB;
+    global $mydirname;
+    
+    $sql = 'DELETE FROM ' . $xoopsDB->prefix($mydirname . '_report');
+    $sql .= ' WHERE id = ' . intval($report_id);
+
+    $result = $xoopsDB->queryF($sql);
+}
+
+//--------------------------------------------------------------------------------
+// descript : Acquisition of related movie information
+// function : cinemaru_related_movie_get
+// args     : $iOwn_id: Owner ID
+//            $arrTagsInfo: All owned tag information
+//            $iLimit: The maximum number of displayed related movie
+// return   : Related movie information
+// author   : asben @ bookmark
+// date     : 2009/1/7
+//            2009/1/13
+//            2009/2/22
+// Reference keyword: related_movie_get
+//--------------------------------------------------------------------------------
+function cinemaru_related_movie_get($iOwn_id, $arrTagsInfo, $iLimit) {
+    global $xoopsDB;
+    global $mydirname;
+    
+    $columns = array(
+		     'id', 'title', 'file', 'image_file', 'image_file_url', 'total_time', 'file_type',
+		     'file_size', 'randam_code', 'desc', 'genre', 'valid', 'owner',
+		     'counter', 'comment', 'comment_up_time', 'reg_time',
+		     'mod_time', 'reg_user', 'mod_user', 'image_file_url'
+		     );
+    $c = array();
+    foreach ($columns as $val) {
+		$c[] = 'm.' . $val;
+    }
+
+    $c2 = join(', ', $c);
+    $sql = 'SELECT DISTINCT ' . $c2 . ' FROM ' . $xoopsDB->prefix($mydirname . '_movie') . ' AS m, ';
+    $sql .= $xoopsDB->prefix($mydirname . '_tag_movie') . ' AS tm ';
+    $sql .= ' WHERE tm.movie_id = m.id';
+    $haveTags = array(); // 2009-1-13
+	if(isset($arrTagsInfo)) {
+		foreach( $arrTagsInfo as $val ) {
+		   $haveTags[] = 'tm.tags_id = ' . intval($val['tags_id']);
+		}
+		$sql .= ' AND (' . implode( ' OR ', $haveTags ) . ') ';
+    }
+
+    $sql .= ' AND m.valid = 1';
+    if(isset($iOwn_id)) {
+        $sql .= ' AND m.id <> ' . intval($iOwn_id);
+    }
+
+    $sql .= ' ORDER BY m.reg_time DESC, counter DESC';
+    if(isset($iLimit) && intval($iLimit) > 0) {
+       $sql .= ' LIMIT 0,' . intval($iLimit);
+    }
+
+    $result = $xoopsDB->query($sql);
+    $list = array();
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+		$list[] = $row;
+    }
+    
+    return $list;
+}
+
+// 09.01.31 Correction by asben 
+function cinemaru_get_tag($mydirname_op='',$max=0)
+{
+    global $xoopsDB;
+    global $xoopsModuleConfig;
+
+    if ($mydirname_op == '') {
+		global $mydirname;
+    } else {
+		$mydirname = $mydirname_op;
+    }
+
+	if($max == 0) {
+		$max = $xoopsModuleConfig['num_of_tag_by_taglist'];
+	}
+
+    $sql = 'SELECT ';
+    $sql .= 't.id AS id, t.name AS name, COUNT( m.id ) AS cnt ';
+    $sql .= ' FROM ';
+    $sql .= $xoopsDB->prefix($mydirname . '_movie') . ' AS m, ';
+    $sql .= $xoopsDB->prefix($mydirname . '_tags') . ' AS t, ';
+    $sql .= $xoopsDB->prefix($mydirname . '_tag_movie') . ' AS tm ';
+    $sql .= ' WHERE ';
+    $sql .= ' m.id = tm.movie_id ';
+    $sql .= ' AND t.id = tm.tags_id ';
+    $sql .= ' GROUP BY t.id ';
+    $sql .= ' ORDER BY m.reg_time ';
+    $sql .= ' LIMIT 0 , '. intval($max);
+    
+    $result = $xoopsDB->query($sql);
+    
+    $list = array();
+    
+    while ($row = $arr = $xoopsDB->fetchArray($result)) {
+	$list[] = $row;
+    }
+    
+    return $list;
+}
+
+} // __CINEMARU_DB_PHP__
+

Added: tags/1.8/cinemaru/include/groupperm_function.php
===================================================================
--- tags/1.8/cinemaru/include/groupperm_function.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/groupperm_function.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,28 @@
+<?php
+
+if (defined('__CINEMARU_GROUPPERM_FUNC_PHP__')) {
+    return;
+}
+define('__CINEMARU_GROUPPERM_FUNC_PHP__', 1);
+
+function cinemaru_checkright($perm)
+{
+    global $xoopsUser;
+
+    if (isset($xoopsUser) && is_object($xoopsUser)) {
+		$my_group_ids = $xoopsUser->getGroups();
+    } else {
+		$my_group_ids = array(XOOPS_GROUP_ANONYMOUS); 
+    }
+
+    $basename = basename( dirname( dirname( __FILE__ ) ) ) ;
+    $module_handler =& xoops_gethandler('module');
+    $xoopsModule =& $module_handler->getByDirname($basename);
+    $mid = $xoopsModule->mid();
+    
+    $gperm_handler =& xoops_gethandler( 'groupperm' ) ;
+    
+    return $gperm_handler->checkRight( 'cinemaru_global' , $perm , $my_group_ids , $mid ) ;
+}
+
+

Added: tags/1.8/cinemaru/include/gtickets.php
===================================================================
--- tags/1.8/cinemaru/include/gtickets.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/gtickets.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,314 @@
+<?php
+// GIJOE's Ticket Class (based on Marijuana's Oreteki XOOPS)
+// nobunobu's suggestions are applied
+
+if( ! class_exists( 'XoopsGTicket' ) ) {
+
+class XoopsGTicket {
+
+		var $_errors = array() ;
+		var $_latest_token = '' ;
+		var $messages = array() ;
+
+		function XoopsGTicket()
+		{
+				global $xoopsConfig ;
+
+				// language file
+				if( defined( 'XOOPS_ROOT_PATH' ) && ! empty( $xoopsConfig['language'] ) && ! strstr( $xoopsConfig['language'] , '/' ) ) {
+						if( file_exists( dirname( dirname( __FILE__ ) ) . '/language/' . $xoopsConfig['language'] . '/gticket_messages.phtml' ) ) {
+								include dirname( dirname( __FILE__ ) ) . '/language/' . $xoopsConfig['language'] . '/gticket_messages.phtml' ;
+						}
+				}
+
+				// default messages
+				if( empty( $this->messages ) ) $this->messages = array(
+						'err_general' => 'GTicket Error' ,
+						'err_nostubs' => 'No stubs found' ,
+						'err_noticket' => 'No ticket found' ,
+						'err_nopair' => 'No valid ticket-stub pair found' ,
+						'err_timeout' => 'Time out' ,
+						'err_areaorref' => 'Invalid area or referer' ,
+						'fmt_prompt4repost' => 'error(s) found:<br /><span style="background-color:red;font-weight:bold;color:white;">%s</span><br />Confirm it.<br />And do you want to post again?' ,
+						'btn_repost' => 'repost' ,
+				) ;
+		}
+
+		// render form as plain html
+		function getTicketHtml( $salt = '' , $timeout = 1800 , $area = '' )
+		{
+				return '<input type="hidden" name="XOOPS_G_TICKET" value="'.$this->issue( $salt , $timeout , $area ).'" />' ;
+		}
+
+		// returns an object of XoopsFormHidden including theh ticket
+		function getTicketXoopsForm( $salt = '' , $timeout = 1800 , $area = '' )
+		{
+				return new XoopsFormHidden( 'XOOPS_G_TICKET' , $this->issue( $salt , $timeout , $area ) ) ;
+		}
+
+		// add a ticket as Hidden Element into XoopsForm
+		function addTicketXoopsFormElement( &$form , $salt = '' , $timeout = 1800 , $area = '' )
+		{
+				$form->addElement( new XoopsFormHidden( 'XOOPS_G_TICKET' , $this->issue( $salt , $timeout , $area ) ) ) ;
+		}
+
+		// returns an array for xoops_confirm() ;
+		function getTicketArray( $salt = '' , $timeout = 1800 , $area = '' )
+		{
+				return array( 'XOOPS_G_TICKET' => $this->issue( $salt , $timeout , $area ) ) ;
+		}
+
+		// return GET parameter string.
+		function getTicketParamString( $salt = '' , $noamp = false , $timeout=1800 , $area = '' )
+		{
+		    return ( $noamp ? '' : '&amp;' ) . 'XOOPS_G_TICKET=' . $this->issue( $salt, $timeout , $area ) ;
+		}
+
+		// issue a ticket
+		function issue( $salt = '' , $timeout = 1800 , $area = '' )
+		{
+				global $xoopsModule ;
+		
+				// create a token
+				list( $usec , $sec ) = explode( " " , microtime() ) ;
+				$appendix_salt = empty( $_SERVER['PATH'] ) ? XOOPS_DB_NAME : $_SERVER['PATH'] ;
+				$token = crypt( $salt . $usec . $appendix_salt . $sec ) ;
+				$this->_latest_token = $token ;
+
+				if( empty( $_SESSION['XOOPS_G_STUBS'] ) ) $_SESSION['XOOPS_G_STUBS'] = array() ;
+
+				// limit max stubs 10
+				if( sizeof( $_SESSION['XOOPS_G_STUBS'] ) > 10 ) {
+						$_SESSION['XOOPS_G_STUBS'] = array_slice( $_SESSION['XOOPS_G_STUBS'] , -10 ) ;
+				}
+
+				// record referer if browser send it
+				$referer = empty( $_SERVER['HTTP_REFERER'] ) ? '' : $_SERVER['REQUEST_URI'] ;
+
+				// area as module's dirname
+				if( ! $area && is_object( @$xoopsModule ) ) {
+						$area = $xoopsModule->getVar('dirname') ;
+				}
+
+				// store stub
+				$_SESSION['XOOPS_G_STUBS'][] = array(
+						'expire' => time() + $timeout ,
+						'referer' => $referer ,
+						'area' => $area ,
+						'token' => $token
+				) ;
+
+				// paid md5ed token as a ticket
+				return md5( $token . XOOPS_DB_PREFIX ) ;
+		}
+
+		// check a ticket
+		function check( $post = true , $area = '' , $allow_repost = true )
+		{
+				global $xoopsModule ;
+
+				$this->_errors = array() ;
+
+				// CHECK: stubs are not stored in session
+				if( ! is_array(@$_SESSION['XOOPS_G_STUBS'])) {
+						$this->_errors[] = $this->messages['err_nostubs'] ;
+						$_SESSION['XOOPS_G_STUBS'] = array() ;
+				}
+
+				// get key&val of the ticket from a user's query
+				$ticket = $post ? @$_POST['XOOPS_G_TICKET'] : @$_GET['XOOPS_G_TICKET'] ;
+
+				// CHECK: no tickets found
+				if( empty( $ticket ) ) {
+						$this->_errors[] = $this->messages['err_noticket'] ;
+				}
+
+				// gargage collection & find a right stub
+				$stubs_tmp = $_SESSION['XOOPS_G_STUBS'] ;
+				$_SESSION['XOOPS_G_STUBS'] = array() ;
+				foreach( $stubs_tmp as $stub ) {
+						// default lifetime 30min
+						if( $stub['expire'] >= time() ) {
+								if( md5( $stub['token'] . XOOPS_DB_PREFIX ) === $ticket ) {
+										$found_stub = $stub ;
+								} else {
+										// store the other valid stubs into session
+										$_SESSION['XOOPS_G_STUBS'][] = $stub ;
+								}
+						} else {
+								if( md5( $stub['token'] . XOOPS_DB_PREFIX ) === $ticket ) {
+										// not CSRF but Time-Out
+										$timeout_flag = true ;
+								}
+						}
+				}
+
+				// CHECK: the right stub found or not
+				if( empty( $found_stub ) ) {
+						if( empty( $timeout_flag ) ) $this->_errors[] = $this->messages['err_nopair'] ;
+						else $this->_errors[] = $this->messages['err_timeout'] ;
+				} else {
+
+						// set area if necessary
+						// area as module's dirname
+						if( ! $area && is_object( @$xoopsModule ) ) {
+								$area = $xoopsModule->getVar('dirname') ;
+						}
+
+						// check area or referer
+						if( @$found_stub['area'] == $area ) $area_check = true ;
+						if( ! empty( $found_stub['referer'] ) && strstr( @$_SERVER['HTTP_REFERER'] , $found_stub['referer'] ) ) $referer_check = true ;
+
+						if( empty( $area_check ) && empty( $referer_check ) ) { // loose
+								$this->_errors[] = $this->messages['err_areaorref'] ;
+						}
+				}
+
+				if( ! empty( $this->_errors ) ) {
+						if( $allow_repost ) {
+								// repost form
+								$this->draw_repost_form( $area ) ;
+								exit ;
+						} else {
+								// failed
+								$this->clear() ;
+								return false ;
+						}
+				} else {
+						// all green
+						return true;
+				}
+		}
+
+		// draw form for repost
+		function draw_repost_form( $area = '' )
+		{
+				// Notify which file is broken
+				if( headers_sent() ) {
+						restore_error_handler() ;
+						set_error_handler( 'GTicket_ErrorHandler4FindOutput' ) ;
+						header( 'Dummy: for warning' ) ;
+						restore_error_handler() ;
+						exit ;
+				}
+		
+				error_reporting( 0 ) ;
+				while( ob_get_level() ) ob_end_clean() ;
+
+				$table = '<table>' ;
+				$form = '<form action="?'.htmlspecialchars(@$_SERVER['QUERY_STRING'],ENT_QUOTES).'" method="post" >' ;
+				foreach( $_POST as $key => $val ) {
+						if( $key == 'XOOPS_G_TICKET' ) continue ;
+						if( get_magic_quotes_gpc() ) {
+								$key = stripslashes( $key ) ;
+						}
+						if( is_array( $val ) ) {
+								list( $tmp_table , $tmp_form ) = $this->extract_post_recursive( htmlspecialchars($key,ENT_QUOTES) , $val ) ;
+								$table .= $tmp_table ;
+								$form .= $tmp_form ;
+						} else {
+								if( get_magic_quotes_gpc() ) {
+										$val = stripslashes( $val ) ;
+								}
+								$table .= '<tr><th>'.htmlspecialchars($key,ENT_QUOTES).'</th><td>'.htmlspecialchars($val,ENT_QUOTES).'</td></tr>'."\n" ;
+								$form .= '<input type="hidden" name="'.htmlspecialchars($key,ENT_QUOTES).'" value="'.htmlspecialchars($val,ENT_QUOTES).'" />'."\n" ;
+						}
+				}
+				$table .= '</table>' ;
+				$form .= $this->getTicketHtml(__LINE__,300,$area).'<input type="submit" value="'.$this->messages['btn_repost'].'" /></form>' ;
+
+				echo '<html><head><title>'.$this->messages['err_general'].'</title><style>table,td,th {border:solid black 1px; border-collapse:collapse;}</style></head><body>' . sprintf( $this->messages['fmt_prompt4repost'] , $this->getErrors() ) . $table . $form . '</body></html>' ;
+		}
+
+		function extract_post_recursive( $key_name , $tmp_array ) {
+				$table = '' ;
+				$form = '' ;
+				foreach( $tmp_array as $key => $val ) {
+						if( get_magic_quotes_gpc() ) {
+								$key = stripslashes( $key ) ;
+						}
+						if( is_array( $val ) ) {
+								list( $tmp_table , $tmp_form ) = $this->extract_post_recursive( $key_name.'['.htmlspecialchars($key,ENT_QUOTES).']' , $val ) ;
+								$table .= $tmp_table ;
+								$form .= $tmp_form ;
+						} else {
+								if( get_magic_quotes_gpc() ) {
+										$val = stripslashes( $val ) ;
+								}
+								$table .= '<tr><th>'.$key_name.'['.htmlspecialchars($key,ENT_QUOTES).']</th><td>'.htmlspecialchars($val,ENT_QUOTES).'</td></tr>'."\n" ;
+								$form .= '<input type="hidden" name="'.$key_name.'['.htmlspecialchars($key,ENT_QUOTES).']" value="'.htmlspecialchars($val,ENT_QUOTES).'" />'."\n" ;
+						}
+				}
+				return array( $table , $form ) ;
+		}
+
+
+		// clear all stubs
+		function clear()
+		{
+				$_SESSION['XOOPS_G_STUBS'] = array() ;
+		}
+
+
+		// Ticket Using
+		function using()
+		{
+				if( ! empty( $_SESSION['XOOPS_G_STUBS'] ) ) {
+						return true;
+				} else {
+						return false;
+				}
+		}
+
+
+		// return errors
+		function getErrors( $ashtml = true )
+		{
+				if( $ashtml ) {
+						$ret = '' ;
+						foreach( $this->_errors as $msg ) {
+								$ret .= "$msg<br />\n" ;
+						}
+				} else {
+						$ret = $this->_errors ;
+				}
+				return $ret ;
+		}
+
+// end of class
+}
+
+function GTicket_ErrorHandler4FindOutput($errNo, $errStr, $errFile, $errLine)
+{
+		if( preg_match( '?'.preg_quote(XOOPS_ROOT_PATH).'([^:]+)\:(\d+)?' , $errStr , $regs ) ) {
+				echo "Irregular output! check the file ".htmlspecialchars($regs[1])." line ".htmlspecialchars($regs[2]) ;
+		} else {
+				echo "Irregular output! check language files etc." ;
+		}
+		return ;
+}
+
+// create a instance in global scope
+$GLOBALS['xoopsGTicket'] = new XoopsGTicket() ;
+
+}
+
+if( ! function_exists( 'admin_refcheck' ) ) {
+
+//Admin Referer Check By Marijuana(Rev.011)
+function admin_refcheck($chkref = "") {
+		if( empty( $_SERVER['HTTP_REFERER'] ) ) {
+				return true ;
+		} else {
+				$ref = $_SERVER['HTTP_REFERER'];
+		}
+		$cr = XOOPS_URL;
+		if ( $chkref != "" ) { $cr .= $chkref; }
+		if ( strpos($ref, $cr) !== 0 ) { return false; }
+		return true;
+}
+
+}
+
+
+?>
\ No newline at end of file

Added: tags/1.8/cinemaru/include/index.html
===================================================================
--- tags/1.8/cinemaru/include/index.html	                        (rev 0)
+++ tags/1.8/cinemaru/include/index.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file

Added: tags/1.8/cinemaru/include/misc.php
===================================================================
--- tags/1.8/cinemaru/include/misc.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/misc.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,190 @@
+<?php
+
+if (! defined('__CINEMARU_MISC_PHP__')) {
+
+define('__CINEMARU_MISC_PHP__', 1);
+
+require_once('groupperm_function.php');
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) );
+require_once(XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/constants.php');
+
+function cinemaru_mkdir_p()
+{
+    global $mydirname;
+    
+    if (file_exists(XOOPS_ROOT_PATH . '/uploads/'. $mydirname) == false) {
+	mkdir(XOOPS_ROOT_PATH . '/uploads/' . $mydirname);
+    }
+    
+    if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $mydirname . '/image') == false) {
+	mkdir(XOOPS_ROOT_PATH . '/uploads/' . $mydirname . '/image');
+    }
+    
+    if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $mydirname . '/movie') == false) {
+	mkdir(XOOPS_ROOT_PATH . '/uploads/' . $mydirname . '/movie');
+    }
+}
+
+function cinemaru_get_randam_code()
+{
+    $str = '0123456789';
+    $str .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+    $str .= 'abcdefghijklmnopqrstuvwxyz';
+
+    $ret = '';
+    for ($i=0; $i<8; $i++) {
+	$ret .= substr($str, mt_rand(0, strlen($str)), 1);
+    }
+    
+    return $ret;
+}
+
+function cinemaru_is_auth_perm()
+{
+    global $mydirname;
+    $constpref = strtoupper( $mydirname ) ;
+    
+    $groupperm_valid = cinemaru_checkright(constant($constpref.'_GROUPPERM_VALID'));
+    
+    if ($groupperm_valid) {
+	return true;
+    }
+    
+    if (cinemaru_is_module_admin()) {
+	return true;
+    } else {
+	return false;
+    }
+}
+
+function cinemaru_is_auth_delele_comment()
+{
+    global $mydirname;
+    $constpref = strtoupper( $mydirname ) ;
+    
+    $groupperm_valid = cinemaru_checkright(constant($constpref.'_GROUPPERM_DELCOMMENT'));
+    
+    if ($groupperm_valid) {
+	return true;
+    }
+    
+    if (cinemaru_is_module_admin()) {
+	return true;
+    } else {
+	return false;
+    }
+}
+
+function cinemaru_is_module_admin()
+{
+    global $xoopsUser;
+    global $module_handler;
+    
+    if (! is_object($xoopsUser)) {
+	return false;
+    }
+    
+    $mydirname = basename( dirname( dirname( __FILE__ ) ) );
+    
+    $module =& $module_handler->getByDirname( $mydirname ) ;
+    
+    if( ! is_object( $module ) ) {
+	die( "invalid module dirname:" . htmlspecialchars( $src_dirname ) );
+    }
+    $mid = $module->getvar( 'mid' ) ;
+    
+    return $xoopsUser->isAdmin($mid);
+}
+
+function cinemaru_mb_truncate($str, $len=16)
+{
+    if (function_exists('mb_substr')) {
+	return mb_substr($str, 0, $len);
+    } else {
+	return substr($str, 0, $len);
+    }
+}
+
+function cinemaru_movie_truncate($movie_list)
+{
+    $mydirname = basename( dirname( dirname( __FILE__ ) ) );
+    $constpref = strtoupper( $mydirname ) ;
+    
+    foreach ($movie_list as $key => $val) {
+        if (constant($constpref.'_THUMB_TITLE_LENGTH') < strlen($val['title'])) {
+            $movie_list[$key]['title_trunc'] = cinemaru_mb_truncate($val['title'], constant($constpref.'_THUMB_TITLE_LENGTH')) . '...';
+        } else {
+            $movie_list[$key]['title_trunc'] = $val['title'];
+        }
+
+        $myts =& MyTextSanitizer::getInstance();
+        if (constant($constpref.'_THUMB_DESC_LENGTH') < strlen($val['desc'])) {
+            $movie_list[$key]['desc_trunc'] = cinemaru_mb_truncate($myts->displayTarea($val['desc'], 0, 0, 1, 1, 0 ), constant($constpref.'_THUMB_DESC_LENGTH')) . '...';
+        } else {
+            $movie_list[$key]['desc_trunc'] = $myts->displayTarea($val['desc'], 0, 1, 1, 1, 0 );
+        }
+    }
+    
+    return $movie_list;
+}
+
+function cinemaru_mb_convert_encoding($str, $charcode)
+{
+    if (function_exists('mb_convert_encoding')) {
+	return mb_convert_encoding($str, $charcode, 'auto');
+    } else {
+	return $str;
+    }
+}
+
+//--------------------------------------------------------------------------------
+// descript : The fontsize of tag is set 
+// function : cinemaru_tagcloud_size_set
+// args     : $arrTaginfo: Tag Infomation
+// return   : Related Tag Infomation + font size
+// author   : asben @ bookmark
+// date     : 2009/1/10
+//            2009/1/31
+// Reference keyword: tagcloud_size_set
+//--------------------------------------------------------------------------------
+function cinemaru_tagcloud_size_set($arrTaginfo) {
+	if(!empty($arrTaginfo)) {
+	    foreach($arrTaginfo as $key=>$val) {
+			$counts[$key]=$val['cnt'];
+		}
+		sort($counts, SORT_NUMERIC);
+		$iCount_min = array_shift($counts);
+		$iCount_max = array_pop($counts);
+		if($iCount_min <= 0) {
+			$iCount_min=1;
+		}
+
+		if($iCount_max <= 0) {
+			$iCount_max=1;
+		}
+
+		if($iCount_min == $iCount_max) {
+			$iCalc_range=1;
+		}
+		else {
+			$iCalc_range=$iCount_max-$iCount_min;
+		}
+
+		$plus_arrTaginfo = array();
+		foreach($arrTaginfo as $key=>$val) {
+			$iCount = intval($val['cnt']) <= 0 ? 1 : intval($val['cnt']);
+			$iSize = 10 + 12 * ($iCount - $iCount_min) / $iCalc_range;
+			$plus_arrTaginfo[$key]=$arrTaginfo[$key];
+			$plus_arrTaginfo[$key]['size']=intval($iSize);
+		}
+
+		return $plus_arrTaginfo;
+    }
+    else {
+		return array();
+	}
+}
+
+} // __CINEMARU_MISC_PHP__
+

Added: tags/1.8/cinemaru/include/notification.inc.php
===================================================================
--- tags/1.8/cinemaru/include/notification.inc.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/notification.inc.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,10 @@
+<?php
+
+function cinemaru_notify_iteminfo($category, $item_id)
+{
+    $item['name'] = '';
+    $item['url'] = '';
+    
+    return $item;
+}
+?>

Added: tags/1.8/cinemaru/include/pagenavi.class.php
===================================================================
--- tags/1.8/cinemaru/include/pagenavi.class.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/pagenavi.class.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,100 @@
+<?php
+
+if (! defined('__CINEMARU_PAGENAVI_CLASS_PHP__')) {
+
+define('__CINEMARU_PAGENAVI_CLASS_PHP__', 1);
+
+class PageNavi
+{
+    var $total;
+    var $offset;
+    var $limit;
+    
+    function PageNavi($total, $offset, $limit) {
+	$this->total = $total;
+	$this->offset = $offset;
+	$this->limit = $limit;
+	
+	if ($this->total <= $this->offset) {
+	    $this->offset = 0;
+	}
+	if ($this->total <= $this->limit) {
+	    $this->offset = 0;
+	}
+    }
+    
+    function need_prev_link()
+    {
+	if ($this->offset == 0) {
+	    return false;
+	} else {
+	    return true;
+	}
+    }
+    
+    function need_next_link()
+    {
+	if ($this->total <= $this->offset + $this->limit) {
+	    return false;
+	} else {
+	    return true;
+	}
+    }
+    
+    function get_prev()
+    {
+	if ($this->offset - $this->limit < 0) {
+	    return 0;
+	} else {
+	    return $this->offset - $this->limit;
+	}
+    }
+    
+    function get_next()
+    {
+	if ($this->total < $this->offset + $this->limit) {
+	    return $this->total - $this->limit;
+	} else {
+	    return $this->offset + $this->limit;
+	}
+    }
+    
+    function get_top()
+    {
+	return 0;
+    }
+    
+    function get_last()
+    {
+		if($this->total<$this->limit)
+			return 0;
+		else
+	        return $this->total - $this->limit;
+    }
+    
+    function get_page_list()
+    {
+	if ($this->total <= $this->limit) {
+	    return array();
+	}
+	
+	$num_of_page = intval($this->total / $this->limit);
+	if ($this->total % $this->limit) {
+	    $num_of_page++;
+	}
+	$now_page = intval($this->offset / $this->limit) + 1;
+	$list = array();
+        
+	for ($i=1; $i <= $num_of_page; $i++) {
+	    if ($now_page == $i) {
+		$list[$i] = '--';
+	    } else {
+		$list[$i] = $this->limit * ($i - 1);
+	    }
+	}
+	
+	return $list;
+    }
+}
+
+}

Added: tags/1.8/cinemaru/include/search.inc.php
===================================================================
--- tags/1.8/cinemaru/include/search.inc.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/search.inc.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,59 @@
+<?php
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+eval( '
+      
+function '.$mydirname.'_global_search( $keywords , $andor , $limit , $offset , $uid )
+{
+    return cinemaru_global_search_base( "'.$mydirname.'" , $keywords , $andor , $limit , $offset , $uid ) ;
+}
+
+' ) ;
+
+if( ! function_exists( 'cinemaru_global_search_base' ) ) {
+
+function cinemaru_global_search_base($mydirname, $queryarray, $andor, $limit, $offset, $userid)
+{
+    global $xoopsDB;
+
+    $sql = " SELECT distinct m.id AS id, m.title AS title, m.reg_time AS reg_time, m.reg_user AS reg_user";
+    $sql .= " FROM ";
+    $sql .= $xoopsDB->prefix($mydirname . "_movie") . " AS m LEFT JOIN ";
+    $sql .= $xoopsDB->prefix($mydirname . "_tag_movie") . " AS tm ON tm.movie_id = m.id LEFT JOIN ";
+    $sql .= $xoopsDB->prefix($mydirname . "_tags") . " AS t ON t.id = tm.tags_id ";
+    $sql .= " WHERE ";
+    $sql .= " m.valid = 1 ";
+								       
+    if ( $userid != 0 ) {
+		$sql .= " AND m.reg_user=".intval($userid)." ";
+    }
+							     
+    if ( is_array($queryarray) && $count = count($queryarray) ) {
+		$sql .= " AND ((m.title LIKE '%$queryarray[0]%' OR m.desc LIKE '%$queryarray[0]%' OR t.name LIKE '%$queryarray[0]%')";
+		for($i=1;$i<$count;$i++){
+		    $sql .= " $andor ";
+		    $sql .= "(m.title LIKE '%$queryarray[$i]%' OR m.desc LIKE '%$queryarray[$i]%' OR t.name LIKE '%$queryarray[$i]%')";
+		}
+		$sql .= ") ";
+    }
+    $sql .= "ORDER BY reg_time DESC";
+
+    $result = $xoopsDB->query($sql,$limit,$offset);
+    $ret = array();
+    $i = 0;
+    while($myrow = $xoopsDB->fetchArray($result)){
+		$ret[$i]['link'] = "movie.php?id=".$myrow['id']."";
+		$ret[$i]['title'] = $myrow['title'];
+		$ret[$i]['time'] = $myrow['reg_time'];
+		$ret[$i]['uid'] = $myrow['reg_user'];
+		$i++;
+    }
+    
+    
+     return $ret;
+}
+
+}
+								 
+

Added: tags/1.8/cinemaru/include/url.php
===================================================================
--- tags/1.8/cinemaru/include/url.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/url.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,114 @@
+<?php
+
+/** 成功 */
+define('CINEMARU_GET_URL_OK', 1);
+/** ホスト名が引けなかった */
+define('CINEMARU_GET_URL_UNKNOWN_HOST', 2);
+/* ソケット作成失敗 */
+define('CINEMARU_GET_URL_SOCKET_CREATE_FAILED', 3);
+/* ソケット接続失敗 */
+define('CINEMARU_GET_URL_SOCKET_CONNECT_FAILED', 4);
+/** yotube flv url */
+define('CINEMARU_YOUTUBE_FLV_URL', 'http://jp.youtube.com/get_video?video_id=%s&t=%s');
+
+function cinemaru_get_url($url)
+{
+    $urls = parse_url($url);
+    
+    // Get the port for the WWW service. 
+    $service_port = getservbyname('www', 'tcp');
+    
+    if (@$urls['port'] != '') {
+	$service_port = $urls['port'];
+    }
+    
+    // Get the IP address for the target host. 
+    $address = gethostbyname($urls['host']);
+    
+    if ($urls['host'] == $address && preg_match('/[A-Za-z]/', $urls['host'])) {
+	return array('stat' => CINEMARU_GET_URL_UNKNOWN_HOST);
+    }
+    
+    // Create a TCP/IP socket.
+    $socket = socket_create(AF_INET, SOCK_STREAM, 0);
+    if ($socket < 0) {
+	return array('stat' => CINEMARU_GET_URL_SOCKET_CREATE_FAILED);
+    }
+    
+    $result = socket_connect($socket, $address, $service_port);
+    if ($result < 0) {
+	return array('stat' => CINEMARU_GET_URL_SOCKET_CONNECT_FAILED);
+    }
+    
+    $path = @$urls['path'];
+    if (@$urls['path'] == '') {
+	$path = '/';
+    }
+    
+    if (@$urls['query'] != '') {
+	$path = $path . '?' . $urls['query'];
+    }
+    
+    $in = "GET " . $path . " HTTP/1.0\r\n";
+    $in .= "Host: " . $urls['host'] ."\r\n";
+    $in .= "Connection: Close\r\n\r\n";
+    $out = '';
+    
+    socket_write($socket, $in, strlen ($in));
+    
+    $ret = array();
+    $ret['body'] = '';
+    if ($out = socket_read($socket, 4096)) {
+	$ret['body'] .= $out;
+	if (preg_match('/Location:(.+)\n/', $out, $r)) {
+	    $ret['res'] = $r[1];
+	}
+    }
+    
+    socket_close($socket);
+    
+    $ret['stat'] = CINEMARU_GET_URL_OK;
+    
+    return $ret;
+}
+
+function cinemaru_get_url2($url)
+{
+    $fi = fopen($url, 'r');
+	    
+    $buf = '';
+    while ($tmp=fread($fi, 4096)) {
+	$buf .= $tmp;
+    }
+	    
+    fclose($fi);
+    
+    return $buf;
+}
+
+function cinemaru_get_youtube_flv_url($url)
+{
+    $urls = parse_url($url);
+    if (preg_match('/v=([^&]+)&?/', $url, $r)) {
+	$tmp_url = 'http://www.youtube.com/v/' . $r[1];
+	
+	if (false && function_exists('socket_create')) {
+	    $ret = cinemaru_get_url($tmp_url);
+	    
+	    if (preg_match('/Location:.+&t=(.+)\n/', $ret['body'], $r2)) {
+		return sprintf(CINEMARU_YOUTUBE_FLV_URL, trim($r[1]), trim($r2[1]));
+	    }
+	} else {
+	    $buf = cinemaru_get_url2($url);
+	    
+	    if (preg_match('/"t": "([^"]+)"/', $buf, $r2)) {
+		return sprintf(CINEMARU_YOUTUBE_FLV_URL, trim($r[1]), trim($r2[1]));
+	    }
+	}
+    }
+    
+    return '';
+}
+
+
+

Added: tags/1.8/cinemaru/include/validator.php
===================================================================
--- tags/1.8/cinemaru/include/validator.php	                        (rev 0)
+++ tags/1.8/cinemaru/include/validator.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,80 @@
+<?php
+
+// validate class
+
+define('CINEMARU_TYPE_TEXT', '1');
+define('CINEMARU_TYPE_MAIL', '2');
+define('CINEMARU_TYPE_PASSWORD', '3');
+define('CINEMARU_TYPE_NUMERIC', '4');
+define('CINEMARU_TYPE_FILE_FLV_MP3', '5');
+define('CINEMARU_TYPE_FILE_IMAGE', '6');
+define('CINEMARU_TYPE_URL', '7');
+
+define('CINEMARU_REG_MAIL', '/^[0-9A-Za-z\-_\.]{1,40}\@[0-9A-Za-z\.]{3,40}$/');
+define('CINEMARU_REG_URL', '/^http:\/\/.+$/');
+
+function cinemaru_validator($config)
+{
+    $error = array();
+
+    foreach ($config as $key => $val) {
+	$str = @$_REQUEST[$key];
+	if (@$val['type'] == CINEMARU_TYPE_FILE_FLV_MP3 || @$val['type'] == CINEMARU_TYPE_FILE_IMAGE) {
+	    if (@$val['not_null'] && @$_FILES[$key]['name'] == "") {
+		$error[] = sprintf(_MD_CINEMARU_ERROR_NO_FILE, $val['name']);
+	    } else if (@$val['not_null'] && @$val['type'] == CINEMARU_TYPE_FILE_FLV_MP3 && preg_match('/\.(flv|mp3)$/i', $_FILES[$key]['name']) == false) {
+		$error[] = sprintf(_MD_CINEMARU_ERROR_NO_FLV_FILE, $val['name']);
+	    } else if (@$val['not_null'] && @$val['type'] == CINEMARU_TYPE_FILE_IMAGE && preg_match('/\.(jpg|jpeg|gif|png)$/i', $_FILES[$key]['name']) == false) {
+		$error[] = sprintf(_MD_CINEMARU_ERROR_NO_IMAGE_FILE, $val['name']);
+	    } else {
+		if (@$val['not_null'] && $_FILES[$key]['error'] == UPLOAD_ERR_INI_SIZE) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_UPLOAD_ERR_INI_SIZE, $val['name']);
+		} else if (@$val['not_null'] && $_FILES[$key]['error'] == UPLOAD_ERR_FORM_SIZE) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_UPLOAD_ERR_FORM_SIZE, $val['name']);
+		} else if (@$val['not_null'] && $_FILES[$key]['error'] == UPLOAD_ERR_PARTIAL) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_UPLOAD_ERR_PARTIAL, $val['name']);
+		} else if (@$val['not_null'] && $_FILES[$key]['error'] == UPLOAD_ERR_NO_FILE) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_UPLOAD_ERR_NO_FILE, $val['name']);
+		} else if (defined('UPLOAD_ERR_NO_TMP_DIR') && @$val['not_null'] && @$_FILES[$key]['error'] == UPLOAD_ERR_NO_TMP_DIR) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_UPLOAD_ERR_NO_TMP_DIR, $val['name']);
+		} else if (defined('UPLOAD_ERR_CANT_WRITE') && @$val['not_null'] && @$_FILES[$key]['error'] == UPLOAD_ERR_CANT_WRITE) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_UPLOAD_ERR_CANT_WRITE, $val['name']);
+		} else if (defined('UPLOAD_ERR_EXTENSION') && @$val['not_null'] && $_FILES[$key]['error'] == UPLOAD_ERR_EXTENSION) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_UPLOAD_ERR_EXTENSION, $val['name']);
+		}
+	    }
+	} else {
+	
+	    if (@$val['not_null'] && $str == '') {
+		$error[] = sprintf(_MD_CINEMARU_ERROR_NO_DATA, $val['name']);
+		continue;
+	    }
+	
+	    if (@$val['max'] && @$val['max'] < strlen($str)) {
+		$error[] = sprintf(_MD_CINEMARU_ERROR_SIZE_OVER, $val['name'], $val['max']);
+	    }
+	
+	    if (@$val['min'] &&  strlen($str) < @$val['min']) {
+		$error[] = sprintf(_MD_CINEMARU_ERROR_SIZE_UNDER, $val['name'], $val['min']);
+	    }
+	
+	    if (@$val['type'] == CINEMARU_TYPE_MAIL) {
+		if (preg_match(CINEMARU_REG_MAIL, $str) == false) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_MAIL_NG_FORMAT, $val['name']);
+		}
+	    }
+	
+	    if (@$val['type'] == CINEMARU_TYPE_URL) {
+		if (preg_match(CINEMARU_REG_URL, $str) == false) {
+		    $error[] = sprintf(_MD_CINEMARU_ERROR_URL_NG_FORMAT, $val['name']);
+		}
+	    }
+	
+	    if (@$val['confirm'] && $str != $_REQUEST[$val['confirm']]) {
+		$error[] = sprintf(_MD_CINEMARU_ERROR_CONFIRM_NO_MATCH, $val['name']);
+	    }
+	}
+    }
+    
+    return $error;
+}

Added: tags/1.8/cinemaru/index.php
===================================================================
--- tags/1.8/cinemaru/index.php	                        (rev 0)
+++ tags/1.8/cinemaru/index.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,97 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/pagenavi.class.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$xoopsOption['template_main'] = $mydirname . '_index.html';
+
+$auth_admin = cinemaru_is_auth_perm();
+$delcomment_admin = cinemaru_is_auth_delele_comment();
+
+if ($auth_admin) {
+    if (cinemaru_movie_get_count(1, 1)) {
+	$xoopsTpl->assign('novalid_exists', 1);
+    }
+}
+
+if (isset($_REQUEST['tag'])) {
+    $total = cinemaru_movie_get_count_with_tag($_REQUEST['tag'], $auth_admin, @$_REQUEST['vv']);
+} else {
+    $total = cinemaru_movie_get_count($auth_admin, @$_REQUEST['vv']);
+}
+
+$pn = new PageNavi($total, intval(@$_GET['offset']), $xoopsModuleConfig['num_of_sumb']);
+
+if (isset($_REQUEST['tag'])) {
+    $movie_list = cinemaru_movie_get_list_custom_with_tag($pn->offset, $pn->limit, $_REQUEST['tag'], @$auth_admin, @$_REQUEST['vv'], @$_REQUEST['sort']);
+} else {
+    $movie_list = cinemaru_movie_get_list_custom($pn->offset, $pn->limit, $auth_admin, @$_REQUEST['vv'], @$_REQUEST['sort']);
+}
+$movie_list = cinemaru_movie_truncate($movie_list);
+
+if (isset($_GET['thumb'])) {
+    $xoopsTpl->assign('thumb', '1');
+    setcookie('thumb', 1, 0);
+} else if (isset($_GET['list'])) {
+    setcookie('thumb', 0, '0');
+} else if (@$_COOKIE['thumb'] == 1) {
+    $xoopsTpl->assign('thumb', '1');
+} else if ($xoopsModuleConfig['top_movie'] == 2) {
+    $xoopsTpl->assign('thumb', '1');
+}
+
+$groupperm_showcomment = cinemaru_checkright(constant($constpref.'_GROUPPERM_SHOWCOMMENT'));
+$groupperm_insertable = cinemaru_checkright(constant($constpref.'_GROUPPERM_INSERTABLE'));
+$groupperm_report_list = cinemaru_checkright(constant($constpref.'_GROUPPERM_REPORT_LIST'));
+
+if ($groupperm_report_list) {
+    $check_report_list = cinemaru_report_get_count();
+}
+
+$xoopsTpl->assign('groupperm_insertable', $groupperm_insertable);
+$xoopsTpl->assign('check_report_list', @$check_report_list);
+$xoopsTpl->assign('auth_admin', $auth_admin);
+$xoopsTpl->assign('groupperm_showcomment', $groupperm_showcomment);
+$xoopsTpl->assign('need_prev_link', $pn->need_prev_link());
+$xoopsTpl->assign('need_next_link', $pn->need_next_link());
+$xoopsTpl->assign('prev', $pn->get_prev());
+$xoopsTpl->assign('next', $pn->get_next());
+$xoopsTpl->assign('top', $pn->get_top());
+$xoopsTpl->assign('last', $pn->get_last());
+$xoopsTpl->assign('total', $total);
+$xoopsTpl->assign('cinemaru_module_config', $xoopsModuleConfig);
+$xoopsTpl->assign('file_type', constant($constpref.'_FORM_FILE_TYPE_YOUTUBE_URL'));
+
+$l = $pn->get_page_list();
+
+$xoopsTpl->assign('page_list', $l);
+$xoopsTpl->assign('movie_list', $movie_list);
+
+// PageNavi by asben 09.1.30
+$url_option='';
+$url_option = empty( $_GET['sort'] ) ? '': 'sort='.intval( $_GET['sort'] ) ;
+$url_option = empty( $_GET['list'] ) ? $url_option : $url_option.'&list='.intval( $_GET['list'] );
+$url_option = empty( $_GET['thumb'] ) ? $url_option : $url_option.'&thumb='.intval( $_GET['thumb'] );
+$pos = empty( $_GET['offset'] ) ? 0 : intval( $_GET['offset'] );
+if( $pos >= $total ) $pos = 0;
+if( $total > $xoopsModuleConfig['num_of_sumb'] ) {
+	include_once( XOOPS_ROOT_PATH . '/class/pagenav.php' ) ;
+	$navi = new XoopsPageNav( $total , $xoopsModuleConfig['num_of_sumb'] , $pos , 'offset' , $url_option ) ;
+	$navi_html = $navi->renderNav( 10 ) ;
+	$xoopsTpl->assign( 'navidisp' , true ) ;
+	$xoopsTpl->assign( 'navi_block' , $navi_html ) ;
+} else {
+	$xoopsTpl->assign( 'navidisp' , false ) ;
+}
+
+include XOOPS_ROOT_PATH.'/footer.php';
+

Added: tags/1.8/cinemaru/language/english/admin.php
===================================================================
--- tags/1.8/cinemaru/language/english/admin.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/english/admin.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,33 @@
+<?php
+//%%%%%%        Admin Module Name  Headlines         %%%%%
+
+define( '_AM_CINEMARU_DBUPDATED', "DB Updated" ) ;
+define( '_AM_CINEMARU_PERMADDNG', '');
+define( '_AM_CINEMARU_PERMADDOK', '');
+
+// groupperm
+define("_AM_GROUPPERM","Group Permission");
+
+// Group's Permissions
+define( '_AM_GPERM_G_INSERTABLE' , "Can add" ) ;
+define( '_AM_GPERM_G_SUPERINSERT' , "Super add" ) ;
+define( '_AM_GPERM_G_EDITABLE' , "Can edit" ) ;
+define( '_AM_GPERM_G_SUPEREDIT' , "Super edit" ) ;
+define( '_AM_GPERM_G_DELETABLE' , "Can delete" ) ;
+define( '_AM_GPERM_G_SUPERDELETE' , "Super delete" ) ;
+define( '_AM_GPERM_G_TOUCHOTHERS' , "Can touch others" );
+define( '_AM_GPERM_G_TAGINSERTABLE' , "Can tag add" ) ;
+define( '_AM_GPERM_G_TAGEDITABLE' , "Can tag edit" ) ;
+define( '_AM_GPERM_G_TAGDELETABLE' , "Can tag delete" ) ;
+define( '_AM_GPERM_G_VALID' , 'Movie/MP3 admission' ) ;
+define( '_AM_GPERM_G_DELCOMMENT' , 'Can delete comment' ) ;
+define( '_AM_GPERM_G_INSERTCOMMENT' , 'Can add comment' ) ;
+define( '_AM_GPERM_G_SHOWCOMMENT' , 'Can read comment' ) ;
+define( '_AM_GPERM_G_REPORT' , 'Can repoting' ) ;
+define( '_AM_GPERM_G_REPORT_LIST' , 'Can read report llist' ) ;
+
+define( '_AM_CAT2GROUPDESC' , "Check categories which you allow to access" ) ;
+define( '_AM_GROUPPERMDESC' , "Select permissions that each group is allowed to do<br />If you need this featu
+re, set 'Authorities of users' to Specified in Group's permissions first.<br />The settings of two groups of A
+dministrator and Guest will be ignored." ) ;
+

Added: tags/1.8/cinemaru/language/english/blocks.php
===================================================================
--- tags/1.8/cinemaru/language/english/blocks.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/english/blocks.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,19 @@
+<?php
+
+if (defined('_MB_CINEMARU_DISP')) {
+    return;
+}
+
+define("_MB_CINEMARU_DISP","total:");
+define("_MB_CINEMARU_ARTCLS"," ");
+
+define("_MB_CINEMARU_SORT","Sorting condition:");
+define("_MB_CINEMARU_SORT_1","Date added newly");
+define("_MB_CINEMARU_SORT_2","Date added older");
+define("_MB_CINEMARU_SORT_3","View count meny");
+define("_MB_CINEMARU_SORT_4","View count few");
+define("_MB_CINEMARU_SORT_5","Comment newly");
+define("_MB_CINEMARU_SORT_6","Comment older");
+define("_MB_CINEMARU_SORT_7","Comment meny");
+define("_MB_CINEMARU_SORT_8","Comment few");
+

Added: tags/1.8/cinemaru/language/english/index.html
===================================================================
--- tags/1.8/cinemaru/language/english/index.html	                        (rev 0)
+++ tags/1.8/cinemaru/language/english/index.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file

Added: tags/1.8/cinemaru/language/english/mail_template/global_newpost_notify.tpl
===================================================================
--- tags/1.8/cinemaru/language/english/mail_template/global_newpost_notify.tpl	                        (rev 0)
+++ tags/1.8/cinemaru/language/english/mail_template/global_newpost_notify.tpl	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,22 @@
+Hello {X_UNAME},
+
+A new post has been added in the {X_MODULE} module at our site.
+
+Follow this link to view the post:
+{POST_URL}
+
+-----------
+
+You are receiving this message because you selected to be notified of all new
+posts.
+
+If this is an error or you wish not to receive further such notifications,
+pleas
+e update your subscriptions by visiting the link below: 
+{X_UNSUBSCRIBE_URL}
+
+-----------
+
+{X_SITENAME} ({X_SITEURL}) 
+webmaster
+{X_ADMINMAIL}

Added: tags/1.8/cinemaru/language/english/mail_template/global_update_notify.tpl
===================================================================
--- tags/1.8/cinemaru/language/english/mail_template/global_update_notify.tpl	                        (rev 0)
+++ tags/1.8/cinemaru/language/english/mail_template/global_update_notify.tpl	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,22 @@
+Hello {X_UNAME},
+
+A new post has been updated in the {X_MODULE} module at our site.
+
+Follow this link to view the post:
+{POST_URL}
+
+-----------
+
+You are receiving this message because you selected to be notified of all new
+posts.
+
+If this is an error or you wish not to receive further such notifications,
+pleas
+e update your subscriptions by visiting the link below: 
+{X_UNSUBSCRIBE_URL}
+
+-----------
+
+{X_SITENAME} ({X_SITEURL}) 
+webmaster
+{X_ADMINMAIL}

Added: tags/1.8/cinemaru/language/english/main.php
===================================================================
--- tags/1.8/cinemaru/language/english/main.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/english/main.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,134 @@
+<?php
+
+if (defined('__CINEMARU_MAIN_PHP__')) {
+    return;
+}
+define('__CINEMARU_MAIN_PHP__', 1);
+
+define("_MD_CINEMARU_MOVIE_UPLOAD", "Movie/mp3 upload");
+define("_MD_CINEMARU_TITLE", "title");
+define("_MD_CINEMARU_MOVIE_FILE", "Movie/mp3 file");
+define("_MD_CINEMARU_FLV_ONLY", "FLV or MP3 file");
+define("_MD_CINEMARU_THUMB_FILE", "Thumb image");
+define("_MD_CINEMARU_DESC", "desc");
+define("_MD_CINEMARU_GENRE", "junre");
+define("_MD_CINEMARU_MOVIE_EDIT", "Edit movie");
+define('_MD_CINEMARU_MOVIE_DELETE', 'Delete movie');
+define("_MD_CINEMARU_TAG_LOCK", "Tga lock");
+define("_MD_CINEMARU_TAG_LOCK_DESC", "lock");
+define("_MD_CINEMARU_USER", "User");
+define("_MD_CINEMARU_SUBMIT", "Submit");
+
+define('_MD_CINEMARU_ERROR_NO_DATA', 'Input %s ');
+define('_MD_CINEMARU_ERROR_MAIL_NG_FORMAT', '%s The input is illegal. ');
+define('_MD_CINEMARU_ERROR_URL_NG_FORMAT', '%s The input is illegal. ');
+define('_MD_CINEMARU_ERROR_SIZE_OVER', '%s Please input it within %s characters. ');
+define('_MD_CINEMARU_ERROR_SIZE_UNDER', '%s Please input it by %s characters or more. ');
+define('_MD_CINEMARU_ERROR_CONFIRM_NO_MATCH', '%s No match');
+define('_MD_CINEMARU_ERROR_MAIL_EXISTS', 'mail exists');
+define('_MD_CINEMARU_ERROR_MAIL_NO_EXISTS', 'The mail address was not registered.');
+define('_MD_CINEMARU_ERROR_NO_AUTH', 'The mail address or the password is different.');
+define('_MD_CINEMARU_ERROR_NO_PASSWORD', 'The password is different.');
+define('_MD_CINEMARU_ERROR_NO_IMAGE_FILE', '%s Not image file');
+define('_MD_CINEMARU_ERROR_NO_FLV_FILE', '%s Not flv file');
+define('_MD_CINEMARU_ERROR_NG_FILE_UPLOAD', '%s File upload is illegal');
+define('_MD_CINEMARU_ERROR_NO_FILE', '%s Input file name');
+
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_INI_SIZE', 'File size over(UPLOAD_ERR_INI_SIZE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_FORM_SIZE', 'File size over(UPLOAD_ERR_FORM_SIZE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_PARTIAL', 'Upload error(UPLOAD_ERR_PARTIAL)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_NO_FILE', 'Upload error(UPLOAD_ERR_NO_FILE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_NO_TMP_DIR', 'Upload error(UPLOAD_ERR_NO_TMP_DIR)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_CANT_WRITE', 'Upload error(UPLOAD_ERR_CANT_WRITE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_EXTENSION', 'Upload error(UPLOAD_ERR_EXTENSION)');
+
+define('_MD_CINEMARU_ERROR_NO_TITLE', 'Input title');
+define('_MD_CINEMARU_ERROR_DESC_OVER', 'The explanation is within 1000 characters. ');
+define('_MD_CINEMARU_COUNT', 'Hit');
+define('_MD_CINEMARU_COMMENT', 'comment');
+define('_MD_CINEMARU_EDIT', 'edit');
+define('_MD_CINEMARU_DELETE', 'delete');
+define('_MD_CINEMARU_ADD', 'insert');
+define('_MD_CINEMARU_UPLOAD', 'upload');
+define('_MD_CINEMARU_UPDATE', 'update');
+
+define('_MD_CINEMARU_MOVIE_NOT_FOUND', 'Movie/mp3 not found');
+define('_MD_CINEMARU_UPDATED', 'Updated');
+define('_MD_CINEMARU_DELETED', 'Deleted');
+define('_MD_CINEMARU_THANKSSUBMIT', 'Thanks submit');
+
+define('_MD_CINEMARU_TAG', 'tag');
+define('_MD_CINEMARU_TAG_LIST', 'Tag list');
+define('_MD_CINEMARU_HOT_TAG', 'Popular tag');
+define('_MD_CINEMARU_EDIT_TAG', 'edit tag');
+define('_MD_CINEMARU_END_EDIT_TAG', 'end tag edit');
+
+define('_MD_CINEMARU_NO_REG_AUTH', 'There is no contribution authority. ');
+define('_MD_CINEMARU_NO_DEL_AUTH', 'There is no deletion authority.');
+define('_MD_CINEMARU_NO_EDIT_AUTH', 'There is no edit authority. ');
+define('_MD_CINEMARU_NO_VALID_AUTH', 'There is no approval authority.');
+define('_MD_CINEMARU_NO_REPORT_AUTH', 'There is no report authority.');
+define('_MD_CINEMARU_NO_REPORT_LIST_AUTH', 'There is no report list authority.');
+
+define('_MD_CINEMARU_NEXT', 'next');
+define('_MD_CINEMARU_PREV', 'prev');
+
+define('_MD_CINEMARU_TOTAL', 'total');
+
+define('_MD_CINEMARU_MOVIE_NO_VALID', 'This animation is waiting for approval. ');
+define('_MD_CINEMARU_MOVIE_NO_VALID2', 'Unapproval');
+define('_MD_CINEMARU_MOVIE_NO_VALID3', 'Unapproval');
+define('_MD_CINEMARU_MOVIE_VALID', 'Approval');
+define('_MD_CINEMARU_MOVIE_VALIDED', 'It approved. ');
+define('_MD_CINEMARU_MOVIE_NG_VALIDED', 'Unapproval');
+
+define('_MD_CINEMARU_MOVIE_LIST_NO_VALID', 'Only the unapproval animation is displayed. ');
+define('_MD_CINEMARU_MOVIE_LIST_NO_VALID_EXISTS', 'There is unapproval animation. ');
+define('_MD_CINEMARU_MOVIE_LIST_NORMAL', 'Display usually');
+
+define('_MD_CINEMARU_MOVIE', 'movie');
+define('_MD_CINEMARU_TIME', 'date');
+define('_MD_CINEMARU_ACTION', 'action');
+
+define('_MD_CINEMARU_NO_COMMENT_READ', 'There is no inspection authority. ');
+define('_MD_CINEMARU_NO_DELETE_COMMENT_ADMIN', 'There is no comment deletion authority. ');
+define('_MD_CINEMARU_DELETED_COMMENT', 'The comment was deleted. ');
+define('_MD_CINEMARU_COMMENT_ADMIN', 'Comment management');
+define('_MD_CINEMARU_COMMENT_LIST', 'Comment list');
+define('_MD_CINEMARU_COMMENT_TIME', 'Display time');
+
+define('_MD_CINEMARU_LIST', 'list');
+define('_MD_CINEMARU_THUMB', 'thunbnail');
+
+define('_MD_CINEMARU_WAIT_VALID', 'After it approves, it comes to be able to reproduce movie/MP3. ');
+
+define('_MD_CINEMARU_SORT', 'sort');
+define('_MD_CINEMARU_SORT_NEW', 'new');
+define('_MD_CINEMARU_SORT_OLD', 'old');
+define('_MD_CINEMARU_SORT_HIGH_HIT', 'high hit');
+define('_MD_CINEMARU_SORT_LOW_HIT', 'low hit');
+
+define('_MD_CINEMARU_VIOLATION_REPORT_LIST', 'Violation/NG Link report list');
+define('_MD_CINEMARU_VIOLATION_REPORT', 'Violation/NG Link report');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT', 'Category');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_1', 'NG Link');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_2', 'Illegal up-loading');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_3', 'Sexual expression, Expression of violence');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_4', 'other');
+
+define('_MD_CINEMARU_REPORTED', 'DB Updated');
+define('_MD_CINEMARU_DELETED_REPORT', 'Deleted report');
+define('_MD_CINEMARU_CHECK_REPORT_LIST', 'There is a violation/NG Link report. ');
+
+define('_MD_CINEMARU_FILE_UPLOAD', 'File upload');
+define('_MD_CINEMARU_URL', 'URL');
+define('_MD_CINEMARU_FILE_URL', 'File URL');
+define('_MD_CINEMARU_IMAGE_FILE_UPLOAD', 'Image file upload');
+define('_MD_CINEMARU_IMAGE_FILE_URL', 'Image file URL');
+
+define('_MD_CINEMARU_BLOG_PASTE_TAG', 'Blog paste tag');
+
+define('_MD_CINEMARU_URL_DESC', 'Please input URL to FLV/MP3 file. <br />For YouTube, Please input like http://www.youtube.com/watch?v=xxxxxxxxxxx ');
+
+// Reference keyword: related_movie_get by asben
+define('_MD_CINEMARU_RELATED_MOVIE_TITLE', 'Related Movies');

Added: tags/1.8/cinemaru/language/english/modinfo.php
===================================================================
--- tags/1.8/cinemaru/language/english/modinfo.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/english/modinfo.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,128 @@
+<?php
+
+$mydirname = basename( dirname ( dirname ( dirname( __FILE__ ) ) ) ) ;
+$constpref = '_MI_' . strtoupper( $mydirname ) ;
+  
+define($constpref."_NAME","CINEMARU");
+
+// A brief description of this module
+define($constpref."_DESC","This module is movie/mp3 manager.");
+define($constpref."_MODULE_DESCRIPTION","This module is movie/mp3 manager.");
+
+// Names of admin menu items
+define($constpref."_ADMENU1", "setting");
+define($constpref."_ADMENU_GROUPPERM", "Group permission");
+
+define($constpref."_MOVIE_MAX_SIZE", "Max movie/mp3 length");
+define($constpref."_MOVIE_MAX_DEFAULT", "10485760");
+
+define($constpref."_SUBMIT", "submit");
+
+define($constpref.'_TAG_MAX_SIZE', 'Max number of tag');
+define($constpref.'_TAG_MAX_DEFAULT', 50);
+define($constpref.'_INPUT_TAG', 'Input tag name');
+define($constpref.'_NUM_OF_TAG', 'Number of tag put on one movie.');
+define($constpref.'_NUM_OF_TAG_DEFAULT', 10);
+define($constpref.'_NUM_OF_TAG_BYLIST', 'Number of tag displayed by tag list');
+define($constpref.'_NUM_OF_TAG_BY_TAGLIST_DEFAULT', 100);
+define($constpref.'_TAG_ENCODING', 'tag name charset');
+define($constpref.'_TAG_ENCODING_DEFAULT', 'EUC-JP');
+define($constpref.'_NUM_OF_THUMB', 'Thumbnail number displayed on one screen.');
+define($constpref.'_NUM_OF_THUMB_DEFAULT', '10');
+define($constpref.'_THUMB_BGCOLOR', 'Thumnail background color');
+define($constpref.'_THUMB_BGCOLOR_DESC', '');
+define($constpref.'_THUMB_BGCOLOR_DEFAULT', '');
+
+// Names of blocks for this module (Not all module has blocks)
+define($constpref."_BLOCK_RANDOM", "randam");
+define($constpref."_BLOCK_THUMB", "thumnail");
+define($constpref."_BLOCK_HOTTAG", "hottag");   // 09.01.31 asben
+
+//notify
+
+define($constpref.'_GLOBAL_NOTIFY', 'Module whole');
+define($constpref.'_GLOBAL_NOTIFYDSC', 'The notice option in the whole module');
+
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFY', 'New data');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYCAP', 'It notifies, when there is contribution of a new movie/mp3');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYDSC', 'It notifies, when there is contribution of a new movie/mp3');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE}: New schedule');
+
+define ($constpref.'_GLOBAL_UPDATE_NOTIFY', 'Update data');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYCAP', 'It notifies, when there is contribution of a update movie/mp3');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYDSC', 'It notifies, when there is contribution of a update movie/mp3');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE}: updated schedule');
+
+define($constpref.'_SHOW_USER_ID', 'User ID is put up to the comment in animation. ');
+define($constpref.'_SHOW_USER_ID_DESC', 'User ID is put up before the comment in animation. ');
+define($constpref.'_SHOW_USER_ID_DEFAULT', '0');
+define($constpref.'_SHOW_USER_ID_OK', 'It puts it. ');
+define($constpref.'_SHOW_USER_ID_NG', "It doesn't put it. ");
+
+// name setting
+define($constpref.'_NAME_SETTING', 'Name setting');
+define($constpref.'_SET_NAME', 'login ID');
+define($constpref.'_SET_UNAME', 'user name');
+define($constpref.'_SET_NAME_AND_UNAME', 'login ID + user name');
+define($constpref.'_SET_UNAME_OR_NAME', 'user name or login ID');
+
+// avatar setting
+define($constpref.'_SHOW_AVATAR', 'Vavatar is put up to the comment in animation. ');
+define($constpref.'_SHOW_AVATAR_DEFAULT', '0');
+define($constpref.'_SHOW_AVATAR_OK', 'It puts it. ');
+define($constpref.'_SHOW_AVATAR_NG', "It doesn't put it. ");
+
+define($constpref.'_SHOW_NAME_CLIST', "Enrollee's name is put out to the comment list. ");
+define($constpref.'_SHOW_NAME_CLIST_DEFAULT', '1');
+define($constpref.'_SHOW_NAME_CLIST_OK', "It puts it out. ");
+define($constpref.'_SHOW_NAME_CLIST_NG', "It doesn't put it out. ");
+
+define($constpref.'_GUEST_USER_NAME', 'Guest user name');
+define($constpref.'_GUEST_USER_NAME_DEFAULT', 'GUEST');
+
+define($constpref.'_SHOW_NAME_MOVIE', "Enrollee's name is put out to the reproduction screen. ");
+define($constpref.'_SHOW_NAME_MOVIE_DEFAULT', '1');
+define($constpref.'_SHOW_NAME_MOVIE_OK', "It puts it out. ");
+define($constpref.'_SHOW_NAME_MOVIE_NG', "It doesn't put it out. ");
+
+define($constpref.'_SHOW_REPORT_LINK', 'The report link is put out to the reproduction screen. ');
+define($constpref.'_SHOW_REPORT_LINK_DEFAULT', '1');
+define($constpref.'_SHOW_REPORT_LINK_OK', 'It puts it out. ');
+define($constpref.'_SHOW_REPORT_LINK_NG', "It doesn't put it out. ");
+
+define($constpref.'_SP_RANDOM_OK', 'Random');
+define($constpref.'_SP_RANDOM_NG', 'Not random');
+
+define($constpref.'_SP_COMMAND1', "Special command1");
+define($constpref.'_SP_COMMAND1_DEFAULT', 'star');
+define($constpref.'_SP_COMMAND1_URL', 'Special command1 URL');
+define($constpref.'_SP_COMMAND1_URL_DEFAULT', 'star1.swf');
+define($constpref.'_SP_COMMAND1_RAND', 'Special command1 randam Y');
+define($constpref.'_SP_COMMAND1_RANDOM_DEFAULT', '1');
+
+define($constpref.'_SP_COMMAND2', 'Special command2');
+define($constpref.'_SP_COMMAND2_DEFAULT', 'star2');
+define($constpref.'_SP_COMMAND2_URL', 'Special command2 URL');
+define($constpref.'_SP_COMMAND2_URL_DEFAULT', 'star2.swf');
+define($constpref.'_SP_COMMAND2_RAND', 'Special command2 randam Y');
+define($constpref.'_SP_COMMAND2_RANDOM_DEFAULT', '1');
+
+define($constpref.'_SP_COMMAND3', 'Special command3');
+define($constpref.'_SP_COMMAND3_DEFAULT', 'star3');
+define($constpref.'_SP_COMMAND3_URL', 'Special command3 URL');
+define($constpref.'_SP_COMMAND3_URL_DEFAULT', 'star3.swf');
+define($constpref.'_SP_COMMAND3_RAND', 'Special command3 randam Y');
+define($constpref.'_SP_COMMAND3_RANDOM_DEFAULT', '1');
+
+define($constpref.'_RICHTEXT', 'Richtext setting');
+define($constpref.'_USE_RICHTEXT', 'Use richtext');
+define($constpref.'_USE_PLAINTEXT', 'Use plaintext');
+
+define($constpref.'_BLOG_PASTE', 'Blog paste');
+define($constpref.'_BLOG_PASTE_OK', 'It uses it. ');
+define($constpref.'_BLOG_PASTE_NG', "It doesn't use it. ");
+
+define($constpref.'_TOP_MOVIE', 'Module top style');
+define($constpref.'_TOP_MOVIE_DESC', '');
+define($constpref.'_TOP_MOVIE_LIST', 'list');
+define($constpref.'_TOP_MOVIE_THUMB', 'thumbnail');

Added: tags/1.8/cinemaru/language/index.html
===================================================================
--- tags/1.8/cinemaru/language/index.html	                        (rev 0)
+++ tags/1.8/cinemaru/language/index.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file

Added: tags/1.8/cinemaru/language/ja_utf8/admin.php
===================================================================
--- tags/1.8/cinemaru/language/ja_utf8/admin.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/ja_utf8/admin.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,32 @@
+<?php
+//%%%%%%        Admin Module Name  Headlines         %%%%%
+
+define( '_AM_CINEMARU_DBUPDATED', "更新しました" ) ;
+define( '_AM_CINEMARU_PERMADDNG', '');
+define( '_AM_CINEMARU_PERMADDOK', '');
+
+// groupperm
+define("_AM_GROUPPERM","グループの全体的な権限");
+
+// Group's Permissions
+define( '_AM_GPERM_G_INSERTABLE' , "新規登録" ) ;
+define( '_AM_GPERM_G_SUPERINSERT' , "登録の承認不要" ) ;
+define( '_AM_GPERM_G_EDITABLE' , "変更" ) ;
+define( '_AM_GPERM_G_SUPEREDIT' , "変更の承認不要" ) ;
+define( '_AM_GPERM_G_DELETABLE' , "削除" ) ;
+define( '_AM_GPERM_G_SUPERDELETE' , "承認不要の削除" ) ;
+define( '_AM_GPERM_G_TOUCHOTHERS' , "他人の動画情報の変更・削除" ) ;
+define( '_AM_GPERM_G_TAGINSERTABLE' , "タグ追加" ) ;
+define( '_AM_GPERM_G_TAGEDITABLE' , "タグ変更" ) ;
+define( '_AM_GPERM_G_TAGDELETABLE' , "タグ削除" ) ;
+define( '_AM_GPERM_G_VALID' , '動画承認' ) ;
+define( '_AM_GPERM_G_DELCOMMENT' , 'コメント削除' ) ;
+define( '_AM_GPERM_G_INSERTCOMMENT' , 'コメント追加' ) ;
+define( '_AM_GPERM_G_SHOWCOMMENT' , 'コメント表示' ) ;
+define( '_AM_GPERM_G_REPORT' , '違反報告できる権限' ) ;
+define( '_AM_GPERM_G_REPORT_LIST' , '違反報告リスト閲覧権限' ) ;
+
+define( '_AM_CAT2GROUPDESC' , "各グループについて、アクセス可能なカテゴリーへチェックを入れて下さい" ) ;
+define( '_AM_GROUPPERMDESC' , "グループ毎にスケジュールについての権限を設定できます<br />この機能を利用するためには、一般設定において、ユーザー権限を、「グループ毎に設定する」を選択する必要があります<br />なお、管理者グループの権限をここで設定しても意味がありません" ) ;
+
+

Added: tags/1.8/cinemaru/language/ja_utf8/blocks.php
===================================================================
--- tags/1.8/cinemaru/language/ja_utf8/blocks.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/ja_utf8/blocks.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,19 @@
+<?php
+
+if (defined('_MB_CINEMARU_DISP')) {
+    return;
+}
+
+define("_MB_CINEMARU_DISP","表示件数:");
+define("_MB_CINEMARU_ARTCLS","件");
+
+define("_MB_CINEMARU_SORT","ソート条件:");
+define("_MB_CINEMARU_SORT_1","登録日時が新しい");
+define("_MB_CINEMARU_SORT_2","登録日時が古い");
+define("_MB_CINEMARU_SORT_3","再生数が多い");
+define("_MB_CINEMARU_SORT_4","再生数が少ない");
+define("_MB_CINEMARU_SORT_5","コメントが新しい");
+define("_MB_CINEMARU_SORT_6","コメントが古い");
+define("_MB_CINEMARU_SORT_7","コメントが多い");
+define("_MB_CINEMARU_SORT_8","コメントが少ない");
+

Added: tags/1.8/cinemaru/language/ja_utf8/index.html
===================================================================
--- tags/1.8/cinemaru/language/ja_utf8/index.html	                        (rev 0)
+++ tags/1.8/cinemaru/language/ja_utf8/index.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file

Added: tags/1.8/cinemaru/language/ja_utf8/mail_template/global_newpost_notify.tpl
===================================================================
--- tags/1.8/cinemaru/language/ja_utf8/mail_template/global_newpost_notify.tpl	                        (rev 0)
+++ tags/1.8/cinemaru/language/ja_utf8/mail_template/global_newpost_notify.tpl	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,20 @@
+{X_UNAME}さん、こんにちは
+
+{X_MODULE}モジュールにおいて登録がありました。
+
+この投稿を見るには下記URLにアクセスしてください:
+{POST_URL}
+{POST_NAME}
+
+-----------
+
+このメールはXOOPSの自動通知機能によって送信されています
+
+自動通知を停止したい場合は下記のURLにアクセスしてください:
+{X_UNSUBSCRIBE_URL}
+
+-----------
+{X_SITENAME} ({X_SITEURL}) 
+管理人
+{X_ADMINMAIL}
+-----------

Added: tags/1.8/cinemaru/language/ja_utf8/mail_template/global_update_notify.tpl
===================================================================
--- tags/1.8/cinemaru/language/ja_utf8/mail_template/global_update_notify.tpl	                        (rev 0)
+++ tags/1.8/cinemaru/language/ja_utf8/mail_template/global_update_notify.tpl	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,20 @@
+{X_UNAME}さん、こんにちは
+
+{X_MODULE}モジュールにおいて登録がありました。
+
+この投稿を見るには下記URLにアクセスしてください:
+{POST_URL}
+{POST_NAME}
+
+-----------
+
+このメールはXOOPSの自動通知機能によって送信されています
+
+自動通知を停止したい場合は下記のURLにアクセスしてください:
+{X_UNSUBSCRIBE_URL}
+
+-----------
+{X_SITENAME} ({X_SITEURL}) 
+管理人
+{X_ADMINMAIL}
+-----------

Added: tags/1.8/cinemaru/language/ja_utf8/main.php
===================================================================
--- tags/1.8/cinemaru/language/ja_utf8/main.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/ja_utf8/main.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,134 @@
+<?php
+
+if (defined('__CINEMARU_MAIN_PHP__')) {
+    return;
+}
+define('__CINEMARU_MAIN_PHP__', 1);
+
+define("_MD_CINEMARU_MOVIE_UPLOAD", "動画/MP3アップロード");
+define("_MD_CINEMARU_TITLE", "タイトル");
+define("_MD_CINEMARU_MOVIE_FILE", "動画/MP3ファイル");
+define("_MD_CINEMARU_FLV_ONLY", "FLV/MP3ファイルのみ");
+define("_MD_CINEMARU_THUMB_FILE", "サムネイル画像");
+define("_MD_CINEMARU_DESC", "説明");
+define("_MD_CINEMARU_GENRE", "ジャンル");
+define("_MD_CINEMARU_MOVIE_EDIT", "動画情報編集");
+define('_MD_CINEMARU_MOVIE_DELETE', '動画情報削除');
+define("_MD_CINEMARU_TAG_LOCK", "タグをロックする");
+define("_MD_CINEMARU_TAG_LOCK_DESC", "ロックする");
+define("_MD_CINEMARU_USER", "投稿者");
+define("_MD_CINEMARU_SUBMIT", "投稿する");
+
+define('_MD_CINEMARU_ERROR_NO_DATA', '%s を入力してください');
+define('_MD_CINEMARU_ERROR_MAIL_NG_FORMAT', '%s の入力が不正です');
+define('_MD_CINEMARU_ERROR_URL_NG_FORMAT', '%s の入力が不正です');
+define('_MD_CINEMARU_ERROR_SIZE_OVER', '%s は半角 %s 文字以内で入力してください');
+define('_MD_CINEMARU_ERROR_SIZE_UNDER', '%s は半角 %s 文字以上で入力してください');
+define('_MD_CINEMARU_ERROR_CONFIRM_NO_MATCH', '%s が一致しませんでした');
+define('_MD_CINEMARU_ERROR_MAIL_EXISTS', 'メールアドレスが登録済みでした');
+define('_MD_CINEMARU_ERROR_MAIL_NO_EXISTS', 'メールアドレスが登録されていませんでした');
+define('_MD_CINEMARU_ERROR_NO_AUTH', 'メールアドレスまたはパスワードが違います');
+define('_MD_CINEMARU_ERROR_NO_PASSWORD', 'パスワードが違います');
+define('_MD_CINEMARU_ERROR_NO_IMAGE_FILE', '%s は画像ファイルではありません');
+define('_MD_CINEMARU_ERROR_NO_FLV_FILE', '%s はFLVファイルではありません');
+define('_MD_CINEMARU_ERROR_NG_FILE_UPLOAD', '%s はファイルのアップロードに失敗しました');
+define('_MD_CINEMARU_ERROR_NO_FILE', '%s にファイルを指定してください');
+
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_INI_SIZE', 'ファイルサイズが制限を越えました(UPLOAD_ERR_INI_SIZE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_FORM_SIZE', 'ファイルサイズが制限を越えました(UPLOAD_ERR_FORM_SIZE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_PARTIAL', 'アップロードに失敗しました(UPLOAD_ERR_PARTIAL)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_NO_FILE', 'アップロードに失敗しました(UPLOAD_ERR_NO_FILE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_NO_TMP_DIR', 'アップロードに失敗しました(UPLOAD_ERR_NO_TMP_DIR)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_CANT_WRITE', 'アップロードに失敗しました(UPLOAD_ERR_CANT_WRITE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_EXTENSION', 'アップロードに失敗しました(UPLOAD_ERR_EXTENSION)');
+
+define('_MD_CINEMARU_ERROR_NO_TITLE', 'タイトルを入力してください');
+define('_MD_CINEMARU_ERROR_DESC_OVER', '説明は1000文字以内までです');
+define('_MD_CINEMARU_COUNT', '再生数');
+define('_MD_CINEMARU_COMMENT', 'コメント');
+define('_MD_CINEMARU_EDIT', '編集');
+define('_MD_CINEMARU_DELETE', '削除');
+define('_MD_CINEMARU_ADD', '追加');
+define('_MD_CINEMARU_UPLOAD', 'アップロード');
+define('_MD_CINEMARU_UPDATE', 'æ›´æ–°');
+
+define('_MD_CINEMARU_MOVIE_NOT_FOUND', '動画が見つかりませんでした');
+define('_MD_CINEMARU_UPDATED', '更新しました');
+define('_MD_CINEMARU_DELETED', '削除しました');
+define('_MD_CINEMARU_THANKSSUBMIT', '投稿ありがとうございました');
+
+define('_MD_CINEMARU_TAG', 'ã‚¿ã‚°');
+define('_MD_CINEMARU_TAG_LIST', 'タグ一覧');
+define('_MD_CINEMARU_HOT_TAG', '人気タグ');
+define('_MD_CINEMARU_EDIT_TAG', 'タグ編集');
+define('_MD_CINEMARU_END_EDIT_TAG', '編集終了');
+
+define('_MD_CINEMARU_NO_REG_AUTH', '投稿権限がありません');
+define('_MD_CINEMARU_NO_DEL_AUTH', '削除権限がありません');
+define('_MD_CINEMARU_NO_EDIT_AUTH', '編集権限がありません');
+define('_MD_CINEMARU_NO_VALID_AUTH', '承認権限がありません');
+define('_MD_CINEMARU_NO_REPORT_AUTH', '違反報告権限がありません');
+define('_MD_CINEMARU_NO_REPORT_LIST_AUTH', '違反報告リスト閲覧権限がありません');
+
+define('_MD_CINEMARU_NEXT', '次へ');
+define('_MD_CINEMARU_PREV', '前へ');
+
+define('_MD_CINEMARU_TOTAL', '合計件数');
+
+define('_MD_CINEMARU_MOVIE_NO_VALID', 'この動画は承認待ちです。');
+define('_MD_CINEMARU_MOVIE_NO_VALID2', '未承認');
+define('_MD_CINEMARU_MOVIE_NO_VALID3', '未承認にする');
+define('_MD_CINEMARU_MOVIE_VALID', '承認');
+define('_MD_CINEMARU_MOVIE_VALIDED', '承認しました');
+define('_MD_CINEMARU_MOVIE_NG_VALIDED', '未承認しました');
+
+define('_MD_CINEMARU_MOVIE_LIST_NO_VALID', '未承認の動画のみ表示する');
+define('_MD_CINEMARU_MOVIE_LIST_NO_VALID_EXISTS', '未承認の動画があります');
+define('_MD_CINEMARU_MOVIE_LIST_NORMAL', '通常表示');
+
+define('_MD_CINEMARU_MOVIE', 'å‹•ç”»');
+define('_MD_CINEMARU_TIME', '日時');
+define('_MD_CINEMARU_ACTION', '操作');
+
+define('_MD_CINEMARU_NO_COMMENT_READ', 'コメント閲覧権限がありません');
+define('_MD_CINEMARU_NO_DELETE_COMMENT_ADMIN', 'コメント削除権限がありません');
+define('_MD_CINEMARU_DELETED_COMMENT', 'コメントを削除しました');
+define('_MD_CINEMARU_COMMENT_ADMIN', 'コメント管理');
+define('_MD_CINEMARU_COMMENT_LIST', 'コメント一覧');
+define('_MD_CINEMARU_COMMENT_TIME', '表示時間');
+
+define('_MD_CINEMARU_LIST', 'リスト表示');
+define('_MD_CINEMARU_THUMB', 'サムネイル表示');
+
+define('_MD_CINEMARU_WAIT_VALID', '動画/MP3は承認後、再生できるようになります。');
+
+define('_MD_CINEMARU_SORT', 'ソート');
+define('_MD_CINEMARU_SORT_NEW', '登録日時が新しい');
+define('_MD_CINEMARU_SORT_OLD', '登録日時が古い');
+define('_MD_CINEMARU_SORT_HIGH_HIT', '再生数が多い');
+define('_MD_CINEMARU_SORT_LOW_HIT', '再生数が少ない');
+
+define('_MD_CINEMARU_VIOLATION_REPORT_LIST', '違反/リンク切れ報告リスト');
+define('_MD_CINEMARU_VIOLATION_REPORT', '違反/リンク切れ報告をする');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT', 'カテゴリ');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_1', 'リンク切れ');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_2', '不正アップロード');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_3', '性的表現・暴力表現');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_4', 'その他');
+
+define('_MD_CINEMARU_REPORTED', '報告しました');
+define('_MD_CINEMARU_DELETED_REPORT', '報告を削除しました');
+define('_MD_CINEMARU_CHECK_REPORT_LIST', '違反/リンク切れ報告があります');
+
+define('_MD_CINEMARU_FILE_UPLOAD', 'ファイルアップロード');
+define('_MD_CINEMARU_URL', 'URL');
+define('_MD_CINEMARU_FILE_URL', 'ファイルのURL');
+define('_MD_CINEMARU_IMAGE_FILE_UPLOAD', '画像ファイルアップロード');
+define('_MD_CINEMARU_IMAGE_FILE_URL', '画像ファイルのURL');
+
+define('_MD_CINEMARU_BLOG_PASTE_TAG', 'ブログ貼り付け用タグ');
+
+define('_MD_CINEMARU_URL_DESC', 'FLV/MP3ファイルへのURLを指定してください。<br />YouTubeの場合は http://???.youtube.com/watch?v=xxxxxxxxxxx の形式で指定してください。 ');
+
+// Reference keyword: related_movie_get by asben
+define('_MD_CINEMARU_RELATED_MOVIE_TITLE', '関連動画');

Added: tags/1.8/cinemaru/language/ja_utf8/modinfo.php
===================================================================
--- tags/1.8/cinemaru/language/ja_utf8/modinfo.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/ja_utf8/modinfo.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,135 @@
+<?php
+
+$mydirname = basename( dirname ( dirname ( dirname( __FILE__ ) ) ) ) ;
+$constpref = '_MI_' . strtoupper( $mydirname ) ;
+
+define($constpref."_NAME","CINEMARU");
+
+// A brief description of this module
+define($constpref."_DESC","このモジュールは動画モジュールです。");
+define($constpref."_MODULE_DESCRIPTION","このモジュールは動画モジュールです。");
+
+// Names of admin menu items
+define($constpref."_ADMENU1", "設定");
+define($constpref."_ADMENU_GROUPPERM", "グループの全体的な権限");
+
+
+define($constpref."_MOVIE_MAX_SIZE", "動画の最大ファイルサイズ");
+define($constpref."_MOVIE_MAX_DEFAULT", "10485760");
+
+define($constpref."_SUBMIT", "投稿する");
+
+define($constpref.'_TAG_MAX_SIZE', 'タグの最大文字数');
+define($constpref.'_TAG_MAX_DEFAULT', 50);
+define($constpref.'_INPUT_TAG', 'タグ名を入力してください');
+define($constpref.'_NUM_OF_TAG', '一つの動画に付けられるタグ数');
+define($constpref.'_NUM_OF_TAG_DEFAULT', 10);
+define($constpref.'_NUM_OF_TAG_BYLIST', 'タグ一覧で表示するタグ数');
+define($constpref.'_NUM_OF_TAG_BY_TAGLIST_DEFAULT', 100);
+define($constpref.'_TAG_ENCODING', 'タグ名の文字コード');
+define($constpref.'_TAG_ENCODING_DEFAULT', 'UTF-8');
+define($constpref.'_NUM_OF_THUMB', '1画面で表示するサムネイルの数');
+define($constpref.'_NUM_OF_THUMB_DEFAULT', '10');
+define($constpref.'_THUMB_BGCOLOR', 'サムネイルの背景色');
+define($constpref.'_THUMB_BGCOLOR_DESC', 'サムネイルの背景色を指定します。#FF8888 のように指定してください。省略すると背景色は指定されません。');
+define($constpref.'_THUMB_BGCOLOR_DEFAULT', '');
+
+
+
+// Names of blocks for this module (Not all module has blocks)
+define($constpref."_BLOCK_RANDOM", "ランダム表示");
+define($constpref."_BLOCK_THUMB", "サムネイル表示");
+define($constpref."_BLOCK_HOTTAG", "人気タグ");   // 09.01.31 asben
+
+
+// 通知機能
+
+define($constpref.'_GLOBAL_NOTIFY', 'モジュール全体');
+define($constpref.'_GLOBAL_NOTIFYDSC', 'モジュール全体のスケジュールに対する通知オプション');
+
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFY', '登録');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYCAP', '登録があった場合に通知する');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYDSC', '登録があった場合に通知する');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE}: 登録がありました');
+
+define ($constpref.'_GLOBAL_UPDATE_NOTIFY', 'æ›´æ–°');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYCAP', '更新があった場合に通知する');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYDSC', '更新があった場合に通知する');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE}: 更新がありました');
+
+define($constpref.'_SHOW_USER_ID', '動画中のコメントにユーザIDを付ける');
+define($constpref.'_SHOW_USER_ID_DESC', '動画中のコメントの前にユーザIDを付ける。');
+define($constpref.'_SHOW_USER_ID_DEFAULT', '0');
+define($constpref.'_SHOW_USER_ID_OK', '付ける');
+define($constpref.'_SHOW_USER_ID_NG', '付けない');
+
+
+// name setting
+define($constpref.'_NAME_SETTING', '名前表示設定');
+define($constpref.'_SET_NAME', 'ログインID');
+define($constpref.'_SET_UNAME', '本名');
+define($constpref.'_SET_NAME_AND_UNAME', 'ログインID+本名');
+define($constpref.'_SET_UNAME_OR_NAME', '本名、ただし本名が未設定の場合はログインID');
+
+// avatar setting
+define($constpref.'_SHOW_AVATAR', '動画中のコメントにアバターをつける');
+define($constpref.'_SHOW_AVATAR_DEFAULT', '0');
+define($constpref.'_SHOW_AVATAR_OK', '付ける');
+define($constpref.'_SHOW_AVATAR_NG', '付けない');
+
+define($constpref.'_SHOW_NAME_CLIST', 'コメント一覧に登録者の名前を出す');
+define($constpref.'_SHOW_NAME_CLIST_DEFAULT', '1');
+define($constpref.'_SHOW_NAME_CLIST_OK', '出す');
+define($constpref.'_SHOW_NAME_CLIST_NG', '出さない');
+
+define($constpref.'_GUEST_USER_NAME', 'ゲストユーザの名前');
+define($constpref.'_GUEST_USER_NAME_DEFAULT', 'GUEST');
+
+define($constpref.'_SHOW_NAME_MOVIE', '再生画面に登録者の名前を出す');
+define($constpref.'_SHOW_NAME_MOVIE_DEFAULT', '1');
+define($constpref.'_SHOW_NAME_MOVIE_OK', '出す');
+define($constpref.'_SHOW_NAME_MOVIE_NG', '出さない');
+
+define($constpref.'_SHOW_REPORT_LINK', '再生画面に違反報告リンクを出す');
+define($constpref.'_SHOW_REPORT_LINK_DEFAULT', '1');
+define($constpref.'_SHOW_REPORT_LINK_OK', '出す');
+define($constpref.'_SHOW_REPORT_LINK_NG', '出さない');
+
+define($constpref.'_SP_RANDOM_OK', 'ランダムにする');
+define($constpref.'_SP_RANDOM_NG', 'ランダムにしない');
+
+define($constpref.'_SP_COMMAND1', 'スペシャルコマンド1');
+define($constpref.'_SP_COMMAND1_DEFAULT', 'star');
+define($constpref.'_SP_COMMAND1_URL', 'スペシャルコマンド1 URL');
+define($constpref.'_SP_COMMAND1_URL_DEFAULT', 'star1.swf');
+define($constpref.'_SP_COMMAND1_RAND', 'スペシャルコマンド1 Y軸をランダムにする');
+define($constpref.'_SP_COMMAND1_RANDOM_DEFAULT', '1');
+
+define($constpref.'_SP_COMMAND2', 'スペシャルコマンド2');
+define($constpref.'_SP_COMMAND2_DEFAULT', 'star2');
+define($constpref.'_SP_COMMAND2_URL', 'スペシャルコマンド2 URL');
+define($constpref.'_SP_COMMAND2_URL_DEFAULT', 'star2.swf');
+define($constpref.'_SP_COMMAND2_RAND', 'スペシャルコマンド2 Y軸をランダムにする');
+define($constpref.'_SP_COMMAND2_RANDOM_DEFAULT', '1');
+
+define($constpref.'_SP_COMMAND3', 'スペシャルコマンド3');
+define($constpref.'_SP_COMMAND3_DEFAULT', 'star3');
+define($constpref.'_SP_COMMAND3_URL', 'スペシャルコマンド3URL');
+define($constpref.'_SP_COMMAND3_URL_DEFAULT', 'star3.swf');
+define($constpref.'_SP_COMMAND3_RAND', 'スペシャルコマンド3 Y軸をランダムにする');
+define($constpref.'_SP_COMMAND3_RANDOM_DEFAULT', '1');
+
+define($constpref.'_RICHTEXT', 'リッチテキスト設定');
+define($constpref.'_USE_RICHTEXT', '予約内容にリッチテキストを使う');
+define($constpref.'_USE_PLAINTEXT', '予約内容にプレインテキストを使う');
+
+define($constpref.'_BLOG_PASTE', 'ブログ貼り付け機能');
+define($constpref.'_BLOG_PASTE_OK', '有効にする');
+define($constpref.'_BLOG_PASTE_NG', '無効にする');
+
+define($constpref.'_TOP_MOVIE', 'モジュールトップ画面の表示スタイル');
+define($constpref.'_TOP_MOVIE_DESC', 'モジュールトップ画面の動画/MP3のデフォルトの表示スタイル。ただし、ユーザが選択した場合クッキーに記録され、次回からはそちらが優先される。');
+define($constpref.'_TOP_MOVIE_LIST', 'リスト表示');
+define($constpref.'_TOP_MOVIE_THUMB', 'サムネイル表示');
+
+

Added: tags/1.8/cinemaru/language/japanese/admin.php
===================================================================
--- tags/1.8/cinemaru/language/japanese/admin.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/japanese/admin.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,32 @@
+<?php
+//%%%%%%        Admin Module Name  Headlines         %%%%%
+
+define( '_AM_CINEMARU_DBUPDATED', "更新しました" ) ;
+define( '_AM_CINEMARU_PERMADDNG', '');
+define( '_AM_CINEMARU_PERMADDOK', '');
+
+// groupperm
+define("_AM_GROUPPERM","グループの全体的な権限");
+
+// Group's Permissions
+define( '_AM_GPERM_G_INSERTABLE' , "新規登録" ) ;
+define( '_AM_GPERM_G_SUPERINSERT' , "登録の承認不要" ) ;
+define( '_AM_GPERM_G_EDITABLE' , "変更" ) ;
+define( '_AM_GPERM_G_SUPEREDIT' , "変更の承認不要" ) ;
+define( '_AM_GPERM_G_DELETABLE' , "削除" ) ;
+define( '_AM_GPERM_G_SUPERDELETE' , "承認不要の削除" ) ;
+define( '_AM_GPERM_G_TOUCHOTHERS' , "他人の動画情報の変更・削除" ) ;
+define( '_AM_GPERM_G_TAGINSERTABLE' , "タグ追加" ) ;
+define( '_AM_GPERM_G_TAGEDITABLE' , "タグ変更" ) ;
+define( '_AM_GPERM_G_TAGDELETABLE' , "タグ削除" ) ;
+define( '_AM_GPERM_G_VALID' , '動画承認' ) ;
+define( '_AM_GPERM_G_DELCOMMENT' , 'コメント削除' ) ;
+define( '_AM_GPERM_G_INSERTCOMMENT' , 'コメント追加' ) ;
+define( '_AM_GPERM_G_SHOWCOMMENT' , 'コメント表示' ) ;
+define( '_AM_GPERM_G_REPORT' , '違反報告できる権限' ) ;
+define( '_AM_GPERM_G_REPORT_LIST' , '違反報告リスト閲覧権限' ) ;
+
+define( '_AM_CAT2GROUPDESC' , "各グループについて、アクセス可能なカテゴリーへチェックを入れて下さい" ) ;
+define( '_AM_GROUPPERMDESC' , "グループ毎にスケジュールについての権限を設定できます<br />この機能を利用するためには、一般設定において、ユーザー権限を、「グループ毎に設定する」を選択する必要があります<br />なお、管理者グループの権限をここで設定しても意味がありません" ) ;
+
+

Added: tags/1.8/cinemaru/language/japanese/blocks.php
===================================================================
--- tags/1.8/cinemaru/language/japanese/blocks.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/japanese/blocks.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,19 @@
+<?php
+
+if (defined('_MB_CINEMARU_DISP')) {
+    return;
+}
+
+define("_MB_CINEMARU_DISP","表示件数:");
+define("_MB_CINEMARU_ARTCLS","件");
+
+define("_MB_CINEMARU_SORT","ソート条件:");
+define("_MB_CINEMARU_SORT_1","登録日時が新しい");
+define("_MB_CINEMARU_SORT_2","登録日時が古い");
+define("_MB_CINEMARU_SORT_3","再生数が多い");
+define("_MB_CINEMARU_SORT_4","再生数が少ない");
+define("_MB_CINEMARU_SORT_5","コメントが新しい");
+define("_MB_CINEMARU_SORT_6","コメントが古い");
+define("_MB_CINEMARU_SORT_7","コメントが多い");
+define("_MB_CINEMARU_SORT_8","コメントが少ない");
+

Added: tags/1.8/cinemaru/language/japanese/index.html
===================================================================
--- tags/1.8/cinemaru/language/japanese/index.html	                        (rev 0)
+++ tags/1.8/cinemaru/language/japanese/index.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file

Added: tags/1.8/cinemaru/language/japanese/mail_template/global_newpost_notify.tpl
===================================================================
--- tags/1.8/cinemaru/language/japanese/mail_template/global_newpost_notify.tpl	                        (rev 0)
+++ tags/1.8/cinemaru/language/japanese/mail_template/global_newpost_notify.tpl	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,20 @@
+{X_UNAME}さん、こんにちは
+
+{X_MODULE}モジュールにおいて登録がありました。
+
+この投稿を見るには下記URLにアクセスしてください:
+{POST_URL}
+{POST_NAME}
+
+-----------
+
+このメールはXOOPSの自動通知機能によって送信されています
+
+自動通知を停止したい場合は下記のURLにアクセスしてください:
+{X_UNSUBSCRIBE_URL}
+
+-----------
+{X_SITENAME} ({X_SITEURL}) 
+管理人
+{X_ADMINMAIL}
+-----------

Added: tags/1.8/cinemaru/language/japanese/mail_template/global_update_notify.tpl
===================================================================
--- tags/1.8/cinemaru/language/japanese/mail_template/global_update_notify.tpl	                        (rev 0)
+++ tags/1.8/cinemaru/language/japanese/mail_template/global_update_notify.tpl	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,20 @@
+{X_UNAME}さん、こんにちは
+
+{X_MODULE}モジュールにおいて更新がありました。
+
+この更新を見るには下記URLにアクセスしてください:
+{POST_URL}
+{POST_NAME}
+
+-----------
+
+このメールはXOOPSの自動通知機能によって送信されています
+
+自動通知を停止したい場合は下記のURLにアクセスしてください:
+{X_UNSUBSCRIBE_URL}
+
+-----------
+{X_SITENAME} ({X_SITEURL}) 
+管理人
+{X_ADMINMAIL}
+-----------

Added: tags/1.8/cinemaru/language/japanese/main.php
===================================================================
--- tags/1.8/cinemaru/language/japanese/main.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/japanese/main.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,134 @@
+<?php
+
+if (defined('__CINEMARU_MAIN_PHP__')) {
+    return;
+}
+define('__CINEMARU_MAIN_PHP__', 1);
+
+define("_MD_CINEMARU_MOVIE_UPLOAD", "動画/MP3アップロード");
+define("_MD_CINEMARU_TITLE", "タイトル");
+define("_MD_CINEMARU_MOVIE_FILE", "動画/MP3ファイル");
+define("_MD_CINEMARU_FLV_ONLY", "FLV/MP3ファイルのみ");
+define("_MD_CINEMARU_THUMB_FILE", "サムネイル画像");
+define("_MD_CINEMARU_DESC", "説明");
+define("_MD_CINEMARU_GENRE", "ジャンル");
+define("_MD_CINEMARU_MOVIE_EDIT", "動画情報編集");
+define('_MD_CINEMARU_MOVIE_DELETE', '動画情報削除');
+define("_MD_CINEMARU_TAG_LOCK", "タグをロックする");
+define("_MD_CINEMARU_TAG_LOCK_DESC", "ロックする");
+define("_MD_CINEMARU_USER", "投稿者");
+define("_MD_CINEMARU_SUBMIT", "投稿する");
+
+define('_MD_CINEMARU_ERROR_NO_DATA', '%s を入力してください');
+define('_MD_CINEMARU_ERROR_MAIL_NG_FORMAT', '%s の入力が不正です');
+define('_MD_CINEMARU_ERROR_URL_NG_FORMAT', '%s の入力が不正です');
+define('_MD_CINEMARU_ERROR_SIZE_OVER', '%s は半角 %s 文字以内で入力してください');
+define('_MD_CINEMARU_ERROR_SIZE_UNDER', '%s は半角 %s 文字以上で入力してください');
+define('_MD_CINEMARU_ERROR_CONFIRM_NO_MATCH', '%s が一致しませんでした');
+define('_MD_CINEMARU_ERROR_MAIL_EXISTS', 'メールアドレスが登録済みでした');
+define('_MD_CINEMARU_ERROR_MAIL_NO_EXISTS', 'メールアドレスが登録されていませんでした');
+define('_MD_CINEMARU_ERROR_NO_AUTH', 'メールアドレスまたはパスワードが違います');
+define('_MD_CINEMARU_ERROR_NO_PASSWORD', 'パスワードが違います');
+define('_MD_CINEMARU_ERROR_NO_IMAGE_FILE', '%s は画像ファイルではありません');
+define('_MD_CINEMARU_ERROR_NO_FLV_FILE', '%s はFLVファイルではありません');
+define('_MD_CINEMARU_ERROR_NG_FILE_UPLOAD', '%s はファイルのアップロードに失敗しました');
+define('_MD_CINEMARU_ERROR_NO_FILE', '%s にファイルを指定してください');
+
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_INI_SIZE', 'ファイルサイズが制限を越えました(UPLOAD_ERR_INI_SIZE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_FORM_SIZE', 'ファイルサイズが制限を越えました(UPLOAD_ERR_FORM_SIZE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_PARTIAL', 'アップロードに失敗しました(UPLOAD_ERR_PARTIAL)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_NO_FILE', 'アップロードに失敗しました(UPLOAD_ERR_NO_FILE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_NO_TMP_DIR', 'アップロードに失敗しました(UPLOAD_ERR_NO_TMP_DIR)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_CANT_WRITE', 'アップロードに失敗しました(UPLOAD_ERR_CANT_WRITE)');
+define('_MD_CINEMARU_ERROR_UPLOAD_ERR_EXTENSION', 'アップロードに失敗しました(UPLOAD_ERR_EXTENSION)');
+
+define('_MD_CINEMARU_ERROR_NO_TITLE', 'タイトルを入力してください');
+define('_MD_CINEMARU_ERROR_DESC_OVER', '説明は1000文字以内までです');
+define('_MD_CINEMARU_COUNT', '再生数');
+define('_MD_CINEMARU_COMMENT', 'コメント');
+define('_MD_CINEMARU_EDIT', '編集');
+define('_MD_CINEMARU_DELETE', '削除');
+define('_MD_CINEMARU_ADD', '追加');
+define('_MD_CINEMARU_UPLOAD', 'アップロード');
+define('_MD_CINEMARU_UPDATE', '更新');
+
+define('_MD_CINEMARU_MOVIE_NOT_FOUND', '動画が見つかりませんでした');
+define('_MD_CINEMARU_UPDATED', '更新しました');
+define('_MD_CINEMARU_DELETED', '削除しました');
+define('_MD_CINEMARU_THANKSSUBMIT', '投稿ありがとうございました');
+
+define('_MD_CINEMARU_TAG', 'タグ');
+define('_MD_CINEMARU_TAG_LIST', 'タグ一覧');
+define('_MD_CINEMARU_HOT_TAG', '人気タグ');
+define('_MD_CINEMARU_EDIT_TAG', 'タグ編集');
+define('_MD_CINEMARU_END_EDIT_TAG', '編集終了');
+
+define('_MD_CINEMARU_NO_REG_AUTH', '投稿権限がありません');
+define('_MD_CINEMARU_NO_DEL_AUTH', '削除権限がありません');
+define('_MD_CINEMARU_NO_EDIT_AUTH', '編集権限がありません');
+define('_MD_CINEMARU_NO_VALID_AUTH', '承認権限がありません');
+define('_MD_CINEMARU_NO_REPORT_AUTH', '違反報告権限がありません');
+define('_MD_CINEMARU_NO_REPORT_LIST_AUTH', '違反報告リスト閲覧権限がありません');
+
+define('_MD_CINEMARU_NEXT', '次へ');
+define('_MD_CINEMARU_PREV', '前へ');
+
+define('_MD_CINEMARU_TOTAL', '合計件数');
+
+define('_MD_CINEMARU_MOVIE_NO_VALID', 'この動画は承認待ちです。');
+define('_MD_CINEMARU_MOVIE_NO_VALID2', '未承認');
+define('_MD_CINEMARU_MOVIE_NO_VALID3', '未承認にする');
+define('_MD_CINEMARU_MOVIE_VALID', '承認');
+define('_MD_CINEMARU_MOVIE_VALIDED', '承認しました');
+define('_MD_CINEMARU_MOVIE_NG_VALIDED', '未承認しました');
+
+define('_MD_CINEMARU_MOVIE_LIST_NO_VALID', '未承認の動画のみ表示する');
+define('_MD_CINEMARU_MOVIE_LIST_NO_VALID_EXISTS', '未承認の動画があります');
+define('_MD_CINEMARU_MOVIE_LIST_NORMAL', '通常表示');
+
+define('_MD_CINEMARU_MOVIE', '動画');
+define('_MD_CINEMARU_TIME', '日時');
+define('_MD_CINEMARU_ACTION', '操作');
+
+define('_MD_CINEMARU_NO_COMMENT_READ', 'コメント閲覧権限がありません');
+define('_MD_CINEMARU_NO_DELETE_COMMENT_ADMIN', 'コメント削除権限がありません');
+define('_MD_CINEMARU_DELETED_COMMENT', 'コメントを削除しました');
+define('_MD_CINEMARU_COMMENT_ADMIN', 'コメント管理');
+define('_MD_CINEMARU_COMMENT_LIST', 'コメント一覧');
+define('_MD_CINEMARU_COMMENT_TIME', '表示時間');
+
+define('_MD_CINEMARU_LIST', 'リスト表示');
+define('_MD_CINEMARU_THUMB', 'サムネイル表示');
+
+define('_MD_CINEMARU_WAIT_VALID', '動画/MP3は承認後、再生できるようになります。');
+
+define('_MD_CINEMARU_SORT', 'ソート');
+define('_MD_CINEMARU_SORT_NEW', '登録日時が新しい');
+define('_MD_CINEMARU_SORT_OLD', '登録日時が古い');
+define('_MD_CINEMARU_SORT_HIGH_HIT', '再生数が多い');
+define('_MD_CINEMARU_SORT_LOW_HIT', '再生数が少ない');
+
+define('_MD_CINEMARU_VIOLATION_REPORT_LIST', '違反/リンク切れ報告リスト');
+define('_MD_CINEMARU_VIOLATION_REPORT', '違反/リンク切れ報告をする');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT', 'カテゴリ');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_1', 'リンク切れ');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_2', '不正アップロード');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_3', '性的表現・暴力表現');
+define('_MD_CINEMARU_VIOLATION_REPORT_CAT_4', 'その他');
+
+define('_MD_CINEMARU_REPORTED', '報告しました');
+define('_MD_CINEMARU_DELETED_REPORT', '報告を削除しました');
+define('_MD_CINEMARU_CHECK_REPORT_LIST', '違反/リンク切れ報告があります');
+
+define('_MD_CINEMARU_FILE_UPLOAD', 'ファイルアップロード');
+define('_MD_CINEMARU_URL', 'URL');
+define('_MD_CINEMARU_FILE_URL', 'ファイルのURL');
+define('_MD_CINEMARU_IMAGE_FILE_UPLOAD', '画像ファイルアップロード');
+define('_MD_CINEMARU_IMAGE_FILE_URL', '画像ファイルのURL');
+
+define('_MD_CINEMARU_BLOG_PASTE_TAG', 'ブログ貼り付け用タグ');
+
+define('_MD_CINEMARU_URL_DESC', 'FLV/MP3ファイルへのURLを指定してください。<br />YouTubeの場合は http://???.youtube.com/watch?v=xxxxxxxxxxx の形式で指定してください。 ');
+
+// Reference keyword: related_movie_get by asben
+define('_MD_CINEMARU_RELATED_MOVIE_TITLE', '関連動画');

Added: tags/1.8/cinemaru/language/japanese/modinfo.php
===================================================================
--- tags/1.8/cinemaru/language/japanese/modinfo.php	                        (rev 0)
+++ tags/1.8/cinemaru/language/japanese/modinfo.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,128 @@
+<?php
+
+$mydirname = basename( dirname ( dirname ( dirname( __FILE__ ) ) ) ) ;
+$constpref = '_MI_' . strtoupper( $mydirname ) ;
+
+define($constpref."_NAME","CINEMARU");
+
+// A brief description of this module
+define($constpref."_DESC","このモジュールは動画モジュールです。");
+define($constpref."_MODULE_DESCRIPTION","このモジュールは動画モジュールです。");
+
+// Names of admin menu items
+define($constpref."_ADMENU1", "設定");
+define($constpref."_ADMENU_GROUPPERM", "グループの全体的な権限");
+
+define($constpref."_MOVIE_MAX_SIZE", "動画の最大ファイルサイズ");
+define($constpref."_MOVIE_MAX_DEFAULT", "10485760");
+
+define($constpref."_SUBMIT", "投稿する");
+
+define($constpref.'_TAG_MAX_SIZE', 'タグの最大文字数');
+define($constpref.'_TAG_MAX_DEFAULT', 50);
+define($constpref.'_INPUT_TAG', 'タグ名を入力してください');
+define($constpref.'_NUM_OF_TAG', '一つの動画に付けられるタグ数');
+define($constpref.'_NUM_OF_TAG_DEFAULT', 10);
+define($constpref.'_NUM_OF_TAG_BYLIST', 'タグ一覧で表示するタグ数');
+define($constpref.'_NUM_OF_TAG_BY_TAGLIST_DEFAULT', 100);
+define($constpref.'_TAG_ENCODING', 'タグ名の文字コード');
+define($constpref.'_TAG_ENCODING_DEFAULT', 'EUC-JP');
+define($constpref.'_NUM_OF_THUMB', '1画面で表示するサムネイルの数');
+define($constpref.'_NUM_OF_THUMB_DEFAULT', '10');
+define($constpref.'_THUMB_BGCOLOR', 'サムネイルの背景色');
+define($constpref.'_THUMB_BGCOLOR_DESC', 'サムネイルの背景色を指定します。#FF8888 のように指定してください。省略すると背景色は指定されません。');
+define($constpref.'_THUMB_BGCOLOR_DEFAULT', '');
+
+// Names of blocks for this module (Not all module has blocks)
+define($constpref."_BLOCK_RANDOM", "ランダム表示");
+define($constpref."_BLOCK_THUMB", "サムネイル表示");
+define($constpref."_BLOCK_HOTTAG", "人気タグ");   // 09.01.31 asben
+
+// 通知機能
+
+define($constpref.'_GLOBAL_NOTIFY', 'モジュール全体');
+define($constpref.'_GLOBAL_NOTIFYDSC', 'モジュール全体のスケジュールに対する通知オプション');
+
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFY', '登録');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYCAP', '登録があった場合に通知する');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYDSC', '登録があった場合に通知する');
+define ($constpref.'_GLOBAL_NEWPOST_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE}: 登録がありました');
+
+define ($constpref.'_GLOBAL_UPDATE_NOTIFY', '更新');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYCAP', '更新があった場合に通知する');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYDSC', '更新があった場合に通知する');
+define ($constpref.'_GLOBAL_UPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE}: 更新がありました');
+
+define($constpref.'_SHOW_USER_ID', '動画中のコメントにユーザIDを付ける');
+define($constpref.'_SHOW_USER_ID_DESC', '動画中のコメントの前にユーザIDを付ける。');
+define($constpref.'_SHOW_USER_ID_DEFAULT', '0');
+define($constpref.'_SHOW_USER_ID_OK', '付ける');
+define($constpref.'_SHOW_USER_ID_NG', '付けない');
+
+// name setting
+define($constpref.'_NAME_SETTING', '名前表示設定');
+define($constpref.'_SET_NAME', 'ログインID');
+define($constpref.'_SET_UNAME', '本名');
+define($constpref.'_SET_NAME_AND_UNAME', 'ログインID+本名');
+define($constpref.'_SET_UNAME_OR_NAME', '本名、ただし本名が未設定の場合はログインID');
+
+// avatar setting
+define($constpref.'_SHOW_AVATAR', '動画中のコメントにアバターをつける');
+define($constpref.'_SHOW_AVATAR_DEFAULT', '0');
+define($constpref.'_SHOW_AVATAR_OK', '付ける');
+define($constpref.'_SHOW_AVATAR_NG', '付けない');
+
+define($constpref.'_SHOW_NAME_CLIST', 'コメント一覧に登録者の名前を出す');
+define($constpref.'_SHOW_NAME_CLIST_DEFAULT', '1');
+define($constpref.'_SHOW_NAME_CLIST_OK', '出す');
+define($constpref.'_SHOW_NAME_CLIST_NG', '出さない');
+
+define($constpref.'_GUEST_USER_NAME', 'ゲストユーザの名前');
+define($constpref.'_GUEST_USER_NAME_DEFAULT', 'GUEST');
+
+define($constpref.'_SHOW_NAME_MOVIE', '再生画面に登録者の名前を出す');
+define($constpref.'_SHOW_NAME_MOVIE_DEFAULT', '1');
+define($constpref.'_SHOW_NAME_MOVIE_OK', '出す');
+define($constpref.'_SHOW_NAME_MOVIE_NG', '出さない');
+
+define($constpref.'_SHOW_REPORT_LINK', '再生画面に違反報告リンクを出す');
+define($constpref.'_SHOW_REPORT_LINK_DEFAULT', '1');
+define($constpref.'_SHOW_REPORT_LINK_OK', '出す');
+define($constpref.'_SHOW_REPORT_LINK_NG', '出さない');
+
+define($constpref.'_SP_RANDOM_OK', 'ランダムにする');
+define($constpref.'_SP_RANDOM_NG', 'ランダムにしない');
+
+define($constpref.'_SP_COMMAND1', 'スペシャルコマンド1');
+define($constpref.'_SP_COMMAND1_DEFAULT', 'star');
+define($constpref.'_SP_COMMAND1_URL', 'スペシャルコマンド1 URL');
+define($constpref.'_SP_COMMAND1_URL_DEFAULT', 'star1.swf');
+define($constpref.'_SP_COMMAND1_RAND', 'スペシャルコマンド1 Y軸をランダムにする');
+define($constpref.'_SP_COMMAND1_RANDOM_DEFAULT', '1');
+
+define($constpref.'_SP_COMMAND2', 'スペシャルコマンド2');
+define($constpref.'_SP_COMMAND2_DEFAULT', 'star2');
+define($constpref.'_SP_COMMAND2_URL', 'スペシャルコマンド2 URL');
+define($constpref.'_SP_COMMAND2_URL_DEFAULT', 'star2.swf');
+define($constpref.'_SP_COMMAND2_RAND', 'スペシャルコマンド2 Y軸をランダムにする');
+define($constpref.'_SP_COMMAND2_RANDOM_DEFAULT', '1');
+
+define($constpref.'_SP_COMMAND3', 'スペシャルコマンド3');
+define($constpref.'_SP_COMMAND3_DEFAULT', 'star3');
+define($constpref.'_SP_COMMAND3_URL', 'スペシャルコマンド3URL');
+define($constpref.'_SP_COMMAND3_URL_DEFAULT', 'star3.swf');
+define($constpref.'_SP_COMMAND3_RAND', 'スペシャルコマンド3 Y軸をランダムにする');
+define($constpref.'_SP_COMMAND3_RANDOM_DEFAULT', '1');
+
+define($constpref.'_RICHTEXT', 'リッチテキスト設定');
+define($constpref.'_USE_RICHTEXT', '予約内容にリッチテキストを使う');
+define($constpref.'_USE_PLAINTEXT', '予約内容にプレインテキストを使う');
+
+define($constpref.'_BLOG_PASTE', 'ブログ貼り付け機能');
+define($constpref.'_BLOG_PASTE_OK', '有効にする');
+define($constpref.'_BLOG_PASTE_NG', '無効にする');
+
+define($constpref.'_TOP_MOVIE', 'モジュールトップ画面の表示スタイル');
+define($constpref.'_TOP_MOVIE_DESC', 'モジュールトップ画面の動画/MP3のデフォルトの表示スタイル。ただし、ユーザが選択した場合クッキーに記録され、次回からはそちらが優先される。');
+define($constpref.'_TOP_MOVIE_LIST', 'リスト表示');
+define($constpref.'_TOP_MOVIE_THUMB', 'サムネイル表示');

Added: tags/1.8/cinemaru/module_icon.php
===================================================================
--- tags/1.8/cinemaru/module_icon.php	                        (rev 0)
+++ tags/1.8/cinemaru/module_icon.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,35 @@
+<?php
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+
+$icon_cache_limit = 3600 ; // default 3600sec == 1hour
+
+session_cache_limiter('public');
+header("Expires: ".date('r',intval(time()/$icon_cache_limit)*$icon_cache_limit+$icon_cache_limit));
+header("Cache-Control: public, max-age=$icon_cache_limit");
+header("Last-Modified: ".date('r',intval(time()/$icon_cache_limit)*$icon_cache_limit));
+header("Content-type: image/png");
+
+if( file_exists( $mydirpath.'/module_icon.png' ) ) {
+	$use_custom_icon = true ;
+	$icon_fullpath = $mydirpath.'/module_icon.png' ;
+} else {
+	$use_custom_icon = false ;
+	$icon_fullpath = dirname(__FILE__).'/module_icon.png' ;
+}
+
+if( ! $use_custom_icon && function_exists( 'imagecreatefrompng' ) && function_exists( 'imagecolorallocate' ) && function_exists( 'imagestring' ) && function_exists( 'imagepng' ) ) {
+	$im = imagecreatefrompng( $icon_fullpath ) ;
+
+	$color = imagecolorallocate( $im , 0 , 0 , 0 ) ; // black
+	$px = ( 92 - 6 * strlen( $mydirname ) ) / 2 ;
+	imagestring( $im , 3 , $px , 34 , $mydirname , $color ) ;
+	imagepng( $im ) ;
+	imagedestroy( $im ) ;
+
+} else {
+	readfile( $icon_fullpath ) ;
+
+}
+
+?>

Added: tags/1.8/cinemaru/module_icon.png
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/module_icon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/movie.php
===================================================================
--- tags/1.8/cinemaru/movie.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,147 @@
+<?php
+
+include 'header.php';
+
+require_once('include/db.php');
+require_once('constants.php');
+require_once('include/groupperm_function.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$movie = cinemaru_movie_get_one(@$_REQUEST['id']);
+
+if ($movie == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NOT_FOUND);
+    exit();
+}
+
+if ($movie['valid'] == 0 && cinemaru_is_auth_perm() == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NO_VALID);
+    exit();
+}
+
+if (@$movie['file_url']) {
+    $movie['file_url'] = urlencode($movie['file_url']);
+}
+
+if (@$movie['image_file_url']) {
+    $movie['image_file_url'] = urlencode($movie['image_file_url']);
+}
+
+if (@$xoopsModuleConfig['show_name_movie']) {
+    $member_handler =& xoops_gethandler('member');
+    
+    if ($movie['owner'] == 0) {
+	$user_name =  $xoopsModuleConfig['guest_user_name'];
+    } else {
+	$user = $member_handler->getUser($movie['owner']);
+
+	if ($xoopsModuleConfig['name_setting'] == 0) {
+	    $user_name =  $user->getVar('uname');
+	} else if ($xoopsModuleConfig['name_setting'] == 1) {
+	    $user_name =  $user->getVar('name');
+	} else if ($xoopsModuleConfig['name_setting'] == 2) {
+	    $user_name = $user->getVar('uname') . '(' . $user->getVar('name') . ')';
+	} else if ($xoopsModuleConfig['name_setting'] == 3) {
+	    if ($user->getVar('name') != '') {
+		$user_name = $user->getVar('name');
+	    } else {
+		$user_name = $user->getVar('uname');
+	    }
+	}
+    }
+    
+    $xoopsTpl->assign('user_name', $user_name);
+}
+
+$myts =& MyTextSanitizer::getInstance();
+$movie['desc'] = $myts->previewTarea($movie['desc'], 0, 1, 1, 1, 1);
+
+$valid = cinemaru_is_auth_perm();
+$groupperm_showcomment = cinemaru_checkright(constant($constpref.'_GROUPPERM_SHOWCOMMENT'));
+$groupperm_comment = cinemaru_checkright(constant($constpref.'_GROUPPERM_INSERTCOMMENT'));
+$groupperm_editable = cinemaru_checkright(constant($constpref.'_GROUPPERM_EDITABLE'));
+$groupperm_touchothers = cinemaru_checkright(constant($constpref.'_GROUPPERM_TOUCHOTHERS'));
+$groupperm_tag_insertable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGINSERTABLE'));
+$groupperm_tag_deletable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGDELETABLE'));
+$groupperm_tag_editable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGEDITABLE'));
+$groupperm_report = cinemaru_checkright(constant($constpref.'_GROUPPERM_REPORT'));
+
+$xoopsTpl->assign('show_report_link', $xoopsModuleConfig['show_report_link']);
+$xoopsTpl->assign('xoops_module_config', $xoopsModuleConfig);
+$xoopsTpl->assign('', $xoopsModuleConfig['show_name_movie']);
+$xoopsTpl->assign('auth_valid', $valid);
+$xoopsTpl->assign('showcomment', $groupperm_showcomment);
+$xoopsTpl->assign('commentok', $groupperm_comment);
+$xoopsTpl->assign('editable', $groupperm_editable);
+$xoopsTpl->assign('touchothers', $groupperm_touchothers);
+$xoopsTpl->assign('tag_insertable', $groupperm_tag_insertable);
+$xoopsTpl->assign('tag_deletable', $groupperm_tag_deletable);
+$xoopsTpl->assign('tag_editable', $groupperm_tag_editable);
+$xoopsTpl->assign('report', $groupperm_report);
+$xoopsTpl->assign('t', time());
+$xoopsTpl->assign('file_type', constant($constpref.'_FORM_FILE_TYPE_YOUTUBE_URL'));
+
+if (preg_match('/^star1.swf$/', $xoopsModuleConfig['sp_command1_url'])) {
+    $xoopsTpl->assign('spcmd1url', XOOPS_URL . '/modules/' . $mydirname . '/flash/star1.swf');
+} else {
+    $xoopsTpl->assign('spcmd1url', $xoopsModuleConfig['sp_command1_url']);
+}
+if (preg_match('/^star2.swf$/', $xoopsModuleConfig['sp_command2_url'])) {
+    $xoopsTpl->assign('spcmd2url', XOOPS_URL . '/modules/' . $mydirname . '/flash/star2.swf');
+} else {
+    $xoopsTpl->assign('spcmd2url', $xoopsModuleConfig['sp_command2_url']);
+}
+if (preg_match('/^star3.swf$/', $xoopsModuleConfig['sp_command3_url'])) {
+    $xoopsTpl->assign('spcmd3url', XOOPS_URL . '/modules/' . $mydirname . '/flash/star3.swf');
+} else {
+    $xoopsTpl->assign('spcmd3url', $xoopsModuleConfig['sp_command3_url']);
+}
+
+$list = cinemaru_tag_get($_REQUEST['id']);
+/* for related tag plugin by asben 09.02.19*/
+$tag = '';
+$tagid_list = array();
+foreach ($list as $val) {
+    $tag .= '<A HREF="index.php?tag=' . intval($val['tags_id']) . '">';
+    $tag .= htmlspecialchars($val['name']) . '</A> ';
+    $tmp = $val['tags_id'];
+    array_push($tagid_list, $tmp);
+}
+
+$xoopsTpl->assign('tag', $tag);
+$tagsid = implode(',', $tagid_list);
+$xoopsTpl->assign('tagsid', $tagsid);
+
+// Reference keyword: related_movie_get by asben
+$arrRelate_movie_info = cinemaru_related_movie_get($_REQUEST['id'], $list, 10);
+$xoopsTpl->assign('relate_movie_info', $arrRelate_movie_info);
+
+cinemaru_movie_counter_up($_REQUEST['id']);
+
+$movie['counter']++;
+
+if (isset($xoopsUser) && isset($_SESSION['xoopsUserId'])) {
+    $xoopsTpl->assign('user_avatar', $xoopsUser->getVar('user_avatar'));
+}
+$xoopsTpl->assign('movie', $movie);
+
+$xoopsOption['template_main'] = $mydirname . '_movie.html';
+
+if ($xoopsModuleConfig['blog_paste']) {
+    $xoopsTpl->assign('player_float', 0);
+    $blog_paste = $xoopsTpl->fetch('db:' . $mydirname . '_movie_flash_player.html');
+    $blog_paste .= '<BR><A HREF="' . XOOPS_URL . '">Powered by ' . $xoopsConfig['sitename'] . '</A>';
+    $blog_paste = preg_replace('/[\n\r]/', '', $blog_paste);
+    $xoopsTpl->assign('blog_paste', $blog_paste);
+}
+$xoopsTpl->assign('player_float', 1);
+$xoopsTpl->assign('autoplay', 1);
+
+include XOOPS_ROOT_PATH.'/footer.php';
+
+

Added: tags/1.8/cinemaru/movie_comment_delete.php
===================================================================
--- tags/1.8/cinemaru/movie_comment_delete.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_comment_delete.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,25 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$delcomment_admin = cinemaru_is_auth_delele_comment();
+if ($delcomment_admin == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_DELETE_COMMENT_ADMIN);
+    exit();
+}
+
+$xoopsOption['template_main'] = 'cinemaru_index.html';
+
+cinemaru_comment_delete($_REQUEST['comment_id']);
+
+if (isset($_GET['id'])) {
+    redirect_header('movie_comment_list.php?id=' . intval($_GET['id']), 2, _MD_CINEMARU_DELETED_COMMENT);
+} else {
+    redirect_header('movie_comment_list.php', 2, _MD_CINEMARU_DELETED_COMMENT);
+}
+exit();
+

Added: tags/1.8/cinemaru/movie_comment_get.php
===================================================================
--- tags/1.8/cinemaru/movie_comment_get.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_comment_get.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,71 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/misc.php');
+require_once('constants.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+error_reporting(0); // error report off
+
+$xoopsOption['template_main'] = 'cinemaru_index.html';
+
+$groupperm_showcomment = cinemaru_checkright(CINEMARU_GROUPPERM_SHOWCOMMENT);
+
+if ($groupperm_showcomment) {
+    $list = cinemaru_comment_get($_REQUEST['id']);
+    
+    $user_list = array();
+	
+    header("Content-type: text/html");
+    
+    foreach ($list as $key => $val) {
+	$user_name = '';
+	$user_avatar = '';
+	    
+	if (@$val['reg_user'] == 0) {
+	    $user_name = ',guest';
+	} else {
+	    $user_id = $val['reg_user'];
+		
+	    if (isset($user_list[$user_id])) {
+		$user = $user_list[$user_id];
+	    } else {
+		$member_handler =& xoops_gethandler('member');
+		$user = $member_handler->getUser($user_id);
+		$user_list[$user_id] = $user;
+	    }
+		
+	    if ($xoopsModuleConfig['name_setting'] == 0) {
+		$user_name =  $user->getVar('uname');
+	    } else if ($xoopsModuleConfig['name_setting'] == 1) {
+		$user_name =  $user->getVar('name');
+	    } else if ($xoopsModuleConfig['name_setting'] == 2) {
+		$user_name = $user->getVar('uname') . '(' . $user->getVar('name') . ')';
+	    } else if ($xoopsModuleConfig['name_setting'] == 3) {
+		if ($user->getVar('name') != '') {
+		    $user_name = $user->getVar('name');
+		} else {
+		    $user_name = $user->getVar('uname');
+		}
+	    }
+		
+	    $user_avatar = XOOPS_URL . '/uploads/' . $user->getVar('user_avatar');
+	}
+
+	print $val['comment_time'];
+	
+	print ',';
+	if ($xoopsModuleConfig['show_avatar']) {
+	    print $user_avatar;
+	}
+	print ',';
+	if ($xoopsModuleConfig['show_user_id']) {
+	    print xoops_utf8_encode($user_name) . ':';
+	}
+
+	print xoops_utf8_encode($val['comment']) . "\r\n";
+    }
+}
+
+exit();

Added: tags/1.8/cinemaru/movie_comment_list.php
===================================================================
--- tags/1.8/cinemaru/movie_comment_list.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_comment_list.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,61 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/pagenavi.class.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$xoopsOption['template_main'] = $mydirname . '_comment_list.html';
+
+$groupperm_showcomment = cinemaru_checkright(constant($constpref.'_GROUPPERM_SHOWCOMMENT'));
+if ($groupperm_showcomment == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_COMMENT_READ);
+    exit();
+}
+
+$total = cinemaru_comment_get_count(@$_REQUEST['id']);
+
+$pn = new PageNavi($total, intval(@$_GET['offset']), 50);
+
+$list = cinemaru_comment_get_custom($pn->offset, $pn->limit, @$_REQUEST['id']);
+
+if ($xoopsModuleConfig['show_name_comment_list']) {
+    $member_handler =& xoops_gethandler('member');
+
+    foreach ($list as $key => $val) {
+	$user = $member_handler->getUser($val['reg_user']);
+	
+	if ($val['reg_user'] == 0 || $user == false) {
+	    $name = $xoopsModuleConfig['guest_user_name'];
+	} else {
+	    $name = $user->getVar('uname');
+	}
+	$val['uname'] = $name;
+	$list[$key] = $val;
+    }
+}
+
+
+$delcomment_admin = cinemaru_is_auth_delele_comment();
+
+$xoopsTpl->assign('show_name_comment_list', $xoopsModuleConfig['show_name_comment_list']);
+$xoopsTpl->assign('delcomment_admin', $delcomment_admin);
+$xoopsTpl->assign('need_prev_link', $pn->need_prev_link());
+$xoopsTpl->assign('need_next_link', $pn->need_next_link());
+$xoopsTpl->assign('prev', $pn->get_prev());
+$xoopsTpl->assign('next', $pn->get_next());
+$xoopsTpl->assign('top', $pn->get_top());
+$xoopsTpl->assign('last', $pn->get_last());
+$xoopsTpl->assign('total', $total);
+$xoopsTpl->assign('list', $list);
+
+$l = $pn->get_page_list();
+$xoopsTpl->assign('page_list', $l);
+
+include XOOPS_ROOT_PATH.'/footer.php';

Added: tags/1.8/cinemaru/movie_comment_post.php
===================================================================
--- tags/1.8/cinemaru/movie_comment_post.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_comment_post.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,29 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$xoopsOption['template_main'] = $mydirname . '_index.html';
+
+$groupperm_insertcomment = cinemaru_checkright(constant($constpref.'_GROUPPERM_INSERTCOMMENT'));
+
+if ($groupperm_insertcomment) {
+    cinemaru_movie_comment_up($_REQUEST['id']);
+
+    if (isset($xoopsUser)) {
+	$uid = $xoopsUser->uid();
+    } else {
+	$uid = 0;
+    }
+    cinemaru_comment_add($_REQUEST['id'], cinemaru_mb_convert_encoding($_REQUEST['comment'], $xoopsModuleConfig['tag_encoding']), intval($_REQUEST['time'] * 1000), $uid);
+}
+
+exit();

Added: tags/1.8/cinemaru/movie_delete.php
===================================================================
--- tags/1.8/cinemaru/movie_delete.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_delete.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,46 @@
+<?php
+
+include 'header.php';
+
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$movie = cinemaru_movie_get_one($_REQUEST['id']);
+
+if (isset($movie['id']) == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NOT_FOUND);
+    exit();
+}
+
+if ($movie['valid'] == 0 && cinemaru_is_auth_perm() == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NO_VALID);
+    exit();
+}
+
+if (isset($xoopsUser)) {
+    $uid = $xoopsUser->uid();
+} else {
+    $uid = 0;
+}
+
+$groupperm_touchothers = cinemaru_checkright(constant($constpref. '_GROUPPERM_TOUCHOTHERS'));
+
+if ($groupperm_touchothers == 0 && $movie['id'] != $uid) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_DEL_AUTH);
+    exit();
+}
+
+$xoopsTpl->assign('movie', $movie);
+
+$xoopsOption['template_main'] = $mydirname . '_movie_delete.html';
+
+include XOOPS_ROOT_PATH.'/footer.php';
+
+

Added: tags/1.8/cinemaru/movie_delete_do.php
===================================================================
--- tags/1.8/cinemaru/movie_delete_do.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_delete_do.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,61 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$xoopsTpl->assign('cinemaru_module_config', $xoopsModuleConfig);
+$xoopsTpl->assign('max_file_size', intval($xoopsModuleConfig['cinemaru_movie_max_size'] / 1024 / 1024));
+
+$xoopsOption['template_main'] = $mydirname . '_movie_form.html';
+
+$movie = cinemaru_movie_get_one($_REQUEST['id']);
+
+if ($movie == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NOT_FOUND);
+    exit();
+}
+
+if ($movie['valid'] == 0 && cinemaru_is_auth_perm() == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NO_VALID);
+    exit();
+}
+
+if (isset($xoopsUser)) {
+    $uid = $xoopsUser->uid();
+} else {
+    $uid = 0;
+}
+
+$groupperm_touchothers = cinemaru_checkright(constant($constpref.'_GROUPPERM_TOUCHOTHERS'));
+
+if ($groupperm_touchothers == 0 && $movie['id'] != $uid) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_DEL_AUTH);
+    exit();
+}
+
+$randam_code = $movie['randam_code'];
+$id = $movie['id'];
+    
+$d = XOOPS_ROOT_PATH . '/uploads/' . $mydirname . '/';
+$f = $id . '_' . $randam_code;
+$movie = $d . 'movie/' . $movie['file'];
+$image = $d . 'image/' . $movie['image_file'];
+
+ @ unlink($movie);
+if ($movie['image_file']) {
+    @unlink($image);
+}
+    
+cinemaru_movie_delete(@$_REQUEST['id']);
+
+redirect_header('index.php', 2, _MD_CINEMARU_DELETED);
+exit();
+

Added: tags/1.8/cinemaru/movie_do.php
===================================================================
--- tags/1.8/cinemaru/movie_do.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_do.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,156 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$groupperm_insertable = cinemaru_checkright(constant($constpref.'_GROUPPERM_INSERTABLE'));
+if ($groupperm_insertable == 0) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_REG_AUTH);
+    exit();
+}
+
+$xoopsTpl->assign('cinemaru_module_config', $xoopsModuleConfig);
+$xoopsTpl->assign('max_file_size', intval($xoopsModuleConfig['cinemaru_movie_max_size'] / 1024 / 1024));
+
+$xoopsOption['template_main'] = $mydirname . '_movie_form.html';
+
+require_once('include/validator.php');
+
+$config =  array(
+    'title' => array(
+	'name' => _MD_CINEMARU_TITLE,
+        'type' => CINEMARU_TYPE_TEXT,
+        'not_null' => 1,
+	'min' => 0,
+	'max' => 100,
+	'regexp' => null,
+    ),
+    'desc' => array(
+	'name' => _MD_CINEMARU_DESC,
+        'type' => CINEMARU_TYPE_TEXT,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 1000,
+	'regexp' => null,
+    ),
+    'genre' => array(
+	'name' => _MD_CINEMARU_GENRE,
+        'type' => CINEMARU_TYPE_NUMERIC,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 200,
+	'regexp' => null,
+    ),
+);
+
+if (isset($_FILES['file'])) {
+    $config['file'] = array(
+	'name' => _MD_CINEMARU_MOVIE_FILE,
+        'type' => CINEMARU_TYPE_FILE_FLV_MP3,
+        'not_null' => 1,
+	'min' => 0,
+	'max' => 0,
+	'regexp' => null,
+    );
+    $file_type = constant($constpref.'_FORM_FILE_TYPE_FLV_MP3');
+} else {
+    $config['file_url'] = array(
+	'name' => _MD_CINEMARU_FILE_URL,
+        'type' => CINEMARU_TYPE_URL,
+        'not_null' => 1,
+	'min' => 0,
+	'max' => 100,
+	'regexp' => null,
+    );
+    if (preg_match('/^http:\/\/[a-z]+\.youtube\.com\//i', @$_POST['file_url'])) {
+	$file_type = constant($constpref.'_FORM_FILE_TYPE_YOUTUBE_URL');
+    } else {
+	$file_type = constant($constpref.'_FORM_FILE_TYPE_FILE_URL');
+    }
+}
+if (isset($_FILES['image_file'])) {
+    $config['image_file'] = array(
+	'name' => _MD_CINEMARU_THUMB_FILE,
+        'type' => CINEMARU_TYPE_FILE_FLV_MP3,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 0,
+	'regexp' => null,
+    );
+    $image_file_type = constant($constpref.'_FORM_FILE_TYPE_IMAGE');
+} else {
+    $config['image_file_url'] = array(
+	'name' => _MD_CINEMARU_THUMB_FILE,
+        'type' => CINEMARU_TYPE_URL,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 100,
+	'regexp' => null,
+    );
+    $image_file_type = constant($constpref.'_FORM_FILE_TYPE_IMAGE_URL');
+}
+
+$error = cinemaru_validator($config);
+
+if (0 < count($error)) {
+    // エラーあり
+    
+    $groupperm_superinsert = cinemaru_checkright(constant($constpref.'_GROUPPERM_SUPERINSERT'));
+    $xoopsTpl->assign('superinsert', $groupperm_superinsert);
+    $xoopsTpl->assign('error', $error);
+} else {
+    // エラーなし
+    
+    cinemaru_mkdir_p();
+
+    $valid = cinemaru_checkright(constant($constpref.'_GROUPPERM_SUPERINSERT'));
+    
+    $randam_code = cinemaru_get_randam_code();
+    $id = cinemaru_movie_add($randam_code, $valid);
+
+    if ($file_type == constant($constpref.'_FORM_FILE_TYPE_FLV_MP3')) {
+	preg_match('/\.(flv|mp3)$/i', $_FILES['file']['name'], $r);
+	$movie_ext = @$r[1];
+    }
+    if ($image_file_type == constant($constpref.'_FORM_FILE_TYPE_IMAGE')) {
+	preg_match('/\.(jpg|jpeg|png|gif)$/i', $_FILES['image_file']['name'], $r);
+	$image_ext = @$r[1];
+    }
+
+    cinemaru_movie_file_name_update($id, $randam_code, @$movie_ext, @$image_ext, @$_POST['file_url'], @$_POST['image_file_url'], $file_type);
+
+    $d = XOOPS_ROOT_PATH . '/uploads/' . $mydirname . '/';
+    $f = $id . '_' . $randam_code;
+    
+    if ($file_type == constant($constpref.'_FORM_FILE_TYPE_FLV_MP3')) {
+	$movie = $d . 'movie/' . $f . '.' . $movie_ext;
+	move_uploaded_file($_FILES['file']['tmp_name'], $movie);
+    }
+    if ($image_file_type == constant($constpref.'_FORM_FILE_TYPE_IMAGE')) {
+	$image = $d . 'image/' . $f . '.' . $image_ext;
+	if ($_FILES['image_file']['tmp_name'] != '') {
+	    move_uploaded_file($_FILES['image_file']['tmp_name'], $image);
+	}
+    }
+    
+    $tags['POST_NAME'] = $_REQUEST['title'];
+    $tags['POST_URL'] = XOOPS_URL . '/modules/' . $mydirname . '/movie.php?id=' . intval($id);
+    
+    $notification_handler =& xoops_gethandler('notification');
+    $notification_handler->triggerEvent('global', 0, 'new_post', $tags);
+    
+    redirect_header('movie.php?id=' . intval($id), 2, _MD_CINEMARU_THANKSSUBMIT);
+    exit();
+}
+
+include XOOPS_ROOT_PATH.'/footer.php';
+
+

Added: tags/1.8/cinemaru/movie_edit.php
===================================================================
--- tags/1.8/cinemaru/movie_edit.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_edit.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,61 @@
+<?php
+
+include 'header.php';
+
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$movie = cinemaru_movie_get_one($_REQUEST['id']);
+
+if (isset($movie['id']) == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NOT_FOUND);
+    exit();
+}
+
+if ($movie['valid'] == 0 && cinemaru_is_auth_perm() == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NO_VALID);
+    exit();
+}
+
+if (isset($xoopsUser)) {
+    $uid = $xoopsUser->uid();
+} else {
+    $uid = 0;
+}
+
+$groupperm_touchothers = cinemaru_checkright(constant($constpref.'_GROUPPERM_TOUCHOTHERS'));
+
+if ($groupperm_touchothers == 0 && $movie['owner'] != $uid) {
+    redirect_header('index.php', 2, _MD_CINEAMRU_NO_EDIT_AUTH);
+    exit();
+}
+
+// richtext check
+if ($xoopsModuleConfig['richtext']) {
+    require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+    $f = new XoopsFormDhtmlTextArea("", 'desc', @$movie['desc'], 15, 50);
+    $xoopsTpl->assign('rich_form', $f->render());
+}
+
+$groupperm_superedit = cinemaru_checkright(constant($constpref.'_GROUPPERM_SUPEREDIT'));
+
+$xoopsTpl->assign('superedit', $groupperm_superedit);
+$xoopsTpl->assign('cinemaru_module_config', $xoopsModuleConfig);
+$xoopsTpl->assign('max_file_size', intval($xoopsModuleConfig['cinemaru_movie_max_size'] / 1024 / 1024));
+
+$xoopsTpl->assign('movie', $movie);
+$xoopsTpl->assign('edit', 1);
+
+$xoopsOption['template_main'] = 'cinemaru_movie_form.html';
+
+include XOOPS_ROOT_PATH.'/footer.php';
+
+
+

Added: tags/1.8/cinemaru/movie_edit_do.php
===================================================================
--- tags/1.8/cinemaru/movie_edit_do.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_edit_do.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,205 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$xoopsTpl->assign('cinemaru_module_config', $xoopsModuleConfig);
+$xoopsTpl->assign('max_file_size', intval($xoopsModuleConfig['cinemaru_movie_max_size'] / 1024 / 1024));
+
+$xoopsOption['template_main'] = $mydirname . '_movie_form.html';
+
+require_once('include/validator.php');
+
+$config =  array(
+    'title' => array(
+	'name' => _MD_CINEMARU_TITLE,
+        'type' => CINEMARU_TYPE_TEXT,
+        'not_null' => 1,
+	'min' => 0,
+	'max' => 100,
+	'regexp' => null,
+    ),
+    'desc' => array(
+	'name' => _MD_CINEMARU_DESC,
+        'type' => CINEMARU_TYPE_TEXT,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 1000,
+	'regexp' => null,
+    ),
+    'genre' => array(
+	'name' => _MD_CINEMARU_DESC,
+        'type' => CINEMARU_TYPE_NUMERIC,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 200,
+	'regexp' => null,
+    ),
+);
+
+if (@$_FILES['file']['tmp_name'] != '') {
+    $config['file'] = array(
+	'name' => _MD_CINEMARU_MOVIE_FILE,
+        'type' => CINEMARU_TYPE_FILE_FLV_MP3,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 0,
+	'regexp' => null,
+    );
+    $file_type = constant($constpref.'_FORM_FILE_TYPE_FLV_MP3');
+} else if (@$_POST['file_url'] != '') {
+    $config['file_url'] = array(
+	'name' => _MD_CINEMARU_FILE_URL,
+        'type' => CINEMARU_TYPE_URL,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 100,
+	'regexp' => null,
+    );
+    if (preg_match('/^http:\/\/[a-z]+\.youtube\.com\//i', @$_POST['file_url'])) {
+	$file_type = constant($constpref.'_FORM_FILE_TYPE_YOUTUBE_URL');
+    } else {
+	$file_type = constant($constpref.'_FORM_FILE_TYPE_FILE_URL');
+    }
+} else {
+    $file_type = 0;
+}
+
+if (isset($_FILES['image_file'])) {
+    $config['image_file'] = array(
+	'name' => _MD_CINEMARU_THUMB_FILE,
+        'type' => CINEMARU_TYPE_FILE_FLV_MP3,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 0,
+	'regexp' => null,
+    );
+    $image_file_type = constant($constpref.'_FORM_FILE_TYPE_IMAGE');
+} else {
+    $config['image_file_url'] = array(
+	'name' => _MD_CINEMARU_THUMB_FILE,
+        'type' => CINEMARU_TYPE_URL,
+        'not_null' => 0,
+	'min' => 0,
+	'max' => 100,
+	'regexp' => null,
+    );
+    $image_file_type = constant($constpref.'_FORM_FILE_TYPE_IMAGE_URL');
+}
+
+$movie = cinemaru_movie_get_one($_REQUEST['id']);
+
+if (isset($movie['id']) == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NOT_FOUND);
+    exit();
+}
+
+if ($movie['valid'] == 0 && cinemaru_is_auth_perm() == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NO_VALID);
+    exit();
+}
+
+if (isset($xoopsUser)) {
+    $uid = $xoopsUser->uid();
+} else {
+    $uid = 0;
+}
+
+$groupperm_touchothers = cinemaru_checkright(constant($constpref.'_GROUPPERM_TOUCHOTHERS'));
+
+if ($groupperm_touchothers == 0 && $movie['owner'] != $uid) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_EDIT_AUTH);
+    exit();
+}
+
+$error = cinemaru_validator($config);
+
+if (0 < count($error)) {
+    // エラーあり
+    
+    // richtext check
+    if ($xoopsModuleConfig['richtext']) {
+	require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+	$f = new XoopsFormDhtmlTextArea("", 'desc', @$movie['desc'], 15, 50);
+	$xoopsTpl->assign('rich_form', $f->render());
+    }
+    
+    $xoopsTpl->assign('edit', 1);
+    $xoopsTpl->assign('error', $error);
+} else {
+    // エラーなし
+    
+    if ($file_type == constant($constpref.'_FORM_FILE_TYPE_FLV_MP3')) {
+	preg_match('/\.(flv|mp3)$/i', $_FILES['file']['name'], $r);
+	$movie_ext = @$r[1];
+    }
+    if ($image_file_type == constant($constpref.'_FORM_FILE_TYPE_IMAGE')) {
+	preg_match('/\.(jpg|jpeg|png|gif)$/i', $_FILES['image_file']['name'], $r);
+	$image_ext = @$r[1];
+    }
+    
+    $randam_code = $movie['randam_code'];
+    $id = $movie['id'];
+    
+    $d = XOOPS_ROOT_PATH . '/uploads/' . $mydirname . '/';
+    $f = $id . '_' . $randam_code;
+
+    $old_movie = '';
+    $new_movie = '';
+    $movie_f = '';
+    if (@$_FILES['file']['tmp_name'] != '') {
+	$old_movie = $d . 'movie/' . $movie['file'];
+	$new_movie = $d . 'movie/' . $f . '.' . $movie_ext;
+	
+	if (file_exists($old_movie)) {
+	    @unlink($old_movie);
+	}
+	move_uploaded_file($_FILES['file']['tmp_name'], $new_movie);
+	$movie_f = $f . '.' . $movie_ext;;
+    }
+
+    $image = '';
+    if (@$_FILES['image_file']['tmp_name'] != '') {
+	$old_image = $d . 'image/' . $movie['image_file'];
+	$new_image = $d . 'image/' . $f . '.' . $image_ext;
+	
+	if (file_exists($old_image)) {
+	    @unlink($old_image);
+	}
+	move_uploaded_file($_FILES['image_file']['tmp_name'], $new_image);
+	$image = $f . '.' . $image_ext;;
+    }
+
+    if ($uid != $movie['owner']) {
+	$groupperm_superedit = cinemaru_checkright(constant($constpref.'_GROUPPERM_SUPEREDIT'));
+	if ($groupperm_superedit) {
+	    $valid = 1;
+	} else {
+	    $valid = 0;
+	}
+    } else {
+	$valid = 1;
+    }
+    
+    $tags['POST_NAME'] = $_REQUEST['title'];
+    $tags['POST_URL'] = XOOPS_URL . '/modules/' . $mydirname . '/movie.php?id=' . intval($_REQUEST['id']);
+    
+    $notification_handler =& xoops_gethandler('notification');
+    $notification_handler->triggerEvent('global', 0, 'update', $tags);
+    
+    cinemaru_movie_title_desc_update(@$_REQUEST['id'], @$_REQUEST['title'], @$_REQUEST['desc'], @$_REQUEST['tag_lock'], @$movie_f, @$image, $valid, @$_POST['file_url'], @$_POST['image_file_url'], $file_type);
+
+    redirect_header('movie.php?id=' . @$_REQUEST['id'], 2, _MD_CINEMARU_UPDATED);
+    exit();
+}
+
+include XOOPS_ROOT_PATH.'/footer.php';
+
+

Added: tags/1.8/cinemaru/movie_form.php
===================================================================
--- tags/1.8/cinemaru/movie_form.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_form.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,38 @@
+<?php
+
+include 'header.php';
+
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$groupperm_insertable = cinemaru_checkright(constant($constpref.'_GROUPPERM_INSERTABLE'));
+if ($groupperm_insertable == 0) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_REG_AUTH);
+    exit();
+}
+
+// richtext check
+if ($xoopsModuleConfig['richtext']) {
+    require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+    $f = new XoopsFormDhtmlTextArea("", 'desc', @$desc, 15, 50);
+    $xoopsTpl->assign('rich_form', $f->render());
+}
+
+$groupperm_superinsert = cinemaru_checkright(constant($constpref.'_GROUPPERM_SUPERINSERT'));
+
+$xoopsTpl->assign('superinsert', $groupperm_superinsert);
+$xoopsTpl->assign('xoops_module_config', $xoopsModuleConfig);
+$xoopsTpl->assign('max_file_size', sprintf('%4.1f', $xoopsModuleConfig['cinemaru_movie_max_size'] / 1024 / 1024));
+
+$xoopsOption['template_main'] = $mydirname . '_movie_form.html';
+
+include XOOPS_ROOT_PATH.'/footer.php';
+
+
+

Added: tags/1.8/cinemaru/movie_report.php
===================================================================
--- tags/1.8/cinemaru/movie_report.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_report.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,97 @@
+<?php
+
+include 'header.php';
+
+require_once('include/db.php');
+require_once('constants.php');
+require_once('include/groupperm_function.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$movie = cinemaru_movie_get_one(@$_REQUEST['id']);
+
+if ($movie == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NOT_FOUND);
+    exit();
+}
+
+$groupperm_report = cinemaru_checkright(constant($constpref.'_GROUPPERM_REPORT'));
+
+if ($groupperm_report == 0) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_REPORT_AUTH);
+    exit();
+}
+
+if (@$xoopsModuleConfig['show_name_movie']) {
+    $member_handler =& xoops_gethandler('member');
+    
+    if ($movie['owner'] == 0) {
+	$user_name =  $xoopsModuleConfig['guest_user_name'];
+    } else {
+	$user = $member_handler->getUser($movie['owner']);
+
+	if ($xoopsModuleConfig['name_setting'] == 0) {
+	    $user_name =  $user->getVar('uname');
+	} else if ($xoopsModuleConfig['name_setting'] == 1) {
+	    $user_name =  $user->getVar('name');
+	} else if ($xoopsModuleConfig['name_setting'] == 2) {
+	    $user_name = $user->getVar('uname') . '(' . $user->getVar('name') . ')';
+	} else if ($xoopsModuleConfig['name_setting'] == 3) {
+	    if ($user->getVar('name') != '') {
+		$user_name = $user->getVar('name');
+	    } else {
+		$user_name = $user->getVar('uname');
+	    }
+	}
+    }
+    
+    $xoopsTpl->assign('user_name', $user_name);
+}
+
+$valid = cinemaru_is_auth_perm();
+$groupperm_showcomment = cinemaru_checkright(constant($constpref.'_GROUPPERM_SHOWCOMMENT'));
+$groupperm_comment = cinemaru_checkright(constant($constpref.'_GROUPPERM_INSERTCOMMENT'));
+$groupperm_editable = cinemaru_checkright(constant($constpref.'_GROUPPERM_EDITABLE'));
+$groupperm_touchothers = cinemaru_checkright(constant($constpref.'_GROUPPERM_TOUCHOTHERS'));
+$groupperm_tag_insertable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGINSERTABLE'));
+$groupperm_tag_deletable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGDELETABLE'));
+$groupperm_tag_editable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGEDITABLE'));
+
+$xoopsTpl->assign('show_report_link', $xoopsModuleConfig['show_report_link']);
+$xoopsTpl->assign('', $xoopsModuleConfig['show_name_movie']);
+$xoopsTpl->assign('auth_valid', $valid);
+$xoopsTpl->assign('showcomment', $groupperm_showcomment);
+$xoopsTpl->assign('commentok', $groupperm_comment);
+$xoopsTpl->assign('editable', $groupperm_editable);
+$xoopsTpl->assign('touchothers', $groupperm_touchothers);
+$xoopsTpl->assign('tag_insertable', $groupperm_tag_insertable);
+$xoopsTpl->assign('tag_deletable', $groupperm_tag_deletable);
+$xoopsTpl->assign('tag_editable', $groupperm_tag_editable);
+
+$list = cinemaru_tag_get($_REQUEST['id']);
+
+$tag = '';
+foreach ($list as $val) {
+    $tag .= '<A HREF="index.php?tag=' . intval($val['tags_id']) . '">';
+    $tag .= htmlspecialchars($val['name']) . '</A> ';
+}
+$xoopsTpl->assign('tag', $tag);
+
+cinemaru_movie_counter_up($_REQUEST['id']);
+
+$movie['counter']++;
+
+if (isset($xoopsUser)) {
+    $xoopsTpl->assign('user_avatar', $xoopsUser->getVar('user_avatar'));
+}
+$xoopsTpl->assign('movie', $movie);
+
+$xoopsOption['template_main'] = $mydirname . '_report_form.html';
+
+include XOOPS_ROOT_PATH.'/footer.php';
+
+

Added: tags/1.8/cinemaru/movie_report_delete.php
===================================================================
--- tags/1.8/cinemaru/movie_report_delete.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_report_delete.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,24 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$groupperm_report_list = cinemaru_checkright(constant($constpref.'_GROUPPERM_REPORT_LIST'));
+if ($groupperm_report_list == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_REPORT_LIST_AUTH);
+    exit();
+}
+
+cinemaru_report_delete($_REQUEST['report_id']);
+
+redirect_header('movie_report_list.php', 2, _MD_CINEMARU_DELETED_REPORT);
+
+exit();
+

Added: tags/1.8/cinemaru/movie_report_do.php
===================================================================
--- tags/1.8/cinemaru/movie_report_do.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_report_do.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,33 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$movie = cinemaru_movie_get_one(@$_REQUEST['id']);
+
+if ($movie == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NOT_FOUND);
+    exit();
+}
+
+$groupperm_report = cinemaru_checkright(constant($constpref.'_GROUPPERM_REPORT'));
+
+if ($groupperm_report == 0) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_REPORT_AUTH);
+    exit();
+}
+
+cinemaru_movie_report_add($_POST['id'], $_POST['category'], $_POST['comment']);
+
+redirect_header('index.php', 2, _MD_CINEMARU_REPORTED);
+exit();
+

Added: tags/1.8/cinemaru/movie_report_list.php
===================================================================
--- tags/1.8/cinemaru/movie_report_list.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_report_list.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,54 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/pagenavi.class.php');
+require_once('constants.php');
+require_once('include/misc.php');
+
+include XOOPS_ROOT_PATH.'/header.php';
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$xoopsOption['template_main'] = $mydirname . '_report_list.html';
+
+$groupperm_report_list = cinemaru_checkright(constant($constpref.'_GROUPPERM_REPORT_LIST'));
+if ($groupperm_report_list == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_REPORT_LIST_AUTH);
+    exit();
+}
+
+$total = cinemaru_report_get_count();
+
+$pn = new PageNavi($total, intval(@$_GET['offset']), 50);
+
+$list = cinemaru_report_get_custom($pn->offset, $pn->limit);
+
+$member_handler =& xoops_gethandler('member');
+
+foreach ($list as $key => $val) {
+    if ($val['reg_user'] == 0) {
+	$name = $xoopsModuleConfig['guest_user_name'];
+    } else {
+	$user = $member_handler->getUser($val['reg_user']);
+	$name = $user->getVar('uname');
+    }
+    $val['uname'] = $name;
+    $list[$key] = $val;
+}
+
+$xoopsTpl->assign('need_prev_link', $pn->need_prev_link());
+$xoopsTpl->assign('need_next_link', $pn->need_next_link());
+$xoopsTpl->assign('prev', $pn->get_prev());
+$xoopsTpl->assign('next', $pn->get_next());
+$xoopsTpl->assign('top', $pn->get_top());
+$xoopsTpl->assign('last', $pn->get_last());
+$xoopsTpl->assign('total', $total);
+$xoopsTpl->assign('list', $list);
+
+$l = $pn->get_page_list();
+$xoopsTpl->assign('page_list', $l);
+
+include XOOPS_ROOT_PATH.'/footer.php';

Added: tags/1.8/cinemaru/movie_valid_do.php
===================================================================
--- tags/1.8/cinemaru/movie_valid_do.php	                        (rev 0)
+++ tags/1.8/cinemaru/movie_valid_do.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,46 @@
+<?php
+
+include 'header.php';
+
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+$xoopsTpl->assign('cinemaru_module_config', $xoopsModuleConfig);
+$xoopsTpl->assign('max_file_size', intval($xoopsModuleConfig['cinemaru_movie_max_size'] / 1024 / 1024));
+
+$xoopsOption['template_main'] = 'cinemaru_movie_form.html';
+
+$movie = cinemaru_movie_get_one($_REQUEST['id']);
+
+if ($movie == false) {
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NOT_FOUND);
+    exit();
+}
+
+if (isset($xoopsUser)) {
+    $uid = $xoopsUser->uid();
+} else {
+    $uid = 0;
+}
+
+$valid = cinemaru_is_auth_perm();
+
+if ($valid == 0) {
+    redirect_header('index.php', 2, _MD_CINEMARU_NO_VALID_AUTH);
+    exit();
+}
+
+if (isset($_GET['novalid'])) {
+    cinemaru_movie_valid_update(@$_REQUEST['id'], 0);
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_NG_VALIDED);
+} else {
+    cinemaru_movie_valid_update(@$_REQUEST['id'], 1);
+    redirect_header('index.php', 2, _MD_CINEMARU_MOVIE_VALIDED);
+}
+
+exit();
+
+

Added: tags/1.8/cinemaru/notification_update.php
===================================================================
--- tags/1.8/cinemaru/notification_update.php	                        (rev 0)
+++ tags/1.8/cinemaru/notification_update.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,4 @@
+<?php
+
+include '../../mainfile.php';
+include XOOPS_ROOT_PATH.'/include/notification_update.php';

Added: tags/1.8/cinemaru/oninstall.php
===================================================================
--- tags/1.8/cinemaru/oninstall.php	                        (rev 0)
+++ tags/1.8/cinemaru/oninstall.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,156 @@
+<?php
+$mydirname = basename( dirname( __FILE__ ) ) ;
+
+eval( ' function xoops_module_install_'.$mydirname.'( $module ) { return d3schedule_oninstall_base( $module , "'.$mydirname.'" ) ; } ' ) ;
+
+
+if( ! function_exists( 'd3schedule_oninstall_base' ) ) {
+
+function d3schedule_oninstall_base( $module , $mydirname )
+{
+	// transations on module install
+
+	global $ret ; // TODO :-D
+        global $xoopsDB;
+
+	// for Cube 2.1
+	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		$root =& XCube_Root::getSingleton();
+		$root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleInstall.' . ucfirst($mydirname) . '.Success' , 'd3schedule_message_append_oninstall' ) ;
+		$ret = array() ;
+	} else {
+		if( ! is_array( $ret ) ) $ret = array() ;
+	}
+
+	$db =& Database::getInstance() ;
+	$mid = $module->getVar('mid') ;
+
+	// TABLES (loading mysql.sql)
+	$sql_file_path = dirname(__FILE__).'/sql/mysql.sql' ;
+	$prefix_mod = $db->prefix() . '_' . $mydirname ;
+	if( file_exists( $sql_file_path ) ) {
+		$ret[] = "SQL file found at <b>".htmlspecialchars($sql_file_path)."</b>.<br /> Creating tables...";
+
+		if( file_exists( XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php' ) ) {
+			include_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php' ;
+			$sqlutil =& new OldSqlUtility ;
+		} else {
+			include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php' ;
+			$sqlutil =& new SqlUtility ;
+		}
+
+		$sql_query = trim( file_get_contents( $sql_file_path ) ) ;
+		$sqlutil->splitMySqlFile( $pieces , $sql_query ) ;
+		$created_tables = array() ;
+		foreach( $pieces as $piece ) {
+			$prefixed_query = $sqlutil->prefixQuery( $piece , $prefix_mod ) ;
+			if( ! $prefixed_query ) {
+				$ret[] = "Invalid SQL <b>".htmlspecialchars($piece)."</b><br />";
+				return false ;
+			}
+			if( ! $db->query( $prefixed_query[0] ) ) {
+				$ret[] = '<b>'.htmlspecialchars( $db->error() ).'</b><br />' ;
+				//var_dump( $db->error() ) ;
+				return false ;
+			} else {
+				if( ! in_array( $prefixed_query[4] , $created_tables ) ) {
+					$ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4]).'</b> created.<br />';
+					$created_tables[] = $prefixed_query[4];
+				} else {
+					$ret[] = 'Data inserted to table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4]).'</b>.</br />';
+				}
+			}
+		}
+	}
+
+	// TEMPLATES
+	$tplfile_handler =& xoops_gethandler( 'tplfile' ) ;
+	$tpl_path = dirname(__FILE__).'/templates' ;
+    
+	if( $handler = @opendir( $tpl_path . '/' ) ) {
+		while( ( $file = readdir( $handler ) ) !== false ) {
+			if( substr( $file , 0 , 1 ) == '.' ) continue ;
+			$file_path = $tpl_path . '/' . $file ;
+			if( is_file( $file_path ) ) {
+				$mtime = intval( @filemtime( $file_path ) ) ;
+				$tplfile =& $tplfile_handler->create() ;
+				$tplfile->setVar( 'tpl_source' , file_get_contents( $file_path ) , true ) ;
+				$tplfile->setVar( 'tpl_refid' , $mid ) ;
+				$tplfile->setVar( 'tpl_tplset' , 'default' ) ;
+				$tplfile->setVar( 'tpl_file' , $mydirname . '_' . $file ) ;
+				$tplfile->setVar( 'tpl_desc' , '' , true ) ;
+				$tplfile->setVar( 'tpl_module' , $mydirname ) ;
+				$tplfile->setVar( 'tpl_lastmodified' , $mtime ) ;
+				$tplfile->setVar( 'tpl_lastimported' , 0 ) ;
+				$tplfile->setVar( 'tpl_type' , 'module' ) ;
+				if( ! $tplfile_handler->insert( $tplfile ) ) {
+					$ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span><br />';
+				} else {
+					$tplid = $tplfile->getVar( 'tpl_id' ) ;
+					$ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />';
+					// generate compiled file
+					include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
+					include_once XOOPS_ROOT_PATH.'/class/template.php' ;
+					if( ! xoops_template_touch( $tplid ) ) {
+						$ret[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b>.</span><br />';
+					} else {
+						$ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> compiled.</span><br />';
+					}
+				}
+			}
+		}
+		closedir( $handler ) ;
+	}
+	include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
+	include_once XOOPS_ROOT_PATH.'/class/template.php' ;
+	xoops_template_clear_module_cache( $mid ) ;
+
+	// BLOCKS
+	$tpl_path = dirname(__FILE__).'/templates/blocks' ;
+	if( $handler = @opendir( $tpl_path . '/' ) ) {
+		while( ( $file = readdir( $handler ) ) !== false ) {
+			if( substr( $file , 0 , 1 ) == '.' ) continue ;
+			$file_path = $tpl_path . '/' . $file ;
+			if( is_file( $file_path ) && substr( $file , -5 ) == '.html' ) {
+				$mtime = intval( @filemtime( $file_path ) ) ;
+				$tpl_file = $mydirname . '_' . $file;
+				$sql = "SELECT tpl_id FROM ".$db->prefix('tplfile')." WHERE tpl_module='$mydirname' AND tpl_file='".mysql_escape_string($tpl_file)."'";
+				list($tpl_id) = $db->fetchRow($db->query($sql));
+				$tpl_source = file_get_contents( $file_path );
+				if (!empty($tpl_id) && isset($tpl_source) && $tpl_source != '') {
+					$sql = sprintf("INSERT INTO %s (tpl_id, tpl_source) VALUES (%u, %s)", $db->prefix('tplsource'), $tpl_id, $db->quoteString($tpl_source));
+					if( !$result = $db->query($sql) ) {
+						$ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span><br />';
+					} else {
+						$ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$tpl_id.'</b>)<br />';
+						// generate compiled file
+						include_once XOOPS_ROOT_PATH.'/class/template.php';
+						if( ! xoops_template_touch( $tpl_id ) ) {
+							$ret[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b>.</span><br />';
+						} else {
+							$ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> compiled.</span><br />';
+						}
+					}
+				}
+			}
+		}
+		closedir( $handler ) ;
+	}
+    
+	return true ;
+}
+
+function d3schedule_message_append_oninstall( &$module_obj , &$log )
+{
+	if( is_array( @$GLOBALS['ret'] ) ) {
+		foreach( $GLOBALS['ret'] as $message ) {
+			$log->add( strip_tags( $message ) ) ;
+		}
+	}
+
+	// use mLog->addWarning() or mLog->addError() if necessary
+}
+
+}
+
+?>

Added: tags/1.8/cinemaru/onuninstall.php
===================================================================
--- tags/1.8/cinemaru/onuninstall.php	                        (rev 0)
+++ tags/1.8/cinemaru/onuninstall.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,79 @@
+<?php
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+
+eval( ' function xoops_module_uninstall_'.$mydirname.'( $module ) { return d3schedule_onuninstall_base( $module , "'.$mydirname.'" ) ; } ' ) ;
+
+
+if( ! function_exists( 'd3schedule_onuninstall_base' ) ) {
+
+function d3schedule_onuninstall_base( $module , $mydirname )
+{
+	// transations on module uninstall
+
+	global $ret ; // TODO :-D
+
+	// for Cube 2.1
+	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		$root =& XCube_Root::getSingleton();
+		$root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '.Success' , 'd3schedule_message_append_onuninstall' ) ;
+		$ret = array() ;
+	} else {
+		if( ! is_array( $ret ) ) $ret = array() ;
+	}
+
+	$db =& Database::getInstance() ;
+	$mid = $module->getVar('mid') ;
+
+	// TABLES (loading mysql.sql)
+	$sql_file_path = dirname(__FILE__).'/sql/mysql.sql' ;
+	$prefix_mod = $db->prefix() . '_' . $mydirname ;
+	if( file_exists( $sql_file_path ) ) {
+		$ret[] = "SQL file found at <b>".htmlspecialchars($sql_file_path)."</b>.<br  /> Deleting tables...<br />";
+		$sql_lines = file( $sql_file_path ) ;
+		foreach( $sql_lines as $sql_line ) {
+			if( preg_match( '/^CREATE TABLE \`?([a-zA-Z0-9_-]+)\`? /i' , $sql_line , $regs ) ) {
+				$sql = 'DROP TABLE '.addslashes($prefix_mod.'_'.$regs[1]);
+				if (!$db->query($sql)) {
+					$ret[] = '<span style="color:#ff0000;">ERROR: Could not drop table <b>'.htmlspecialchars($prefix_mod.'_'.$regs[1]).'<b>.</span><br />';
+				} else {
+					$ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$regs[1]).'</b> dropped.<br />';
+				}
+			}
+		}
+	}
+
+	// TEMPLATES (Not necessary because modulesadmin removes all templates)
+	/* $tplfile_handler =& xoops_gethandler( 'tplfile' ) ;
+	$templates =& $tplfile_handler->find( null , 'module' , $mid ) ;
+	$tcount = count( $templates ) ;
+	if( $tcount > 0 ) {
+		$ret[] = 'Deleting templates...' ;
+		for( $i = 0 ; $i < $tcount ; $i ++ ) {
+			if( ! $tplfile_handler->delete( $templates[$i] ) ) {
+				$ret[] = '<span style="color:#ff0000;">ERROR: Could not delete template '.$templates[$i]->getVar('tpl_file','s').' from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id','s').'</b></span><br />';
+			} else {
+				$ret[] = 'Template <b>'.$templates[$i]->getVar('tpl_file','s').'</b> deleted from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id','s').'</b><br />';
+			}
+		}
+	}
+	unset($templates); */
+
+
+	return true ;
+}
+
+function d3schedule_message_append_onuninstall( &$module_obj , &$log )
+{
+	if( is_array( @$GLOBALS['ret'] ) ) {
+		foreach( $GLOBALS['ret'] as $message ) {
+			$log->add( strip_tags( $message ) ) ;
+		}
+	}
+
+	// use mLog->addWarning() or mLog->addError() if necessary
+}
+
+}
+
+?>

Added: tags/1.8/cinemaru/onupdate.php
===================================================================
--- tags/1.8/cinemaru/onupdate.php	                        (rev 0)
+++ tags/1.8/cinemaru/onupdate.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,175 @@
+<?php
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+eval( ' function xoops_module_update_'.$mydirname.'( $module ) { return d3schedule_onupdate_base( $module , "'.$mydirname.'" ) ; } ' ) ;
+
+
+if( ! function_exists( 'd3schedule_onupdate_base' ) ) {
+
+function d3schedule_onupdate_base( $module , $mydirname )
+{
+	// transations on module update
+
+	global $msgs ; // TODO :-D
+        global $xoopsDB;
+    
+	// for Cube 2.1
+	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		$root =& XCube_Root::getSingleton();
+		$root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUpdate.' . ucfirst($mydirname) . '.Success', 'd3schedule_message_append_onupdate' ) ;
+		$msgs = array() ;
+	} else {
+		if( ! is_array( $msgs ) ) $msgs = array() ;
+	}
+
+	$db =& Database::getInstance() ;
+	$mid = $module->getVar('mid') ;
+
+	// TEMPLATES (all templates have been already removed by modulesadmin)
+	$tplfile_handler =& xoops_gethandler( 'tplfile' ) ;
+	$tpl_path = dirname(__FILE__).'/templates' ;
+	if( $handler = @opendir( $tpl_path . '/' ) ) {
+		while( ( $file = readdir( $handler ) ) !== false ) {
+			if( substr( $file , 0 , 1 ) == '.' ) continue ;
+			$file_path = $tpl_path . '/' . $file ;
+			if( is_file( $file_path ) ) {
+				$mtime = intval( @filemtime( $file_path ) ) ;
+				$tplfile =& $tplfile_handler->create() ;
+				$tplfile->setVar( 'tpl_source' , file_get_contents( $file_path ) , true ) ;
+				$tplfile->setVar( 'tpl_refid' , $mid ) ;
+				$tplfile->setVar( 'tpl_tplset' , 'default' ) ;
+				$tplfile->setVar( 'tpl_file' , $mydirname . '_' . $file ) ;
+				$tplfile->setVar( 'tpl_desc' , '' , true ) ;
+				$tplfile->setVar( 'tpl_module' , $mydirname ) ;
+				$tplfile->setVar( 'tpl_lastmodified' , $mtime ) ;
+				$tplfile->setVar( 'tpl_lastimported' , 0 ) ;
+				$tplfile->setVar( 'tpl_type' , 'module' ) ;
+				if( ! $tplfile_handler->insert( $tplfile ) ) {
+					$msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span>';
+				} else {
+					$tplid = $tplfile->getVar( 'tpl_id' ) ;
+					$msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$tplid.'</b>)';
+					// generate compiled file
+					include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
+					include_once XOOPS_ROOT_PATH.'/class/template.php' ;
+					if( ! xoops_template_touch( $tplid ) ) {
+						$msgs[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b>.</span>';
+					} else {
+						$msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> compiled.</span>';
+					}
+				}
+			}
+		}
+		closedir( $handler ) ;
+	}
+	include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ;
+	include_once XOOPS_ROOT_PATH.'/class/template.php' ;
+	xoops_template_clear_module_cache( $mid ) ;
+
+    	// BLOCKS
+	$tpl_path = dirname(__FILE__).'/templates/blocks' ;
+	if( $handler = @opendir( $tpl_path . '/' ) ) {
+		while( ( $file = readdir( $handler ) ) !== false ) {
+			if( substr( $file , 0 , 1 ) == '.' ) continue ;
+			$file_path = $tpl_path . '/' . $file ;
+			if( is_file( $file_path ) && substr( $file , -5 ) == '.html' ) {
+				$mtime = intval( @filemtime( $file_path ) ) ;
+				$tpl_file = $mydirname . '_' . $file;
+				$tpl_source = file_get_contents( $file_path );
+				$sql = "SELECT tpl_id, tpl_refid FROM ".$db->prefix('tplfile')." WHERE tpl_module='$mydirname' AND tpl_file='".mysql_escape_string($tpl_file)."'";
+				list($tpl_id, $block_id) = $db->fetchRow($db->query($sql));
+				if( empty($tpl_id) && empty($block_id)){
+					$blocks_info = $module->getInfo('blocks');
+					$show_func = '';
+					foreach($blocks_info as $oneblock){
+						if($tpl_file == $oneblock['template']){
+							$show_func = $oneblock['show_func'];
+							break;
+						}
+					}
+					if( $show_func != ''){
+						$sql = sprintf("SELECT bid FROM %s WHERE dirname=%s AND show_func=%s", $db->prefix("newblocks"), $db->quoteString($mydirname), $db->quoteString($show_func) ) ;
+						list($block_id) = $xoopsDB->fetchRow($xoopsDB->query($sql));
+						if($block_id){
+							$tplfile =& $tplfile_handler->create();
+							$tplfile->setVar('tpl_module', $mydirname);
+							$tplfile->setVar('tpl_refid', $block_id);
+							$tplfile->setVar('tpl_source', $tpl_source, true);
+							$tplfile->setVar('tpl_tplset', 'default');
+							$tplfile->setVar('tpl_file', $tpl_file, true);
+							$tplfile->setVar('tpl_type', 'block');
+							$tplfile->setVar('tpl_lastimported', 0);
+							$tplfile->setVar('tpl_lastmodified', time());
+							$tplfile->setVar('tpl_desc', '', true);
+							if (!$tplfile_handler->insert($tplfile)) {
+								$msgs[] = '&nbsp;&nbsp;<span style="color:#ff0000;">ERROR: Could not insert template <b>'.$tpl_file.'</b> to the database.</span>';
+							} else {
+								$newid = $tplfile->getVar('tpl_id');
+								$msgs[] = '&nbsp;&nbsp;Template <b>'.$tpl_file.'</b> added to the database.';
+								if ($xoopsConfig['template_set'] == 'default') {
+									if (!xoops_template_touch($block_id)) {
+										$msgs[] = '&nbsp;&nbsp;<span style="color:#ff0000;">ERROR: Template <b>'.$tpl_file.'</b> recompile failed.</span>';
+									} else {
+										$msgs[] = '&nbsp;&nbsp;Template <b>'.$tpl_file.'</b> recompiled.';
+									}
+								}
+							}
+							$sql = "UPDATE ".$db->prefix("newblocks")." SET template='".mysql_escape_string($tpl_file)."', last_modified=".time()." WHERE bid=".$block_id;
+							if( !$result = $db->query($sql) ) {
+								$msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span>';
+							}else{
+								$msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$newid.'</b>)';
+							}
+						}
+					}
+				}
+				elseif (!empty($tpl_id) && isset($tpl_source) && $tpl_source != '') {
+					$sql = "SELECT COUNT(*) FROM ".$db->prefix('tplsource')." WHERE tpl_id='$tpl_id'";
+					list($count) = $xoopsDB->fetchRow($xoopsDB->query($sql));
+					if($count==0){
+						$sql = sprintf("INSERT INTO %s (tpl_id, tpl_source) VALUES (%u, %s)", $db->prefix('tplsource'), $tpl_id, $db->quoteString($tpl_source));
+					}else{
+						$sql = "UPDATE ".$db->prefix("tplsource")." SET tpl_source='".mysql_escape_string($tpl_source)."' WHERE tpl_id=".$tpl_id;
+					}
+					if( !$result = $db->query($sql) ) {
+						$msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span>';
+					} else {
+						$msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$tpl_id.'</b>)';
+						// generate compiled file
+						include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
+						include_once XOOPS_ROOT_PATH.'/class/template.php';
+						if( ! xoops_template_touch( $tpl_id ) ) {
+							$msgs[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b>.</span>';
+						} else {
+							$msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> compiled.</span>';
+						}
+					}
+					$sql = "UPDATE ".$db->prefix("newblocks")." SET template='".mysql_escape_string($tpl_file)."', last_modified=".time()." WHERE bid=".$block_id;
+					if( !$result = $db->query($sql) ) {
+						$msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span>';
+					}else{
+						$msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$tpl_id.'</b>)';
+					}
+				}
+			}
+		}
+		closedir( $handler ) ;
+	}
+
+	return true ;
+}
+
+function d3schedule_message_append_onupdate( &$module_obj , &$log )
+{
+	if( is_array( @$GLOBALS['msgs'] ) ) {
+		foreach( $GLOBALS['msgs'] as $message ) {
+			$log->add( strip_tags( $message ) ) ;
+		}
+	}
+
+	// use mLog->addWarning() or mLog->addError() if necessary
+}
+
+}
+
+?>

Added: tags/1.8/cinemaru/player.swf
===================================================================
(Binary files differ)


Property changes on: tags/1.8/cinemaru/player.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: tags/1.8/cinemaru/prototype.js
===================================================================
--- tags/1.8/cinemaru/prototype.js	                        (rev 0)
+++ tags/1.8/cinemaru/prototype.js	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,4221 @@
+/*  Prototype JavaScript framework, version 1.6.0.2
+ *  (c) 2005-2008 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://www.prototypejs.org/
+ *
+ *--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.6.0.2',
+
+  Browser: {
+    IE:     !!(window.attachEvent && !window.opera),
+    Opera:  !!window.opera,
+    WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
+    Gecko:  navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
+    MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
+  },
+
+  BrowserFeatures: {
+    XPath: !!document.evaluate,
+    ElementExtensions: !!window.HTMLElement,
+    SpecificElementExtensions:
+      document.createElement('div').__proto__ &&
+      document.createElement('div').__proto__ !==
+        document.createElement('form').__proto__
+  },
+
+  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
+  JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
+
+  emptyFunction: function() { },
+  K: function(x) { return x }
+};
+
+if (Prototype.Browser.MobileSafari)
+  Prototype.BrowserFeatures.SpecificElementExtensions = false;
+
+
+/* Based on Alex Arnell's inheritance implementation. */
+var Class = {
+  create: function() {
+    var parent = null, properties = $A(arguments);
+    if (Object.isFunction(properties[0]))
+      parent = properties.shift();
+
+    function klass() {
+      this.initialize.apply(this, arguments);
+    }
+
+    Object.extend(klass, Class.Methods);
+    klass.superclass = parent;
+    klass.subclasses = [];
+
+    if (parent) {
+      var subclass = function() { };
+      subclass.prototype = parent.prototype;
+      klass.prototype = new subclass;
+      parent.subclasses.push(klass);
+    }
+
+    for (var i = 0; i < properties.length; i++)
+      klass.addMethods(properties[i]);
+
+    if (!klass.prototype.initialize)
+      klass.prototype.initialize = Prototype.emptyFunction;
+
+    klass.prototype.constructor = klass;
+
+    return klass;
+  }
+};
+
+Class.Methods = {
+  addMethods: function(source) {
+    var ancestor   = this.superclass && this.superclass.prototype;
+    var properties = Object.keys(source);
+
+    if (!Object.keys({ toString: true }).length)
+      properties.push("toString", "valueOf");
+
+    for (var i = 0, length = properties.length; i < length; i++) {
+      var property = properties[i], value = source[property];
+      if (ancestor && Object.isFunction(value) &&
+          value.argumentNames().first() == "$super") {
+        var method = value, value = Object.extend((function(m) {
+          return function() { return ancestor[m].apply(this, arguments) };
+        })(property).wrap(method), {
+          valueOf:  function() { return method },
+          toString: function() { return method.toString() }
+        });
+      }
+      this.prototype[property] = value;
+    }
+
+    return this;
+  }
+};
+
+var Abstract = { };
+
+Object.extend = function(destination, source) {
+  for (var property in source)
+    destination[property] = source[property];
+  return destination;
+};
+
+Object.extend(Object, {
+  inspect: function(object) {
+    try {
+      if (Object.isUndefined(object)) return 'undefined';
+      if (object === null) return 'null';
+      return object.inspect ? object.inspect() : String(object);
+    } catch (e) {
+      if (e instanceof RangeError) return '...';
+      throw e;
+    }
+  },
+
+  toJSON: function(object) {
+    var type = typeof object;
+    switch (type) {
+      case 'undefined':
+      case 'function':
+      case 'unknown': return;
+      case 'boolean': return object.toString();
+    }
+
+    if (object === null) return 'null';
+    if (object.toJSON) return object.toJSON();
+    if (Object.isElement(object)) return;
+
+    var results = [];
+    for (var property in object) {
+      var value = Object.toJSON(object[property]);
+      if (!Object.isUndefined(value))
+        results.push(property.toJSON() + ': ' + value);
+    }
+
+    return '{' + results.join(', ') + '}';
+  },
+
+  toQueryString: function(object) {
+    return $H(object).toQueryString();
+  },
+
+  toHTML: function(object) {
+    return object && object.toHTML ? object.toHTML() : String.interpret(object);
+  },
+
+  keys: function(object) {
+    var keys = [];
+    for (var property in object)
+      keys.push(property);
+    return keys;
+  },
+
+  values: function(object) {
+    var values = [];
+    for (var property in object)
+      values.push(object[property]);
+    return values;
+  },
+
+  clone: function(object) {
+    return Object.extend({ }, object);
+  },
+
+  isElement: function(object) {
+    return object && object.nodeType == 1;
+  },
+
+  isArray: function(object) {
+    return object != null && typeof object == "object" &&
+      'splice' in object && 'join' in object;
+  },
+
+  isHash: function(object) {
+    return object instanceof Hash;
+  },
+
+  isFunction: function(object) {
+    return typeof object == "function";
+  },
+
+  isString: function(object) {
+    return typeof object == "string";
+  },
+
+  isNumber: function(object) {
+    return typeof object == "number";
+  },
+
+  isUndefined: function(object) {
+    return typeof object == "undefined";
+  }
+});
+
+Object.extend(Function.prototype, {
+  argumentNames: function() {
+    var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");
+    return names.length == 1 && !names[0] ? [] : names;
+  },
+
+  bind: function() {
+    if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
+    var __method = this, args = $A(arguments), object = args.shift();
+    return function() {
+      return __method.apply(object, args.concat($A(arguments)));
+    }
+  },
+
+  bindAsEventListener: function() {
+    var __method = this, args = $A(arguments), object = args.shift();
+    return function(event) {
+      return __method.apply(object, [event || window.event].concat(args));
+    }
+  },
+
+  curry: function() {
+    if (!arguments.length) return this;
+    var __method = this, args = $A(arguments);
+    return function() {
+      return __method.apply(this, args.concat($A(arguments)));
+    }
+  },
+
+  delay: function() {
+    var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
+    return window.setTimeout(function() {
+      return __method.apply(__method, args);
+    }, timeout);
+  },
+
+  wrap: function(wrapper) {
+    var __method = this;
+    return function() {
+      return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
+    }
+  },
+
+  methodize: function() {
+    if (this._methodized) return this._methodized;
+    var __method = this;
+    return this._methodized = function() {
+      return __method.apply(null, [this].concat($A(arguments)));
+    };
+  }
+});
+
+Function.prototype.defer = Function.prototype.delay.curry(0.01);
+
+Date.prototype.toJSON = function() {
+  return '"' + this.getUTCFullYear() + '-' +
+    (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
+    this.getUTCDate().toPaddedString(2) + 'T' +
+    this.getUTCHours().toPaddedString(2) + ':' +
+    this.getUTCMinutes().toPaddedString(2) + ':' +
+    this.getUTCSeconds().toPaddedString(2) + 'Z"';
+};
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) { }
+    }
+
+    return returnValue;
+  }
+};
+
+RegExp.prototype.match = RegExp.prototype.test;
+
+RegExp.escape = function(str) {
+  return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+};
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create({
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  execute: function() {
+    this.callback(this);
+  },
+
+  stop: function() {
+    if (!this.timer) return;
+    clearInterval(this.timer);
+    this.timer = null;
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.execute();
+      } finally {
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+});
+Object.extend(String, {
+  interpret: function(value) {
+    return value == null ? '' : String(value);
+  },
+  specialChar: {
+    '\b': '\\b',
+    '\t': '\\t',
+    '\n': '\\n',
+    '\f': '\\f',
+    '\r': '\\r',
+    '\\': '\\\\'
+  }
+});
+
+Object.extend(String.prototype, {
+  gsub: function(pattern, replacement) {
+    var result = '', source = this, match;
+    replacement = arguments.callee.prepareReplacement(replacement);
+
+    while (source.length > 0) {
+      if (match = source.match(pattern)) {
+        result += source.slice(0, match.index);
+        result += String.interpret(replacement(match));
+        source  = source.slice(match.index + match[0].length);
+      } else {
+        result += source, source = '';
+      }
+    }
+    return result;
+  },
+
+  sub: function(pattern, replacement, count) {
+    replacement = this.gsub.prepareReplacement(replacement);
+    count = Object.isUndefined(count) ? 1 : count;
+
+    return this.gsub(pattern, function(match) {
+      if (--count < 0) return match[0];
+      return replacement(match);
+    });
+  },
+
+  scan: function(pattern, iterator) {
+    this.gsub(pattern, iterator);
+    return String(this);
+  },
+
+  truncate: function(length, truncation) {
+    length = length || 30;
+    truncation = Object.isUndefined(truncation) ? '...' : truncation;
+    return this.length > length ?
+      this.slice(0, length - truncation.length) + truncation : String(this);
+  },
+
+  strip: function() {
+    return this.replace(/^\s+/, '').replace(/\s+$/, '');
+  },
+
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+
+  evalScripts: function() {
+    return this.extractScripts().map(function(script) { return eval(script) });
+  },
+
+  escapeHTML: function() {
+    var self = arguments.callee;
+    self.text.data = this;
+    return self.div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = new Element('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? (div.childNodes.length > 1 ?
+      $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
+      div.childNodes[0].nodeValue) : '';
+  },
+
+  toQueryParams: function(separator) {
+    var match = this.strip().match(/([^?#]*)(#.*)?$/);
+    if (!match) return { };
+
+    return match[1].split(separator || '&').inject({ }, function(hash, pair) {
+      if ((pair = pair.split('='))[0]) {
+        var key = decodeURIComponent(pair.shift());
+        var value = pair.length > 1 ? pair.join('=') : pair[0];
+        if (value != undefined) value = decodeURIComponent(value);
+
+        if (key in hash) {
+          if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
+          hash[key].push(value);
+        }
+        else hash[key] = value;
+      }
+      return hash;
+    });
+  },
+
+  toArray: function() {
+    return this.split('');
+  },
+
+  succ: function() {
+    return this.slice(0, this.length - 1) +
+      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+  },
+
+  times: function(count) {
+    return count < 1 ? '' : new Array(count + 1).join(this);
+  },
+
+  camelize: function() {
+    var parts = this.split('-'), len = parts.length;
+    if (len == 1) return parts[0];
+
+    var camelized = this.charAt(0) == '-'
+      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+      : parts[0];
+
+    for (var i = 1; i < len; i++)
+      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+    return camelized;
+  },
+
+  capitalize: function() {
+    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+  },
+
+  underscore: function() {
+    return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
+  },
+
+  dasherize: function() {
+    return this.gsub(/_/,'-');
+  },
+
+  inspect: function(useDoubleQuotes) {
+    var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
+      var character = String.specialChar[match[0]];
+      return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
+    });
+    if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
+    return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+  },
+
+  toJSON: function() {
+    return this.inspect(true);
+  },
+
+  unfilterJSON: function(filter) {
+    return this.sub(filter || Prototype.JSONFilter, '#{1}');
+  },
+
+  isJSON: function() {
+    var str = this;
+    if (str.blank()) return false;
+    str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
+    return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
+  },
+
+  evalJSON: function(sanitize) {
+    var json = this.unfilterJSON();
+    try {
+      if (!sanitize || json.isJSON()) return eval('(' + json + ')');
+    } catch (e) { }
+    throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
+  },
+
+  include: function(pattern) {
+    return this.indexOf(pattern) > -1;
+  },
+
+  startsWith: function(pattern) {
+    return this.indexOf(pattern) === 0;
+  },
+
+  endsWith: function(pattern) {
+    var d = this.length - pattern.length;
+    return d >= 0 && this.lastIndexOf(pattern) === d;
+  },
+
+  empty: function() {
+    return this == '';
+  },
+
+  blank: function() {
+    return /^\s*$/.test(this);
+  },
+
+  interpolate: function(object, pattern) {
+    return new Template(this, pattern).evaluate(object);
+  }
+});
+
+if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
+  escapeHTML: function() {
+    return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+  },
+  unescapeHTML: function() {
+    return this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
+  }
+});
+
+String.prototype.gsub.prepareReplacement = function(replacement) {
+  if (Object.isFunction(replacement)) return replacement;
+  var template = new Template(replacement);
+  return function(match) { return template.evaluate(match) };
+};
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+Object.extend(String.prototype.escapeHTML, {
+  div:  document.createElement('div'),
+  text: document.createTextNode('')
+});
+
+with (String.prototype.escapeHTML) div.appendChild(text);
+
+var Template = Class.create({
+  initialize: function(template, pattern) {
+    this.template = template.toString();
+    this.pattern = pattern || Template.Pattern;
+  },
+
+  evaluate: function(object) {
+    if (Object.isFunction(object.toTemplateReplacements))
+      object = object.toTemplateReplacements();
+
+    return this.template.gsub(this.pattern, function(match) {
+      if (object == null) return '';
+
+      var before = match[1] || '';
+      if (before == '\\') return match[2];
+
+      var ctx = object, expr = match[3];
+      var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
+      match = pattern.exec(expr);
+      if (match == null) return before;
+
+      while (match != null) {
+        var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
+        ctx = ctx[comp];
+        if (null == ctx || '' == match[3]) break;
+        expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
+        match = pattern.exec(expr);
+      }
+
+      return before + String.interpret(ctx);
+    });
+  }
+});
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+
+var $break = { };
+
+var Enumerable = {
+  each: function(iterator, context) {
+    var index = 0;
+    iterator = iterator.bind(context);
+    try {
+      this._each(function(value) {
+        iterator(value, index++);
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+    return this;
+  },
+
+  eachSlice: function(number, iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var index = -number, slices = [], array = this.toArray();
+    while ((index += number) < array.length)
+      slices.push(array.slice(index, index+number));
+    return slices.collect(iterator, context);
+  },
+
+  all: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!iterator(value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var result = false;
+    this.each(function(value, index) {
+      if (result = !!iterator(value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var results = [];
+    this.each(function(value, index) {
+      results.push(iterator(value, index));
+    });
+    return results;
+  },
+
+  detect: function(iterator, context) {
+    iterator = iterator.bind(context);
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator, context) {
+    iterator = iterator.bind(context);
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(filter, iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var results = [];
+
+    if (Object.isString(filter))
+      filter = new RegExp(filter);
+
+    this.each(function(value, index) {
+      if (filter.match(value))
+        results.push(iterator(value, index));
+    });
+    return results;
+  },
+
+  include: function(object) {
+    if (Object.isFunction(this.indexOf))
+      if (this.indexOf(object) != -1) return true;
+
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inGroupsOf: function(number, fillWith) {
+    fillWith = Object.isUndefined(fillWith) ? null : fillWith;
+    return this.eachSlice(number, function(slice) {
+      while(slice.length < number) slice.push(fillWith);
+      return slice;
+    });
+  },
+
+  inject: function(memo, iterator, context) {
+    iterator = iterator.bind(context);
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.map(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var result;
+    this.each(function(value, index) {
+      value = iterator(value, index);
+      if (result == null || value >= result)
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var result;
+    this.each(function(value, index) {
+      value = iterator(value, index);
+      if (result == null || value < result)
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator, context) {
+    iterator = iterator ? iterator.bind(context) : Prototype.K;
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      (iterator(value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator, context) {
+    iterator = iterator.bind(context);
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator, context) {
+    iterator = iterator.bind(context);
+    return this.map(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.map();
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (Object.isFunction(args.last()))
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  },
+
+  size: function() {
+    return this.toArray().length;
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+};
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  filter:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray,
+  every:   Enumerable.all,
+  some:    Enumerable.any
+});
+function $A(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) return iterable.toArray();
+  var length = iterable.length || 0, results = new Array(length);
+  while (length--) results[length] = iterable[length];
+  return results;
+}
+
+if (Prototype.Browser.WebKit) {
+  $A = function(iterable) {
+    if (!iterable) return [];
+    if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') &&
+        iterable.toArray) return iterable.toArray();
+    var length = iterable.length || 0, results = new Array(length);
+    while (length--) results[length] = iterable[length];
+    return results;
+  };
+}
+
+Array.from = $A;
+
+Object.extend(Array.prototype, Enumerable);
+
+if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0, length = this.length; i < length; i++)
+      iterator(this[i]);
+  },
+
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+
+  first: function() {
+    return this[0];
+  },
+
+  last: function() {
+    return this[this.length - 1];
+  },
+
+  compact: function() {
+    return this.select(function(value) {
+      return value != null;
+    });
+  },
+
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(Object.isArray(value) ?
+        value.flatten() : [value]);
+    });
+  },
+
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+
+  reduce: function() {
+    return this.length > 1 ? this : this[0];
+  },
+
+  uniq: function(sorted) {
+    return this.inject([], function(array, value, index) {
+      if (0 == index || (sorted ? array.last() != value : !array.include(value)))
+        array.push(value);
+      return array;
+    });
+  },
+
+  intersect: function(array) {
+    return this.uniq().findAll(function(item) {
+      return array.detect(function(value) { return item === value });
+    });
+  },
+
+  clone: function() {
+    return [].concat(this);
+  },
+
+  size: function() {
+    return this.length;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  },
+
+  toJSON: function() {
+    var results = [];
+    this.each(function(object) {
+      var value = Object.toJSON(object);
+      if (!Object.isUndefined(value)) results.push(value);
+    });
+    return '[' + results.join(', ') + ']';
+  }
+});
+
+// use native browser JS 1.6 implementation if available
+if (Object.isFunction(Array.prototype.forEach))
+  Array.prototype._each = Array.prototype.forEach;
+
+if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
+  i || (i = 0);
+  var length = this.length;
+  if (i < 0) i = length + i;
+  for (; i < length; i++)
+    if (this[i] === item) return i;
+  return -1;
+};
+
+if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
+  i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
+  var n = this.slice(0, i).reverse().indexOf(item);
+  return (n < 0) ? n : i - n - 1;
+};
+
+Array.prototype.toArray = Array.prototype.clone;
+
+function $w(string) {
+  if (!Object.isString(string)) return [];
+  string = string.strip();
+  return string ? string.split(/\s+/) : [];
+}
+
+if (Prototype.Browser.Opera){
+  Array.prototype.concat = function() {
+    var array = [];
+    for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      if (Object.isArray(arguments[i])) {
+        for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
+          array.push(arguments[i][j]);
+      } else {
+        array.push(arguments[i]);
+      }
+    }
+    return array;
+  };
+}
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    return this.toPaddedString(2, 16);
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+
+  times: function(iterator) {
+    $R(0, this, true).each(iterator);
+    return this;
+  },
+
+  toPaddedString: function(length, radix) {
+    var string = this.toString(radix || 10);
+    return '0'.times(length - string.length) + string;
+  },
+
+  toJSON: function() {
+    return isFinite(this) ? this.toString() : 'null';
+  }
+});
+
+$w('abs round ceil floor').each(function(method){
+  Number.prototype[method] = Math[method].methodize();
+});
+function $H(object) {
+  return new Hash(object);
+};
+
+var Hash = Class.create(Enumerable, (function() {
+
+  function toQueryPair(key, value) {
+    if (Object.isUndefined(value)) return key;
+    return key + '=' + encodeURIComponent(String.interpret(value));
+  }
+
+  return {
+    initialize: function(object) {
+      this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
+    },
+
+    _each: function(iterator) {
+      for (var key in this._object) {
+        var value = this._object[key], pair = [key, value];
+        pair.key = key;
+        pair.value = value;
+        iterator(pair);
+      }
+    },
+
+    set: function(key, value) {
+      return this._object[key] = value;
+    },
+
+    get: function(key) {
+      return this._object[key];
+    },
+
+    unset: function(key) {
+      var value = this._object[key];
+      delete this._object[key];
+      return value;
+    },
+
+    toObject: function() {
+      return Object.clone(this._object);
+    },
+
+    keys: function() {
+      return this.pluck('key');
+    },
+
+    values: function() {
+      return this.pluck('value');
+    },
+
+    index: function(value) {
+      var match = this.detect(function(pair) {
+        return pair.value === value;
+      });
+      return match && match.key;
+    },
+
+    merge: function(object) {
+      return this.clone().update(object);
+    },
+
+    update: function(object) {
+      return new Hash(object).inject(this, function(result, pair) {
+        result.set(pair.key, pair.value);
+        return result;
+      });
+    },
+
+    toQueryString: function() {
+      return this.map(function(pair) {
+        var key = encodeURIComponent(pair.key), values = pair.value;
+
+        if (values && typeof values == 'object') {
+          if (Object.isArray(values))
+            return values.map(toQueryPair.curry(key)).join('&');
+        }
+        return toQueryPair(key, values);
+      }).join('&');
+    },
+
+    inspect: function() {
+      return '#<Hash:{' + this.map(function(pair) {
+        return pair.map(Object.inspect).join(': ');
+      }).join(', ') + '}>';
+    },
+
+    toJSON: function() {
+      return Object.toJSON(this.toObject());
+    },
+
+    clone: function() {
+      return new Hash(this);
+    }
+  }
+})());
+
+Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
+Hash.from = $H;
+var ObjectRange = Class.create(Enumerable, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+
+  _each: function(iterator) {
+    var value = this.start;
+    while (this.include(value)) {
+      iterator(value);
+      value = value.succ();
+    }
+  },
+
+  include: function(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+};
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new XMLHttpRequest()},
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+};
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responder) {
+    if (!this.include(responder))
+      this.responders.push(responder);
+  },
+
+  unregister: function(responder) {
+    this.responders = this.responders.without(responder);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (Object.isFunction(responder[callback])) {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) { }
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate:   function() { Ajax.activeRequestCount++ },
+  onComplete: function() { Ajax.activeRequestCount-- }
+});
+
+Ajax.Base = Class.create({
+  initialize: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      contentType:  'application/x-www-form-urlencoded',
+      encoding:     'UTF-8',
+      parameters:   '',
+      evalJSON:     true,
+      evalJS:       true
+    };
+    Object.extend(this.options, options || { });
+
+    this.options.method = this.options.method.toLowerCase();
+
+    if (Object.isString(this.options.parameters))
+      this.options.parameters = this.options.parameters.toQueryParams();
+    else if (Object.isHash(this.options.parameters))
+      this.options.parameters = this.options.parameters.toObject();
+  }
+});
+
+Ajax.Request = Class.create(Ajax.Base, {
+  _complete: false,
+
+  initialize: function($super, url, options) {
+    $super(options);
+    this.transport = Ajax.getTransport();
+    this.request(url);
+  },
+
+  request: function(url) {
+    this.url = url;
+    this.method = this.options.method;
+    var params = Object.clone(this.options.parameters);
+
+    if (!['get', 'post'].include(this.method)) {
+      // simulate other verbs over post
+      params['_method'] = this.method;
+      this.method = 'post';
+    }
+
+    this.parameters = params;
+
+    if (params = Object.toQueryString(params)) {
+      // when GET, append parameters to URL
+      if (this.method == 'get')
+        this.url += (this.url.include('?') ? '&' : '?') + params;
+      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+        params += '&_=';
+    }
+
+    try {
+      var response = new Ajax.Response(this);
+      if (this.options.onCreate) this.options.onCreate(response);
+      Ajax.Responders.dispatch('onCreate', this, response);
+
+      this.transport.open(this.method.toUpperCase(), this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
+
+      this.transport.onreadystatechange = this.onStateChange.bind(this);
+      this.setRequestHeaders();
+
+      this.body = this.method == 'post' ? (this.options.postBody || params) : null;
+      this.transport.send(this.body);
+
+      /* Force Firefox to handle ready state 4 for synchronous requests */
+      if (!this.options.asynchronous && this.transport.overrideMimeType)
+        this.onStateChange();
+
+    }
+    catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState > 1 && !((readyState == 4) && this._complete))
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  setRequestHeaders: function() {
+    var headers = {
+      'X-Requested-With': 'XMLHttpRequest',
+      'X-Prototype-Version': Prototype.Version,
+      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+    };
+
+    if (this.method == 'post') {
+      headers['Content-type'] = this.options.contentType +
+        (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+      /* Force "Connection: close" for older Mozilla browsers to work
+       * around a bug where XMLHttpRequest sends an incorrect
+       * Content-length header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType &&
+          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+            headers['Connection'] = 'close';
+    }
+
+    // user-defined headers
+    if (typeof this.options.requestHeaders == 'object') {
+      var extras = this.options.requestHeaders;
+
+      if (Object.isFunction(extras.push))
+        for (var i = 0, length = extras.length; i < length; i += 2)
+          headers[extras[i]] = extras[i+1];
+      else
+        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+    }
+
+    for (var name in headers)
+      this.transport.setRequestHeader(name, headers[name]);
+  },
+
+  success: function() {
+    var status = this.getStatus();
+    return !status || (status >= 200 && status < 300);
+  },
+
+  getStatus: function() {
+    try {
+      return this.transport.status || 0;
+    } catch (e) { return 0 }
+  },
+
+  respondToReadyState: function(readyState) {
+    var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
+
+    if (state == 'Complete') {
+      try {
+        this._complete = true;
+        (this.options['on' + response.status]
+         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(response, response.headerJSON);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      var contentType = response.getHeader('Content-type');
+      if (this.options.evalJS == 'force'
+          || (this.options.evalJS && this.isSameOrigin() && contentType
+          && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
+        this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
+      Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    if (state == 'Complete') {
+      // avoid memory leak in MSIE: clean up
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+    }
+  },
+
+  isSameOrigin: function() {
+    var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
+    return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
+      protocol: location.protocol,
+      domain: document.domain,
+      port: location.port ? ':' + location.port : ''
+    }));
+  },
+
+  getHeader: function(name) {
+    try {
+      return this.transport.getResponseHeader(name) || null;
+    } catch (e) { return null }
+  },
+
+  evalResponse: function() {
+    try {
+      return eval((this.transport.responseText || '').unfilterJSON());
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Response = Class.create({
+  initialize: function(request){
+    this.request = request;
+    var transport  = this.transport  = request.transport,
+        readyState = this.readyState = transport.readyState;
+
+    if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
+      this.status       = this.getStatus();
+      this.statusText   = this.getStatusText();
+      this.responseText = String.interpret(transport.responseText);
+      this.headerJSON   = this._getHeaderJSON();
+    }
+
+    if(readyState == 4) {
+      var xml = transport.responseXML;
+      this.responseXML  = Object.isUndefined(xml) ? null : xml;
+      this.responseJSON = this._getResponseJSON();
+    }
+  },
+
+  status:      0,
+  statusText: '',
+
+  getStatus: Ajax.Request.prototype.getStatus,
+
+  getStatusText: function() {
+    try {
+      return this.transport.statusText || '';
+    } catch (e) { return '' }
+  },
+
+  getHeader: Ajax.Request.prototype.getHeader,
+
+  getAllHeaders: function() {
+    try {
+      return this.getAllResponseHeaders();
+    } catch (e) { return null }
+  },
+
+  getResponseHeader: function(name) {
+    return this.transport.getResponseHeader(name);
+  },
+
+  getAllResponseHeaders: function() {
+    return this.transport.getAllResponseHeaders();
+  },
+
+  _getHeaderJSON: function() {
+    var json = this.getHeader('X-JSON');
+    if (!json) return null;
+    json = decodeURIComponent(escape(json));
+    try {
+      return json.evalJSON(this.request.options.sanitizeJSON ||
+        !this.request.isSameOrigin());
+    } catch (e) {
+      this.request.dispatchException(e);
+    }
+  },
+
+  _getResponseJSON: function() {
+    var options = this.request.options;
+    if (!options.evalJSON || (options.evalJSON != 'force' &&
+      !(this.getHeader('Content-type') || '').include('application/json')) ||
+        this.responseText.blank())
+          return null;
+    try {
+      return this.responseText.evalJSON(options.sanitizeJSON ||
+        !this.request.isSameOrigin());
+    } catch (e) {
+      this.request.dispatchException(e);
+    }
+  }
+});
+
+Ajax.Updater = Class.create(Ajax.Request, {
+  initialize: function($super, container, url, options) {
+    this.container = {
+      success: (container.success || container),
+      failure: (container.failure || (container.success ? null : container))
+    };
+
+    options = Object.clone(options);
+    var onComplete = options.onComplete;
+    options.onComplete = (function(response, json) {
+      this.updateContent(response.responseText);
+      if (Object.isFunction(onComplete)) onComplete(response, json);
+    }).bind(this);
+
+    $super(url, options);
+  },
+
+  updateContent: function(responseText) {
+    var receiver = this.container[this.success() ? 'success' : 'failure'],
+        options = this.options;
+
+    if (!options.evalScripts) responseText = responseText.stripScripts();
+
+    if (receiver = $(receiver)) {
+      if (options.insertion) {
+        if (Object.isString(options.insertion)) {
+          var insertion = { }; insertion[options.insertion] = responseText;
+          receiver.insert(insertion);
+        }
+        else options.insertion(receiver, responseText);
+      }
+      else receiver.update(responseText);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
+  initialize: function($super, container, url, options) {
+    $super(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = { };
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.options.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(response) {
+    if (this.options.decay) {
+      this.decay = (response.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = response.responseText;
+    }
+    this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+function $(element) {
+  if (arguments.length > 1) {
+    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+      elements.push($(arguments[i]));
+    return elements;
+  }
+  if (Object.isString(element))
+    element = document.getElementById(element);
+  return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+  document._getElementsByXPath = function(expression, parentElement) {
+    var results = [];
+    var query = document.evaluate(expression, $(parentElement) || document,
+      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    for (var i = 0, length = query.snapshotLength; i < length; i++)
+      results.push(Element.extend(query.snapshotItem(i)));
+    return results;
+  };
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Node) var Node = { };
+
+if (!Node.ELEMENT_NODE) {
+  // DOM level 2 ECMAScript Language Binding
+  Object.extend(Node, {
+    ELEMENT_NODE: 1,
+    ATTRIBUTE_NODE: 2,
+    TEXT_NODE: 3,
+    CDATA_SECTION_NODE: 4,
+    ENTITY_REFERENCE_NODE: 5,
+    ENTITY_NODE: 6,
+    PROCESSING_INSTRUCTION_NODE: 7,
+    COMMENT_NODE: 8,
+    DOCUMENT_NODE: 9,
+    DOCUMENT_TYPE_NODE: 10,
+    DOCUMENT_FRAGMENT_NODE: 11,
+    NOTATION_NODE: 12
+  });
+}
+
+(function() {
+  var element = this.Element;
+  this.Element = function(tagName, attributes) {
+    attributes = attributes || { };
+    tagName = tagName.toLowerCase();
+    var cache = Element.cache;
+    if (Prototype.Browser.IE && attributes.name) {
+      tagName = '<' + tagName + ' name="' + attributes.name + '">';
+      delete attributes.name;
+      return Element.writeAttribute(document.createElement(tagName), attributes);
+    }
+    if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
+    return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
+  };
+  Object.extend(this.Element, element || { });
+}).call(window);
+
+Element.cache = { };
+
+Element.Methods = {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function(element) {
+    element = $(element);
+    Element[Element.visible(element) ? 'hide' : 'show'](element);
+    return element;
+  },
+
+  hide: function(element) {
+    $(element).style.display = 'none';
+    return element;
+  },
+
+  show: function(element) {
+    $(element).style.display = '';
+    return element;
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+    return element;
+  },
+
+  update: function(element, content) {
+    element = $(element);
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) return element.update().insert(content);
+    content = Object.toHTML(content);
+    element.innerHTML = content.stripScripts();
+    content.evalScripts.bind(content).defer();
+    return element;
+  },
+
+  replace: function(element, content) {
+    element = $(element);
+    if (content && content.toElement) content = content.toElement();
+    else if (!Object.isElement(content)) {
+      content = Object.toHTML(content);
+      var range = element.ownerDocument.createRange();
+      range.selectNode(element);
+      content.evalScripts.bind(content).defer();
+      content = range.createContextualFragment(content.stripScripts());
+    }
+    element.parentNode.replaceChild(content, element);
+    return element;
+  },
+
+  insert: function(element, insertions) {
+    element = $(element);
+
+    if (Object.isString(insertions) || Object.isNumber(insertions) ||
+        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
+          insertions = {bottom:insertions};
+
+    var content, insert, tagName, childNodes;
+
+    for (var position in insertions) {
+      content  = insertions[position];
+      position = position.toLowerCase();
+      insert = Element._insertionTranslations[position];
+
+      if (content && content.toElement) content = content.toElement();
+      if (Object.isElement(content)) {
+        insert(element, content);
+        continue;
+      }
+
+      content = Object.toHTML(content);
+
+      tagName = ((position == 'before' || position == 'after')
+        ? element.parentNode : element).tagName.toUpperCase();
+
+      childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+
+      if (position == 'top' || position == 'after') childNodes.reverse();
+      childNodes.each(insert.curry(element));
+
+      content.evalScripts.bind(content).defer();
+    }
+
+    return element;
+  },
+
+  wrap: function(element, wrapper, attributes) {
+    element = $(element);
+    if (Object.isElement(wrapper))
+      $(wrapper).writeAttribute(attributes || { });
+    else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
+    else wrapper = new Element('div', wrapper);
+    if (element.parentNode)
+      element.parentNode.replaceChild(wrapper, element);
+    wrapper.appendChild(element);
+    return wrapper;
+  },
+
+  inspect: function(element) {
+    element = $(element);
+    var result = '<' + element.tagName.toLowerCase();
+    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+      var property = pair.first(), attribute = pair.last();
+      var value = (element[property] || '').toString();
+      if (value) result += ' ' + attribute + '=' + value.inspect(true);
+    });
+    return result + '>';
+  },
+
+  recursivelyCollect: function(element, property) {
+    element = $(element);
+    var elements = [];
+    while (element = element[property])
+      if (element.nodeType == 1)
+        elements.push(Element.extend(element));
+    return elements;
+  },
+
+  ancestors: function(element) {
+    return $(element).recursivelyCollect('parentNode');
+  },
+
+  descendants: function(element) {
+    return $(element).select("*");
+  },
+
+  firstDescendant: function(element) {
+    element = $(element).firstChild;
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    return $(element);
+  },
+
+  immediateDescendants: function(element) {
+    if (!(element = $(element).firstChild)) return [];
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    if (element) return [element].concat($(element).nextSiblings());
+    return [];
+  },
+
+  previousSiblings: function(element) {
+    return $(element).recursivelyCollect('previousSibling');
+  },
+
+  nextSiblings: function(element) {
+    return $(element).recursivelyCollect('nextSibling');
+  },
+
+  siblings: function(element) {
+    element = $(element);
+    return element.previousSiblings().reverse().concat(element.nextSiblings());
+  },
+
+  match: function(element, selector) {
+    if (Object.isString(selector))
+      selector = new Selector(selector);
+    return selector.match($(element));
+  },
+
+  up: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(element.parentNode);
+    var ancestors = element.ancestors();
+    return Object.isNumber(expression) ? ancestors[expression] :
+      Selector.findElement(ancestors, expression, index);
+  },
+
+  down: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return element.firstDescendant();
+    return Object.isNumber(expression) ? element.descendants()[expression] :
+      element.select(expression)[index || 0];
+  },
+
+  previous: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
+    var previousSiblings = element.previousSiblings();
+    return Object.isNumber(expression) ? previousSiblings[expression] :
+      Selector.findElement(previousSiblings, expression, index);
+  },
+
+  next: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
+    var nextSiblings = element.nextSiblings();
+    return Object.isNumber(expression) ? nextSiblings[expression] :
+      Selector.findElement(nextSiblings, expression, index);
+  },
+
+  select: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element, args);
+  },
+
+  adjacent: function() {
+    var args = $A(arguments), element = $(args.shift());
+    return Selector.findChildElements(element.parentNode, args).without(element);
+  },
+
+  identify: function(element) {
+    element = $(element);
+    var id = element.readAttribute('id'), self = arguments.callee;
+    if (id) return id;
+    do { id = 'anonymous_element_' + self.counter++ } while ($(id));
+    element.writeAttribute('id', id);
+    return id;
+  },
+
+  readAttribute: function(element, name) {
+    element = $(element);
+    if (Prototype.Browser.IE) {
+      var t = Element._attributeTranslations.read;
+      if (t.values[name]) return t.values[name](element, name);
+      if (t.names[name]) name = t.names[name];
+      if (name.include(':')) {
+        return (!element.attributes || !element.attributes[name]) ? null :
+         element.attributes[name].value;
+      }
+    }
+    return element.getAttribute(name);
+  },
+
+  writeAttribute: function(element, name, value) {
+    element = $(element);
+    var attributes = { }, t = Element._attributeTranslations.write;
+
+    if (typeof name == 'object') attributes = name;
+    else attributes[name] = Object.isUndefined(value) ? true : value;
+
+    for (var attr in attributes) {
+      name = t.names[attr] || attr;
+      value = attributes[attr];
+      if (t.values[attr]) name = t.values[attr](element, value);
+      if (value === false || value === null)
+        element.removeAttribute(name);
+      else if (value === true)
+        element.setAttribute(name, name);
+      else element.setAttribute(name, value);
+    }
+    return element;
+  },
+
+  getHeight: function(element) {
+    return $(element).getDimensions().height;
+  },
+
+  getWidth: function(element) {
+    return $(element).getDimensions().width;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    var elementClassName = element.className;
+    return (elementClassName.length > 0 && (elementClassName == className ||
+      new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    if (!element.hasClassName(className))
+      element.className += (element.className ? ' ' : '') + className;
+    return element;
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    element.className = element.className.replace(
+      new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
+    return element;
+  },
+
+  toggleClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return element[element.hasClassName(className) ?
+      'removeClassName' : 'addClassName'](className);
+  },
+
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    var node = element.firstChild;
+    while (node) {
+      var nextNode = node.nextSibling;
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        element.removeChild(node);
+      node = nextNode;
+    }
+    return element;
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.blank();
+  },
+
+  descendantOf: function(element, ancestor) {
+    element = $(element), ancestor = $(ancestor);
+    var originalAncestor = ancestor;
+
+    if (element.compareDocumentPosition)
+      return (element.compareDocumentPosition(ancestor) & 8) === 8;
+
+    if (element.sourceIndex && !Prototype.Browser.Opera) {
+      var e = element.sourceIndex, a = ancestor.sourceIndex,
+       nextAncestor = ancestor.nextSibling;
+      if (!nextAncestor) {
+        do { ancestor = ancestor.parentNode; }
+        while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode);
+      }
+      if (nextAncestor && nextAncestor.sourceIndex)
+       return (e > a && e < nextAncestor.sourceIndex);
+    }
+
+    while (element = element.parentNode)
+      if (element == originalAncestor) return true;
+    return false;
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var pos = element.cumulativeOffset();
+    window.scrollTo(pos[0], pos[1]);
+    return element;
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    style = style == 'float' ? 'cssFloat' : style.camelize();
+    var value = element.style[style];
+    if (!value) {
+      var css = document.defaultView.getComputedStyle(element, null);
+      value = css ? css[style] : null;
+    }
+    if (style == 'opacity') return value ? parseFloat(value) : 1.0;
+    return value == 'auto' ? null : value;
+  },
+
+  getOpacity: function(element) {
+    return $(element).getStyle('opacity');
+  },
+
+  setStyle: function(element, styles) {
+    element = $(element);
+    var elementStyle = element.style, match;
+    if (Object.isString(styles)) {
+      element.style.cssText += ';' + styles;
+      return styles.include('opacity') ?
+        element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
+    }
+    for (var property in styles)
+      if (property == 'opacity') element.setOpacity(styles[property]);
+      else
+        elementStyle[(property == 'float' || property == 'cssFloat') ?
+          (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
+            property] = styles[property];
+
+    return element;
+  },
+
+  setOpacity: function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1 || value === '') ? '' :
+      (value < 0.00001) ? 0 : value;
+    return element;
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    var display = $(element).getStyle('display');
+    if (display != 'none' && display != null) // Safari bug
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    var originalDisplay = els.display;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = 'block';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = originalDisplay;
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (window.opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+    return element;
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+    return element;
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return element;
+    element._overflow = Element.getStyle(element, 'overflow') || 'auto';
+    if (element._overflow !== 'hidden')
+      element.style.overflow = 'hidden';
+    return element;
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (!element._overflow) return element;
+    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+    element._overflow = null;
+    return element;
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        if (element.tagName == 'BODY') break;
+        var p = Element.getStyle(element, 'position');
+        if (p !== 'static') break;
+      }
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (element.getStyle('position') == 'absolute') return;
+    // Position.prepare(); // To be done manually by Scripty when it needs it.
+
+    var offsets = element.positionedOffset();
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+    return element;
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (element.getStyle('position') == 'relative') return;
+    // Position.prepare(); // To be done manually by Scripty when it needs it.
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+    return element;
+  },
+
+  cumulativeScrollOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  getOffsetParent: function(element) {
+    if (element.offsetParent) return $(element.offsetParent);
+    if (element == document.body) return $(element);
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return $(element);
+
+    return $(document.body);
+  },
+
+  viewportOffset: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent == document.body &&
+        Element.getStyle(element, 'position') == 'absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      if (!Prototype.Browser.Opera || element.tagName == 'BODY') {
+        valueT -= element.scrollTop  || 0;
+        valueL -= element.scrollLeft || 0;
+      }
+    } while (element = element.parentNode);
+
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  clonePosition: function(element, source) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || { });
+
+    // find page position of source
+    source = $(source);
+    var p = source.viewportOffset();
+
+    // find coordinate system to use
+    element = $(element);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements,
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(element, 'position') == 'absolute') {
+      parent = element.getOffsetParent();
+      delta = parent.viewportOffset();
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    // set position
+    if (options.setLeft)   element.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if (options.setTop)    element.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if (options.setWidth)  element.style.width = source.offsetWidth + 'px';
+    if (options.setHeight) element.style.height = source.offsetHeight + 'px';
+    return element;
+  }
+};
+
+Element.Methods.identify.counter = 1;
+
+Object.extend(Element.Methods, {
+  getElementsBySelector: Element.Methods.select,
+  childElements: Element.Methods.immediateDescendants
+});
+
+Element._attributeTranslations = {
+  write: {
+    names: {
+      className: 'class',
+      htmlFor:   'for'
+    },
+    values: { }
+  }
+};
+
+if (Prototype.Browser.Opera) {
+  Element.Methods.getStyle = Element.Methods.getStyle.wrap(
+    function(proceed, element, style) {
+      switch (style) {
+        case 'left': case 'top': case 'right': case 'bottom':
+          if (proceed(element, 'position') === 'static') return null;
+        case 'height': case 'width':
+          // returns '0px' for hidden elements; we want it to return null
+          if (!Element.visible(element)) return null;
+
+          // returns the border-box dimensions rather than the content-box
+          // dimensions, so we subtract padding and borders from the value
+          var dim = parseInt(proceed(element, style), 10);
+
+          if (dim !== element['offset' + style.capitalize()])
+            return dim + 'px';
+
+          var properties;
+          if (style === 'height') {
+            properties = ['border-top-width', 'padding-top',
+             'padding-bottom', 'border-bottom-width'];
+          }
+          else {
+            properties = ['border-left-width', 'padding-left',
+             'padding-right', 'border-right-width'];
+          }
+          return properties.inject(dim, function(memo, property) {
+            var val = proceed(element, property);
+            return val === null ? memo : memo - parseInt(val, 10);
+          }) + 'px';
+        default: return proceed(element, style);
+      }
+    }
+  );
+
+  Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
+    function(proceed, element, attribute) {
+      if (attribute === 'title') return element.title;
+      return proceed(element, attribute);
+    }
+  );
+}
+
+else if (Prototype.Browser.IE) {
+  // IE doesn't report offsets correctly for static elements, so we change them
+  // to "relative" to get the values, then change them back.
+  Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
+    function(proceed, element) {
+      element = $(element);
+      var position = element.getStyle('position');
+      if (position !== 'static') return proceed(element);
+      element.setStyle({ position: 'relative' });
+      var value = proceed(element);
+      element.setStyle({ position: position });
+      return value;
+    }
+  );
+
+  $w('positionedOffset viewportOffset').each(function(method) {
+    Element.Methods[method] = Element.Methods[method].wrap(
+      function(proceed, element) {
+        element = $(element);
+        var position = element.getStyle('position');
+        if (position !== 'static') return proceed(element);
+        // Trigger hasLayout on the offset parent so that IE6 reports
+        // accurate offsetTop and offsetLeft values for position: fixed.
+        var offsetParent = element.getOffsetParent();
+        if (offsetParent && offsetParent.getStyle('position') === 'fixed')
+          offsetParent.setStyle({ zoom: 1 });
+        element.setStyle({ position: 'relative' });
+        var value = proceed(element);
+        element.setStyle({ position: position });
+        return value;
+      }
+    );
+  });
+
+  Element.Methods.getStyle = function(element, style) {
+    element = $(element);
+    style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
+    var value = element.style[style];
+    if (!value && element.currentStyle) value = element.currentStyle[style];
+
+    if (style == 'opacity') {
+      if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+        if (value[1]) return parseFloat(value[1]) / 100;
+      return 1.0;
+    }
+
+    if (value == 'auto') {
+      if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
+        return element['offset' + style.capitalize()] + 'px';
+      return null;
+    }
+    return value;
+  };
+
+  Element.Methods.setOpacity = function(element, value) {
+    function stripAlpha(filter){
+      return filter.replace(/alpha\([^\)]*\)/gi,'');
+    }
+    element = $(element);
+    var currentStyle = element.currentStyle;
+    if ((currentStyle && !currentStyle.hasLayout) ||
+      (!currentStyle && element.style.zoom == 'normal'))
+        element.style.zoom = 1;
+
+    var filter = element.getStyle('filter'), style = element.style;
+    if (value == 1 || value === '') {
+      (filter = stripAlpha(filter)) ?
+        style.filter = filter : style.removeAttribute('filter');
+      return element;
+    } else if (value < 0.00001) value = 0;
+    style.filter = stripAlpha(filter) +
+      'alpha(opacity=' + (value * 100) + ')';
+    return element;
+  };
+
+  Element._attributeTranslations = {
+    read: {
+      names: {
+        'class': 'className',
+        'for':   'htmlFor'
+      },
+      values: {
+        _getAttr: function(element, attribute) {
+          return element.getAttribute(attribute, 2);
+        },
+        _getAttrNode: function(element, attribute) {
+          var node = element.getAttributeNode(attribute);
+          return node ? node.value : "";
+        },
+        _getEv: function(element, attribute) {
+          attribute = element.getAttribute(attribute);
+          return attribute ? attribute.toString().slice(23, -2) : null;
+        },
+        _flag: function(element, attribute) {
+          return $(element).hasAttribute(attribute) ? attribute : null;
+        },
+        style: function(element) {
+          return element.style.cssText.toLowerCase();
+        },
+        title: function(element) {
+          return element.title;
+        }
+      }
+    }
+  };
+
+  Element._attributeTranslations.write = {
+    names: Object.extend({
+      cellpadding: 'cellPadding',
+      cellspacing: 'cellSpacing'
+    }, Element._attributeTranslations.read.names),
+    values: {
+      checked: function(element, value) {
+        element.checked = !!value;
+      },
+
+      style: function(element, value) {
+        element.style.cssText = value ? value : '';
+      }
+    }
+  };
+
+  Element._attributeTranslations.has = {};
+
+  $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
+      'encType maxLength readOnly longDesc').each(function(attr) {
+    Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
+    Element._attributeTranslations.has[attr.toLowerCase()] = attr;
+  });
+
+  (function(v) {
+    Object.extend(v, {
+      href:        v._getAttr,
+      src:         v._getAttr,
+      type:        v._getAttr,
+      action:      v._getAttrNode,
+      disabled:    v._flag,
+      checked:     v._flag,
+      readonly:    v._flag,
+      multiple:    v._flag,
+      onload:      v._getEv,
+      onunload:    v._getEv,
+      onclick:     v._getEv,
+      ondblclick:  v._getEv,
+      onmousedown: v._getEv,
+      onmouseup:   v._getEv,
+      onmouseover: v._getEv,
+      onmousemove: v._getEv,
+      onmouseout:  v._getEv,
+      onfocus:     v._getEv,
+      onblur:      v._getEv,
+      onkeypress:  v._getEv,
+      onkeydown:   v._getEv,
+      onkeyup:     v._getEv,
+      onsubmit:    v._getEv,
+      onreset:     v._getEv,
+      onselect:    v._getEv,
+      onchange:    v._getEv
+    });
+  })(Element._attributeTranslations.read.values);
+}
+
+else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
+  Element.Methods.setOpacity = function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1) ? 0.999999 :
+      (value === '') ? '' : (value < 0.00001) ? 0 : value;
+    return element;
+  };
+}
+
+else if (Prototype.Browser.WebKit) {
+  Element.Methods.setOpacity = function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1 || value === '') ? '' :
+      (value < 0.00001) ? 0 : value;
+
+    if (value == 1)
+      if(element.tagName == 'IMG' && element.width) {
+        element.width++; element.width--;
+      } else try {
+        var n = document.createTextNode(' ');
+        element.appendChild(n);
+        element.removeChild(n);
+      } catch (e) { }
+
+    return element;
+  };
+
+  // Safari returns margins on body which is incorrect if the child is absolutely
+  // positioned.  For performance reasons, redefine Element#cumulativeOffset for
+  // KHTML/WebKit only.
+  Element.Methods.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return Element._returnOffset(valueL, valueT);
+  };
+}
+
+if (Prototype.Browser.IE || Prototype.Browser.Opera) {
+  // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements
+  Element.Methods.update = function(element, content) {
+    element = $(element);
+
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) return element.update().insert(content);
+
+    content = Object.toHTML(content);
+    var tagName = element.tagName.toUpperCase();
+
+    if (tagName in Element._insertionTranslations.tags) {
+      $A(element.childNodes).each(function(node) { element.removeChild(node) });
+      Element._getContentFromAnonymousElement(tagName, content.stripScripts())
+        .each(function(node) { element.appendChild(node) });
+    }
+    else element.innerHTML = content.stripScripts();
+
+    content.evalScripts.bind(content).defer();
+    return element;
+  };
+}
+
+if ('outerHTML' in document.createElement('div')) {
+  Element.Methods.replace = function(element, content) {
+    element = $(element);
+
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) {
+      element.parentNode.replaceChild(content, element);
+      return element;
+    }
+
+    content = Object.toHTML(content);
+    var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
+
+    if (Element._insertionTranslations.tags[tagName]) {
+      var nextSibling = element.next();
+      var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+      parent.removeChild(element);
+      if (nextSibling)
+        fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
+      else
+        fragments.each(function(node) { parent.appendChild(node) });
+    }
+    else element.outerHTML = content.stripScripts();
+
+    content.evalScripts.bind(content).defer();
+    return element;
+  };
+}
+
+Element._returnOffset = function(l, t) {
+  var result = [l, t];
+  result.left = l;
+  result.top = t;
+  return result;
+};
+
+Element._getContentFromAnonymousElement = function(tagName, html) {
+  var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
+  if (t) {
+    div.innerHTML = t[0] + html + t[1];
+    t[2].times(function() { div = div.firstChild });
+  } else div.innerHTML = html;
+  return $A(div.childNodes);
+};
+
+Element._insertionTranslations = {
+  before: function(element, node) {
+    element.parentNode.insertBefore(node, element);
+  },
+  top: function(element, node) {
+    element.insertBefore(node, element.firstChild);
+  },
+  bottom: function(element, node) {
+    element.appendChild(node);
+  },
+  after: function(element, node) {
+    element.parentNode.insertBefore(node, element.nextSibling);
+  },
+  tags: {
+    TABLE:  ['<table>',                '</table>',                   1],
+    TBODY:  ['<table><tbody>',         '</tbody></table>',           2],
+    TR:     ['<table><tbody><tr>',     '</tr></tbody></table>',      3],
+    TD:     ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
+    SELECT: ['<select>',               '</select>',                  1]
+  }
+};
+
+(function() {
+  Object.extend(this.tags, {
+    THEAD: this.tags.TBODY,
+    TFOOT: this.tags.TBODY,
+    TH:    this.tags.TD
+  });
+}).call(Element._insertionTranslations);
+
+Element.Methods.Simulated = {
+  hasAttribute: function(element, attribute) {
+    attribute = Element._attributeTranslations.has[attribute] || attribute;
+    var node = $(element).getAttributeNode(attribute);
+    return node && node.specified;
+  }
+};
+
+Element.Methods.ByTag = { };
+
+Object.extend(Element, Element.Methods);
+
+if (!Prototype.BrowserFeatures.ElementExtensions &&
+    document.createElement('div').__proto__) {
+  window.HTMLElement = { };
+  window.HTMLElement.prototype = document.createElement('div').__proto__;
+  Prototype.BrowserFeatures.ElementExtensions = true;
+}
+
+Element.extend = (function() {
+  if (Prototype.BrowserFeatures.SpecificElementExtensions)
+    return Prototype.K;
+
+  var Methods = { }, ByTag = Element.Methods.ByTag;
+
+  var extend = Object.extend(function(element) {
+    if (!element || element._extendedByPrototype ||
+        element.nodeType != 1 || element == window) return element;
+
+    var methods = Object.clone(Methods),
+      tagName = element.tagName, property, value;
+
+    // extend methods for specific tags
+    if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
+
+    for (property in methods) {
+      value = methods[property];
+      if (Object.isFunction(value) && !(property in element))
+        element[property] = value.methodize();
+    }
+
+    element._extendedByPrototype = Prototype.emptyFunction;
+    return element;
+
+  }, {
+    refresh: function() {
+      // extend methods for all tags (Safari doesn't need this)
+      if (!Prototype.BrowserFeatures.ElementExtensions) {
+        Object.extend(Methods, Element.Methods);
+        Object.extend(Methods, Element.Methods.Simulated);
+      }
+    }
+  });
+
+  extend.refresh();
+  return extend;
+})();
+
+Element.hasAttribute = function(element, attribute) {
+  if (element.hasAttribute) return element.hasAttribute(attribute);
+  return Element.Methods.Simulated.hasAttribute(element, attribute);
+};
+
+Element.addMethods = function(methods) {
+  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
+
+  if (!methods) {
+    Object.extend(Form, Form.Methods);
+    Object.extend(Form.Element, Form.Element.Methods);
+    Object.extend(Element.Methods.ByTag, {
+      "FORM":     Object.clone(Form.Methods),
+      "INPUT":    Object.clone(Form.Element.Methods),
+      "SELECT":   Object.clone(Form.Element.Methods),
+      "TEXTAREA": Object.clone(Form.Element.Methods)
+    });
+  }
+
+  if (arguments.length == 2) {
+    var tagName = methods;
+    methods = arguments[1];
+  }
+
+  if (!tagName) Object.extend(Element.Methods, methods || { });
+  else {
+    if (Object.isArray(tagName)) tagName.each(extend);
+    else extend(tagName);
+  }
+
+  function extend(tagName) {
+    tagName = tagName.toUpperCase();
+    if (!Element.Methods.ByTag[tagName])
+      Element.Methods.ByTag[tagName] = { };
+    Object.extend(Element.Methods.ByTag[tagName], methods);
+  }
+
+  function copy(methods, destination, onlyIfAbsent) {
+    onlyIfAbsent = onlyIfAbsent || false;
+    for (var property in methods) {
+      var value = methods[property];
+      if (!Object.isFunction(value)) continue;
+      if (!onlyIfAbsent || !(property in destination))
+        destination[property] = value.methodize();
+    }
+  }
+
+  function findDOMClass(tagName) {
+    var klass;
+    var trans = {
+      "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
+      "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
+      "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
+      "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
+      "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
+      "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
+      "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
+      "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
+      "FrameSet", "IFRAME": "IFrame"
+    };
+    if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
+    if (window[klass]) return window[klass];
+    klass = 'HTML' + tagName + 'Element';
+    if (window[klass]) return window[klass];
+    klass = 'HTML' + tagName.capitalize() + 'Element';
+    if (window[klass]) return window[klass];
+
+    window[klass] = { };
+    window[klass].prototype = document.createElement(tagName).__proto__;
+    return window[klass];
+  }
+
+  if (F.ElementExtensions) {
+    copy(Element.Methods, HTMLElement.prototype);
+    copy(Element.Methods.Simulated, HTMLElement.prototype, true);
+  }
+
+  if (F.SpecificElementExtensions) {
+    for (var tag in Element.Methods.ByTag) {
+      var klass = findDOMClass(tag);
+      if (Object.isUndefined(klass)) continue;
+      copy(T[tag], klass.prototype);
+    }
+  }
+
+  Object.extend(Element, Element.Methods);
+  delete Element.ByTag;
+
+  if (Element.extend.refresh) Element.extend.refresh();
+  Element.cache = { };
+};
+
+document.viewport = {
+  getDimensions: function() {
+    var dimensions = { };
+    var B = Prototype.Browser;
+    $w('width height').each(function(d) {
+      var D = d.capitalize();
+      dimensions[d] = (B.WebKit && !document.evaluate) ? self['inner' + D] :
+        (B.Opera) ? document.body['client' + D] : document.documentElement['client' + D];
+    });
+    return dimensions;
+  },
+
+  getWidth: function() {
+    return this.getDimensions().width;
+  },
+
+  getHeight: function() {
+    return this.getDimensions().height;
+  },
+
+  getScrollOffsets: function() {
+    return Element._returnOffset(
+      window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
+      window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
+  }
+};
+/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,
+ * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
+ * license.  Please see http://www.yui-ext.com/ for more information. */
+
+var Selector = Class.create({
+  initialize: function(expression) {
+    this.expression = expression.strip();
+    this.compileMatcher();
+  },
+
+  shouldUseXPath: function() {
+    if (!Prototype.BrowserFeatures.XPath) return false;
+
+    var e = this.expression;
+
+    // Safari 3 chokes on :*-of-type and :empty
+    if (Prototype.Browser.WebKit &&
+     (e.include("-of-type") || e.include(":empty")))
+      return false;
+
+    // XPath can't do namespaced attributes, nor can it read
+    // the "checked" property from DOM nodes
+    if ((/(\[[\w-]*?:|:checked)/).test(this.expression))
+      return false;
+
+    return true;
+  },
+
+  compileMatcher: function() {
+    if (this.shouldUseXPath())
+      return this.compileXPathMatcher();
+
+    var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
+        c = Selector.criteria, le, p, m;
+
+    if (Selector._cache[e]) {
+      this.matcher = Selector._cache[e];
+      return;
+    }
+
+    this.matcher = ["this.matcher = function(root) {",
+                    "var r = root, h = Selector.handlers, c = false, n;"];
+
+    while (e && le != e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        p = ps[i];
+        if (m = e.match(p)) {
+          this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
+    	      new Template(c[i]).evaluate(m));
+          e = e.replace(m[0], '');
+          break;
+        }
+      }
+    }
+
+    this.matcher.push("return h.unique(n);\n}");
+    eval(this.matcher.join('\n'));
+    Selector._cache[this.expression] = this.matcher;
+  },
+
+  compileXPathMatcher: function() {
+    var e = this.expression, ps = Selector.patterns,
+        x = Selector.xpath, le, m;
+
+    if (Selector._cache[e]) {
+      this.xpath = Selector._cache[e]; return;
+    }
+
+    this.matcher = ['.//*'];
+    while (e && le != e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        if (m = e.match(ps[i])) {
+          this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
+            new Template(x[i]).evaluate(m));
+          e = e.replace(m[0], '');
+          break;
+        }
+      }
+    }
+
+    this.xpath = this.matcher.join('');
+    Selector._cache[this.expression] = this.xpath;
+  },
+
+  findElements: function(root) {
+    root = root || document;
+    if (this.xpath) return document._getElementsByXPath(this.xpath, root);
+    return this.matcher(root);
+  },
+
+  match: function(element) {
+    this.tokens = [];
+
+    var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
+    var le, p, m;
+
+    while (e && le !== e && (/\S/).test(e)) {
+      le = e;
+      for (var i in ps) {
+        p = ps[i];
+        if (m = e.match(p)) {
+          // use the Selector.assertions methods unless the selector
+          // is too complex.
+          if (as[i]) {
+            this.tokens.push([i, Object.clone(m)]);
+            e = e.replace(m[0], '');
+          } else {
+            // reluctantly do a document-wide search
+            // and look for a match in the array
+            return this.findElements(document).include(element);
+          }
+        }
+      }
+    }
+
+    var match = true, name, matches;
+    for (var i = 0, token; token = this.tokens[i]; i++) {
+      name = token[0], matches = token[1];
+      if (!Selector.assertions[name](element, matches)) {
+        match = false; break;
+      }
+    }
+
+    return match;
+  },
+
+  toString: function() {
+    return this.expression;
+  },
+
+  inspect: function() {
+    return "#<Selector:" + this.expression.inspect() + ">";
+  }
+});
+
+Object.extend(Selector, {
+  _cache: { },
+
+  xpath: {
+    descendant:   "//*",
+    child:        "/*",
+    adjacent:     "/following-sibling::*[1]",
+    laterSibling: '/following-sibling::*',
+    tagName:      function(m) {
+      if (m[1] == '*') return '';
+      return "[local-name()='" + m[1].toLowerCase() +
+             "' or local-name()='" + m[1].toUpperCase() + "']";
+    },
+    className:    "[contains(concat(' ', @class, ' '), ' #{1} ')]",
+    id:           "[@id='#{1}']",
+    attrPresence: function(m) {
+      m[1] = m[1].toLowerCase();
+      return new Template("[@#{1}]").evaluate(m);
+    },
+    attr: function(m) {
+      m[1] = m[1].toLowerCase();
+      m[3] = m[5] || m[6];
+      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
+    },
+    pseudo: function(m) {
+      var h = Selector.xpath.pseudos[m[1]];
+      if (!h) return '';
+      if (Object.isFunction(h)) return h(m);
+      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
+    },
+    operators: {
+      '=':  "[@#{1}='#{3}']",
+      '!=': "[@#{1}!='#{3}']",
+      '^=': "[starts-with(@#{1}, '#{3}')]",
+      '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
+      '*=': "[contains(@#{1}, '#{3}')]",
+      '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
+      '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
+    },
+    pseudos: {
+      'first-child': '[not(preceding-sibling::*)]',
+      'last-child':  '[not(following-sibling::*)]',
+      'only-child':  '[not(preceding-sibling::* or following-sibling::*)]',
+      'empty':       "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",
+      'checked':     "[@checked]",
+      'disabled':    "[@disabled]",
+      'enabled':     "[not(@disabled)]",
+      'not': function(m) {
+        var e = m[6], p = Selector.patterns,
+            x = Selector.xpath, le, v;
+
+        var exclusion = [];
+        while (e && le != e && (/\S/).test(e)) {
+          le = e;
+          for (var i in p) {
+            if (m = e.match(p[i])) {
+              v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m);
+              exclusion.push("(" + v.substring(1, v.length - 1) + ")");
+              e = e.replace(m[0], '');
+              break;
+            }
+          }
+        }
+        return "[not(" + exclusion.join(" and ") + ")]";
+      },
+      'nth-child':      function(m) {
+        return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
+      },
+      'nth-last-child': function(m) {
+        return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
+      },
+      'nth-of-type':    function(m) {
+        return Selector.xpath.pseudos.nth("position() ", m);
+      },
+      'nth-last-of-type': function(m) {
+        return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
+      },
+      'first-of-type':  function(m) {
+        m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
+      },
+      'last-of-type':   function(m) {
+        m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
+      },
+      'only-of-type':   function(m) {
+        var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
+      },
+      nth: function(fragment, m) {
+        var mm, formula = m[6], predicate;
+        if (formula == 'even') formula = '2n+0';
+        if (formula == 'odd')  formula = '2n+1';
+        if (mm = formula.match(/^(\d+)$/)) // digit only
+          return '[' + fragment + "= " + mm[1] + ']';
+        if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+          if (mm[1] == "-") mm[1] = -1;
+          var a = mm[1] ? Number(mm[1]) : 1;
+          var b = mm[2] ? Number(mm[2]) : 0;
+          predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
+          "((#{fragment} - #{b}) div #{a} >= 0)]";
+          return new Template(predicate).evaluate({
+            fragment: fragment, a: a, b: b });
+        }
+      }
+    }
+  },
+
+  criteria: {
+    tagName:      'n = h.tagName(n, r, "#{1}", c);      c = false;',
+    className:    'n = h.className(n, r, "#{1}", c);    c = false;',
+    id:           'n = h.id(n, r, "#{1}", c);           c = false;',
+    attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
+    attr: function(m) {
+      m[3] = (m[5] || m[6]);
+      return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
+    },
+    pseudo: function(m) {
+      if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
+      return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
+    },
+    descendant:   'c = "descendant";',
+    child:        'c = "child";',
+    adjacent:     'c = "adjacent";',
+    laterSibling: 'c = "laterSibling";'
+  },
+
+  patterns: {
+    // combinators must be listed first
+    // (and descendant needs to be last combinator)
+    laterSibling: /^\s*~\s*/,
+    child:        /^\s*>\s*/,
+    adjacent:     /^\s*\+\s*/,
+    descendant:   /^\s/,
+
+    // selectors follow
+    tagName:      /^\s*(\*|[\w\-]+)(\b|$)?/,
+    id:           /^#([\w\-\*]+)(\b|$)/,
+    className:    /^\.([\w\-\*]+)(\b|$)/,
+    pseudo:
+/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
+    attrPresence: /^\[([\w]+)\]/,
+    attr:         /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
+  },
+
+  // for Selector.match and Element#match
+  assertions: {
+    tagName: function(element, matches) {
+      return matches[1].toUpperCase() == element.tagName.toUpperCase();
+    },
+
+    className: function(element, matches) {
+      return Element.hasClassName(element, matches[1]);
+    },
+
+    id: function(element, matches) {
+      return element.id === matches[1];
+    },
+
+    attrPresence: function(element, matches) {
+      return Element.hasAttribute(element, matches[1]);
+    },
+
+    attr: function(element, matches) {
+      var nodeValue = Element.readAttribute(element, matches[1]);
+      return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
+    }
+  },
+
+  handlers: {
+    // UTILITY FUNCTIONS
+    // joins two collections
+    concat: function(a, b) {
+      for (var i = 0, node; node = b[i]; i++)
+        a.push(node);
+      return a;
+    },
+
+    // marks an array of nodes for counting
+    mark: function(nodes) {
+      var _true = Prototype.emptyFunction;
+      for (var i = 0, node; node = nodes[i]; i++)
+        node._countedByPrototype = _true;
+      return nodes;
+    },
+
+    unmark: function(nodes) {
+      for (var i = 0, node; node = nodes[i]; i++)
+        node._countedByPrototype = undefined;
+      return nodes;
+    },
+
+    // mark each child node with its position (for nth calls)
+    // "ofType" flag indicates whether we're indexing for nth-of-type
+    // rather than nth-child
+    index: function(parentNode, reverse, ofType) {
+      parentNode._countedByPrototype = Prototype.emptyFunction;
+      if (reverse) {
+        for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
+          var node = nodes[i];
+          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+        }
+      } else {
+        for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
+          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+      }
+    },
+
+    // filters out duplicates and extends all nodes
+    unique: function(nodes) {
+      if (nodes.length == 0) return nodes;
+      var results = [], n;
+      for (var i = 0, l = nodes.length; i < l; i++)
+        if (!(n = nodes[i])._countedByPrototype) {
+          n._countedByPrototype = Prototype.emptyFunction;
+          results.push(Element.extend(n));
+        }
+      return Selector.handlers.unmark(results);
+    },
+
+    // COMBINATOR FUNCTIONS
+    descendant: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        h.concat(results, node.getElementsByTagName('*'));
+      return results;
+    },
+
+    child: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        for (var j = 0, child; child = node.childNodes[j]; j++)
+          if (child.nodeType == 1 && child.tagName != '!') results.push(child);
+      }
+      return results;
+    },
+
+    adjacent: function(nodes) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        var next = this.nextElementSibling(node);
+        if (next) results.push(next);
+      }
+      return results;
+    },
+
+    laterSibling: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        h.concat(results, Element.nextSiblings(node));
+      return results;
+    },
+
+    nextElementSibling: function(node) {
+      while (node = node.nextSibling)
+	      if (node.nodeType == 1) return node;
+      return null;
+    },
+
+    previousElementSibling: function(node) {
+      while (node = node.previousSibling)
+        if (node.nodeType == 1) return node;
+      return null;
+    },
+
+    // TOKEN FUNCTIONS
+    tagName: function(nodes, root, tagName, combinator) {
+      var uTagName = tagName.toUpperCase();
+      var results = [], h = Selector.handlers;
+      if (nodes) {
+        if (combinator) {
+          // fastlane for ordinary descendant combinators
+          if (combinator == "descendant") {
+            for (var i = 0, node; node = nodes[i]; i++)
+              h.concat(results, node.getElementsByTagName(tagName));
+            return results;
+          } else nodes = this[combinator](nodes);
+          if (tagName == "*") return nodes;
+        }
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node.tagName.toUpperCase() === uTagName) results.push(node);
+        return results;
+      } else return root.getElementsByTagName(tagName);
+    },
+
+    id: function(nodes, root, id, combinator) {
+      var targetNode = $(id), h = Selector.handlers;
+      if (!targetNode) return [];
+      if (!nodes && root == document) return [targetNode];
+      if (nodes) {
+        if (combinator) {
+          if (combinator == 'child') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (targetNode.parentNode == node) return [targetNode];
+          } else if (combinator == 'descendant') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (Element.descendantOf(targetNode, node)) return [targetNode];
+          } else if (combinator == 'adjacent') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (Selector.handlers.previousElementSibling(targetNode) == node)
+                return [targetNode];
+          } else nodes = h[combinator](nodes);
+        }
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node == targetNode) return [targetNode];
+        return [];
+      }
+      return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
+    },
+
+    className: function(nodes, root, className, combinator) {
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      return Selector.handlers.byClassName(nodes, root, className);
+    },
+
+    byClassName: function(nodes, root, className) {
+      if (!nodes) nodes = Selector.handlers.descendant([root]);
+      var needle = ' ' + className + ' ';
+      for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
+        nodeClassName = node.className;
+        if (nodeClassName.length == 0) continue;
+        if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
+          results.push(node);
+      }
+      return results;
+    },
+
+    attrPresence: function(nodes, root, attr, combinator) {
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      var results = [];
+      for (var i = 0, node; node = nodes[i]; i++)
+        if (Element.hasAttribute(node, attr)) results.push(node);
+      return results;
+    },
+
+    attr: function(nodes, root, attr, value, operator, combinator) {
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      var handler = Selector.operators[operator], results = [];
+      for (var i = 0, node; node = nodes[i]; i++) {
+        var nodeValue = Element.readAttribute(node, attr);
+        if (nodeValue === null) continue;
+        if (handler(nodeValue, value)) results.push(node);
+      }
+      return results;
+    },
+
+    pseudo: function(nodes, name, value, root, combinator) {
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      return Selector.pseudos[name](nodes, value, root);
+    }
+  },
+
+  pseudos: {
+    'first-child': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        if (Selector.handlers.previousElementSibling(node)) continue;
+          results.push(node);
+      }
+      return results;
+    },
+    'last-child': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        if (Selector.handlers.nextElementSibling(node)) continue;
+          results.push(node);
+      }
+      return results;
+    },
+    'only-child': function(nodes, value, root) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
+          results.push(node);
+      return results;
+    },
+    'nth-child':        function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root);
+    },
+    'nth-last-child':   function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, true);
+    },
+    'nth-of-type':      function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, false, true);
+    },
+    'nth-last-of-type': function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, true, true);
+    },
+    'first-of-type':    function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, "1", root, false, true);
+    },
+    'last-of-type':     function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, "1", root, true, true);
+    },
+    'only-of-type':     function(nodes, formula, root) {
+      var p = Selector.pseudos;
+      return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
+    },
+
+    // handles the an+b logic
+    getIndices: function(a, b, total) {
+      if (a == 0) return b > 0 ? [b] : [];
+      return $R(1, total).inject([], function(memo, i) {
+        if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
+        return memo;
+      });
+    },
+
+    // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
+    nth: function(nodes, formula, root, reverse, ofType) {
+      if (nodes.length == 0) return [];
+      if (formula == 'even') formula = '2n+0';
+      if (formula == 'odd')  formula = '2n+1';
+      var h = Selector.handlers, results = [], indexed = [], m;
+      h.mark(nodes);
+      for (var i = 0, node; node = nodes[i]; i++) {
+        if (!node.parentNode._countedByPrototype) {
+          h.index(node.parentNode, reverse, ofType);
+          indexed.push(node.parentNode);
+        }
+      }
+      if (formula.match(/^\d+$/)) { // just a number
+        formula = Number(formula);
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node.nodeIndex == formula) results.push(node);
+      } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+        if (m[1] == "-") m[1] = -1;
+        var a = m[1] ? Number(m[1]) : 1;
+        var b = m[2] ? Number(m[2]) : 0;
+        var indices = Selector.pseudos.getIndices(a, b, nodes.length);
+        for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
+          for (var j = 0; j < l; j++)
+            if (node.nodeIndex == indices[j]) results.push(node);
+        }
+      }
+      h.unmark(nodes);
+      h.unmark(indexed);
+      return results;
+    },
+
+    'empty': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        // IE treats comments as element nodes
+        if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue;
+        results.push(node);
+      }
+      return results;
+    },
+
+    'not': function(nodes, selector, root) {
+      var h = Selector.handlers, selectorType, m;
+      var exclusions = new Selector(selector).findElements(root);
+      h.mark(exclusions);
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!node._countedByPrototype) results.push(node);
+      h.unmark(exclusions);
+      return results;
+    },
+
+    'enabled': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!node.disabled) results.push(node);
+      return results;
+    },
+
+    'disabled': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (node.disabled) results.push(node);
+      return results;
+    },
+
+    'checked': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (node.checked) results.push(node);
+      return results;
+    }
+  },
+
+  operators: {
+    '=':  function(nv, v) { return nv == v; },
+    '!=': function(nv, v) { return nv != v; },
+    '^=': function(nv, v) { return nv.startsWith(v); },
+    '$=': function(nv, v) { return nv.endsWith(v); },
+    '*=': function(nv, v) { return nv.include(v); },
+    '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
+    '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); }
+  },
+
+  split: function(expression) {
+    var expressions = [];
+    expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
+      expressions.push(m[1].strip());
+    });
+    return expressions;
+  },
+
+  matchElements: function(elements, expression) {
+    var matches = $$(expression), h = Selector.handlers;
+    h.mark(matches);
+    for (var i = 0, results = [], element; element = elements[i]; i++)
+      if (element._countedByPrototype) results.push(element);
+    h.unmark(matches);
+    return results;
+  },
+
+  findElement: function(elements, expression, index) {
+    if (Object.isNumber(expression)) {
+      index = expression; expression = false;
+    }
+    return Selector.matchElements(elements, expression || '*')[index || 0];
+  },
+
+  findChildElements: function(element, expressions) {
+    expressions = Selector.split(expressions.join(','));
+    var results = [], h = Selector.handlers;
+    for (var i = 0, l = expressions.length, selector; i < l; i++) {
+      selector = new Selector(expressions[i].strip());
+      h.concat(results, selector.findElements(element));
+    }
+    return (l > 1) ? h.unique(results) : results;
+  }
+});
+
+if (Prototype.Browser.IE) {
+  Object.extend(Selector.handlers, {
+    // IE returns comment nodes on getElementsByTagName("*").
+    // Filter them out.
+    concat: function(a, b) {
+      for (var i = 0, node; node = b[i]; i++)
+        if (node.tagName !== "!") a.push(node);
+      return a;
+    },
+
+    // IE improperly serializes _countedByPrototype in (inner|outer)HTML.
+    unmark: function(nodes) {
+      for (var i = 0, node; node = nodes[i]; i++)
+        node.removeAttribute('_countedByPrototype');
+      return nodes;
+    }
+  });
+}
+
+function $$() {
+  return Selector.findChildElements(document, $A(arguments));
+}
+var Form = {
+  reset: function(form) {
+    $(form).reset();
+    return form;
+  },
+
+  serializeElements: function(elements, options) {
+    if (typeof options != 'object') options = { hash: !!options };
+    else if (Object.isUndefined(options.hash)) options.hash = true;
+    var key, value, submitted = false, submit = options.submit;
+
+    var data = elements.inject({ }, function(result, element) {
+      if (!element.disabled && element.name) {
+        key = element.name; value = $(element).getValue();
+        if (value != null && (element.type != 'submit' || (!submitted &&
+            submit !== false && (!submit || key == submit) && (submitted = true)))) {
+          if (key in result) {
+            // a key is already present; construct an array of values
+            if (!Object.isArray(result[key])) result[key] = [result[key]];
+            result[key].push(value);
+          }
+          else result[key] = value;
+        }
+      }
+      return result;
+    });
+
+    return options.hash ? data : Object.toQueryString(data);
+  }
+};
+
+Form.Methods = {
+  serialize: function(form, options) {
+    return Form.serializeElements(Form.getElements(form), options);
+  },
+
+  getElements: function(form) {
+    return $A($(form).getElementsByTagName('*')).inject([],
+      function(elements, child) {
+        if (Form.Element.Serializers[child.tagName.toLowerCase()])
+          elements.push(Element.extend(child));
+        return elements;
+      }
+    );
+  },
+
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+
+    if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) || (name && input.name != name))
+        continue;
+      matchingInputs.push(Element.extend(input));
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    form = $(form);
+    Form.getElements(form).invoke('disable');
+    return form;
+  },
+
+  enable: function(form) {
+    form = $(form);
+    Form.getElements(form).invoke('enable');
+    return form;
+  },
+
+  findFirstElement: function(form) {
+    var elements = $(form).getElements().findAll(function(element) {
+      return 'hidden' != element.type && !element.disabled;
+    });
+    var firstByIndex = elements.findAll(function(element) {
+      return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
+    }).sortBy(function(element) { return element.tabIndex }).first();
+
+    return firstByIndex ? firstByIndex : elements.find(function(element) {
+      return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+    });
+  },
+
+  focusFirstElement: function(form) {
+    form = $(form);
+    form.findFirstElement().activate();
+    return form;
+  },
+
+  request: function(form, options) {
+    form = $(form), options = Object.clone(options || { });
+
+    var params = options.parameters, action = form.readAttribute('action') || '';
+    if (action.blank()) action = window.location.href;
+    options.parameters = form.serialize(true);
+
+    if (params) {
+      if (Object.isString(params)) params = params.toQueryParams();
+      Object.extend(options.parameters, params);
+    }
+
+    if (form.hasAttribute('method') && !options.method)
+      options.method = form.method;
+
+    return new Ajax.Request(action, options);
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element = {
+  focus: function(element) {
+    $(element).focus();
+    return element;
+  },
+
+  select: function(element) {
+    $(element).select();
+    return element;
+  }
+};
+
+Form.Element.Methods = {
+  serialize: function(element) {
+    element = $(element);
+    if (!element.disabled && element.name) {
+      var value = element.getValue();
+      if (value != undefined) {
+        var pair = { };
+        pair[element.name] = value;
+        return Object.toQueryString(pair);
+      }
+    }
+    return '';
+  },
+
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    return Form.Element.Serializers[method](element);
+  },
+
+  setValue: function(element, value) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    Form.Element.Serializers[method](element, value);
+    return element;
+  },
+
+  clear: function(element) {
+    $(element).value = '';
+    return element;
+  },
+
+  present: function(element) {
+    return $(element).value != '';
+  },
+
+  activate: function(element) {
+    element = $(element);
+    try {
+      element.focus();
+      if (element.select && (element.tagName.toLowerCase() != 'input' ||
+          !['button', 'reset', 'submit'].include(element.type)))
+        element.select();
+    } catch (e) { }
+    return element;
+  },
+
+  disable: function(element) {
+    element = $(element);
+    element.blur();
+    element.disabled = true;
+    return element;
+  },
+
+  enable: function(element) {
+    element = $(element);
+    element.disabled = false;
+    return element;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Field = Form.Element;
+var $F = Form.Element.Methods.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+  input: function(element, value) {
+    switch (element.type.toLowerCase()) {
+      case 'checkbox':
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element, value);
+      default:
+        return Form.Element.Serializers.textarea(element, value);
+    }
+  },
+
+  inputSelector: function(element, value) {
+    if (Object.isUndefined(value)) return element.checked ? element.value : null;
+    else element.checked = !!value;
+  },
+
+  textarea: function(element, value) {
+    if (Object.isUndefined(value)) return element.value;
+    else element.value = value;
+  },
+
+  select: function(element, index) {
+    if (Object.isUndefined(index))
+      return this[element.type == 'select-one' ?
+        'selectOne' : 'selectMany'](element);
+    else {
+      var opt, value, single = !Object.isArray(index);
+      for (var i = 0, length = element.length; i < length; i++) {
+        opt = element.options[i];
+        value = this.optionValue(opt);
+        if (single) {
+          if (value == index) {
+            opt.selected = true;
+            return;
+          }
+        }
+        else opt.selected = index.include(value);
+      }
+    }
+  },
+
+  selectOne: function(element) {
+    var index = element.selectedIndex;
+    return index >= 0 ? this.optionValue(element.options[index]) : null;
+  },
+
+  selectMany: function(element) {
+    var values, length = element.length;
+    if (!length) return null;
+
+    for (var i = 0, values = []; i < length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) values.push(this.optionValue(opt));
+    }
+    return values;
+  },
+
+  optionValue: function(opt) {
+    // extend element because hasAttribute may not be native
+    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
+  initialize: function($super, element, frequency, callback) {
+    $super(callback, frequency);
+    this.element   = $(element);
+    this.lastValue = this.getValue();
+  },
+
+  execute: function() {
+    var value = this.getValue();
+    if (Object.isString(this.lastValue) && Object.isString(value) ?
+        this.lastValue != value : String(this.lastValue) != String(value)) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+});
+
+Form.Element.Observer = Class.create(Abstract.TimedObserver, {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create(Abstract.TimedObserver, {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = Class.create({
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+
+  registerFormCallbacks: function() {
+    Form.getElements(this.element).each(this.registerCallback, this);
+  },
+
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        default:
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }
+  }
+});
+
+Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create(Abstract.EventObserver, {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+if (!window.Event) var Event = { };
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+  KEY_HOME:     36,
+  KEY_END:      35,
+  KEY_PAGEUP:   33,
+  KEY_PAGEDOWN: 34,
+  KEY_INSERT:   45,
+
+  cache: { },
+
+  relatedTarget: function(event) {
+    var element;
+    switch(event.type) {
+      case 'mouseover': element = event.fromElement; break;
+      case 'mouseout':  element = event.toElement;   break;
+      default: return null;
+    }
+    return Element.extend(element);
+  }
+});
+
+Event.Methods = (function() {
+  var isButton;
+
+  if (Prototype.Browser.IE) {
+    var buttonMap = { 0: 1, 1: 4, 2: 2 };
+    isButton = function(event, code) {
+      return event.button == buttonMap[code];
+    };
+
+  } else if (Prototype.Browser.WebKit) {
+    isButton = function(event, code) {
+      switch (code) {
+        case 0: return event.which == 1 && !event.metaKey;
+        case 1: return event.which == 1 && event.metaKey;
+        default: return false;
+      }
+    };
+
+  } else {
+    isButton = function(event, code) {
+      return event.which ? (event.which === code + 1) : (event.button === code);
+    };
+  }
+
+  return {
+    isLeftClick:   function(event) { return isButton(event, 0) },
+    isMiddleClick: function(event) { return isButton(event, 1) },
+    isRightClick:  function(event) { return isButton(event, 2) },
+
+    element: function(event) {
+      var node = Event.extend(event).target;
+      return Element.extend(node.nodeType == Node.TEXT_NODE ? node.parentNode : node);
+    },
+
+    findElement: function(event, expression) {
+      var element = Event.element(event);
+      if (!expression) return element;
+      var elements = [element].concat(element.ancestors());
+      return Selector.findElement(elements, expression, 0);
+    },
+
+    pointer: function(event) {
+      return {
+        x: event.pageX || (event.clientX +
+          (document.documentElement.scrollLeft || document.body.scrollLeft)),
+        y: event.pageY || (event.clientY +
+          (document.documentElement.scrollTop || document.body.scrollTop))
+      };
+    },
+
+    pointerX: function(event) { return Event.pointer(event).x },
+    pointerY: function(event) { return Event.pointer(event).y },
+
+    stop: function(event) {
+      Event.extend(event);
+      event.preventDefault();
+      event.stopPropagation();
+      event.stopped = true;
+    }
+  };
+})();
+
+Event.extend = (function() {
+  var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
+    m[name] = Event.Methods[name].methodize();
+    return m;
+  });
+
+  if (Prototype.Browser.IE) {
+    Object.extend(methods, {
+      stopPropagation: function() { this.cancelBubble = true },
+      preventDefault:  function() { this.returnValue = false },
+      inspect: function() { return "[object Event]" }
+    });
+
+    return function(event) {
+      if (!event) return false;
+      if (event._extendedByPrototype) return event;
+
+      event._extendedByPrototype = Prototype.emptyFunction;
+      var pointer = Event.pointer(event);
+      Object.extend(event, {
+        target: event.srcElement,
+        relatedTarget: Event.relatedTarget(event),
+        pageX:  pointer.x,
+        pageY:  pointer.y
+      });
+      return Object.extend(event, methods);
+    };
+
+  } else {
+    Event.prototype = Event.prototype || document.createEvent("HTMLEvents").__proto__;
+    Object.extend(Event.prototype, methods);
+    return Prototype.K;
+  }
+})();
+
+Object.extend(Event, (function() {
+  var cache = Event.cache;
+
+  function getEventID(element) {
+    if (element._prototypeEventID) return element._prototypeEventID[0];
+    arguments.callee.id = arguments.callee.id || 1;
+    return element._prototypeEventID = [++arguments.callee.id];
+  }
+
+  function getDOMEventName(eventName) {
+    if (eventName && eventName.include(':')) return "dataavailable";
+    return eventName;
+  }
+
+  function getCacheForID(id) {
+    return cache[id] = cache[id] || { };
+  }
+
+  function getWrappersForEventName(id, eventName) {
+    var c = getCacheForID(id);
+    return c[eventName] = c[eventName] || [];
+  }
+
+  function createWrapper(element, eventName, handler) {
+    var id = getEventID(element);
+    var c = getWrappersForEventName(id, eventName);
+    if (c.pluck("handler").include(handler)) return false;
+
+    var wrapper = function(event) {
+      if (!Event || !Event.extend ||
+        (event.eventName && event.eventName != eventName))
+          return false;
+
+      Event.extend(event);
+      handler.call(element, event);
+    };
+
+    wrapper.handler = handler;
+    c.push(wrapper);
+    return wrapper;
+  }
+
+  function findWrapper(id, eventName, handler) {
+    var c = getWrappersForEventName(id, eventName);
+    return c.find(function(wrapper) { return wrapper.handler == handler });
+  }
+
+  function destroyWrapper(id, eventName, handler) {
+    var c = getCacheForID(id);
+    if (!c[eventName]) return false;
+    c[eventName] = c[eventName].without(findWrapper(id, eventName, handler));
+  }
+
+  function destroyCache() {
+    for (var id in cache)
+      for (var eventName in cache[id])
+        cache[id][eventName] = null;
+  }
+
+  if (window.attachEvent) {
+    window.attachEvent("onunload", destroyCache);
+  }
+
+  return {
+    observe: function(element, eventName, handler) {
+      element = $(element);
+      var name = getDOMEventName(eventName);
+
+      var wrapper = createWrapper(element, eventName, handler);
+      if (!wrapper) return element;
+
+      if (element.addEventListener) {
+        element.addEventListener(name, wrapper, false);
+      } else {
+        element.attachEvent("on" + name, wrapper);
+      }
+
+      return element;
+    },
+
+    stopObserving: function(element, eventName, handler) {
+      element = $(element);
+      var id = getEventID(element), name = getDOMEventName(eventName);
+
+      if (!handler && eventName) {
+        getWrappersForEventName(id, eventName).each(function(wrapper) {
+          element.stopObserving(eventName, wrapper.handler);
+        });
+        return element;
+
+      } else if (!eventName) {
+        Object.keys(getCacheForID(id)).each(function(eventName) {
+          element.stopObserving(eventName);
+        });
+        return element;
+      }
+
+      var wrapper = findWrapper(id, eventName, handler);
+      if (!wrapper) return element;
+
+      if (element.removeEventListener) {
+        element.removeEventListener(name, wrapper, false);
+      } else {
+        element.detachEvent("on" + name, wrapper);
+      }
+
+      destroyWrapper(id, eventName, handler);
+
+      return element;
+    },
+
+    fire: function(element, eventName, memo) {
+      element = $(element);
+      if (element == document && document.createEvent && !element.dispatchEvent)
+        element = document.documentElement;
+
+      var event;
+      if (document.createEvent) {
+        event = document.createEvent("HTMLEvents");
+        event.initEvent("dataavailable", true, true);
+      } else {
+        event = document.createEventObject();
+        event.eventType = "ondataavailable";
+      }
+
+      event.eventName = eventName;
+      event.memo = memo || { };
+
+      if (document.createEvent) {
+        element.dispatchEvent(event);
+      } else {
+        element.fireEvent(event.eventType, event);
+      }
+
+      return Event.extend(event);
+    }
+  };
+})());
+
+Object.extend(Event, Event.Methods);
+
+Element.addMethods({
+  fire:          Event.fire,
+  observe:       Event.observe,
+  stopObserving: Event.stopObserving
+});
+
+Object.extend(document, {
+  fire:          Element.Methods.fire.methodize(),
+  observe:       Element.Methods.observe.methodize(),
+  stopObserving: Element.Methods.stopObserving.methodize(),
+  loaded:        false
+});
+
+(function() {
+  /* Support for the DOMContentLoaded event is based on work by Dan Webb,
+     Matthias Miller, Dean Edwards and John Resig. */
+
+  var timer;
+
+  function fireContentLoadedEvent() {
+    if (document.loaded) return;
+    if (timer) window.clearInterval(timer);
+    document.fire("dom:loaded");
+    document.loaded = true;
+  }
+
+  if (document.addEventListener) {
+    if (Prototype.Browser.WebKit) {
+      timer = window.setInterval(function() {
+        if (/loaded|complete/.test(document.readyState))
+          fireContentLoadedEvent();
+      }, 0);
+
+      Event.observe(window, "load", fireContentLoadedEvent);
+
+    } else {
+      document.addEventListener("DOMContentLoaded",
+        fireContentLoadedEvent, false);
+    }
+
+  } else {
+    document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");
+    $("__onDOMContentLoaded").onreadystatechange = function() {
+      if (this.readyState == "complete") {
+        this.onreadystatechange = null;
+        fireContentLoadedEvent();
+      }
+    };
+  }
+})();
+/*------------------------------- DEPRECATED -------------------------------*/
+
+Hash.toQueryString = Object.toQueryString;
+
+var Toggle = { display: Element.toggle };
+
+Element.Methods.childOf = Element.Methods.descendantOf;
+
+var Insertion = {
+  Before: function(element, content) {
+    return Element.insert(element, {before:content});
+  },
+
+  Top: function(element, content) {
+    return Element.insert(element, {top:content});
+  },
+
+  Bottom: function(element, content) {
+    return Element.insert(element, {bottom:content});
+  },
+
+  After: function(element, content) {
+    return Element.insert(element, {after:content});
+  }
+};
+
+var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
+
+// This should be moved to script.aculo.us; notice the deprecated methods
+// further below, that map to the newer Element methods.
+var Position = {
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false,
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset
+                || document.documentElement.scrollLeft
+                || document.body.scrollLeft
+                || 0;
+    this.deltaY =  window.pageYOffset
+                || document.documentElement.scrollTop
+                || document.body.scrollTop
+                || 0;
+  },
+
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = Element.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] &&
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = Element.cumulativeScrollOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = Element.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] &&
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {
+    if (!mode) return 0;
+    if (mode == 'vertical')
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+        element.offsetWidth;
+  },
+
+  // Deprecation layer -- use newer Element methods now (1.5.2).
+
+  cumulativeOffset: Element.Methods.cumulativeOffset,
+
+  positionedOffset: Element.Methods.positionedOffset,
+
+  absolutize: function(element) {
+    Position.prepare();
+    return Element.absolutize(element);
+  },
+
+  relativize: function(element) {
+    Position.prepare();
+    return Element.relativize(element);
+  },
+
+  realOffset: Element.Methods.cumulativeScrollOffset,
+
+  offsetParent: Element.Methods.getOffsetParent,
+
+  page: Element.Methods.viewportOffset,
+
+  clone: function(source, target, options) {
+    options = options || { };
+    return Element.clonePosition(target, source, options);
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
+  function iter(name) {
+    return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
+  }
+
+  instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
+  function(element, className) {
+    className = className.toString().strip();
+    var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
+    return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
+  } : function(element, className) {
+    className = className.toString().strip();
+    var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
+    if (!classNames && !className) return elements;
+
+    var nodes = $(element).getElementsByTagName('*');
+    className = ' ' + className + ' ';
+
+    for (var i = 0, child, cn; child = nodes[i]; i++) {
+      if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
+          (classNames && classNames.all(function(name) {
+            return !name.toString().blank() && cn.include(' ' + name + ' ');
+          }))))
+        elements.push(Element.extend(child));
+    }
+    return elements;
+  };
+
+  return function(className, parentElement) {
+    return $(parentElement || document.body).getElementsByClassName(className);
+  };
+}(Element.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+
+  set: function(className) {
+    this.element.className = className;
+  },
+
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set($A(this).concat(classNameToAdd).join(' '));
+  },
+
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set($A(this).without(classNameToRemove).join(' '));
+  },
+
+  toString: function() {
+    return $A(this).join(' ');
+  }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+
+/*--------------------------------------------------------------------------*/
+
+Element.addMethods();
\ No newline at end of file

Added: tags/1.8/cinemaru/sql/index.html
===================================================================
--- tags/1.8/cinemaru/sql/index.html	                        (rev 0)
+++ tags/1.8/cinemaru/sql/index.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file

Added: tags/1.8/cinemaru/sql/mysql.sql
===================================================================
--- tags/1.8/cinemaru/sql/mysql.sql	                        (rev 0)
+++ tags/1.8/cinemaru/sql/mysql.sql	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,89 @@
+#
+#
+#
+
+CREATE TABLE `movie` (
+  `id` int(11) NOT NULL auto_increment,
+  `title` text NOT NULL default '',
+  `file` text NOT NULL default '',
+  `image_file` text NOT NULL default '',
+  `file_url` text NOT NULL,
+  `image_file_url` text NOT NULL,  
+  `total_time` int(11) NOT NULL default '0',
+  `file_type` tinyint(4) NOT NULL default '0',
+  `file_size` int(11) NOT NULL default '0',
+  `randam_code` varchar(8) NOT NULL default '',
+  `desc` text NOT NULL,
+  `genre` int(11) NOT NULL default '0',
+  `tag_lock` tinyint(1) NOT NULL default '0',
+  `valid` tinyint(1) NOT NULL default '1',
+  `owner` int(11) NOT NULL default '0',
+  `counter` int(11) NOT NULL default '0',
+  `comment` int(11) NOT NULL default '0',
+  `comment_up_time` int(11) NOT NULL default '0',
+  `reg_time` int(11) NOT NULL default '0',
+  `mod_time` int(11) default NULL,
+  `reg_user` int(11) NOT NULL default '0',
+  `mod_user` int(11) default NULL,
+  PRIMARY KEY  (`id`)
+) TYPE=MyISAM ;
+
+CREATE TABLE `comment` (
+  `id` int(11) NOT NULL auto_increment,
+  `movie_id` int(11) NOT NULL default '0',
+  `comment` text NOT NULL,
+  `comment_time` int(11) NOT NULL default '0',
+  `reg_time` int(11) NOT NULL default '0',
+  `mod_time` int(11) NOT NULL default '0',
+  `reg_user` int(11) NOT NULL default '0',
+  `mod_user` int(11) NOT NULL default '0',
+  PRIMARY KEY  (`id`)
+) TYPE=MyISAM ;
+
+CREATE TABLE `tags` (
+  `id` int(11) NOT NULL auto_increment,
+  `name` varchar(32) NOT NULL default '',
+  `reg_time` int(11) NOT NULL default '0',
+  `mod_time` int(11) default NULL,
+  `reg_user` int(11) NOT NULL default '0',
+  `mod_user` int(11) default NULL,
+  PRIMARY KEY  (`id`),
+  KEY `name` (`name`)
+) TYPE=MyISAM ;
+
+CREATE TABLE `tag_movie` (
+  `id` int(11) NOT NULL auto_increment,
+  `tags_id` int(11) NOT NULL default '0',
+  `movie_id` int(11) NOT NULL default '0',
+  `reg_time` int(11) NOT NULL default '0',
+  `mod_time` int(11) NOT NULL default '0',
+  `reg_user` int(11) NOT NULL default '0',
+  `mod_user` int(11) NOT NULL default '0',
+  PRIMARY KEY  (`id`)
+) TYPE=MyISAM ;
+
+CREATE TABLE report (
+  id int(11) NOT NULL auto_increment,
+  movie_id int(11) NOT NULL default '0',
+  category int(11) NOT NULL default '0',
+  comment text NOT NULL,
+  reg_time int(11) NOT NULL default '0',
+  mod_time int(11) NOT NULL default '0',
+  reg_user int(11) NOT NULL default '0',
+  mod_user int(11) NOT NULL default '0',
+  PRIMARY KEY  (id),
+  KEY movie_id (movie_id)
+) TYPE=MyISAM;
+
+		    
+CREATE TABLE `genre` (
+  `id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
+  `parent_id` int( 11 ) NOT NULL default '0',
+  `name` tinytext NOT NULL ,
+  `iorder` int( 11 ) NOT NULL default '0',
+  `reg_time` int( 11 ) NOT NULL default '0',
+  `mod_time` int( 11 ) default NULL ,
+  `reg_user` int( 11 ) NOT NULL default '0',
+  `mod_user` int( 11 ) default NULL ,
+  PRIMARY KEY ( id )
+) TYPE = MYISAM ;

Added: tags/1.8/cinemaru/tag_add.php
===================================================================
--- tags/1.8/cinemaru/tag_add.php	                        (rev 0)
+++ tags/1.8/cinemaru/tag_add.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,46 @@
+<?php
+
+include 'header.php';
+
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$movie = cinemaru_movie_get_one(@$_REQUEST['id']);
+
+if ($movie == false) {
+    exit();
+}
+
+if ($movie['tag_lock']) {
+    exit();
+}
+
+$list = cinemaru_tag_get($_REQUEST['id']);
+
+$tag = $_GET['tag'];
+if ($xoopsModuleConfig['tag_encoding']) {
+    header('Content-type: text/html; charset=' . $xoopsModuleConfig['tag_encoding']);
+    $tag = cinemaru_mb_convert_encoding($_GET['tag'], $xoopsModuleConfig['tag_encoding']);
+}
+
+if (isset($xoopsUser) && isset($_SESSION['xoopsUserId'])) {
+    $uid = $xoopsUser->uid();
+} else {
+    $uid = 0;
+}
+if (count($list) < $xoopsModuleConfig['num_of_tag']) {
+    cinemaru_add_tag_to_movie($_GET['id'], $tag, $uid);
+}
+
+$list = cinemaru_tag_get($_REQUEST['id']);
+
+foreach ($list as $val) {
+    print '<A HREF="index.php?tag=' . intval($val['tags_id']) . '">';
+    print htmlspecialchars($val['name']) . '</A> ';
+}
+
+exit();
+

Added: tags/1.8/cinemaru/tag_delete.php
===================================================================
--- tags/1.8/cinemaru/tag_delete.php	                        (rev 0)
+++ tags/1.8/cinemaru/tag_delete.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,36 @@
+<?php
+
+require_once 'header.php';
+
+require_once('include/db.php');
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+require_once('include/misc.php');
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$movie = cinemaru_movie_get_one(@$_REQUEST['movie_id']);
+$constpref = strtoupper( $mydirname ) ;
+
+if ($movie == false) {
+    exit();
+}
+
+if ($movie['tag_lock']) {
+    exit();
+}
+
+header('Content-type: text/html; charset=' . $xoopsModuleConfig['tag_encoding']);
+
+if (isset($xoopsUser) && isset($_SESSION['xoopsUserId'])) {
+    $uid = $xoopsUser->uid();
+} else {
+    $uid = 0;
+}
+$groupperm_tag_deletable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGDELETABLE'));
+if ($groupperm_tag_deletable || $movie['id'] == $uid) {
+    cinemaru_delete_tag_to_movie($_REQUEST['id']);
+}
+
+$_REQUEST['id'] = $_REQUEST['movie_id'];
+require_once('tag_edit.php');
+

Added: tags/1.8/cinemaru/tag_edit.php
===================================================================
--- tags/1.8/cinemaru/tag_edit.php	                        (rev 0)
+++ tags/1.8/cinemaru/tag_edit.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,52 @@
+<?php
+
+require_once 'header.php';
+
+require_once 'include/db.php';
+require_once('include/groupperm_function.php');
+require_once('constants.php');
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$movie = cinemaru_movie_get_one(@$_REQUEST['id']);
+$constpref = strtoupper( $mydirname ) ;
+
+if ($movie == false) {
+    exit();
+}
+
+$list = cinemaru_tag_get($_REQUEST['id']);
+
+if (isset($xoopsUser) && isset($_SESSION['xoopsUserId'])) {
+    $uid = $xoopsUser->uid();
+} else {
+    $uid = 0;
+}
+
+$groupperm_tag_insertable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGINSERTABLE'));
+if (($groupperm_tag_insertable == 0 && $movie['id'] != $uid) || ($xoopsModuleConfig['num_of_tag'] <= count($list)) ) {
+    $can_add = ' DISABLED ';
+} else {
+    $can_add = '';
+}
+$groupperm_tag_deletable = cinemaru_checkright(constant($constpref.'_GROUPPERM_TAGDELETABLE'));
+if ($groupperm_tag_deletable == 0 && $movie['id'] != $uid) {
+    $can_delete = ' DISABLED ';
+} else {
+    $can_delete = '';
+}
+
+header('Content-type: text/html; charset=' . $xoopsModuleConfig['tag_encoding']);
+
+print "<table>";
+print "<tr><td style='width:150px;'>";
+print "<input type='text' id='new_tag' maxlength='" . $xoopsModuleConfig['tag_size'] . "'></td><td> ";
+print "<input type='button' value='" . _MD_CINEMARU_ADD . "' onClick=\"javascript:add_tag();\"$can_add></td></tr>";
+foreach ($list as $val) {
+    print "<tr><td style='width:150px;'>" . htmlspecialchars($val['name']);
+    print "</td><td><input type='button' value='" . _MD_CINEMARU_DELETE . "' onClick='javascript:delete_tag(" . intval($val['tags_movie_id']) . ")' $can_delete ></td></tr> ";
+}
+print "</table>";
+
+print "<a href='javascript:onlick=end_edit()'>" . _MD_CINEMARU_END_EDIT_TAG . "</a><br>";
+
+

Added: tags/1.8/cinemaru/tag_get.php
===================================================================
--- tags/1.8/cinemaru/tag_get.php	                        (rev 0)
+++ tags/1.8/cinemaru/tag_get.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,24 @@
+<?php
+
+include 'header.php';
+
+require_once('include/db.php');
+
+header('Content-type: text/html; charset=' . $xoopsModuleConfig['tag_encoding']);
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$movie = cinemaru_movie_get_one(@$_REQUEST['id']);
+
+if ($movie == false) {
+    exit();
+}
+
+$list = cinemaru_tag_get($_REQUEST['id']);
+
+foreach ($list as $val) {
+    print'<A HREF="index.php?tag=' . intval($val['tags_id']) . '">';
+    print htmlspecialchars($val['name']) . '</A> ';
+}
+
+exit();
+

Added: tags/1.8/cinemaru/tag_list.php
===================================================================
--- tags/1.8/cinemaru/tag_list.php	                        (rev 0)
+++ tags/1.8/cinemaru/tag_list.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,25 @@
+<?php
+
+include 'header.php';
+require_once('include/db.php');
+require_once('include/pagenavi.class.php');
+require_once('constants.php');
+require_once('include/misc.php');
+include XOOPS_ROOT_PATH.'/header.php';
+
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$xoopsTpl->assign('mydirname', $mydirname);
+$constpref = strtoupper( $mydirname ) ;
+
+$xoopsOption['template_main'] = $mydirname . '_tag_list.html';
+
+$tag_list = cinemaru_get_tag();
+// Reference keyword: tagcloud_size_set by asben
+$tag_list = cinemaru_tagcloud_size_set($tag_list);
+
+$xoopsTpl->assign('mydirname', $mydirname);
+$xoopsTpl->assign('tag_list', $tag_list);
+
+include XOOPS_ROOT_PATH.'/footer.php';
+

Added: tags/1.8/cinemaru/templates/blocks/block_hottag.html
===================================================================
--- tags/1.8/cinemaru/templates/blocks/block_hottag.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/blocks/block_hottag.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,3 @@
+<!-- Reference keyword: block_of_hottag by asben -->
+<{assign var="tag_list" value=$block_hot_taglist}>
+<{include file="db:`$mydirname`_tag_list_part.html"}>

Added: tags/1.8/cinemaru/templates/blocks/block_random.html
===================================================================
--- tags/1.8/cinemaru/templates/blocks/block_random.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/blocks/block_random.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,2 @@
+<{assign var="movie" value=$cinemaru_block_randam}>
+<{include file="db:`$mydirname`_thumb_part.html"}>

Added: tags/1.8/cinemaru/templates/blocks/block_thumb.html
===================================================================
--- tags/1.8/cinemaru/templates/blocks/block_thumb.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/blocks/block_thumb.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,3 @@
+<{include file="db:`$mydirname`_thumb.html"}>
+&nbsp;
+

Added: tags/1.8/cinemaru/templates/cinemaru.css
===================================================================
--- tags/1.8/cinemaru/templates/cinemaru.css	                        (rev 0)
+++ tags/1.8/cinemaru/templates/cinemaru.css	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,55 @@
+/* [Acquisition of related movie] Reference keyword: related_movie_get by asben */
+#relation {
+	float: left;
+	margin: 0px 0px 10px 30px;
+	padding: 0px;
+	height: 460px;
+	width: 240px;
+	border: 1px solid #999999;
+}
+#relation h1 {
+	font: bold 14px "‚l‚r ‚oƒSƒVƒbƒN", Osaka, sans-serif;
+	color: #000000;
+	background: url(../images/bg_02.gif);
+	text-align: center;
+	margin: 0px;
+	padding: 5px 0px;
+}
+#relation #itemlist {
+	margin: 0px;
+	padding: 0px;
+	height: 430px;
+	width: 240px;
+	overflow: auto;
+}
+#relation #itemlist ul {
+	margin: 0px;
+	padding: 3px;
+	list-style: none;
+	height: 75px;
+}
+#relation #itemlist li {
+	font: 11px "‚l‚r ‚oƒSƒVƒbƒN", Osaka, sans-serif;
+	color: #000000;
+}
+#relation #itemlist img {
+	float: left;
+	padding: 0px 3px 0px 0px;
+}
+#relation #itemlist p {
+	font: 11px "‚l‚r ‚oƒSƒVƒbƒN", Osaka, sans-serif;
+	padding: 5px;
+	margin: 0px;
+}
+#relation #itemlist a {
+	color: #0000FF;
+	text-decoration: none;
+}
+#relation #itemlist a:hover,#itemlist:active {
+	color: #FF0000;
+	text-decoration: underline;
+}
+#relation #itemlist ul:hover {
+	background: #eeeeee;
+}
+

Added: tags/1.8/cinemaru/templates/comment_list.html
===================================================================
--- tags/1.8/cinemaru/templates/comment_list.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/comment_list.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,78 @@
+<h1><{$smarty.const._MD_CINEMARU_COMMENT_LIST}></h1>
+
+<table width='100%' class='odd' cellspacing='1' cellpadding='4'>
+  <tr>
+    <td>
+    
+<{foreach from=$page_list item=i key=k}>
+  <{if strcmp($i, '--') == 0 }>
+  <{$k}> |
+  <{else}>
+    <a
+href='<{$xoops_url}>/modules/<{$mydirname}>/movie_comment_list.php?offset=<{$i}><{if
+$smarty.request.id}>&id=<{$smarty.request.id}><{/if}>'><{$k}></a> |
+  <{/if}>
+<{/foreach}>
+
+    </td>
+    <td align='right'>
+    
+<{if $need_prev_link }>
+<a href="<{$xoops_url}>/modules/<{$mydirname}>/movie_comment_list.php?offset=<{$prev}><{if
+$smarty.request.id}>&id=<{$smarty.request.id}><{/if}>"><{$smarty.const._MD_CINEMARU_PREV}>
+</a>
+<{else}>
+<{$smarty.const._MD_CINEMARU_PREV}>
+<{/if}>
+<{if $need_next_link }>
+<a href="<{$xoops_url}>/modules/<{$mydirname}>/movie_comment_list.php?offset=<{$next}><{if
+$smarty.request.id}>&id=<{$smarty.request.id}><{/if}>"><{$smarty.const._MD_CINEMARU_NEXT}>
+</a>
+<{else}>
+<{$smarty.const._MD_CINEMARU_NEXT}>
+<{/if}>
+
+    </td>
+  </tr>
+</table>
+
+<table width='100%' class='outer' cellspacing='1' cellpadding='4'>
+  <tr>
+    <td class='head'>ID</td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_COMMENT}></td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_COMMENT_TIME}></td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_MOVIE}></td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_TIME}></td>
+    <{if $show_name_comment_list}>
+      <td class='head'><{$smarty.const._MD_CINEMARU_USER}></td>
+    <{/if}>
+    <td class='head'><{$smarty.const._MD_CINEMARU_ACTION}></td>
+  </tr>
+
+<{foreach from=$list item=i key=k}>
+  <{cycle values="odd,even" assign="class"}>
+  <tr>
+    <td class="<{$class}>"><{$i.id|escape:"html"}></td>
+    <td class="<{$class}>"><{$i.comment|escape:"html"}></td>
+    <td class="<{$class}>"><{$i.comment_time_f}></td>
+    <td class="<{$class}>"><a
+href="<{$xoops_url}>/modules/<{$mydirname}>/movie.php?id=<{$i.movie_id|escape:"html"}>"><{$smarty.const._MD_CINEMARU_MOVIE}></a></td>
+    <td class="<{$class}>"><{$i.reg_time|date_format:"%Y/%m/%d %H:%M"}></td>
+    <{if $show_name_comment_list}>
+      <td class="<{$class}>">
+      <{if $i.reg_user == 0}>
+      <{$i.uname|default:"GUEST"|escape:"html"}>
+      <{else}>
+      <a href="<{$xoops_url}>/userinfo.php?uid=<{$i.reg_user}>"><{$i.uname|escape:"html"}></a>
+      <{/if}>
+      </td>
+    <{/if}>
+    <td class="<{$class}>"><{if $delcomment_admin}><a
+href="<{$xoops_url}>/modules/<{$mydirname}>/movie_comment_delete.php?comment_id=<{$i.id}><{if
+$smarty.request.id}>&id=<{$smarty.request.id}><{/if}>"><{$smarty.const._MD_CINEMARU_DELETE}></a><{/if}></td>
+  </tr>
+<{/foreach}>  
+  
+</table>
+
+    

Added: tags/1.8/cinemaru/templates/index.html
===================================================================
--- tags/1.8/cinemaru/templates/index.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/index.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,101 @@
+
+<{$smarty.const._MD_CINEMARU_TOTAL}>:<{$total}><br>
+
+<{if $groupperm_insertable}>
+  [ <a href="<{$xoops_url}>/modules/<{$mydirname}>/movie_form.php"><{$smarty.const._MD_CINEMARU_SUBMIT}></a> ]
+<{/if}>
+
+<{if $auth_admin}>
+  <{if $smarty.request.vv == 0}>
+  <{if $novalid_exists}>
+  [ <a href="index.php?vv=1"><{$smarty.const._MD_CINEMARU_MOVIE_LIST_NO_VALID_EXISTS}></a> ]
+  <{/if}>
+  <{else}>
+  [ <a href="index.php"><{$smarty.const._MD_CINEMARU_MOVIE_LIST_NORMAL}></a> ]
+  <{/if}>
+<{/if}>
+
+<{if $groupperm_showcomment}>
+  [ <a href="movie_comment_list.php"><{$smarty.const._MD_CINEMARU_COMMENT_LIST}></a> ]
+<{/if}>
+<{if $check_report_list}>
+  [ <a href="movie_report_list.php"><{$smarty.const._MD_CINEMARU_CHECK_REPORT_LIST}></a> ]
+<{/if}>
+
+[ <a href="tag_list.php"><{$smarty.const._MD_CINEMARU_HOT_TAG}></a> ]
+
+<table width='100%' class='odd' cellspacing='1' cellpadding='4'>
+  <tr>
+    <td>
+       <!-- PageNavi by asben 09.1.30 -->
+       <{if $navidisp}>
+          <{$navi_block}>
+       <{/if}>
+    </td>
+    <td align='right'>
+
+<form action="index.php" name="myform" id="myform">
+<{if $smarty.request.tag}>
+<input type="hidden" name="tag" value="<{$smarty.request.tag}>">
+<{/if}>
+<{if $smarty.request.vv}>
+<input type="hidden" name="vv" value="<{$smarty.request.vv}>">
+<{/if}>
+
+<select name="sort" id ="sort">
+<option value="0" <{if $smarty.request.sort == 0}>SELECTED<{/if}>>---
+<option value="1" <{if $smarty.request.sort == 1}>SELECTED<{/if}>><{$smarty.const._MD_CINEMARU_SORT_NEW}>
+<option value="2" <{if $smarty.request.sort == 2}>SELECTED<{/if}>><{$smarty.const._MD_CINEMARU_SORT_OLD}>
+<option value="3" <{if $smarty.request.sort == 3}>SELECTED<{/if}>><{$smarty.const._MD_CINEMARU_SORT_HIGH_HIT}>
+<option value="4" <{if $smarty.request.sort == 4}>SELECTED<{/if}>><{$smarty.const._MD_CINEMARU_SORT_LOW_HIT}>
+</select>
+<input type="submit" value="<{$smarty.const._MD_CINEMARU_SORT}>">
+</form>
+
+    </td>
+    <td align='right'>
+<a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?list=1<{if
+$smarty.request.offset}>&offset=<{$smarty.request.offset}><{/if}><{if
+$smarty.request.tag}>&tag=<{$smarty.request.tag}><{/if}><{if
+$smarty.request.vv}>&vv=<{$smarty.request.vv}><{/if}><{if
+$smarty.request.sort}>&sort=<{$smarty.request.sort}><{/if}>"
+alt="<{$smarty.const._MD_CINEMARU_LIST}>">
+<img src="<{$xoops_url}>/modules/<{$mydirname}>/images/list.png"
+alt="<{$smarty.const._MD_CINEMARU_LIST}>"></a>&nbsp;
+
+<a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?thumb=1<{if
+$smarty.request.offset}>&offset=<{$smarty.request.offset}><{/if}><{if
+$smarty.request.tag}>&tag=<{$smarty.request.tag}><{/if}><{if
+$smarty.request.vv}>&vv=<{$smarty.request.vv}><{/if}><{if
+$smarty.request.sort}>&sort=<{$smarty.request.sort}><{/if}>"><img
+src="<{$xoops_url}>/modules/<{$mydirname}>/images/thumb.png"
+alt="<{$smarty.const._MD_CINEMARU_THUMB}>"></a>&nbsp;
+    </td>
+  </tr>
+</table>
+
+<{if $thumb }>
+  <{include file="db:`$mydirname`_thumb.html"}>
+<{else}>
+  <{include file="db:`$mydirname`_list.html"}>
+<{/if}>
+<!-- PageNavi by asben 09.1.30 -->
+<table width='100%' class='odd' cellspacing='1' cellpadding='4'>
+  <tr>
+    <td align="center">
+       <{if $navidisp}>
+          <{$navi_block}>
+       <{/if}>
+    </td>
+  </tr>
+</table>
+
+<div align="right">
+<small>
+  Powered by 
+  <a href="http://cinemaru.net/">Cinemaru Project</a>
+</small>
+</div>
+
+<{include file='db:system_notification_select.html'}>
+

Added: tags/1.8/cinemaru/templates/list.html
===================================================================
--- tags/1.8/cinemaru/templates/list.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/list.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,17 @@
+
+<table width='100%' class='outer' cellspacing='1' cellpadding='4'>
+<{foreach from=$movie_list item=i key=k}>
+  <{cycle values="even,odd" assign="class"}>
+  <tr>
+    <td class="<{$class}>">
+  
+<{assign var="movie" value=$i}>
+<{include file="db:`$mydirname`_list_part.html"}>
+
+    </td>
+  </tr>
+<{/foreach}>
+</table>
+
+
+

Added: tags/1.8/cinemaru/templates/list_part.html
===================================================================
--- tags/1.8/cinemaru/templates/list_part.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/list_part.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,13 @@
+<a href="<{$xoops_url}>/modules/<{$mydirname}>/movie.php?id=<{$movie.id}>">
+<img src="<{if $movie.image_file_url != ""}><{$movie.image_file_url|escape:"html"}>
+          <{elseif $movie.image_file}><{$xoops_url}>/uploads/<{$mydirname}>/image/<{$movie.image_file}>
+          <{else}><{if $movie.file_type==$file_type}><{$xoops_url}>/modules/<{$mydirname}>/images/no_img_y.gif
+                  <{else}><{$xoops_url}>/modules/<{$mydirname}>/images/no_image.png<{/if}>
+          <{/if}>"
+width="150" height="112" style="float: left;" ><{if $movie.title ==
+''}>no title<{else}><{$movie.title|escape:"html"}><{/if}></a><{if $movie.valid ==
+0}><font color='red'><b>(<{$smarty.const._MD_CINEMARU_MOVIE_NO_VALID2}>)</b></font><{/if}><br>
+<{$smarty.const._MD_CINEMARU_COUNT}>:<{$movie.counter}> 
+<{$smarty.const._MD_CINEMARU_COMMENT}><{$movie.comment}><br>
+<font style="font-size: 9px;"><{$movie.desc_trunc}></font>
+<br style="clear: both;">

Added: tags/1.8/cinemaru/templates/movie.html
===================================================================
--- tags/1.8/cinemaru/templates/movie.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/movie.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,198 @@
+
+
+<script type="text/javascript" src="prototype.js"></script>
+<script type="text/javascript">
+function edit_form()
+{
+    var pars = 'id=<{$movie.id}>';
+    var url = '<{$xoops_url}>/modules/<{$mydirname}>/tag_edit.php';
+    
+    Element.hide("tags");
+    
+    var myAjax = new Ajax.Request(
+        url,
+        {
+            method: 'get', 
+            parameters: pars, 
+            onComplete: show_response
+        }
+    );
+}
+
+function add_tag()
+{
+    var new_tag = $F('new_tag');
+    var pars = 'id=<{$movie.id}>&tag=' + new_tag;
+    var url = '<{$xoops_url}>/modules/<{$mydirname}>/tag_add.php';
+    
+    Element.show("tags");
+    
+    re = RegExp("^.+$");
+    if (re.test(new_tag)) {
+        var myAjax = new Ajax.Request(
+            url, 
+            {
+                method: 'get', 
+                parameters: pars, 
+                onComplete: show_response
+            }
+        );
+
+
+    } else {
+        alert('<{$smarty.const._MI_CINEMARU_INPUT_TAG}>');
+    }
+}
+
+function delete_tag(id)
+{
+    var pars = 'movie_id=<{$movie.id}>&id=' + id;
+    var url = '<{$xoops_url}>/modules/<{$mydirname}>/tag_delete.php';
+    
+    var myAjax = new Ajax.Request(
+        url, 
+        {
+            method: 'get', 
+            parameters: pars, 
+            onComplete: show_response
+        }
+    );
+}
+
+function end_edit()
+{
+    var pars = 'id=<{$movie.id}>';
+    var url = '<{$xoops_url}>/modules/<{$mydirname}>/tag_get.php';
+    
+    Element.show("tags");
+    
+    var myAjax = new Ajax.Request(
+        url, 
+        {
+            method: 'get', 
+            parameters: pars, 
+            onComplete: show_response
+        }
+    );
+}
+
+function show_response(req)
+{
+    var item = $('edit_form_div');
+    Element.update(item, req.responseText)
+}
+</script>
+
+
+<table class="outer" cellspacing="1" width="100%">
+  <tr>
+    <td class="odd">
+<h2><{$movie.title|escape:"html"}></h2>
+<{if $movie.valid == 0}>
+<font color='red'><b><{$smarty.const._MD_CINEMARU_MOVIE_NO_VALID2}></b></font><br>
+<{/if}>
+<{$movie.desc}><br>
+    </td>
+    <!-- 09.1.26 asben add -->
+    <td class="odd" width="80" valign="middle">
+<img src="<{if $movie.image_file_url != ''}><{$movie.image_file_url|escape:"html"}>
+          <{elseif $movie.image_file}><{$xoops_url}>/uploads/<{$mydirname}>/image/<{$movie.image_file}>
+          <{else}><{if $movie.file_type==$file_type}><{$xoops_url}>/modules/<{$mydirname}>/images/no_img_y.gif
+                  <{else}><{$xoops_url}>/modules/<{$mydirname}>/images/no_image.png<{/if}>
+          <{/if}>"
+          width="80" height="60">
+    </td>
+  </tr>
+</table>
+<br>
+
+<div id="tags" style="float: left;">[<{if
+$movie.tag_lock}><{$smarty.const._MD_CINEMARU_TAG}><{else}><a
+href="javascript:onclick=edit_form();"><{$smarty.const._MD_CINEMARU_EDIT_TAG}>
+</a><{/if}>]</div>
+<div id="edit_form_div"><{$tag}></div>
+<br style="clear: both;">
+
+<{if $user_name }>
+<nobr>
+<{$smarty.const._MD_CINEMARU_USER}>:<{if $movie.owner ==
+0}><{$user_name|escape:"html"}><{else}><a
+href="<{$xoops_url}>/userinfo.php?uid=<{$movie.owner}>"><{$user_name|escape:"html"}></a><{/if}>
+<br>
+</nobr>
+<{/if}>
+<nobr>
+<{$smarty.const._MD_CINEMARU_COUNT}>:<{$movie.counter}>
+<{$smarty.const._MD_CINEMARU_COMMENT}>:<{$movie.comment}></nobr><br>
+<{if $xoops_userid == $movie.owner || $touchothers }>
+  <nobr><a href="movie_edit.php?id=<{$movie.id}>"><{$smarty.const._MD_CINEMARU_EDIT}></a></nobr>
+<{/if}>
+<{if $xoops_userid == $movie.owner || $touchothers }>
+  <nobr><a href="movie_delete.php?id=<{$movie.id}>"><{$smarty.const._MD_CINEMARU_DELETE}></a></nobr>
+<{/if}>
+<{if $auth_valid}>
+  <{if $movie.valid == 0}>
+    <nobr><a href="movie_valid_do.php?id=<{$movie.id}>"><{$smarty.const._MD_CINEMARU_MOVIE_VALID}></a></nobr>
+  <{else}>
+    <nobr><a href="movie_valid_do.php?id=<{$movie.id}>&novalid=1"><{$smarty.const._MD_CINEMARU_MOVIE_NO_VALID3}></a></nobr>
+  <{/if}>
+<{/if}>
+<{if $showcomment}>
+  <nobr><a href="movie_comment_list.php?id=<{$movie.id}>"><{$smarty.const._MD_CINEMARU_COMMENT_LIST}></a></nobr>
+<{/if}>
+<{if $show_report_link && $report }>
+  <nobr><a href="movie_report.php?id=<{$movie.id}>"><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT}></a></nobr>
+<{/if}>
+
+<{if $xoops_module_config.blog_paste}>
+<br>
+<br>
+<!-- blog paste start -->
+<form name="myform">
+<{$smarty.const._MD_CINEMARU_BLOG_PASTE_TAG}><br>
+<input type="text" name="flash_tag" id="flash_tag" value="<{$blog_paste|escape:"html"}>"
+size="24" style="padding:1px; border:1px 1px #aaa;"
+onClick="javascript:document.myform.flash_tag.focus();
+document.myform.flash_tag.select();"></form>
+<!-- blog paste end -->
+<{/if}>
+<br />
+
+<!-- flash start -->
+<{include file="db:`$mydirname`_movie_flash_player.html"}>
+<!-- flash end -->
+
+<!-- 09.1.26 asben delete
+<{if $movie.file_type == $smarty.const.CINEMARU_FORM_FILE_TYPE_YOUTUBE_URL}>
+<nobr><a href="http://www.youtube.com/">YouTube Video</a></nobr><br>
+<{/if}>
+-->
+
+<!-- Reference keyword: related_movie_get by asben start -->
+<style type="text/css" media="all">
+ @ import url("./templates/cinemaru.css");
+</style>
+<div id="relation">
+   <h1><{$smarty.const._MD_CINEMARU_RELATED_MOVIE_TITLE}></h1>
+   <div id="itemlist">
+   <{foreach from=$relate_movie_info item="rel_movie"}>
+      <ul>
+         <li>
+            <a href="movie.php?id=<{$rel_movie.id}>">
+            <img src="<{if $rel_movie.image_file_url != ''}><{$rel_movie.image_file_url|escape:"html"}>
+                                <{elseif $rel_movie.image_file}><{$xoops_url}>/uploads/<{$mydirname}>/image/<{$rel_movie.image_file}>
+                                <{else}><{if $rel_movie.file_type==$file_type}><{$xoops_url}>/modules/<{$mydirname}>/images/no_img_y.gif
+                                <{else}><{$xoops_url}>/modules/<{$mydirname}>/images/no_image.png<{/if}>
+                                <{/if}>" width="100" height="70">
+            <p><{$rel_movie.title}></p>
+            <p><{$smarty.const._MD_CINEMARU_COUNT}>:<{$rel_movie.counter}> <{$smarty.const._MD_CINEMARU_COMMENT}>:<{$rel_movie.comment}></p>
+            </a>
+         </li>
+      </ul> 
+   <{/foreach}>
+   </div>
+</div>
+<!-- Reference keyword: related_movie_get by asben end -->
+
+<br style="clear: both;">
+

Added: tags/1.8/cinemaru/templates/movie_delete.html
===================================================================
--- tags/1.8/cinemaru/templates/movie_delete.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/movie_delete.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,53 @@
+<h1><{$smarty.const._MD_CINEMARU_MOVIE_DELETE}></h1>
+
+<form name="myform" id="myform"
+action="<{$xoops_url}>/modules/<{$mydirname}>/movie_delete_do.php" method="post" enctype="multipart/form-data">
+<table class="outer" width="100%">
+  <tr>
+    <th colspan="2" style="text-align:center;"><{$smarty.const._MD_CINEMARU_MOVIE_DELETE}></th>
+    </tr>
+  <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_TITLE}></td>
+      <td class="even">
+        <{$movie.title|escape:"html"}>
+    </td>
+  </tr>
+    <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_DESC}></td>
+      <td class="odd">
+        <{$movie.desc|escape:"html"}>
+      </td>
+    </tr>
+    <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_COUNT}></td>
+      <td class="odd">
+        <{$movie.counter|escape:"html"}>
+      </td>
+    </tr>
+    <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_COMMENT}></td>
+      <td class="odd">
+        <{$movie.comment|escape:"html"}>
+      </td>
+    </tr>
+    <{*
+  <tr>
+	
+    <td class="head"><nobr><{$smarty.const._MD_CINEMARU_GENRE}></nobr></td>
+    <td class="even">
+    <{foreach from=$genre_list key=k item=i}>
+    <nobr><input name="genre" type="radio" value="<{$k|escape:"html"}>" <{if
+$smarty.request.genre == $k + 1}>CHECKED<{/if}>/><{$i|escape:"html"}></nobr>
+    <{/foreach}>
+    </td>
+  </tr>
+*}>
+  <tr>
+    <td colspan="2" class="foot" style="text-align:center;">
+      <input type="hidden" name="id" value="<{$smarty.request.id|escape:"html"}>" />
+      <input type="submit" value="<{$smarty.const._MD_CINEMARU_DELETE}>"  />
+		    
+    </td>
+  </tr>
+</table>
+</form>

Added: tags/1.8/cinemaru/templates/movie_flash_player.html
===================================================================
--- tags/1.8/cinemaru/templates/movie_flash_player.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/movie_flash_player.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,23 @@
+<object type="application/x-shockwave-flash"
+data="<{$xoops_url}>/modules/<{$mydirname}>/player.swf?<{$t}>" width="512" height="460"
+<{if $player_float}> style="float: left;"<{/if}>>
+  <param name="movie" value="<{$xoops_url}>/modules/<{$mydirname}>/player.swf?<{$t}>" />
+  <param name="FlashVars"
+value="id=<{$smarty.request.id}>&file_url=<{if ($movie.file_type == 2 || $movie.file_type == 3) && $movie.file_url !=
+''}><{$movie.file_url}><{else}><{$xoops_url}>/uploads/<{$mydirname}>/movie/<{$movie.file}><{/if}><{if
+$movie.image_file_url != ''}>&image_url=<{$movie.image_file_url}><{elseif
+$movie.image_file}>&image_url=<{$xoops_url}>/uploads/<{$mydirname}>/image/<{$movie.image_file}><{/if}>&baseurl=<{$xoops_url}>/modules/<{$mydirname}>/<{if
+$commentok == 0}>&comment_ng=1<{/if}><{if
+$user_avatar}>&avatar_url=<{$xoops_url}>/uploads/<{$user_avatar}><{/if}><{if
+$xoops_module_config.sp_command1}>&spcmd1=<{$xoops_module_config.sp_command1|escape:"html"}><{/if}><{if
+$spcmd1url}>&spcmd1_url=<{$spcmd1url|escape:"html"}><{/if}><{if
+$xoops_module_config.sp_command1_random}>&spcmd1r=<{$xoops_module_config.sp_command1_random|escape:"html"}><{/if}><{if
+$xoops_module_config.sp_command2}>&spcmd2=<{$xoops_module_config.sp_command2|escape:"html"}><{/if}><{if
+$spcmd2url}>&spcmd2_url=<{$spcmd2url|escape:"html"}><{/if}><{if
+$xoops_module_config.sp_command2_random}>&spcmd2r=<{$xoops_module_config.sp_command2_random|escape:"html"}><{/if}><{if
+$xoops_module_config.sp_command3}>&spcmd3=<{$xoops_module_config.sp_command3|escape:"html"}><{/if}><{if
+$spcmd3url}>&spcmd3_url=<{$spcmd3url|escape:"html"}><{/if}><{if
+$xoops_module_config.sp_command3_random}>&spcmd3r=<{$xoops_module_config.sp_command3_random|escape:"html"}><{/if}><{if
+$autoplay}>&autoplay=1<{/if}>"
+/>
+</object>

Added: tags/1.8/cinemaru/templates/movie_form.html
===================================================================
--- tags/1.8/cinemaru/templates/movie_form.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/movie_form.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,161 @@
+<{if $edit }>
+<h1><{$smarty.const._MD_CINEMARU_MOVIE_EDIT}></h1>
+<{else}>
+<h1><{$smarty.const._MD_CINEMARU_MOVIE_UPLOAD}></h1>
+<{/if}>
+
+<script type="text/javascript" src="prototype.js"></script>
+<script type="text/javascript">
+function submit_check()
+{
+    var title = $F('title');
+    var desc = $F('desc');
+    
+    var err = "";
+    
+    if (title.length == 0) {
+        err = "<{$smarty.const._MD_CINEMARU_ERROR_NO_TITLE}>\n";
+    }
+    if (1000 < desc.length) {
+        err += "<{$smarty.const._MD_CINEMARU_ERROR_DESC_OVER}>";
+    }
+    if (0 < err.length) {
+        alert(err);
+    } else {
+        document.myform.submit();
+    }
+}
+
+function file_radio_click()
+{
+    var item = $('file_form_div');
+    
+    if ($F('filetype1')) {
+        var f = '<input name="file" id="legacy_xoopsform_email" type="file" size="30" maxlength="200" /><br />	MAX <{$max_file_size}>MB <{$smarty.const._MD_CINEMARU_FLV_ONLY}>';
+        Element.update(item, f)
+    } else if ($F('filetype2')) {
+        var f = 'URL:<input name="file_url" id="legacy_xoopsform_email" type="text" size="60" maxlength="200"  <{if $movie.file_url != "" }>value="<{$movie.file_url|escape:"html"}>"<{/if}> /><br /><{$smarty.const._MD_CINEMARU_URL_DESC}>';
+        Element.update(item, f)
+    }
+}
+
+function image_file_radio_click()
+{
+    var item = $('image_file_form_div');
+    
+    if ($F('imagefiletype1')) {
+        var f = '<input name="file" id="legacy_xoopsform_email" type="file" size="30" maxlength="200" /><br />	MAX <{$max_file_size}>MB <{$smarty.const._MD_CINEMARU_FLV_ONLY}>';
+        Element.update(item, f)
+    } else if ($F('imagefiletype2')) {
+        var f = 'URL:<input name="image_file_url" id="legacy_xoopsform_email" type="text" size="60" maxlength="200" <{if $movie.image_file_url != "" }>value="<{$movie.image_file_url|escape:"html"}>"<{/if}> /><br />';
+        Element.update(item, f)
+    }
+}
+</script>
+
+<{if $error }>
+<div class="errorMsg">
+  <ul>
+<{foreach from=$error item=i}>
+    <li><{$i|escape:"html"}></li>
+<{/foreach}>
+  </ul>
+</div>
+<{/if}>
+
+<{if $superinsert == 0 && $edit == 0 }>
+  <font color='red'><{$smarty.const._MD_CINEMARU_WAIT_VALID}></font>
+<{/if}>
+<{if $superedit == 0 && $edit }>
+  <font color='red'><{$smarty.const._MD_CINEMARU_WAIT_VALID}></font>
+<{/if}>
+
+<form name="myform" id="myform" action="<{$xoops_url}>/modules/<{$mydirname}>/<{if
+$edit == 1 }>movie_edit_do.php<{else}>movie_do.php<{/if}>" method="post" enctype="multipart/form-data">
+<input type="hidden" name="MAX_FILE_SIZE" value="<{$xoops_module_config.cinemaru_movie_max_size|escape:"html"}>" />
+<table class="outer" width="100%">
+  <tr>
+    <th colspan="2" style="text-align:center;"><{$smarty.const._MD_CINEMARU_MOVIE_UPLOAD}></th>
+    </tr>
+  <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_TITLE}></td>
+      <td class="even">
+        <input name="title" id="title"
+value="<{if $edit==1}><{$movie.title|escape:"html"}><{/if}>"
+type="text"
+size="50" maxlength="90" /><br />
+    </td>
+  </tr>
+  <tr>
+      <td class="head">
+      <nobr><{$smarty.const._MD_CINEMARU_MOVIE_FILE}></nobr><br>
+      <input type="radio" name="filetype" id="filetype1" value="1"
+onclick="file_radio_click();" checked><{$smarty.const._MD_CINEMARU_FILE_UPLOAD}><br>
+      <input type="radio" name="filetype" id="filetype2" value="2"
+onclick="file_radio_click();" ><{$smarty.const._MD_CINEMARU_URL}>
+      </td>
+      <td class="even">
+      	<div id="file_form_div">
+        <input name="file" id="legacy_xoopsform_email" type="file" size="30" maxlength="200" /><br />
+	MAX <{$max_file_size}>MB <{$smarty.const._MD_CINEMARU_FLV_ONLY}>
+	</div>
+    </td>
+  </tr>
+  <tr>
+      <td class="head">
+      <nobr><{$smarty.const._MD_CINEMARU_THUMB_FILE}></nobr><br>
+      <input type="radio" name="imagefiletype" id="imagefiletype1" value="1"
+onclick="image_file_radio_click();" checked><{$smarty.const._MD_CINEMARU_IMAGE_FILE_UPLOAD}><br>
+      <input type="radio" name="imagefiletype" id="imagefiletype2" value="2"
+onclick="image_file_radio_click();" ><{$smarty.const._MD_CINEMARU_URL}>
+      </td>
+      <td class="even">
+        <div id="image_file_form_div">
+        <input name="image_file" id="legacy_xoopsform_email" 
+type="file" size="30" maxlength="200" /><br />
+        </div>
+    </td>
+  </tr>
+    <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_DESC}></td>
+      <td class="odd">
+<{if $rich_form != '' }>
+      <{$rich_form}>
+<{else}>
+        <textarea name="desc" id="desc" rows="10"
+cols="50"><{if $edit==1}><{$movie.desc|escape:"html"}><{/if}></textarea>
+<{/if}>
+      </td>
+    </tr>
+    <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_TAG_LOCK}></td>
+      <td class="odd">
+        <input type="checkbox" name="tag_lock" value="1" <{if
+$movie.tag_lock}>CHECKED<{/if}>><{$smarty.const._MD_CINEMARU_TAG_LOCK_DESC}>
+      </td>
+    </tr>
+    <{*
+  <tr>
+	
+    <td class="head"><nobr><{$smarty.const._MD_CINEMARU_GENRE}></nobr></td>
+    <td class="even">
+    <{foreach from=$genre_list key=k item=i}>
+    <nobr><input name="genre" type="radio" value="<{$k|escape:"html"}>" <{if
+$smarty.request.genre == $k + 1}>CHECKED<{/if}>/><{$i|escape:"html"}></nobr>
+    <{/foreach}>
+    </td>
+  </tr>
+*}>
+  <tr>
+    <td colspan="2" class="foot" style="text-align:center;">
+<{if $edit == 1 }>    
+      <input type="hidden" name="id"
+value="<{$smarty.request.id|escape:"html"}>" />
+<{/if}>
+      <input type="button" value="<{if
+$edit}><{$smarty.const._MD_CINEMARU_UPDATE}><{else}><{$smarty.const._MD_CINEMARU_UPLOAD}><{/if}>" onClick="submit_check();" />
+		    
+    </td>
+  </tr>
+</table>
+</form>

Added: tags/1.8/cinemaru/templates/report_form.html
===================================================================
--- tags/1.8/cinemaru/templates/report_form.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/report_form.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,74 @@
+<h1><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT}></h1>
+
+<script type="text/javascript" src="prototype.js"></script>
+<script type="text/javascript">
+function submit_check()
+{
+    var title = $F('title');
+    var desc = $F('desc');
+    
+    var err = "";
+    
+    if (title.length == 0) {
+        err = "<{$smarty.const._MD_CINEMARU_ERROR_NO_TITLE}>\n";
+    }
+    if (1000 < desc.length) {
+        err += "<{$smarty.const._MD_CINEMARU_ERROR_DESC_OVER}>";
+    }
+    if (0 < err.length) {
+        alert(err);
+    } else {
+        document.myform.submit();
+    }
+}
+</script>
+
+<{if $error }>
+<div class="errorMsg">
+  <ul>
+<{foreach from=$error item=i}>
+    <li><{$i|escape:"html"}></li>
+<{/foreach}>
+  </ul>
+</div>
+<{/if}>
+
+<form name="myform" id="myform" action="<{$xoops_url}>/modules/<{$mydirname}>/movie_report_do.php" method="post">
+<input type="hidden" name="id" value="<{$smarty.request.id}>" />
+<table class="outer" width="100%">
+  <tr>
+    <th colspan="2" style="text-align:center;"><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT}></th>
+    </tr>
+  <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_TITLE}></td>
+      <td class="even">
+        <{$movie.title|escape:"html"}>
+    </td>
+  </tr>
+  <tr>
+      <td class="head"><nobr><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT}></nobr></td>
+      <td class="even">
+        <input name="category" type="radio" value="1"><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT_1}><br>
+        <input name="category" type="radio" value="2"><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT_2}><br>
+        <input name="category" type="radio" value="3"><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT_3}><br>
+        <input name="category" type="radio" value="4" checked><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT_4}>
+    </td>
+  </tr>
+    <tr>
+      <td class="head"><{$smarty.const._MD_CINEMARU_COMMENT}></td>
+      <td class="odd">
+        <textarea name="comment" id="desc" rows="10" cols="50"></textarea>
+      </td>
+    </tr>
+  <tr>
+    <td colspan="2" class="foot" style="text-align:center;">
+<{if $edit == 1 }>    
+      <input type="hidden" name="id"
+value="<{$smarty.request.id|escape:"html"}>" />
+<{/if}>
+      <input type="submit" value="<{$smarty.const._MD_CINEMARU_VIOLATION_REPORT}>" />
+		    
+    </td>
+  </tr>
+</table>
+</form>

Added: tags/1.8/cinemaru/templates/report_list.html
===================================================================
--- tags/1.8/cinemaru/templates/report_list.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/report_list.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,85 @@
+<h1><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_LIST}></h1>
+
+<table width='100%' class='odd' cellspacing='1' cellpadding='4'>
+  <tr>
+    <td>
+    
+<{foreach from=$page_list item=i key=k}>
+  <{if strcmp($i, '--') == 0 }>
+  <{$k}> |
+  <{else}>
+    <a
+href='<{$xoops_url}>/modules/<{$mydirname}>/movie_report_list.php?offset=<{$i}><{if
+$smarty.request.id}>&id=<{$smarty.request.id}><{/if}>'><{$k}></a> |
+  <{/if}>
+<{/foreach}>
+
+    </td>
+    <td align='right'>
+    
+<{if $need_prev_link }>
+<a href="<{$xoops_url}>/modules/<{$mydirname}>/movie_report_list.php?offset=<{$prev}><{if
+$smarty.request.id}>&id=<{$smarty.request.id}><{/if}>"><{$smarty.const._MD_CINEMARU_PREV}>
+</a>
+<{else}>
+<{$smarty.const._MD_CINEMARU_PREV}>
+<{/if}>
+<{if $need_next_link }>
+<a href="<{$xoops_url}>/modules/<{$mydirname}>/movie_report_list.php?offset=<{$next}><{if
+$smarty.request.id}>&id=<{$smarty.request.id}><{/if}>"><{$smarty.const._MD_CINEMARU_NEXT}>
+</a>
+<{else}>
+<{$smarty.const._MD_CINEMARU_NEXT}>
+<{/if}>
+
+    </td>
+  </tr>
+</table>
+
+<table width='100%' class='outer' cellspacing='1' cellpadding='4'>
+  <tr>
+    <td class='head'>ID</td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT}></td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_COMMENT}></td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_MOVIE}></td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_TIME}></td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_USER}></td>
+    <td class='head'><{$smarty.const._MD_CINEMARU_ACTION}></td>
+  </tr>
+
+<{foreach from=$list item=i key=k}>
+  <{cycle values="odd,even" assign="class"}>
+  <tr>
+    <td class="<{$class}>"><{$i.id|escape:"html"}></td>
+    <td class="<{$class}>">
+    <{if $i.category == 1 }>
+      <{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT_1}>
+    <{elseif $i.category == 2 }>
+      <{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT_2}>
+    <{elseif $i.category == 3 }>
+      <{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT_3}>
+    <{elseif $i.category == 4 }>
+      <{$smarty.const._MD_CINEMARU_VIOLATION_REPORT_CAT_4}>
+    <{/if}>
+    </td>
+    <td class="<{$class}>"><{$i.comment|escape:"html"}></td>
+    <td class="<{$class}>"><a
+href="<{$xoops_url}>/modules/<{$mydirname}>/movie.php?id=<{$i.movie_id|escape:"html"}>"><{$smarty.const._MD_CINEMARU_MOVIE}></a></td>
+    <td class="<{$class}>"><{$i.reg_time|date_format:"%Y/%m/%d %H:%M"}></td>
+
+    <td class="<{$class}>">
+      <{if $i.reg_user == 0}>
+      <{$i.uname|default:"GUEST"|escape:"html"}>
+      <{else}>
+      <a href="<{$xoops_url}>/userinfo.php?uid=<{$i.reg_user}>"><{$i.uname|escape:"html"}></a>
+      <{/if}>
+    </td>
+    <td class="<{$class}>"><a
+href="<{$xoops_url}>/modules/<{$mydirname}>/movie_report_delete.php?report_id=<{$i.id}><{if
+$smarty.request.id}>&id=<{$smarty.request.id}><{/if}>"><{$smarty.const._MD_CINEMARU_DELETE}></a></td>
+  </tr>
+<{/foreach}>  
+  
+</table>
+
+    

Added: tags/1.8/cinemaru/templates/tag_list.html
===================================================================
--- tags/1.8/cinemaru/templates/tag_list.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/tag_list.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,4 @@
+
+<h1><{$smarty.const._MD_CINEMARU_TAG_LIST}></h1>
+<{include file="db:`$mydirname`_tag_list_part.html"}>
+

Added: tags/1.8/cinemaru/templates/tag_list_part.html
===================================================================
--- tags/1.8/cinemaru/templates/tag_list_part.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/tag_list_part.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,3 @@
+<{foreach from=$tag_list item=item}>
+  <a href="<{$xoops_url}>/modules/<{$mydirname}>/index.php?tag=<{$item.id}>" style="font-size:<{$item.size}>px;"><{$item.name|escape:"html"}></a>
+<{/foreach}>

Added: tags/1.8/cinemaru/templates/thumb.html
===================================================================
--- tags/1.8/cinemaru/templates/thumb.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/thumb.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,13 @@
+<{foreach from=$movie_list item=i key=k}>
+<p class="thumb" id="thumb" style="<{if $cinemaru_module_config.thumb_bgcolor}>background-color:
+<{$cinemaru_module_config.thumb_bgcolor}>; <{/if}>width:
+151px; height: 190px; word-break: break-all; font-size: 11px;
+border-style: dotted; border-width: 1px; border-color: #808080;
+margin: 3px; padding: 2px; float: left; ">
+
+<{assign var="movie" value=$i}>
+<{include file="db:`$mydirname`_thumb_part.html"}>
+
+</p>
+<{/foreach}>
+<br style="clear: both;">

Added: tags/1.8/cinemaru/templates/thumb_part.html
===================================================================
--- tags/1.8/cinemaru/templates/thumb_part.html	                        (rev 0)
+++ tags/1.8/cinemaru/templates/thumb_part.html	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,12 @@
+<a href="<{$xoops_url}>/modules/<{$mydirname}>/movie.php?id=<{$movie.id}>">
+<img src="<{if $movie.image_file_url != ''}><{$movie.image_file_url|escape:"html"}>
+          <{elseif $movie.image_file}><{$xoops_url}>/uploads/<{$mydirname}>/image/<{$movie.image_file}>
+          <{else}><{if $movie.file_type==$file_type}><{$xoops_url}>/modules/<{$mydirname}>/images/no_img_y.gif
+                  <{else}><{$xoops_url}>/modules/<{$mydirname}>/images/no_image.png<{/if}>
+          <{/if}>"
+          width="150" height="112"><br><{if $movie.title ==
+''}>no title<{else}><{$movie.title_trunc|escape:"html"}><{/if}></a><{if $movie.valid ==
+0}><font color='red'><b>(<{$smarty.const._MD_CINEMARU_MOVIE_NO_VALID2}>)</b></font><{/if}><br>
+<{$smarty.const._MD_CINEMARU_COUNT}>:<{$movie.counter}> 
+<{$smarty.const._MD_CINEMARU_COMMENT}><{$movie.comment}><br>
+<font style="font-size: 9px;"><{$movie.desc_trunc}></font><br>

Added: tags/1.8/cinemaru/xoops_version.php
===================================================================
--- tags/1.8/cinemaru/xoops_version.php	                        (rev 0)
+++ tags/1.8/cinemaru/xoops_version.php	2009-03-22 15:07:33 UTC (rev 186)
@@ -0,0 +1,386 @@
+<?php
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$mydirpath = dirname( __FILE__ ) ;
+$constpref = '_MI_' . strtoupper( $mydirname ) ;
+
+// language file (modinfo.php)
+/*
+$langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php' ;
+if( ! file_exists( $langmanpath ) ) die( 'install the latest altsys' ) ;
+require_once( $langmanpath ) ;
+$langman =& D3LanguageManager::getInstance() ;
+$langman->read( 'modinfo.php' , $mydirname , $mytrustdirname , false ) ;
+*/
+$constpref = '_MI_' . strtoupper( $mydirname ) ;
+
+
+$modversion['name'] = $mydirname ;
+$modversion['version'] = 1.8;
+$modversion['description'] = constant($constpref.'_MODULE_DESCRIPTION') ;
+$modversion['credits'] = "Masahiko Tokita";
+$modversion['author'] = "Masahiko Tokita http://tokita.net/" ;
+$modversion['help'] = "cinemaru.html" ;
+$modversion['license'] = "GPL see LICENSE" ;
+$modversion['official'] = 0 ;
+//$modversion['image'] = file_exists( 'module_icon.png' ) ? 'module_icon.png' : 'module_icon.php' ;
+$modversion['image'] = 'module_icon.php' ;
+$modversion['dirname'] = $mydirname ;
+
+// Any tables can't be touched by modulesadmin.
+$modversion['sqlfile'] = false ;
+$modversion['tables'] = array() ;
+
+// Admin things
+$modversion['hasAdmin'] = 1 ;
+$modversion['adminindex'] = 'admin/index.php' ;
+$modversion['adminmenu'] = 'admin/menu.php' ;
+
+// Search
+$modversion['hasSearch'] = 1 ;
+$modversion['search']['file'] = 'include/search.inc.php' ;
+$modversion['search']['func'] = $mydirname.'_global_search' ;
+
+// Menu
+$modversion['hasMain'] = 1 ;
+
+// There are no submenu (use menu moudle instead of mainmenu)
+$modversion['sub'] = array() ;
+
+// All Templates can't be touched by modulesadmin.
+$modversion['templates'] = array() ;
+
+// Blocks
+$modversion['blocks'][1]['file'] = "cinemaru_block_random.php";
+$modversion['blocks'][1]['name'] = constant($constpref.'_BLOCK_RANDOM');
+$modversion['blocks'][1]['description'] = "CINEMARU BLOCK RANDOM";
+$modversion['blocks'][1]['show_func'] = "b_cinemaru_block_random";
+$modversion['blocks'][1]['template'] = $mydirname . "_block_random.html";
+$modversion['blocks'][1]['options'] = "{$mydirname}";
+
+$modversion['blocks'][2]['file'] = "cinemaru_block_thumb.php";
+$modversion['blocks'][2]['name'] = constant($constpref.'_BLOCK_THUMB');
+$modversion['blocks'][2]['description'] = "CINEMARU BLOCK THUMB";
+$modversion['blocks'][2]['show_func'] = "b_cinemaru_block_thumb";
+$modversion['blocks'][2]['edit_func'] = "b_cinemaru_block_thumb_edit";
+$modversion['blocks'][2]['options'] = "{$mydirname}|counter|10|sort|1";
+$modversion['blocks'][2]['template'] = $mydirname . "_block_thumb.html";
+
+$modversion['blocks'][3]['file'] = "cinemaru_block_hottag.php";
+$modversion['blocks'][3]['name'] = constant($constpref.'_BLOCK_HOTTAG');
+$modversion['blocks'][3]['description'] = "CINEMARU BLOCK HOTTAG";
+$modversion['blocks'][3]['show_func'] = "b_cinemaru_block_hottag";
+$modversion['blocks'][3]['edit_func'] = "b_cinemaru_block_hottag_edit";
+$modversion['blocks'][3]['template'] = $mydirname . "_block_hottag.html";
+$modversion['blocks'][3]['options'] = "{$mydirname}|counter|20";
+/*
+$modversion['blocks'][4]['file'] = "cinemaru_block_pop.php";
+$modversion['blocks'][4]['name'] = constant($constpref.'_BLOCK_POP');
+$modversion['blocks'][4]['description'] = "CINEMARU BLOCK POPULARITY";
+$modversion['blocks'][4]['show_func'] = "b_cinemaru_block_pop";
+$modversion['blocks'][4]['edit_func'] = "b_cinemaru_block_pop_edit";
+$modversion['blocks'][4]['template'] = $mydirname . "_block_pop.html";
+$modversion['blocks'][4]['options'] = "{$mydirname}|counter|10";
+*/
+// Comments
+$modversion['hasComments'] = 0 ;
+
+// Notification
+$modversion['hasNotification'] = 1;
+$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
+$modversion['notification']['lookup_func'] = 'cinemaru_notify_iteminfo';
+
+$modversion['notification']['category'][1]['name'] = 'global';
+$modversion['notification']['category'][1]['title'] = constant($constpref.'_GLOBAL_NOTIFY');
+$modversion['notification']['category'][1]['description'] = constant($constpref.'_GLOBAL_NOTIFYDSC');
+$modversion['notification']['category'][1]['subscribe_from'] = array('index.php', 'views.php', 'regist.php');
+
+$modversion['notification']['event'][1]['name'] = 'new_post';
+$modversion['notification']['event'][1]['category'] = 'global';
+$modversion['notification']['event'][1]['title'] = constant($constpref.'_GLOBAL_NEWPOST_NOTIFY');
+$modversion['notification']['event'][1]['caption'] = constant($constpref.'_GLOBAL_NEWPOST_NOTIFYCAP');
+$modversion['notification']['event'][1]['description'] = constant($constpref.'_GLOBAL_NEWPOST_NOTIFYDSC');
+$modversion['notification']['event'][1]['mail_template'] = 'global_newpost_notify';
+$modversion['notification']['event'][1]['mail_subject'] = constant($constpref.'_GLOBAL_NEWPOST_NOTIFYSBJ');
+// 09.01.31 add by asben
+$modversion['notification']['event'][2]['name'] = 'update';
+$modversion['notification']['event'][2]['category'] = 'global';
+$modversion['notification']['event'][2]['title'] = constant($constpref.'_GLOBAL_UPDATE_NOTIFY');
+$modversion['notification']['event'][2]['caption'] = constant($constpref.'_GLOBAL_UPDATE_NOTIFYCAP');
+$modversion['notification']['event'][2]['description'] = constant($constpref.'_GLOBAL_UPDATE_NOTIFYDSC');
+$modversion['notification']['event'][2]['mail_template'] = 'global_update_notify';
+$modversion['notification']['event'][2]['mail_subject'] = constant($constpref.'_GLOBAL_UPDATE_NOTIFYSBJ');
+
+// 09.01.31 Correction by asben
+// Configs
+$modversion['hasconfig'] = 1;
+
+$modversion['config'][1] = array( 
+		'name'                  => 'cinemaru_movie_max_size' ,
+		'title'                 => $constpref.'_MOVIE_MAX_SIZE' ,
+		'description'   => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_MOVIE_MAX_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][2] = array(
+		'name'                  => 'tag_size' ,
+		'title'                 => $constpref.'_TAG_MAX_SIZE' ,
+		'description'   => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_TAG_MAX_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][3] = array( 
+		'name'                  => 'num_of_tag' ,
+		'title'                 => $constpref.'_NUM_OF_TAG' ,
+		'description'   => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_NUM_OF_TAG_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][4] = array( 
+		'name'                  => 'tag_encoding' ,
+		'title'                 => $constpref.'_TAG_ENCODING' ,
+		'description'   => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_TAG_ENCODING_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][5] = array(
+		'name'                  => 'num_of_tag_by_taglist' ,
+		'title'                 => $constpref.'_NUM_OF_TAG_BYLIST' ,
+		'description'   => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_NUM_OF_TAG_BY_TAGLIST_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][6] = array(
+		'name'                  => 'num_of_sumb' ,
+		'title'                 => $constpref.'_NUM_OF_THUMB' ,
+		'description'   => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_NUM_OF_THUMB_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][7] = array(
+		'name'                  => 'thumb_bgcolor' ,
+		'title'                 => $constpref.'_THUMB_BGCOLOR' ,
+		'description'           => constant($constpref.'_THUMB_BGCOLOR_DESC') ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_THUMB_BGCOLOR_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][8] = array(
+		'name'                  => 'show_user_id' ,
+		'title'                 => $constpref.'_SHOW_USER_ID' ,
+		'description'           => constant($constpref.'_SHOW_USER_ID_DESC') ,
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => constant($constpref.'_SHOW_USER_ID_DEFAULT'),
+		'options'               => array( $constpref.'_SHOW_USER_ID_OK'=>1,
+						  $constpref.'_SHOW_USER_ID_NG'=>0,
+						  )
+) ;
+$modversion['config'][9] = array(
+		'name'                  => 'name_setting' ,
+		'title'                 => $constpref.'_NAME_SETTING' ,
+		'description'   => '' ,
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => '0' ,
+		'options'               => array( $constpref.'_SET_NAME'=>0 ,
+						  $constpref.'_SET_UNAME'=>1,
+						  $constpref.'_SET_NAME_AND_UNAME'=>2,
+ 						  $constpref.'_SET_UNAME_OR_NAME'=>3
+                                                )
+) ;
+$modversion['config'][10] = array(
+		'name'                  => 'show_avatar' ,
+		'title'                 => $constpref.'_SHOW_AVATAR' ,
+		'description'           => '',
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => constant($constpref.'_SHOW_AVATAR_DEFAULT'),
+		'options'               => array( $constpref.'_SHOW_AVATAR_OK'=>1,
+						  $constpref.'_SHOW_AVATAR_NG'=>0,
+						  )
+) ;
+$modversion['config'][11] = array(
+		'name'                  => 'show_name_comment_list' ,
+		'title'                 => $constpref.'_SHOW_NAME_CLIST' ,
+		'description'           => '',
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => constant($constpref.'_SHOW_NAME_CLIST_DEFAULT'),
+		'options'               => array( $constpref.'_SHOW_NAME_CLIST_OK'=>1,
+						  $constpref.'_SHOW_NAME_CLIST_NG'=>0,
+						  )
+) ;
+$modversion['config'][12] = array(
+		'name'                  => 'guest_user_name' ,
+		'title'                 => $constpref.'_GUEST_USER_NAME' ,
+		'description'           => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_GUEST_USER_NAME_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][13] = array(
+		'name'                  => 'show_name_movie' ,
+		'title'                 => $constpref.'_SHOW_NAME_MOVIE' ,
+		'description'           => '',
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => constant($constpref.'_SHOW_NAME_MOVIE_DEFAULT'),
+		'options'               => array( $constpref.'_SHOW_NAME_MOVIE_OK'=>1,
+						  $constpref.'_SHOW_NAME_MOVIE_NG'=>0,
+						  )
+) ;
+$modversion['config'][14] = array(
+		'name'                  => 'show_report_link' ,
+		'title'                 => $constpref.'_SHOW_REPORT_LINK' ,
+		'description'           => '',
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => constant($constpref.'_SHOW_REPORT_LINK_DEFAULT'),
+		'options'               => array( $constpref.'_SHOW_REPORT_LINK_OK'=>1,
+						  $constpref.'_SHOW_REPORT_LINK_NG'=>0,
+						  )
+) ;
+$modversion['config'][15] = array(
+		'name'                  => 'sp_command1' ,
+		'title'                 => $constpref.'_SP_COMMAND1' ,
+		'description'           => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_SP_COMMAND1_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][16] = array(
+		'name'                  => 'sp_command1_url' ,
+		'title'                 => $constpref.'_SP_COMMAND1_URL' ,
+		'description'           => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_SP_COMMAND1_URL_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][17] = array(
+		'name'                  => 'sp_command1_random' ,
+		'title'                 => $constpref.'_SP_COMMAND1_RAND' ,
+		'description'           => '' ,
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => constant($constpref.'_SP_COMMAND1_RANDOM_DEFAULT'),
+		'options'               => array( $constpref.'_SP_RANDOM_OK'=>1,
+						  $constpref.'_SP_RANDOM_NG'=>0,
+						  )
+) ;
+$modversion['config'][18] = array(
+		'name'                  => 'sp_command2' ,
+		'title'                 => $constpref.'_SP_COMMAND2' ,
+		'description'           => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_SP_COMMAND2_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][19] = array(
+		'name'                  => 'sp_command2_url' ,
+		'title'                 => $constpref.'_SP_COMMAND2_URL' ,
+		'description'           => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_SP_COMMAND2_URL_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][20] = array(
+		'name'                  => 'sp_command2_random' ,
+		'title'                 => $constpref.'_SP_COMMAND2_RAND' ,
+		'description'           => '' ,
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => constant($constpref.'_SP_COMMAND2_RANDOM_DEFAULT'),
+		'options'               => array( $constpref.'_SP_RANDOM_OK'=>1,
+						  $constpref.'_SP_RANDOM_NG'=>0,
+						  )
+) ;
+$modversion['config'][21] = array(
+		'name'                  => 'sp_command3' ,
+		'title'                 => $constpref.'_SP_COMMAND3' ,
+		'description'           => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_SP_COMMAND3_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][22] = array(
+		'name'                  => 'sp_command3_url' ,
+		'title'                 => $constpref.'_SP_COMMAND3_URL' ,
+		'description'           => '' ,
+		'formtype'              => 'textbox' ,
+		'valuetype'             => 'text' ,
+		'default'               => constant($constpref.'_SP_COMMAND3_URL_DEFAULT'),
+		'options'               => array()
+) ;
+$modversion['config'][23] = array(
+		'name'                  => 'sp_command3_random' ,
+		'title'                 => $constpref.'_SP_COMMAND3_RAND' ,
+		'description'           => '' ,
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => constant($constpref.'_SP_COMMAND3_RANDOM_DEFAULT'),
+		'options'               => array( $constpref.'_SP_RANDOM_OK'=>1,
+						  $constpref.'_SP_RANDOM_NG'=>0,
+						  )
+) ;
+$modversion['config'][24] = array( 
+                'name'                  => 'richtext' ,
+                'title'                 => $constpref.'_RICHTEXT' ,
+                'description'   => '' ,
+                'formtype'              => 'select' ,
+                'valuetype'             => 'int' ,
+                'default'               => 1 ,
+                'options'               => array( 
+		    $constpref.'_USE_RICHTEXT'=> 1,
+		    $constpref.'_USE_PLAINTEXT'=> 0
+	       )
+) ;
+$modversion['config'][25] = array(
+		'name'                  => 'blog_paste' ,
+		'title'                 => $constpref.'_BLOG_PASTE' ,
+		'description'           => '' ,
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => 1,
+		'options'               => array( $constpref.'_BLOG_PASTE_OK'=>1,
+						  $constpref.'_BLOG_PASTE_NG'=>0,
+						  )
+) ;
+$modversion['config'][26] = array(
+		'name'                  => 'top_movie' ,
+		'title'                 => $constpref.'_TOP_MOVIE' ,
+		'description'           => $constpref.'_TOP_MOVIE_DESC' ,
+		'formtype'              => 'select' ,
+		'valuetype'             => 'int' ,
+		'default'               => 1,
+		'options'               => array( $constpref.'_TOP_MOVIE_LIST'=>1,
+						  $constpref.'_TOP_MOVIE_THUMB'=>2,
+						  )
+) ;
+
+
+$modversion['onInstall'] = 'oninstall.php' ;
+$modversion['onUpdate'] = 'onupdate.php' ;
+$modversion['onUninstall'] = 'onuninstall.php' ;
+
+
+





Cinemaru-svn メーリングリストの案内
Back to archive index