<?php include_once dirname(dirname(__FILE__)) . '/querys/getBugs.php'; //conexion local //include_once dirname(dirname(__FILE__)) . '/querys/getTM.php'; //getTM //include_once dirname(dirname(__FILE__)) . '/querys/getEmpresa.php'; //getEmpresa echo '<div class="table-responsive">'; echo "<table class='table table-condensed table-bordered table-hover'>\n <thead>\n <tr>\n\t\t\t\t<th>Close</th>\n <th>Informante</th>\n <th>Titulo</th>\n <th>Descripcion</th>\n <th>Fecha</th>\n </tr>\n </thead>"; echo "<tbody>"; $bugs = getBugs('tm'); if ($bugs) { foreach ($bugs as $bug) { echo "<tr>"; echo '<td><input type="checkbox" value="' . $bug['id'] . '" class="closebug"></td>'; echo '<td>' . $bug['Nombre'] . ' ' . $bug['Apellido'] . '</td>'; echo "<td>{$bug['Titulo']}</td>\n <td>{$bug['Descripcion']}</td>\n <td>{$bug['fecha']}</td>\n </tr>"; } } // for each de los bugs $bugs = getBugs('empresa'); if ($bugs) { foreach ($bugs as $bug) { echo "<tr>"; echo '<td><input type="checkbox" value="' . $bug['id'] . '" class="closebug"></td>'; echo '<td>' . $bug['Nombre'] . '</td>'; echo "<td>{$bug['Titulo']}</td>\n <td>{$bug['Descripcion']}</td>\n <td>{$bug['fecha']}</td>\n </tr>"; } } // for each de los bugs echo "</tbody>\n </table></div>";
<?php require_once __DIR__ . '/funzioni.php'; // MongoDB Connection $con = connectToMongo(); //Select all CLOSED bug(s) $bugzilla_query = $_POST['urlsend']; // cache in a local cache folder if possible $csv = cacheUrl($bugzilla_query . '/buglist.cgi?bug_status=CLOSED&resolution=FIXED&ctype=csv'); //CSV dei bug closed // count bug(s) $conta = 0; //Recive name of collection from front-end $collname = $_POST['collname']; foreach (getBugsFromCSV($csv) as $bug_number => $bug_title) { if (!empty($bug_number)) { getBugs($bug_number, $con, $collname, $bugzilla_query); } $conta++; //Limit bug to keep //if ($conta == 100) //break; } // Print the results on front-end echo 'Prelevati: ' . $conta; flush(); ob_flush();