public function getVendedores() { $return = array(); if (!($result = $this->mysql->query("SELECT nombre, apellido, codigo,id FROM vendedores"))) { printf("Error: %s\n", $this->mysql->error); die; } $config = getRespConfig(); $resp = array(); while ($oVendedor = $result->fetch_array(MYSQLI_ASSOC)) { $return[] = $oVendedor; } return $return; }
"> <input type="hidden" name="id_remito" value="<?php if (isset($_GET["id_remito"])) { echo $_GET["id_remito"]; } ?> "> <input type="hidden" name="type" value="POSTVENTA"> <!-- Main jumbotron for a primary marketing message or call to action --> <div class="jumbotron"> <h1>Encuesta Postventa</h1> <p>Gracias por responder nuestras encuestas</p> </div> <?php foreach (getRespConfig() as $k => $options) { echo "<br/><br/><p class='lead'>" . $options["pregunta"] . "</p>"; if (isset($options["formType"]) && $options["formType"] == "select") { echo "<select name='{$k}'>"; } foreach ($options["resp"] as $value => $text) { $inline = !isset($options["inline"]) ? "inline" : ""; if (isset($options["formType"]) && $options["formType"] == "select") { echo " <option value='{$value}'>{$text}</option>"; } else { echo ' <div class="radio ' . $inline . '"> <label class="radio "><input type="radio" name="' . $k . '" value="' . $value . '"><span class="metro-radio">' . $text . '</span></label> </div>'; } } if (isset($options["formType"]) && $options["formType"] == "select") {