-
Notifications
You must be signed in to change notification settings - Fork 1
/
admin_pjt_persona.php
90 lines (76 loc) · 2.69 KB
/
admin_pjt_persona.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
<?php
require_once "session_inc.php";
require_once "header.inc.php";
require_once "dbconnect.php";
//set up some SQL statements
$sql["language"] = 'SELECT * from languages';
try {
$dbq = db_connect();
?>
<div id="wrapper">
<?php
include "nav_part.inc.php";
?>
<div id="page-wrapper">
<h1>Persona Information</h1>
<table id="pjt_personae_tbl" class="table table-bordered table-hover table-striped tablesorter">
<thead>
<tr>
<th>Persona Title</th>
<th>Persona Description</th>
<th>Persona Language</th>
</tr>
</thead>
<tbody>
<?php
$pre_result = $dbq->prepare("select personaTitle, personaDescription, personaLanguage from personae");
$pre_result->execute();
while ($row = $pre_result->fetch(PDO::FETCH_ASSOC)) {
// print_r($row);
printf('<tr><td>%s</td><td>%s</td><td>%s</td></tr>', $row['personaTitle'],$row['personaDescription'] ? $row['personaDescription'] : "No information provided", $row['personaLanguage']);
}
?>
</tbody>
</table>
<!-- adding new action -->
<div class="action_wrapper">
<div class="center-block"><button class="toggle btn btn-default">Add New Persona</button></div>
<div class="clearfix"></div>
<div class="toggle-content center-block" style="display:none;">
<form id="addProject" name="addProject" action="adminproc.php" method="post">
<h2>Add Project Persona(s)</h2>
<!-- <a class="addmore" href="#" id="addMorePersonas">Add Another Persona</a>-->
<div id="personas">
<div class="addPersona">
<label for="personaTitle[]">Persona Title</label><input class="input-text form-control notEmpty" type="text" name="personaTitle[]" />
<label for="personaDesc[]">Persona Description</label><input class="input-text form-control notEmpty" type="text" name="personaDesc[]" />
</div>
</div>
<input type="hidden" name="source" value="persona" class="notEmpty">
<input class="btn btn-success form-control form-button" type="submit">
</form>
</div>
</div>
</div>
<?
// logout form
require_once "logout_form.inc.php";
?>
</div>
<?
//close connection
$dbq = NULL;
} catch (PDOException $e) {
print ("getMessage(): " . $e->getMessage () . "\n");
}
?>
<!-- include js files -->
<!-- // <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> -->
<script src="javascripts/modernizr.foundation.js"></script>
<script src="javascripts/foundation.js"></script>
<script src="javascripts/app.js"></script>
<script src="javascripts/admin.js"></script>
<?php
$active = "Persona";
include "footer.inc.php";
?>