Page 1 of 1
WIN artys!
Posted: Fri Mar 16, 2007 5:08 pm
by Red Squirrel
If you can say what this line of code does, you can WIN a FREE pair of CLAWS OF THE HOLY SQUIRREL!
I have 3 pairs sitting at my house. Got my 3rd last night off a mob while I soloed rikktor.
Code: Select all
foreach($_POST as $arg=>$val)if(preg_match("/^setting_/",$arg)) $vararray[str_replace("setting_","",$arg)]=SBsqlFixPost($val);
Archived topic from AOV, old topic ID:343, old post ID:1760
WIN artys!
Posted: Fri Mar 16, 2007 5:25 pm
by dead-eye
Red Squirrel wrote:If you can say what this line of code does, you can WIN a FREE pair of CLAWS OF THE HOLY SQUIRREL!
I have 3 pairs sitting at my house. Got my 3rd last night off a mob while I soloed rikktor.
Code: Select all
foreach($_POST as $arg=>$val)if(preg_match("/^setting_/",$arg)) $vararray[str_replace("setting_","",$arg)]=SBsqlFixPost($val);
It searches and fixes settings on posts.
Do i win?
lol.
OR... It makes valorite ore pregnant and matches who the daddy is
.
Archived topic from AOV, old topic ID:343, old post ID:1764
WIN artys!
Posted: Fri Mar 16, 2007 5:38 pm
by Red Squirrel
Close, but I should give some kind of indication of where it's used. It's for a forum script I'm coding. $_POST is an array with any information send via a form when you hit submit.
Archived topic from AOV, old topic ID:343, old post ID:1769
WIN artys!
Posted: Fri Mar 16, 2007 5:45 pm
by dead-eye
Red Squirrel wrote:Close, but I should give some kind of indication of where it's used. It's for a forum script I'm coding. $_POST is an array with any information send via a form when you hit submit.
i knew it was for forums.
Alright so heres what it does.
It part of the coding in our EVP application form that links Demise/Valor...
Maybe?
i have no clue how to code, or even what half that stuff means.
Archived topic from AOV, old topic ID:343, old post ID:1772
WIN artys!
Posted: Fri Mar 16, 2007 6:07 pm
by Gaiava Arkkaza
SquirrelBBL?
Archived topic from AOV, old topic ID:343, old post ID:1773
WIN artys!
Posted: Fri Mar 16, 2007 6:16 pm
by Nosferatu
for each post that has (something innapropriate?) it prevents the post and sends it to the fix post menu?
Archived topic from AOV, old topic ID:343, old post ID:1774
WIN artys!
Posted: Fri Mar 16, 2007 6:33 pm
by Death
Something along the lines of for each post with a certain string condition, the string gets changed. The string itself seems to pertain to "settings" so I'm assuming that for every post where the settings are changed, the rest of the posts settings will be changed.
Archived topic from AOV, old topic ID:343, old post ID:1776
WIN artys!
Posted: Fri Mar 16, 2007 6:43 pm
by Red Squirrel
Your on the right track. But to not put too much essence on that sqlfixpost function, all that does is clean up the data of any inappropriate data that could be used to inject commands in the database. Other then that, it does not do anything special.
Also, it's part of the admin interface.
Archived topic from AOV, old topic ID:343, old post ID:1777
WIN artys!
Posted: Fri Mar 16, 2007 6:47 pm
by Death
Red Squirrel wrote:Your on the right track. But to not put too much essence on that sqlfixpost function, all that does is clean up the data of any inappropriate data that could be used to inject commands in the database. Other then that, it does not do anything special.
Also, it's part of the admin interface.
Actually, it was the "preg_match" part that got me thinking wtf. Not sure what the preg part denotes.
Archived topic from AOV, old topic ID:343, old post ID:1779
WIN artys!
Posted: Fri Mar 16, 2007 6:53 pm
by Red Squirrel
perg_match checks for a regular expression match in a string. looking up foreach might help as well.
Archived topic from AOV, old topic ID:343, old post ID:1780
WIN artys!
Posted: Fri Mar 16, 2007 7:01 pm
by Death
Red Squirrel wrote:perg_match checks for a regular expression match in a string. looking up foreach might help as well.
if it's anything like VB/C# for each is a conditional loop for elements of an array. It loops until the maxlength of the array.
Archived topic from AOV, old topic ID:343, old post ID:1781
WIN artys!
Posted: Fri Mar 16, 2007 9:10 pm
by E.Machine
It loops through the Submitted information, and assigns it to $arg=>$val.
if that variable is /^setting_/ replace it with setting_
in the foreach loop the current element's key will be assigned to $arg
and the value of the post will be assigned to $var
replaces any occurance of setting_ with nothing in the variable arg
takes everything in $_POST[] that starts with setting_ and stores in another array
that about right?
Archived topic from AOV, old topic ID:343, old post ID:1783
WIN artys!
Posted: Fri Mar 16, 2007 9:20 pm
by Red Squirrel
You're pretty close I'll give it to you.
What it does is it loops through the $_POST array, and if the index name starts with setting_ then it assigns the value to another array, but instead of the index being called setting_nnn it's just nnn.
So if a form field's name is setting_test
then $_POST[setting_test] would be put in $vararray[test]
in php instead of arrays using numbers they use names, but you can also refer to their numbers.
If you expand it, its actually simple. Just looks like haxor code when its on one line
Code: Select all
foreach($_POST as $arg=>$val)
{
if(preg_match("/^setting_/",$arg))
{
$vararray[str_replace("setting_","",$arg)]=SBsqlFixPost($val);
}
}
Archived topic from AOV, old topic ID:343, old post ID:1784
WIN artys!
Posted: Fri Mar 16, 2007 9:26 pm
by Lymus
2,000 pigs for whoever knows what this code does
Code: Select all
color 0a
cmd
ping uovalor.com
tracert uovalor.com
Archived topic from AOV, old topic ID:343, old post ID:1785
WIN artys!
Posted: Tue Mar 03, 2009 10:43 pm
by Nosferatu
Nosferatu wrote:for each post that has (something innapropriate?) it prevents the post and sends it to the fix post menu?
lol my first post on aov
Archived topic from AOV, old topic ID:343, old post ID:28511