Jump to content

ShiVer

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

About ShiVer

  • Birthday 09/14/1986

Contact Methods

  • MSN
    ryan_doss@hotmail.com
  • Website URL
    http://ndoss.com

Profile Information

  • Gender
    Not Telling
  • Location
    JoMo

ShiVer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Try this [code] <html> <head><title>Warptweet.com - Uploader</title> <style type="text/css"> <!-- body {background-color: black; color: white;} a {color: white;} a:hover {font-size: 110%;} --> </style> </head> <body> <div align="center"> <fieldset> <legend>Warptweet.com File Upload</legend> <?php $allowed_files = array( '.ext1', '.ext2', '.ext3'    // Change these to match what you want ); if ($_FILES["file"]["error"] > 0)   {   echo "Error: " . $_FILES["file"]["error"] . " ";   } else   {   echo "Filename: " . $_FILES["file"]["name"] . " ";   echo "Type: " . $_FILES["file"]["type"] . " ";   echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb ";   } if (file_exists("filer/" . $_FILES["file"]["name"])) {   echo $_FILES["file"]["name"] . " already exists. "; } else { if(in_array(substr($_FILES["file"]["name"], -1, 4), $allowed_files)) {   move_uploaded_file($_FILES["file"]["tmp_name"],   "filer/" . $_FILES["file"]["name"]);   echo "Stored in: " . "http://www.warptweet.com/wh/filer/" . $_FILES["file"]["name"]; } } ?> <center><a href="index.htm"><--Back Home</a></center> </body> </html> [/code]
  2. D: All of the above. (if your going secure) Record the session id, IP, and any proxy's.
  3. ShiVer

    save img

    Your gonna want to rephrase that. Don't quite understand.
  4. I've always thought you chould just echo them. Can you not?
  5. I still can't seem to figure this out, I've a number of different things, and each has it's own unique problem. Any ideas from anyone?
  6. That's observant but no actually, $img[0] simply contains the first character of each value... so the first character of . and .. matches, therefore it doesn't show.
  7. Okay, I'm creating a photo gallery, here's how I would like it to work: The user updating the gallery simply connects to the FTP and uploads a folder with all the images in it. The folder name must be what they want the title of the album to be. And the first image in the folder alphabetically must be the image that they want to be the preview. Everyone follow? Good... Well, I have a loop that reads the "Albums" directory which is the one they drop they're folder into. It finds all the folders in that folder and prints them with the Folder names as titles. I also have a loop that reads all the images in each individual albums and displays the image for that "Preview". The only problem is I don't know how to make so that it Only reads the FIRST image of the album for the preview rather than pulling every image and showing the Album folders repeatedly for each image. I'll leave my code for those you understand, any help would be great, you could modify my existing or write a better way. Thanks to anyone to helps in advance. If you have any questions feel free to ask, thanks, - Ryan [code]<?php $od = opendir("albums"); while($dir = readdir($od)) { if($dir[0] == '.') { continue; } $nd = opendir("albums/".$dir); while($img = readdir($nd)) { if($img[0] == '.') { continue; } echo ' <table cellpadding="2" cellspacing="1" border="0">   <tr> <td>'.$dir.'</td>   </tr>   <tr> <td><a href="index.php"><img src="albums/'.$dir.'/'.$img.'" width="100" height="100" border="0" /></a></td>   </tr> </table> '; } } ?>[/code]
  8. I solved it: [code]<?php preg_match_all("/\[ad-pos:(.*?)\]/si", $leftcol, $token); foreach ($token[1] as $pos) {     $select = mysql_query("select * from adsys_ads where position = '$pos' order by RAND() limit 1");     if (mysql_num_rows($select) <= 0) {         $leftcol = preg_replace("/\[ad-pos:$pos\]/si", "", $leftcol);     } else {         while ($ads = mysql_fetch_array($select)) {             $leftcol = preg_replace("/\[ad-pos:$pos\]/si", $ads['img_url'], $leftcol);         }     } } ?>[/code]
  9. Any ideas or suggestions?
  10. Could you possibly put the image in a popup window then when they click on the image it just closes the window? Or if I read right could you try placing a javascript:go.history(-1) on the image so that is just goes back in history when clicked?
  11. Alright, I'm going to try to make this as least confussing as possible but it prolly won't work, so bare with. My company has asked me to create an ad system script for a few websites that we own. It shouldn't be too difficult, I'm just having some troubles with it. Right now I have a mysql table set up with the ad information such as it's id, where the image is located, the url the image is suppose to link to, and the position on the page where it's to be set. I have it set up so there are tokens in an html template in this format: [b][ad-pos:left-col1][/b] :so it looks like this: [code]<table border="0" cellpadding="0" cellspacing="0">   <tr>     <td>     [ad-pos:left-col1]<br />     [ad-pos:left-col2]<br />     [ad-pos:left-col3]<br />     </td>   </tr> </table>[/code] left-col1, left-col2, and left-col3 of course being actual positions themselves. So in the database the position field for an ad in [ad-pos:left-col1] token would read left-col1 and so on. What I want it to do is this: If there is no ad in the database with that posistion it simply won't show anything in replace of the token. But if there is one ad or more it will replace the token with one of ads randomly. I thought it would be a simple proceedure but i can't get it work. I know there's is probably nothing to it and I'll hate myself when someone shows me like four lines of code that do it, lol. Like I said I probably confussed the crap out of you, so if anyone has any questions feel free to ask, Thanks in advanced! - Ryan
  12. Thank you all, I got SemiApocalyptic's to work but I used kenrbnsn's. [b]@kenrbnsn[/b]: Ya forgot the seperation parameter in explode. lol Thanks again to all three of ya. I'll be set for the next time I need to do somethin like this as well! - Ryan
  13. Alright, I'm making this way to complicated on myself so hopefully someone with a fresh start could help. Heres the plan: I have several files in a directory. I want to open and read the directory to only find text files. The text files are setup in the following format: [b]picture.jpg|Title of Clip|clip.flv[/b] "[i]foreach[/i]" text file I want to explode to an array so I can show it like the following: HTML>> [code]------------- |           | Title of clip |  picture  | |           | -------------[/code] The image and title will be a hyperlink so that when clicked it will open up another text document set by myself and write to it the clip.flv Note: So basically it's like uploading the information to a database and then using a while loop to pull it out and show all the results. The situation being the way it is I don't have access to a DB so I'm trying to use flatfile. I know most of you are probably lost now so please ask any questions and I'll do my best to answer! Thanks! - Ryan
  14. There are tutorials all over the place for searching databases... just look around.
×
×
  • 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.