本文整理匯總了PHP中UrlHelper::getLink方法的典型用法代碼示例。如果您正苦於以下問題:PHP UrlHelper::getLink方法的具體用法?PHP UrlHelper::getLink怎麽用?PHP UrlHelper::getLink使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UrlHelper
的用法示例。
在下文中一共展示了UrlHelper::getLink方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getModuleLink
/**
* get module link
*
* returns link to the specified ilias object. works without initializing module-class.
* @access public
* @return string html-code
*/
function getModuleLink($title, $module_id, $module_type)
{
global $connected_cms, $view, $search_key, $cms_select, $current_module;
if ($connected_cms[$this->cms_type]->isAuthNecessary() and !$connected_cms[$this->cms_type]->user->isConnected()) {
return false;
}
$output = "<a href=\"" . UrlHelper::getLink($this->cms_link . "?" . "client_id=" . $connected_cms[$this->cms_type]->getClientId() . "&cms_select=" . $this->cms_type . "&ref_id=" . $module_id . "&type=" . $module_type . "&target=start") . "\" target=\"_blank\">";
$output .= $title;
$output .= "</a> ";
return $output;
}
示例2: get_highscore_list
function get_highscore_list()
{
$db = new DB_Seminar("SELECT murmeln_highscore.*,username FROM murmeln_highscore LEFT JOIN auth_user_md5 USING(user_id) ORDER BY score DESC LIMIT 20");
$ret = '<ol>';
$maxscore = 0;
while ($db->next_record()) {
$ret .= '<li><b>' . $db->f('score') . '</b> -
' . ($db->f('username') ? '<a href="' . UrlHelper::getLink('about.php?username=' . $db->f('username')) . '">' . htmlReady(get_fullname_from_uname($db->f('username'))) . '</a>' : htmlready($db->f('name'))) . '</li>';
$maxscore = $db->f('score');
}
$ret .= '</ol>';
$db->query("DELETE FROM murmeln_highscore WHERE score < " . $maxscore);
return $ret;
}
示例3: _
<? $infotext .= _("Um die Studiengruppe sichtbar zu machen, wenden Sie sich an die Admins."); ?>
<? endif ?>
<?php
echo _("[versteckt]");
?>
<?php
echo tooltipicon($infotext);
?>
<? endif ?>
</td>
<td style="text-align: left">
<? if (!empty($group['navigation'])) : ?>
<? foreach (MyRealmModel::array_rtrim($group['navigation']) as $key => $nav) : ?>
<? if (isset($nav) && $nav->isVisible(true)) : ?>
<a href="<?php
echo UrlHelper::getLink('seminar_main.php', array('auswahl' => $group['seminar_id'], 'redirect_to' => strtr($nav->getURL(), '?', '&')));
?>
" <?php
echo $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '';
?>
>
<?php
echo $nav->getImage()->asImg(20, $nav->getLinkAttributes());
?>
</a>
<? elseif (is_string($key)) : ?>
<?php
echo Assets::img('blank.gif', array('width' => 20, 'height' => 20));
?>
<? endif ?>
<? echo ' ' ?>
示例4: if
?>
</td>
<td class="answer">
<? if (is_array($entry['last_posting'])) : ?>
<?php
echo _("von");
?>
<? if ($entry['last_posting']['anonymous']): ?>
<?php
echo _('Anonym');
?>
<? endif; ?>
<? if (!$entry['last_posting']['anonymous'] || $entry['last_posting']['user_id'] == $GLOBALS['user']->id || $GLOBALS['perm']->have_perm('root')): ?>
<a href="<?php
echo UrlHelper::getLink('dispatch.php/profile', array('username' => $entry['last_posting']['username']));
?>
">
<?php
echo htmlReady(($temp_user = User::find($entry['last_posting']['user_id'])) ? $temp_user->getFullname() : $entry['last_posting']['user_fullname']);
?>
</a>
<? endif; ?>
<br>
<?php
echo _("am");
?>
<?php
echo strftime($time_format_string_short, (int) $entry['last_posting']['date']);
?>
<a href="<?php
示例5: getIliasCourses
/**
* get ilias courses
*
* creates output of ilias courses linked to the chosen seminar. also updates object-connections.
* @access public
* @return boolean successful
*/
function getIliasCourses($sem_id)
{
global $connected_cms, $messages, $view, $cms_select;
$db = DBManager::get();
$rs = $db->query("SELECT DISTINCT system_type, module_id\n FROM object_contentmodules\n WHERE module_type = 'crs' AND object_id = " . $db->quote($sem_id))->fetchAll(PDO::FETCH_ASSOC);
foreach ($rs as $row) {
$courses[$row['system_type']] = $row['module_id'];
}
if (is_array($courses)) {
foreach ($courses as $system_type => $crs_id) {
if (ELearningUtils::isCMSActive($system_type)) {
ELearningUtils::loadClass($system_type);
$connected_courses['courses'][$system_type] = array('url' => UrlHelper::getLink($connected_cms[$system_type]->link->cms_link . '?client_id=' . $connected_cms[$system_type]->getClientId() . '&cms_select=' . $system_type . '&ref_id=' . $crs_id . '&type=crs&target=start'), 'cms_name' => $connected_cms[$system_type]->getName());
$course_output[] = "<a href=\"" . UrlHelper::getLink($connected_cms[$system_type]->link->cms_link . "?" . "client_id=" . $connected_cms[$system_type]->getClientId() . "&cms_select=" . $system_type . "&ref_id=" . $crs_id . "&type=crs&target=start") . "\" target=\"_blank\">" . sprintf(_("Kurs in %s"), htmlReady($connected_cms[$system_type]->getName())) . "</a>";
// gegebenenfalls zugeordnete Module aktualisieren
if (Request::option('update')) {
if (method_exists($connected_cms[$system_type], "updateConnections")) {
$connected_cms[$system_type]->updateConnections($crs_id);
}
}
if (method_exists($connected_cms[$system_type]->permissions, 'CheckUserPermissions')) {
$connected_cms[$system_type]->permissions->CheckUserPermissions($crs_id);
}
}
}
}
if ($connected_courses['courses']) {
if (count($connected_courses['courses']) > 1) {
$connected_courses['text'] = _("Diese Veranstaltung ist mit folgenden Ilias-Kursen verknüpft. Hier gelangen Sie direkt in den jeweiligen Kurs: ");
} else {
$connected_courses['text'] = _("Diese Veranstaltung ist mit einem Ilias-Kurs verknüpft. Hier gelangen Sie direkt in den Kurs: ");
}
$output["update"] .= "<font style=\"font-size: -1\">" . _("Hier können Sie die Zuordnungen zu den verknüpften Kursen aktualisieren.") . "<br></font>";
$output["update"] .= "<form method=\"POST\" action=\"" . URLHelper::getLink() . "#anker\">\n";
$output["update"] .= CSRFProtection::tokenTag();
$output["update"] .= "<input type=\"HIDDEN\" name=\"view\" value=\"" . htmlReady($view) . "\">\n";
$output["update"] .= "<input type=\"HIDDEN\" name=\"cms_select\" value=\"" . htmlReady($cms_select) . "\">\n";
$output["update"] .= Button::create(_('Aktualisieren'), 'update');
$output["update"] .= "</form>";
}
return $connected_courses;
}
示例6: array
<a href="<?php
echo URLHelper::getLink('dispatch.php/institute/overview', array('auswahl' => $instid));
?>
">
<?php
echo htmlReady($GLOBALS['INST_TYPE'][$values["type"]]["name"] . ": " . $values["name"]);
?>
</a>
</td>
<td style="text-align: left; white-space: nowrap">
<? if (!empty($values['navigation'])) : ?>
<? foreach (MyRealmModel::array_rtrim($values['navigation']) as $key => $nav) : ?>
<? if (isset($nav) && $nav->isVisible(true)) : ?>
<a href="<?php
echo UrlHelper::getLink('dispatch.php/institute/overview', array('auswahl' => $instid, 'redirect_to' => strtr($nav->getURL(), '?', '&')));
?>
" <?php
echo $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '';
?>
>
<?php
echo $nav->getImage()->asImg(20, $nav->getLinkAttributes());
?>
</a>
<? elseif (is_string($key)) : ?>
<?php
echo Assets::img('blank.gif', array('widtd' => 20, 'height' => 20));
?>
<? endif ?>
<? endforeach ?>
示例7: htmlReady
echo Studip\Button::createAccept(_('Kopieren'), 'do_copy');
?>
<?php
echo Studip\LinkButton::createCancel(_('Abbrechen'), '?');
?>
</div>
<?php
}
if (count($copied)) {
?>
<h3>Erstellte Kopien</h3>
<ol>
<?foreach ($copied as $copy) : ?>
<li>
<a href="<?php
echo UrlHelper::getLink('seminar_main.php?auswahl=' . $copy->getId());
?>
"><?php
echo htmlReady(trim($copy->veranstaltungsnummer . ' ' . $copy->name));
?>
</a>
<br>
<?
echo join('; ', $copy->members->findBy('status', 'dozent')->pluck('nachname'));
?>
<br>
</li>
<?endforeach;?>
</ol>
<?php
}
示例8: print_result
function print_result()
{
ob_start();
global $_fullname_sql, $SEM_TYPE, $SEM_CLASS;
if (is_array($this->sem_browse_data['search_result']) && count($this->sem_browse_data['search_result'])) {
if (!is_object($this->sem_tree)) {
$this->sem_tree = new StudipSemTreeViewSimple($this->sem_browse_data["start_item_id"], $this->sem_number, is_array($this->sem_browse_data['sem_status']) ? $this->sem_browse_data['sem_status'] : false, !(is_object($GLOBALS['perm']) && $GLOBALS['perm']->have_perm(get_config('SEM_VISIBILITY_PERM'))));
}
$the_tree = $this->sem_tree->tree;
SkipLinks::addIndex(_("Suchergebnis"), 'sem_search_result', 90);
list($group_by_data, $sem_data) = $this->get_result();
echo "\n<table class='default' id=\"sem_search_result\" border=\"0\" align=\"center\" cellspacing=0 cellpadding=2 width = \"99%\">\n";
echo "<caption>" . sprintf(_(" %s Veranstaltungen gefunden %s, Gruppierung: %s"), count($sem_data), $this->sem_browse_data['sset'] ? _("(Suchergebnis)") : "", $this->group_by_fields[$this->sem_browse_data['group_by']]['name']) . "</caption>";
foreach ($group_by_data as $group_field => $sem_ids) {
echo "\n<tr><th colspan='5'>";
switch ($this->sem_browse_data["group_by"]) {
case 0:
echo htmlReady($this->search_obj->sem_dates[$group_field]['name']);
break;
case 1:
if ($the_tree->tree_data[$group_field]) {
echo htmlReady($the_tree->getShortPath($group_field));
if (is_object($this->sem_tree)) {
echo $this->sem_tree->getInfoIcon($group_field);
}
} else {
echo _("keine Studienbereiche eingetragen");
}
break;
case 3:
echo htmlReady($SEM_TYPE[$group_field]["name"] . " (" . $SEM_CLASS[$SEM_TYPE[$group_field]["class"]]["name"] . ")");
break;
default:
echo htmlReady($group_field);
break;
}
echo "</th></tr><tr>";
ob_end_flush();
ob_start();
if (is_array($sem_ids['Seminar_id'])) {
if ($this->sem_browse_data["default_sem"] != 'all') {
$current_semester_id = SemesterData::GetSemesterIdByIndex($this->sem_browse_data["default_sem"]);
}
while (list($seminar_id, ) = each($sem_ids['Seminar_id'])) {
// create instance of seminar-object
$seminar_obj = new Seminar($seminar_id);
// is this sem a studygroup?
$studygroup_mode = SeminarCategories::GetByTypeId($seminar_obj->getStatus())->studygroup_mode;
$sem_name = $SEM_TYPE[key($sem_data[$seminar_id]["status"])]["name"] . ": " . key($sem_data[$seminar_id]["Name"]);
$seminar_number = key($sem_data[$seminar_id]['VeranstaltungsNummer']);
if ($studygroup_mode) {
$sem_name .= ' (' . _("Studiengruppe");
if ($seminar_obj->admission_prelim) {
$sem_name .= ', ' . _("Zutritt auf Anfrage");
}
$sem_name .= ')';
echo '<td width="1%">';
echo StudygroupAvatar::getAvatar($seminar_id)->getImageTag(Avatar::SMALL, array('title' => htmlReady($seminar_obj->getName())));
echo '</td>';
} else {
$sem_number_start = key($sem_data[$seminar_id]["sem_number"]);
$sem_number_end = key($sem_data[$seminar_id]["sem_number_end"]);
if ($sem_number_start != $sem_number_end) {
$sem_name .= " (" . $this->search_obj->sem_dates[$sem_number_start]['name'] . " - ";
$sem_name .= ($sem_number_end == -1 ? _("unbegrenzt") : $this->search_obj->sem_dates[$sem_number_end]['name']) . ")";
} elseif ($this->sem_browse_data["group_by"]) {
$sem_name .= " (" . $this->search_obj->sem_dates[$sem_number_start]['name'] . ")";
}
echo '<td width="1%">';
echo CourseAvatar::getAvatar($seminar_id)->getImageTag(Avatar::SMALL, array('title' => htmlReady($seminar_obj->getName())));
echo '</td>';
}
$send_from_search = URLHelper::getUrl(basename($_SERVER['PHP_SELF']), array('keep_result_set' => 1, 'cid' => null));
$send_from_search_link = UrlHelper::getLink($this->target_url, array($this->target_id => $seminar_id, 'cid' => null, 'send_from_search' => 1, 'send_from_search_page' => $send_from_search));
echo '<td width="66%" colspan="2">';
echo '<a href="' . $send_from_search_link . '">';
if (Config::get()->IMPORTANT_SEMNUMBER && $seminar_number) {
echo htmlReady($seminar_number) . " ";
}
echo htmlReady($sem_name) . '</a><br>';
//create Turnus field
if ($studygroup_mode) {
echo "<div style=\"font-size:smaller\">" . htmlReady(substr($seminar_obj->description, 0, 100)) . "</div>";
} else {
$temp_turnus_string = $seminar_obj->getDatesExport(array('short' => true, 'shrink' => true, 'semester_id' => $current_semester_id));
//Shorten, if string too long (add link for details.php)
if (strlen($temp_turnus_string) > 70) {
$temp_turnus_string = htmlReady(substr($temp_turnus_string, 0, strpos(substr($temp_turnus_string, 70, strlen($temp_turnus_string)), ",") + 71));
$temp_turnus_string .= " ... <a href=\"{$send_from_search_link}\">(" . _("mehr") . ")</a>";
} else {
$temp_turnus_string = htmlReady($temp_turnus_string);
}
if (!Config::get()->IMPORTANT_SEMNUMBER) {
echo "<div style=\"margin-left:5px;font-size:smaller\">" . htmlReady($seminar_number) . "</div>";
}
echo "<div style=\"margin-left:5px;font-size:smaller\">" . $temp_turnus_string . "</div>";
}
echo '</td>';
echo "<td align=\"right\">(";
$doz_name = array();
//.........這裏部分代碼省略.........