diff options
| author | bitweaver.org <bitweaver@users.sourceforge.net> | 2005-06-19 06:12:45 +0000 |
|---|---|---|
| committer | bitweaver.org <bitweaver@users.sourceforge.net> | 2005-06-19 06:12:45 +0000 |
| commit | 850713ed26ff34d8fe37feed30bb94de4adc957c (patch) | |
| tree | 7ceb5eaad8a84eb8796fd2d53ed62f17052acc35 /copyrights.php | |
| download | wiki-850713ed26ff34d8fe37feed30bb94de4adc957c.tar.gz wiki-850713ed26ff34d8fe37feed30bb94de4adc957c.tar.bz2 wiki-850713ed26ff34d8fe37feed30bb94de4adc957c.zip | |
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'copyrights.php')
| -rw-r--r-- | copyrights.php | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/copyrights.php b/copyrights.php new file mode 100644 index 0000000..2ec258f --- /dev/null +++ b/copyrights.php @@ -0,0 +1,62 @@ +<?php +// $Header: /cvsroot/bitweaver/_bit_wiki/copyrights.php,v 1.1 2005/06/19 06:12:44 bitweaver Exp $ +// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. +// All Rights Reserved. See copyright.txt for details and a complete list of authors. +// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. +// This file sets up the information needed to display +// the copyrights information box +require_once( '../bit_setup_inc.php' ); +if ($wiki_feature_copyrights != 'y') { + $smarty->assign('msg', tra("The copyright management feature is not enabled.")); + $gBitSystem->display( 'error.tpl' ); + die; +} +if (!((isset($bit_p_edit_copyrights)) && ($gBitUser->hasPermission( 'bit_p_edit_copyrights' )))) { + $smarty->assign('msg', tra("You do not have permission to use this feature.")); + $gBitSystem->display( 'error.tpl' ); + die; +} +require_once( WIKI_PKG_PATH.'copyrights_lib.php' ); +require_once( WIKI_PKG_PATH.'lookup_page_inc.php' ); + +if (isset($_REQUEST['addcopyright'])) { + if ($wiki_feature_copyrights == 'y' && isset($_REQUEST['copyrightTitle']) && isset($_REQUEST['copyrightYear']) + && isset($_REQUEST['copyrightAuthors']) && !empty($_REQUEST['copyrightYear']) && !empty($_REQUEST['copyrightTitle'])) { + $copyrightYear = $_REQUEST['copyrightYear']; + $copyrightTitle = $_REQUEST['copyrightTitle']; + $copyrightAuthors = $_REQUEST['copyrightAuthors']; + $copyrightslib->add_copyright($gContent->mPageId, $copyrightTitle, $copyrightYear, $copyrightAuthors, $gBitUser->mUserId); + } else { + $smarty->assign('msg', tra("You must supply all the information, including title and year.")); + $gBitSystem->display( 'error.tpl' ); + die; + } +} +if (isset($_REQUEST['editcopyright'])) { + if ($wiki_feature_copyrights == 'y' && isset($_REQUEST['copyrightTitle']) && isset($_REQUEST['copyrightYear']) + && isset($_REQUEST['copyrightAuthors']) && !empty($_REQUEST['copyrightYear']) && !empty($_REQUEST['copyrightTitle'])) { + $copyright_id = $_REQUEST['copyright_id']; + $copyrightYear = $_REQUEST['copyrightYear']; + $copyrightTitle = $_REQUEST['copyrightTitle']; + $copyrightAuthors = $_REQUEST['copyrightAuthors']; + $copyrightslib->edit_copyright($copyright_id, $copyrightTitle, $copyrightYear, $copyrightAuthors, $gBitUser->mUserId); + } else { + $smarty->assign('msg', tra("You must supply all the information, including title and year.")); + $gBitSystem->display( 'error.tpl' ); + die; + } +} +if (isset($_REQUEST['action']) && isset($_REQUEST['copyright_id'])) { + if ($_REQUEST['action'] == 'up') { + $copyrightslib->up_copyright($_REQUEST['copyright_id']); + } elseif ($_REQUEST['action'] == 'down') { + $copyrightslib->down_copyright($_REQUEST['copyright_id']); + } elseif ($_REQUEST['action'] == 'delete') { + $copyrightslib->remove_copyright($_REQUEST['copyright_id']); + } +} +$copyrights = $copyrightslib->list_copyrights( $gContent->mPageId ); +$smarty->assign('copyrights', $copyrights["data"]); +// Display the template +$gBitSystem->display( 'bitpackage:wiki/copyrights.tpl'); +?> |
