本文整理汇总了PHP中make_url函数的典型用法代码示例。如果您正苦于以下问题:PHP make_url函数的具体用法?PHP make_url怎么用?PHP make_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: make_xml_entry
function make_xml_entry($rss_or_atom, $entryarray) {
$entrydate = dcdateformat($entryarray['time']);
$entryurl = make_url($entryarray['id']);
$entrytext = substr(strip_tags($entryarray['entry']),0,300);
$content = "";
switch ($rss_or_atom) {
case "rss":
$content .= "<item>";
$content .= "<title>".$entryarray['title']."</title>";
$content .= "<link>\"$entryurl\"</link>";
$content .= "<description>$entrytext</description>";
$content .= "<dc:creator>solostyle</dc:creator>";
$content .= "<dc:date>$entrydate</dc:date>";
$content .= "<guid isPermaLink=\"true\">$entryurl</guid>";
$content .= "</item>";
break;
case "atom":
$content .= "<entry>";
$content .= "<title>".$entryarray['title']."</title>";
$content .= "<link href=\"$entryurl\" />";
$content .= "<id>".$entryarray['id']."</id>";
$content .= "<summary>$entrytext</summary>";
$content .= "<author><name>solostyle</name></author>";
$content .= "<updated>$entrydate</updated>";
$content .= "</entry>";
break;
}
return $content;
}
示例2: log_in_user
function log_in_user($user, $user_id)
{
$_SESSION['active_user'] = array(
'name' => $user,
'id' => $user_id);
redirect_to(make_url("messages"));
}
示例3: log_in_user
function log_in_user($user, $user_id, $user_type)
{
$_SESSION['active_user'] = array(
'name' => $user,
'id' => $user_id,
'type' => $user_type);
redirect_to(make_url('admin'));
}
示例4: warning_forum_link
function warning_forum_link($postid)
{
global $locale;
$query = dbquery("SELECT p.forum_id as forum_id, p.post_id as post_id, p.thread_id as thread_id, t.thread_subject as subject FROM " . DB_POSTS . " AS p\r\n\t LEFT JOIN " . DB_THREADS . " AS t ON t.thread_id=p.thread_id WHERE post_id='" . (int) $postid . "'");
if (dbrows($query) == 1) {
$data = dbarray($query);
return "<a href='" . make_url(FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&pid=" . $data['post_id'], BASEDIR . "forum-thread-" . $data['thread_id'] . "-pid" . $data['post_id'] . "-", $data['subject'], ".html") . "#post_" . $data['post_id'] . "'>" . $locale['WARN219'] . " " . $data['subject'] . "</a>";
} else {
return $locale['WARN220'];
}
}
示例5: componentLeftmenu
public function componentLeftmenu()
{
$i18n = TBGContext::getI18n();
$config_sections = array();
if (TBGContext::getUser()->getScope()->getID() == 1) {
$config_sections[TBGSettings::CONFIGURATION_SECTION_SCOPES] = array('route' => 'configure_scopes', 'description' => $i18n->__('Scopes'), 'icon' => 'scopes', 'module' => 'core');
}
$config_sections[TBGSettings::CONFIGURATION_SECTION_SETTINGS] = array('route' => 'configure_settings', 'description' => $i18n->__('Settings'), 'icon' => 'general', 'module' => 'core');
$config_sections[TBGSettings::CONFIGURATION_SECTION_PERMISSIONS] = array('route' => 'configure_permissions', 'description' => $i18n->__('Permissions'), 'icon' => 'permissions', 'module' => 'core');
$config_sections[TBGSettings::CONFIGURATION_SECTION_AUTHENTICATION] = array('route' => 'configure_authentication', 'description' => $i18n->__('Authentication'), 'icon' => 'authentication', 'module' => 'core');
if (TBGContext::getScope()->isUploadsEnabled()) {
$config_sections[TBGSettings::CONFIGURATION_SECTION_UPLOADS] = array('route' => 'configure_files', 'description' => $i18n->__('Uploads & attachments'), 'icon' => 'files', 'module' => 'core');
}
$config_sections[TBGSettings::CONFIGURATION_SECTION_IMPORT] = array('route' => 'configure_import', 'description' => $i18n->__('Import data'), 'icon' => 'import', 'module' => 'core');
$config_sections[TBGSettings::CONFIGURATION_SECTION_PROJECTS] = array('route' => 'configure_projects', 'description' => $i18n->__('Projects'), 'icon' => 'projects', 'module' => 'core');
$config_sections[TBGSettings::CONFIGURATION_SECTION_ISSUETYPES] = array('icon' => 'issuetypes', 'description' => $i18n->__('Issue types'), 'route' => 'configure_issuetypes', 'module' => 'core');
$config_sections[TBGSettings::CONFIGURATION_SECTION_ISSUEFIELDS] = array('icon' => 'resolutiontypes', 'description' => $i18n->__('Issue fields'), 'route' => 'configure_issuefields', 'module' => 'core');
$config_sections[TBGSettings::CONFIGURATION_SECTION_WORKFLOW] = array('icon' => 'workflow', 'description' => $i18n->__('Workflow'), 'route' => 'configure_workflow', 'module' => 'core');
$config_sections[TBGSettings::CONFIGURATION_SECTION_USERS] = array('route' => 'configure_users', 'description' => $i18n->__('Users, teams, clients & groups'), 'icon' => 'users', 'module' => 'core');
$config_sections[TBGSettings::CONFIGURATION_SECTION_MODULES][] = array('route' => 'configure_modules', 'description' => $i18n->__('Modules'), 'icon' => 'modules', 'module' => 'core');
foreach (TBGContext::getModules() as $module) {
if ($module->hasConfigSettings() && $module->isEnabled()) {
$config_sections[TBGSettings::CONFIGURATION_SECTION_MODULES][] = array('route' => array('configure_module', array('config_module' => $module->getName())), 'description' => $module->getConfigTitle(), 'icon' => $module->getName(), 'module' => $module->getName());
}
}
$breadcrumblinks = array();
foreach ($config_sections as $section) {
if (is_array($section) && !array_key_exists('route', $section)) {
foreach ($section as $subsection) {
$url = is_array($subsection['route']) ? make_url($subsection['route'][0], $subsection['route'][1]) : make_url($subsection['route']);
$breadcrumblinks[] = array('url' => $url, 'title' => $subsection['description']);
}
} else {
$breadcrumblinks[] = array('url' => make_url($section['route']), 'title' => $section['description']);
}
}
$this->breadcrumblinks = $breadcrumblinks;
$this->config_sections = $config_sections;
if ($this->selected_section == TBGSettings::CONFIGURATION_SECTION_MODULES) {
if (TBGContext::getRouting()->getCurrentRouteName() == 'configure_modules') {
$this->selected_subsection = 'core';
} else {
$this->selected_subsection = TBGContext::getRequest()->getParameter('config_module');
}
}
}
示例6: display_navigation
function display_navigation()
{
$m_navi = instance_model('navigation');
$navi = $m_navi->get_all('Order');
$m_page = instance_model('page');
$output = array();
foreach($navi as $row)
{
$out_title = '';
$out_url = '';
if($row['Type'] == 'page')
{
$page = $m_page->get_by_id($row['Data']);
if($page == array())
{
$out_title = '[Not Found]';
$out_url = '#';
}
else
{
$out_title = $row['Title'];
$out_url = make_url('page', $page[0]['Clean_title']);
}
}
else if($row['Type'] == 'url')
{
$out_title = $row['Title'];
$out_url = $row['Data'];
}
$output []= array(
'title' => $out_title,
'url' => $out_url);
}
$view = instance_view('navigation');
$view->parse(array(
'navi' => $output
));
}
示例7: note
function note()
{
$path = get_app_root();
$params = $this->params;
$note_db = instance_model('notes');
if(!isset($params[2]))
{
$note_id = $note_db->allocate_note();
redirect_to(make_url('kindlenote', 'note', $note_id));
}
$note_id = $params[2];
$note = $note_db->get_note($note_id);
$view = instance_view('note_edit');
$view->parse(array(
'path' => $path,
'note_id' => $note_id,
'note' => $note
));
}
示例8: create_archive_nav_menu
function create_archive_nav_menu($arr)
{
// start the html
$html = '<div id="archmenuWP">';
$html .= '<ul class="archlev1 archmenu_list_years" id="archmenu">';
$years = array_keys($arr);
foreach ($years as $y) {
$html .= '<li id="archmenu_li_y_' . $y . '">';
$html .= make_link($y . ' (' . $arr[$y]['count'] . ')', make_url($y . '/'));
$html .= '<span class="archmenu_ty archToggleButton" id="archmenu_ty_' . $y . '">+</span>';
// handle clicks with JS
$html .= '</li>';
unset($arr[$y]['count']);
$months = array_keys($arr[$y]);
$html .= '<ul class="archlev2 archmenu_list_months hidden" id="archmenu_y_' . $y . '">';
foreach ($months as $m) {
$html .= '<li id="archmenu_li_y_' . $y . '_m_' . $m . '">';
$html .= make_link(monthname($m) . ' (' . $arr[$y][$m]['count'] . ')', make_url($y . '/' . $m . '/'));
$html .= '<span class="archmenu_tm archToggleButton" id="archmenu_ty_' . $y . '_tm_' . $m . '">+</span>';
// handle clicks with JS
$html .= '</li>';
unset($arr[$y][$m]['count']);
$entries = $arr[$y][$m];
$html .= '<ul class="archlev3 archmenu_list_titles hidden" id="archmenu_y_' . $y . '_m_' . $m . '">';
foreach ($entries as $id => $entry) {
$html .= '<li id="archmenu_li_id_' . $id . '">';
$html .= make_link($entry['title'], make_url($id));
$html .= '</li>';
}
$html .= '</ul>';
}
$html .= '</ul>';
}
$html .= '</ul></div>';
return $html;
}
示例9: componentLeftmenu
public function componentLeftmenu()
{
$config_sections = TBGSettings::getConfigSections(TBGContext::getI18n());
$breadcrumblinks = array();
foreach ($config_sections as $key => $sections) {
foreach ($sections as $section) {
if ($key == TBGSettings::CONFIGURATION_SECTION_MODULES) {
$url = is_array($section['route']) ? make_url($section['route'][0], $section['route'][1]) : make_url($section['route']);
$breadcrumblinks[] = array('url' => $url, 'title' => $section['description']);
} else {
$breadcrumblinks[] = array('url' => make_url($section['route']), 'title' => $section['description']);
}
}
}
$this->breadcrumblinks = $breadcrumblinks;
$this->config_sections = $config_sections;
if ($this->selected_section == TBGSettings::CONFIGURATION_SECTION_MODULES) {
if (TBGContext::getRouting()->getCurrentRouteName() == 'configure_modules') {
$this->selected_subsection = 'core';
} else {
$this->selected_subsection = TBGContext::getRequest()->getParameter('config_module');
}
}
}
示例10: tbg_parse_text
Bonjour %user_buddyname%,<br>
<?php
echo $issue->getIssuetype()->getName();
?>
<?php
echo $issue->getFormattedTitle(true);
?>
a été mise à jour par <?php
echo $updated_by->getName();
?>
.<br>
<br>
<?php
echo tbg_parse_text($comment);
?>
<br>
<div style="color: #888;">
--
<br>
Affiche la demande : <?php
echo link_tag(make_url('viewissue', array('project_key' => $issue->getProject()->getKey(), 'issue_no' => $issue->getFormattedIssueNo()), false));
?>
<br>
Affiche le tableau de bord du projet <?php
echo $issue->getProject()->getName();
?>
: <?php
echo link_tag(make_url('project_dashboard', array('project_key' => $issue->getProject()->getKey()), false));
?>
</div>
</div>
示例11: __
</h4>
<table style="clear: both; width: 780px;" class="padded_table" cellpadding=0 cellspacing=0>
<tr>
<td><label for="workflow_scheme"><?php
echo __('Workflow scheme');
?>
</label></td>
<td style="padding: 5px;">
<?php
echo $project->getWorkflowScheme()->getName();
?>
<?php
if ($access_level == TBGSettings::ACCESS_FULL) {
?>
<div class="button button-blue" style="float: right; margin-top: -10px;" onclick="TBG.Main.Helpers.Backdrop.show('<?php
echo make_url('get_partial_for_backdrop', array('key' => 'project_workflow', 'project_id' => $project->getId()));
?>
');"><span><?php
echo __('Change workflow scheme');
?>
</span></div>
<?php
/*<select name="workflow_scheme" id="workflow_scheme">
<?php foreach (TBGWorkflowScheme::getAll() as $workflow_scheme): ?>
<option value=<?php echo $workflow_scheme->getID(); ?><?php if ($project->getWorkflowScheme()->getID() == $workflow_scheme->getID()): ?> selected<?php endif; ?>><?php echo $workflow_scheme->getName(); ?></option>
<?php endforeach; ?>
</select> */
?>
<?php
}
?>
示例12: __
echo __('Project wikis');
?>
</div>
<?php
foreach (\thebuggenie\core\entities\Project::getAll() as $project) {
?>
<?php
if (!$project->hasAccess() || isset($project_url) && $project->getID() == \thebuggenie\core\framework\Context::getCurrentProject()->getID()) {
continue;
}
?>
<?php
if (!$project->hasWikiURL()) {
?>
<?php
echo link_tag(make_url('publish_article', array('article_name' => ucfirst($project->getKey()) . ':MainPage')), $project->getName());
?>
<?php
} else {
?>
<?php
echo link_tag($project->getWikiURL(), $project->getName(), array('target' => 'blank'));
?>
<?php
}
?>
<?php
}
?>
<?php
}
示例13: image_tag
<li style="vertical-align: middle; clear: both; height: 20px;">
<?php
echo image_tag('spinning_20.gif', array('id' => 'article_favourite_indicator_' . $article->getId() . '_' . $user->getID(), 'style' => 'display: none; float: left; margin-right: 5px;'));
?>
<?php
echo image_tag('star_faded_small.png', array('id' => 'article_favourite_faded_' . $article->getId() . '_' . $user->getID(), 'style' => 'cursor: pointer; display: none; float: left; margin-right: 5px;', 'onclick' => "TBG.Issues.toggleFavourite('" . make_url('toggle_favourite_article', array('article_id' => $article->getID(), 'user_id' => $user->getID())) . "', '" . $article->getID() . '_' . $user->getID() . "');"));
?>
<?php
echo image_tag('star_small.png', array('id' => 'article_favourite_normal_' . $article->getId() . '_' . $user->getID(), 'style' => 'cursor: pointer; float: left; margin-right: 5px;', 'onclick' => "TBG.Issues.toggleFavourite('" . make_url('toggle_favourite_article', array('article_id' => $article->getID(), 'user_id' => $user->getID())) . "', '" . $article->getID() . '_' . $user->getID() . "');"));
?>
<?php
include_component('main/userdropdown', compact('user'));
?>
</li>
示例14: make_url
<table style="width: 780px;" cellpadding=0 cellspacing=0>
<tr>
<td style="width: auto; padding-right: 5px; vertical-align: top;">
<?php
if ($access_level == TBGSettings::ACCESS_FULL) {
?>
<form accept-charset="<?php
echo TBGContext::getI18n()->getCharset();
?>
" action="<?php
echo make_url('configure_projects_add_milestone', array('project_id' => $project->getID()));
?>
" method="post" id="add_milestone_form" onsubmit="addMilestone('<?php
echo make_url('configure_projects_add_milestone', array('project_id' => $project->getID()));
?>
');return false;">
<div class="rounded_box yellow" style="padding: 5px; margin-bottom: 15px;">
<table cellpadding=0 cellspacing=0 style="width: 770px;">
<tr>
<td style="width: 200px;"><label for="add_milestone_name"><?php
echo __('Add milestone');
?>
</label></td>
<td style="width: 400px; padding: 2px;"><input type="text" id="add_milestone_name" style="width: 445px;" name="name"></td>
<td style="width: 125px; padding: 2px;">
<select name="milestone_type">
<option value="1"><?php
echo __('Regular milestone');
?>
</option>
<option value="2"><?php
示例15: __
echo __('This step is not connected to a specific status');
?>
</span>
<?php
}
?>
</dd>
</dl>
<?php
if (!$step->isCore()) {
?>
<form accept-charset="<?php
echo \thebuggenie\core\framework\Context::getI18n()->getCharset();
?>
" method="post" action="<?php
echo make_url('configure_workflow_step', array('workflow_id' => $step->getWorkflow()->getID(), 'step_id' => $step->getID(), 'mode' => 'edit'));
?>
" id="step_details_form" style="display: none;" onsubmit="$('step_update_indicator').show();$('update_step_buttons').hide();">
<dl>
<dt><label for="step_name"><?php
echo __('Name');
?>
</label></dt>
<dd><input type="text" name="name" id="step_name" value="<?php
echo $step->getName();
?>
" style="width: 150px;"></dd>
<dt><label for="step_description"><?php
echo __('Description');
?>
</label></dt>