www/upl_styles.php

changeset 785
aa79acfdf8a9
parent 778
e64fd38c469c
equal deleted inserted replaced
784:d51b05838ac4 785:aa79acfdf8a9
49 $imported = 0; 49 $imported = 0;
50 $styles = simplexml_load_file($target_file); 50 $styles = simplexml_load_file($target_file);
51 51
52 foreach ($styles->STYLE as $style) { 52 foreach ($styles->STYLE as $style) {
53 53
54 $sql = "INSERT INTO profile_styles SET name='" . mysqli_real_escape_string($db, $style->NAME); 54 $uuid = str_replace("\n", "", file_get_contents('/proc/sys/kernel/random/uuid'));
55 $sql = "INSERT INTO profile_styles SET uuid='" . $uuid;
56 $sql .= "',name='" . mysqli_real_escape_string($db, $style->NAME);
55 if ($style->NOTES) 57 if ($style->NOTES)
56 $sql .= "', notes='" . mysqli_real_escape_string($db, $style->NOTES); 58 $sql .= "', notes='" . mysqli_real_escape_string($db, $style->NOTES);
57 if ($style->CATEGORY) 59 if ($style->CATEGORY)
58 $sql .= "', category='" . mysqli_real_escape_string($db, $style->CATEGORY); 60 $sql .= "', category='" . mysqli_real_escape_string($db, $style->CATEGORY);
59 if ($style->CATEGORY_NUMBER) { 61 if ($style->CATEGORY_NUMBER) {

mercurial