Fixed PHP syntax in template files.

* Full PHP tags
  * Alternative syntax for control structures
  * Semi-colon at the end of instructions
This commit is contained in:
François KUBLER 2011-03-09 21:57:00 +01:00
parent 1935d85ef1
commit bf815b3390
9 changed files with 59 additions and 59 deletions

View File

@ -7,6 +7,6 @@
<ul> <ul>
<?php foreach($_["adminpages"] as $i): ?> <?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; ?> <?php endforeach; ?>
</ul> </ul>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,13 +4,13 @@
*/ */
?> ?>
<div id="login"> <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"> <form action="index.php" method="post">
<!-- <h1>Sign in :</h1> --> <!-- <h1>Sign in :</h1> -->
<fieldset> <fieldset>
<? if( $_["error"] ){ ?> <?php if($_["error"]): ?>
Login failed! Login failed!
<? } ?> <?php endif; ?>
<p><input type="text" name="user" value="" /></p> <p><input type="text" name="user" value="" /></p>
<p><input type="password" name="password" /></p> <p><input type="password" name="password" /></p>
<p><input type="submit" value="Sign in" /></p> <p><input type="submit" value="Sign in" /></p>