/neutrino atomic edition 08/ext/manage.php
http://neutrino-cms.googlecode.com/ · PHP · 48 lines · 48 code · 0 blank · 0 comment · 5 complexity · 3ae54d693055aa9c62cb7bda02c713a9 MD5 · raw file
- <?php
- if(@$_v['edit_ext']){
- nae_ext_save($_POST);
- redirect(generate_link('action=ext'));
- }
- elseif(@$_v['readme']&&($readme='ext/'.str_replace(array('.','/'),'',$_v['readme']).'/readme.txt')&&file_exists($readme)){
- $text=file_get_contents($readme);
- print '<center><h1>'.$readme.'</h1></center>';
- print '<h2><a href="'.generate_link('action=ext').'"><-- ?????</a></h2>';
- print '<div style="border:1px solid black; padding:5px;">'.str_replace(array("\n",' '),array('<br />',' '),htmlspecialchars($text)).'</div>';
- print '<h2><a href="'.generate_link('action=ext').'"><-- ?????</a></h2>';
- }
- else{
- $d = dir2array($_s['ext_dir']);
- sort($d);
- ?>
- <form action="<?php echo generate_link('action=ext')?>" method="post">
- <style type="text/css">table.ext td{border-bottom:1px solid black;}table.ext th{border-bottom:3px solid black;border-right:1px solid black;text-align:center}</style>
- <table class="ext" cellspacing="0" width="100%" border="0" cellpadding="5" align="center">
- <tr>
- <th width="20%"><?php echo $_l['name_version']?></th>
- <th width="10%"><?php echo $_l['status']?></th>
- <th width="*"><?php echo $_l['description']?></th>
- </tr>
- <?php
- foreach ($d as $entry) {
- if (is_dir($_s['ext_dir'].'/'.$entry)) {
- $ext_list[$entry]=@$ext_ini[$entry];
- if(file_exists('ext/'.$entry.'/'.$entry.'.ini.php')) $entry_ini=parse_ini_file('ext/'.$entry.'/'.$entry.'.ini.php');
- echo '<tr>'.
- '<td><p>'.(file_exists('ext/'.$entry.'/'.$entry.'.php')?'<a href="'.(@$ext_list[$entry]==1?generate_link('ext='.$entry):'javascript:alert(\'??? ???? ????? ??????? ?? ???????? ??????????, ??????? ????? ??? ?????????? ???????? ? ????????? ?????????\')').'">'.$entry.'</a>':$entry).' <i>'.@$entry_ini['version'].'</i></p>'.(file_exists('ext/'.$entry.'/readme.txt')?('<a href="'.generate_link('action=ext&readme='.$entry).'" style="color:green;">readme</a>'):'').'</td>'.//??? ??????????
- '<td><select name="'.$entry.'">'.//?????? - ???????\????????? ??????????
- '<option value="1"';
- if(@$ext_list[$entry]==1)echo ' selected="selected"';
- echo '>'.$_l['on'].'</option><option value="0"';
- if(@$ext_list[$entry]==0)echo ' selected="selected"';
- echo '>'.$_l['off'].'</option></select></td>';//????????? ? ??????????
- echo '<td>'. @$entry_ini['description'] .'</td></tr>';//????????
- }
- }
- ?>
- <tr><th colspan="3" style="text-align:left">
- <input type="submit" name="edit_ext" id="go" value="<?php echo $_l['c_submit']?>" /><input type="reset" id="cansel" value="<?php echo $_l['c_reset']?>" /></th></tr>
- </table>
- <p align="center"><strong>?????????:</strong> ?? ?????? ???????? ??????????, ?????????????? ??????? ?? ? ????? <i>/ext/</i> ?????? ?????. ????? ????, ?? ????? ????? ???????????? ?? ???? ????????.</p>
- </form>
- <?php
- }