-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.php
29 lines (28 loc) · 1007 Bytes
/
styles.php
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
<?php require 'db.php';
$user = $_COOKIE["user"];
$error = "";
$client_id = $_GET["client_id"];
$client_site_styles = getClientSiteStyles($client_id);
foreach ($client_site_styles as $client_site_style) {
echo $client_site_style["selector"]."{\n";
$attributes = explode(";", $client_site_style["attributes"]);
foreach ($attributes as $attribute) {
echo $attribute.";\n";
}
echo "}\n";
}
function getClientSiteStyles($client_id) {
$client_site_styles = array();
DBLogin("a8823305_audio");
$result = DBQuery("SELECT * FROM client_site_styles WHERE client_id = ".$client_id);
if ($result->num_rows == 0) {
echo "No rows found.";
exit;
}
while ($row = $result->fetch_array(MYSQL_ASSOC)) {
$client_site_styles[] = $row;
}
DBC();
return $client_site_styles;
}
?>