| ︙ | | | ︙ | |
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
|
@ <tr><td><td>
@ <input type="hidden" name="sn" value="%h(zOldName)">
@ <input type="submit" name="rename" value="Rename">
@ <input type="submit" name="canren" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
style_finish_page("skins");
return 1;
}
db_unprotect(PROTECT_CONFIG);
db_multi_exec(
"UPDATE config SET name='skin:%q' WHERE name='skin:%q';",
zNewName, zOldName
);
|
|
|
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
|
@ <tr><td><td>
@ <input type="hidden" name="sn" value="%h(zOldName)">
@ <input type="submit" name="rename" value="Rename">
@ <input type="submit" name="canren" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
style_finish_page();
return 1;
}
db_unprotect(PROTECT_CONFIG);
db_multi_exec(
"UPDATE config SET name='skin:%q' WHERE name='skin:%q';",
zNewName, zOldName
);
|
| ︙ | | | ︙ | |
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
|
@ <input type="text" size="35" name="svname" value="%h(zNewName)">
@ <tr><td><td>
@ <input type="submit" name="save" value="Save">
@ <input type="submit" name="cansave" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
style_finish_page("skins");
return 1;
}
db_unprotect(PROTECT_CONFIG);
db_multi_exec(
"INSERT OR IGNORE INTO config(name, value, mtime)"
"VALUES('skin:%q',%Q,now())",
zNewName, zCurrent
|
|
|
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
|
@ <input type="text" size="35" name="svname" value="%h(zNewName)">
@ <tr><td><td>
@ <input type="submit" name="save" value="Save">
@ <input type="submit" name="cansave" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
style_finish_page();
return 1;
}
db_unprotect(PROTECT_CONFIG);
db_multi_exec(
"INSERT OR IGNORE INTO config(name, value, mtime)"
"VALUES('skin:%q',%Q,now())",
zNewName, zCurrent
|
| ︙ | | | ︙ | |
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
|
@ <p>Deletion of a custom skin is a permanent action that cannot
@ be undone. Please confirm that this is what you want to do:</p>
@ <input type="hidden" name="sn" value="%h(P("sn"))" />
@ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
@ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
login_insert_csrf_secret();
@ </div></form>
style_finish_page("skins");
db_end_transaction(1);
return;
}
if( P("del2")!=0 && (zName = skinVarName(P("sn"), 1))!=0 ){
db_unprotect(PROTECT_CONFIG);
db_multi_exec("DELETE FROM config WHERE name=%Q", zName);
db_protect_pop();
|
|
|
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
|
@ <p>Deletion of a custom skin is a permanent action that cannot
@ be undone. Please confirm that this is what you want to do:</p>
@ <input type="hidden" name="sn" value="%h(P("sn"))" />
@ <input type="submit" name="del2" value="Confirm - Delete The Skin" />
@ <input type="submit" name="cancel" value="Cancel - Do Not Delete" />
login_insert_csrf_secret();
@ </div></form>
style_finish_page();
db_end_transaction(1);
return;
}
if( P("del2")!=0 && (zName = skinVarName(P("sn"), 1))!=0 ){
db_unprotect(PROTECT_CONFIG);
db_multi_exec("DELETE FROM config WHERE name=%Q", zName);
db_protect_pop();
|
| ︙ | | | ︙ | |
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
|
@ <input type="submit" name="draftdel" value="Delete">
@ <input type="hidden" name="name" value="%h(zN)">
@ </form></tr>
}
db_finalize(&q);
@ </table>
style_finish_page("skins");
db_end_transaction(0);
}
/*
** Generate HTML for a <select> that lists all the available skin names,
** except for zExcept if zExcept!=NULL.
*/
|
|
|
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
|
@ <input type="submit" name="draftdel" value="Delete">
@ <input type="hidden" name="name" value="%h(zN)">
@ </form></tr>
}
db_finalize(&q);
@ </table>
style_finish_page();
db_end_transaction(0);
}
/*
** Generate HTML for a <select> that lists all the available skin names,
** except for zExcept if zExcept!=NULL.
*/
|
| ︙ | | | ︙ | |
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
|
@ </pre>
}
blob_reset(&from);
blob_reset(&to);
blob_reset(&out);
}
@ </div></form>
style_finish_page("skins");
db_end_transaction(0);
}
/*
** Try to initialize draft skin iSkin to the built-in or preexisting
** skin named by zTemplate.
*/
|
|
|
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
|
@ </pre>
}
blob_reset(&from);
blob_reset(&to);
blob_reset(&out);
}
@ </div></form>
style_finish_page();
db_end_transaction(0);
}
/*
** Try to initialize draft skin iSkin to the built-in or preexisting
** skin named by zTemplate.
*/
|
| ︙ | | | ︙ | |
1127
1128
1129
1130
1131
1132
1133
1134
1135
|
@ <p>Administrators can optionally save or restore legacy skins, and/or
@ undo a prior publish.
}else{
@ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
@ for cleanup and recovery actions.
}
builtin_request_js("skin.js");
style_finish_page("skins");
}
|
|
|
1127
1128
1129
1130
1131
1132
1133
1134
1135
|
@ <p>Administrators can optionally save or restore legacy skins, and/or
@ undo a prior publish.
}else{
@ <p>Visit the <a href='%R/setup_skin_admin'>Skin Admin</a> page
@ for cleanup and recovery actions.
}
builtin_request_js("skin.js");
style_finish_page();
}
|