} } } // OK, we're going to try to use whatever options have been set // to build an image. // Make sure at least $nic was supplied if (!isset($_POST['nic'])) { die("No NIC supplied!"); } if (isset($nics[$_POST['nic']])) { $nic = $nics[$_POST['nic']]; } else { die("Invalid NIC \"{$_POST['nic']}\" supplied!"); } // Fetch flags $flags = get_flags(); // Get requested format $ofmt = isset($_POST['ofmt']) ? $_POST['ofmt'] : ""; $fmt_extension = isset($ofmts[$ofmt]) ? $ofmts[$ofmt] : 'dsk'; // Handle some special cases $pci_vendor_code = ""; $pci_device_code = ""; if ($nic == 'undionly' && $fmt_extension == "pxe") { // undionly.pxe can't work because it unloads the PXE stack // that it needs to communicate with, so we set the extension // to .kpxe, which has a chance of working. The extension // .kkpxe is another option. $fmt_extension = "kpxe"; } else { if ($fmt_extension == "rom") { if (!isset($_POST['pci_vendor_code']) || !isset($_POST['pci_device_code'])) {
function slider_shortcode($atts, $content = '') { extract(shortcode_atts(array('id' => false, 'mode' => 'fade', 'delay' => '8000', 'speed' => '1000', 'frame' => false, 'titles' => false), $atts)); if (!$id) { $id = 'nebula-slider-' . rand(1, 10000); } elseif (strlen($id) > 0 && ctype_digit(substr($id, 0, 1))) { $id = 'nebula-slider-' . $id; } $return = '<div id="' . $id . '" class="nebula-slider-con"><ul class="bxslider ' . $id . '" style="padding-left: 0;">'; $return .= parse_shortcode_content(do_shortcode($content)); $return .= '</ul></div><!--/nebula-shortcode-slider-con-->'; $flags = get_flags($atts); if (!in_array('frame', $flags)) { $return .= '<style> #' . $id . ' .bx-wrapper .bx-viewport {box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none; border: none; background: none;} </style>'; if ($mode == 'fade') { $return .= '<style> #' . $id . ' .bx-wrapper .bx-viewport .nebula-slide {width: auto !important;} </style>'; } } if (in_array('titles', $flags)) { $titles = 'true'; } else { $titles = 'false'; } if (!in_array('controls', $flags)) { $controls = 'false'; $auto = 'true'; } else { $controls = 'true'; if (in_array('delay', $flags)) { $auto = 'true'; } else { $auto = 'false'; } } $return .= '<script> jQuery(window).on("load", function(){ setTimeout(function(){ jQuery(".' . $id . '").bxSlider({ mode: "' . $mode . '", speed: ' . $speed . ', captions: ' . $titles . ', pager: false, auto: ' . $auto . ', pause: ' . $delay . ', autoHover: true, adaptiveHeight: true, useCSS: true, controls: ' . $controls . ' }); }, 1000); }); </script>'; return $return; }