Exemple #1
0
<div id="dir-password">
	<h2>You need a password to view <strong><?php 
echo $relative ?: '/';
?>
</strong></h2>
	<form style="padding:8px 0" method="POST" action="<?php 
echo \dirp\app::get_request()->get_base_uri();
?>
/dir/login">
		<label for="password">password:</label>
		<input type="password" name="password" maxlength="256">
		<input type="submit" value="enter">
	</form>
</div>
Exemple #2
0
			</div>
		</div>
		</div>

		<div id="footer">
			powered by
			<a class="button" style="margin-right:0" href="http://github.com/filp/dirp">
				<img src="<?php 
echo \dirp\app::asset('img/folder_heart2.png');
?>
">
				dirp
			</a>
		</div>

		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
		<!-- <script type="text/javascript" src="<?php 
echo \dirp\app::asset('js/dirp.js');
?>
"></script> -->
		<? if($js): ?>
			<? foreach($js as $script): ?>
				<script type="text/javascript" src="<?php 
echo $script;
?>
"></script>
			<? endforeach ?>
		<? endif ?>
	</body>
</html>
Exemple #3
0
 /**
  * delete
  * deletes this file. depends on the 'disallow.delete'
  * configuration parameter.
  *
  * @return bool
  */
 public function delete()
 {
     // users may chose to disallow any files to be
     // deleted through this method. not by any means
     // safe, but possibly a helper against buggy addons.
     if (\dirp\app::cfg()->disallow_delete) {
         return false;
     }
     if ($this->isfile) {
         return (bool) @unlink($this->fullpath);
     } elseif ($this->isdir) {
         return (bool) @rmdir($this->fullpath);
     }
 }
Exemple #4
0
						<? endif ?>
						<? if($file->mtime): ?>
							<span class="filemodified"><?php 
echo date('g:i:s a', $file->mtime);
?>
</span>
						<? endif ?>
						<? if($file->sub): ?>
							<div class="sub">
								<div class="content">
									<?php 
echo $file->sub;
?>
								</div>
							</div>
						<? endif ?>
					</div>
				</a>
			<? $files_count++ //hackety hack ?>
		<? endforeach ?>
	</div>
<? endif ?>
<? if(!$files_count): ?>
	<div class="message">
		<img src="<?php 
echo \dirp\app::asset('img/page_look.png');
?>
" alt="uhhhh">
		There's not a single file in sight!
	</div>
<? endif ?>
Exemple #5
0
 /**
  * event_rendernav
  * adds the Index link to the navigation.
  *
  * @param \dirp\addon\event $nav
  */
 public function event_rendernav(\dirp\addon\event $nav)
 {
     $nav->links['Index'] = \dirp\app::get_request()->get_base_uri();
 }
Exemple #6
0
 /**
  * _init
  * add dirtools config.php files to the privacy list.
  */
 public static function _init()
 {
     if (!app::cfg()->private) {
         app::cfg()->private = array();
     }
     app::cfg()->private[] = '/config/';
 }