Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add commit leak files * add config to keywords * theme thumbnail size fix
- Loading branch information
Showing
16 changed files
with
154 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
include '../header.php'; | ||
// TOOD confirm | ||
|
||
if(!array_key_exists('id', $_GET)) exit(); | ||
$id = $_GET['id']; | ||
|
||
$result = $manager->get_legend($id); | ||
if($result){ | ||
$manager->delete_legend($id); | ||
} | ||
|
||
// redirect | ||
header("HTTP/1.1 301 Moved Permanently"); | ||
header("Location: ".$site_url.'/admin/list_legend.php'); | ||
exit(); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
// TODO sanitize, validation | ||
|
||
include '../header.php'; | ||
|
||
// edit form & register | ||
// if no id, create new entry | ||
|
||
function get_form($id){ | ||
global $manager; | ||
|
||
$body = ''; | ||
|
||
if($id){ | ||
// get info from DB | ||
$result = $manager->get_legend($id); | ||
if($result){ | ||
$body = sanitize_html($result['body']); | ||
} | ||
} | ||
|
||
// display form | ||
|
||
return <<< EOD | ||
<form method="POST"> | ||
<input type="hidden" name="mode" value="1" /> | ||
<input type="hidden" name="id" value="$id" /> | ||
<span class="form_title">body:</span> | ||
<textarea name="body" cols="40" rows="10">$body</textarea><br /> | ||
<input type="submit" value="submit" /> | ||
</form> | ||
EOD; | ||
|
||
} | ||
|
||
function register(){ | ||
global $_POST, $manager; | ||
|
||
$manager->set_legend($_POST); | ||
} | ||
|
||
$contents = ''; | ||
if ( array_key_exists('mode', $_POST) ) { | ||
// TODO validation | ||
|
||
register(); | ||
$contents .= '<span class="message">updated information</span>'; | ||
} | ||
|
||
$contents .= get_form(get_key($_GET, 'id')); | ||
$data = array(); | ||
$data['contents'] = $contents; | ||
$page->set_relative_dir_to_top('..'); | ||
$page->set('raw', $data); | ||
|
||
include '../footer.php'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
<body> | ||
|
||
<h2>タグ編集</h2> | ||
<h2>タグ編集 - {$name}</h2> | ||
|
||
|
||
<div class="message"><strong>{$message}</strong></div> | ||
|
Oops, something went wrong.