Jump to content

MrBillybob

Members
  • Posts

    58
  • Joined

  • Last visited

    Never

Everything posted by MrBillybob

  1. is it possible to do a join from two different servers? If so how?
  2. is it possible to do a join from two different servers? If so how?
  3. i user strip_tags <?php $status = "Registration Complete ".strip_tags($_POST['u'])."! Please wait for a director to accept your account."; ?>
  4. i meant i only did it in the query not the on the var i output
  5. ...i only did it on the mysql insert not the output
  6. are you having something equal to the function...$var1 = abc($test); ?
  7. thx they should all be fixed now
  8. error: Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 7 in /home/content/t/u/b/tubguys/html/eve/index.php on line 607 Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 9 in /home/content/t/u/b/tubguys/html/eve/index.php on line 620 code: <?php $sql = 'SELECT * FROM `eve_corp_list`'; $res = mysql_query($sql, $server1); while($row = mysql_fetch_array($res)){ $i++; $totin = 0; $totout = 0; if (!isset($day)) { $day = date("d"); } $name = $row['charactername']; $members[$name]['name'] = $row['charactername']; $sql2 = 'SELECT `amount`, `ownerName2` FROM `eve_wallet` WHERE `ownerName2` = \'' . mysql_real_escape_string($row['charactername']) . '\' AND `amount` > 0 AND `date` >= \'' . $year . '-' . $month . '-' . $day . ' 00:00:00\' AND `date` <= \'' . $year . '-' . $month . '-' . $day . ' 24:00:00\''; $res2 = mysql_query($sql2, $server1); $temptyname = mysql_result($res2, 0, 'ownerName2'); //line 607 if ($temptyname == "") { $sql2 = 'SELECT `amount` FROM `eve_wallet` WHERE `ownerName1` = \'' . mysql_real_escape_string($row['charactername']) . '\' AND `amount` > 0 AND `date` >= \'' . $year . '-' . $month . '-' . $day . ' 00:00:00\' AND `date` <= \'' . $year . '-' . $month . '-' . $day . ' 24:00:00\''; $res2 = mysql_query($sql2, $server1); } while($row2 = mysql_fetch_array($res2)){ $totin = $totin + $row2['amount']; } $members[$name]['posin'] = $totin; $sql2 = 'SELECT `amount`, `ownerName2` FROM `eve_wallet` WHERE `ownerName2` = \'' . mysql_real_escape_string($row['charactername']) . '\' AND `amount` < 0 AND `date` >= \'' . $year . '-' . $month . '-' . $day . ' 00:00:00\' AND `date` <= \'' . $year . '-' . $month . '-' . $day . ' 24:00:00\''; $res2 = mysql_query($sql2, $server1); $temptyname = mysql_result($res2, 0, 'ownerName2'); //line 620 if ($temptyname == "") { $sql2 = 'SELECT `amount` FROM `eve_wallet` WHERE `ownerName1` = \'' . mysql_real_escape_string($row['charactername']) . '\' AND `amount` < 0 AND `date` >= \'' . $year . '-' . $month . '-' . $day . ' 00:00:00\' AND `date` <= \'' . $year . '-' . $month . '-' . $day . ' 24:00:00\''; $res2 = mysql_query($sql2, $server1); } while($row2 = mysql_fetch_array($res2)){ $totout = $totout + $row2['amount']; } $members[$name]['posout'] = $totout; $count++; } $i = 0; $res = mysql_query($sql, $server1); while($row = mysql_fetch_array($res)){ if ($row['charactername'] != "") { $totin = 0; $totout = 0; ?> <tr> <td class="row<?php echo fmod($i, 2); ?>"> <?php echo "<a href=\"?l=wallet&division=all&month=".date("m")."&year=".date("Y")."&day=".$day."&memberid=".$row['id']."&view=refer_members\">" . $members[$row['charactername']]['name'] . "</a>"; ?> </td> <td class="row<?php echo fmod($i, 2); ?>"> <?php echo "<div class=\"green\">" . number_format($members[$row['charactername']]['posin'], 2, '.', ',') . "</div>"; ?> </td> <td class="row<?php echo fmod($i, 2); ?>"> <?php echo "<div class=\"red\">" . number_format($members[$row['charactername']]['posout'], 2, '.', ',') . "</div>"; ?> </td> <td class="row<?php echo fmod($i, 2); ?>"> Type Totals </td> </tr> <?php $i++; } } ?>
  9. its a get and i dont want to have to redirect how do i clear the get?
  10. when ever i have an order form if someone presses add cart then presses refresh it will add 2...how do i fix this?
  11. they all work i just had output off.... register corp password is 'abc123'
  12. I would like to know if anyone can get any variables or injections on this site...its mine of course. http://octub.com/eve/
  13. well beboo i want to out put totals for a so i only want to get its data once then get b's data but that will get a data then a data then b...a...c
  14. i want to select all of the data for each and every user separately using a query..is this possible? user t etc a 4 xy a 13 gg b 5 xx a 43 df c 2 xy and then i wanna get all of the data from user a, but i dont know that a == a i need to be able go throughthe database and collect all the data from a then find the next user name and get data for it...if this doesn make sense ask for more info
  15. you have to loop through $op not just echo it... so <?php while ($op = mysql_fetch_array($result)) { echo "<tr> <td> $op['op1']; </td> <td width=\"73\" align=\"center\" valign=\"middle\"> <input name=\"$op\" type=\"radio\" value=\"radiobutton\"> </td> </tr>"; echo "<tr> <td> $op['op2']; </td> <td width=\"73\" align=\"center\" valign=\"middle\"> <input name=\"$op\" type=\"radio\" value=\"radiobutton\"> </td> </tr>"; //and so on }
  16. i have a .sql file with 58,000 lines i have a php script that loads it and runs it but it only runs 21,000 of those lines i dont get the maximum loop time exceeded <?php mysql_connect("xxxxxxxxxxx", "xxxxx", "xxxxxx") or die("1"); mysql_select_db("xxxxxxx") or die("2"); $file = fopen("file.sql", "r") or die("3"); while ($line = fgets($file)){ $i++; $sql .= $line; $test = substr($line, -2, 1); echo "\"" . $test . "\""; //echo $line . "<br />"; if ($test == ";") { echo 1; @mysql_query($sql) or die(mysql_error()); $sql = ""; } } fclose($file); mysql_close(); ?>
  17. last if said !$west instead of !$lwest <?php $rnum = 10001; //remember that these are incremented, so start out 1 less... $lup = 20000; $ldown = 0; $lwest = 0; $least = 10001; for($rnum = 10001;$rnum<20001;$rnum++) { if($rnum >= 20001) { die("Completed, you may now exit to the room.php page"); } $lup++; $ldown++; $lwest++; $least++; if($rnum == "10101") { $lnorth = 10001; } elseif($rnum >= 10102) { $lnorth++; } elseif($rnum <= 19900) { $lsouth++; } else{ $lsouth = ""; } //since nobody seems to get this, it sets all of these rooms blank either on the left link or right link... and then on the page that displays this, I use an if statement to echo a link back if it's filled, and then just the words "move left" or "move right" if blanks... if($rnum == "10100" || $rnum == "10200" || $rnum == "10300" || $rnum == "10400" || $rnum == "10500" || $rnum == "10600" || $rnum == "10700" || $rnum == "10800" || $rnum == "10900" || $rnum == "101000" || $rnum == "11100" || $rnum == "11200" || $rnum == "11300" || $rnum == "11400" || $rnum == "11500" || $rnum == "11600" || $rnum == "11700" || $rnum == "11800" || $rnum == "11900" || $rnum == "12000" || $rnum == "12100" || $rnum == "12200" || $rnum == "12300" || $rnum == "12400" || $rnum == "12500" || $rnum == "12600" || $rnum == "12700" || $rnum == "12800" || $rnum == "12900" || $rnum == "13000" || $rnum == "13100" || $rnum == "13200" || $rnum == "13300" || $rnum == "13400" || $rnum == "13500" || $rnum == "13600" || $rnum == "13700" || $rnum == "13800" || $rnum == "13900" || $rnum == "14000" || $rnum == "14100" || $rnum == "14200" || $rnum == "14300" || $rnum == "14400" || $rnum == "14500" || $rnum == "14600" || $rnum == "14700" || $rnum == "14800" || $rnum == "14900" || $rnum == "15000" || $rnum == "15100" || $rnum == "15200" || $rnum == "15300" || $rnum == "15400" || $rnum == "15500" || $rnum == "15600" || $rnum == "15700" || $rnum == "15800" || $rnum == "15900" || $rnum == "16000" || $rnum == "16100" || $rnum == "16200" || $rnum == "16300" || $rnum == "16400" || $rnum == "16500" || $rnum == "16600" || $rnum == "16700" || $rnum == "16800" || $rnum == "16900" || $rnum == "17000" || $rnum == "17100" || $rnum == "17200" || $rnum == "17300" || $rnum == "17400" || $rnum == "17500" || $rnum == "17600" || $rnum == "17700" || $rnum == "17800" || $rnum == "17900" || $rnum == "18000" || $rnum == "18100" || $rnum == "18200" || $rnum == "18300" || $rnum == "18400" || $rnum == "18500" || $rnum == "18600" || $rnum == "18700" || $rnum == "18800" || $rnum == "18900" || $rnum == "19000" || $rnum == "19100" || $rnum == "19200" || $rnum == "19300" || $rnum == "19400" || $rnum == "19500" || $rnum == "19600" || $rnum == "19700" || $rnum == "19800" || $rnum == "19900" || $rnum == "20000") { $tempvar = $least; $least = ""; } if($rnum == "10001" || $rnum == "10101" || $rnum == "10201" || $rnum == "10301" || $rnum == "10401" || $rnum == "10501" || $rnum == "10601" || $rnum == "10701" || $rnum == "10801" || $rnum == "10901" || $rnum == "11001" || $rnum == "11101" || $rnum == "11201" || $rnum == "11301" || $rnum == "11401" || $rnum == "11501" || $rnum == "11601" || $rnum == "11701" || $rnum == "11801" || $rnum == "11901" || $rnum == "12001" || $rnum == "12101" || $rnum == "12201" || $rnum == "12301" || $rnum == "12401" || $rnum == "12501" || $rnum == "21601" || $rnum == "12701" || $rnum == "12801" || $rnum == "12901" || $rnum == "13001" || $rnum == "13101" || $rnum == "13201" || $rnum == "13301" || $rnum == "13401" || $rnum == "13501" || $rnum == "13601" || $rnum == "13701" || $rnum == "13801" || $rnum == "13901" || $rnum == "14001" || $rnum == "14101" || $rnum == "14201" || $rnum == "14301" || $rnum == "14401" || $rnum == "14501" || $rnum == "14601" || $rnum == "14701" || $rnum == "14801" || $rnum == "14901" || $rnum == "15001" || $rnum == "15101" || $rnum == "15201" || $rnum == "15301" || $rnum == "15401" || $rnum == "15501" || $rnum == "15601" || $rnum == "15701" || $rnum == "15801" || $rnum == "15901" || $rnum == "16001" || $rnum == "16101" || $rnum == "16201" || $rnum == "16301" || $rnum == "16401" || $rnum == "16501" || $rnum == "16601" || $rnum == "16701" || $rnum == "16801" || $rnum == "16901" || $rnum == "17001" || $rnum == "17101" || $rnum == "17201" || $rnum == "17301" || $rnum == "17401" || $rnum == "17501" || $rnum == "17601" || $rnum == "17701" || $rnum == "17801" || $rnum == "17901" || $rnum == "18001" || $rnum == "18101" || $rnum == "18201" || $rnum == "18301" || $rnum == "18401" || $rnum == "18501" || $rnum == "18601" || $rnum == "18701" || $rnum == "18801" || $rnum == "18901" || $rnum == "19001" || $rnum == "19101" || $rnum == "19201" || $rnum == "19301" || $rnum == "19401" || $rnum == "19501" || $rnum == "19601" || $rnum == "19701" || $rnum == "19801" || $rnum == "19901") { $tempvar2 = $lwest; $lwest = ""; } $permis = "0"; mysql_query("INSERT INTO `rooms` (rnum, lup, ldown, lwest, least, lnorth, lsouth, rcontents, rname, permis) VALUES ('$rnum','$lup','$ldown','$lwest','$least','$lnorth','$lsouth','$rcontents','$rname','permis');") or die(mysql_error()); if(!$least) { $least = $tempvar; } if(!$lwest) { $lwest = $tempvar2; } } ?>
  18. i get this error when i run this script.... Parse error: parse error, unexpected $ in *******/****/*/*/*/*****/*/transactions.php on line 123 and 123 is the last line the "?>". if you can find the problem please let me know <?php $args['accountKey'] = '1000'; $args['userid'] = $row['userID']; $args['charid'] = $row['charID']; $args['userkey'] = $row['apiKey']; $akey = $args['accountKey']; while($args['accountKey'] <= 1006){ $args['accountKey'] = $akey; $auth = "userid=" .$args['userid']; $auth .= "&apikey=" .$args['userkey']; $auth .= "&characterID=" .$args['charid']; $auth .= "&accountKey=" .$args['accountKey']; if ($errgetting) { $auth .= "&beforeRefID=" .$args['beforerefid']; } $head = "POST /corp/WalletTransactions.csv.aspx HTTP/1.0\r\n"; $head .= "Host: api.eve-online.com\r\n"; $head .= "Content-Type: application/x-www-form-urlencoded\r\n"; $head .= "Content-Length: " . strlen($auth) . "\r\n"; $head .= "Connection: close\r\n\r\n"; $fp = fsockopen ('api.eve-online.com', 80, $errno, $errstr, 30); if (!$fp) { echo 'fsock failed; damn muppets! '.$errstr; exit(); } fputs($fp, $head); fputs($fp, $auth); $header = 1; $errgetting = 0; $count = 0; while ($line = fgets ($fp)) { $hmm = strpos($line, "# error "); if ($line == "\r\n") { $header = 0; } elseif($hmm !== FALSE){ $errgetting = 1; } if ($errgetting) { $outerror[$akey] = $line; $Errnum = substr($line, 8, 3); if ($Errnum == "102") { $P1 = strpos($line, "[") + 1; $P2 = strpos($line, "]"); $P2 = $P2 - $P1; $errorrefid = substr($line, $P1, $P2); $args['beforerefid'] = $errorrefid; $akey = $akey - 1; } break; } else { if ($header) { $http_header .= $line; } else { $count = $count + 1; if ($count == 1) { } else { list($date, $transID, $quantity, $type, $price, $clientName, $characterName, $stationName, $transactionType) = explode(",", fgets ($fp)); $data_in[$count]['date'] = $date; $data_in[$count]['transID'] = $transID; $data_in[$count]['quantity'] = $quantity; $data_in[$count]['type'] = $type; $data_in[$count]['price'] = $price; $data_in[$count]['clientName'] = $clientName; $data_in[$count]['characterName'] = $characterName; $data_in[$count]['stationName'] = $stationName; $data_in[$count]['transactionType'] = $transactionType; } } } fclose ($fp); for ($i = 3; $i <= $count; $i++) { if ($data_in[$i]['transID'] != 0) { $sql = 'INSERT INTO `eve_wallet_t` (`date`, `transID`, `quantity`, `type`, `price`, `clientName`, `characterName`, `stationName`, `transactionType`, `id`, `acountkey`) VALUES (\'' . mysql_real_escape_string($data_in[$i]['date']) . '\', \'' . mysql_real_escape_string($data_in[$i]['transID']) . '\', \'' . mysql_real_escape_string($data_in[$i]['quantity']) . '\', \'' . mysql_real_escape_string($data_in[$i]['type']) . '\', \'' . mysql_real_escape_string($data_in[$i]['price']) . '\', \'' . mysql_real_escape_string($data_in[$i]['clientName']) . '\', \'' . mysql_real_escape_string($data_in[$i]['characterName']) . '\', \'' . mysql_real_escape_string($data_in[$i]['stationName']) . '\', \'' . mysql_real_escape_string($data_in[$i]['transactionType']) . '\', NULL ,\'' . $args['accountKey'] . '\');'; @mysql_query($sql, $server1); $error = mysql_errno(); if ($error > 0 && $error == 1062) { } else if ($error > 0 && $error != 1062) { return mysql_error(); exit; } else { } $sql = ""; } } $akey++; $sql = 'UPDATE `eve_data_ex` SET refID = \'' . $data_in[$i]['transID'] . '\' WHERE `eve_data_ex`.`id` = 2 LIMIT 1;'; @mysql_query($sql, $server1); } print_r($outerror); ?>
  19. http://www.php.net/manual/en/function.pathinfo.php or just do this <?php $extension = substr(strrchr($filename, "."), 1); ?>
  20. ill test it and thank you if i have any questions can i pm you?
  21. yes once they are logged in set a session variable and check it on each page
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.