$urls = [];
$urls[] = 'http://expenses.jambonbill.org';
$urls[] = 'http://gameboycamera.jambonbill.org';
$urls[] = 'http://gif.jambonbill.org';
$urls[] = 'http://ip.jambonbill.org';
$urls[] = 'http://lsdj.jambonbill.org';
$urls[] = 'http://midi.jambonbill.org';
$urls[] = 'http://petscii.jambonbill.org';
$urls[] = 'http://zip.jambonbill.org';
//$htm="<pre>list of projects</pre>";
$htm = [];
$htm[] = "<table class='table table-hover table-condensed'>";
$htm[] = "<thead>";
$htm[] = "</thead>";
$htm[] = "<tbody>";
foreach ($urls as $k => $url) {
    $htm[] = "<tr>";
    $htm[] = "<td><a href='{$url}'>" . $url . "</a></td>";
}
$htm[] = "</tbody>";
$htm[] = "</table>";
$box = new LTE\Box();
$box->title("Projects");
$box->icon("fa fa-times");
$box->body($htm);
$btns = [];
$btns[] = "<a href=# id=btnSave class='btn btn-default'>Save</a> ";
$btns[] = "<a href=# id=btnPassword class='btn btn-default'>Change password</a> ";
$btns[] = "<a href=# id=btnDelete class='btn btn-default pull-right'>Delete</a>";
//$box->footer($btns);
echo $box;
<?php

//print_r($_SERVER);
$box = new LTE\Box();
$box->id("boxRoute");
$box->title("Route");
$box->icon("fa fa-edit");
$htm = [];
$htm[] = "<div class='row'>";
$htm[] = "<input type=hidden id=ir_id>";
//name
$htm[] = "<div class='col-sm-6'>";
$htm[] = "<div class='form-group'><label>Name</label>";
$htm[] = "<input type='text' class='form-control' id='ir_name' placeholder='name'>";
$htm[] = "</div></div>";
//ip
$htm[] = "<div class='col-sm-3'>";
$htm[] = "<div class='form-group'><label>From</label>";
$htm[] = "<input type='text' class='form-control' id='ir_port_from' placeholder='port'>";
$htm[] = "</div></div>";
//port
$htm[] = "<div class='col-sm-3'>";
$htm[] = "<div class='form-group'><label>To</label>";
$htm[] = "<input type='text' class='form-control' id='ir_port_to' placeholder='port'>";
$htm[] = "</div></div>";
//comment
$htm[] = "<div class='col-sm-12'>";
$htm[] = "<div class='form-group'><label>Comment</label>";
$htm[] = "<input type='text' class='form-control' id='ir_comment' placeholder='Comment'>";
$htm[] = "</div></div>";
$htm[] = "</div>";
<?php

// box port comment
$htm = [];
$htm[] = "<textarea class='form-control' id='comments'>" . $r['ip_comment'] . "</textarea>";
$box = new LTE\Box();
$box->id("boxComment");
$box->icon("fa fa-comment-o");
$box->title("Comments");
$box->html($htm);
$box->footer("<a href=# class='btn btn-default' id='btnSaveComment'><i class='fa fa-save'></i> Save</a>");
echo $box;
$htm[] = "</select>";
$htm[] = "</div>";
$htm[] = "<div class='col-xs-6'>";
$htm[] = "<select class='form-control' id=octave disabled=disabled>";
for ($i = 0; $i < 8; $i++) {
    $htm[] = "<option value='{$i}'>Octave #" . ($i + 1) . "</option>";
}
$htm[] = "</select>";
$htm[] = "</div>";
$htm[] = "</div>";
$htm[] = "<br />";
$htm[] = "<div class='row'>";
$htm[] = "<div class='col-xs-6'>";
$htm[] = "<select class='form-control' id=prgs disabled=disabled>";
for ($i = 0; $i < 128; $i++) {
    $htm[] = "<option value='{$i}'>Prg #" . ($i + 1) . "</option>";
}
$htm[] = "</select>";
$htm[] = "</div>";
$htm[] = "</div>";
$box = new LTE\Box();
$box->title("Keyboard");
$box->icon("fa fa-keyboard-o");
$box->id("boxKeyboard");
$box->collapsable(true);
$box->body($htm);
$btns = [];
$btns[] = "<a href=#btn class='btn btn-default' id=btnTest>Test middle C</a> ";
$btns[] = "<a href=#btn class='btn btn-danger pull-right' id=btnMidiPannic><i class='fa fa-times'></i> Panic</a>";
$box->footer($btns);
echo $box;
<?php

$box = new LTE\Box();
$box->title("File(s)");
$box->icon("fa fa-file-o");
$box->id("boxFiles");
$box->collapsable(true);
$box->body("please wait");
echo $box;
$htm[] = '<div class="form-group">';
$htm[] = '<label for="inputEmail3" class="col-sm-2 control-label">Updated</label>';
$htm[] = '<div class="col-xs-5">';
$htm[] = '<input type="text" class="form-control" id="category" placeholder="Category" value="' . $date . '" readonly>';
$htm[] = '</div>';
$htm[] = '<div class="col-xs-5">';
$htm[] = '<input type="text" class="form-control" id="category" placeholder="Category" value="' . $r['user_modified'] . '" readonly>';
$htm[] = '</div></div>';
$htm[] = '</div>';
$btn = [];
$btn[] = "<a href=index.php class='btn btn-default'><i class='fa fa-arrow-left'></i> Back</a>";
$btn[] = "<a href=#del id=delete class='btn btn-default pull-right' title='Delete'><i class='fa fa-trash-o'></i></a>";
$box = new LTE\Box();
$box->id("boxNews");
$box->title($r['title']);
$box->icon("fa fa-list");
$box->body($htm);
$box->footer($btn);
echo $box;
?>
<script>
$(function(){
	$('#delete').click(function(){
		if(!confirm("Delete this news ?"))return false;
		alert("No");
	});
});
</script>
<?php 
$admin->footer("Vorc backup");
$admin->end();
<?php

// Home :: box sameday
$htm = [];
$box = new LTE\Box();
$box->id("boxSameday");
$box->title("On the same day");
$box->small("xxxx-xx-xx");
$box->icon("fa fa-calendar-o");
$box->body($htm);
//$box->footer("<a href=# class='btn btn-default'><i class='fa fa-plus'></i> Add</a>");
$htm = [];
$htm[] = '<div class="input-group input-group-sm">';
$htm[] = '<input type="text" class="form-control" id=newStr placeholder="21:30 Dinner 18.50EUR">';
$htm[] = '<span class="input-group-btn">';
$htm[] = '<button type="button" id=btnAdd class="btn btn-default btn-flat">Add</button>';
$htm[] = '</span>';
$htm[] = '</div>';
$box->footer($htm);
$box->loading(true);
/*
$btn=[];
$btn[]="<a href=#new id='btnSaveNote' class='btn btn-default'><i class='fa fa-save'></i> Save note</a> ";
$btn[]="<a href=#trash id='btnTrashNote' class='btn btn-danger pull-right'><i class='fa fa-trash'></i></a> ";
$box->footer($btn);
*/
echo $box;
<?php

$box = new LTE\Box();
$box->title("Receive");
$box->icon("fa fa-text");
$box->id("boxReceive");
$box->collapsable(true);
$box->boxTools("<button class=\"btn btn-box-tool btnclipboard\" title='Copy to clipboard'><i class='fa fa-copy'></i></button> ");
$box->body("<textarea class='form-control' id=sysex_in rows=10></textarea>");
$box->footer("<a href=#save id=saveSysex class='btn btn-default'><i class='fa fa-save'></i> Save</a>");
echo $box;
<?php

// Export as CSV //
$box = new LTE\Box();
$box->id("boxExport");
$box->title("Export");
$box->small("csv");
$box->icon("fa fa-file-excel-o");
//$box->body("<pre>Download data as csv</pre>");
$box->body("<a href='exportcsv.php' class='btn btn-default'><i class='fa fa-file-excel-o'></i> Download expenses as csv</a>");
echo $box;
<?php

// GoogleDriveCsv
$htm = [];
$htm = "<input type=text class='form-control' id='csvurl' placeholder='Enter csv url'>";
$box = new LTE\Box();
$box->id("boxGoogleDriveCsv");
$box->title("Wget csv");
$box->small("public csv url");
$box->icon("fa fa-upload");
$box->body($htm);
$box->footer("<a href=# class='btn btn-default' id='btnWget'>Import</a>");
echo $box;
Beispiel #11
0
$htm[] = '<div class="form-group">';
$htm[] = '<label class="col-sm-2 control-label">Platform</label>';
$htm[] = '<div class="col-sm-10">';
$htm[] = '<input type="text" class="form-control" id="platform" placeholder="Platform" value="' . $r['flag_platform'] . '" readonly>';
$htm[] = '</div></div>';
// URL //
$htm[] = '<div class="form-group">';
$htm[] = '<label class="col-sm-2 control-label">URL</label>';
$htm[] = '<div class="col-sm-10">';
$htm[] = '<input type="text" class="form-control" id="url" placeholder="URL" value="' . $r['ex_url'] . '" readonly>';
$htm[] = '</div></div>';
// Last update //
$date = date("Y-m-d H:i:s", strtotime($r['lastupdate']));
$htm[] = '<div class="form-group">';
$htm[] = '<label for="inputEmail3" class="col-sm-2 control-label">Updated</label>';
$htm[] = '<div class="col-xs-5">';
$htm[] = '<input type="text" class="form-control" id="category" placeholder="Category" value="' . $date . '" readonly>';
$htm[] = '</div>';
$htm[] = '<div class="col-xs-5">';
$htm[] = '<input type="text" class="form-control" id="category" placeholder="Category" value="' . $r['user_modified'] . '" readonly>';
$htm[] = '</div></div>';
$htm[] = '</div>';
$box = new LTE\Box();
$box->title($r['id']);
$box->icon('fa fa-edit');
$box->body($htm);
$box->footer("<a href=index.php class='btn btn-default'><i class='fa fa-arrow-left'></i> Back</a>");
echo $box;
//echo "<hr /><pre>";print_r($r);exit;
$admin->footer("Vorc backup");
$admin->end();
<?php

// spectrum input analyser settings
$htm = [];
// MIDI Output
$htm[] = '<div class="form-group">';
$htm[] = '<label for="title">Midi out</label>';
$htm[] = '<input type="text" class="form-control" id="midi_out">';
$htm[] = '</div>';
// MIDI Chn
$htm[] = '<div class="form-group">';
$htm[] = '<label for="title">Midi Chn</label>';
$htm[] = '<input type="text" class="form-control" id="midi_chan">';
$htm[] = '</div>';
// CC
$htm[] = '<div class="form-group">';
$htm[] = '<label for="cc_num">CC</label>';
$htm[] = '<input type="text" class="form-control" id="cc_num">';
$htm[] = '</div>';
$box = new LTE\Box();
$box->title("Settings/Filter");
$box->id("boxSettings");
$box->icon("fa fa-cog");
$box->body($htm);
echo $box;
<?php

$box = new LTE\Box();
$box->id("boxLast");
$box->icon("fa fa-clock-o");
$box->title("Last expenses");
$htm = [];
$htm[] = "<table class='table table-hover table-condensed'>";
$htm[] = "<thead>";
$htm[] = "<th>Name</th>";
$htm[] = "<th style='text-align:right'>Amount</th>";
$htm[] = "<th style='text-align:right'>Date</th>";
$htm[] = "<th width=40 class='hidden-xs'>Time</th>";
$htm[] = "<th width=18></th>";
$htm[] = "</thead>";
$htm[] = "<tbody>";
foreach ($EXP->lastExpenses(5) as $k => $v) {
    //print_r($v);
    $date = explode(" ", $v['ed_date'])[0];
    $time = explode(" ", $v['ed_date'])[1];
    $time = substr($time, 0, 5);
    if ($time == '00:00') {
        $time = '<i class="text-muted">--:--</i>';
    }
    $htm[] = "<tr>";
    $htm[] = "<td><a href='../edit/?id=" . $v['ed_id'] . "'>" . $v['ed_name'] . "</a>";
    $htm[] = "<td style='text-align:right'>" . $v['ed_value'] . ' ' . $v['ed_currency'];
    $htm[] = "<td style='text-align:right'>" . $date;
    $htm[] = "<td class='hidden-xs' style='text-align:right'>" . $time;
    $htm[] = "<td><i class='fa fa-times'></i>";
}
<?php

// http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
$htm = [];
$htm[] = "<div class=row>";
$htm[] = "<div class=col-sm-6>";
$htm[] = "<input type=text class='form-control' id='keyname' placeholder='Hit a key !'>";
$htm[] = "</div>";
$htm[] = "<div class=col-sm-6>";
$htm[] = "<input type=text class='form-control' id='keycode' placeholder='Keycode' readonly>";
$htm[] = "</div>";
$htm[] = "</div>";
$box = new LTE\Box();
$box->title("Keyboard mapping");
$box->icon("fa fa-cogs");
$box->id("boxMapping");
$box->collapsable(1);
$box->collapsed(1);
$box->body($htm);
$box->footer("<a href=#btn id=btnMapping class='btn btn-default'><i class='fa fa-list'></i> Mapping</a>");
echo $box;
<?php

//Home :: box today
$htm = [];
$box = new LTE\Box();
$box->id("boxConfig");
$box->title("Config");
$box->small("currency");
$box->icon("fa fa-wrench");
$box->body($htm);
$box->collapsed(true);
$box->footer("<a href=#save id='btnSaveConfig' class='btn btn-default'><i class='fa fa-save'></i> Save</a>");
echo $box;
<?php

$box = new LTE\Box();
$box->title("Output(s)");
$box->icon("fa fa-plug");
$box->id("boxOutputs");
$box->collapsable(true);
$box->body("<select class='form-control' id=midi_outputs size=2 disabled=disabled></select>");
echo $box;
}
$htm[] = "</select></div>";
$htm[] = "<div class='col-md-2'>";
$htm[] = "<select class='form-control' id=user><option value=''>By</option>";
foreach ($VORC->wikiJpUsers() as $val) {
    $htm[] = "<option value='{$val}'>" . ucfirst($val) . "</option>";
}
$htm[] = "</select></div>";
$htm[] = "<div class='col-md-3'>";
$htm[] = "<input type='date' id=date class='form-control'>";
$htm[] = "</div>";
$htm[] = "</div>";
$box = new LTE\Box();
$box->id("boxSearch");
$box->title("Search wiki");
$box->icon("fa fa-search");
$box->boxTools("<a href=# class='btn' title='Clear'>x</a>");
$box->body($htm);
echo $box;
?>
<div id='more'></div>
<script>
$(function(){
	$('#search,#category,#platform,#user,#date').change(function(){
		console.log('change');
		searchWiki();
	});

	var searchWiki=function(){

		var p={
<?php

$items = [];
$items[] = [0x80, 'Note off'];
$items[] = [0x90, 'Note on'];
$items[] = [0xa0, 'AfterTouch'];
$items[] = [0xb0, 'Control Changes'];
//modulation
$items[] = [0xc0, 'Program Change'];
$items[] = [0xe0, 'Pitch'];
$items[] = [0xf0, 'Continue'];
$htm = [];
foreach ($items as $item) {
    $htm[] = '<div class="checkbox">';
    $htm[] = '<label><input type="checkbox" class=filters value="' . $item[0] . '">' . $item[1] . '</label>';
    $htm[] = '</div>';
}
$box = new LTE\Box();
$box->title("Event filter(s)");
$box->icon("fa fa-filter");
$box->id("boxFilters");
//$box->boxTools("<button class=\"btn btn-box-tool\" title='Clear'><i class='fa fa-times'></i></button> ");
$box->collapsable(1);
$box->collapsed(1);
$box->body($htm);
echo $box;
<?php

// box info
$htm = "<pre>" . $REMOTE_ADDR . " -> " . print_r($IP->ipInfo($REMOTE_ADDR), true) . "</pre>";
$box = new LTE\Box();
$box->id("boxInfo");
$box->icon("fa fa-info");
$box->title("Ip info");
//$box->small("Ip info");
$box->html($htm);
echo $box;
<?php

//Home :: box stats
$this_year = date("Y");
$this_month = date("m");
//echo "<li>$this_year";
//echo "<li>$this_month";
// This year
$sql = "SELECT SUM(ed_value) FROM expenses_data WHERE ed_date>'" . date("Y-01-01") . "' AND ed_date <=CURDATE();";
$q = $EXP->db()->query($sql) or die("Error:{$sql}");
$r = $q->fetch(PDO::FETCH_ASSOC);
$htm = [];
//$htm[]="<pre>$sql</pre>";
//$htm[]="<pre>".print_r($r,true)."</pre>";
$box = new LTE\Box();
$box->id("box");
$box->title("Overview");
$box->icon("fa fa-area-chart");
$box->body($htm);
$box->collapsable(true);
$box->footer("<a href='../stats/' class='btn btn-default'><i class='fa fa-arrow-right'></i> More stats</a>");
echo $box;
<?php

// calendar user info
//$body=print_r($user,true);
$box = new LTE\Box();
$box->id("boxleft");
$box->icon("fa fa-user");
$box->title("{$username}");
$body[] = "<i class='fa fa-calendar'></i> Joined : <a href=# class='btn btn-default'>" . substr($user['date_joined'], 0, 10) . "</a><br />";
$body[] = "<i class='fa fa-calendar'></i> Last login : "******"<br />";
// Courses //
$courses = $edxApp->studentCourseEnrollment($USERID);
$body[] = "<hr />";
$body[] = "<i class='fa fa-book'></i> " . count($courses) . " course enrollment(s)<br />";
//$body[]="<table class='table table-condensed'>";
foreach ($courses as $k => $r) {
    //print_r($r);
    $meta = $edxCourse->metadata($r['course_id']);
    //print_r($meta);
    $start = @substr($meta['start'], 0, 10);
    $end = @substr($meta['end'], 0, 10);
    //$body[]="<tr>";
    $body[] = "<a href='../course/?id=" . $r['course_id'] . "' title='{$start} to {$end}'>" . strtolower($meta['display_name']) . "</a><br />";
}
//$body[]="</table>";
$foot = "<a href='../user/?id={$USERID}' class='btn btn-default'><i class='fa fa-arrow-right'></i> User info</a>";
echo $box->html($body, $foot);
?>

<div id='more'></div>
<?php

$box = new LTE\Box();
$box->title("Messages");
$box->icon("fa fa-terminal");
$box->id("boxLog");
$box->collapsable(true);
$box->body("Select midi output");
echo $box;