示例#1
0
<?php

if (!isset($website)) {
    header('HTTP/1.1 404 Not Found');
    die;
}
?>
<div align="center">
<?php 
if (isset($_GET["update"])) {
    CreateItemList("../inc/cache/");
}
if (isset($_GET["del"])) {
    $res = 1;
    $sth = $db->prepare("DELETE FROM " . OSDB_ITEMS . " WHERE itemid = '" . safeEscape($_GET["del"]) . "' LIMIT 1 ");
    $result = $sth->execute();
    if ($res) {
        ?>
   <h2>Item successfully deleted</h2>
   <?php 
        OS_AddLog($_SESSION["username"], "[os_items] DELETED ITEM ( " . safeEscape($_GET["del"]) . " )");
    }
}
$name = "";
$shortname = "";
$item_info = "";
$price = "";
$type = "";
$icon = "AbyssalBlade.gif";
$itemID = "";
if (isset($_GET["edit"]) or isset($_GET["add"])) {
示例#2
0
function Xml2Array($url)
{
    //gets a feed url and returns an array with xml items
    $xml = GetFeed($url);
    $array = CreateItemList($xml);
    return $array;
}