当前位置: 首页>>代码示例>>PHP>>正文


PHP FileManager::appendToRootPath方法代码示例

本文整理汇总了PHP中FileManager::appendToRootPath方法的典型用法代码示例。如果您正苦于以下问题:PHP FileManager::appendToRootPath方法的具体用法?PHP FileManager::appendToRootPath怎么用?PHP FileManager::appendToRootPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileManager的用法示例。


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

示例1: login

 static function login($data)
 {
     if (!isset($data["username"])) {
         return self::UM_NoUserError;
     } else {
         $u = false;
         $logged = false;
         //check nick and password
         $u = self::loadUserByNickname($data["username"]);
         // assumo che la password mi sia arrivata in chiaro attraverso una connessione sicura
         if ($u !== false && $u->getPassword() == Filter::encodePassword($data["password"])) {
             $logged = true;
         }
         if ($u === false) {
             //check mail and password
             $u = self::loadUserByMail($data["username"]);
             // assumo che la password mi sia arrivata in chiaro attraverso una connessione sicura
             if ($u !== false && $u->getPassword() == Filter::encodePassword($data["password"])) {
                 header("location: " . FileManager::appendToRootPath());
             }
         }
         if ($u !== false) {
             if ($logged) {
                 if (Session::start($u)) {
                     return true;
                 } else {
                     return self::UM_NoSessionError;
                 }
             }
             return self::UM_NoPasswordError;
         }
         return self::UM_NoUserError;
     }
 }
开发者ID:Esisto,项目名称:IoEsisto,代码行数:34,代码来源:UserManager.php

示例2: showLoginForm

    static function showLoginForm($error = null)
    {
        if ($error == null && count($_POST) > 0) {
            if (isset($_POST["username"])) {
                $data["username"] = $_POST["username"];
            } else {
                $error[] = "non c'è lo username";
            }
            if (isset($_POST["password"])) {
                $data["password"] = $_POST["password"];
            } else {
                $error[] = "password non presente";
            }
            if (count($error) > 0) {
                $s = FileManager::appendToRootPath("error?e=" . $error[0]);
            } else {
                $dataFiltered = Filter::filterArray($data);
                if (($logged = UserManager::login($data)) === true) {
                    $s = FileManager::appendToRootPath("");
                } else {
                    require_once 'errors/errors.php';
                    $s = FileManager::appendToRootPath("error?e=" . $logged);
                }
            }
            if (!headers_sent()) {
                header("location: " . $s);
            } else {
                ?>
				<script type="text/javascript">
					location.href = "<?php 
                echo $s;
                ?>
";
				</script>
				<?php 
            }
        }
        ?>
<form name="login" action="<?php 
        echo FileManager::appendToRootPath("Login");
        ?>
" method="post">
		<?php 
        //<!-- show error messages -->
        if ($error != null) {
            foreach ($error as $valore) {
                echo $valore . "<br/>";
            }
        }
        ?>
<p><input type="text" name="username" value="" /></p>
<p><input type="password" name="password" value="" /></p>
<p><input class="button" type="submit" value="Accedi"></form></p>
			<?php 
    }
开发者ID:Esisto,项目名称:IoEsisto,代码行数:55,代码来源:UserPage.php

示例3: showNoPostWarning

    static function showNoPostWarning()
    {
        ?>
	<div class="post nopost" id="nopost">
		<div class="post_header">
			<div class="post_headline clear">What are you waiting?</div>
			<div class="post_title">No Post in this site yet!</div>
			<div class="post_subtitle">Write a new post right now!</div>
		</div>
		<div class="post_content clear">
			<p><span id="post_place_publichi" class="post_place">PUBLICHI</span> -
			Wait! PubliChi is empty? What happened?</p>
			<p>You just installed it? So, what are you waiting? Write a <a href="<?php 
        echo FileManager::appendToRootPath("Post/New");
        ?>
">new post</a> and start a brand new site!!</p>
			<p>Come on! This screen is soo boring!!!</p>
			<div class="post_authorname"><a href="<?php 
        echo FileManager::appendToRootPath("User/ioesisto");
        ?>
">IoEsisto</a></div>	
		</div>
	</div>
		<?php 
    }
开发者ID:Esisto,项目名称:IoEsisto,代码行数:25,代码来源:PostPage.php

示例4: createLinkPath

 private static function createLinkPath($where = "")
 {
     require_once 'file_manager.php';
     return FileManager::appendToRootPath($where);
 }
开发者ID:Esisto,项目名称:IoEsisto,代码行数:5,代码来源:page.php

示例5: showPost

    static function showPost($post, $options = null)
    {
        if (isset($options[self::SHORTEST]) && $options[self::SHORTEST]) {
            self::showShortPost($post);
            return;
        }
        ?>
	<div class="post <?php 
        echo $post->getType();
        ?>
" id="post<?php 
        echo $post->getID();
        ?>
">
		<div class="pb_header"><?php 
        if (!isset($options[self::NO_DATE]) || !$options[self::NO_DATE]) {
            ?>
			<div class="post_creationDate"><?php 
            echo format_datetime($post->getCreationDate());
            ?>
</div><?php 
        }
        if (!isset($options[self::NO_CATEGORIES]) || !$options[self::NO_CATEGORIES]) {
            ?>
			<div class="post_categories"><?php 
            $first = true;
            $cats = explode(",", $post->getCategories());
            foreach ($cats as $cat) {
                if ($first) {
                    $first = false;
                } else {
                    echo ", ";
                }
                echo '<a href="' . FileManager::appendToRootPath('Category/' . trim(Filter::decodeFilteredText($cat))) . '">' . trim(Filter::decodeFilteredText($cat)) . '</a>';
            }
            ?>
</div><?php 
        }
        ?>
			<div class="clear"></div>
		</div>
		<div class="post_header">
			<div class="post_headline clear"><?php 
        echo Filter::decodeFilteredText($post->getHeadline());
        ?>
</div><?php 
        $title_class = "post_title";
        if (isset($options[self::SMALL_TITLE]) && $options[self::SMALL_TITLE]) {
            $title_class .= " small_title";
        }
        ?>
			<div class="<?php 
        echo $title_class;
        ?>
"><a href="<?php 
        echo FileManager::appendToRootPath($post->getPermalink());
        ?>
"><?php 
        echo Filter::decodeFilteredText($post->getTitle());
        ?>
</a></div>
			<div class="post_subtitle"><?php 
        echo Filter::decodeFilteredText($post->getSubtitle());
        ?>
</div>
		</div>
		<div class="post_content clear">
			<span id="post_place_<?php 
        echo $post->getID();
        ?>
" class="post_place"></span><?php 
        if (is_array($post->getContent())) {
            $first = true;
            foreach ($post->getContent() as $cont) {
                if ($first) {
                    $first = false;
                } else {
                    echo " ";
                }
                //echo Filter::decodeFilteredText($cont);
                //$photo=Filter::decodeFilteredText($cont);
                $path = "/IoEsisto/v02/" . $cont->getPath();
                echo "<a href='{$path}'><img src='" . $path . "' width='100' height='50'></a>";
            }
        } else {
            echo Filter::decodeFilteredText($post->getContent());
        }
        if (!is_null($post->getPlace())) {
            require_once "maps/geolocate.php";
            MapManager::printInfoInElement($post->getPlace(), "post_place_" . $post->getID());
        }
        ?>
		<div class="post_authorname"><a href="<?php 
        echo FileManager::appendToRootPath("User/" . $post->getAuthorName());
        ?>
"><?php 
        echo $post->getAuthorName();
        ?>
</a></div>	
		</div>
//.........这里部分代码省略.........
开发者ID:Esisto,项目名称:IoEsisto,代码行数:101,代码来源:PostPage.php


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