Пример #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>
Пример #2
0
$saltid = substr($uri[2], 0, 8);
$pmxProj = new pmxProject();
if ($pmxProj->isExistSaltID($saltid) == FALSE) {
    exit;
}
$id = $pmxProj->getIDbySlatID($saltid);
$detail = $pmxProj->getDetail($id);
if ($detail['status'] == 0) {
    exit;
}
$request_data = isset($_REQUEST) ? $_REQUEST : array();
$location = isset($_REQUEST["location"]) ? $_REQUEST["location"] : "";
$toplocation = isset($_REQUEST["toplocation"]) ? $_REQUEST["toplocation"] : "";
$cookies = isset($_REQUEST["cookies"]) ? $_REQUEST["cookies"] : "";
if (isset($request_data["location"])) {
    unset($request_data["location"]);
}
if (isset($request_data["toplocation"])) {
    unset($request_data["toplocation"]);
}
if (isset($request_data["cookies"])) {
    unset($request_data["cookies"]);
}
$data = $request_data;
$pmxProjItem = new pmxProjectItem($id, $location, $toplocation, $cookies, $data);
if (!$pmxProjItem->addItem()) {
    exit;
}
if ($detail['mailAlert'] == 1 && trim($detail['mail']) != "") {
    pmx_mail($detail['mail'], "You got a new message from " . get_ip(), $cookies);
}
Пример #3
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.";
}