<?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome & Seditio Team
http://www.neocrome.net
http://www.seditio.org
[BEGIN_SED]
File=plugins/markhtml/markhtml.import.tags.php
Version=161
Updated=2012-feb-21
Type=Plugin
Author=Amro
Description=
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=markhtml
Part=markhtmlimport
File=markhtml.import.tags
Hooks=import.tags
Tags=
Order=10
[END_SED_EXTPLUGIN]
==================== */

if (!defined('SED_CODE')) { die('Wrong URL.'); }

function sed_markhtml($post_var_name, $post_var_value) {    
   global $usr, $cfg; 
      
   if (isset($post_var_value)) {                  
        // Connecting the filter class only if the variable exists in the array POST[***]        
        require('plugins/markhtml/inc/markhtml.class.php');                    
        
        // Use XHTML ?
        $use_xhtml = $cfg['plugin']['markhtml']['use_xhtml'];
        if ($use_xhtml == "yes") { $use_xhtml = true; } else { $use_xhtml = false; }               
        
        $usergroup_config_filter = 'usergroup_'.$usr['maingrp'];                    
        
        if (isset($cfg['plugin']['markhtml'][$usergroup_config_filter]))  {
            // Prohibit tags in array
            $tags_prohibit = explode(',', $cfg['plugin']['markhtml'][$usergroup_config_filter]); 
        }         
        // If the configuration does not exist, then set it to default. 
        // If the configuration is empty, then the html filter is disabled (for Administrators).        
        else {
            // Default Prohibit tags in array
            $tags_prohibit = explode(',', $cfg['plugin']['markhtml']['tags_prohibit_default']);
        }
        if (!empty($tags_prohibit[0]))  {
          $post_var_value = markhtml($post_var_value, $use_xhtml, $tags_prohibit); 
        }
    }	
    //
    return $post_var_value;        
}

$v = sed_markhtml($name, $v);

?>
