-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditPost.php
109 lines (95 loc) · 5.86 KB
/
editPost.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
109
<?PHP
require_once(dirname(__FILE__) ."/includes/globals.php");
require_once(dirname(__FILE__) ."/includes/functions/post.php");
$post = getPost($_GET['id']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/blogTemplate.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="This is a blog that is a work-in-progress. It is completely written by hand by me. Well, minus the jHtmlArea WYSIWYG and jQuery." />
<meta name="Keywords" content="ian meinert, blog" />
<link rel="stylesheet" href="includes/css/main.css" type="text/css"/>
<link rel="Stylesheet" type="text/css" href="/includes/jHtmlArea/style/jHtmlArea.css" />
<script type="text/javascript" src="/includes/jHtmlArea/scripts/jquery-1.3.2.js"></script>
<script type="text/javascript" src="/includes/jHtmlArea/scripts/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="/includes/jHtmlArea/scripts/jHtmlArea-0.7.5.js"></script>
<script type="text/javascript">
$(function() {
$("textarea").htmlarea(); // Initialize all TextArea's as jHtmlArea's with default values
//$("#txtDefaultHtmlArea").htmlarea(); // Initialize jHtmlArea's with all default values
$("#txtCustomHtmlArea").htmlarea({
// Override/Specify the Toolbar buttons to show
toolbar: [
["bold", "italic", "underline", "|", "forecolor"],
["p", "h1", "h2", "h3", "h4", "h5", "h6"],
["link", "unlink", "|", "image"],
]
});
});
</script>
<title><?PHP echo $site['title'] ?></title>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body>
<div id="outer-wrapper">
<div id="inner-wrapper">
<div id="content-wrapper">
<!-- Begin Content -->
<div id="content">
<!-- Main Navigation -->
<?PHP include("includes/topnav.php"); ?>
<!-- Body Content -->
<div id="content-inner">
<!-- InstanceBeginEditable name="body" -->
<?PHP
if(isset($_SESSION['user']))
{
require_once(dirname(__FILE__) ."/includes/modules/postMenu.php");
?>
<form action="/includes/ui/editPost.php" method="post">
<table>
<tr>
<td><label for="postTitle">Post Title:</label></td>
<td><input type="text" name="postTitle" value="<?PHP echo $post['Title']; ?>" size="100"/></td>
</tr>
<tr>
<td><label for="postAuthor">Author:</label></td>
<td><input type="text" name="postAuthor" value="<?PHP echo $post['Author']; ?>"/></td>
</tr>
<tr>
<td><label for="postCatID">Category:</label></td>
<td><select name="postCatID" >
<option value="">Select a Category</option>
<?PHP
require_once(dirname(__FILE__) ."/includes/functions/category.php");
getCategoryItemsAsList($post['Category_ID']);
?>
</select>
</td>
</tr>
<tr>
<td colspan="2"><textarea name="postContent" rows="10" cols="84"><?PHP echo $post['Content']; ?></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="hidden" name="postID" value="<?PHP echo $post['ID']; ?>" />
<button type="button" name="Cancel" onClick="history.go(-1);return true;">Cancel</button>
<button type="submit" name="Submit" >Submit</button>
</td>
</tr>
</table>
</form>
<?PHP } ?>
<!-- InstanceEndEditable -->
</div>
</div>
<!-- Begin Left Column -->
<?PHP include("includes/leftCol.php"); ?>
</div><!-- End Content-Wrapper -->
<!-- Begin Footer -->
<?PHP include("includes/footer.php"); ?>
</div>
</div>
</body>
<!-- InstanceEnd --></html>