Ps. V php je to podobne, jen tam pridas dolary a par uprav. Ale s php by se to zbytecne komplikovalo. Pokud stranka stahne uz vsechny recepty, tak proc volat zas server, kdyz to muzes filtrovat uz u klienta pomoci javascriptu?
Příspěvky odeslané z IP adresy 2001:718:2601:258:4172:2a...–
peter
peter
Mozne to je, ale html neni excel. Musis si vygooglovat potrebny js/jquery nebo napsat sam.
http://vratnice.fpf.slu.cz/…l-seznam.htm
google = javascript table filter
http://listjs.com/examples/table/
https://www.sitepoint.com/…uery-tables/ - treba FancyGrid
http://koalyptus.github.io/…ter/examples - Exact match by column (jen jin to ve FF moc nefunguje, teda :) )
http://cssdeck.com/…table-filter
https://datatables.net/
<pre id=xxx></pre>
<script>
function el(id) {return document.getElementById(id);}
function myWrite(str) {el('xxx').innerHTML+="<br><br>"+str;}
function myWrite2(table) {myWrite(myFormat(table));}
function myFormat(table) {var i,j,str; str=''; for(i=0;i<table.length;i++) {for(j=0;j<table[i].length;j++) str+=table[i][j]+' | '; str+='<br>';} return str;}
function tableFilter(table,col,str) {
var i, new_table;
new_table = [];
for(i=0;i<table.length;i++)
if (table[i][col]==str) {new_table[new_table.length] = table[i];}
return new_table;
}
var table, new_table;
table = [
[1,'aaa','x'],
[2,'aab','y'],
[2,'aaa','z']
];
myWrite2(table);
myWrite('table filtr col=1, text=aaa');
new_table = tableFilter(table,1,'aaa');
myWrite2(new_table);
myWrite('new_table filtr col=0, text=2');
new_table = tableFilter(new_table,0,2);
myWrite2(new_table);
myWrite('table filtr col=0, text=2 pro puvodni table');
new_table = tableFilter(table,0,2);
myWrite2(new_table);
</script>
peter
Informaci o venkovni teplote nepotrebujes. Staci ti sledovat teplotu uvnitr a cas. Kdyz to prekroci nastavenou teplotu za urcity cas, tak je vytapeni dostacujici, kdyz ne, prida se topna spirala. Ale s venkovni teplotou by to bylo jednodussi, hned by mohl nahodit 3 spiraly.