corrade-http-templates

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 79  →  ?path2? @ 78
File deleted
/massInvites/composer.lock
File deleted
/massInvites/composer.json
/massInvites/functions.php
@@ -0,0 +1,84 @@
<?php
 
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function wasKeyValueGet($key, $data) {
return array_reduce(
explode(
"&",
$data
),
function($o, $p) {
$x = explode("=", $p);
return array_shift($x) != $o ? $o : array_shift($x);
},
$key
);
}
 
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function wasArrayToCSV($a) {
return implode(
',',
array_map(
function($o) {
$o = str_replace('"', '""', $o);
switch(
(strpos($o, ' ') !== FALSE) ||
(strpos($o, '"') !== FALSE) ||
(strpos($o, ',') !== FALSE) ||
(strpos($o, '\r') !== FALSE) ||
(strpos($o, '\n') !== FALSE)
)
{
case TRUE:
return '"' . $o . '"';
default:
return $o;
}
},
$a
)
);
}
 
###########################################################################
## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ##
###########################################################################
function wasCSVToArray($csv) {
$l = array();
$s = array();
$m = "";
for ($i = 0; $i < strlen($csv); ++$i) {
switch ($csv[$i]) {
case ',':
if (sizeof($s) == 0 || !current($s) == '"') {
array_push($l, $m);
$m = "";
break;
}
$m .= $csv[$i];
continue;
case '"':
if ($i + 1 < strlen($csv) && $csv[$i] == $csv[$i + 1]) {
$m .= $csv[$i];
++$i;
break;
}
if (sizeof($s) == 0|| !current($s) == $csv[$i]) {
array_push($s, $csv[$i]);
continue;
}
array_pop($s);
break;
default:
$m .= $csv[$i];
break;
}
}
array_push($l, $m);
return $l;
}
/massInvites/README.txt
@@ -8,22 +8,16 @@
* A modern browser: Chome, Opera, Firefox, Safari...
* A webserver.
* PHP version 5 and beyond.
* the PHP curl extension.
* PHP composer.
* the curl extension.
 
-:[ Setup ]:-
 
1.) Run the following command inside the directory:
 
composer require was/utilities:dev-trunk
 
in order to install all the requirements.
2.) Rename "config.php.dist" to "config.php" and edit "config.php"
1.) Rename "config.php.dist" to "config.php" and edit "config.php"
to reflect your settings in Corrade.ini
3.) Enable the Corrade permissions for your configured group:
2.) Enable the Corrade permissions for your configured group:
* group
4.) Place the all the files in a directory on your webserver.
5.) Navigate to massInvites.html in your browser and enjoy.
3.) Place the all the files in a directory on your webserver.
4.) Navigate to massInvites.html in your browser and enjoy.
 
-:[ References ]:-
 
/massInvites/massInvites.html
@@ -10,7 +10,7 @@
<meta name="description" content="Mass Invites using Corrade">
<meta name="author" content="Wizardry and Steamworks">
 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#send").click(function(e) {
/massInvites/sendMassInvites.php
@@ -11,8 +11,7 @@
###########################################################################
 
require_once('config.php');
require_once('vendor/was/utilities/src/formats/kvp/kvp.php');
require_once('vendor/was/utilities/src/formats/csv/csv.php');
require_once('functions.php');
 
###########################################################################
## INTERNALS ##