Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Use SSBB Bin file viewer or maybe attach a file so someone can look at it to write a convertor
  2. Firstly a binary file could be almost anything (not limited to an image) the extension .bin is commonly used for CD/DVD images (not pictures but disc images) the fact your using base64_decode would suggest your dealing with a MacBinary archive (which I have only seen on email on Mac OS9 (classic), However by looking at your script it would suggest you have a JPEG, PNG, GIF, WBMP, or GD2 file and are attempting to convert to png if its not one of those formats then your need to give some details
  3. You could hide the path but it wouldn't be a great solution. I think a better solution would be to move the files outside of the public folder and create a script to pull the data this links explains the idea of putting things outside of public access, as for a script to access them here's a simple jpeg example <?php session_start(); if($_SESSION['access'] != true) //whatever { die("No access"); } //Above isn't required but could be used for member only access $file = str_replace("/", "", $_GET['file']);//basic filter header('Content-Type: image/jpeg'); readfile($file.".jpg");//output file contents to ?> EDIT:ripped from oni-kun example <img src="private.php?file=example"/>
  4. Kinda need a bit more detail.. giving the file name or a script really doesn't tell us much.. also "some other things" is also kinda hard to work with.. I'm sure people will be happy to help but we need to know what you need help with!
  5. HUh! I don't see any CSS and have no idea how mysql_num_rows would affect CSS.. I would assume you mean the table.. without see more code or knowing whats wrong i would have to guess and say move the open table tag into the if statement ie <?php $leagues = mysql_query ( "SELECT `comp_name`, `game`, `format` FROM `competitions` WHERE `comp_type` = 'league' AND format = 'xbox 360'" ); $num_rows = mysql_num_rows ( $leagues ); if ($num_rows > 0) { ?> <table cellspacing="10" width="300"> <tr> <td></td> <td></td> <td></td> </tr><?php while ( $row = mysql_fetch_assoc ( $leagues ) ) { extract ( $row ); $info = explode ( "_", $row [comp_name] ); ?> <tr> <td><A HREF="league.php?comp=<?php echo $comp_name; ?>"><?php echo $info [2];?></A></td> <td><?php echo $info [1]; ?></td> <td><?php echo $info [0]; ?></td> </tr> <?php } ?> </table> <?php } else { echo "There are currently no Xbox 360 Leagues"; } ?>
  6. Maybe try using echo to echo the value of $sub_attribute_names_attribute of course this assumes your queries are okay and $identity is being set.. to help out I cleaned up the formatting a little <?php $get_sub_attributes = "select * from scout_sub_attributes where identity = '$identity'"; $get_sub_attributes_res = mysql_query ( $get_sub_attributes, $conn ) or die ( mysql_error () ); while ( $sub_attributes_info = mysql_fetch_array ( $get_sub_attributes_res ) ) { $sub_attributes_id = $sub_attributes_info ['id']; $sub_attributes_identity = $sub_attributes_info ['identity']; $sub_attributes_attribute_id = $sub_attributes_info ['sub_attribute_id']; $sub_attributes_level_id = $sub_attributes_info ['level_id']; $get_sub_attribute_names = "select * from sub_attributes where id = '$sub_attributes_attribute_id'"; $get_sub_attribute_names_res = mysql_query ( $get_sub_attribute_names, $conn ) or die ( mysql_error () ); while ( $sub_attribute_names_info = mysql_fetch_array ( $get_sub_attribute_names_res ) ) { $sub_attribute_names_id = $sub_attribute_names_info ['id']; $sub_attribute_names_attribute = $sub_attribute_names_info ['sub_attribute']; $sub_attribute_names_points = $sub_attribute_names_info ['points']; $sub_attributes_points = ($sub_attribute_names_points * $sub_attributes_level_id); $display_block .= " <tr> <td class=indent>$sub_attribute_names_attribute</td> <td class=align_levels>$sub_attributes_level_id</td> <td class=align_levels>$sub_attributes_points</td> </tr>"; } } //gather attacks $get_attacks = "select * from attacks where identity = '$identity' order by level desc"; $get_attacks_res = mysql_query ( $get_attacks, $conn ) or die ( mysql_error () ); while ( $attacks_info = mysql_fetch_array ( $get_attacks_res ) ) { $attack_id = $attacks_info ['id']; $attack_identity = $attacks_info ['identity']; $attack = $attacks_info ['attack']; $primary = $attacks_info ['primary_attack']; $secondary = $attacks_info ['secondary_attack']; $attack_level = $attacks_info ['level']; $attack_points = ($sub_attribute_names_points * $attack_level); //checks for primary and secondary attacks if ($secondary == 1) $attack_points = 2; elseif ($primary == 0 && $secondary == 0) $attack_points = 1; if ($sub_attribute_names_attribute == 'Sailor Scout Attack') { $display_block .= " <tr> <td class=indent2>- $attack</td> <td class=align_levels>$attack_level</td> <td class=align_levels>$attack_points</td> </tr> <tr>"; } } //gather items of power $get_items = "select * from items where identity = '$identity'"; $get_items_res = mysql_query ( $get_items, $conn ) or die ( mysql_error () ); while ( $items_info = mysql_fetch_array ( $get_items_res ) ) { $items_id = $items_info ['id']; $items_identity = $items_info ['identity']; $item = $items_info ['item']; $item_level = $items_info ['level']; $item_points = ($sub_attribute_names_points * $item_level); if ($sub_attribute_names_attribute == 'Item Of Power') { $display_block .= " <tr> <td class=indent2>- $item</td> <td class=align_levels>$item_level</td> <td class=align_levels>$item_points</td> </tr>"; } } ?>
  7. Just fetch the level and assign it /*addition */ session_start(); $row = mysql_fetch_assoc($gUser); $_SESSION["level"] = $_row["level"]; /*addition complete*/ echo '<h2>Login Complete</h2>';
  8. here's a few (I'm pretty sure all are valid) SELECT * FROM WHERE NOT id = 0 SELECT * FROM WHERE id IS NOT 0 SELECT * FROM WHERE ! id = 0 SELECT * FROM WHERE id != 0 SELECT * FROM WHERE ! id <> 0 What's the error ?
  9. Is this all of the code ? as your missing the database connection, database selection, and the database query here's a quick example of using a database <?php $conn = mysql_connect("localhost", "mysql_user", "mysql_password"); if (!$conn) { echo "Unable to connect to DB: " . mysql_error(); exit; } if (!mysql_select_db("mydbname")) { echo "Unable to select mydbname: " . mysql_error(); exit; } $sql = "SELECT id as userid, fullname, userstatus FROM sometable WHERE userstatus = 1"; $result = mysql_query($sql); if (!$result) { echo "Could not successfully run query ($sql) from DB: " . mysql_error(); exit; } if (mysql_num_rows($result) == 0) { echo "No rows found, nothing to print so am exiting"; exit; } // While a row of data exists, put that row in $row as an associative array // Note: If you're expecting just one row, no need to use a loop // Note: If you put extract($row); inside the following loop, you'll // then create $userid, $fullname, and $userstatus while ($row = mysql_fetch_assoc($result)) { echo $row["userid"]; echo $row["fullname"]; echo $row["userstatus"]; } mysql_free_result($result); ?>
  10. In any case.. I don't think anyone can help without seeing the code in Encryption.php, you know a function name is nice but really doesn't help, and if you didn't write it yourself (which I a have to assume you didn't) then try referring to the documentation/website etc. (which would also mean this should be in the third party section.
  11. I'm pretty sure your not allowed to store the CVV2 data (last 3 digits on the signature side) but can store the non-CVV2 data, but I'm from the UK and I'm no lawyer.
  12. Firstly Daniels post isn't "arsey" his telling you how it is, and all that statement has done it isolate you (nice job), Secondly breaking the rules, will never help
  13. Echo the query to check its correct and valid
  14. if you use notepad++ you can search for text in files in a folder.. try that or look in the included files in the index.php
  15. cPath=21 means the PHP code can get the value 21 from the URL via $_GET['cPath'] (same for osCsid) Why would you want to pass this info via the URL.. well bookmarking for one.. but why the 21 and f5760266e2726229d92b8b053f05e2d4 well just say you have a database with lots of products you may have 40 toasters but each have a unique ID, so its logical to pass the unique ID via the URL.. So what's with the osCsid.. okay well that's also unique but for your shopping cart So try this to go http://durkmusicbeats.com/beats/index.php?cPath=21&osCsid=111 Now your see product in category 21 that "Beat Test 001" add that to your cart NOW go to http://durkmusicbeats.com/beats/index.php?cPath=20&osCsid=112 and your cart is empty and your on category 20 add any item Now goto http://durkmusicbeats.com/beats/index.php?cPath=21&osCsid=111 and your old cart is back, and again go to http://durkmusicbeats.com/beats/index.php?cPath=21&osCsid=112 etc you get the idea okay with that out of the way, you can trace thought the code looking for the <img code or maybe try searching all file to see which ones use the class from their it may give you some ideas
  16. try this $data = "the html"; //replace width with height for height preg_match('/<object[^>]*width[:=]["\']?(\d+)/i', $data, $regs)) $width = $regs[1]; EDIT: if the code is ALWAYS width then heigh you could grab both at the same time
  17. Without seeing the code its kinda hard to say, the code will probably be close to the move_uploaded_file() function, but without seeing it I can't say!
  18. Yes your need to update your php code to use the new filename
  19. Really? and all this time i have been encoding file and emailing them..
  20. Well most URL's have slashes and colons so update the pattern to $pattern='%class=r><a\s+href="([/:A-Z0-9.-]+)"%i'; or try preg_match_all('/class=r><a\s+href="([^"]*)"/i', $data, $matches); $result = $result[0];
  21. I couldn't see any reason for this not working so I tried it and it works fine SELECT * FROM `test` WHERE `action` = 'nothing here' Setup -- -- Table structure for table `test` -- CREATE TABLE `test` ( `id` int(15) NOT NULL auto_increment, `code` int(15) NOT NULL, `action` varchar(30) NOT NULL, `date` varchar(20) NOT NULL, `insert` varchar(25) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; INSERT INTO `test` (`id`, `code`, `action`, `date`, `insert`) VALUES (1, 655, 'nothing', '12/08/2009 21:03', 'Luke'), (2, 655, 'something', '12/08/2009 21:03', 'dude1'), (3, 700, 'nothing here', '13/08/2009 19:59', 'dude1');
  22. Yes, your probably want to double up on the images and have some preloads to make it smooth However that's for another thread if you create a new thread (link to this thread if needed) I going to get some sleep but if (I remember) I'll check for your new post in the morning
  23. I was going to say, 60 year old can still get homework.. theirs lots of course people can take at any age!
  24. oops slight typo T=imgBase.length; should be t=imgBase.length;
×
×
  • 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.