function edit_css() { $mainframe = JFactory::getApplication(); $user = JFactory::getUser(); $getparams = JRequest::get('get'); $canCreate = $user->authorise('core.create', 'com_formmaker'); $canEdit = $user->authorise('core.edit', 'com_formmaker'); if (!$canCreate && !$canEdit) { $mainframe->redirect("index.php?option=com_formmaker&task=form_options&cid[]=" . $getparams['form_id'], JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'), 'error'); } $db = JFactory::getDBO(); $query = "SELECT * FROM #__formmaker_themes WHERE id=" . $getparams['theme']; $db->setQuery($query); $theme = $db->loadObject(); $query = "SELECT * FROM #__formmaker WHERE id=" . $getparams['form_id']; $db->setQuery($query); $form = $db->loadObject(); HTML_contact::editCss($theme, $form); }