Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
higoka committed Jun 11, 2017
1 parent 119e226 commit 2332ab3
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 54 deletions.
60 changes: 6 additions & 54 deletions create.php
Original file line number Diff line number Diff line change
@@ -1,59 +1,11 @@
<?php

$catalogItems = sprintf("INSERT INTO catalog_items VALUES (%d, %d, %d, '%s', %d, %d, 0, %d, 0, 0, 0, 0, 0, 1, -1);",
$_POST['id'],
$_POST['pageId'],
$_POST['id'],
$_POST['swf'],
$_POST['credits'],
$_POST['points'],
$_POST['amount']
);
namespace Creator;

$itemsBase = sprintf("INSERT INTO items_base VALUES (%d, %d, '%s', '%s', 's', %d, %d, 0, 0, %d, %d, 0, 1, 1, 1, 1, 1, 'default', 2, 0, 0, 0, 0);",
$_POST['id'],
$_POST['id'],
$_POST['name'],
$_POST['swf'],
$_POST['width'],
$_POST['length'],
isset($_POST['isWalkable']) ? 1 : 0,
isset($_POST['isSeatable']) ? 1 : 0
);
require 'vendor/autoload.php';

$furnidata = sprintf('
<furnitype id="%d" classname="%s">
<revision>%d</revision>
<defaultdir>0</defaultdir>
<xdim>%d</xdim>
<ydim>%d</ydim>
<partcolors/>
<name>%s</name>
<description>%s</description>
<adurl/>
<offerid>-1</offerid>
<buyout>0</buyout>
<rentofferid>-1</rentofferid>
<rentbuyout>0</rentbuyout>
<bc>1</bc>
<excludeddynamic>0</excludeddynamic>
<customparams/>
<specialtype>1</specialtype>
<canstandon>0</canstandon>
<cansiton>0</cansiton>
<canlayon>0</canlayon>
<furniline/>
</furnitype>
',
$_POST['id'],
$_POST['swf'],
$_POST['revision'],
$_POST['height'],
$_POST['length'],
$_POST['name'],
$_POST['description']
);
$creator = new Creator();

echo json_encode(
array_map('trim', [$catalogItems, $itemsBase, $furnidata])
);
$creator->pushFormatter(new Formatter\ArcturusFormatter());

$creator->run('arcturus');
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2332ab3

Please sign in to comment.