00001 <?
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 session_start();
00027
00028
00029
00030 $id = $_SESSION['id'];
00031 include('functions/func_check_session.php');
00032 checkSession($id);
00033 $odsjek = $_SESSION['odsjek'];
00034 include('connect.php');
00035 include('functions/func_preference.php');
00036 include('template/header.php');
00037 include('functions/func_obav.php');
00038 include('template/template_menu_ob.php');
00039
00040
00041
00042 $nr_set_obav = getObavPerPage($id);
00043 $lang = getLang($id);
00044 include("lang/$lang/lang_obav.php");
00045
00046
00047
00048 if ($_GET['tip'] == "predmeti"){
00049
00050 if (!isset($_GET['stranica'])){
00051 $stranica = 1;
00052 }
00053 else {
00054 $stranica = $_GET['stranica'];
00055 }
00056 brojObavjestenjePredmeti($odsjek, $stranica, $id);
00057 obavjestenjePredmeti($odsjek, (($stranica-1)*$nr_set_obav), $id);
00058 brojObavjestenjePredmeti($odsjek, $stranica, $id);
00059 }
00060
00061
00062
00063 elseif ($_GET['tip'] == "sluzba"){
00064 if (!isset($_GET['stranica'])){
00065 $stranica = 1;
00066 }
00067 else {
00068 $stranica = $_GET['stranica'];
00069 }
00070 brojObavjestenjeSluzba($stranica);
00071 obavjestenjeSluzba((($stranica-1)*$nr_set_obav), $id);
00072 brojObavjestenjeSluzba($stranica);
00073 }
00074
00075
00076
00077 elseif ($_GET['tip'] == "predmet"){
00078 if (!isset($_GET['stranica'])){
00079 $stranica = 1;
00080 }
00081 else {
00082 $stranica = $_GET['stranica'];
00083 }
00084 brojObavjestenjeOnePredmet($odsjek, $stranica, $_GET['pred_id']);
00085 obavjestenjeOnePredmet((($stranica-1)*$nr_set_obav), $_GET['pred_id'], $id);
00086 brojObavjestenjeOnePredmet($odsjek, $stranica, $_GET['pred_id']);
00087 }
00088
00089
00090
00091 else {
00092 posljednjaObavjestenja($odsjek, $id);
00093 }
00094 menu($odsjek, $_GET['tip'], $id);
00095 include('template/footer.php');
00096 ?>