3 * Copyright 2010 (c) Mélanie Le Bail
4 * Copyright 2014, Franck Villaume - TrivialDev
5 * http://fusionforge.org
7 * This file is part of FusionForge. FusionForge is free software;
8 * you can redistribute it and/or modify it under the terms of the
9 * GNU General Public License as published by the Free Software
10 * Foundation; either version 2 of the Licence, or (at your option)
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 $GLOBALS['mailman_bin_dir'] = '/usr/lib/mailman/bin';
24 $GLOBALS['mailman_lib_dir'] = '/var/lib/mailman';
25 $GLOBALS['forumml_arch'] = '/var/lib/mailman/archives';
26 $GLOBALS['forumml_tmp'] = '/var/spool/forumml';
27 $GLOBALS['forumml_dir'] = forge_get_config('data_path').'/forumml';
28 $GLOBALS['sys_lf'] = "\n";
31 return session_loggedin();
34 function htmlRedirect($url) {
35 session_redirect($url);
38 function htmlIframe($url,$poub) {
39 global $HTML, $group_id;
40 $project = group_get_object($group_id);
41 if (isset($poub['id'])) {
44 $id = 'default_id_htmliframe';
47 echo ('<iframe src="'.$url.'" id="'.$id.'" width="100%" ></iframe>');
48 html_use_jqueryautoheight();
49 echo $HTML->getJavascripts();
50 echo '<script type="text/javascript">//<![CDATA[
51 jQuery(\'#'.$id.'\').iframeAutoHeight({heightOffset: 50});
52 jQuery(\'#'.$id.'\').load(function (){
53 if (this.contentWindow.location.href == "'.util_make_url('/projects/'.$project->getUnixName()).'/") {
54 console.log(this.contentWindow.location.href);
55 window.location.href = this.contentWindow.location.href;
62 function helpButton($help) {
65 function getIcon($url, $w = 16, $h = 16, $args = array()) {
66 echo html_image($url, $w, $h, $args);
69 function getImage($img) {
70 echo util_make_url($GLOBALS['HTML']->imgroot.$img);
73 function get_server_url() {
74 return util_make_url('');