本文整理汇总了PHP中getPath函数的典型用法代码示例。如果您正苦于以下问题:PHP getPath函数的具体用法?PHP getPath怎么用?PHP getPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getPath函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initContent
public function initContent()
{
$this->initTabModuleList();
$this->renderPageHeaderToolbar();
$this->admin_cms_categories->token = $this->token;
$this->admin_cms->token = $this->token;
if ($this->display == 'edit_category') {
$this->content .= $this->admin_cms_categories->renderForm();
} elseif ($this->display == 'edit_page') {
$this->content .= $this->admin_cms->renderForm();
} elseif ($this->display == 'view_page') {
$fixme = 'fixme';
} else {
$id_cms_category = (int) Tools::getValue('id_cms_category');
if (!$id_cms_category) {
$id_cms_category = 1;
}
// CMS categories breadcrumb
$cms_tabs = array('cms_category', 'cms');
// Cleaning links
$cat_bar_index = self::$currentIndex;
foreach ($cms_tabs as $tab) {
if (Tools::getValue($tab . 'Orderby') && Tools::getValue($tab . 'Orderway')) {
$cat_bar_index = preg_replace('/&' . $tab . 'Orderby=([a-z _]*)&' . $tab . 'Orderway=([a-z]*)/i', '', self::$currentIndex);
}
}
$this->context->smarty->assign(array('cms_breadcrumb' => getPath($cat_bar_index, $id_cms_category, '', '', 'cms'), 'page_header_toolbar_btn' => $this->page_header_toolbar_btn, 'page_header_toolbar_title' => $this->toolbar_title));
$this->content .= $this->admin_cms_categories->renderList();
$this->admin_cms->id_cms_category = $id_cms_category;
$this->content .= $this->admin_cms->renderList();
}
$this->context->smarty->assign(array('content' => $this->content));
}
示例2: rss_feed_url
function rss_feed_url()
{
if (getConfig('rss.output.usemodrewrite')) {
return getPath() . $GLOBALS['rss']->currentFeed->escapedTitle . "/";
}
return getPath() . "feed.php?channel=" . $GLOBALS['rss']->currentFeed->cid;
}
示例3: initMage
function initMage($code = '')
{
$path = getPath(dirname(__FILE__), 3);
if (file_exists($path . '/app/Mage.php')) {
include_once $path . '/app/Mage.php';
Mage::app($code);
}
}
示例4: print_styles
function print_styles()
{
echo '<link href="' . getPath() . '/style.css" rel="stylesheet">';
global $con;
$result = mysqli_query($con, "SELECT css FROM css WHERE pid = " . $this->id . "");
while ($row = mysqli_fetch_array($result)) {
echo '<link href="' . getPath() . '/' . $row['css'] . '" rel="stylesheet">';
}
}
示例5: getPage
function getPage($page)
{
global $menu;
$p=getPath($page,$menu);
if($p=="")
return pageNotFound($page);
include($p);
return html(head().view());
}
示例6: themes
function themes()
{
$themes = getThemes();
if (isset($_GET['theme']) && array_key_exists($_GET['theme'], $themes)) {
$active_theme = sanitize($_GET['theme'], RSS_SANITIZER_SIMPLE_SQL | RSS_SANITIZER_NO_SPACES);
$sql = "update " . getTable('config') . " set value_ = '{$active_theme}'" . " where key_='rss.output.theme'";
rss_query($sql);
rss_invalidate_cache();
} else {
$active_theme = getConfig('rss.output.theme');
}
echo "<form style=\"float:right\" method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">\n" . "<p><input type=\"hidden\" name=\"" . CST_ADMIN_DOMAIN . "\" value=\"" . CST_ADMIN_DOMAIN_THEMES . "\" />\n" . "<input type=\"submit\" name=\"admin_themes_check_for_updates\" value=\"" . __('Check for Updates') . "\" /></p>\n" . "</form>\n";
if (isset($_POST['admin_themes_check_for_updates'])) {
theme_getThemesUpdate($themes);
}
echo "<h2 class=\"trigger\">" . __('Themes') . "</h2>\n" . "<div id=\"admin_themes\" >\n";
echo __('<p style="font-size:small">Themes are made of a set of template files which specify how your Gregarius installation looks.<br />More themes can be downloaded from the <a style="text-decoration:underline" href="http://themes.gregarius.net/">Themes Repository</a>.</p>');
foreach ($themes as $entry => $theme) {
extract($theme);
if (!$name) {
$name = $entry;
}
if ($url) {
$author = "<a href=\"{$url}\">{$author}</a>";
}
$active = $entry == $active_theme;
$updateAvailable = isset($theme['updateVersion']);
if ($screenshot) {
$screenshotURL = "<img src=\"" . getPath() . RSS_THEME_DIR . "/{$fsname}/{$screenshot}\" />";
} else {
$screenshotURL = "<img src=\"" . getPath() . RSS_THEME_DIR . "/default/media/noscreenshot.png\" />";
}
$h4 = "{$name}";
$h5 = "By {$author} | Version: {$version}";
if ($updateAvailable) {
$h5 .= ' | <a class="update" href="' . $theme['updateUrl'] . '">Update to version ' . $theme['updateVersion'] . '</a>';
}
if ($htmltheme) {
$seturl = "index.php?view=themes&theme={$entry}";
} else {
$seturl = "";
}
echo "<div class=\"themeframe" . ($active ? " active" : "") . ($updateAvailable ? " hilite" : "") . "\"><span>";
if (!$active && $htmltheme) {
echo "<a href=\"{$seturl}\" class=\"bookmarklet\">" . __('Use this Theme') . "</a>";
} elseif ($active) {
echo "<p class=\"bookmarklet\">" . __('Active Theme') . "</p>";
}
echo "<h4>{$h4}</h4>\n";
if (file_exists("../" . RSS_THEME_DIR . "/{$fsname}/config.php")) {
echo "<a class=\"bookmarklet\" href=\"" . $_SERVER['PHP_SELF'] . "?" . CST_ADMIN_DOMAIN . "=" . CST_ADMIN_DOMAIN_THEME_OPTIONS . "&theme=" . $entry . "&" . CST_ADMIN_VIEW . "=" . CST_ADMIN_DOMAIN_THEME_OPTIONS . "\">" . __('Configure') . "</a>";
}
echo "<h5>{$h5}</h5>\n" . "<p class=\"themescreenshot\">{$screenshotURL}</p>" . "<p>{$description}</p> " . "</span></div>\n";
}
echo "</div>\n";
}
示例7: render
function render()
{
$output = View::do_fetch(getPath('views/main/sitemap.php'), $this->data);
// write the sitemap
writeFile(APP . 'public/sitemap.xml', $output, 'w');
// write the compressed sitemap
writeFile(APP . 'public/sitemap.xml.gz', $output, 'w9');
// view the Sitemap XML
//header('Location: ./sitemap.xml');
}
示例8: __autoload
function __autoload($class_name)
{
$path = getPath($class_name);
if (file_exists($path)) {
require_once $path;
return true;
}
echo "Class not found: " . $path;
return false;
}
示例9: requestAllPages
function requestAllPages()
{
$page = new Page();
$page->tablename = "pages";
$pages = $page->retrieve_many("date LIKE '%" . $this->data['date'] . "%'");
$view = getPath('views/archives/body.php');
foreach ($pages as $data) {
$data['view'] = $view;
$this->data['body'][] = $data;
}
}
示例10: opml_export_form
function opml_export_form()
{
if (getConfig('rss.output.usemodrewrite')) {
$method = "post";
$action = getPath() . "opml";
} else {
$method = "get";
$action = getPath() . "opml.php";
}
echo "<fieldset style=\"vertical-align:top\">\n<legend>" . __('Export OPML:') . "</legend>\n";
echo "<form method=\"{$method}\" action=\"{$action}\">\n" . "<p><label for=\"action\">" . __('Export OPML:') . "</label>\n" . "<input type=\"submit\" name=\"act\" id=\"action\" value=\"" . __('Export') . "\" />" . "</p>\n</form>\n" . "</fieldset>\n";
}
示例11: Navigation
function Navigation()
{
$this->appendNavItem(getPath(), __('<span>H</span>ome'), LOCATION_HOME);
if (!getConfig("rss.config.restrictrefresh")) {
$this->appendNavItem(getPath() . 'update.php', __('<span>R</span>efresh'), LOCATION_UPDATE);
}
$this->appendNavItem(getPath() . 'search.php', __('<span>S</span>earch'), LOCATION_SEARCH);
$this->appendNavItem(getPath() . 'admin/', __('A<span>d</span>min'), LOCATION_ADMIN);
if (($an = rss_plugin_hook('rss.plugins.afternav', null)) != null) {
$this->postRender .= $an;
}
$GLOBALS['rss']->nav = $this;
rss_plugin_hook('rss.plugins.navelements', null);
}
示例12: getPath
function getPath(array $ret, $id, $mysqli)
{
$query = "SELECT * FROM shop WHERE s_rowID='{$id}'";
$result = $mysqli->query($query);
$obj = $result->fetch_object();
if ($obj->s_parent == "") {
$ret[] = array($obj->s_title, $obj->s_rowID);
$ret[] = array("Shop", "");
return $ret;
} else {
$ret[] = array($obj->s_title, $obj->s_rowID);
return getPath($ret, $obj->s_parent, $mysqli);
}
}
示例13: env_CFG
function env_CFG()
{
$content = file_get_contents("/etc/profile.d/werm.sh");
//------------------------------------
preg_match_all("/(.*?)=(.*?)\$/m", (string) $content, $match, PREG_SET_ORDER);
//------------------------------------
foreach ($match as $key => $value) {
$env[$value[1]] = $value[2];
}
//------------------------------------
foreach ($env as $key => $value) {
$_ENV[$key] = getPath($env[$key], $env);
}
}
示例14: indexAction
public function indexAction()
{
if ($this->has('security.csrf.token_manager')) {
$csrfToken = $this->get('security.csrf.token_manager')->getToken('authenticate')->getValue();
} else {
// BC for SF < 2.4
$csrfToken = $this->has('form.csrf_provider') ? $this->get('form.csrf_provider')->generateCsrfToken('authenticate') : null;
}
$em = $this->getDoctrine()->getManager();
$media = $em->getRepository('SiteBackOfficeBundle:Media')->findOneById('31');
$session = $this->getRequest()->getSession();
var_dump($media . getPath());
die;
return $this->render('SiteFrontOfficeBundle:Default:index.html.twig', array('csrf_token' => $csrfToken, 'media' => $media));
}
示例15: getBody
public static function getBody($path)
{
// pls replace strng $path with proper params array (make parameter generation more abstruct)
$items = array();
$tag = preg_replace('#^tag/#', '', $path);
$page = new Page();
$page->tablename = "pages";
$pages = $page->retrieve_many("tags like '%" . $tag . "%'");
$view = getPath('views/tag/body.php');
foreach ($pages as $data) {
$data['view'] = $view;
$items[] = $data;
}
return $items;
}