-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditbookmark-form.php
executable file
·101 lines (89 loc) · 2.83 KB
/
editbookmark-form.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<!-- Page dependent settings such as settitle -->
<?php
require_once("deps/session.inc");
require_once("deps/presentation.inc");
require_once("deps/database.inc");
$title = settitle(__EDIT);
$thisPage = __EDIT;
?>
<head>
<!-- Global head attributes and scripts (JQuery, etc.) -->
<?php require_once('templates/head.inc') ?>
<!-- Page-specific head attributes -->
<?php require_once('deps/validations.inc') ?>
</head>
<body>
<!-- Below should remain as is on every page -->
<div id="title">
<?php require_once('templates/layout/title.php'); ?>
</div>
<div id="language">
<?php require_once('templates/layout/language.php'); ?>
</div>
<div id="navigation">
<?php require_once('templates/layout/navigation.php'); ?>
</div>
<!-- Above should remain as is on every page -->
<div id="wrap">
<div id="contentwrap">
<div id="content">
<?php
$cid = $_POST['cid'];
$bid = $_POST['bid'];
$bk = fetchBookmark($bid);
$comm = getComment($cid);
$title = $comm->getTitle();
$desc = $comm->getDesc();
$tags = fetchUserTags($bk);
$tagsString = implode(' ', $tags);
?>
<p><?=__NOWEDITING.'<br /><em>'.myTruncate($bk->getUrl(), 100, "/").'</em>'?></p>
<form id='editbookmark' action="editbookmark-exec.php" method="post" accept-charset="utf-8">
<input type="hidden" name="cid" value="<?=$cid?>" />
<input type="hidden" name="bid" value="<?=$bid?>" />
<table>
<tr><td> </td><td> </td></tr>
<tr>
<td><?=__BOOKMARKTITLE?></td>
<td>
<input type="text" name="title" maxlength="140" size="60" value="<?=$title?>" />
</td>
</tr>
<tr>
<td><?=__DESCRIPTION?></td>
<td><textarea name="desc" rows="8" cols="40" /><?=$desc?></textarea></td>
</tr>
<tr>
<td><?=__TAGS?></td>
<td> <input class="tags" type="text" name="tags" maxlength="200" size="60" value="<?=$tagsString?>" />
</td>
</tr>
<tr><td> </td><td> </td></tr>
<tr><td> </td><td> </td></tr>
<tr>
<td colspan="2"><input type="checkbox" name="keeprating" value="true" /><?=__KEEPRATING?></td>
</tr>
<tr>
<td colspan="2"><em><?=__KEEPRATINGNOTICE?></em></td>
</tr>
<tr><td> </td><td> </td></tr>
<tr>
<td colspan="2"><input type="submit" value=<?=__CONFIRM?>></td>
</tr>
</table>
</form>
</div>
</div>
<div id="navigation">
<?php require('templates/layout/navigation.php'); ?>
</div>
</div>
<!-- Below should remain as is on every page -->
<div id="footer">
<?php require_once('templates/layout/footer.php'); ?>
</div>
<!-- Above should remain as is on every page -->
</body>
</html>