-
Notifications
You must be signed in to change notification settings - Fork 1
/
publisher_section.php
50 lines (41 loc) · 1.52 KB
/
publisher_section.php
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
<?php
// include required file
require_once 'init.php';
$pageTitle = lang('publishers');
$activePage = "publishers";
require_once $tmpl . 'header.php';
// validate session
if (!isset($_SESSION['UserEmail'])) {
redirect_user();
}
// validate param
if (!filter_input(INPUT_GET, 'pub', FILTER_VALIDATE_INT)) {
$url = "publishers.php";
redirect_user(lang("redirect_pub_message"), 5 ,$url);
}
$pub_id = filter_input(INPUT_GET, 'pub', FILTER_VALIDATE_INT);
$results = get_data(SELECT_PUBLISHER_INFO, [$pub_id]);
// author breadcrumb
// name => url : href= "example.php"
// name => class: class="active" this for the current items
// note : the last element should be the active class element
$items = array(
lang("home") => 'href="index.php"',
lang("publishers") => 'href="publishers.php"',
$results['pub_name'] => 'class="active"'
);
breadcrumb($items);
// author details section
$pub_detail = lang('was_established') . $results['pub_name'] . lang('in_date') . $results['establishment_date'] . lang('by') . $results['owner'] . lang('sequential_deposit_no') . $results['sequential_deposit_no'];
section_detail($results['pub_name'], $pub_detail);
// delete popup section
delete_popup(lang('delete_book_popup_text'), "temp");
// no delete popup section
no_delete_popup(lang('no_delete_book_popup_text'));
// publisher box section
$container_id = "publisher_container";
container_site($container_id);
// to load items
load_script("load_section.php", $container_id, "pub", $pub_id);
// footer section
include $tmpl . 'footer.php';