" . $yes. "; " ; $form .= "". $no ; }else{ $form .= "" . $yes. "; " ; $form .= "". $no ; } return $form; } endif; if(!function_exists("categorie_select")): function categorie_select($option_name = '',$value='',$row_num=0 ,$sort_column = 'ID', $sort_order = 'asc') { $mydirpath = dirname(dirname(__FILE__)); $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; if ($mydirname == 'wordpress'){ $wp_prefix = 'wp_'; } else { $wp_prefix = $mydirname . '_'; } $xoopsDB =& Database::getInstance(); $myts =& MyTextSanitizer::getInstance(); $selected = explode(',' , $value); $isAll = (count($selected)==0||empty($selected[0]))?true:false; $sort_column = 'cat_'.$sort_column; if (empty($row_num)) $size = ''; else $size = 'size="' . $row_num . '"'; include $mydirpath.'/wp-includes/version.php'; if ($wp_db_version < 6124) { $db_xpress_categories = $xoopsDB->prefix($wp_prefix . 'categories'); $query = " SELECT cat_ID, cat_name, category_nicename,category_parent FROM $db_xpress_categories WHERE cat_ID > 0 "; $query .= " ORDER BY $sort_column $sort_order"; } else { $db_xpress_terms = $xoopsDB->prefix($wp_prefix . 'terms'); $db_xpress_term_taxonomy = $xoopsDB->prefix($wp_prefix . 'term_taxonomy'); $query = " SELECT $db_xpress_terms.term_id as cat_ID , $db_xpress_terms.name as cat_name , $db_xpress_term_taxonomy.taxonomy FROM $db_xpress_terms LEFT JOIN $db_xpress_term_taxonomy ON $db_xpress_terms.term_id = $db_xpress_term_taxonomy.term_id WHERE $db_xpress_term_taxonomy.taxonomy = 'category' "; $query .= " ORDER BY $sort_column $sort_order"; } $res = $xoopsDB->query($query, 0, 0); $option = "\t\n"; if ($res !== false){ while($row = $xoopsDB->fetchArray($res)){ $cat_name = $row['cat_name']; $cat_ID = $row['cat_ID']; $option .= "\thtmlspecialchars($cat_name); $option .= "\n"; } } $output = _MB_XP2_CATS_SELECT ."\n"; $output .= ' ' ."\n"; $output .= $option; $output .= ''; $output .= ' ' . _MB_XP2_CATS_DIRECT_SELECT . " \n"; $output .= ' '; return $output; } endif; if(!function_exists("comment_type_select")): function comment_type_select($option_name = '',$value='') { $selected = explode(',' , $value); $isAll = (count($selected)==0||empty($selected[0]))?true:false; $option = ""; $option .= ""; $option .= ""; $option .= ""; $output = _MB_XP2_COM_TYPE . "\n"; $output .= "\n"; $output .= ' ' ."\n"; $output .= $option; $output .= ''; $output .= ' '; return $output; } endif; if(!function_exists("block_template_setting")): function block_template_setting($mydirname,$option_name = '',$value='') { $temp_parm = explode(':' , $value); if (empty($temp_parm[1])) { $filename=$temp_parm[0]; $temp_type = 'db'; } else { $filename=$temp_parm[1]; $temp_type = $temp_parm[0]; } $none_prefix_filename = ''; $pattern = '^' . $mydirname . '_(.*).html'; if (preg_match('/' . $pattern . '/' , $filename, $match)){ // file prefix check $none_prefix_filename = $match[1]; } $output = _MB_XP2_THISTEMPLATE . "\n"; $output .= '' . "\n"; $output .= ' ' ."\n"; switch ($temp_type){ case 'db': case 'DB': $output .= 'db'; $output .= 'file'; break; default: $output .= 'db'; $output .= 'file'; } $output .= ''; $output .= ':'.$mydirname . '_'; $output .= '.html'; $output .= ' '; return $output; } endif; if(!function_exists("javascript_check")): function javascript_check() { $out = '' . _MB_XP2_NO_JSCRIPT . ''; $out .= ''; return $out; } endif; ?>
' . _MB_XP2_NO_JSCRIPT . '