commit 3b4e5d1b25504c82abbc39bad794a97bbd88aa0a Author: Date: Sun Mar 25 05:35:14 2018 -0500 Initial commit diff --git a/backgrounds/mzd.jpg b/backgrounds/mzd.jpg new file mode 100644 index 0000000..dd7490b Binary files /dev/null and b/backgrounds/mzd.jpg differ diff --git a/backgrounds/pendual.png b/backgrounds/pendual.png new file mode 100644 index 0000000..753343b Binary files /dev/null and b/backgrounds/pendual.png differ diff --git a/backgrounds/plan8.jpg b/backgrounds/plan8.jpg new file mode 100644 index 0000000..d296a83 Binary files /dev/null and b/backgrounds/plan8.jpg differ diff --git a/backgrounds/programmedsun.png b/backgrounds/programmedsun.png new file mode 100644 index 0000000..7e19600 Binary files /dev/null and b/backgrounds/programmedsun.png differ diff --git a/backgrounds/railroad.jpg b/backgrounds/railroad.jpg new file mode 100644 index 0000000..de54567 Binary files /dev/null and b/backgrounds/railroad.jpg differ diff --git a/backgrounds/sakura.png b/backgrounds/sakura.png new file mode 100644 index 0000000..d293b08 Binary files /dev/null and b/backgrounds/sakura.png differ diff --git a/backgrounds/spada.png b/backgrounds/spada.png new file mode 100644 index 0000000..ffe5147 Binary files /dev/null and b/backgrounds/spada.png differ diff --git a/backgrounds/stargazers.png b/backgrounds/stargazers.png new file mode 100644 index 0000000..32057b8 Binary files /dev/null and b/backgrounds/stargazers.png differ diff --git a/backgrounds/toondx.png b/backgrounds/toondx.png new file mode 100644 index 0000000..200ee67 Binary files /dev/null and b/backgrounds/toondx.png differ diff --git a/howto.txt b/howto.txt new file mode 100644 index 0000000..7e59b07 --- /dev/null +++ b/howto.txt @@ -0,0 +1,50 @@ +Welcome to Monopole. Project ver 2.0 +(12-31-2015) + +== INSTALLATION GUIDE == + +1] Before anything, you need a web server to run on your computer. +I'll later search for very light web servers you can use, but for now, we'll use XAMPP. + +2] Download XAMPP at this adress https://www.apachefriends.org/download.html +If you can, select a PHP 5.x.x version, 7.x.x should be fine, but let's not be risky. + +3] Follow the XAMPP installation instructions +If it asks you to select packages, you only need Apache, so fuck MySQL, fuck FileZilla, fuck Mercury, fuck Tomcat. + +4] Install it wherever you want, but it musts be in a writable directoy, so you should avoid system folders. + +5] Move all the content from monopole-project.zip to the "wherever/you/installed/XAMPP/htdocs/" + +6] If it's working, you should be able to access the page by trying to access "localhost" from your browser. +(XAMPP must be running, the XAMPP panel window can be closed, no need to keep it in your tasks bar) + +=== USAGE GUIDE === + +1] Copy and paste all of you Bemanitools card text files into the "import/" folder. + +2] Load the page from any device, your cards should appear. +The script made some files: +- cards.json +- settings.json +- webmei-player01.txt +- webmei-player02.txt + +3] Before clicking on any card, be aware of which action you selected (PLAYER 1, PLAYER 2, EDIT, DELETE) + +Tip : P1 card appears in red and P2 card appears in blue. + +=== REMOTE GUIDE === + +1] You must be connected to a local access network, your Internet router should be fine for that. + +2] You need your IPv4 LAN adress to access the page from a mobile phone or anything. +Open the DOS command prompt console. (fastest way should be Windows+R > type "cmd" > enter) +Type "ipconfig" in the console. +Your IPv4 LAN adress is given under "Connection-specific DNS Suffix . :" > "IPv4 adress". + +This may differ according to your Operating System. + +3] Open your remote device and type that IPv4 adress in your browser adress bar. + +Tip : Port 80 may be blocked by Windows Firewall, check that if you are experience issues. \ No newline at end of file diff --git a/img/background.gif b/img/background.gif new file mode 100644 index 0000000..b82cfde Binary files /dev/null and b/img/background.gif differ diff --git a/img/konmai.png b/img/konmai.png new file mode 100644 index 0000000..897f7f4 Binary files /dev/null and b/img/konmai.png differ diff --git a/img/titanium_gears.jpg b/img/titanium_gears.jpg new file mode 100644 index 0000000..46143ad Binary files /dev/null and b/img/titanium_gears.jpg differ diff --git a/import/YOUR-CARDS-HERE.txt b/import/YOUR-CARDS-HERE.txt new file mode 100644 index 0000000..e69de29 diff --git a/index.php b/index.php new file mode 100644 index 0000000..d9d98fa --- /dev/null +++ b/index.php @@ -0,0 +1,453 @@ + array ('PLAYER_1','PLAYER_2'), + 'card' => array ( + 'background' => 'backgrounds/programmedsun.png', + 'subtitle' => '', + 'icon' => '', + 'width' => '400', + 'height' => '260' + ), + 'sort-key' => 'name', + 'sort-order' => 'asc', + 'animations' => 'on', + 'regex' => 'cards/monopole-$0.txt' + ); + file_put_contents('settings.json',json_encode($settings)); +} +// we fetch settings.json content and put it into an array +$settings = json_decode(file_get_contents('settings.json'),true); + +for ($i=0;$i $_POST['cardname'], + 'id' => $_POST['cardid'], + 'subtitle' => $settings['card']['subtitle'], + 'background' => $settings['card']['background'], + 'icon' => $settings['card']['icon'], + 'regdate' => date('U') + ) + ); +} +if (isset($_POST['rcard'])) { $settings['rcard'] = explode(',',str_replace(' ','_',$_POST['rcard']));} +if (isset($_POST['sort-key'])) { $settings['sort-key'] = $_POST['sort-key'];} +if (isset($_POST['sort-order'])) { $settings['sort-order'] = $_POST['sort-order'];} +if (isset($_POST['animations'])) { $settings['animations'] = $_POST['animations'];} +if (isset($_POST['background'])) { $settings['card']['background'] = $_POST['background'];} +if (isset($_POST['csubtitle'])) { $settings['card']['subtitle'] = $_POST['csubtitle'];} +if (isset($_POST['width'])) { $settings['card']['width'] = $_POST['width'];} +if (isset($_POST['height'])) { $settings['card']['height'] = $_POST['height'];} +foreach (glob('import/*.txt') as $file) { +// if there are files into import/ folder, we check them, the following code will store their data into cards.json +// assuming the file content = the card ID and the file name = account name +// you can change those informations later. + $content = file_get_contents($file); + $filename = basename($file,'.txt'); + if (!preg_match('#"id":"'.$content.'"#',$json) && $content != '') { + array_push( + $cards, + array( + 'name' => $filename, + 'id' => $content, + 'subtitle' => $settings['card']['subtitle'], + 'background' => $settings['card']['background'], + 'icon' => $settings['card']['icon'], + 'regdate' => date('U') + ) + ); + } +} +function sortBy($field, &$array, $direction = 'asc') +{ + usort($array, create_function('$a, $b', ' + $a = $a["' . $field . '"]; + $b = $b["' . $field . '"]; + + if ($a == $b) + { + return 0; + } + + return ($a ' . ($direction == 'desc' ? '>' : '<') .' $b) ? -1 : 1; + ')); + + return $array; +} +file_put_contents('cards.json',json_encode(sortBy($settings['sort-key'],$cards,$settings['sort-order']))); +// after reading import/ folder, we write the new data into cards.json +file_put_contents('settings.json',json_encode($settings)); +// we update settings too + +?> + + + + + + "Monopole." Project + + + +
+

Monopole. ∞ Project

+

Virtual eAMUSEMENT PASS changer made for #bemaniso tracker users. Made with ♥ by @skielred.
You are using 05/08/2016 version. Love.

+
+ +
+
+
+ Name :
+
+ ID :
+
+ Background (you can use an external file like http://i.imgur.com/something.jpg) :
+
+ Subtitle :
+
+
+ + +
+ +
+
+

Sample backgrounds (click to select) :

+
    +'; + } +?> +
+ +

Leave empty for default background. Default background can be modified into settings.

+
+
+ +
+

Are you sure you ?

+

You are going to delete . This card will disapear forever ! (A very long time)

+ Warning : If you haven't deleted this card from the "import/" folder yet, if you delete it here the card will be added to the "cards.json" file again on the next page load. +
+ +
+
+ +
+

Settings Because customizing your pass isn't enough, you have to customize your pass customizer too.

+
+
+

Add a Virtual Card because using text files is so 2015

+
+

Card ID (generate random)

+ + +
+
+

DJ NAME

+ +
+
+ +
+
+

Default setings

+
+

Sorting key :

+ +
+
+

Sorting order :

+ +
+
+

Animations :

+ +
+
+

Cards

+
+

Default subtitle

+ +
+
+

Default background

+ +
+
+

Card files (avoid special characters such as ' or ", seperate each different file with a comma ,)

+ +
+
+ +
+ + + + + + + + + + +