" . $yes. "; " ; $form .= "". $no ; }else{ $form .= "" . $yes. "; " ; $form .= "". $no ; } return $form; } endif; if(!function_exists("dropdown_cats_options")): function dropdown_cats_options($sort_column = 'ID', $sort_order = 'asc', $selected=array()) { $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 = is_array($selected)?$selected:array($selected); $sort_column = 'cat_'.$sort_column; 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); if ($res !== false){ while($row = $xoopsDB->fetchArray($res)){ $cat_name = $row['cat_name']; $cat_ID = $row['cat_ID']; echo "\t\n"; } } return; } 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"; } } $output = _MB_XP2_CATS_SELECT ."
\n"; $output .= "\n"; $output .= '  
'; $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 = "