Location: PHPKode > projects > Digital Media Courseware > template/frontend/index.php
<?php

require_once( DMCROOT . 'lib/class/DMC.php');
require_once( DMCROOT . 'lib/class/Course.php');

$DMC = new DMC();
$Course = new Course();

$DMC->setPage('fe_index');

$css_rows = array('uno','dos','tres');

$q = $Course->courseDetail($id);
$alumnos = $Course->courseStudentList($id);
$profesores = $Course->courseProfessorList($id);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $q['titulo'] ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="processing, java processing program" />
<meta name="authors" content="Mauricio Giraldo/Hernando Barragan" />
<link href="../../css/fe_screen.css" rel="stylesheet" type="text/css" />
<link href="css/custom_screen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="head">
	<h1><?php echo $q['titulo'] ?></h1>
<?php
if ($q['subtitulo'] != '') {
?>
	<h2><?php echo $q['subtitulo'] ?></h2>
<?php
}
?>
<?php
if (count($profesores) > 0) {
	$_contador = 0;
?>
	<h2>
	<?php echo $DMC->lang_data['fe_base']['titulo_profesor'] ?>:
<?php
	foreach ($profesores as $row) {
		if ($row['url'] != '') {
?>
	<a href="<?php echo $row['url']; ?>" target="_blank"><?php echo $row['nombre']; ?> <?php echo $row['apellido']; ?></a> 
<?php
		} else {
?>
	<?php echo $row['nombre'] . ' ' . $row['apellido']; ?>
<?php
		}
		$_contador++; 
		if ($_contador < count($profesores)) echo ', ';
	}
?>
	</h2>
<?php
}
?>
</div>
<div id="nav">
	<?php echo $DMC->doNav($q['path'],$q['ejercicios'],$q['horario'],$q['programa'],$q['fotos'],'principal') ?>
</div>
<div id="content">
<?php
if ($q['texto'] != '') {
?>
	<?php echo $q['texto'] ?>

<?php
}
?>
	<h3><?php echo $DMC->m('titulo_estudiantes') ?></h3>
	<div class="indice">
<?php
if (count($alumnos) > 0) {
	$_contador=0;
	foreach ($alumnos as $row) {
		if (!$_contador%3) {
?>
		<ul>
<?php
		}
		if ($row['foto'] != '') {
?>
			<li class="<?php echo $css_rows[$_contador] ?>" style="background-image:url(files/person<?php echo $row['p_id']; ?>/<?php echo $row['foto']; ?>);"><a href="persona.php?p_id=<?php echo $row['p_id']; ?>" title="<?php echo $row['nombre']; ?> <?php echo $row['apellido']; ?>"><span><?php echo $row['nombre']; ?> <?php echo $row['apellido']; ?></span></a></li>
<?php
		} else {
?>
			<li class="<?php echo $css_rows[$_contador] ?>" style="background-image: url(../../img/vacio.gif);"><a href="persona.php?p_id=<?php echo $row['p_id']; ?>" title="<?php echo $row['nombre']; ?> <?php echo $row['apellido']; ?>"><span><?php echo $row['nombre']; ?> <?php echo $row['apellido']; ?></span></a></li>
<?php
		}
		$_contador++;
		if ($_contador==3) {
?>
		</ul>
<?php 
			$_contador=0;
		}
	}
	if ($_contador == 1) {
?>
			<li class="dos"></li>
			<li class="tres"></li>
		</ul>
<?php
	} elseif ($_contador == 2) {
?>
			<li class="tres"></li>
		</ul>
<?php
	}
} else {
?>
		<p><?php echo $DMC->m('err_no_estudiantes') ?></p>
<?php
}
?>
	</div>
	<div id="footer">
		<?php echo $DMC->doFooter($DMC->app['DMC_validate']) ?>
	</div>

</div>
</body>
</html>
Return current item: Digital Media Courseware