/**
     * getRows - get the html output for result rows
     *
     * @return string html output
     */
    function getRows()
    {
        $rowsCount = $this->searchQuery->getRowsCount();
        $result =& $this->searchQuery->getResult();
        $dateFormat = _('Y-m-d H:i');
        $group = group_get_object($this->groupId);
        $group_name = $group->getUnixName();
        $data = unserialize(db_result($result, 0, 'versiondata'));
        $return = '';
        for ($i = 0; $i < $rowsCount; $i++) {
            $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>' . '<td>';
            $return .= util_make_link('/wiki/g/' . $group_name . '/' . db_result($result, $i, 'pagename'), html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'pagename'));
            $return .= '</td>
				<td width="15%">' . $data['author'] . '</td>
				<td width="15%">' . date($dateFormat, db_result($result, $i, 'mtime')) . '</td></tr>';
        }
        return $return;
    }
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $rowColor = 0;
     $lastPackage = null;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentPackage = db_result($result, $i, 'package_name');
         if ($lastPackage != $currentPackage) {
             $return .= '<tr><td colspan="4">' . $currentPackage . '</td></tr>';
             $lastPackage = $currentPackage;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . '<td width="5%">&nbsp;</td>' . '<td>' . util_make_link('/frs/shownotes.php?release_id=' . db_result($result, $i, 'release_id'), db_result($result, $i, 'release_name')) . '</td>' . '<td width="15%">' . db_result($result, $i, 'realname') . '</td>' . '<td width="15%">' . date($dateFormat, db_result($result, $i, 'release_date')) . '</td></tr>';
         $rowColor++;
     }
     return $return;
 }
Beispiel #3
0
/**
 * snippet_mainpage() - Show the main page for the snippet library.
 */
function snippet_mainpage()
{
    global $SCRIPT_LANGUAGE, $SCRIPT_CATEGORY;
    $return = _('<p>The purpose of this archive is to let you share your code snippets, scripts,	and functions with the Open Source Software Community.</p><p>You can create a "new snippet", then post additional versions of that snippet quickly and easily.</p><p>Once you have snippets posted, you can then create a "Package" of snippets. That package can contain multiple, specific versions of other snippets.</p><p>&nbsp;</p><h3>Browse Snippets</h3>	<p>You can browse the snippet library quickly:</p>') . '
	<br />
	<p/>
	<table width="100%" border="0">
	<tr><td>
	</td></tr>
	<tr><td>
	<strong>' . _('Browse by Language') . ':</strong>
	<ul>';
    $existing_snippets = create_snippet_hash("SELECT language, count(*) as count from snippet group by language", "language");
    for ($i = 1; $i < count($SCRIPT_LANGUAGE); $i++) {
        $return .= '<li>' . util_make_link('/snippet/browse.php?by=lang&amp;lang=' . $i, $SCRIPT_LANGUAGE[$i]) . ' (';
        // Remove warning
        if (@$existing_snippets[$i]) {
            $return .= $existing_snippets[$i] . ')</li>';
        } else {
            $return .= '0)</li>';
        }
    }
    $return .= '</ul></td><td>
	<strong>' . _('Browse by Category') . ':</strong>
	<ul>';
    $existing_categories = create_snippet_hash("SELECT category, count(*) as count from snippet group by category", "category");
    for ($i = 1; $i < count($SCRIPT_CATEGORY); $i++) {
        // Remove warning
        @($return .= '<li>' . util_make_link('/snippet/browse.php?by=cat&amp;cat=' . $i, $SCRIPT_CATEGORY[$i]) . ' (');
        // Remove warning
        if (@$existing_categories[$i]) {
            $return .= $existing_categories[$i] . ')</li>';
        } else {
            $return .= '0)</li>';
        }
    }
    $return .= '</ul></td> </tr> </table>';
    return $return;
}
    /**
     * bbcodeStyleInitialize() - 
     *
     * Initialize all the bbcode tags and how they should be displayed
     * @param	
     *
     */
    function bbcodeStyleInitialize()
    {
        $this->bbcode_tpl = array('b_open' => '<span style="font-weight:bold">', 'b_close' => '</span>', 'i_open' => '<span style="font-style:italic">', 'i_close' => '</span>', 'u_open' => '<span style="text-decoration:underline">', 'u_close' => '</span>', 'color_open' => '<span style="color: \\1">', 'color_close' => '</span>', 'size_open' => '<span style="font-size: \\1px; line-height: normal">', 'size_close' => '</span>', 'img' => '<img src="\\1" border="0" />', 'ulist_open' => '<ul>', 'ulist_close' => '</ul>', 'olist_open' => '<ol type="\\1">', 'olist_close' => '</ol>', 'listitem' => '<li>', 'code_open' => '<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
													<tr> 
												 		<td><span style="font-weight:bold"><b>{L_CODE}:</b></span></td>
													</tr>
													<tr>
	 													<td>', 'code_close' => '		</td>
													</tr>
												</table>', 'quote_open' => '<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
													<tr> 
														  <td><span style="font-weight:bold">{L_QUOTE}:</span></td>
														</tr>
														<tr>
														  <td>', 'quote_close' => '		</td>
													</tr>
												</table>', 'quote_username_open' => '<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
															<tr> 
	  															<td><b>\\1 {L_WROTE}:</b></td>
															</tr>
															<tr>
																  <td>', 'email' => '<a href="mailto:\\1">\\1</a>', 'url1' => '<a href="\\1\\2" target="_blank">\\1\\2</a>', 'url2' => '<a href="http://\\1" target="_blank">\\1</a>', 'url3' => '<a href="\\1\\2" target="_blank">\\3</a>', 'url4' => '<a href="http://\\1" target="_blank">\\2</a>', 'urltask' => util_make_link('/pm/task.php?func=detailtask&project_task_id=\\3&group_id=\\1&group_project_id=\\2', '\\4'), 'urlartifact' => util_make_link('/tracker/index.php?func=detail&aid=\\1', 'Artifact\\1'));
    }
Beispiel #5
0
    /**
     *	header() - "steel theme" top of page
     *
     * @param	array	Header parameters array
     */
    function header($params)
    {
        if (!$params['title']) {
            $params['title'] = "FusionForge";
        } else {
            $params['title'] = "FusionForge: " . $params['title'];
        }
        echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
        ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
        echo _('en');
        ?>
" lang="<?php 
        echo _('en');
        ?>
">
  <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 util_make_url('/themes/lite/css/theme.css');
        ?>
" />
	<script type="text/javascript">
	<!--
	function help_window(helpurl) {
		HelpWin = window.open( '<?php 
        echo session_issecure() ? 'https://' . $GLOBALS['sys_default_domain'] : 'http://' . $GLOBALS['sys_default_domain'];
        ?>
' + helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
	}
	// -->
	<?php 
        plugin_hook("javascript", false);
        ?>
	</script>
<?php 
        if (_('default_font') != 'default_font') {
            $site_fonts = _('default_font');
        } else {
            $site_fonts = 'helvetica';
        }
        ?>

<style type="text/css">
	<!--
	OL,UL,P,BODY,TD,TR,TH,FORM { font-family: <?php 
        echo $site_fonts;
        ?>
; font-size:<?php 
        echo $this->FONTSIZE;
        ?>
; color: <?php 
        echo $this->FONTCOLOR_CONTENT;
        ?>
; }

	H1 { font-size: x-large; font-family: <?php 
        echo $site_fonts;
        ?>
; }
	H2 { font-size: large; font-family: <?php 
        echo $site_fonts;
        ?>
; }
	H3 { font-size: medium; font-family: <?php 
        echo $site_fonts;
        ?>
; }
	H4 { font-size: small; font-family: <?php 
        echo $site_fonts;
        ?>
; }
	H5 { font-size: x-small; font-family: <?php 
        echo $site_fonts;
        ?>
; }
	H6 { font-size: xx-small; font-family: <?php 
        echo $site_fonts;
        ?>
; }

	PRE,TT { font-family: courier,sans-serif }
	-->
</style>

</head>

<body>
<div class="header">
<table border="0px" width="100%" cellspacing="0px" cellpadding="0px" class="content">

	<tr>
		<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()) {
            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>&nbsp;&nbsp;</td>
	</tr>

</table>
</div>
<div class="menu">

<?php 
        echo $this->mainMenu($params);
        ?>

		<!-- Inner Tabs / Shell -->
<?php 
        if (isset($params['group']) && $params['group']) {
            ?>
				<div class="union_menu" >
				</div>	
				<?php 
            echo $this->projectTabs($params['toptab'], $params['group']);
            ?>
			<?php 
        }
        ?>
</div>
<div class="content">
	<?php 
    }
Beispiel #6
0
function news_foundry_latest($group_id = 0, $limit = 5, $show_summaries = true)
{
    /*
    	Show a the latest news for a portal
    */
    $sql = "SELECT groups.group_name,groups.unix_group_name,groups.group_id,\n\t\tusers.user_name,users.realname,news_bytes.forum_id,\n\t\tnews_bytes.summary,news_bytes.post_date,news_bytes.details \n\t\tFROM users,news_bytes,groups,foundry_news \n\t\tWHERE foundry_news.foundry_id='{$group_id}' \n\t\tAND users.user_id=news_bytes.submitted_by \n\t\tAND foundry_news.news_id=news_bytes.id \n\t\tAND news_bytes.group_id=groups.group_id \n\t\tAND foundry_news.is_approved=1 \n\t\tORDER BY news_bytes.post_date DESC";
    $result = db_query($sql, $limit);
    $rows = db_numrows($result);
    if (!$result || $rows < 1) {
        $return .= '<h3>' . _('No News Items Found') . '</h3>';
        $return .= db_error();
    } else {
        for ($i = 0; $i < $rows; $i++) {
            if ($show_summaries) {
                //get the first paragraph of the story
                $arr = explode("\n", db_result($result, $i, 'details'));
                if (isset($arr[1]) && isset($arr[2]) && strlen($arr[0]) < 200 && strlen($arr[1] . $arr[2]) < 300 && strlen($arr[2]) > 5) {
                    $summ_txt = util_make_links($arr[0] . '<br />' . $arr[1] . '<br />' . $arr[2]);
                } else {
                    $summ_txt = util_make_links($arr[0]);
                }
                //show the project name
                $proj_name = ' &nbsp; - &nbsp; ' . util_make_link_g(strtolower(db_result($result, $i, 'unix_group_name')), db_result($result, $i, 'group_id'), db_result($result, $i, 'group_name'));
            } else {
                $proj_name = '';
                $summ_txt = '';
            }
            $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" />';
        }
    }
    return $return;
}
Beispiel #7
0
                echo '
			<td>' . GetTime(time() - db_result($messages, 0, 'adddate')) . '</td>';
            } else {
                echo '
			<td>' . GetTime(time() - db_result($artifacts, $m, 'open_date')) . '</td>';
            }
            echo '
		</tr>';
        }
    }
    $task_group = db_query("SELECT ptv.*,g.group_name,pgl.project_name\n                        FROM project_task_vw ptv,\n                                project_assigned_to pat,\n                                groups g,\n                                project_group_list pgl\n                        WHERE ptv.project_task_id=pat.project_task_id\n                                AND pgl.group_id=" . $group_id . "\n\t\t\t\tAND g.group_id=" . $group_id . "\n                                AND pgl.group_project_id=ptv.group_project_id\n                                AND ptv.status_id=1\n                                AND pat.assigned_to_id='" . $row_memb['user_id'] . "'\n                        ORDER BY group_name,project_name");
    while ($task_type = db_fetch_array($task_group)) {
        if ($task_type['percent_complete'] != 100) {
            echo '
		<tr class="priority' . $task_type['priority'] . '">
			<td>' . util_make_link('/pm/task.php?func=detailtask&amp;project_task_id=' . $task_type['project_task_id'] . '&amp;group_id=' . $group_id . '&amp;group_project_id=' . $task_type['group_project_id'], _('Task') . ' ' . $task_type['project_task_id']) . '
			</td>
			<td>' . $task_type['summary'] . '
			</td>
			<td>' . GetTime(time() - $task_type['start_date']) . '
			</td>
			<td>' . $task_type['percent_complete'] . '% done' . '
			</td>
		</tr>';
        }
    }
    echo '
		<tr>
			<td><br /></td>
		</tr>';
}
                handle_add_exit();
            }
            /*
            	create the snippet version
            */
            $sql = "INSERT INTO snippet_package_item (snippet_package_version_id,snippet_version_id) " . "VALUES ('{$snippet_package_version_id}','{$snippet_version_id}')";
            $result = db_query($sql);
            if (!$result) {
                $feedback .= _('ERROR DOING SNIPPET VERSION INSERT!');
                echo db_error();
            } else {
                $feedback .= _('Snippet Version Added Successfully.');
            }
        } else {
            echo '<h1>' . _('Error - Go back and fill in all the information') . '</h1>';
            echo util_make_link('/snippet/add_snippet_to_package.php?snippet_package_version_id=' . $snippet_package_version_id, _('Back To Add Page'));
            handle_add_exit();
        }
    }
    $result = db_query("SELECT snippet_package.name,snippet_package_version.version " . "FROM snippet_package,snippet_package_version " . "WHERE snippet_package.snippet_package_id=snippet_package_version.snippet_package_id " . "AND snippet_package_version.snippet_package_version_id='{$snippet_package_version_id}'");
    ?>
	<p>
	<strong><?php 
    echo _('Package:');
    ?>
</strong><br />
	<?php 
    echo db_result($result, 0, 'name') . ' -  ' . db_result($result, 0, 'version');
    ?>
</p>
	<p><?php 
    function CallHook($hookname, $params)
    {
        global $use_quota_managementplugin, $G_SESSION, $HTML;
        if ($hookname == "usermenu") {
            $text = $this->text;
            // this is what shows in the tab
            if ($G_SESSION->usesPlugin("quota_management")) {
                $param = '?type=user&id=' . $G_SESSION->getId() . "&pluginname=" . $this->name;
                // we indicate the part we´re calling is the user one
                echo ' | ' . $HTML->PrintSubMenu(array($text), array('/plugins/quota_management/index.php' . $param));
            }
        } elseif ($hookname == "groupmenu") {
            $group_id = $params['group'];
            $project =& group_get_object($group_id);
            if (!$project || !is_object($project)) {
                return;
            }
            if ($project->isError()) {
                return;
            }
            if (!$project->isProject()) {
                return;
            }
            if ($project->usesPlugin($this->name)) {
                $params['TITLES'][] = $this->text;
                $params['DIRS'][] = '/plugins/quota_management/index.php?type=group&id=' . $group_id . "&pluginname=" . $this->name;
                // we indicate the part we´re calling is the project one
            } else {
                //	$params['TITLES'][]=$this->text." is [Off]";
            }
            $params['toptab'] == $this->name ? $params['selected'] = count($params['TITLES']) - 1 : '';
        } elseif ($hookname == "groupisactivecheckbox") {
            //Check if the group is active
        } elseif ($hookname == "groupisactivecheckboxpost") {
            // this code actually activates/deactivates the plugin after the form was submitted in the project edit public info page
            $group_id = $params['group'];
            $group =& group_get_object($group_id);
            $use_quota_managementplugin = getStringFromRequest('use_quota_managementplugin');
            if ($use_quota_managementplugin == 1) {
                $group->setPluginUse($this->name);
            } else {
                $group->setPluginUse($this->name, false);
            }
        } elseif ($hookname == "userisactivecheckbox") {
            //check if user is active
            // this code creates the checkbox in the user account manteinance page to activate/deactivate the plugin
            $user = $params['user'];
            echo "<tr>";
            echo "<td>";
            echo ' <input type="CHECKBOX" name="use_quota_managementplugin" value="1" ';
            // CHECKED OR UNCHECKED?
            if ($user->usesPlugin($this->name)) {
                echo "CHECKED";
            }
            echo ">    Use " . $this->text . " Plugin";
            echo "</td>";
            echo "</tr>";
        } elseif ($hookname == "userisactivecheckboxpost") {
            // this code actually activates/deactivates the plugin after the form was submitted in the user account manteinance page
            $user = $params['user'];
            $use_quota_managementplugin = getStringFromRequest('use_quota_managementplugin');
            if ($use_quota_managementplugin == 1) {
                $user->setPluginUse($this->name);
            } else {
                $user->setPluginUse($this->name, false);
            }
            echo "<tr>";
            echo "<td>";
            echo ' <input type="CHECKBOX" name="use_quota_managementplugin" value="1" ';
            // CHECKED OR UNCHECKED?
            if ($user->usesPlugin($this->name)) {
                echo "CHECKED";
            }
            echo ">    Use " . $this->text . " Plugin";
            echo "</td>";
            echo "</tr>";
        } elseif ($hookname == "user_personal_links") {
            // this displays the link in the user´s profile page to it´s personal quota_management (if you want other sto access it, youll have to change the permissions in the index.php
            $userid = $params['user_id'];
            $user = user_get_object($userid);
            $text = $params['text'];
            //check if the user has the plugin activated
            if ($user->usesPlugin($this->name)) {
                echo '	<p>';
                echo util_make_link("/plugins/quota_management/index.php?id={$userid}&type=user&pluginname=" . $this->name, _('View Personal quota_management'));
                echo '</p>';
            }
        } elseif ($hookname == "project_admin_plugins") {
            // this displays the link in the project admin options page to it´s  quota_management administration
            $group_id = $params['group_id'];
            $group =& group_get_object($group_id);
            if ($group->usesPlugin($this->name)) {
                echo util_make_link('/plugins/quota_management/index.php?id=' . $group->getID() . '&type=admin&pluginname=' . $this->name, _('View the quota_management Administration'));
                echo '<br />';
            }
        } elseif ($hookname == "blahblahblah") {
            // ...
        } elseif ($hookname == "site_admin_option_hook") {
            // www/admin/index.php line 167
            // ...
            ?>
			<li><?php 
            echo util_make_link("/plugins/quota_management/quota.php", _('Ressources usage and quota'));
            ?>
</li>
			<?php 
        } elseif ($hookname == "quota_label_project_admin") {
            // www/project/admin/project_admin_utils.php line 80
            $labels[] = _('Quota');
        } elseif ($hookname == "quota_link_project_admin") {
            // www/project/admin/project_admin_utils.php line 99
            $group_id = $params['group'];
            $links[] = '/plugins/quota_management/quota.php?group_id=' . $group_id;
        }
    }
Beispiel #10
0
<input type="hidden" name="add_artifact_id[]" value="<?php 
echo $related_artifact_id;
?>
" />

<table border="0" width="100%">

	<tr>
		<td>
		<strong><?php 
echo _('Category');
?>
</strong><br />
		<?php 
echo $pg->categoryBox('category_id');
echo util_make_link('/pm/admin/?group_id=' . $group_id . '&amp;add_cat=1&amp;group_project_id=' . $group_project_id, '(' . _('admin') . ')');
?>
		</td>

		
		<input type="submit" value="<?php 
echo _('Submit');
?>
" name="submit" />
		</td>
	</tr>

	<tr>
		<td>
			<strong><?php 
echo _('Percent Complete');
Beispiel #11
0
    $title[] = _('Count');
    echo $GLOBALS['HTML']->listTableTop($title);
    while ($row_db = db_fetch_array($res_db)) {
        print '<tr><td style="text-align:center"><a href="' . getStringFromServer('PHP_SELF') . '?displaydb=1&dbstate=' . $row_db['stateid'] . '">' . $row_db['statename'] . '</a></td><td style="text-align:center">' . $row_db['count'] . '</td></tr>';
    }
    echo $GLOBALS['HTML']->listTableBottom();
} else {
    echo '<p>' . _('No databases defined') . '</p>';
}
if ($displaydb) {
    $res_db = db_query("\n\t\tSELECT statename\n\t\tFROM prdb_states\n\t\tWHERE stateid=" . $dbstate . "\n\t");
    $row_db = db_fetch_array($res_db);
    print '<hr /><h3>' . _('Displaying Databases of Type:') . $row_db['statename'] . ' </h3><ul>';
    $res_db = db_query("\n\t\tSELECT *\n\t\tFROM prdb_dbs\n\t\tWHERE state=" . $dbstate . "\n\t\tORDER BY dbname\n\t");
    while ($row_db = db_fetch_array($res_db)) {
        print '<li>' . util_make_link('/project/admin/database.php?group_id=' . $row_db['group_id'], $row_db['dbname']) . '</li>';
    }
    print "</ul>";
}
?>
<hr />

<h3><?php 
echo _('Add an already active database');
?>
</h3>

<form name="madd" method="post" action="<?php 
echo getStringFromServer('PHP_SELF');
?>
">
Beispiel #12
0
    ?>
</a><br />
<?php 
}
if ($sys_use_frs) {
    ?>
	<?php 
    echo util_make_link('/frs/admin/?group_id=' . $group->getID(), _('FRS admin'));
    ?>
</a><br />
<?php 
}
if ($sys_use_scm) {
    ?>
	<?php 
    echo util_make_link('/scm/admin/?group_id=' . $group->getID(), _('SCM admin'));
    ?>
</a><br />
<?php 
}
$hook_params = array();
$hook_params['group_id'] = $group_id;
plugin_hook("project_admin_plugins", $hook_params);
echo $HTML->boxBottom();
?>
		</td>
		<td>&nbsp;</td>
		<td width="50%">

<?php 
echo $HTML->boxTop(_('Group Members'));
Beispiel #13
0
    function aff_tree($tree, $lvl)
    {
        global $project_name;
        echo "<br/>";
        $arbre = "";
        $cpt_pere = 0;
        while (list($key, $sons) = each($tree)) {
            //echo $key . "<br/>";
            //we build a array with id of father and son.
            //If no father --> 0
            // Really don't know why there is a warning there, and added @
            if (@(!$arbre[$key]) != 0) {
                $arbre[$key] = 0;
            }
            $cpt_pere = $key;
            foreach ($sons as $son) {
                //echo "&nbsp;" . $son . "<br/>";
                $arbre[$son] = $cpt_pere;
            }
        }
        echo '<table ><tr><td>';
        ?>
			<script type="text/javascript">
				<!--
			//add files dtress.css, dtree.js et du dossier img
				d = new dTree('d');	
				d.add(0,-1,'<?php 
        echo _('Project Tree');
        ?>
');
				<?php 
        reset($arbre);
        //construction automatique de l'arbre format : (num_fils, num_pere,nom,nom_unix)
        while (list($key2, $sons2) = each($arbre)) {
            print "d.add(" . $key2 . "," . $sons2 . ",'" . $project_name[$key2][0] . "','" . util_make_link("/projects/" . $project_name[$key2][1] . "/") . "');\n";
        }
        ?>
		
				document.write(d);
		
				
			</script>
			<?php 
        echo '</td></tr></table>';
    }
Beispiel #14
0
 -->
	</td>

	<td><strong><?php 
    echo _('Category');
    ?>
</strong><?php 
    echo utils_requiredField();
    ?>
<br />
		<?php 
    echo html_build_select_box_from_array($SCRIPT_CATEGORY, 'category');
    ?>
                <br />
                <!-- FIXME: Where should this link go to? <?php 
    echo util_make_link('/support/?func=addsupport&amp;group_id=1', _('Suggest a Category'));
    ?>
 -->
	</td>
	</tr>

	<tr><td colspan="2"><strong><?php 
    echo _('Version');
    ?>
:</strong><?php 
    echo utils_requiredField();
    ?>
<br />
		<input type="text" name="version" size="10" maxlength="15" />
	</td></tr>
Beispiel #15
0
        $title = sprintf(_('Top Weekly Project Pageviews at *.%1$s (from impressions of %2$s logo)'), $GLOBALS['sys_default_domain'], $GLOBALS['sys_name']);
        $column1 = _('Pageviews');
    } else {
        if ($type == 'forumposts_week') {
            $res_top = $stats->getTopMessagesPosted();
            $title = _('Top Forum Post Counts');
            $column1 = _('Posts');
        } else {
            $res_top = $stats->getTopDownloads();
            $title = _('Top Downloads');
            $column1 = _('Downloads');
        }
    }
}
$HTML->header(array('title' => $title));
print '<p>' . util_make_link('/top/', '[' . _('View Other Top Categories') . ']');
$arr = array(_('Rank'), _('Project name'), "{$column1}");
echo $HTML->listTableTop($arr);
echo db_error();
$display_rank = 0;
$i = 0;
while ($row_top = db_fetch_array($res_top)) {
    $i++;
    if ($row_top["items"] == 0) {
        continue;
    }
    $display_rank++;
    print '<tr ' . $HTML->boxGetAltRowStyle($i) . '><td>&nbsp;&nbsp;' . $display_rank . '</td><td>' . util_make_link_g(strtolower($row_top['unix_group_name']), @$row_top['group_id'], stripslashes($row_top['group_name'])) . '</td><td align="right">' . $row_top['items'] . '&nbsp;&nbsp;&nbsp;</td>' . '<td align="right">';
    print '&nbsp;&nbsp;&nbsp;</td></tr>
';
}
Beispiel #16
0
?>
</h3>

<?php 
/*
	Iterate and show groups this user is in
*/
$res_cat = db_query("\n\tSELECT groups.unix_group_name, groups.group_name AS group_name, \n\t\tgroups.group_id AS group_id, \n\t\tuser_group.admin_flags AS admin_flags\n\tFROM groups,user_group\n\tWHERE user_group.user_id={$user_id}\n\tAND groups.group_id=user_group.group_id\n");
$title = array();
$title[] = _('Name');
$title[] = _('Unix name');
$title[] = _('Operations');
echo $GLOBALS['HTML']->listTableTop($title);
$i = 0;
while ($row_cat = db_fetch_array($res_cat)) {
    $row_cat['group_name'] = htmlspecialchars($row_cat['group_name']);
    print '
		<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i++) . '>
		<td>' . $row_cat['group_name'] . '</td>
		<td>' . $row_cat['unix_group_name'] . '</td>
		<td width="40%">' . util_make_link('/project/admin/?group_id=' . $row_cat['group_id'], _('[Project Admin]')) . '</td>
		</tr>
	';
}
echo $GLOBALS['HTML']->listTableBottom();
echo '<br />';
site_admin_footer(array());
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
Beispiel #17
0
    $i++;
    print '
	<tr ' . $HTML->boxGetAltRowStyle($i) . '>
		<td>&nbsp;&nbsp;' . $i . '
		</td>
		<td>' . util_make_link_g(strtolower($row_top['unix_group_name']), $row_top['group_id'], $row_top['group_name']) . '
		</td>
		<td align="right">' . substr($row_top['percentile'], 0, 5) . '%</td>
	</tr>';
}
if ($i < $rows) {
    if ($offset > 0) {
        print '
	<tr class="tablegetmore">
		<td>' . util_make_link('/top/mostactive.php?type=' . $type . '&offset=' . ($offset - $LIMIT), '<strong><-- ' . _('More') . '</strong>');
    } else {
        print '&nbsp;';
    }
    print '
		</td>
		<td>&nbsp;</td>
		<td align="RIGHT">' . util_make_link('/top/mostactive.php?type=' . $type . '&offset=' . ($offset + $LIMIT), '<strong>' . _('More') . ' --></strong>') . '
		</td>
	</tr>';
}
echo $HTML->listTableBottom();
$HTML->footer(array());
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
 function CallHook($hookname, $params)
 {
     global $use_projects_hierarchyplugin, $G_SESSION, $HTML;
     if ($hookname == "usermenu") {
         $text = $this->text;
         // this is what shows in the tab
         if ($G_SESSION->usesPlugin("projects_hierarchy")) {
             $param = '?type=user&id=' . $G_SESSION->getId() . "&pluginname=" . $this->name;
             // we indicate the part we're calling is the user one
             echo ' | ' . $HTML->PrintSubMenu(array($text), array('/plugins/projects_hierarchy/index.php' . $param));
         }
     } elseif ($hookname == "groupmenu") {
         $group_id = $params['group'];
         $project =& group_get_object($group_id);
         if (!$project || !is_object($project)) {
             return;
         }
         if ($project->isError()) {
             return;
         }
         if (!$project->isProject()) {
             return;
         }
         if ($project->usesPlugin($this->name)) {
             $params['TITLES'][] = $this->text;
             $params['DIRS'][] = '/plugins/projects_hierarchy/index.php?type=group&id=' . $group_id . "&pluginname=" . $this->name;
             // we indicate the part we're calling is the project one
         } else {
             //$params['TITLES'][]=$this->text." is [Off]";
         }
         $params['toptab'] == $this->name ? $params['selected'] = count($params['TITLES']) - 1 : '';
     } elseif ($hookname == "groupisactivecheckbox") {
         //Check if the group is active
     } elseif ($hookname == "groupisactivecheckboxpost") {
         // this code actually activates/deactivates the plugin after the form was submitted in the project edit public info page
         $group_id = $params['group'];
         $group =& group_get_object($group_id);
         $use_projects_hierarchyplugin = getStringFromRequest('use_projects_hierarchyplugin');
         if ($use_projects_hierarchyplugin == 1) {
             $group->setPluginUse($this->name);
         } else {
             $group->setPluginUse($this->name, false);
         }
     } elseif ($hookname == "userisactivecheckbox") {
         //check if user is active
         // this code creates the checkbox in the user account manteinance page to activate/deactivate the plugin
     } elseif ($hookname == "userisactivecheckboxpost") {
         // this code actually activates/deactivates the plugin after the form was submitted in the user account manteinance page
         $user = $params['user'];
         $use_projects_hierarchyplugin = getStringFromRequest('use_projects_hierarchyplugin');
         if ($use_projects_hierarchyplugin == 1) {
             $user->setPluginUse($this->name);
         } else {
             $user->setPluginUse($this->name, false);
         }
         echo "<tr>";
         echo "<td>";
         echo ' <input type="CHECKBOX" name="use_projects_hierarchyplugin" value="1" ';
         // CHECKED OR UNCHECKED?
         if ($user->usesPlugin($this->name)) {
             echo "CHECKED";
         }
         echo ">    Use " . $this->text . " Plugin";
         echo "</td>";
         echo "</tr>";
     } elseif ($hookname == "user_personal_links") {
         // this displays the link in the user's profile page to it's personal projects_hierarchy (if you want other sto access it, youll have to change the permissions in the index.php
         $userid = $params['user_id'];
         $user = user_get_object($userid);
         $text = $params['text'];
         //check if the user has the plugin activated
         if ($user->usesPlugin($this->name)) {
             echo '	<p>';
             echo util_make_link("/plugins/projects_hierarchy/index.php?id={$userid}&type=user&pluginname=" . $this->name, _('View Personal projects_hierarchy'));
             echo '</p>';
         }
     } elseif ($hookname == "project_admin_plugins") {
         // this displays the link in the project admin options page to it's  projects_hierarchy administration
         $group_id = $params['group_id'];
         $group =& group_get_object($group_id);
         if ($group->usesPlugin($this->name)) {
             echo util_make_link("/plugins/projects_hierarchy/index.php?id=" . $group->getID() . '&type=admin&pluginname=' . $this->name, _('View the projects_hierarchy Administration'));
             echo '<br />';
         }
     } elseif ($hookname == "tree") {
         header('Location: ../plugins/projects_hierarchy/softwaremap.php');
     } elseif ($hookname == "project_home_link") {
         // ############################## Display link
         $group_id = $params;
         echo $HTML->boxTop(_('Linked projects'));
         $cpt_project = 0;
         // father request
         $query = "SELECT DISTINCT group_id,unix_group_name,group_name FROM groups,plugin_projects_hierarchy WHERE plugin_projects_hierarchy.link_type ='shar' AND plugin_projects_hierarchy.activated='t' AND groups.group_id=plugin_projects_hierarchy.project_id AND plugin_projects_hierarchy.sub_project_id=" . $group_id;
         $res = db_query($query);
         echo db_error();
         while ($row = db_fetch_array($res)) {
             echo html_image('ic/forum20g.png', '20', '20', array('alt' => _('Link'))) . '&nbsp;' . _('Parent project') . ': <a href="' . $GLOBALS['sys_urlprefix'] . '/projects/' . $row['unix_group_name'] . '/">' . $row['group_name'] . '</a><br/>';
             $cpt_project++;
         }
         if ($cpt_project != 0) {
             print '<hr size="1" />';
         }
         $cpt_temp = $cpt_project;
         // sons request
         $query = "SELECT DISTINCT group_id,unix_group_name,group_name,com FROM groups,plugin_projects_hierarchy WHERE plugin_projects_hierarchy.link_type ='shar' AND plugin_projects_hierarchy.activated='t' AND groups.group_id=plugin_projects_hierarchy.sub_project_id AND plugin_projects_hierarchy.project_id=" . $group_id;
         $res = db_query($query);
         echo db_error();
         while ($row = db_fetch_array($res)) {
             echo html_image('ic/forum20g.png', '20', '20', array('alt' => _('Link'))) . '&nbsp;' . _('Child project') . ' : <a href="' . $GLOBALS['sys_urlprefix'] . '/projects/' . $row['unix_group_name'] . '/">' . $row['group_name'] . '</a> : ' . $row['com'] . '<br/>';
             $cpt_project++;
         }
         if ($cpt_project != $cpt_temp) {
             print '<hr size="1" />';
         }
         $cpt_temp = $cpt_project;
         // links if project is father
         $query = "SELECT DISTINCT group_id,unix_group_name,group_name,com FROM groups,plugin_projects_hierarchy WHERE plugin_projects_hierarchy.link_type ='navi' AND plugin_projects_hierarchy.activated='t' AND groups.group_id=plugin_projects_hierarchy.sub_project_id AND plugin_projects_hierarchy.project_id=" . $group_id;
         $res = db_query($query);
         echo db_error();
         while ($row = db_fetch_array($res)) {
             echo html_image('ic/forum20g.png', '20', '20', array('alt' => _('Link'))) . '&nbsp;' . _('Links') . " : <a href=\"" . $GLOBALS['sys_urlprefix'] . "/projects/" . $row['unix_group_name'] . "/\">" . $row['group_name'] . "</a> :  " . $row['com'] . "<br/>";
             $cpt_project++;
         }
         // links if project is son
         $query = "SELECT DISTINCT group_id,unix_group_name,group_name,com FROM groups,plugin_projects_hierarchy WHERE plugin_projects_hierarchy.link_type ='navi' AND plugin_projects_hierarchy.activated='t' AND groups.group_id=plugin_projects_hierarchy.project_id AND plugin_projects_hierarchy.sub_project_id=" . $group_id;
         $res = db_query($query);
         echo db_error();
         while ($row = db_fetch_array($res)) {
             echo html_image('ic/forum20g.png', '20', '20', array('alt' => _('Link'))) . '&nbsp;' . _('Links') . " : <a href=\"" . $GLOBALS['sys_urlprefix'] . "/projects/" . $row['unix_group_name'] . "/\">" . $row['group_name'] . "</a><br/>";
             $cpt_project++;
         }
         if ($cpt_project != $cpt_temp) {
             print '<hr size="1" />';
         }
         if ($cpt_project == 0) {
             echo _('No linked project avalaible');
             print '<hr size="1" />';
         }
         echo $HTML->boxBottom();
     } elseif ($hookname == "admin_project_link") {
         //modif pour hierarchie par Fabien le 10/10/06
         //add files add_son.php, del_father.php,del_son.php,wait_son.php and hierarchy_utils.php
         global $gfplugins;
         require_once $gfplugins . 'projects_hierarchy/www/hierarchy_utils.php';
         //include('../../plugins/projects_hierarchy/hierarchy_utils.php');
         $group_id = $params;
         echo $HTML->boxMiddle(_('Modify the hierarchy'));
         echo '<form action="../../plugins/projects_hierarchy/add_son.php?group_id=' . $group_id . '" method="POST" name="formson">';
         //include('hierarchy_utils.php');
         //select box of sons
         echo '<table><tr>';
         echo '<td>' . _('Select a project :') . '</td><td>' . son_box($group_id, 'sub_project_id', '0') . '</td><td>&nbsp;</td>';
         echo '</tr><tr>';
         echo '<td>' . _('Commentary :') . '</td><td> <input type="text" size="25" value="" name="com"></td>';
         //echo type_son_box();
         echo '<td><input type="submit"  name="son" value="' . _('Add son project') . '"></td></tr></table></form>';
         echo '<br/>';
         echo '<form action="../../plugins/projects_hierarchy/add_link.php?group_id=' . $group_id . '" method="POST" name="formlink">';
         //include('hierarchy_utils.php');
         //select box of sons
         echo '<table><tr>';
         echo '<td>' . _('Select a project :') . '</td><td>' . link_box($group_id, 'sub_project_id', '0') . '</td><td>&nbsp;</td>';
         echo '</tr><tr>';
         echo '<td>' . _('Commentary :') . '</td><td><input type="text" size="25" value="" name="com"></td>';
         echo '<td><input type="submit"  name="son" value="' . _('Add a link') . '"></td></tr></table></form>';
         echo '<br/>';
         //select all the sons of the current project
         $sql_son = "SELECT group_id,group_name,unix_group_name,sub_project_id, activated,link_type,com FROM groups,plugin_projects_hierarchy WHERE " . "\t(\tgroups.group_id = plugin_projects_hierarchy.sub_project_id " . "AND plugin_projects_hierarchy.project_id = " . $group_id . ")";
         $res_son = db_query($sql_son) or die(db_error());
         if (!$res_son || db_numrows($res_son) < 1) {
             $cpt_son = 0;
         } else {
             //display of sons
             $cpt_son = 1;
             echo _('Link list');
             echo '<table>';
             $i = 0;
             while ($row_son = db_fetch_array($res_son)) {
                 $i++;
                 echo '<tr>';
                 echo '<td>';
                 //link to the project
                 echo "<a href=\"../../projects/" . $row_son['unix_group_name'] . "/\">" . $row_son['group_name'] . "</a>";
                 echo '</td>';
                 echo '<td>';
                 if ($row_son['link_type'] == 'navi') {
                     echo _('Navigation link');
                 } else {
                     echo _('Share link');
                 }
                 echo '</td>';
                 echo '<td>';
                 if ($row_son['activated'] == 'f') {
                     echo _('Waiting');
                 } else {
                     print "<b>" . _('Authorize') . "</b>";
                 }
                 echo '</td>';
                 echo "<td><a href='#' onclick='if(confirm(\"" . _('Do you really want to delete this link ?') . "\")){window.location.href=\"../../plugins/projects_hierarchy/del_son.php?group_id=" . $group_id . "&sub_group_id=" . $row_son['sub_project_id'] . "\"}'}>" . _('Delete') . "</a></td>";
                 echo "<tr><td colspan='4'>" . _('Commentary :') . " <i>" . $row_son['com'] . "</i>";
                 echo '</td></tr>';
             }
         }
         //select  navigation link by father
         $sql_son = "SELECT group_id,group_name,unix_group_name,project_id, activated,link_type,com FROM groups,plugin_projects_hierarchy WHERE " . " (\tgroups.group_id = plugin_projects_hierarchy.project_id " . "AND plugin_projects_hierarchy.sub_project_id = " . $group_id . " AND plugin_projects_hierarchy.link_type = 'navi') ";
         $res_son = db_query($sql_son) or die(db_error());
         if (!$res_son || db_numrows($res_son) < 1) {
             if ($cpt_son == 1) {
                 echo '</table>';
             }
         } else {
             //display of sons
             if ($cpt_son != 1) {
                 echo _('Link list');
                 echo '<table>';
             }
             $i = 0;
             while ($row_son = db_fetch_array($res_son)) {
                 $i++;
                 echo '<tr>';
                 echo '<td>';
                 //link to the project
                 echo "<a href=\"../../projects/" . $row_son['unix_group_name'] . "/\">" . $row_son['group_name'] . "</a>";
                 echo '</td>';
                 echo '<td>';
                 if ($row_son[link_type] == 'navi') {
                     echo _('Navigation link');
                 } else {
                     echo _('Share link');
                 }
                 echo '</td>';
                 echo '<td>';
                 if ($row_son[activated] == 'f') {
                     //echo _('Waiting');
                     echo "<td><a href='#' onclick='if(confirm(\"" . _('Do you really want to authorize this project ?') . "\")){window.location.href=\"../../plugins/projects_hierarchy/wait_son.php?sub_group_id=" . $group_id . "&group_id=" . $row_son['project_id'] . "\"}'}>" . _('Authorize') . "</a></td>";
                 } else {
                     print "<b>" . _('Authorize') . "</b>";
                 }
                 echo '</td>';
                 echo "<td><a href='#' onclick='if(confirm(\"" . _('Do you really want to delete this link ?') . "\")){window.location.href=\"../../plugins/projects_hierarchy/del_father.php?group_id=" . $row_son['project_id'] . "&sub_group_id=" . $group_id . "\"}'}>" . _('Delete') . "</a></td>";
                 echo "<tr><td colspan='4'>" . _('Commentary of father :') . " <i>" . $row_son['com'] . "</i></td>";
                 echo '</tr>';
             }
             echo '</table>';
         }
         //research allowing father
         $sql_father = "SELECT group_id,group_name,unix_group_name,project_id,com FROM groups,plugin_projects_hierarchy WHERE " . "\t\tgroups.group_id = plugin_projects_hierarchy.project_id " . "AND plugin_projects_hierarchy.sub_project_id = " . $group_id . "" . "\t\tAND plugin_projects_hierarchy.activated = true AND plugin_projects_hierarchy.link_type = 'shar'";
         //print $sql_wait;
         $res_father = db_query($sql_father) or die(db_error());
         if (!$res_father || db_numrows($res_father) < 1) {
         } else {
             //display of the father of the current project
             echo '<table><tr><td colspan=\\"2\\">';
             echo _('Project\'s parent');
             echo '</td></tr>';
             while ($row_father = db_fetch_array($res_father)) {
                 echo '<tr>';
                 echo '<td>';
                 echo "<a href=\"../../projects/" . $row_father['unix_group_name'] . "/\">" . $row_father['group_name'] . "</a>";
                 echo '</td><td>';
                 echo "<td><a href='#' onclick='if(confirm(\"" . _('Do you really want to delete this link ?') . "\")){window.location.href=\"../../plugins/projects_hierarchy/del_father.php?sub_group_id=" . $group_id . "&group_id=" . $row_father['group_id'] . "\"}'}>" . _('Delete') . "</a></td>";
                 echo '</td></tr>';
             }
             echo '</table>';
         }
         //research waiting fathers
         $sql_wait = "SELECT group_id,group_name,unix_group_name,project_id,link_type,com FROM groups,plugin_projects_hierarchy WHERE " . "\t\tgroups.group_id = plugin_projects_hierarchy.project_id " . "AND plugin_projects_hierarchy.sub_project_id = " . $group_id . "" . "\t\tAND plugin_projects_hierarchy.activated = false AND plugin_projects_hierarchy.link_type = 'shar'";
         //print $sql_wait;
         $res_wait = db_query($sql_wait) or die(db_error());
         if (!$res_wait || db_numrows($res_wait) < 1) {
         } else {
             //display of waiting fathers
             echo '<table><tr><td colspan=\\"2\\">';
             echo _('Father waiting for validation');
             echo '</td></tr>';
             while ($row_wait = db_fetch_array($res_wait)) {
                 echo '<tr>';
                 echo '<td>';
                 echo "<a href=\"../../projects/" . $row_wait['unix_group_name'] . "/\">" . $row_wait['group_name'] . "</a>";
                 echo '</td>';
                 echo '<td>';
                 echo "<td><a href='#' onclick='if(confirm(\"" . _('Do you really want to authorize this project ?') . "\")){window.location.href=\"../../plugins/projects_hierarchy/wait_son.php?sub_group_id=" . $group_id . "&group_id=" . $row_wait['group_id'] . "\"}'}>" . _('Do you really want to authorize this project ?') . "</a></td>";
                 echo '</td><td>';
                 echo "<td><a href='#' onclick='if(confirm(\"" . _('Do you really want to delete this link ?') . "\")){window.location.href=\"../../plugins/projects_hierarchy/del_father.php?sub_group_id=" . $group_id . "&group_id=" . $row_wait['group_id'] . "\"}'}>" . _('Delete') . "</a></td>";
                 echo "</td><tr><td colspan='3'>" . _('Commentary of father :') . " <i>" . $row_wait['com'] . "</i>";
                 echo '</td></tr>';
             }
             echo '</table>';
         }
     } elseif ($hookname == "delete_link") {
         $sql = "DELETE FROM plugin_projects_hierarchy WHERE project_id = " . $params . " OR sub_project_id = " . $params . " ";
         $res_son = db_query($sql);
     }
 }
Beispiel #19
0
 /**
  * printSubMenu() - Takes two array of titles and links and builds the contents of a menu.
  *
  * @param	   array   The array of titles.
  * @param	   array   The array of title links.
  * @return	string	Html to build a submenu.
  */
 function printSubMenu($title_arr, $links_arr)
 {
     $count = count($title_arr);
     $count--;
     $return = '';
     for ($i = 0; $i < $count; $i++) {
         $return .= util_make_link($links_arr[$i], $title_arr[$i]) . ' | ';
     }
     $return .= util_make_link($links_arr[$i], $title_arr[$i]);
     return $return;
 }
Beispiel #20
0
?>

<form action="<?php 
echo getStringFromServer('PHP_SELF');
?>
" method="post">
<input type="hidden" name="form_key" value="<?php 
echo form_generate_key();
?>
"/>
<?php 
echo _('New Email Address:');
?>
<input type="text" name="newemail" maxlength="255" />
<input type="submit" name="submit" value="<?php 
echo _('Send Confirmation to New Address');
?>
" />
</form>

	<p><?php 
echo util_make_link('/', _('Return'));
?>
</p>

<?php 
site_user_footer(array());
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
function stats_site_projects($report, $orderby, $projects, $trove)
{
    $i = 0;
    $offset = 0;
    $trove_cat = 0;
    $res = stats_site_project_result($report, $orderby, $projects, $trove);
    // if there are any rows, we have valid data (or close enough).
    if (db_numrows($res) > 1) {
        ?>
		<table width="100%" cellpadding="0" cellspacing="0" border="0">

		<tr valign="top" align="right" class="tableheading">
			<td><strong><?php 
        echo _('Group Name');
        ?>
</strong></td>
			<td colspan="2"><strong><?php 
        echo _('Page Views');
        ?>
</strong></td>
			<td><strong><?php 
        echo _('Downloads');
        ?>
</strong></td>
			<td colspan="2"><strong><?php 
        echo _('Bugs');
        ?>
</strong></td>
			<td colspan="2"><strong><?php 
        echo _('Support');
        ?>
</strong></td>
			<td colspan="2"><strong><?php 
        echo _('Patches');
        ?>
</strong></td>
			<td colspan="2"><strong><?php 
        echo _('All Trkr');
        ?>
</strong></td>
			<td colspan="2"><strong><?php 
        echo _('Tasks');
        ?>
</strong></td>
			<td colspan="3"><strong><?php 
        echo _('CVS');
        ?>
</strong></td>
		</tr>

		<?php 
        // Build the query string to resort results.
        $uri_string = "projects.php?report=" . $report;
        if ($trove_cat > 0) {
            $uri_string .= "&amp;trovecatid=" . $trove_cat;
        }
        if ($trove_cat == -1) {
            $uri_string .= "&amp;projects=" . urlencode(implode(" ", $projects));
        }
        $uri_string .= "&amp;orderby=";
        ?>
		<tr valign="top" align="right" class="tableheading">
			<td>&nbsp;</td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
site_views"><?php 
        echo _('Site');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
subdomain_views"><?php 
        echo _('Subdomain');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
downloads"><?php 
        echo _('Total');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
bugs_opened"><?php 
        echo _('Opn');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
bugs_closed"><?php 
        echo _('Cls');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
support_opened"><?php 
        echo _('Opn');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
support_closed"><?php 
        echo _('Cls');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
patches_opened"><?php 
        echo _('Opn');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
patches_closed"><?php 
        echo _('Cls');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
artifacts_opened"><?php 
        echo _('Opn');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
artifacts_closed"><?php 
        echo _('Cls');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
tasks_opened"><?php 
        echo _('Opn');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
tasks_closed"><?php 
        echo _('Cls');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
cvs_checkouts"><?php 
        echo _('CO\'s');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
cvs_commits"><?php 
        echo _('Comm\'s');
        ?>
</a></td>
			<td><a href="<?php 
        echo $uri_string;
        ?>
cvs_adds"><?php 
        echo _('Adds');
        ?>
</a></td>
			</tr>
		<?php 
        $i = $offset;
        while ($row = db_fetch_array($res)) {
            print '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . ' align="right">' . '<td>' . ($i + 1) . util_make_link('/project/stats/?group_id=' . $row["group_id"], $row["group_name"]) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["site_views"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["subdomain_views"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["downloads"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["bugs_opened"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["bugs_closed"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["support_opened"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["support_closed"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["patches_opened"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["patches_closed"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["artifacts_opened"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["artifacts_closed"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["tasks_opened"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["tasks_opened"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["cvs_checkouts"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["cvs_commits"], 0) . '</td>' . '<td>&nbsp;&nbsp;' . number_format($row["cvs_adds"], 0) . '</td>' . '</tr>' . "\n";
            $i++;
            $sum = stats_util_sum_array($sum, $row);
        }
        ?>
		</table></p>
		<?php 
    } else {
        echo _('Query returned no valid data.') . "\n";
        echo db_error();
    }
}
Beispiel #22
0
    exit_error("Error", "This confirm hash exists more than once.");
}
if (db_numrows($res_user) < 1) {
    exit_error("Error", "Invalid confirmation hash.");
}
$row_user = db_fetch_array($res_user);
$user =& user_get_object($row_user['user_id'], $res_user);
if (!$u || !is_object($u)) {
    exit_error('Error', 'Could Not Get User');
} elseif ($u->isError()) {
    exit_error('Error', $u->getErrorMessage());
}
$all = getStringFromRequest('all');
$user->unsubscribeFromMailings($all);
site_header(array('title' => _("Unsubscription Complete")));
echo '<h2>' . _('Unsubscription Complete') . '</h2><p>';
if ($all) {
    $what = sprintf(_('You have been unsubscribed from all %1$s mailings and notifications. In case you will want to re-activate your subscriptions in the future, login and visit your Account Maintenance page.'), $GLOBALS['sys_name']);
} else {
    $what = sprintf(_('You have been unsubscribed from %1$s site mailings. In case you will want to re-activate your subscriptions in the future, login and visit your Account Maintenance page.'), $GLOBALS['sys_name']);
}
echo '</p>';
?>

	<p><?php 
echo util_make_link("/", _('Return'));
?>
</p>

<?php 
site_footer(array());
Beispiel #23
0
    /**
     *	header() - "steel theme" top of page
     *
     * @param	array	Header parameters array
     */
    function header($params)
    {
        global $sys_name;
        $this->headerStart($params);
        ?>

<link rel="stylesheet" type="text/css" href="<?php 
        echo util_make_url('/themes/osx/css/theme.css');
        ?>
" />
<body>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

	<tr>
		<td><a href="<?php 
        echo util_make_url('/');
        ?>
"
			onmouseover="imgOver('logo')"
			onmouseout="imgOff('logo')"><img name="logo" border="0" height="60" width="180"
				src="<?php 
        echo $this->imgroot . 'logo.png';
        ?>
" alt="GForge Logo" /></a></td>
		<td><?php 
        echo $this->searchBox();
        ?>
</td>
		<td style="text-align:right"><?php 
        if (session_loggedin()) {
            ?>
				<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><?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 
        }
        $params['template'] = '<br/><b>{menu}</b>';
        plugin_hook('headermenu', $params);
        ?>
</td>
		<td>&nbsp;&nbsp;</td>
	</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

	<tr>
		<td>&nbsp;</td>
		<td colspan="3">

<?php 
        echo $this->outerTabs($params);
        ?>

		</td>
		<td>&nbsp;</td>

	</tr>
	<tr>
		<td>&nbsp;</td>
		<td valign="top" width="99%" colspan="3">
			<!-- Inner Tabs / Shell -->

			<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php 
        if (isset($params['group']) && $params['group']) {
            ?>
			<tr>
				<td>&nbsp;</td>
				<td>
				<?php 
            echo $this->projectTabs($params['toptab'], $params['group']);
            ?>
				</td>
				<td>&nbsp;</td>
			</tr>
			<?php 
        }
        ?>
			<tr>
				<td><img
					src="<?php 
        echo $this->imgroot;
        ?>
clear.png" width="99%" height="10" alt="" /></td>
			</tr>

			<tr>
				<td><img
					src="<?php 
        echo $this->imgroot;
        ?>
clear.png" width="10" height="1" alt="" /></td>
				<td valign="top" width="99%">
	<?php 
    }
    function showRelatedArtifacts()
    {
        $res = $this->getRelatedArtifacts();
        $rows = db_numrows($res);
        if ($rows > 0) {
            $perm =& $this->ProjectGroup->Group->getPermission(session_get_user());
            if (!$perm || !is_object($perm) || !$perm->isPMAdmin()) {
                $is_admin = false;
            } else {
                $is_admin = true;
            }
            echo '
			<h3>' . _('Related Tracker Items') . '</h3>
			<p>';
            $title_arr = array();
            $title_arr[] = _('Task Summary');
            $title_arr[] = _('Tracker');
            $title_arr[] = _('Open Date');
            $is_admin ? $title_arr[] = _('Remove Relation') : '';
            echo $GLOBALS['HTML']->listTableTop($title_arr);
            for ($i = 0; $i < $rows; $i++) {
                echo '
				<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>
					<td>' . util_make_link('/tracker/?func=detail&aid=' . db_result($res, $i, 'artifact_id') . '&group_id=' . db_result($res, $i, 'group_id') . '&atid=' . db_result($res, $i, 'group_artifact_id'), db_result($res, $i, 'summary')) . '</td>
					<td>' . db_result($res, $i, 'name') . '</td>
					<td>' . date(_('Y-m-d H:i'), db_result($res, $i, 'open_date')) . '</td>' . ($is_admin ? '<td><input type="checkbox" name="rem_artifact_id[]" value="' . db_result($res, $i, 'artifact_id') . '"></td>' : '') . '</tr>';
            }
            echo $GLOBALS['HTML']->listTableBottom();
        } else {
            echo '
			<h3>' . _('No Related Tracker Items Have Been Added') . '</h3>';
        }
    }
 function CallHook($hookname, &$params)
 {
     if (isset($params['group_id'])) {
         $group_id = $params['group_id'];
     } elseif (isset($params['group'])) {
         $group_id = $params['group'];
     } else {
         $group_id = null;
     }
     if ($hookname == "groupmenu") {
         $project = group_get_object($group_id);
         if (!$project || !is_object($project)) {
             return;
         }
         if ($project->isError()) {
             return;
         }
         if (!$project->isProject()) {
             return;
         }
         if ($project->usesPlugin($this->name)) {
             $params['TITLES'][] = $this->text;
             $params['DIRS'][] = util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/index.php');
             $params['ADMIN'][] = '';
             $params['TOOLTIPS'][] = _('Mediawiki Space');
         }
         $params['toptab'] == $this->name ? $params['selected'] = count($params['TITLES']) - 1 : '';
     } elseif ($hookname == "groupisactivecheckbox") {
         //Check if the group is active
         // this code creates the checkbox in the project edit public info page to activate/deactivate the plugin
         $group = group_get_object($group_id);
         echo "<tr>";
         echo "<td>";
         echo ' <input type="checkbox" name="use_mediawikiplugin" value="1" ';
         // checked or unchecked?
         if ($group->usesPlugin($this->name)) {
             echo "checked";
         }
         echo " /><br/>";
         echo "</td>";
         echo "<td>";
         echo "<strong>Use " . $this->text . " Plugin</strong>";
         echo "</td>";
         echo "</tr>";
     } elseif ($hookname == "groupisactivecheckboxpost") {
         // this code actually activates/deactivates the plugin after the form was submitted in the project edit public info page
         $group = group_get_object($group_id);
         $use_mediawikiplugin = getStringFromRequest('use_mediawikiplugin');
         if ($use_mediawikiplugin == 1) {
             $group->setPluginUse($this->name);
         } else {
             $group->setPluginUse($this->name, false);
         }
     } elseif ($hookname == "project_public_area") {
         $project = group_get_object($group_id);
         if (!$project || !is_object($project)) {
             return;
         }
         if ($project->isError()) {
             return;
         }
         if (!$project->isProject()) {
             return;
         }
         if ($project->usesPlugin($this->name)) {
             echo '<div class="public-area-box">';
             print '<a href="' . util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/index.php') . '">';
             print html_abs_image(util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/skins/fusionforge/wiki.png'), '20', '20', array('alt' => 'Mediawiki'));
             print ' Mediawiki';
             print '</a>';
             echo '</div>';
         }
     } elseif ($hookname == "role_get") {
         $role =& $params['role'];
         // Read access
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_read');
         $right->SetAllowedValues(array('0', '1'));
         $right->SetDefaultValues(array('Admin' => '1', 'Senior Developer' => '1', 'Junior Developer' => '1', 'Doc Writer' => '1', 'Support Tech' => '1'));
         // Edit privileges
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_edit');
         $right->SetAllowedValues(array('0', '1', '2', '3'));
         $right->SetDefaultValues(array('Admin' => '3', 'Senior Developer' => '2', 'Junior Developer' => '1', 'Doc Writer' => '3', 'Support Tech' => '0'));
         // File upload privileges
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_upload');
         $right->SetAllowedValues(array('0', '1', '2'));
         $right->SetDefaultValues(array('Admin' => '2', 'Senior Developer' => '2', 'Junior Developer' => '1', 'Doc Writer' => '2', 'Support Tech' => '0'));
         // Administrative tasks
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_admin');
         $right->SetAllowedValues(array('0', '1'));
         $right->SetDefaultValues(array('Admin' => '1', 'Senior Developer' => '0', 'Junior Developer' => '0', 'Doc Writer' => '0', 'Support Tech' => '0'));
     } elseif ($hookname == "role_normalize") {
         $role =& $params['role'];
         $new_sa =& $params['new_sa'];
         $new_pa =& $params['new_pa'];
         $projects = $role->getLinkedProjects();
         foreach ($projects as $p) {
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_read', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_edit', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_upload', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_admin', $p->getID());
         }
     } elseif ($hookname == "role_translate_strings") {
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_read');
         $right->setDescription(_('Mediawiki read access'));
         $right->setValueDescriptions(array('0' => _('No reading'), '1' => _('Read access')));
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_edit');
         $right->setDescription(_('Mediawiki write access'));
         $right->setValueDescriptions(array('0' => _('No editing'), '1' => _('Edit existing pages only'), '2' => _('Edit and create pages'), '3' => _('Edit, create, move, delete pages')));
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_upload');
         $right->setDescription(_('Mediawiki file upload'));
         $right->setValueDescriptions(array('0' => _('No uploading'), '1' => _('Upload permitted'), '2' => _('Upload and re-upload')));
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_admin');
         $right->setDescription(_('Mediawiki administrative tasks'));
         $right->setValueDescriptions(array('0' => _('No administrative access'), '1' => _('Edit interface, import XML dumps')));
     } elseif ($hookname == "role_get_setting") {
         $role = $params['role'];
         $reference = $params['reference'];
         $value = $params['value'];
         switch ($params['section']) {
             case 'plugin_mediawiki_read':
                 if ($role->hasPermission('project_admin', $reference)) {
                     $params['result'] = 1;
                 } else {
                     $params['result'] = $value;
                 }
                 break;
             case 'plugin_mediawiki_edit':
                 if ($role->hasPermission('project_admin', $reference)) {
                     $params['result'] = 3;
                 } else {
                     $params['result'] = $value;
                 }
                 break;
             case 'plugin_mediawiki_upload':
                 if ($role->hasPermission('project_admin', $reference)) {
                     $params['result'] = 2;
                 } else {
                     $params['result'] = $value;
                 }
                 break;
             case 'plugin_mediawiki_admin':
                 if ($role->hasPermission('project_admin', $reference)) {
                     $params['result'] = 1;
                 } else {
                     $params['result'] = $value;
                 }
                 break;
         }
     } elseif ($hookname == "role_has_permission") {
         $value = $params['value'];
         switch ($params['section']) {
             case 'plugin_mediawiki_read':
                 switch ($params['action']) {
                     case 'read':
                     default:
                         $params['result'] |= $value >= 1;
                         break;
                 }
                 break;
             case 'plugin_mediawiki_edit':
                 switch ($params['action']) {
                     case 'editexisting':
                         $params['result'] |= $value >= 1;
                         break;
                     case 'editnew':
                         $params['result'] |= $value >= 2;
                         break;
                     case 'editmove':
                         $params['result'] |= $value >= 3;
                         break;
                 }
                 break;
             case 'plugin_mediawiki_upload':
                 switch ($params['action']) {
                     case 'upload':
                         $params['result'] |= $value >= 1;
                         break;
                     case 'reupload':
                         $params['result'] |= $value >= 2;
                         break;
                 }
                 break;
             case 'plugin_mediawiki_admin':
                 switch ($params['action']) {
                     case 'admin':
                     default:
                         $params['result'] |= $value >= 1;
                         break;
                 }
                 break;
         }
     } elseif ($hookname == "list_roles_by_permission") {
         switch ($params['section']) {
             case 'plugin_mediawiki_read':
                 switch ($params['action']) {
                     case 'read':
                     default:
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 1');
                         break;
                 }
                 break;
             case 'plugin_mediawiki_edit':
                 switch ($params['action']) {
                     case 'editexisting':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 1');
                         break;
                     case 'editnew':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 2');
                         break;
                     case 'editmove':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 3');
                         break;
                 }
                 break;
             case 'plugin_mediawiki_upload':
                 switch ($params['action']) {
                     case 'upload':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 1');
                         break;
                     case 'reupload':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 2');
                         break;
                 }
                 break;
             case 'plugin_mediawiki_admin':
                 switch ($params['action']) {
                     case 'admin':
                     default:
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 1');
                         break;
                 }
                 break;
         }
     } elseif ($hookname == "project_admin_plugins") {
         $group_id = $params['group_id'];
         $group = group_get_object($group_id);
         if ($group->usesPlugin($this->name)) {
             echo util_make_link("/plugins/mediawiki/plugin_admin.php?group_id=" . $group->getID(), _("MediaWiki Plugin admin")) . "<br />";
         }
     } elseif ($hookname == "clone_project_from_template") {
         $template = $params['template'];
         $project = $params['project'];
         $id_mappings = $params['id_mappings'];
         $sections = array('plugin_mediawiki_read', 'plugin_mediawiki_edit', 'plugin_mediawiki_upload', 'plugin_mediawiki_admin');
         foreach ($template->getRoles() as $oldrole) {
             $newrole = RBACEngine::getInstance()->getRoleById($id_mappings['role'][$oldrole->getID()]);
             $oldsettings = $oldrole->getSettingsForProject($template);
             foreach ($sections as $section) {
                 if (isset($oldsettings[$section][$template->getID()])) {
                     $newrole->setSetting($section, $project->getID(), $oldsettings[$section][$template->getID()]);
                 }
             }
         }
     } elseif ($hookname == 'group_delete') {
         $projectId = $params['group_id'];
         $projectObject = group_get_object($projectId);
         if ($projectObject->usesPlugin($this->name)) {
             //delete the files and db schema
             $schema = 'plugin_mediawiki_' . $projectObject->getUnixName();
             // Sanitize schema name
             $schema = strtr($schema, "-", "_");
             db_query_params('drop schema $1 cascade', array($schema));
             exec('/bin/rm -rf ' . forge_get_config('projects_path', 'mediawiki') . '/' . $projectObject->getUnixName());
         }
     }
 }
Beispiel #26
0
}
site_project_header(array('title' => _('Project Member List'), 'group' => $group_id, 'toptab' => 'memberlist'));
echo _('<p>If you would like to contribute to this project by becoming a developer, contact one of the project admins, designated in bold text below.</p>');
// list members
$query = "SELECT users.*,user_group.admin_flags,role.role_name AS role\n\tFROM users,user_group \n\tLEFT JOIN role ON user_group.role_id=role.role_id\n\tWHERE users.user_id=user_group.user_id \n\tAND user_group.group_id='{$group_id}' \n\tAND users.status='A'\n\tORDER BY users.user_name ";
$title_arr = array();
$title_arr[] = _('Developer');
$title_arr[] = _('Username');
$title_arr[] = _('Role/Position');
if ($GLOBALS['sys_use_people']) {
    $title_arr[] = _('Skills');
}
echo $GLOBALS['HTML']->listTableTop($title_arr);
$res_memb = db_query($query);
$i = 0;
while ($row_memb = db_fetch_array($res_memb)) {
    echo '<tr ' . $HTML->boxGetAltRowStyle($i++) . '>';
    if (trim($row_memb['admin_flags']) == 'A') {
        echo '		<td><strong>' . $row_memb['realname'] . '</strong></td>';
    } else {
        echo '		<td>' . $row_memb['realname'] . '</td>';
    }
    echo '<td align="center">' . util_make_link_u($row_memb['user_name'], $row_memb['user_id'], $row_memb['user_name']) . '</td>
	<td align="center">' . $row_memb['role'] . '</td>';
    if ($GLOBALS['sys_use_people']) {
        echo '<td align="center">' . util_make_link('/people/viewprofile.php?user_id=' . $row_memb['user_id'], _('View')) . '</td>';
    }
    echo '</tr>';
}
echo $GLOBALS['HTML']->listTableBottom();
site_project_footer(array());
	<p />
	<h3><?php 
    echo util_make_link('/admin/groupedit.php?group_id=' . $row_grp['group_id'], _('[Edit Project Details]'));
    ?>
</h3>

	<p />
	<h3><?php 
    echo util_make_link('/project/admin/?group_id=' . $row_grp['group_id'], _('Project Admin'));
    ?>
</h3>

	<p />
	<h3><?php 
    echo util_make_link('/admin/userlist.php?group_id=' . $row_grp['group_id'], _('[View/Edit Project Members]'));
    ?>
</h3>

	<p />
	<table><tr><td>
	<form action="<?php 
    echo getStringFromServer('PHP_SELF');
    ?>
" method="post">
	<input type="hidden" name="action" value="activate" />
	<input type="hidden" name="list_of_groups" value="<?php 
    print $row_grp['group_id'];
    ?>
" />
	<input type="submit" name="submit" value="<?php 
Beispiel #28
0
function show_highest_ranked_projects()
{
    $sql = "SELECT groups.group_name,groups.unix_group_name,groups.group_id," . "project_weekly_metric.ranking,project_weekly_metric.percentile " . "FROM groups,project_weekly_metric " . "WHERE groups.group_id=project_weekly_metric.group_id " . "AND groups.is_public=1 " . "AND groups.type_id=1  " . "AND groups.status != 'D'  " . "ORDER BY ranking ASC";
    $result = db_query($sql, 20);
    if (!$result || db_numrows($result) < 1) {
        return _('No Stats Available') . " " . db_error();
    } else {
        $return = '';
        while ($row = db_fetch_array($result)) {
            $return .= '<strong>(' . number_format(substr($row['percentile'], 0, 5), 1) . '%)</strong> ' . util_make_link_g($row['unix_group_name'], $row['group_id'], $row['group_name']) . '<br />';
        }
        $return .= '<div align="center">' . util_make_link('/top/mostactive.php?type=week', '[ ' . _('More') . ' ]') . '</div>';
    }
    return $return;
}
Beispiel #29
0
//
$file_list =& $ah->getFiles();
$count = count($file_list);
$title_arr = array();
$title_arr[] = _('Delete');
$title_arr[] = _('Name');
$title_arr[] = _('Description');
$title_arr[] = _('Download');
echo $GLOBALS['HTML']->listTableTop($title_arr);
if ($count > 0) {
    for ($i = 0; $i < $count; $i++) {
        echo '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>
				<td><input type="CHECKBOX" name="delete_file[]" value="' . $file_list[$i]->getID() . '">' . _('Delete') . ' </td>
				<td>' . htmlspecialchars($file_list[$i]->getName()) . '</td>
				<td>' . htmlspecialchars($file_list[$i]->getDescription()) . '</td>
				<td>' . util_make_link('/tracker/download.php/' . $group_id . '/' . $ath->getID() . '/' . $ah->getID() . '/' . $file_list[$i]->getID() . '/' . $file_list[$i]->getName(), _('Download')) . '</td>
				</tr>';
    }
} else {
    echo '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle(0) . '><td colspan=3>' . _('No Files Currently Attached') . '</td></tr>';
}
echo $GLOBALS['HTML']->listTableBottom();
?>
	</td></tr>
</table>
</div>
<div class="tabbertab" title="<?php 
echo _('Commits');
?>
">
<table border="0" width="80%">
Beispiel #30
0
     $sanitizer = new TextSanitizer();
     $body = $sanitizer->SanitizeHtml($body);
     $is_followup_to = getStringFromRequest('is_followup_to');
     $form_key = getStringFromRequest('form_key');
     $posted_by = getStringFromRequest('posted_by');
     $post_date = getStringFromRequest('post_date');
     $is_followup_to = getStringFromRequest('is_followup_to');
     $has_followups = getStringFromRequest('has_followups');
     $most_recent_date = getStringFromRequest('most_recent_date');
     if ($fm->updatemsg($forum_id, $posted_by, $subject, $body, $post_date, $is_followup_to, $thread_id, $has_followups, $most_recent_date)) {
         $feedback .= _('Message Edited Successfully');
     } else {
         $feedback .= $fm->getErrorMessage();
     }
     forum_header(array('title' => _('Edit a Message')));
     echo '<p>' . util_make_link('/forum/forum.php?forum_id=' . $forum_id, _("Return to the forum"));
     forum_footer(array());
 } elseif (getStringFromRequest("cancel")) {
     // the user cancelled the request, go back to forum
     echo "<script>";
     echo "window.location='/forum/message.php?msg_id={$msg_id}';";
     echo "</script>";
 } else {
     //print the edit message confirmation
     $f = new Forum($fa->GetGroupObject(), $forum_id);
     if (!$f || !is_object($f)) {
         exit_error('Error', 'Error Getting Forum');
     } elseif ($f->isError()) {
         exit_error('Error', $f->getErrorMessage());
     }
     $fm = new ForumMessage($f, $msg_id, false, false);