GetStylesheetOperations(); $db =& $gCms->GetDb(); #****************************************************************************** # global variables definitions #****************************************************************************** # this variable is used to store an eventual error message. $error = ""; #****************************************************************************** # we get the content of the form if there are not empty. #****************************************************************************** # first ; the content of the css $css_text = ""; if (isset($_POST["css_text"])) $css_text = $_POST["css_text"]; # then its name $css_name = ""; if (isset($_POST["css_name"])) $css_name = $_POST["css_name"]; // Now clean up name $css_name = htmlspecialchars($css_name, ENT_QUOTES); $media_type = array(); if (isset($_POST['media_type'])) $media_type = $_POST['media_type']; // media queries $media_query = ''; if (isset($_POST['media_query'])) $media_query = $_POST['media_query']; #****************************************************************************** # if the form was cancelled, we get back to the CSS list #****************************************************************************** if (isset($_POST["cancel"])) { redirect("listcss.php".$urlext); return; } #****************************************************************************** # we now check that user has access to add CSS #****************************************************************************** $userid = get_userid(); $access = check_permission($userid, 'Add Stylesheets'); if ($access) { #****************************************************************************** # if the var "addcss" is set, this means that the form has been submitted. # we check if params are valid #****************************************************************************** if (isset($_POST["addcss"])) { # used to check if we will save the form or not $validinfo = true; # if no CSS name was given if ("" == $css_name) { $error .= "
".lang('noaccessto', array(lang('addstylesheet')))."