File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 110110</div></td></tr>
111111</table>
112112
113- <?php }
113+ <?php }
114114
115115
116116
134134
135135// List
136136else if ($ type == 'list ' ) { ?>
137-
137+
138138<table>
139139<tr><th><div>Index</div></th><th><div>Value</div></th><th><div> </div></th><th><div> </div></th></tr>
140140
159159<table>
160160<tr><th><div>Value</div></th><th><div> </div></th><th><div> </div></th></tr>
161161
162- <?php foreach ($ values as $ value ) { ?>
163- <tr <?php echo $ alt ? 'class="alt" ' : '' ?> ><td><div><?php echo nl2br (format_html ($ value ))?> </div></td><td><div>
162+ <?php foreach ($ values as $ value ) {
163+ $ display_value = $ redis ->exists ($ value ) ? '<a href="view.php?s= ' . $ server ['id ' ] . '&key= ' . urlencode ($ value ) . '"> ' . $ value . '</a> ' : nl2br (format_html ($ value ));
164+ ?>
165+ <tr <?php echo $ alt ? 'class="alt" ' : '' ?> ><td><div><?php echo $ display_value ?> </div></td><td><div>
164166 <a href="edit.php?s=<?php echo $ server ['id ' ]?> &type=set&key=<?php echo urlencode ($ _GET ['key ' ])?> &value=<?php echo urlencode ($ value )?> "><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a>
165167 </div></td><td><div>
166168 <a href="delete.php?s=<?php echo $ server ['id ' ]?> &type=set&key=<?php echo urlencode ($ _GET ['key ' ])?> &value=<?php echo urlencode ($ value )?> " class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a>
179181
180182<?php foreach ($ values as $ value ) {
181183 $ score = $ redis ->zScore ($ _GET ['key ' ], $ value );
184+ $ display_value = $ redis ->exists ($ value ) ? '<a href="view.php?s= ' . $ server ['id ' ] . '&key= ' . urlencode ($ value ) . '"> ' . $ value . '</a> ' : nl2br (format_html ($ value ));
182185?>
183- <tr <?php echo $ alt ? 'class="alt" ' : '' ?> ><td><div><?php echo $ score?> </div></td><td><div><?php echo nl2br ( format_html ( $ value )) ?> </div></td><td><div>
186+ <tr <?php echo $ alt ? 'class="alt" ' : '' ?> ><td><div><?php echo $ score?> </div></td><td><div><?php echo $ display_value ?> </div></td><td><div>
184187 <a href="edit.php?s=<?php echo $ server ['id ' ]?> &type=zset&key=<?php echo urlencode ($ _GET ['key ' ])?> &score=<?php echo $ score?> &value=<?php echo urlencode ($ value )?> "><img src="images/edit.png" width="16" height="16" title="Edit" alt="[E]"></a>
185188 <a href="delete.php?s=<?php echo $ server ['id ' ]?> &type=zset&key=<?php echo urlencode ($ _GET ['key ' ])?> &value=<?php echo urlencode ($ value )?> " class="delval"><img src="images/delete.png" width="16" height="16" title="Delete" alt="[X]"></a>
186189 </div></td></tr>
You can’t perform that action at this time.
0 commit comments