-2008-03-09 Christian Bayle <bayle@debian.org>
+2008-03-10 Christian Bayle <bayle@debian.org>
- * plugins/*: Migrate to util_make_url() and util_make_link()
- * snippet/*: Ditto
- * include/*: Ditto
- * admin/*: Ditto
- * my/*: Ditto
- * tracker/*: Ditto
- * search/*: Ditto
+ * Removed as much php warning as possible
+ * Migrate to util_make_url() and util_make_link()
+ * - www/export/*,www/developer/*,www/themes/*
+ * - www/frs/*,www/activity/*,www/project/*
+ * - www/news/*,www/pm/*,www/people/*,www/docman/*
+ * - plugins/*
+ * - www/snippet/*,www/include/*,www/admin/*
+ * - www/my/*,www/tracker/*,www/search/*
* introduced $sys_noforcetype to make possible to get rid of /projects
and /users forcetype
switch ($arr['section']) {
case 'commit': {
$icon=html_image("ic/cvs16b.png","20","20",array("border"=>"0","alt"=>"SCM"));
- $url='<a href="'.$GLOBALS['sys_urlprefix'].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id'].'">Commit for Tracker Item [#'.$arr['subref_id'].'] '.$arr['description'].' </a>';
+ $url=util_make_link ('/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('Commit for Tracker Item').' [#'.$arr['subref_id'].'] '.$arr['description']);
break;
}
case 'trackeropen': {
$icon=html_image("ic/tracker20g.png",'20','20',array('alt'=>'Tracker'));
- $url='<a href="'.$GLOBALS['sys_urlprefix'].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id'].'">Tracker Item [#'.$arr['subref_id'].' '.$arr['description'].' ] Opened</a>';
+ $url=util_make_link ('/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('Tracker Item').' [#'.$arr['subref_id'].' '.$arr['description'].' ] '._('Opened'));
break;
}
case 'trackerclose': {
$icon=html_image("ic/tracker20g.png",'20','20',array('alt'=>'Tracker'));
- $url='<a href="'.$GLOBALS['sys_urlprefix'].'/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id'].'">Tracker Item [#'.$arr['subref_id'].' '.$arr['description'].' ] Closed</a>';
+ $url=util_make_link ('/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('Tracker Item').' [#'.$arr['subref_id'].' '.$arr['description'].' ] '._('Closed'));
break;
}
case 'frsrelease': {
$icon=html_image("ic/cvs16b.png","20","20",array("border"=>"0","alt"=>"SCM"));
- $url='<a href="'.$GLOBALS['sys_urlprefix'].'/frs/?release_id='.$arr['subref_id'].'&group_id='.$arr['group_id'].'">FRS Release '.$arr['description'].'</a>';
+ $url=util_make_link ('/frs/?release_id='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('FRS Release').' '.$arr['description']);
break;
}
case 'forumpost': {
$icon=html_image("ic/forum20g.png","20","20",array("border"=>"0","alt"=>"Forum"));
- $url='<a href="'.$GLOBALS['sys_urlprefix'].'/forum/message.php?msg_id='.$arr['subref_id'].'&group_id='.$arr['group_id'].'">Forum Post '.$arr['description'].'</a>';
+ $url=util_make_link ('/forum/message.php?msg_id='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('Forum Post ').' '.$arr['description']);
break;
}
case 'news': {
$icon=html_image("ic/write16w.png","20","20",array("border"=>"0","alt"=>"News"));
- $url='<a href="'.$GLOBALS['sys_urlprefix'].'/forum/forum.php?forum_id='.$arr['subref_id'].'">News '.$arr['description'].'</a>';
+ $url=util_make_link ('/forum/forum.php?forum_id='.$arr['subref_id'],_('News').' '.$arr['description']);
break;
}
}
+ if (isset ($GLOBALS['sys_noforcetype']) && $GLOBALS['sys_noforcetype']) {
+ $userlink='/developer/?user_id='.$arr['user_id'];
+ } else {
+ $userlink='/users/'.$arr['user_name'].'/';
+ }
echo '<tr '. $HTML->boxGetAltRowStyle($j++) . '>
<td> '.date('H:i:s',$arr['activity_date']).'</td>
<td>'.$icon .' '.$url.'</td>
- <td><a href="'.$GLOBALS['sys_urlprefix'].'/users/'.$arr['user_name'].'/">'.$arr['realname'].'</a></td>
+ <td>'.util_make_link ($userlink,$arr['realname']).'</td>
</tr>';
}
$user_id=$form_dev;
}
-header("Location: ".$GLOBALS['sys_urlprefix']."/users/". user_getname($user_id) ."/");
+if (isset ($sys_noforcetype) && $sys_noforcetype) {
+ if (!$user_id) {
+ exit_error("Missing User Argument","A user must be specified for this page.");
+ } else {
+ $user =& user_get_object($user_id);
+ if (!$user || !is_object($user) || $user->isError() || !$user->isActive()) {
+ exit_error(_('That user does not exist.'),_('Invalid User'));
+ }
+ include('user_home.php');
+ }
+} else {
+ header("Location: ".util_make_url ('/users/'.user_getname($user_id).'/'));
+}
?>
}
?>
-<script language="JavaScript" src="<?php echo $GLOBALS['sys_urlprefix']; ?>/jscook/JSCookTree.js"></script>
-<link rel="stylesheet" href="<?php echo $GLOBALS['sys_urlprefix']; ?>/jscook/ThemeXP/theme.css" type="text/css" />
+<script language="JavaScript" src="<?php echo util_make_url ('/jscook/JSCookTree.js'); ?>"></script>
+<link rel="stylesheet" href="<?php echo util_make_url ('/jscook/ThemeXP/theme.css'); ?>" type="text/css" />
<script src="/jscook/ThemeXP/theme.js" type="text/javascript"></script>
<script language="JavaScript"><!--
var myMenu =
[
-['<span class="JSCookTreeFolderClosed"><i><img src="<?php echo $GLOBALS['sys_urlprefix']; ?>/jscook/ThemeXP/folder1.gif"></i></span><span class="JSCookTreeFolderOpen"><i><img src="/jscook/ThemeXP/folderopen1.gif"></i></span>', '/', '#', '', '',
+['<span class="JSCookTreeFolderClosed"><i><img src="<?php echo util_make_url ('/jscook/ThemeXP/folder1.gif'); ?>"></i></span><span class="JSCookTreeFolderOpen"><i><img src="/jscook/ThemeXP/folderopen1.gif"></i></span>', '/', '#', '', '',
<?php
docman_recursive_display(0);
?>
if ($limit > 100) $limit = 100;
-$proto = ($GLOBALS['sys_use_ssl']) ? 'https://' : 'http://';
-$url = $proto.$GLOBALS['sys_default_domain'].$GLOBALS['sys_urlprefix'];
+$url = util_make_url ('/');
if ($group_id) {
$where = "group_id=$group_id and is_public=1";
<p>
<?php
printf (_('You can now <a href="%1$s"><strong>add files to this release</strong></a> if you wish, or edit the release. Please note that file(s) may not appear immediately on the <a href="%2$s">download page</a>. Allow several hours for propagation.'),
- $GLOBALS['sys_urlprefix'].'/frs/admin/editrelease.php?release_id='.$frsr->getID().'&group_id='.$group_id.'&package_id='.$package_id,
- $GLOBALS['sys_urlprefix'].'/frs/?group_id='.$group_id
+ util_make_url ('/frs/admin/editrelease.php?release_id='.$frsr->getID().'&group_id='.$group_id.'&package_id='.$package_id),
+ util_make_url ('/frs/?group_id='.$group_id)
)
?>
<?php
}
+} else {
+ $release_name = '';
+ $userfile = '';
+ $userfile_name = '';
+ $type_id = '';
+ $processor_id = '';
+ $release_date = '';
+ $release_notes = '';
+ $release_changes = '';
+ $preformatted = '';
+ $ftp_filename = '';
}
frs_admin_header(array('title'=>_('Quick Release System'),'group'=>$group_id));
?>
- <?php printf(_('Or %1$s create a new package %2$s'), '<a href="'.$GLOBALS['sys_urlprefix'].'/frs/admin/?group_id='.$group_id.'">', '</a>') ?>
+ <?php printf(_('Or %1$s create a new package %2$s'), '<a href="'.util_make_url ('/frs/admin/?group_id='.$group_id).'">', '</a>') ?>
</td>
</tr>
<tr>
$cur_style = $GLOBALS['HTML']->boxGetAltRowStyle($p);
print '<tr '.$cur_style.'><td colspan="3"><h3>'.db_result($res_package,$p,'name').'
- <a href="'.$GLOBALS['sys_urlprefix'].'/frs/monitor.php?filemodule_id='. db_result($res_package,$p,'package_id') .'&group_id='.db_result($res_package,$p,'group_id').'&start=1">'.
+ <a href="'.util_make_url ('/frs/monitor.php?filemodule_id='. db_result($res_package,$p,'package_id') .'&group_id='.db_result($res_package,$p,'group_id').'&start=1').'">'.
html_image('ic/mail16w.png','20','20',array('alt'=>_('Monitor this package'))) .
'</a></h3></td><td colspan="4"> </td></tr>';
$cell_data=array();
$cell_data[] = array('<dd>
- <a href="'.$GLOBALS['sys_urlprefix'].'/frs/download.php/'.$file_release['file_id'].'/'.$file_release['filename'].'">'
- . $file_release['filename'] .'</a>',
+ '.util_make_link ('/frs/download.php/'.$file_release['file_id'].'/'.$file_release['filename'],$file_release['filename']),
'colspan=3');
$cell_data[] = array(human_readable_bytes($file_release['file_size']),'align="right"');
echo $HTML->boxTop(_('Notes:'));
- echo '<h3>'._('Release Name:').' <a href="'.$GLOBALS['sys_urlprefix'].'/frs/?group_id='.db_result($result,0,'group_id').'">'.db_result($result,0,'name').'</a></h3>
+ echo '<h3>'._('Release Name:').' '.util_make_link ('/frs/?group_id='.db_result($result,0,'group_id'),db_result($result,0,'name')).'</h3>
<p>';
/*
<ul>';
for ($i=0; $i<$rows; $i++) {
echo '
- <li><a href="'.$GLOBALS['sys_urlprefix'].'/news/admin/?approve=1&id='.db_result($result,$i,'id').'&group_id='.
- db_result($result,$i,'group_id').'">'.
- db_result($result,$i,'summary').'</a></li>';
+ <li>'.util_make_link ('/news/admin/?approve=1&id='.db_result($result,$i,'id').'&group_id='.db_result($result,$i,'group_id'),db_result($result,$i,'summary')).'</li>';
}
echo '</ul>';
}
<form action="'.getStringFromServer('PHP_SELF').'" method="post">
<input type="hidden" name="for_group" value="'.db_result($result,0,'group_id').'" />
<input type="hidden" name="id" value="'.db_result($result,0,'id').'" />
- <strong>'._('Submitted for group').':</strong> <a href="'.$GLOBALS['sys_urlprefix'].'/projects/'.strtolower(db_result($result,0,'unix_group_name')).'/">'.$group->getPublicName().'</a><br />
+ <strong>'._('Submitted for group').':</strong> '.
+ util_make_link ('/projects/'.strtolower(db_result($result,0,'unix_group_name')).'/',$group->getPublicName()).'<br />
<strong>'._('Submitted by').':</strong> '.$user->getRealName().'<br />
<input type="hidden" name="approve" value="y" />
<input type="hidden" name="post_changes" value="y" />
<a href="'.getStringFromServer('PHP_SELF').'?approve=1&id='.db_result($result,$i,'id').'">'.db_result($result,$i,'summary').'</a>
</td>
- <td width="35%">
- <a href="'.$GLOBALS['sys_urlprefix'].'/projects/'
- .db_result($result,$i,'unix_group_name').'/">'
- .db_result($result,$i,'group_name')
- .' ('.db_result($result,$i,'unix_group_name').')'
- .'</a>
- </td>
+ <td width="35%">'
+ .util_make_link ('/projects/'.db_result($result,$i,'unix_group_name').'/',db_result($result,$i,'group_name').' ('.db_result($result,$i,'unix_group_name').')')
+ .'</td>
</tr>'
;
}
for ($j = 0; $j < $rows; $j++) {
echo '
- <a href="'.$GLOBALS['sys_urlprefix'].'/forum/forum.php?forum_id='.db_result($result, $j, 'forum_id').'">'.
+ <a href="'.util_make_url ('/forum/forum.php?forum_id='.db_result($result, $j, 'forum_id')).'">'.
html_image("ic/cfolder15.png","15","13",array("border"=>"0")) . ' '.
stripslashes(db_result($result, $j, 'summary')).'</a> ';
echo '
} else {
$summ_txt='<br />'. util_make_links( $arr[0] );
}
- $proj_name=' - <a href="'.$GLOBALS['sys_urlprefix'].'/projects/'. strtolower(db_result($result,$i,'unix_group_name')) .'/">'. db_result($result,$i,'group_name') .'</a>';
+ $proj_name=' - '.util_make_link ('/projects/'. strtolower(db_result($result,$i,'unix_group_name')) .'/',db_result($result,$i,'group_name'));
} else {
$proj_name='';
$summ_txt='';
if (!$limit) {
if ($show_forum) {
- $return .= '<li><a href="'.$GLOBALS['sys_urlprefix'].'/forum/forum.php?forum_id='. db_result($result,$i,'forum_id') .'"><strong>'. db_result($result,$i,'summary') . '</strong></a>';
+ $return .= '<li>'.util_make_link ('/forum/forum.php?forum_id='. db_result($result,$i,'forum_id'),'<strong>'. db_result($result,$i,'summary') . '</strong>');
} else {
$return .= '<li><strong>'. db_result($result,$i,'summary') . '</strong>';
}
$return .= ' <em>'. date(_('Y-m-d H:i'),db_result($result,$i,'post_date')).'</em><br /></li>';
} else {
if ($show_forum) {
- $return .= '
- <a href="'.$GLOBALS['sys_urlprefix'].'/forum/forum.php?forum_id='. db_result($result,$i,'forum_id') .'"><strong>'. db_result($result,$i,'summary') . '</strong></a>';
+ $return .= util_make_link ('/forum/forum.php?forum_id='. db_result($result,$i,'forum_id'),'<strong>'. db_result($result,$i,'summary').'</strong>');
} else {
$return .= '
<strong>'. db_result($result,$i,'summary') . '</strong>';
}
if ($show_forum){
- $return .= '<div align="center">(' . $num_comments .' '. $comments_txt . ') <a href="'.$GLOBALS['sys_urlprefix'].'/forum/forum.php?forum_id='. db_result($result,$i,'forum_id') .'">[' . _('Read More/Comment') . ']</a></div><hr width="100%" size="1" />';
+ $return .= '<div align="center">(' . $num_comments .' '. $comments_txt . ') '
+ .util_make_link ('/forum/forum.php?forum_id='. db_result($result,$i,'forum_id'),'[' . _('Read More/Comment') . ']').'</div><hr width="100%" size="1" />';
} else {
$return .= '<hr width="100%" size="1" />';
}
$return .= '<hr width="100%" size="1" />'."\n";
}
if ($group_id != $sys_news_group) {
- $archive_url=$GLOBALS['sys_urlprefix'].'/news/?group_id='.$group_id;
+ $archive_url=util_make_url ('/news/?group_id='.$group_id);
} else {
- $archive_url=$GLOBALS['sys_urlprefix'].'/news/';
+ $archive_url=util_make_url ('/news/');
}
if ($show_forum) {
}
//you can only submit news from a project now
//you used to be able to submit general news
- $return .= '<div align="center"><a href="'.$GLOBALS['sys_urlprefix'].'/news/submit.php?group_id='.$group_id.'">[' . _('Submit News') . ']</a></div>';
+ $return .= '<div align="center">'
+ .util_make_link ('/news/submit.php?group_id='.$group_id,'['._('Submit News').']').'</div>';
}
return $return;
}
//show the project name
- $proj_name=' - <a href="'.$GLOBALS['sys_urlprefix'].'/projects/'. strtolower(db_result($result,$i,'unix_group_name')) .'/">'. db_result($result,$i,'group_name') .'</a>';
+ $proj_name=' - '.util_make_link ('/projects/'. strtolower(db_result($result,$i,'unix_group_name')) .'/',db_result($result,$i,'group_name'));
} else {
$proj_name='';
$summ_txt='';
}
- $return .= '
- <a href="'.$GLOBALS['sys_urlprefix'].'/forum/forum.php?forum_id='. db_result($result,$i,'forum_id') .'"><strong>'. db_result($result,$i,'summary') . '</strong></a>
- <br /><em>'. db_result($result,$i,'realname') .' - '.
+ $return .= util_make_link ('/forum/forum.php?forum_id='. db_result($result,$i,'forum_id'),'<strong>'. db_result($result,$i,'summary') . '</strong>')
+ .'<br /><em>'. db_result($result,$i,'realname') .' - '.
date(_('Y-m-d H:i'),db_result($result,$i,'post_date')) . $proj_name . '</em>
'. $summ_txt .'<hr width="100%" size="1" />';
}
echo '
<p>'._('Start by filling in the fields below. When you click continue, you will be shown a list of skills and experience levels that this job requires.').' </p>
<p>
- <form action="/people/editjob.php" method="post">
+ <form action="'.util_make_url ('/people/editjob.php').'" method="post">
<input type="hidden" name="group_id" value="'.$group_id.'" />
<input type="hidden" name="form_key" value="' . form_generate_key() . '">
<strong>'._('Category').'</strong>'.utils_requiredField().'<br /></p>
}
if ($group_id && $job_id) {
- echo ' | <a href="'.$GLOBALS['sys_urlprefix'].'/people/editjob.php?group_id='. $group_id .'&job_id='. $job_id .'">Edit Job</a>';
+ echo ' | '.util_make_link ('/people/editjob.php?group_id='. $group_id .'&job_id='. $job_id,_('Edit Job'));
}
}
} else {
for ($i=0; $i<$rows; $i++) {
echo db_error();
- $return .= '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td><a href="'.$GLOBALS['sys_urlprefix'].'/people/?category_id='.
- db_result($result,$i,'category_id') .'">'.
- db_result($result,$i,'name') .'</a> ('. db_result($result,$i,'total') .')</td></tr>';
+ $return .= '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td>'
+ .util_make_link ('/people/?category_id='. db_result($result,$i,'category_id'), db_result($result,$i,'name')) .' ('. db_result($result,$i,'total') .')</td></tr>';
}
}
$return .= $GLOBALS['HTML']->listTableBottom();
for ($i=0; $i < $rows; $i++) {
$return .= '
<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .
- '><td><a href="'.$GLOBALS['sys_urlprefix'].'/people/viewjob.php?group_id='.
- db_result($result,$i,'group_id') .'&job_id='.
- db_result($result,$i,'job_id') .'">'.
- db_result($result,$i,'title') .'</a></td><td>'.
+ '><td>'.util_make_link ('/people/viewjob.php?group_id='. db_result($result,$i,'group_id') .'&job_id='. db_result($result,$i,'job_id'), db_result($result,$i,'title')) .'</td><td>'.
db_result($result,$i,'category_name') .'</td><td>'.
date(_('Y-m-d H:i'),db_result($result,$i,'post_date')) .
- '</td><td><a href="'.$GLOBALS['sys_urlprefix'].'/projects/'.strtolower(db_result($result,$i,'unix_group_name')).'/">'.
- db_result($result,$i,'group_name') .'</a></td></tr>';
+ '</td><td>'.util_make_link ('/projects/'.strtolower(db_result($result,$i,'unix_group_name')).'/', db_result($result,$i,'group_name')) .'</td></tr>';
}
}
<tr><td>
<strong>'._('Contact Info').'<br />
- <a href="'.$GLOBALS['sys_urlprefix'].'/sendmessage.php?touser='. db_result($result,0,'user_id') .'&subject='. urlencode( 'RE: '.db_result($result,0,'title')) .'">'. db_result($result,0,'user_name') .'</a></strong>
+ '.util_make_link ('/sendmessage.php?touser='. db_result($result,0,'user_id') .'&subject='. urlencode( 'RE: '.db_result($result,0,'title')), db_result($result,0,'user_name')) .'</strong>
</td><td>
<strong>'._('Status').'</strong><br />
'. db_result($result,0,'status_name') .'
'. date(_('Y-m-d H:i'),db_result($result,0,'post_date')) .'
</td><td>
<strong>'._('For project').'<br />
- <a href="'.$GLOBALS['sys_urlprefix'].'/project/?group_id='. $group_id .'">'. db_result($result,0,'group_name') .'</a></strong>
+ '.util_make_link ('/project/?group_id='. $group_id, db_result($result,0,'group_name')) .'</strong>
</td></tr>
<tr><td colspan="2">
<tr>
<td>
<strong><?php echo _('Category') ?></strong><br />
- <?php echo $pg->categoryBox('category_id'); ?> <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/pm/admin/?<?php echo "group_id=$group_id&add_cat=1&group_project_id=$group_project_id"; ?>">(<?php echo _('admin') ?>)</a>
+ <?php
+ echo $pg->categoryBox('category_id');
+ echo util_make_link ('/pm/admin/?group_id='.$group_id.'&add_cat=1&group_project_id='.$group_project_id,'('._('admin').')');
+ ?>
</td>
*/
echo '<tr><td colspan="2">';
if ($offset > 0) {
- echo '<a href="'.$GLOBALS['sys_urlprefix'].'/pm/task.php?func=browse&group_project_id='.
- $group_project_id.'&group_id='.$group_id.'&offset='.($offset-50).'">
- <strong>'._('previous 50').'<--</strong></a>';
+ echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset-50),'<strong>'._('previous 50').'<--</strong>');
} else {
echo ' ';
}
echo '</td><td> </td><td colspan="2">';
if ($rows==50) {
- echo '<a href="'.$GLOBALS['sys_urlprefix'].'/pm/task.php?func=browse&group_project_id='.
- $group_project_id.'&group_id='.$group_id.'&offset='.($offset+50).
- '"><strong>'._('next 50').' --></strong></a>';
+ echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset+50),'<strong>'._('next 50').' --></strong></a>');
} else {
echo ' ';
}
function make_task_link($task, $type) {
global $HTML, $group_id, $group_project_id;
return '<a title="'. sprintf(_('Task summary: %s'), $task->getSummary())
- . '" href="'.$GLOBALS['sys_urlprefix'].'/pm/task.php?func=detailtask&project_task_id=' . $task->getID()
- . '&group_id=' . $group_id
- . '&group_project_id=' .$group_project_id
+ . '" href="'.util_make_url ('/pm/task.php?func=detailtask&project_task_id=' . $task->getID() . '&group_id=' . $group_id . '&group_project_id=' .$group_project_id)
. '">' . ($type == 'begin' ?
sprintf(_('Task %d begins'), $task->getID()) :
sprintf(_('Task %d ends'), $task->getID()) )
}
if (isset ($sys_noforcetype) && $sys_noforcetype) {
- require_once('../env.inc.php');
- require_once('pre.php');
$project = &group_get_object($group_id);
include('project_home.php');
} else {
* @param string The user's realname
*/
function createLinkToUserHome($user_name, $realname) {
- return '<a href="'.$GLOBALS['sys_urlprefix'].'/users/'.$user_name.'/">'.$realname.'</a>';
+ return util_make_link ('/users/'.$user_name.'/',$realname);
}
/**
<title><?php echo $params['title']; ?></title>
<link rel="alternate"
title="<?php echo $GLOBALS['sys_name']; ?> - Project News Highlights RSS"
- href="<?php echo $GLOBALS['sys_urlprefix']; ?>/export/rss_sfnews.php"
+ href="<?php echo util_make_url ('/export/rss_sfnews.php'); ?>"
type="application/rss+xml" />
<link rel="alternate"
title="<?php echo $GLOBALS['sys_name']; ?> - Project News Highlights RSS 2.0"
- href="<?php echo $GLOBALS['sys_urlprefix']; ?>/export/rss20_news.php"
+ href="<?php echo util_make_url ('/export/rss20_news.php'); ?>"
type="application/rss+xml" />
<link rel="alternate"
title="<?php echo $GLOBALS['sys_name']; ?> - New Projects RSS"
- href="<?php echo $GLOBALS['sys_urlprefix']; ?>/export/rss_sfprojects.php"
+ href="<?php echo util_make_url ('/export/rss_sfprojects.php'); ?>"
type="application/rss+xml" />
<?php if (isset($GLOBALS['group_id'])) {
- $activity = '<link rel="alternate" title="'.$GLOBALS['sys_name'].' - New Activity RSS" href="'.$GLOBALS['sys_urlprefix'].'/export/rss20_activity.php?group_id='.$GLOBALS['group_id'].'" type="application/rss+xml"/>';
+ $activity = '<link rel="alternate" title="'.$GLOBALS['sys_name'].' - New Activity RSS" href="'.
+ util_make_url ('/export/rss20_activity.php?group_id='.$GLOBALS['group_id']).
+ '" type="application/rss+xml"/>';
echo $activity;
}
?>
$theme_cssfile=$GLOBALS['sys_themeroot'].$GLOBALS['sys_theme'].'/css/'.$GLOBALS['sys_theme'].'.css';
if (file_exists($theme_cssfile)){
echo '
-<link rel="stylesheet" type="text/css" href="'.$GLOBALS['sys_urlprefix'].'/themes/'.$GLOBALS['sys_theme'].'/css/'.$GLOBALS['sys_theme'].'.css"/>';
+<link rel="stylesheet" type="text/css" href="'.util_make_url ('/themes/'.$GLOBALS['sys_theme'].'/css/'.$GLOBALS['sys_theme'].'.css').'"/>';
}
?>
<div id="container">
<div id="logo">
-<h1><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/">Goto GForge</a></h1>
-<!--<a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/"><img src="<?php echo $GLOBALS['sys_urlprefix']; ?>/themes/gforge-simple-theme/images/logo.png" border="0" margin="0" padding="0" valign="top"/></a>-->
+<h1><?php echo util_make_link ('/',_('Goto GForge')); ?></h1>
</div>
<div id="util"><?php if (session_loggedin()) {
- ?> <a
- href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/logout.php"><?php echo _('Log Out'); ?></a><br />
-<a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/"><?php echo _('My Account'); ?></a><br />
-
+ echo util_make_link ('/account/logout.php',_('Log Out')); ?><br />
+<?php echo util_make_link ('/account/',_('My Account')); ?><br />
<?php
} else {
- ?> <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/login.php"><?php echo _('Log In'); ?></a><br />
-<a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/register.php"><?php echo _('New Account'); ?></a>
+ echo util_make_link ('/account/login.php',_('Log In')); ?><br />
+<?php echo util_make_link ('/account/register.php',_('New Account')); ?>
<?php
}
?></div>
<?php
global $sys_show_source;
if ($sys_show_source) {
- print '<a class="showsource" href="'.$GLOBALS['sys_urlprefix'].'/source.php?file=' . getStringFromServer('SCRIPT_NAME') . '"> '._('Show source').' </a>';
+ echo util_make_link ('/source.php?file='.getStringFromServer('SCRIPT_NAME'),_('Show source'),array('class'=>'showsource'));
}
?>
if (isset($group_id)&& $group_id) {
- print '
-
- <a class="lnkutility" href="'.$GLOBALS['sys_urlprefix'].'/search/advanced_search.php?group_id='.$group_id.'"> '._('Advanced search').'</a>';
+ echo util_make_link ('/search/advanced_search.php?group_id='.$group_id,_('Advanced search'),array('class'=>'lnkutility'));
}
print '</form>';
}
function createUnderSections($sectionsArray) {
+ global $group_subsection_names;
$countLines = 0;
foreach ($sectionsArray as $section) {
if(is_array($section)) {
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?php echo $params['title']; ?></title>
- <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['sys_urlprefix']; ?>/themes/lite/css/theme.css" />
+ <link rel="stylesheet" type="text/css" href="<?php echo util_make_url ('/themes/lite/css/theme.css'); ?>" />
<script type="text/javascript">
<!--
function help_window(helpurl) {
<table border="0px" width="100%" cellspacing="0px" cellpadding="0px" class="content">
<tr>
- <td><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/"><img src="/themes/lite/images/gforge_logo.png" border="0" alt="Gforge Logo" width="200px" /></a></td>
+ <td><a href="<?php echo util_make_url ('/'); ?>"><img src="/themes/lite/images/gforge_logo.png" border="0" alt="Gforge Logo" width="200px" /></a></td>
<td align="right"><?php echo $this->searchBox(); ?></td>
<td align="right"><?php
if (session_loggedin()) {
- ?>
- <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/logout.php">Logout</a><br />
- <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/">My Account</a>
- <?php
- } else {
- ?>
- <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/login.php">Login</a><br />
- <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/register.php">New Account</a>
- <?php
+ echo util_make_link ('/account/logout.php',_('Logout')); ?><br /><?php
+ echo util_make_link ('/account/',_('My Account')); ?><br /><?php
+ } else {
+ echo util_make_link ('/account/login.php',_('Login')); ?><br /><?php
+ echo util_make_link ('/account/register.php',_('New Account')); ?><br /><?php
}
?></td>
<td style="text-align:right"><?php
if (session_loggedin()) {
?>
- <b><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/logout.php"><?php echo _('Log Out'); ?></a></b><br />
- <b><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/"><?php echo _('My Account'); ?></a></b>
+ <b><?php echo util_make_link ('/account/logout.php',_('Log Out')); ?></b><br />
+ <b><?php echo util_make_link ('/account/',_('My Account')); ?></b>
<?php
} else {
?>
- <b><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/login.php"><?php echo _('Log In'); ?></a></b><br />
- <b><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/register.php"><?php echo _('New Account'); ?></a></b>
+ <b><?php echo util_make_link ('/account/login.php',_('Log In')); ?></b><br />
+ <b><?php echo util_make_link ('/account/register.php',_('New Account')); ?></b>
<?php
}
<body>
<p align=left>
- <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/"><h2>GForge</h2></a>
+ <?php echo util_make_link ('/',_('GForge')); ?></h2></a>
</p>
<p align=right>
<?php
if (session_loggedin()) {
?>
- <b><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/logout.php"><?php echo _('Log Out'); ?></a></b>
- <b><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/"><?php echo _('My Account'); ?></a></b>
+ <b><?php echo util_make_link ('/account/logout.php',_('Log Out')); ?></b>
+ <b><?php echo util_make_link ('/account/',_('My Account')); ?></b>
<?php
} else {
?>
- <b><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/login.php"><?php echo _('Log In'); ?></a></b>
- <b><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/register.php"><?php echo _('New Account'); ?></a></b>
+ <b><?php echo util_make_link ('/account/login.php',_('Log In')); ?></b>
+ <b><?php echo util_make_link ('/account/register.php',_('New Account')); ?></b>
<?php
}
?>
<?php
global $sys_show_source;
if ($sys_show_source) {
- print '<a class="showsource" href="'.$GLOBALS['sys_urlprefix'].'/source.php?file=' . getStringFromServer('SCRIPT_NAME') . '">Show Source</a>';
+ echo util_make_link ('/source.php?file='.getStringFromServer('SCRIPT_NAME'),_('Show Source'),array('class'=>'showsource'));
}
?>
</body>