SGI.php 724 B

1234567891011121314151617181920212223
  1. <?php
  2. class SGI {
  3. public static function getProfesoresActivos($pdo, $periodo){
  4. $profes = array();
  5. $stmt = $pdo->prepare('Select * from fs_profesoresperiodo(:periodo,null, 0, null)');
  6. $stmt->bindParam(':periodo', $periodo);
  7. if($stmt->execute()){
  8. $profes = $stmt->fetchAll();
  9. }
  10. return $profes;
  11. }
  12. public static function getPeriodoActivo($pdo, $nivel){
  13. $periodo = '';
  14. $stmt = $pdo->prepare('Select * from fs_periodoactivo(:nivel)');
  15. $stmt->bindParam(':nivel', $nivel);
  16. if($stmt->execute()){
  17. $periodo = $stmt->fetch();
  18. $periodo = $periodo['Periodo_id'];
  19. }
  20. return $periodo;
  21. }
  22. }