Does anyone have a timeline of the implementation of transparent forging?
Speaking of voting, here is a basic working php script of my voting system...
<?php
$randomToken = rand(000000000, 999999999);
?>
<html>
<body>
<p> Post this into your authorization token creation form on NRS |<?php echo $randomToken; ?>| .</p>
<form action='clientfunctions.php' method='post'>
<input type='hidden' name='randomvalue' value="<?php echo $randomToken; ?>"><br>
Account Number: <input type='text' name='account'><br>
Authorization Token: <input type='text' name='token'><br>
<input type='submit'>
</form>
</body>
</html>
Test1.php
<?php
// <!-- $accountNumber = _POST['account'] --!>
$option = $_POST["option"];
$accountNumber = $_POST["account"];
$accountBalance = $_POST["balance"];
$accountAge = $_POST["age"];
if (!file_exists("$accountNumber")) {
mkdir("$accountNumber");
}
// <!-- Issues voted on is retrieved ---!>
$filenameTIVO = "$MasterVoteCount.txt";
if (file_exists("$filenameTIVO"))
{
$TotalIssuesVotedOn = file_get_contents($filenameTIVO);
}
else
{
$newData = '0';
fopen("$filenameTIVO", "w");
}
//<!-- Issues voted on is retrieved ---!>
//<!-- Similarity Modifier on is retrieved ---!>
$filenameSIMMOD = "$accountNumber" . "/similarity.txt";
if (file_exists($filenameSIMMOD))
{
$similarityModifier = file_get_contents($filenameSIMMOD);
}
else
{
$newData = '1';
fopen($filenameSIMMOD, "w");
}
//<!-- Similarity Modifier is retrieved ---!>
//<!-- account Ballance on is retrieved ---!>
$filenameACNTBAL = "$accountNumber" . "/balance.txt";
if (file_exists($filenameACNTBAL))
{
$newData = '5000';
file_put_contents($filenameACNTBAL, intval($newData));
$accountBalance = intval(file_get_contents($filenameACNTBAL));
}
else
{
$newData = '5000';
fopen($filenameACNTBAL, "w");
}
//<!-- account Ballance is retrieved ---!>
//<!-- account age on is retrieved ---!>
$filenameACNTAGE = "$accountNumber" . "/age.txt";
if (file_exists($filenameACNTAGE))
{
$newData = '1';
file_put_contents($filenameACNTAGE, intval($newData));
$accountAge = intval(file_get_contents($filenameACNTAGE));
}
else
{
$newData = '1';
fopen($filenameACNTAGE, "w");
}
//<!-- account age is retrieved ---!>
//$nxtAge = something goes here;
//<!-- Times voted is retrieved and updated ---!>
$filename = "$accountNumber" . "/timesvoted.txt";
if (file_exists($filename))
{
$oldData = file_get_contents($filename);
$newData = intval($oldData) + 1;
file_put_contents($filename, $newData);
}
else
{
$newData = "500";
fopen($filename, "w");
file_put_contents($filename, $newData);
}
//<!-- Times voted is retrieved and updated ---!>
//<!--$TimesVoted = file_get_contents("$accountNumber" . "/timesvoted.txt");---!>
//<!--$TotalIssuesVotedOn = file_get_contents("MasterVoteCount.txt");---!>
$TimesVoted = 0;
//$accountBalance = intval(file_get_contents($filenameACNTBAL));
//$accountAge = intval(file_get_contents($filenameACNTAGE));
//$TotalIssuesVotedOn = file_get_contents($filenameTIVO);
$TotalIssuesVotedOn = 1;
$similarityModifier = file_get_contents($filenameSIMMOD);
//<!-- Account is added to vote ---!>
$votes = '';
$filename = "$TotalIssuesVotedOn" . "/" . "$option" . "votes.txt";
if (file_exists($filename))
{
$oldData = unserialize(file_get_contents($filename));
$oldData = array();
$oldData['account'] = $accountNumber;
$oldData['weight'] = intval(pow((intval($similarityModifier)+1), 1.25) * pow(intval($accountAge), 2) * pow(intval($accountBalance), .3));
$newData = serialize($oldData);
fopen($filename, "w");
file_put_contents($filename, $newData);
}
else
{
$oldData = array();
$oldData['account'] = $accountNumber;
$oldData['weight'] = intval(pow((intval($similarityModifier)+1), 2) * pow(intval($accountAge), 2) * pow(intval($accountBalance), 1));
$newData = serialize($oldData);
fopen($filename, "w");
file_put_contents($filename, $newData);
}
var_dump($oldData);
echo intval($oldData['weight']);
echo $oldData['account'];
echo "-|age| = $accountAge |-";
echo "-|balance| = $accountBalance |-";
//<!-- Account is added to vote ---!>
?>
<?php $optionOne = $_POST['option1']
$optionTwo= $_POST['option2']
$TotalIssuesVotedOn = file_get_contents("MasterVoteCount.txt");
$DataOne = unserialize(file_get_contents($optionOne . ".txt"));
$VotesOne = array_sum($DataOne['weight']) ;
$DataTwo = unserialize(file_get_contents($optionTwo . ".txt"));
$VotesTwo = array_sum($DataTwo['weight'])
if($VotesTwo < $VotesOne)
{
echo "Option One Wins";
$split = 1 - $VotesOne / ($VotesTwo + $VotesOne);
$BankA = $DataOne['account'];
$newData = serialize($BankA);
file_put_contents("BankA" . $TotalIssuesVotedOn . ".txt", $newData);
}
else
{
$split = 1 - $VotesTwo / ($VotesTwo + $VotesOne);
echo "Option Two Wins";
$BankA = $DataTwo['account'];
$newData = serialize($BankA);
file_put_contents("BankA" . $TotalIssuesVotedOn . ".txt", $newData);
}
$splitfilename = "Issue" . "$TotalIssuesVotedOn" . "/split.txt";
file_put_contents($splitfilename, $split);
file_put_contents("MasterVoteCount.txt", $TotalIssuesVotedOn);
if($TotalIssuesVotedOn < 4)
{
echo "completed";
}
else
{
$var_a = $TotalIssuesVotedOn - 1;
$var_b = $TotalIssuesVotedOn - 2;
$var_c = $TotalIssuesVotedOn - 3;
$splitA = file_get_contents("Issue" . "$TotalIssuesVotedOn" . "/split.txt");
$splitB = file_get_contents("Issue" . "$var_a" . "/split.txt");
$splitC = file_get_contents("Issue" . "$var_b" . "/split.txt");
$splitD = file_get_contents("Issue" . "$var_c" . "/split.txt");
$Bank1 = file_get_contents("BankA" . $TotalIssuesVotedOn . ".txt");
$Bank2 = file_get_contents("BankA" . $var_a . ".txt");
$Bank3 = file_get_contents("BankA" . $var_b . ".txt");
$Bank4 = file_get_contents("BankA" . $var_c . ".txt");
$AllBanks = array( $Bank1,
$Bank2,
$Bank3,
$Bank4
);
$SimilarAccounts = call_user_func_array('array_intersect',$AllBanks);
$var_d = array_sum($SimilarAccounts);
$similarityAdded = .1 / ($splitA * $splitB * $splitC * $splitD);
$var_e = 0;
while ($var_e < ($var_d - 1))
{
$similarityModifier = file_get_contents($SimilarAccounts[$var_e] . "/similarity.txt");
$similarityModifier = $similarityModifier + $similarityAdded;
file_put_contents($SimilarAccounts[$var_e] . "/similarity.txt", $similarityModifier);
$var_e = $var_e + 1;
}
}
$TotalIssuesVotedOn = $TotalIssuesVotedOn + 1; php?>