本文整理汇总了PHP中util_make_link函数的典型用法代码示例。如果您正苦于以下问题:PHP util_make_link函数的具体用法?PHP util_make_link怎么用?PHP util_make_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了util_make_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRows
/**
* 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;
}
示例2: getRows
/**
* 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%"> </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;
}
示例3: snippet_mainpage
/**
* 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> </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&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&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;
}
示例4: bbcodeStyleInitialize
/**
* 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'));
}
示例5: header
//.........这里部分代码省略.........
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> </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
}
示例6: news_foundry_latest
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 = ' - ' . 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;
}
示例7: GetTime
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&project_task_id=' . $task_type['project_task_id'] . '&group_id=' . $group_id . '&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>';
}
示例8: handle_add_exit
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
示例9: CallHook
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
// ...
//.........这里部分代码省略.........
示例10: _
<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 . '&add_cat=1&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');
示例11: _
$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');
?>
">
示例12: util_make_link
?>
</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> </td>
<td width="50%">
<?php
echo $HTML->boxTop(_('Group Members'));
示例13: aff_tree
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 " " . $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>';
}
示例14: _
-->
</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&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>
示例15: sprintf
$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> ' . $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'] . ' </td>' . '<td align="right">';
print ' </td></tr>
';
}