| ︙ | | | ︙ | |
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
|
@ <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_body_and_footer("skins");
return 1;
}
db_unprotect(PROTECT_CONFIG);
db_multi_exec(
"UPDATE config SET name='skin:%q' WHERE name='skin:%q';",
zNewName, zOldName
);
|
|
|
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
|
@ <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
);
|
| ︙ | | | ︙ | |
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
|
@ <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_body_and_footer("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
|
|
|
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
|
@ <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
|
| ︙ | | | ︙ | |
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
|
@ <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_body_and_footer("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();
|
|
|
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
|
@ <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();
|
| ︙ | | | ︙ | |
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
|
@ <input type="submit" name="draftdel" value="Delete">
@ <input type="hidden" name="name" value="%h(zN)">
@ </form></tr>
}
db_finalize(&q);
@ </table>
style_body_and_footer("skins");
db_end_transaction(0);
}
/*
** Generate HTML for a <select> that lists all the available skin names,
** except for zExcept if zExcept!=NULL.
*/
|
|
|
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
|
@ <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.
*/
|
| ︙ | | | ︙ | |
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
|
@ </pre>
}
blob_reset(&from);
blob_reset(&to);
blob_reset(&out);
}
@ </div></form>
style_body_and_footer("skins");
db_end_transaction(0);
}
/*
** Try to initialize draft skin iSkin to the built-in or preexisting
** skin named by zTemplate.
*/
|
|
|
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
|
@ </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.
*/
|
| ︙ | | | ︙ | |
1118
1119
1120
1121
1122
1123
1124
1125
1126
|
@ <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_body_and_footer("skins");
}
|
|
|
1118
1119
1120
1121
1122
1123
1124
1125
1126
|
@ <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");
}
|