Jump to content

smiles

Members
  • Posts

    774
  • Joined

  • Last visited

Everything posted by smiles

  1. smiles

    thumbnail

    Well, I found some in php.net, I see that I can resized image to smaller one <?php// File and new size$filename = 'file.jpg';$percent = 0.2;// Content typeheader('Content-type: image/jpeg');// Get new sizeslist($width, $height) = getimagesize($filename);$newwidth = $width * $percent;$newheight = $height * $percent;// Load$thumb = imagecreatetruecolor($newwidth, $newheight);$source = imagecreatefromjpeg($filename);// Resizeimagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);// Outputimagejpeg($thumb); ?> everything is all right but when I try to put something at the bottom of the code .....// Outputimagejpeg($thumb); echo "Hello World";?> resized image appear but the text doesn't appear
  2. smiles

    Popup page how

    I know in Flash has Pop up term, but as far as I know, it doesn't like a web page having in Pop up If using getURL the "a certain size and no scroll bar or tool bar or navigation bar" is impossibleMaybe you should back to Javascript for it
  3. smiles

    thumbnail

    Thanks friends, I will follow your guidances
  4. Hi I had drawn myself, about 90% similar :D

  5. smiles

    small questions

    Can i make shade effect with color by CSS, if yes could you show me some link talk about it ?Thanks !!!
  6. smiles

    thumbnail

    I make thumbnails for image gallery simply by this code ...while($row = mysql_fetch_array($result)) { if ($i%5 == 0) echo "</tr><tr>"; echo "<td>"; echo "<center><a href='view_image.php?id=".$row['id']."'>"; echo "<img src='upload/".$row['imagelink']."' width='100' height='70' align='middle' border='1'></img></a></center></td>"; $i++; }... Now I try to save as an image in thumbnail form and get the big size as it presented, how can I get small size of thumbnail ?thanks !!!
  7. wellhave morejava script:document.body.contentEditable='true'; document.designMode='on'; void 0 or java script:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*1+i*x2+x3)*x1+x2)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0); but why browser do that
  8. Maybe you found something in ithttp://w3schools.invisionzone.com/index.php?showtopic=2036I had asked the same question long time ago, and Mimika (wonder where he is now ???) helped me
  9. smiles

    Popup page how

    on(Release){getURL("http://w3schools.invisionzone.com","_blank");}or you could use Alert component to have something like a notice
  10. smiles

    Image gallery again

    Thanks, I had finished it yesterday, just like making a forumThe point here is <input type="hidden" ....
  11. go to http://www.yahoo.comdelete url in address bar and replaced it by this code java script:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0); Could you explain what is happened ?And give me some another easier examples !!! (the script above is too long )thanks !!!
  12. What kind of forum that he want ? If like this forum, you must pay or get it free; if he want a very simple forum try this for e.g http://www.phpeasystep.com/phptu/12.html , there is 3 errors with it but easy to repair
  13. smiles

    Image gallery again

    I can make a simple image gallery, and when you click a thumbnail it will lead you to that image's link, and you will see the image at true size, now what I am trying to do is when you click that thumbnail, it also lead you to the page but besides that image, you also have the comment part to write some text I try some ways but too wordy, complicated ... could you give me some advise to make this ?thanks !!!
  14. Here is the code <?php$php = ".php";if (($_FILES["file"]["type"] == "image/gif")|| ($_FILES["file"]["type"] == "image/jpeg")|| ($_FILES["file"]["type"] == "image/jpg")&& ($_FILES["file"]["size"] < 200000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; $name = $_FILES["file"]["name"]; $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: '.mysql_error()); } // select database cms mysql_select_db("cms",$con); // choose the first database $sqlstr = "INSERT INTO cmsdata (imagelink) VALUES ('".$name."')"; mysql_query($sqlstr); $files= $_FILES["file"]["name"].$php; echo $files; fopen($files,"w"); file_put_contents($files,"hello world!"); mysql_select_db("myloves124_images",$con1); // choose the second database *it says error here* $sql = "CREATE TABLE $files ( Comment longtext )"; mysql_query($sql,$con1); // and *error* here echo "<br /><a href='".$files."'>View</a>"; } } }else { echo "Invalid file"; }?> How can I select 2 database in these code like above ?thanks !
  15. smiles

    Year counter

    <?php$my_t=getdate(date("U"));$countYear= $my_t[year]-1999;echo $countYear;?> http://www.w3schools.com/php/func_date_getdate.asp
  16. mostly the same, except the nameI make the database name cmsdo similar thing with free webhost, it uses domain_cms
  17. I spent the basic AS in Flash help, someone will give you links
  18. yeah exactly, very smart idea, thanks so much
  19. Web browser can't display PDF file because it doesn't support pdf reader plug-in
  20. your page now is url1, after 5s is url2, after 10s is url3 setTimeout("window.location='http://www.url1.com'",5000); setTimeout("window.location='http://www.url2.com'",10000); bet that it doesn't work cause cascade propertyhow can you solve that ?thanks
  21. It works perfectly, thanks so much
  22. I write some code, I know it lacks something but don't know what are they ?Could you show me them !!!Onclick smiley image then add "" to textarea <html><body><script type="text/javascript">function emoticon(theSmilie){ doInsert(" " + theSmilie + " ", "", false);}</script><A href="java script:emoticon(':)')"><IMG alt=smilie src="smiley.gif" border=0></A><textarea rows="10" cols="30"> </textarea></body></html> thanks !!!
  23. smiles

    smiley

    hi that works thanks so much !!!
  24. smiles

    smiley

    but where exactly should I put that function
×
×
  • Create New...