• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getPageURL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getPageURL函数的典型用法代码示例。如果您正苦于以下问题:PHP getPageURL函数的具体用法?PHP getPageURL怎么用?PHP getPageURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getPageURL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: printPageListWithNavAlt

function printPageListWithNavAlt($prevtext, $nexttext, $nextprev = true, $class = NULL, $id = "pagelist")
{
    echo "<div" . ($id ? " id=\"{$id}\"" : "") . " class=\"{$class}\">";
    $total = getTotalPages();
    $current = getCurrentPage();
    echo "\n<ul class=\"{$class}\"><li>[</li>";
    for ($i = 1; $i <= $total; $i++) {
        echo "\n  <li" . ($i == $current ? " class=\"current\"" : "") . ">";
        printLinkHTML(getPageURL($i), $i, "Page {$i}" . ($i == $current ? " (Current Page)" : ""));
        echo "</li>";
    }
    echo "\n<li>]</li>";
    if ($nextprev) {
        echo "\n  <li class=\"prev\">";
        printPrevPageURL($prevtext, "Previous Page");
        echo "</li>";
    }
    echo "\n<li></li>";
    if ($nextprev) {
        echo "\n  <li class=\"next\">";
        printNextPageURL($nexttext, "Next Page");
        echo "</li>";
    }
    echo "\n</ul>";
    echo "\n</div>\n";
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:26,代码来源:functions.php


示例2: addWebsite

/**
 * Add a page to the Sitemap and start adding the children
 */
function addWebsite($startNode, &$map)
{
    global $c, $variations;
    $childs = createDBCArray("sitemap", "MENU_ID", "PARENT_ID=" . $startNode . " AND VERSION=10 AND DELETED=0");
    for ($i = 0; $i < count($childs); $i++) {
        for ($j = 0; $j < count($variations); $j++) {
            if (!isMenuExpired($childs[$i], $variations[$j])) {
                $url = $c["livehost"] . $c["livedocroot"] . getPageURL($childs[$i], $variations[$j]);
                $map->AddURL($url);
            }
            addWebsite($childs[$i], $map);
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:17,代码来源:update.php


示例3: gettext

        if ($imagePage = isImagePage()) {
            ?>
 					<div id="flash">
 					<p align=center><font color=#663300><?php 
            echo gettext('For the best viewing experience') . ' ';
            ?>
<a href="http://www.macromedia.com/go/getflashplayer/"><?php 
            echo gettext('get Adobe Flash.');
            ?>
</a></p>
 					<p align="center"><a href="
 					<?php 
            if ($imagePage) {
                $url = html_encode(getPageURL(getTotalPages(true)));
            } else {
                $url = html_encode(getPageURL(getCurrentPage()));
            }
            if (substr($url, -1, 1) == '/') {
                $url = substr($url, 0, strlen($url) - 1);
            }
            echo $url = $url . (MOD_REWRITE ? "?" : "&amp;") . 'noflash';
            ?>
">
 					View gallery without Flash</a>.</p>
 					</div> <!-- flash -->
 					<?php 
            $flash_url = "index.php?p=search" . html_encode(getSearchParams()) . "&amp;format=xml";
            ?>
 					<script type="text/javascript">
 						// <!-- <![CDATA[
						var fo = new SWFObject("<?php 
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:search.php


示例4: htmlspecialchars

        $iw = NULL;
        $ih = 89;
        $ch = 89;
        $cw = 67;
    }
    echo "\n<li class=\"thumb\"><span><em style=\"background-image:url(" . htmlspecialchars($_zp_current_image->getCustomImage(NULL, $iw, $ih, $cw, $ch, NULL, NULL, true)) . '); "><a href="' . htmlspecialchars(getImageLinkURL()) . '" title="' . getAnnotatedImageTitle() . '" style="background:#fff;">"' . getImageTitle() . '"</a></em></span></li>';
}
if (!is_null($lastImage) && $lastImage < getNumImages()) {
    $np = getCurrentPage() + 1;
    ?>
			<li class="thumb"><span class="forward"><em style="background-image:url('<?php 
    echo $_zp_themeroot;
    ?>
/images/moreslide_next.gif');">
			<a href="<?php 
    echo htmlspecialchars(getPageURL($np, $np));
    ?>
" style="background:#fff;"><?php 
    echo gettext('Next page');
    ?>
</a></em></span></li>
		<?php 
}
?>
	</ul>

	<div class="galleryinfo">
		<p>Feed for this album: <?php 
printRSSLink('Album', '', '', '', true, 'i');
?>
</p>
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:31,代码来源:search.php


示例5: characterData

 function characterData($parser, $data)
 {
     global $data_row;
     global $currentTag;
     global $check2;
     global $title_row;
     global $w;
     global $postGisQueryFieldLink;
     global $postGisQueryLinkTarget;
     global $postGisQueryContentLink;
     global $postGisQueryDataPrefix;
     global $postGisQueryLinkStyle;
     global $postGisGetPlanUrl;
     global $postGisQueryReference;
     global $postGisQueryCustomFunction;
     global $table_title;
     global $postGisQueryUrlEncode;
     global $gid;
     global $the_geom;
     global $iLangID;
     global $postgisObject;
     if ($currentTag == "GID") {
         $gid = $data;
     }
     if ($check2 == true && ($currentTag != "GID" && $currentTag != "FID")) {
         if ($postGisQueryCustomFunction[$table_title][$currentTag]) {
             $data = altValue($data);
         }
         if ($postGisQueryReference[$table_title][$currentTag]) {
             $__array = explode(",", $postGisQueryReference[$table_title][$currentTag]);
             $data = $postgisObject->referenceTableLookup($__array[0], $__array[1], $__array[2], $data);
         }
         if ($postGisQueryFieldLink[$table_title][$currentTag] == "" && $postGisQueryContentLink[$table_title] != $currentTag && $postGisGetPlanUrl[$table_title] != $currentTag && $postGisQueryUrlEncode[$table_title][$currentTag] == "") {
             $data_row = $data_row . "<td class='output-table-cell'>" . $data . "</td>";
         }
         if ($postGisQueryFieldLink[$table_title][$currentTag] != "" && $postGisGetPlanUrl[$table_title] != true) {
             $data_row = $data_row . "<td class='output-table-cell'><a " . $postGisQueryLinkStyle[$table_title] . " " . $postGisQueryLinkTarget[$table_title] . " href='" . $postGisQueryFieldLink[$table_title][$currentTag] . "?table=" . $table_title . "&gid=" . $gid . "'>" . $data . "</a></td>";
         }
         if ($postGisQueryContentLink[$table_title] == $currentTag && $postGisGetPlanUrl[$table_title] != $currentTag) {
             $newData = "<a " . $postGisQueryLinkStyle[$table_title] . " href='" . $postGisQueryDataPrefix[$table_title] . urldecode($data) . "' " . $postGisQueryLinkTarget[$table_title] . ">" . urldecode($data) . "</a>";
             $data = $newData;
             $data_row = $data_row . "<td class='output-table-cell'>" . $data . "</td>";
             //echo "<script>alert(\"$newData\");</script>";
         }
         if ($postGisQueryUrlEncode[$table_title][$currentTag] && $postGisQueryContentLink[$table_title] != $currentTag) {
             $newData = urldecode($data);
             $data = $newData;
             $data_row = $data_row . "<td class='output-table-cell'>" . $data . "</td>";
         }
         if ($postGisGetPlanUrl[$table_title] == $currentTag && $postGisGetPlanUrl[$table_title] != "") {
             $arrContentInfo = getPlanContentInfoByKeyValue($data);
             $newData = "<a " . $postGisQueryLinkStyle[$table_title] . " href='" . getPageURL($arrContentInfo["IPAGEID"], $iLangID) . "' " . $postGisQueryLinkTarget[$table_title] . ">{$data}</a>";
             $data = $newData;
             $data_row = $data_row . "<td class='output-table-cell'>" . $data . "</td>";
         }
         $check2 = false;
     }
 }
开发者ID:netcon-source,项目名称:MyGeoCloud,代码行数:58,代码来源:functions.php


示例6: gettext

			<div id="flash">
					<p align="center">
			<font color=#663300><?php 
                echo gettext('For the best viewing experience') . ' ';
                ?>
<a href="http://www.macromedia.com/go/getflashplayer/"><?php 
                echo gettext('Get Adobe Flash.');
                ?>
</a></font>
			</p>
						<p align="center">
 						<?php 
                if ($imagePage) {
                    $url = htmlspecialchars(getPageURL(getTotalPages(true)));
                } else {
                    $url = htmlspecialchars(getPageURL(getCurrentPage()));
                }
                printLinkWithQuery($url, 'noflash', gettext('View Gallery Without Flash'));
                echo "</p>";
                $flash_url = htmlspecialchars(getAlbumLinkURL());
                if (substr($flash_url, -1, 1) == '/') {
                    $flash_url = substr($flash_url, 0, -1);
                }
                $flash_url = $flash_url . (getOption("mod_rewrite") ? "?" : "&amp;") . "format=xml";
                ?>
 						<script type="text/javascript">
									var fo = new SWFObject("<?php 
                echo $_zp_themeroot;
                ?>
/simpleviewer.swf", "viewer", "100%", "100%", "7", "<?php 
                echo $backgroundColor;
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:31,代码来源:album.php


示例7: sitepage_names

	// synchronize.... because new feature
	if (countRows("sitepage_names", "SPID", "SPID = $spid AND VARIATION_ID = $variation") < 1) {
		$sql = "INSERT INTO sitepage_names (SPID, VARIATION_ID) VALUES ($spid, $variation)";

		$query = new query($db, $sql);
		$query->free();
	}

	$menuPanel->add($switchbar);
	$menuPanel->add(new Cell('clc', '', 3, 600,10));
	$menuPanel->add(new SubTitle("st", $lang->get("sp_menuprops"), 3));
	$menuPanel->add(new Cell('clc', '', 3, 600,10));
	$menuPanel->add(new TextInput($lang->get("sp_menuname"), "sitepage_names", "NAME", "VARIATION_ID = $variation AND SPID = $spid", "type:text,size:128,width:300", ""));
	$menuPanel->add(new TextInput($lang->get("sp_menudescription", "Page Description (for sitemap...)"), "sitepage_names","HELP", "VARIATION_ID = $variation AND SPID = $spid", "type:textarea,size:5,width:400", ""));
	$menuPanel->add(new Label('lbl', $lang->get('url', 'URL'), 'standard',1));
	$uri = getPageURL($menuID, $variation);
	if (file_exists($c["livepath"].$uri)) {
		$menuPanel->add(new Label('lbl', '<a href="'.$c["host"].$c["livedocroot"].$uri.'" target="_blank">'.$c["host"].$c["livedocroot"].$uri.'</a>', 'standardlight',2));
	} else {		
		$menuPanel->add(new Label('lbl', $c["host"].$c["livedocroot"].$uri, 'standardlight',2));		
	}
	
	if ($aclf->checkAccessToFunction("DIRECT_URL")) {		
		$menuPanel->add(new Cell('clc', '', 3, 600,10));
		$menuPanel->add(new SubTitle("st", $lang->get("sp_menudirecttitle", "Define optional Path on server for direct access"), 3));
		$menuPanel->add(new Cell('clc', '', 3, 600,10));
		$durl = new TextInput($lang->get("sp_menudirect", "Direct url on Live Server"), "sitepage_names", "DIRECT_URL", "VARIATION_ID=$variation AND VERSION=0 AND SPID = " . $spid, "type:text,size:64;width:300", "UNIQUE");
		$durl->setFilter("VERSION=0");
		$menuPanel->add($durl);
	}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:30,代码来源:panel_menu.inc.php


示例8: html_encode

        $iw = NULL;
        $ih = 89;
        $ch = 89;
        $cw = 67;
    }
    echo "\n<li class=\"thumb\"><span><em style=\"background-image:url(" . html_encode($_zp_current_image->getCustomImage(NULL, $iw, $ih, $cw, $ch, NULL, NULL, true)) . '); "><a href="' . html_encode(getImageLinkURL()) . '" title="' . getAnnotatedImageTitle() . '" style="background:#fff;">"' . getImageTitle() . '"</a></em></span></li>';
}
if (!is_null($lastImage) && $lastImage < getNumImages()) {
    $np = getCurrentPage() + 1;
    ?>
			<li class="thumb"><span class="forward"><em style="background-image:url('<?php 
    echo $_zp_themeroot;
    ?>
/images/moreslide_next.gif');">
			<a href="<?php 
    echo html_encode(getPageURL($np, $np));
    ?>
" style="background:#fff;"><?php 
    echo gettext('Next page');
    ?>
</a></em></span></li>
		<?php 
}
?>
	</ul>

	<div class="galleryinfo">
		<?php 
$params = $_zp_current_search->getSearchParams();
if (!empty($params)) {
    if ($results != "0") {
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:search.php


示例9: printRSSLink

        ?>
" ><span class="next"></span></a>
			<?php 
    } else {
        ?>
				<span class="next-disabled"></span>		
			<?php 
    }
}
?>
		</div>
	</div>
</div>

<div id="credit"><?php 
printRSSLink('News', '', 'News RSS', '', false);
?>
 | <a href="<?php 
echo getCustomPageURL("archive");
?>
">Archives</a> | <a href="<?php 
echo getPageURL('credits');
?>
">Credits</a> | Powered by <a href="http://www.zenphoto.org" title="A simpler web photo album">zenphoto</a></div>

<?php 
zp_apply_filter('theme_body_close');
?>
</body>
</html>
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:30,代码来源:news.php


示例10: printPageURL

/**
 * Prints the url to a specific zenpage page
 *
 * @param string $linktext Text for the URL
 * @param string $titlelink page to include in URL
 * @param string $prev text to insert before the URL
 * @param string $next text to follow the URL
 * @param string $class optional class
 */
function printPageURL($linktext = NULL, $titlelink = NULL, $prev = '', $next = '', $class = NULL)
{
    if (!is_null($class)) {
        $class = 'class="' . $class . '"';
    }
    if (is_null($linktext)) {
        $linktext = getPageTitle();
    }
    echo $prev . "<a href=\"" . html_encode(getPageURL($titlelink)) . "\" {$class} title=\"" . html_encode($linktext) . "\">" . html_encode($linktext) . "</a>" . $next;
}
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:19,代码来源:zenpage-template-functions.php


示例11: getPageLinkURL

/**
 * @deprecated
 * @since 1.4.6
 */
function getPageLinkURL($titlelink = '')
{
    deprecated_functions::notify(gettext('use getPageURL()'));
    return getPageURL($titlelink);
}
开发者ID:rb26,项目名称:zenphoto,代码行数:9,代码来源:deprecated-functions.php


示例12: clearURLPage

	/**
	 * Clear the page with URL-Path
	 * 
	 * @param integer SitepageId of the page
	 * @param integer VariationId of the page
	 */
	function clearURLPage($spid, $variation) {
		global $c;

		$menuId = getDBCell("sitepage", "MENU_ID", "SPID=".$spid);
	    $short = getPageURL($menuId, $variation);
		if (substr($short, 0, 1) == "/")
			$short = substr($short, 1);

		$allDir = $c["livepath"];
		// ensure that path exists
		$directories = explode("/", $short);

		if (count($directories) > 0) {
			for ($i = 0; $i < count($directories); $i++) {
				$thisDir = $directories[$i];

				if ($thisDir != "") {
					$allDir = $allDir . $thisDir . "/";
				}
			}

			// delete old index file 
			if (file_exists($allDir . "index.php")) {
				nxDelete ($allDir, "index.php");
			}

			// create new index-file...
			global $c;
			$index = '<html>';
			$index .= '<head>';
			$index .= '<title>Page does not exist</title>';
			$index .= '<meta name="generator" content="N/X WCMS">';
			$index .= '</head>';
			$index .= '<body text="#000000" bgcolor="#FFFFFF" link="#FF0000" alink="#FF0000" vlink="#FF0000">';
			$index .= '<center>';
			$index .= '<font face="VERDANA" size="2">';
			$index .= 'The URL you entered is not available at present.<br>';
			$index .= 'Please try again later or go to <a href="' . $c["livedocroot"] . '">Startpage</a>.';
			$index .= '</font>';
			$index .= '</center>';
			$index .= '</body>';
			$index .= '</html>';

			// write to disk 
			$index_file = @fopen($allDir . "index.php", "w");
			@fwrite($index_file, $index);
			@fclose ($index_file);
		}	
	}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:55,代码来源:launch.php


示例13: printPageListWithNav

/**
 * Prints a full page navigation including previous and next page links with a list of all pages in between.
 *
 * @param string $prevtext Insert here the linktext like 'previous page'
 * @param string $nexttext Insert here the linktext like 'next page'
 * @param bool $oneImagePage set to true if there is only one image page as, for instance, in flash themes
 * @param string $nextprev set to true to get the 'next' and 'prev' links printed
 * @param string $class Insert here the CSS-class name you want to style the link with (default is "pagelist")
 * @param string $id Insert here the CSS-ID name if you want to style the link with this
 * @param bool $firstlast Add links to the first and last pages of you gallery
 * @param int $navlen Number of navigation links to show (0 for all pages). Works best if the number is odd.
 */
function printPageListWithNav($prevtext, $nexttext, $oneImagePage = false, $nextprev = true, $class = 'pagelist', $id = NULL, $firstlast = true, $navlen = 9)
{
    $total = getTotalPages($oneImagePage);
    $current = getCurrentPage();
    if ($total < 2) {
        $class .= ' disabled_nav';
    }
    if ($navlen == 0) {
        $navlen = $total;
    }
    $extralinks = 2;
    if ($firstlast) {
        $extralinks = $extralinks + 2;
    }
    $len = floor(($navlen - $extralinks) / 2);
    $j = max(round($extralinks / 2), min($current - $len - (2 - round($extralinks / 2)), $total - $navlen + $extralinks - 1));
    $ilim = min($total, max($navlen - round($extralinks / 2), $current + floor($len)));
    $k1 = round(($j - 2) / 2) + 1;
    $k2 = $total - round(($total - $ilim) / 2);
    echo "<div" . ($id ? " id=\"{$id}\"" : "") . " class=\"{$class}\">\n";
    echo "<ul class=\"{$class}\">\n";
    if ($nextprev) {
        echo "<li class=\"prev\">";
        printPrevPageLink($prevtext, gettext("Previous Page"));
        echo "</li>\n";
    }
    if ($firstlast) {
        echo '<li class="' . ($current == 1 ? 'current' : 'first') . '">';
        if ($current == 1) {
            echo '1';
        } else {
            printLink(getPageURL(1, $total), 1, gettext("Page 1"));
        }
        echo "</li>\n";
        if ($j > 2) {
            echo "<li>";
            printLink(getPageURL($k1, $total), $j - 1 > 2 ? '...' : $k1, sprintf(ngettext('Page %u', 'Page %u', $k1), $k1));
            echo "</li>\n";
        }
    }
    for ($i = $j; $i <= $ilim; $i++) {
        echo "<li" . ($i == $current ? " class=\"current\"" : "") . ">";
        if ($i == $current) {
            $title = sprintf(ngettext('Page %1$u (Current Page)', 'Page %1$u (Current Page)', $i), $i);
            echo $i;
        } else {
            $title = sprintf(ngettext('Page %1$u', 'Page %1$u', $i), $i);
            printLink(getPageURL($i, $total), $i, $title);
        }
        echo "</li>\n";
    }
    if ($i < $total) {
        echo "<li>";
        printLink(getPageURL($k2, $total), $total - $i > 1 ? '...' : $k2, sprintf(ngettext('Page %u', 'Page %u', $k2), $k2));
        echo "</li>\n";
    }
    if ($firstlast && $i <= $total) {
        echo "\n  <li class=\"last\">";
        if ($current == $total) {
            echo $total;
        } else {
            printLink(getPageURL($total, $total), $total, sprintf(ngettext('Page {%u}', 'Page {%u}', $total), $total));
        }
        echo "</li>";
    }
    if ($nextprev) {
        echo "<li class=\"next\">";
        printNextPageLink($nexttext, gettext("Next Page"));
        echo "</li>\n";
    }
    echo "</ul>\n";
    echo "</div>\n";
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:85,代码来源:template-functions.php


示例14: getLink

	/**
	 * returns the uri for this menu-item
	 * @param array additional parameters, use: array('varname1'=>'value1', 'varname2'=>'value2'), the routine encodes the values with rawurlencode (RFC 1738), using array('value1','value2') results in '&var0=value1&var1=value2'
	 * @return string uri for menu-item.
	 */
	function getLink($addparas = null) {
		global $c;

		$sessionid = $addparas[$c["sessionidname"]];
		$sessionid = ($sessionid != "") ? $sessionid : value($c["sessionidname"], "NOSPACES");
		$linkadd = ($sessionid != "" && $sessionid != "0") ? ('&' . $c["sessionidname"] . '=' . $sessionid) : "";

		if (is_array($addparas)) {
			foreach ($addparas as $key => $value) {
				if ($key != $c["sessionidname"])
					$linkadd .= '&' . ((is_int($key)) ? 'var' . $key : $key) . '=' . rawurlencode($value);
			}
		}
				
		
		if ($this->level == 10) { // Live-Version			
			$cached = getDBCell("sitemap", "IS_CACHED", "MENU_ID = $this->menuId");

			if (!$c["classicurls"]) {
			  return $c["docroothtml"].getPageURL($this->menuId, $this->variation);
			} else {
				if ($c["renderstatichtml"] && ($cached == 1)) {
					$spname = getSPNameUrlSafe($this->pageId);
					$link_uri = $c["cachedocroot"] . $spname . "_" . $this->pageId . "_v" . $this->variation . ".html";

					return ($link_uri);
				} else {
					$template = $this->getTemplate();
					$link_uri = $c["docroothtml"] . $template . "?page=" . $this->pageId . "&v=" . $this->variation;
					return ($link_uri . $linkadd);
				}
			}
		} else { // Development- (Template-) Version
			$template = $this->getTemplate();
			$link_uri = $c["devdocroot"] . $template . "?page=" . $this->pageId . "&v=" . $this->variation;
			return ($link_uri . $linkadd);
		}
	}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:43,代码来源:menu.php


示例15: displayDefaultCategories

 function displayDefaultCategories()
 {
     $categories = modApiFunc("Catalog", "getSubcategoriesFullListWithParent", 1, false);
     $_Cat_Info = new CCategoryInfo(1);
     // Category Info get for Home Category
     $countOfSubCategory = $_Cat_Info->getCategoryTagValue('subcategoriesnumber') + 1;
     //Count total number of item in the subcategory of Home category
     $slicedcats = array_slice($categories, 0, $countOfSubCategory);
     $count = count($categories);
     $value = "";
     foreach ($slicedcats as $category) {
         if ($category['level'] == 0 || $category['level'] == 1) {
             $catid = $category["id"];
             $catmainlink = getCategoryLink($catid);
             $cathomelink = getPageURL('Categories {1}');
             $value .= "<li>";
             if ($catid == 1) {
                 $value .= "<a href='{$cathomelink}' class='parent'><span>" . $category['name'] . "</span></a>\n\t\t\t\t\t    <div><ul>";
             } else {
                 $value .= "<a href='{$catmainlink}' class='parent'><span>" . $category['name'] . "</span></a>\n\t\t\t\t\t    <div><ul>";
             }
             if (modApiFunc("Catalog", "hasOnlineSubcategories", $category['id']) && $category['level'] > 0) {
                 $value .= $this->defaultsubcatlevel($category['id'], 1);
                 // Looping for subcategories
             }
             $value .= "</ul></div></li>";
         }
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:30,代码来源:cms_menu_cz.php


示例16: session_start

<?php

session_start();
if (!isset($_SESSION["username"])) {
    $isRememberedLogin = "";
    //Test for remember me cookie
    if (isset($_COOKIE['sg_timesheetUN'], $_COOKIE['sg_timesheetPW'])) {
        $username = $_COOKIE['sg_timesheetUN'];
        //Look for username row
        $result = preparedStmt("SELECT username, password, level, enabled, salt FROM users WHERE username=?", array("s", $username));
        $userData = $result ? $result[0] : 0;
        if ($userData) {
            if ($userData['enabled']) {
                $cookieHash = hash('sha256', $userData['password'] . "{" . $userData['salt'] . "}");
                //Hash of pw hash+salt
                if ($cookieHash == $_COOKIE['sg_timesheetPW']) {
                    $isRememberedLogin = true;
                    createUserSession($username, $userData['level']);
                }
            }
        }
    }
    if (!$isRememberedLogin) {
        $_SESSION["deniedURL"] = getPageURL();
        header("Location:login_page.php");
        exit;
    }
}
开发者ID:robCrawford,项目名称:SlickGrid-Timesheet,代码行数:28,代码来源:test_login_user.php


示例17: printPageListWithNav

/**
 * Prints a full page navigation including previous and next page links with a list of all pages in between.
 *
 * @param string $prevtext Insert here the linktext like 'previous page'
 * @param string $nexttext Insert here the linktext like 'next page'
 * @param bool $oneImagePage set to true if there is only one image page as, for instance, in flash themes
 * @param string $nextprev set to true to get the 'next' and 'prev' links printed
 * @param string $class Insert here the CSS-class name you want to style the link with (default is "pagelist")
 * @param string $id Insert here the CSS-ID name if you want to style the link with this
 */
function printPageListWithNav($prevtext, $nexttext, $oneImagePage = false, $nextprev = true, $class = 'pagelist', $id = NULL)
{
    $total = getTotalPages($oneImagePage);
    if ($total < 2) {
        $class .= ' disabled_nav';
    }
    echo "<div" . ($id ? " id=\"{$id}\"" : "") . " class=\"{$class}\">";
    $current = getCurrentPage();
    echo "\n<ul class=\"{$class}\">";
    if ($nextprev) {
        echo "\n  <li class=\"prev\">";
        printPrevPageLink($prevtext, gettext("Previous Page"));
        echo "</li>";
    }
    $j = max(1, min($current - 3, $total - 6));
    if ($j != 1) {
        echo "\n <li>";
        printLink(getPageURL($k = max($j - 4, 1), $total), '...', "Page {$k}");
        echo '</li>';
    }
    for ($i = $j; $i <= min($total, $j + 6); $i++) {
        echo "\n  <li" . ($i == $current ? " class=\"current\"" : "") . ">";
        printLink(getPageURL($i, $total), $i, "Page {$i}" . ($i == $current ? ' ' . gettext("(Current Page)") : ""));
        echo "</li>";
    }
    if ($i <= $total) {
        echo "\n <li>";
        printLink(getPageURL($k = min($j + 10, $total), $total), '...', "Page {$k}");
        echo '</li>';
    }
    if ($nextprev) {
        echo "\n  <li class=\"next\">";
        printNextPageLink($nexttext, gettext("Next Page"));
        echo "</li>";
    }
    echo "\n</ul>";
    echo "\n</div>\n";
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:48,代码来源:template-functions.php


示例18: jpcacheFilename

 function jpcacheFilename($spid, $variation)
 {                        
     global $c;
 	$menu = getDBCell("sitepage", "MENU_ID", "SPID=".$spid);
 	$varkey = 'GET=N;';
 	$name = $c['livedocroot'].getPageURL($menu, $variation).'/index.php';    	
 	$key = md5($name.$varkey);
     return $key;
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:9,代码来源:cache.php


示例19: ParameterValue

     $parameters[2]->Value = "12/31/2003";
     $parameters[3] = new ParameterValue();
     $parameters[3]->Name = "ProductSubcategory";
     $parameters[3]->Value = "2";
     $rs->SetExecutionParameters2($parameters);
 }
 $renderAsHTML = new RenderAsHTML();
 //The ReplcementRoot option of HTML rendering extension is used to
 //redirect all calls to reporting serice server to this php file.
 //The StreamRoot option of HTML rendering extension used instruct
 //HTML rendering extension about how to construct the URLs to images in the
 //report.
 //Please refer description of Sort2, Render2 and RenderStream API in
 //the userguide (./../../../docs/User Guide.html) for more details
 //about these options.
 $renderAsHTML->ReplacementRoot = getPageURL();
 $renderAsHTML->StreamRoot = './images/';
 $result_html = $rs->Render2($renderAsHTML, PageCountModeEnum::$Actual, $Extension, $MimeType, $Encoding, $Warnings, $StreamIds);
 foreach ($StreamIds as $StreamId) {
     $renderAsHTML->StreamRoot = null;
     $result_png = $rs->RenderStream($renderAsHTML, $StreamId, $Encoding, $MimeType);
     if (!($handle = fopen("./images/" . $StreamId, 'wb'))) {
         echo "Cannot open file for writing output";
         exit;
     }
     if (fwrite($handle, $result_png) === FALSE) {
         echo "Cannot write to file";
         exit;
     }
     fclose($handle);
 }
开发者ID:emeraldjunn,项目名称:quote,代码行数:31,代码来源:helloworld.php


示例20: listVM

	function listVM(keyword, sort){
		sort = sort || "label";

		$("#vm-list").html("");
		$(".progress").show();

		$.post("?q=list-vm.json", {keyword: keyword, sort: sort }, function(data){
			$(".progress").hide();

			if(!data.length){
				$("#vm-list").html(\'<p class="red">' . THERE_ARE_NO_RESULTS_FOUND . '</p>\');
				return;
			}

			$.each(data, function(i, item){
				var li = $("<li />").html(\'<span></span><ul><li style="width:18px;"><img src="images/icons/\' + item.status + \'.png" class="icon" /></li><li style="width:18px;display:none;"><div class="loading" style="margin:10px 0 0 0;"></div><li><li style="width:295px;" onclick="window.location.href=\\\'?q=view-vm&id=\' + item.id + \'&ref=' . rawurlencode(getPageURL()) . '\\\';">\' + item.label + \'</li><li style="width:40px;"><span class="\' + item.vz + \'">\' + item.vz + \'</span></li><li><button class="boot">' . BOOT . '</button> <button class="reboot">' . REBOOT . '</button> <button class="shutdown">' . SHUTDOWN . '</button></li><li style="display:none;"><div class="loading" style="margin:10px 0 0 100px;"></div><li></ul><div style="clear:both;"></div>\').attr("data-field", item.id);

				$("#vm-list").append(li);

				li.find(".icon").click(function(){
					var img = $(this);
					var p = img.parent();
					var n = p.next();

					p.hide();
					n.show();

					$.post("?q=status.json", {id: item.id}, function(data){
						$(img).attr("src", "images/icons/" + data.status + ".png");
						p.show();
						n.hide();
开发者ID:shines77,项目名称:SolusVMController,代码行数:31,代码来源:vm.php



注:本文中的getPageURL函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getPages函数代码示例发布时间:2022-05-15
下一篇:
PHP getPageTitle函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap