Example #1
0
function HTMLlistaTerminosEstado($estado_id, $limite = "")
{
    //Estados posibles y aceptados
    $arrayEstados_id = array(12, 14);
    //Descripcion de estados
    $arrayEstados = array("12" => LABEL_Candidatos, "13" => LABEL_Aceptados, "14" => LABEL_Rechazados);
    if (in_array($estado_id, $arrayEstados_id)) {
        $sql = SQLterminosEstado($estado_id, $limite);
        $rows .= '<div><h1>' . ucfirst($arrayEstados[$estado_id]) . ' (' . $sql[cant] . ') </h1>';
        $rows .= '<ul>';
        while ($array = mysqli_fetch_array($sql[datos])) {
            $rows .= '<li> <a class="estado_termino' . $array[estado_id] . '" title="' . $array[tema] . '" href="index.php?tema=' . $array[tema_id] . '&tipo=E">' . $array[tema] . '</a><li/>';
        }
        $rows .= '</ul>';
        $rows .= '</div>';
    }
    return $rows;
}
function HTMLlistaTerminosEstado($estado_id, $limite = "")
{
    //Estados posibles y aceptados
    $arrayEstados_id = array(12, 14);
    //Descripcion de estados
    $arrayEstados = array("12" => LABEL_Candidatos, "13" => LABEL_Aceptados, "14" => LABEL_Rechazados);
    if (in_array($estado_id, $arrayEstados_id)) {
        $sql = SQLterminosEstado($estado_id, $limite);
        $rows .= '<div><h3>' . ucfirst($arrayEstados[$estado_id]) . ' (' . SQLcount($sql) . ') </h3>';
        if (SQLcount($sql) > 0) {
            $rows .= '<div class="table-responsive"> ';
            $rows .= '<table class="table table-striped table-bordered table-condensed table-hover">
			<thead>
			<tr>
				<th>' . ucfirst(LABEL_Termino) . '</th>
				<th>' . ucfirst(LABEL_Fecha) . '</th>
			</tr>
			</thead>
			<tbody>';
            while ($array = $sql->FetchRow()) {
                $css_class_MT = $array["isMetaTerm"] == 1 ? ' class="metaTerm" ' : '';
                $rows .= '<tr>';
                $rows .= '     	<td><a class="estado_termino' . $array[estado_id] . '" title="' . $array[tema] . '" href="index.php?tema=' . $array[tema_id] . '&tipo=E">' . $array[tema] . '</a></td>';
                $rows .= '      <td>' . $array["cuando"] . '</td>';
                $rows .= ' </tr>';
            }
            $rows .= '        </tbody>		</table>';
            $rows .= '        </div>';
        }
    }
    //if in_array
    $rows .= '</div>';
    return $rows;
}