849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
|
}
cgi_check_for_malice();
login_anonymous_available();
style_header("Tags");
style_adunit_config(ADUNIT_RIGHT_OK);
style_submenu_element("Timeline", "tagtimeline");
@ <h2>Non-propagating tags:</h2>
db_prepare(&q,
"SELECT substr(tagname,5)"
" FROM tag"
" WHERE EXISTS(SELECT 1 FROM tagxref"
" WHERE tagid=tag.tagid"
" AND tagtype=1)"
" AND tagname GLOB 'sym-*'"
" ORDER BY tagname COLLATE uintnocase"
);
@ <ul>
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0);
if( g.perm.Hyperlink ){
@ <li>%z(chref("taglink","%R/timeline?t=%T",zName))
@ %h(zName)</a></li>
}else{
@ <li><span class="tagDsp">%h(zName)</span></li>
}
}
@ </ul>
db_finalize(&q);
style_finish_page();
}
/*
** WEBPAGE: /tagtimeline
**
** Render a timeline with all check-ins that contain non-propagating
|
>
>
>
>
>
>
>
|
|
>
>
|
|
<
|
>
|
<
>
>
>
>
|
<
|
>
>
|
>
|
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
|
}
cgi_check_for_malice();
login_anonymous_available();
style_header("Tags");
style_adunit_config(ADUNIT_RIGHT_OK);
style_submenu_element("Timeline", "tagtimeline");
@ <h2>Non-propagating tags:</h2>
@ <table class='sortable' data-column-types='ktn' data-init-sort='2'>
@ <thead><tr>
@ <th>Tag Name</th>
@ <th>Most Recent</th>
@ <th>Count</th>
@ </tr></thead><tbody>
db_prepare(&q,
"SELECT substr(tagname,5),\n"
"row_number()OVER(ORDER BY tagname COLLATE uintnocase),\n"
"substr(datetime(max(mtime)),1,16),\n"
"count(*)\n"
"FROM tagxref JOIN tag USING(tagid)\n"
"WHERE tagname like 'sym-%%'\n"
"AND tagxref.tagtype=1\n"
"GROUP BY 1\n"
"ORDER BY 3 DESC;\n"
);
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0);
int rn = db_column_int(&q, 1);
const char *zDate = db_column_text(&q, 2);
int cnt = db_column_int(&q, 3);
@ <tr><td data-sortkey="%06x(rn)">\
if( g.perm.Hyperlink ){
@ %z(chref("taglink","%R/timeline?t=%T",zName))%h(zName)</a></td>\
}else{
@ <span class="tagDsp">%h(zName)</span></td>\
}
@ <td> %h(zDate) </td>\
@ <td align="center">%d(cnt)</td></tr>
}
@ </table>
db_finalize(&q);
style_table_sorter();
style_finish_page();
}
/*
** WEBPAGE: /tagtimeline
**
** Render a timeline with all check-ins that contain non-propagating
|