-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsavetheme.php
More file actions
38 lines (33 loc) · 1.03 KB
/
savetheme.php
File metadata and controls
38 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php $sqlpath = $_SERVER['DOCUMENT_ROOT'];
$sqlpath .= "/sql-connect.php";
include_once($sqlpath);
$filename = $_REQUEST['filename'];
$textcolor = $_REQUEST['textColor'];
$h1color = $_REQUEST['h1Color'];
$h2color = $_REQUEST['h2Color'];
$h3color = $_REQUEST['h3Color'];
$h4color = $_REQUEST['h4Color'];
$backgroundcolor = $_REQUEST['backgroundColor'];
$navcolor = $_REQUEST['navColor'];
$strongcolor = $_REQUEST['strongColor'];
$emcolor = $_REQUEST['emColor'];
$codecolor = $_REQUEST['codeColor'];
$linkcolor = $_REQUEST['linkColor'];
$codebg = $_REQUEST['codeBG'];
$checkbox = $_REQUEST['checkboxColor'];
$body = ':root {
--text: '.$textcolor.';
--h1: '.$h1color.';
--h2:'.$h2color.';
--h3: '.$h3color.';
--h4: '.$h4color.';
--main-background:'.$backgroundcolor.';
--sidebar-background: '.$navcolor.';
--code-background: '.$codebg.';
--strong: '.$strongcolor.';
--em: '.$emcolor.';
--code: '.$codecolor.';
--link-text: '.$linkcolor.';
}';
echo file_put_contents('themes/'.$filename.'.css', $body);
?>