forked from MiczFlor/RPi-Jukebox-RFID
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcardEdit.php
executable file
·108 lines (87 loc) · 2.47 KB
/
cardEdit.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
include("inc.header.php");
/**************************************************
* VARIABLES
* No changes required if you stuck to the
* INSTALL-stretch.md instructions.
* If you want to change the paths, edit config.php
***************************************************/
/* NO CHANGES BENEATH THIS LINE ***********/
$conf['url_abs'] = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; // URL to PHP_SELF
/*******************************************
* START HTML
*******************************************/
html_bootstrap3_createHeader("en","Phoniebox",$conf['base_url']);
?>
<body>
<div class="container">
<?php
include("inc.navigation.php");
$fileshortcuts = $conf['shared_abs']."/shortcuts/".$post['cardID'];
/*******************************************
* ACTIONS
*******************************************/
include("inc.processCheckCardEditRegister.php");
?>
<div class="row playerControls">
<div class="col-lg-12">
<h1><?php print $lang['cardEditTitle']; ?></h1>
<?php
/*
* Do we need to voice a warning here?
*/
if ($messageAction == "") {
$messageAction = $lang['cardEditMessageDefault'];
}
if(isset($messageSuccess) && $messageSuccess != "") {
print '<div class="alert alert-success">'.$messageSuccess.'<p>'.$lang['cardEditMessageInputNew'].'</p></div>';
//unset($post);
} else {
if(isset($warning)) {
print '<div class="alert alert-warning">'.$warning.'</div>';
}
if(isset($messageAction)) {
print '<div class="alert alert-info">'.$messageAction.'</div>';
}
}
?>
<?php
if($debug == "true") {
print "<pre>";
print_r($_POST);
print_r($post);
print_r($conf);
print "</pre>";
}
?>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<?php
/*
* pass on some variables to the form.
* Doing this so I can reuse the form in other places to edit or register cards.
*/
$fdata = array(
"streamURL_ajax" => "false",
"streamURL_label" => $lang['globalCardId'],
"streamURL_placeholder" => $lang['globalCardIdPlaceholder'],
"streamURL_help" => $lang['globalCardIdHelp'],
);
$fpost = $post;
include("inc.formCardEdit.php");
?>
</div><!-- / .col-lg-12 -->
</div><!-- /.row -->
</div><!-- /.container -->
<script>
$(document).ready(function() {
$('#refresh_id').load('ajax.refresh_id.php');
var refreshId = setInterval(function() {
$('#refresh_id').load('ajax.refresh_id.php?' + 1*new Date());
}, 1000);
});
</script>
</body>
</html>