<?php //index.php // PHP部分はここに書きます require_once 'init.php'; if (!isSignin()) { $signin_url = 'signin.php'; header("Location: {$signin_url}"); } $db = connectDb(); $posts = getTimeline($db); ?> <!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>index - Ditter</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> </head> <body> <!-- HTML部分はここに書きます --> <!-- Fixed navbar --> <style> body { padding-top: 70px; } </style>
<div class="timeline-body"> <button type="button" class="btn btn-info" id="detal" data-id="' . $idProfesores . '" onclick="detalles(this)">Detalles</button> <button type="button" class="btn btn-danger" id="eval" data-nombre="' . $NombreProfesores . '" data-id="' . $idProfesores . '" onclick="evaluacion(this)">Evaluar</button> </div> </div> </li>'; } return $text; $db = null; } catch (PDOException $e) { echo 'Error: ' . $e->getMessage(); } } function getTimeline($materia) { $profes = (string) getProfesores($materia); echo ' <ul class="timeline" > ' . $profes . ' </ul> <input id="profesor" class="form-control" placeholder="Agrega a un profesor" name="nuevoProfe" type="text" value> </p> <button type="button" class="btn btn-primary btn-lg btn-block" data-id="' . $materia . '" onclick="nuevo(this)"><i class="fa fa-user fa-fw"></i>Agrega a un profesor<i class="fa fa-fw fa-user"></i></button> '; } $pidMateria = $_GET["idMateria"]; getTimeline($pidMateria);