function uploadCondition($player, $type, $uid, $desc)
{
global $user;
//parse command in $desc
if($desc[0] == "!")
{
$findend = strpos($desc, " ", 1);
$desccommand = substr($desc, 0, $findend);
echo("Findend: $findend\n");
echo("Desccmd: $desccommand\n");
}
//see if a user has a special vault
$result = mysql_query("SELECT * FROM `vault_specialvaults` WHERE `uid` = '$uid' OR `ip` = '$ip' OR `command` = '$desccommand' AND `type` = '$type'");
while($row = mysql_fetch_array($result))
{
if($row[upload] == 1)
{
$restrictions = explode(",", $row['restrict']);
$restrictto['ip'] = explode(",", $row['ip']);
$restrictto['unique_id'] = explode(",", $row['uid']);
foreach($restrictions as $restriction)
{
if(in_array($user[$restriction], $restrictto[$restriction]))
{
echo("Passed on $restriction!
");
}
else
{
echo("Failed on $restriction!
");
}
}
}
}
}