-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfobook.php
More file actions
60 lines (50 loc) · 1.85 KB
/
Copy pathinfobook.php
File metadata and controls
60 lines (50 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/** infobook.php
* This is the hostpage for the infobook.
* The page to be included is set by $current
* If a single sid is set then student_view.php is displayed
* or student_list.php if more than one student is set in sids.
* Alternatively, a limited set of pages are based around
* contact_list and gid (independent of any sid by setting sid='').
*/
$host='infobook.php';
$book='infobook';
include('scripts/head_options.php');
include('scripts/set_book_vars.php');
if(!isset($_SESSION['infosid']) or $current=='contact_list.php'){$_SESSION['infosid']='';}
if(!isset($_SESSION['infosid']) or $current=='contact_list.php'){$_SESSION['infosid']='';}
if(!isset($_SESSION['infosids']) or $current=='contact_list.php'){$_SESSION['infosids']=array();}
if(isset($_GET['sids'])){$_SESSION['infosids']=$_GET['sids'];}
if(isset($_POST['sids'])){$_SESSION['infosids']=$_POST['sids'];}
if(isset($_GET['sid'])){$_SESSION['infosid']=$_GET['sid'];}
if(isset($_POST['sid'])){$_SESSION['infosid']=$_POST['sid'];}
$sids=(array)$_SESSION['infosids'];
$sid=$_SESSION['infosid'];
$sidskey=array_search($sid,$sids);
$Contacts=fetchContacts($sid);
foreach($Contacts as $Contact){
$gids[]=$Contact['id_db'];
}
/*seneeds variables*/
if(!isset($_SESSION['infosenhid']) or $current=='search_action.php'){$_SESSION['infosenhid']='';}
if(isset($_GET['senhid'])){$_SESSION['infosenhid']=$_GET['senhid'];}
if(isset($_POST['senhid'])){$_SESSION['infosenhid']=$_POST['senhid'];}
$senhid=$_SESSION['infosenhid'];
$SEN=(array)fetchSEN($sid,$senhid);
$senhid=$SEN['id_db'];
if($current!='student_list.php' and $sid!=''){
$Student=fetchStudent($sid);
$student_secid=get_student_section($sid);
}
?>
<div id="bookbox" class="infocolor">
<?php
if($current!=''){
include($book.'/'.$current);
}
?>
</div>
<?php
include('infobook/search.php');
include('scripts/end_options.php');
?>