예제 #1
0
 function indexAction()
 {
     $list = array_unique(file_find(BASE . "/data")['dir']);
     foreach ($list as $v) {
         $q = substr($v, strrpos($v, '/') + 1);
         if ($q == config('mongodb.db')) {
             $k = substr($v, 0, strrpos($v, '/'));
             $k = substr($k, strrpos($k, '/') + 1);
             $o[$k] = $v;
         }
     }
     arsort($o);
     $data['data'] = $o;
     return $this->view('index', $data);
 }
예제 #2
0
파일: font.php 프로젝트: noccy80/lepton-ng
 /**
  * Constructor, attempts to load the font from the paths defined in the
  * lepton.graphics.fontpaths key or the default locations.
  *
  * @param string $fontname The font name
  * @param int $fontsize The size
  */
 function __construct($fontname, $fontsize)
 {
     $fullname = null;
     $p = config::get('lepton.graphics.fontpaths', array('./', base::appPath() . '/fonts', base::appPath(), '/usr/share/fonts/truetype/', base::basePath()));
     foreach ($p as $fp) {
         $ff = file_find($fp, $fontname);
         if ($ff != null) {
             $fullname = $ff;
             break;
         }
     }
     if ($fullname) {
         $this->font = array('fontname' => $fullname, 'fontsize' => $fontsize, 'angle' => 0);
     } else {
         throw new GraphicsException("Font " . $fontname . " not found", GraphicsException::ERR_BAD_FONT);
     }
 }
예제 #3
0
      </a>
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭窗口</button>
        
      </div>
    </div>
  </div>
</div>



<div style=""  class="container-fluid container" >
<form id='choiceTheme' action="" method="get">
	<small>选择主题颜色&nbsp;</small>
	<select name="AdminThemeTryChangeCSS" id="AdminThemeTryChangeCSS">
		<?php 
$list = file_find(__DIR__ . '/../css');
foreach ($list['file'] as $v) {
    $v = file_name($v);
    if (strpos($v, '.css') !== false && $v != 'style.css') {
        $v = str_replace('.bootstrap.min.css', '', $v);
        $css[] = $v;
    }
}
?>
		<?php 
foreach ($css as $v) {
    ?>
			<option <?php 
    if ($v == Comm::config('admin_bootstrap_css')) {
        ?>
 selected<?php 
예제 #4
0
파일: base.php 프로젝트: noccy80/lepton-ng
 /**
  * @description file_find() on a bad path returning null
  */
 function filefindbaddir()
 {
     $this->assertNull(file_find('/foo/bar', 'baz'));
 }