Запись [z:_dev_util_short] < dev.sky.1.001
Версия 1.001
• N1: WRITE FILE: _dev/util/ajax.php
001 002 003 004 005 006 007 008 | <?php defined('START') and AUTH_OK or die; ?>
<pre class="black" style="overflow:auto"><?=sql("+select tmemo from _dev_memory where id=1")?></pre>
<script type="text/javascript">
function adjust(x, y) {
$('mtop').parentNode.$$('pre', 0).$({width:x - 180, height:y- 120});
}
</script>
|
• N2: WRITE FILE: _dev/util/log.php
001 002 003 004 005 006 007 008 | <?php defined('START') and AUTH_OK or die;
list($tmemo, $finished) = sql("-select tmemo, dt from _dev_memory where id=5");
?><h3 style="margin:5px 0; padding:0">Last Log</h3>
<div style="width:800px;overflow-x:auto">
<pre class=""><?="Now: $NOW\n\nFinished at: $finished\n$tmemo"?></pre>
</div>
|
• N3: WRITE FILE: _dev/util/phpinfo.php
001 002 003 004 005 006 007 008 009 010 | <?php defined('START') and AUTH_OK or phpinfo(constant(@key($_GET))) and exit; $TOP = '> ' . menu( $WVAL = intval($WVAL), $php = [-1 => 'all', 'general', 'credits', 'configuration', 'modules', 'environment', 'variables', 'license'], '?help=phpinfo&page=%s' ); printf('<iframe src="_dev/util/phpinfo.php?INFO_%s" style="width:100%%; height:100%%; border:0"></iframe>', strtoupper($php[$WVAL])); |
• N4: WRITE FILE: _dev/util/test.php
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 | <?php defined('START') and AUTH_OK or die; if (START == 'ajax'): eval(get(2 == $ival)); switch ($step) { case 1: set(['step' => $ival, 'i' => 0], []); if (1 == $ival) $log = '-Error'; break; case 2: if (eval(sql("^select * from _dev_codebase where id < 50 order by id limit $i, 1"))) { $log = $r_name; set('i', ++$i); } else { $log = '+Done. <a href="?utility=test">Start again</a> or '; $log .= '<a href="javascript:html(\'log\',\'\');cycle(1,\'Test\')">try fail</a>.'; } break; case 3: $log = '+Nothing to do'; break; } echo_json($log); else: # HTML PAGE ?> <input type="button" value="test" onclick="cycle(2,'Test')" /> <pre id="log"></pre> <?php endif; |
• N5: WRITE FILE: _dev/util/area.php
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 | <?php defined('START') and AUTH_OK or die; if (START == 'ajax'): $new = array_map(create_function('$v', 'return preg_replace("/\s+/", " ", trim($v));'), array_values($_POST) + [6 => $PVAL]); eval(cell(ID, 'm')); $areas = eval('return ' . unescape($areas, true) . ';'); switch (PAGE) { case 'l': exit(json_encode($areas[$ival])); case 'u': $areas[$ival] = $new; break; case 'd': array_splice($areas, $ival, 1); break; case 'a': $areas[] = $new; break; } set('areas', escape(var_export($areas, true), true)); else: # HTML PAGE $TOP = '<b>Manage Presets of definition areas</b>'; echo '<form id="f1" style="width:90%"><div class="area">'; require '_dev/main/area.php'; echo '</div><h3>Presets list<h3>' . th(['#' => 'width="10"', 'NAME', 'ACTIONS' => 'width="50%"'], 'id="table"'); for ($i = 1; list ($k, $v) = each($areas_opt); $i++) echo td([ $i, $k < 0 ? $v : sprintf('<input type="text" id="pre%d" value="%s" />', $k, html($v)), a('LOAD', "javascript:area($k)") . ($k < 0 ? '' : pad() . a('UPDATE', "javascript:pc($k,'u')") . pad() . a('delete', "javascript:pc($k,'d')")), ]); ?> </table><br> <input type="text" id="pre" value="" /> <input type="button" value="add new" onclick="pc('','a')" /> </form> <script type="text/javascript"> function pc(i, com) { ajax(i + '&' + com + '=' + e$($('pre' + i).value) + qs_area(), function(r, err) { if ('d' == com || 'a' == com) document.location.reload(); }); } </script> <style type="text/css"> #table { width:50%; } </style> <?php endif; |
Записи Codebase (89)
Статус SKY.
Current version: 1.001
Coresky records: 22
Local (DEV) records: 89
Web (all) records: 105
Download: dev.php
Coresky records: 22
Local (DEV) records: 89
Web (all) records: 105
Download: dev.php