Fixed PHP syntax in template files.

* Full PHP tags
  * Alternative syntax for control structures
  * Semi-colon at the end of instructions
remotes/origin/stable
François KUBLER 14 years ago
parent 1935d85ef1
commit bf815b3390
  1. 2
      admin/templates/index.php
  2. 8
      admin/templates/plugins.php
  3. 6
      admin/templates/users.php
  4. 18
      files/templates/index.php
  5. 8
      log/templates/index.php
  6. 28
      templates/layout.admin.php
  7. 14
      templates/layout.guest.php
  8. 28
      templates/layout.user.php
  9. 6
      templates/login.php

@ -7,6 +7,6 @@
<ul>
<?php foreach($_["adminpages"] as $i): ?>
<li><a href="<?php echo link_to($i["app"], $i["file"]) ?>"><?php echo $i["name"] ?></a></li>
<li><a href="<?php echo link_to($i["app"], $i["file"]); ?>"><?php echo $i["name"]; ?></a></li>
<?php endforeach; ?>
</ul>

@ -18,10 +18,10 @@
</thead>
<tbody>
<?php foreach($_["plugins"] as $plugin): ?>
<td><?php echo $plugin["info"]["id"] ?></td>
<td><?php echo $plugin["info"]["version"] ?></td>
<td><?php echo $plugin["info"]["name"] ?></td>
<td><?php echo $plugin["info"]["author"] ?></td>
<td><?php echo $plugin["info"]["id"]; ?></td>
<td><?php echo $plugin["info"]["version"]; ?></td>
<td><?php echo $plugin["info"]["name"]; ?></td>
<td><?php echo $plugin["info"]["author"]; ?></td>
<td>enable</td>
<?php endforeach; ?>
</tbody>

@ -18,8 +18,8 @@
<?php foreach($_["users"] as $user): ?>
<tr>
<td><input type="checkbox"></td>
<td><?php echo $user["name"] ?></td>
<td><?php echo $user["groups"] ?></td>
<td><?php echo $user["name"]; ?></td>
<td><?php echo $user["groups"]; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
@ -36,7 +36,7 @@
<tbody>
<?php foreach($_["groups"] as $group): ?>
<tr>
<td><?php echo $group["name"] ?></td>
<td><?php echo $group["name"]; ?></td>
<td>remove</td>
</tr>
<?php endforeach; ?>

@ -12,10 +12,10 @@
</div>
<p class="nav">
<a href="<? echo link_to( "files", "index.php?dir=/" ) ?>"><img src="<? echo image_path( "", "actions/go-home.png" ) ?>" alt="Root" /></a>
<? foreach( $_["breadcrumb"] as $crumb ){ ?>
<a href="<? echo link_to( "files", "index.php?dir=".$crumb["dir"] ) ?>"><? echo $crumb["name"] ?></a>
<? } ?>
<a href="<?php echo link_to("files", "index.php?dir=/"); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root" /></a>
<?php foreach($_["breadcrumb"] as $crumb): ?>
<a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo $crumb["name"]; ?></a>
<?php endforeach; ?>
</p>
<table cellspacing="0">
@ -29,15 +29,15 @@
</tr>
</thead>
<tbody>
<? foreach( $_["files"] as $file ){ ?>
<?php foreach($_["files"] as $file): ?>
<tr>
<td class="selection"><input type="checkbox" /></td>
<td class="filename"><a style="background-image:url(<? if( $file["type"] == "dir" ) echo mimetype_icon( "dir" ); else echo mimetype_icon( $file["mime"] ) ?>)" href="<? if( $file["type"] == "dir" ) echo link_to( "files", "index.php?dir=".$file["directory"]."/".$file["name"] ); else echo link_to( "files", "download.php?file=".$file["directory"]."/".$file["name"] ) ?>" title=""><? echo $file["name"] ?></a></td>
<td class="filesize"><? if( $file["type"] != "dir" ) echo human_file_size( $file["size"] ) ?></td>
<td class="date"><? if( $file["type"] != "dir" ) echo $file["date"] ?></td>
<td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("files", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo $file["name"]; ?></a></td>
<td class="filesize"><?php if($file["type"] != "dir" ) echo human_file_size($file["size"]); ?></td>
<td class="date"><?php if($file["type"] != "dir") echo $file["date"]; ?></td>
<td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td>
</tr>
<? } ?>
<?php endforeach; ?>
</tbody>
</table>

@ -36,12 +36,12 @@
</tr>
</thead>
<tbody>
<? foreach( $_["logs"] as $entry ){ ?>
<?php foreach($_["logs"] as $entry): ?>
<tr>
<td class="login"><em><? echo $entry["user"] ?></em> <? echo $entry["message"] ?></td>
<td class="date"><? echo $entry["date"] ?></td>
<td class="login"><em><?php echo $entry["user"]; ?></em> <?php echo $entry["message"]; ?></td>
<td class="date"><?php echo $entry["date"]; ?></td>
</tr>
<? } ?>
<?php endforeach; ?>
</tbody>
</table>

@ -9,24 +9,24 @@
<title>ownCloud</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" />
<? foreach( $_["cssfiles"] as $cssfile ){ ?>
<link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" />
<? } ?>
<? foreach( $_["jsfiles"] as $jsfile ){ ?>
<script type="text/javascript" src="<? echo $jsfile ?>"></script>
<? } ?>
<?php foreach($_["cssfiles"] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
<?php foreach($_["jsfiles"] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
</head>
<body>
<div id="header">
<a href="<? echo link_to( "", "index.php" )?>" title="" id="owncloud"><img src="<? echo image_path( "", "owncloud-logo-small-white.png" ) ?>" alt="ownCloud" /></a>
<a href="<?php echo link_to("", "index.php"); ?>" title="" id="owncloud"><img src="<?php echo image_path("", "owncloud-logo-small-white.png"); ?>" alt="ownCloud" /></a>
<div id="user">
<a id="user_menu_link" href="" title="">Username</a>
<ul id="user_menu">
<? foreach( $_["personalmenu"] as $entry ){ ?>
<li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
<? } ?>
<?php foreach($_["personalmenu"] as $entry ): ?>
<li><a href="<?php echo link_to($entry["app"], $entry["file"]); ?>" title=""><?php echo $entry["name"]; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
</div>
@ -34,14 +34,14 @@
<div id="main">
<div id="plugins">
<ul>
<? foreach( $_["navigation"] as $entry ){ ?>
<li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
<? } ?>
<?php foreach($_["navigation"] as $entry): ?>
<li><a href="<?php echo link_to($entry["app"], $entry["file"]); ?>" title=""><?php echo $entry["name"]; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<div id="content">
<? echo $_["content"] ?>
<?php echo $_["content"]; ?>
</div>
</div>
</body>

@ -9,16 +9,16 @@
<title>ownCloud</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" />
<? foreach( $_["cssfiles"] as $cssfile ){ ?>
<link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" />
<? } ?>
<? foreach( $_["jsfiles"] as $jsfile ){ ?>
<script type="text/javascript" src="<? echo $jsfile ?>"></script>
<? } ?>
<?php foreach($_["cssfiles"] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
<?php foreach($_["jsfiles"] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
</head>
<body class="login">
<? echo $_["content"] ?>
<?php echo $_["content"]; ?>
<p class="info">
ownCloud is an open personal cloud which runs on your personal server.<br />
To learn more, please visit <a href="http://www.owncloud.org/">owncloud.org</a>.

@ -9,24 +9,24 @@
<title>ownCloud</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" />
<? foreach( $_["cssfiles"] as $cssfile ){ ?>
<link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" />
<? } ?>
<? foreach( $_["jsfiles"] as $jsfile ){ ?>
<script type="text/javascript" src="<? echo $jsfile ?>"></script>
<? } ?>
<?php foreach($_["cssfiles"] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
<?php foreach($_["jsfiles"] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
</head>
<body>
<div id="header">
<a href="<? echo link_to( "", "index.php" )?>" title="" id="owncloud"><img src="<? echo image_path( "", "owncloud-logo-small-white.png" ) ?>" alt="ownCloud" /></a>
<a href="<?php echo link_to("", "index.php"); ?>" title="" id="owncloud"><img src="<?php echo image_path("", "owncloud-logo-small-white.png"); ?>" alt="ownCloud" /></a>
<div id="user">
<a id="user_menu_link" href="" title="">Username</a>
<ul id="user_menu">
<? foreach( $_["personalmenu"] as $entry ){ ?>
<li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
<? } ?>
<?php foreach($_["personalmenu"] as $entry): ?>
<li><a href="<?php echo link_to($entry["app"], $entry["file"]); ?>" title=""><?php echo $entry["name"]; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
</div>
@ -34,14 +34,14 @@
<div id="main">
<div id="plugins">
<ul>
<? foreach( $_["navigation"] as $entry ){ ?>
<li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
<? } ?>
<?php foreach($_["navigation"] as $entry): ?>
<li><a href="<?php echo link_to($entry["app"], $entry["file"]); ?>" title=""><?php echo $entry["name"]; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<div id="content">
<? echo $_["content"] ?>
<?php echo $_["content"]; ?>
</div>
</div>
</body>

@ -4,13 +4,13 @@
*/
?>
<div id="login">
<img src="<? echo image_path( "", "owncloud-logo-medium-white.png" ) ?>" alt="ownCloud" />
<img src="<?php echo image_path("", "owncloud-logo-medium-white.png"); ?>" alt="ownCloud" />
<form action="index.php" method="post">
<!-- <h1>Sign in :</h1> -->
<fieldset>
<? if( $_["error"] ){ ?>
<?php if($_["error"]): ?>
Login failed!
<? } ?>
<?php endif; ?>
<p><input type="text" name="user" value="" /></p>
<p><input type="password" name="password" /></p>
<p><input type="submit" value="Sign in" /></p>

Loading…
Cancel
Save