Thread: Problem
View Single Post
  #1  
Old 02-21-2005, 09:19 PM
Guy G Guy G is offline
 
Join Date: Nov 2004
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Problem

I have a script

PHP Code:
<?php
echo "<head>
<title>Free Image hosting</title>
<STYLE TYPE=\'text/css\'>
/* CSS generated at csscreator.com */
A{color:FF6600; text-decoration:none; }
A:Visited{color:FF6600; }
A:Hover{color:000000; text-decoration:underline; }
</STYLE>

</head>

<body background=\"img/wall.gif\" link=\"#FF6600\" vlink=\"#FF6600\" alink=\"#FF6600\">

<p align=\"center\">&nbsp;</p>
<div align=\"center\">
    <table border=\"1\" width=\"800\" bordercolor=\"#000000\" cellspacing=\"3\" cellpadding=\"3\">
        <tr>
            <td height=\"74\" width=\"310\" bordercolor=\"#000000\" bgcolor=\"#FFFFFF\">
            <p align=\"center\">
            <img border=\"0\" src=\"img/logo.gif\" width=\"292\" height=\"74\"></td>
            <td height=\"1\" width=\"10\" bordercolor=\"#000000\" bgcolor=\"#FFFFFF\">
            <p align=\"center\">
            <img border=\"0\" src=\"img/ad1.gif\" width=\"468\" height=\"60\" align=\"right\"></td>
        </tr>
        <tr>
            <td width=\"1044\" bordercolor=\"#000000\" bgcolor=\"#FFFFFF\" colspan=\"2\">
            <p align=\"center\"><span style=\"font-size: 9pt\"><br>
            </span><font face=\"Verdana\" style=\"font-size: 9pt\">Welcome to <i>
            <font color=\"#FF6600\">****</font></i>, a fast and reliable <b>free</b>
            image hosting service, no registration is required and you may share
            your images, instantly!<br>
            &nbsp;</font></p>
            <p align=\"center\"><font face=\"Verdana\" style=\"font-size: 9pt\">
<FORM ENCTYPE=\"multipart/form-data\" ACTION=\"index.php\" METHOD=\"POST\">
<p align=\"center\">File: <INPUT TYPE=\"file\" NAME=\"userfile\"> <br>
<br>
<font face=\"Verdana\" style=\"font-size: 9pt\">Image Types Allowed:<b> jpg, png,
gif</b><br>
Maximum Size: <b>200kb</b></font><br>
<br>
<INPUT TYPE=\"submit\" VALUE=\"Upload\">
</p>
</FORM>
</font></p><p align=\"center\">"
;


$path "images/";
$max_size 200000;

if (!isset(
$HTTP_POST_FILES['userfile'])) exit;

if (
is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {

if (
$HTTP_POST_FILES['userfile']['size']>$max_size) { echo "<center>The file is too big</center><br>\n"; exit; }
if ((
$HTTP_POST_FILES['userfile']['type']=="image/gif") || ($HTTP_POST_FILES['userfile']['type']=="image/pjpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpeg")) {

if (
file_exists($path $HTTP_POST_FILES['userfile']['name'])) { echo "The file already exists<br>\n"; exit; }

$res copy($HTTP_POST_FILES['userfile']['tmp_name'], $path .
$HTTP_POST_FILES['userfile']['name']);
if (!
$res) { echo "<center>upload failed!</center><br>\n"; exit; } else { echo "<center>upload sucessful</center><br>\n"; }

echo 
"<center>File Name: http://www..com/images/".$HTTP_POST_FILES['userfile']['name']."</center><br>\n";
} else { echo 
"<center>Wrong file type</center><br>\n"; exit; }

}



echo 
"<p align=\"center\"><font face=\"Verdana\" style=\"font-size: 9pt\"><br>
&nbsp;</font></td>
        </tr>
    </table>
</div>
<p align=\"center\"><font face=\"Verdana\" size=\"1\">? 2005, All rights
reserved<br>
</font><font face=\"Verdana\" size=\"2\"><a href=\"about.php\">About</a> |
<a href=\"contact.php\">Contact</a> | <a href=\"faq.php\">FAQ</a> |
<a href=\"tos.php\">TOS</a></font></p>"
;

?>
It is a last attempt of trying to do anything with it.... not working...
When i go into the main page it wont show the footer, this part:
PHP Code:
echo "<p align=\"center\"><font face=\"Verdana\" style=\"font-size: 9pt\"><br>
&nbsp;</font></td>
        </tr>
    </table>
</div>
<p align=\"center\"><font face=\"Verdana\" size=\"1\">? 2005, All rights
reserved<br>
</font><font face=\"Verdana\" size=\"2\"><a href=\"about.php\">About</a> |
<a href=\"contact.php\">Contact</a> | <a href=\"faq.php\">FAQ</a> |
<a href=\"tos.php\">TOS</a></font></p>"

and when i upload it does.... how would i display it before and after i upload it?

Thanks all
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01341 seconds
  • Memory Usage 1,805KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete