Esempio n. 1
0
<?php

if (!defined("PMX_ENTRANCE")) {
    header("HTTP/1.0 404 Not Found");
    exit;
}
pmx_require_header("Item Detail");
pmx_require_nav(".nav-left-proj");
$pmxItem = new pmxProjectItem();
$id = isset($_GET['id']) ? $_GET["id"] : "";
if (!$pmxItem->isExistID($id)) {
    die("Error: The item id is invalid.");
}
$detail = $pmxItem->getDetail($id);
$data = json_decode($detail['data'], true);
unset($detail["data"]);
?>

<div class="main">
	<div class="main-item-single main-item-projs-item-detail pull-left">
		<div class="projs-item-detail-body">
			<table class="table table-condensed table-bordered">
<?php 
foreach ($detail as $index => $detail_item) {
    if ($detail_item != "") {
        ?>
				<tr>
					<td><b><?php 
        echo esc_html($index);
        ?>
</b></td>
Esempio n. 2
0
<?php

/**
 * 删除某项目内的记录
 */
if (!defined("PMX_ENTRANCE")) {
    header("HTTP/1.0 404 Not Found");
    exit;
}
header('Content-Type: text/html; charset=utf-8');
/**
 * 校验TOKEN
 */
if (!pmx_validate_token()) {
    die("Error: Token is incorrect.");
}
$id = isset($_GET["id"]) ? intval($_GET["id"]) : NULL;
$pmxProjectItem = new pmxProjectItem();
if (!$pmxProjectItem->isExistID($id)) {
    die("Error: The item id is non-existent.");
}
if ($pmxProjectItem->delItem($id)) {
    echo "Success: You have deleted item {$id} successful.";
}