diff options
author | r043v <noferov@gmail.com> | 2011-07-22 12:49:45 +0400 |
---|---|---|
committer | r043v <noferov@gmail.com> | 2011-07-22 12:49:45 +0400 |
commit | 159fae30c8cc449d4c8a1703070f451cd05c2655 (patch) | |
tree | aa3ebdd17d6a324eae1a94ebca4cf4588bd0d771 /view.php | |
parent | b6617ab280d0e9ea5c714424b75917779420b3e7 (diff) |
complete check to remove php short tag
Diffstat (limited to 'view.php')
-rw-r--r-- | view.php | 90 |
1 files changed, 45 insertions, 45 deletions
@@ -1,4 +1,4 @@ -<? +<?php require_once 'common.inc.php'; @@ -15,7 +15,7 @@ require 'header.inc.php'; if (!isset($_GET['key'])) { ?> Invalid key - <? + <?php require 'footer.inc.php'; die; @@ -28,19 +28,19 @@ $exists = $redis->exists($_GET['key']); ?> -<h2><?=format_html($_GET['key'])?> -<? if ($exists) { ?> - <a href="rename.php?s=<?=$server['id']?>&key=<?=urlencode($_GET['key'])?>"><img src="images/edit.png" width="16" height="16" title="Rename" alt="[R]"></a> - <a href="delete.php?s=<?=$server['id']?>&key=<?=urlencode($_GET['key'])?>" class="delkey"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> - <a href="export.php?s=<?=$server['id']?>&key=<?=urlencode($_GET['key'])?>"><img src="images/export.png" width="16" height="16" title="Export" alt="[E]"></a> -<? } ?> +<h2><?php print format_html($_GET['key'])?> +<?php if ($exists) { ?> + <a href="rename.php?s=<?php print $server['id']?>&key=<?php print urlencode($_GET['key'])?>"><img src="images/edit.png" width="16" height="16" title="Rename" alt="[R]"></a> + <a href="delete.php?s=<?php print $server['id']?>&key=<?php print urlencode($_GET['key'])?>" class="delkey"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> + <a href="export.php?s=<?php print $server['id']?>&key=<?php print urlencode($_GET['key'])?>"><img src="images/export.png" width="16" height="16" title="Export" alt="[E]"></a> +<?php } ?> </h2> -<? +<?php if (!$exists) { ?> This key does not exist. - <? + <?php require 'footer.inc.php'; die; @@ -84,18 +84,18 @@ switch ($type) { ?> <table> -<tr><td><div>Type:</div></td><td><div><?=format_html($type)?></div></td></tr> +<tr><td><div>Type:</div></td><td><div><?php print format_html($type)?></div></td></tr> -<tr><td><div><abbr title="Time To Live">TTL</abbr>:</div></td><td><div><?=($ttl == -1) ? 'does not expire' : $ttl?> <a href="ttl.php?s=<?=$server['id']?>&key=<?=urlencode($_GET['key'])?>&ttl=<?=$ttl?>"><img src="images/edit.png" width="16" height="16" title="Edit TTL" alt="[E]" class="imgbut"></a></div></td></tr> +<tr><td><div><abbr title="Time To Live">TTL</abbr>:</div></td><td><div><?php print ($ttl == -1) ? 'does not expire' : $ttl?> <a href="ttl.php?s=<?php print $server['id']?>&key=<?php print urlencode($_GET['key'])?>&ttl=<?php print $ttl?>"><img src="images/edit.png" width="16" height="16" title="Edit TTL" alt="[E]" class="imgbut"></a></div></td></tr> -<tr><td><div>Encoding:</div></td><td><div><?=format_html($encoding)?></div></td></tr> +<tr><td><div>Encoding:</div></td><td><div><?php print format_html($encoding)?></div></td></tr> -<tr><td><div>Size:</div></td><td><div><?=$size?> <?=($type == 'string') ? 'characters' : 'items'?></div></td></tr> +<tr><td><div>Size:</div></td><td><div><?php print $size?> <?php print ($type == 'string') ? 'characters' : 'items'?></div></td></tr> </table> <p> -<? +<?php @@ -103,14 +103,14 @@ switch ($type) { if ($type == 'string') { ?> <table> -<tr><td><div><?=nl2br(format_html($value))?></div></td><td><div> - <a href="edit.php?s=<?=$server['id']?>&type=string&key=<?=urlencode($_GET['key'])?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> +<tr><td><div><?php print nl2br(format_html($value))?></div></td><td><div> + <a href="edit.php?s=<?php print $server['id']?>&type=string&key=<?php print urlencode($_GET['key'])?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> </div></td><td><div> - <a href="delete.php?s=<?=$server['id']?>&type=string&key=<?=urlencode($_GET['key'])?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> + <a href="delete.php?s=<?php print $server['id']?>&type=string&key=<?php print urlencode($_GET['key'])?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> </div></td></tr> </table> -<? } +<?php } @@ -120,15 +120,15 @@ else if ($type == 'hash') { ?> <table> <tr><th><div>Key</div></th><th><div>Value</div></th><th><div> </div></th><th><div> </div></th></tr> -<? foreach ($values as $hkey => $value) { ?> - <tr <?=$alt ? 'class="alt"' : ''?>><td><div><?=format_html($hkey)?></div></td><td><div><?=nl2br(format_html($value))?></div></td><td><div> - <a href="edit.php?s=<?=$server['id']?>&type=hash&key=<?=urlencode($_GET['key'])?>&hkey=<?=urlencode($hkey)?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> +<?php foreach ($values as $hkey => $value) { ?> + <tr <?php print $alt ? 'class="alt"' : ''?>><td><div><?php print format_html($hkey)?></div></td><td><div><?php print nl2br(format_html($value))?></div></td><td><div> + <a href="edit.php?s=<?php print $server['id']?>&type=hash&key=<?php print urlencode($_GET['key'])?>&hkey=<?php print urlencode($hkey)?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> </div></td><td><div> - <a href="delete.php?s=<?=$server['id']?>&type=hash&key=<?=urlencode($_GET['key'])?>&hkey=<?=urlencode($hkey)?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> + <a href="delete.php?s=<?php print $server['id']?>&type=hash&key=<?php print urlencode($_GET['key'])?>&hkey=<?php print urlencode($hkey)?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> </div></td></tr> -<? $alt = !$alt; } ?> +<?php $alt = !$alt; } ?> -<? } +<?php } @@ -138,17 +138,17 @@ else if ($type == 'list') { ?> <table> <tr><th><div>Index</div></th><th><div>Value</div></th><th><div> </div></th><th><div> </div></th></tr> -<? for ($i = 0; $i < $size; ++$i) { +<?php for ($i = 0; $i < $size; ++$i) { $value = $redis->lGet($_GET['key'], $i); ?> - <tr <?=$alt ? 'class="alt"' : ''?>><td><div><?=$i?></div></td><td><div><?=nl2br(format_html($value))?></div></td><td><div> - <a href="edit.php?s=<?=$server['id']?>&type=list&key=<?=urlencode($_GET['key'])?>&index=<?=$i?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> + <tr <?php print $alt ? 'class="alt"' : ''?>><td><div><?php print $i?></div></td><td><div><?php print nl2br(format_html($value))?></div></td><td><div> + <a href="edit.php?s=<?php print $server['id']?>&type=list&key=<?php print urlencode($_GET['key'])?>&index=<?php print $i?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> </div></td><td><div> - <a href="delete.php?s=<?=$server['id']?>&type=list&key=<?=urlencode($_GET['key'])?>&index=<?=$i?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> + <a href="delete.php?s=<?php print $server['id']?>&type=list&key=<?php print urlencode($_GET['key'])?>&index=<?php print $i?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> </div></td></tr> -<? $alt = !$alt; } ?> +<?php $alt = !$alt; } ?> -<? } +<?php } @@ -159,15 +159,15 @@ else if ($type == 'set') { <table> <tr><th><div>Value</div></th><th><div> </div></th><th><div> </div></th></tr> -<? foreach ($values as $value) { ?> - <tr <?=$alt ? 'class="alt"' : ''?>><td><div><?=nl2br(format_html($value))?></div></td><td><div> - <a href="edit.php?s=<?=$server['id']?>&type=set&key=<?=urlencode($_GET['key'])?>&value=<?=urlencode($value)?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> +<?php foreach ($values as $value) { ?> + <tr <?php print $alt ? 'class="alt"' : ''?>><td><div><?php print nl2br(format_html($value))?></div></td><td><div> + <a href="edit.php?s=<?php print $server['id']?>&type=set&key=<?php print urlencode($_GET['key'])?>&value=<?php print urlencode($value)?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> </div></td><td><div> - <a href="delete.php?s=<?=$server['id']?>&type=set&key=<?=urlencode($_GET['key'])?>&value=<?=urlencode($value)?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> + <a href="delete.php?s=<?php print $server['id']?>&type=set&key=<?php print urlencode($_GET['key'])?>&value=<?php print urlencode($value)?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> </div></td></tr> -<? $alt = !$alt; } ?> +<?php $alt = !$alt; } ?> -<? } +<?php } @@ -177,16 +177,16 @@ else if ($type == 'zset') { ?> <table> <tr><th><div>Score</div></th><th><div>Value</div></th><th><div> </div></th><th><div> </div></th></tr> -<? foreach ($values as $value) { +<?php foreach ($values as $value) { $score = $redis->zScore($_GET['key'], $value); ?> - <tr <?=$alt ? 'class="alt"' : ''?>><td><div><?=$score?></div></td><td><div><?=nl2br(format_html($value))?></div></td><td><div> - <a href="edit.php?s=<?=$server['id']?>&type=zset&key=<?=urlencode($_GET['key'])?>&score=<?=$score?>&value=<?=urlencode($value)?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> - <a href="delete.php?s=<?=$server['id']?>&type=zset&key=<?=urlencode($_GET['key'])?>&value=<?=urlencode($value)?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> + <tr <?php print $alt ? 'class="alt"' : ''?>><td><div><?php print $score?></div></td><td><div><?php print nl2br(format_html($value))?></div></td><td><div> + <a href="edit.php?s=<?php print $server['id']?>&type=zset&key=<?php print urlencode($_GET['key'])?>&score=<?php print $score?>&value=<?php print urlencode($value)?>"><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a> + <a href="delete.php?s=<?php print $server['id']?>&type=zset&key=<?php print urlencode($_GET['key'])?>&value=<?php print urlencode($value)?>" class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a> </div></td></tr> -<? $alt = !$alt; } ?> +<?php $alt = !$alt; } ?> -<? } +<?php } @@ -195,9 +195,9 @@ if ($type != 'string') { ?> </table> <p> - <a href="edit.php?s=<?=$server['id']?>&type=<?=$type?>&key=<?=urlencode($_GET['key'])?>" class="add">Add another value</a> + <a href="edit.php?s=<?php print $server['id']?>&type=<?php print $type?>&key=<?php print urlencode($_GET['key'])?>" class="add">Add another value</a> </p> -<? } +<?php } require 'footer.inc.php'; |