Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function sidetray()
- {
- global $nen;
- $trueret='';
- $listings=include_listings('listings');
- ksort($listings);
- $ret='';
- foreach($listings as $arr)
- foreach($arr as $project)
- foreach($project as $key => $value)
- {
- if($key==='Engine')
- {
- $ret.='<td style="border:none;background-color:rgba(0,0,0,0);">'.
- (strlen($project['Thumb'])>0?
- '<img style="width:32;height:32;" src="./thumbs/'.$project['Engine'].'/'.$project['Thumb'].'">':'').
- '<br>'.
- '<a href="./?prj='.$value.'">'.
- htmlentities($value).'</a>'.
- '</td>';
- if (isset($_GET['prj']))
- if ($project['Engine']===$_GET['prj'])
- $trueret='<tr>'.activepane($arr).'</tr>';
- }
- }
- $ret=
- '<tr><td colspan="3" style="background-color:rgba(0,0,0,.5);"><table width="100%">'.
- $ret.
- '</table>'.
- $trueret.
- '</td></tr>';
- return $ret;
- }
- function activepane($arr)
- {
- global $nen;
- $ret='';
- foreach($arr as $project)
- foreach($project as $key => $value)
- switch ($key) {
- case 'Download':
- {
- $ret.='<tr><td colspan="1" style="background-color:rgba(0,0,0,.5);">'.$key.'</td><td colspan="1" style="background-color:rgba(0,0,0,.5);"><a href="./archives/'.$project['Engine'].'/'.$value.'">'.intval(filesize($nen['root'].'./archives/'.$project['Engine'].'/'.$value)/1024).'KiB</a></td></tr>';
- break;
- }
- case 'About':
- {
- break;
- }
- case 'Summary':
- {
- break;
- }
- case 'Caption':
- {
- break;
- }
- case 'Thumb':
- {
- break;
- }
- case 'Vod':
- {
- break;
- }
- case 'Engine':
- {
- $ret.='<tr><td colspan="1" style="background-color:rgba(0,0,0,.5);">'.
- $key.
- '</td><td colspan="1" style="background-color:rgba(0,0,0,.5);">'.
- $value.
- '</td>';
- $ret.=
- '<td colspan="1" rowspan="1" style="background-color:rgba(0,0,0,.5);">'.'<p>'.$project['Caption'].'<br>('.$project['Summary'].')</p>';
- $ret.='</td></tr>';
- break;
- }
- case 'Platform':
- {
- $ret.='<tr><td colspan="1" style="background-color:rgba(0,0,0,.5);">'.
- $key.
- '</td><td colspan="1" style="background-color:rgba(0,0,0,.5);">'.
- $value.
- '</td>';
- $ret.=
- '<td colspan="1" rowspan="'.(count($project)-6).'" style="background-color:rgba(0,0,0,.5);">'.
- (strlen($project['Thumb'])>0?
- (strlen($project['Vod'])===0?
- '<img src="./thumbs/'.$project['Engine'].'/'.$project['Thumb'].'">'
- :
- ''
- )
- :
- ''
- ).
- (strlen($project['Vod'])>0?('<br><video width="320" height="240" controls><source src="./vods/'.$project['Engine'].'/'.$project['Vod'].'" type="video/mp4">Your browser does not support the video tag.</video>'):'').
- '<br>'.$project['About'];
- $ret.='</td></tr>';
- break;
- }
- default:
- {
- $ret.='<tr><td style="background-color:rgba(0,0,0,.5);">'.htmlentities($key).'</td><td style="background-color:rgba(0,0,0,.5);">'.htmlentities($value).'</td></tr>';
- $ret.='</tr>';
- break;
- }
- }
- return $ret;
- }
- ?>
Add Comment
Please, Sign In to add comment