File: permalink_page.php

package info (click to toggle)
mantis 1.2.18-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 16,740 kB
  • sloc: php: 110,344; sh: 573; xml: 52; makefile: 40; sql: 32
file content (52 lines) | stat: -rw-r--r-- 1,586 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
# MantisBT - a php based bugtracking system

# MantisBT 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.
#
# MantisBT 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 MantisBT.  If not, see <http://www.gnu.org/licenses/>.

	/**
	 * @package MantisBT
	 * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - [email protected]
	 * @copyright Copyright (C) 2002 - 2014  MantisBT Team - [email protected]
	 * @link http://www.mantisbt.org
	 */
	 /**
	  * MantisBT Core API's
	  */
	require_once( 'core.php' );

	html_page_top();

	access_ensure_project_level( config_get( 'create_permalink_threshold' ) );

	$f_url = string_sanitize_url( gpc_get_string( 'url' ) );
?>
<div align="center">
	<p>
<?php
	echo lang_get( 'filter_permalink' ), '<br />';
	$t_safe_url = string_display_line( $f_url );
	echo "<a href=\"$t_safe_url\">$t_safe_url</a></p>";

	$t_create_short_url = config_get( 'create_short_url' );

	if ( !is_blank( $t_create_short_url ) ) {
		print_bracket_link(
			sprintf( $t_create_short_url, $f_url ),
			lang_get( 'create_short_link' ),
			/* new window = */ true );
	}
?>
</div>
<?php
	html_page_bottom();