Glavna stranica | Popis datoteka | Članovi klasa u datoteci

func_rstudij.php

Dokumenacija za ovu datoteku.
00001 <?
00002 /**************************************************************************************
00003  Studentski Informacijski servis, 2004
00004  **************************************************************************************
00005  func_rstudij.php
00006  funkcija obavlja posao oko slanja zahtjeva za potvrdu
00007  o redovnom studiju
00008 
00009 
00010  Srdjan Segvic - srle
00011  **************************************************************************************
00012  **************************************************************************************
00013  This program is free software; you can redistribute it and/or modify
00014  it under the terms of the GNU General Public License as published by
00015  the Free Software Foundation; either version 2 of the License, or
00016  (at your option) any later version.
00017 
00018  This program is distributed in the hope that it will be useful,
00019  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  GNU Library General Public License for more details.
00022 
00023  You should have received a copy of the GNU General Public License
00024  along with this program; if not, write to the Free Software
00025  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00026  **************************************************************************************/
00027 
00028 function redovni($id, $action, $svrha){
00029 
00030         if (!isset($action)){
00031         $query = "SELECT zahtjev_potvrda_id
00032                   FROM   zahtjev_potvrda
00033                   WHERE  student_ID='$id'
00034                   AND    tip_potvrde ='1'";
00035         $result = mysql_query($query) or
00036                   die(mysql_error());
00037 
00038         $broj = mysql_num_rows($result);
00039         $_SESSION['broj']=$broj;
00040         $broj++;
00041         printRedovniSvrhaForm($broj);
00042 
00043         $query = "SELECT broj_protokola
00044                   FROM   evidencija_potvrda
00045                   WHERE  student_ID='$id'";
00046         $result = mysql_query($query) or die(mysql_error());
00047         $odradjeno = mysql_num_rows($result);
00048         $_SESSION['odradjeno']=$odradjeno;
00049 
00050 }
00051         elseif($action=="zahtjev"){
00052                 if (isset($svrha) && ($svrha != "")){
00053                         $sad = date("Y-m-d");
00054                         $svrha = strip_tags($svrha);
00055                         $query = "INSERT INTO zahtjev_potvrda VALUES ('auto_increment', '$id', '1', '$svrha', '$sad')";
00056                         $result = mysql_query($query) or die(mysql_error());
00057                         printServisGreska(_REGSTUDENTREQSUCCESS);
00058                 }
00059                 else {
00060                         printServisGreska(_REGSTUDENTREQERRORNOREASON);
00061                         }
00062         }
00063         else {
00064                 printServisGreska(_SSERVICESGENERALERROR);
00065         }
00066 }
00067 ?>

Generirano Thu Sep 16 17:16:01 2004 projekt: SiS.Student generator: doxygen 1.3.2