本文整理汇总了PHP中UrlHelper::pageUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP UrlHelper::pageUrl方法的具体用法?PHP UrlHelper::pageUrl怎么用?PHP UrlHelper::pageUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UrlHelper
的用法示例。
在下文中一共展示了UrlHelper::pageUrl方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateHTML
private function generateHTML()
{
$this->getSliderData();
$out = '<div class="border_box">';
$out .= '<div class="box_skitter box_skitter_large ' . $this->name . '">';
$out .= '<ul>';
foreach ($this->data['slides'] as $slide) {
$html = "<li>";
// echo $this->sliderDir.$this->name.'/'.strtolower($this->thisLang).'/'.$slide['fileName']."<br>";
$img = '<img src="' . $this->sliderDir . $this->name . '/' . strtolower($this->thisLang) . '/' . $slide['fileName'] . '" class="' . $slide['animation'] . '" />';
$imgFile = $this->sliderDir . $this->name . '/' . strtolower($this->thisLang) . '/' . $slide['fileName'];
if (!file_exists($imgFile)) {
$imgFile = $this->sliderDir . $this->name . '/' . strtolower($this->defaultLang) . '/' . $slide['fileName'];
}
$img = '<img src="' . $imgFile . '" class="' . $slide['animation'] . '" />';
if (isset($slide['url']) && $slide['url'] != null && $slide['url'] != "") {
$urlHelper = new UrlHelper();
$target = "";
if (substr($slide['url'], 0, 1) == "#") {
$url = $urlHelper->getThisPage() . $slide['url'];
} else {
if (substr($slide['url'], 0, 1) == "\$") {
$url = $urlHelper->pageUrl(substr($slide['url'], 1), null);
} else {
if (substr($slide['url'], 0, 7) == "http://") {
$target = 'target="_blank"';
}
$url = $slide['url'];
}
}
$html .= '<a href="' . $url . ' ' . $target . '">';
$html .= $img;
$html .= '</a>';
} else {
$html .= $img;
}
if (isset($slide['text']) && $slide['text'] != null && $slide['text'] != "") {
$html .= '<div class="label_text">';
$html .= $slide['text'];
$html .= '</div>';
}
$html .= "</li>";
$out .= $html;
}
$out .= '</ul>';
$out .= '</div>';
$out .= '</div>';
$out .= $this->generateParams();
$this->html = $out;
}
示例2: generateMenuLevelHtml
private function generateMenuLevelHtml($parent)
{
$out = "";
if (isset($this->menuItems[$parent]) && count($this->menuItems[$parent]) > 0) {
if ($parent != 0) {
$javaID = $this->menuName . "_child_" . $parent;
$out .= "<ul id='" . $javaID . "' style='display: none;' ";
$out .= "class='menu child_menu " . $this->menuType . " ";
$out .= $this->menuCssClass . " " . $this->menuName . "' ";
$out .= "onmouseover=\"showChildMenu('{$javaID}');\" ";
$out .= "onmouseout=\"hideChildMenu('{$javaID}');\">";
} else {
$out .= "<ul id='" . $this->menuName . "' class='menu ";
$out .= $this->menuType . " " . $this->menuCssClass . " ";
$out .= $this->menuName . "'>";
}
foreach ($this->menuItems[$parent] as $menuItem) {
if ($this->checkValue($menuItem['url'])) {
$url = $menuItem['url'];
} else {
$urlHelper = new UrlHelper();
if ($menuItem['postfix'][0] == "/") {
$menuItem['postfix'] = substr($menuItem['postfix'], 1);
}
$url = $urlHelper->pageUrl($menuItem['page'], null) . $menuItem['postfix'];
}
global $_URL_PARAMS;
$thisPageClass = "";
if ($menuItem['page'] == $_URL_PARAMS['page']) {
$thisPageClass = "thisPage";
}
$javaChildID = $this->menuName . "_child_" . $menuItem['menuItem'];
// $out .= "<a href='$url' target='".$menuItem['target']."'>";
$out .= "<li onmouseover=\"showChildMenu('{$javaChildID}');\" onmouseout=\"hideChildMenu('{$javaChildID}');\" ";
$out .= "class='{$thisPageClass}'>";
$out .= "<a href='{$url}' target='" . $menuItem['target'] . "'>";
$out .= "<span text='text'>";
$out .= $menuItem['title'];
$out .= "</span>";
$out .= "</a>";
$out .= "</li>";
// $out .= "</a>";
$out .= $this->generateMenuLevelHtml($menuItem['menuItem']);
}
$out .= "</ul>";
}
return $out;
}
示例3: generateHtml
private function generateHtml()
{
$this->getMaterialData();
if ($this->noData) {
$this->html = "404 - Страница не найдена";
return;
}
$urlHelper = new UrlHelper();
$url = $urlHelper->pageUrl($this->parentPage, null);
$out = "";
$out .= "<div class='material'>";
if ($this->malerialData['showTitle'] > 0) {
$out .= "<div class='materialHeder'>";
$out .= '<div class="materialIcon back"><a href="' . $url . '"></a></div>';
$out .= '<div class="materialTitle">' . strip_tags($this->malerialData['title']) . '</div>';
$out .= "</div>";
}
$IMG_URL = $this->imagePath . $this->malerial . ".png";
if (!file_exists($IMG_URL)) {
$IMG_URL = $this->imagePath . $this->malerial . ".jpg";
if (!file_exists($IMG_URL)) {
$IMG_URL = null;
}
}
$img = "";
// if($IMG_URL!=null) {
// $img = '<div class="materialsLogoBlock">'
// . '<div class="materialsLogoMainBlock">'
// . '<center>'
// . '<img class="materialsLogo" src="'.$IMG_URL.'">'
// . '</center>'
// . '</div>'
// . '</div>';
// }
if ($IMG_URL != null) {
$img = '<div class="materialsPromoImageBlock" style="background: url(' . $IMG_URL . ') no-repeat;">';
$img .= '</div>';
// $img .= '<div class="materialsLogoMainBlock">';
// $img .= '<center>';
// $img .= '<img class="materialsLogo" src="'.$IMG_URL.'">';
// $img .= '</center>';
// $img .= '</div>';
// $img .= '</div>';
}
$out .= "<div class='text'>";
$out .= $img;
$out .= $this->malerialData['text'];
$out .= "</div>";
$out .= $this->getDate();
$out .= '<center>' . '<div class="buttonBack">' . '<a href="' . $url . '">' . 'Назад' . '<div class="materialIcon back"></div>' . '</a>' . '</div>' . '</center>';
// $out .= '<center><div class="ie"><a href="'.$url.'">Завершить просмотр</a></div></center>';
$out .= "</div>";
$this->html = $out;
}
示例4: generateHtml
private function generateHtml()
{
$this->getMaterialData();
if ($this->noData) {
$this->html = "404 - Страница не найдена";
return;
}
$out = "";
if ($this->malerialData['showTitle'] > 0) {
$out .= "<h1 class='material_group_title'>" . $this->malerialData['title'] . "</h1><hr>\n";
}
$out .= "<div class='text'>";
$out .= $this->malerialData['text'];
$out .= "</div>";
$out .= $this->getDate();
$urlHelper = new UrlHelper();
$url = $urlHelper->pageUrl($this->parentPage, null);
$out .= '<center><div class="no_ie"><a href="' . $url . '"><button type="button" class="apelsin_button">Завершить просмотр</button></a></div></center>';
$out .= '<center><div class="ie"><a href="' . $url . '">Завершить просмотр</a></div></center>';
$this->html = $out;
}
示例5: UrlHelper
<?php
include_once './components/Users/classes/AccountSettings.php';
global $_URL_PARAMS;
$params = $_URL_PARAMS['params'];
$urlHelper = new UrlHelper();
if (isset($params[0])) {
$accountSettings = new AccountSettings();
if ($params[0] == 'avatar') {
echo $accountSettings->getChangeAvatar();
} else {
if ($params[0] == 'data') {
echo $accountSettings->getChangeUserDataForm();
} else {
if ($params[0] == 'change_password') {
echo $accountSettings->getChangePasswordForm();
// echo 'тут вызываем функцию для обработки изменения паролья';
}
}
}
echo '<br><a href="' . $urlHelper->pageUrl('account_settings', null) . '"><input type="button" value="К настрйокам"></a><br>';
} else {
echo "Это панель настройки вашего профиля.<br><br>";
$urlParam[0] = "avatar";
echo '<a href="' . $urlHelper->pageUrl('account_settings', $urlParam) . '"><input type="button" value="Изменить аватар"></a>';
$urlParam[0] = "data";
echo '<a href="' . $urlHelper->pageUrl('account_settings', $urlParam) . '"><input type="button" value="Изменить данные"></a>';
$urlParam[0] = "change_password";
echo '<a href="' . $urlHelper->pageUrl('account_settings', $urlParam) . '"><input type="button" value="Изменить пароль"></a><br>';
}
?>
</center>
示例6: MysqliHelper
$_SQL_HELPER = new MysqliHelper();
// Поулчение параметров ссылки
$urlParams = new UrlParams();
global $_URL_PARAMS;
$_URL_PARAMS = $urlParams->getUrlParam();
$urlHelper = new UrlHelper();
$search = $_POST['search'];
$search = addslashes($search);
$search = htmlspecialchars($search);
$search = stripslashes($search);
if ($search == '') {
exit("");
}
$sqlHelper = new MysqliHelper();
$query = "SELECT * FROM `Users` WHERE `login` LIKE '{$search}%';";
$result = $sqlHelper->select($query);
'http://jiyuu-fest.ru/accounts/rus/Makson/';
$page = 'accounts';
if ($result != null) {
foreach ($result as $user) {
$params[0] = $user['login'];
$url = $urlHelper->pageUrl($page, $params);
echo "<div class='searchResultElement'><a href='{$url}'>" . $user['login'] . "</a></div>";
}
} else {
echo "Нет Результатов";
}
}
?>