almostbob 866 Retired: passive income ROCKS

Immediate thought

Malwareyou cant close this page unless you buy something
your pc is infected send us moneyYou are not supposed to take control of the browser
Imagine if you could not close a web browser when you went to some site on the internet that was loading your computer full of viruses!

lookup

onclose
onunload

something like

<script language="JavaScript">
<!-- 
var legalExit=0;
var lpx=10;
 function leave() {
if(legalExit==0) {
var dl=confirm('WARNING: Closing this window means bla bla bla.\n\nClick OK to remain.'); 
if(dl) {
if(window.screen){ 
lpx=screen.width;lpx=lpx-225;
} 
var op=window.open('filename','','width=170,height=185,location=no,status=no,directories=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,top=10,left=' + lpx);
}
}
}
 function openWin(u,t,x,y,s) { 
var op=window.open(u,t,'width='+x+',height='+y+',location=no,status=yes,toolbar=no,directories=no,menubar=no,scrollbars='+s+',resizable=no'); 
op.focus();
}
// -->
</script>

code is untested, just thought process

almostbob 866 Retired: passive income ROCKS

Thanks for your reply,
I just want to know the difference between <img src="images/new.jpg"> and <img src="/images/new.jpg"> tag format, also I belive <img src="/images/new.jpg"> and <img src="../images/new.jpg"> are same. I am an experienced programmer so i know some basics in images.
Please advice

./ this folder
../ up one folder
/ html root of the current site
/foldername/ foldername off the html root
./foldername/ foldername off the current folder
foldername/ foldername off the current folder (alternate)
../foldename/ up one folder then into foldername (parallel folder in the tree)
../../ up two folders
../../foldername up two then into foldername

in dos, windows cmd window type cd .. or cd . or cd ../foldername and you can see what it does

Your beliefs are wrong, ../ and / are not the same

Experienced ? dont think so

almostbob 866 Retired: passive income ROCKS

The $_SERVER[] array works
everywhere php works

Link to the php docs, you will find them useful
most of these Q already answered
http://www.php.net/reserved.variables.server

almostbob 866 Retired: passive income ROCKS
<?php //stats.php
$file = $_SERVER['DOCUMENT_ROOT'].'visitordata.txt'; // define the text file.
// Get user stats.
$getdate = date( 'd-m-Y, H:i:s' );// Get the date.
$user_ip = $_SERVER['REMOTE_ADDR'];// Get the users IP.
$user_browser = $_SERVER['HTTP_USER_AGENT'];// Get the browser type. one of many things you can get for the stats
$page= $_SERVER['PHP_SELF']; //Get the current page
$referer = getenv("HTTP_REFERER"); // Get the refering page.
// Look for the text file and open it for writting.
$fp = fopen($file, "a+");//open the text file for writing.
fputs ($fp, "$user_ip,$getdate, $page, $referer\n");// Write the user stats into the text file.
fclose($fp);// Close the text file.
?>

a draft version it works but if it isnt the data you want its easy to recode <?php include($_SERVER['DOCUMENT_ROOT'].'stats.php'); ?> in each file, no hasslse with .. . ../../../..

line 1, is the one with path details
you can $_SERVER['DOCUMENT_ROOT'].'/folder/folder2/visitordata.txt'; if you want to keep the data file out of the root

almostbob 866 Retired: passive income ROCKS
<noscript>The tools on this page operate in javascript<br>To access the tools, activate Javascript in your browser and refresh the page</noscript>

You can't force scripting, but you can ask.

almostbob 866 Retired: passive income ROCKS

Actually it looks like **expletive deleted**, in firefox IE Opera Safari

tables are for tabular data, not for layout,
tables for layout purposes add to page size, for no value, must be fully loaded before any part of them is displayed, and generally slow down the page
use css for layout

Pixels are for images
everything else should be expressed in % or em,
relative sizes that expand and contract to window size and screen resolution
this screen is 2920 wide 2140 high, your page is constrained to around 760px, has a larger gutter than it does a work space
fixed pixel fonts on the page are invisible, 12dots high when the screen is 128dpi is less 1/10 inch high text
on any other screen size than the one you used to layout this page, it will look like **expletive deleted**
if you reduce the window on your own pc to smaller than fullscreen, it looks like **expletive deleted**
Its easy to fix, there are hundreds of 'why does my website look like **expletive deleted**?' articles to read

"10 common website design failures"
"10 worst website designs"
"why tables are stupid"
have all been article titles in the past.

IE and firefox render tables, and everything else that uses margins and padding differently.
IE holds more market share than all other browsers combined, design around IE's foibles failures and mishandling.
most people …

almostbob 866 Retired: passive income ROCKS

Thanks BzzBee that works, but what if i want to retrieve the url from a row as well. rather than entering the URL in php.

<a href='$row[linkurlrow]'>$row[title]</a>

??

Thanks

thats going to work, as long as you update the table to include a column of urls, called linkrulrow

almostbob 866 Retired: passive income ROCKS

I cheat,
created a form that chooses the 'to' language and pass the page to Yahoo translator babelfish
Its in menu.inc.php so appears in every page, and links etc work in the translated language, and subsequent pages are translated
google translator also works, but you have to find the url, urself
replace mysite.com with your site

<form action="http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&btnTrUrl=Translate&trurl=http://www.mysite.com<?php echo$_SERVER['PHP_SELF']; ?>" method='post'>
<select name='lp'>
<option selected title='La traduction est automatique, confirment svp les details essentiels dans la version Anglaise originale' value='en_fr'>Fran&ccedil;ais</option>
<option value='en_de' title='Die &Uuml;bersetzung ist, best&auml;tigen bitte wesentliche Details in der englischen Version automatisch'>Deutsch</option>
<option value='en_es' title='La traduccion es automatica, confirma por favor los detalles esenciales en la version Inglesa original'>Espa&ntilde;ol</option>
<option value='en_it' title='La traduzione &egrave; automatica, prego conferma i particolari essenziali nella versione inglese'>Italiano</option>
<option value='en_nl' title='De vertaling is automatisch, te bevestigen gelieve essenti&euml;le details in de Engelse versie'>Nederlands</option>
<option value='en_ru' title='& #1055;& #1077;& #1088;& #1077;& #1074;& #1086;& #1076; & #1072;& #1074;& #1090;& #1086;& #1084;& #1072;& #1090;& #1080;& #1095;& #1077;& #1089;& #1082;& #1080;& #1081;, & #1087;& #1086;& #1078;& #1072;& #1083;& #1091;& #1081;& #1089;& #1090;& #1072; & #1087;& #1086;& #1076;& #1090;& #1074;& #1077;& #1088;& #1078;& #1076;& #1072;& #1077;& #1090; & #1085;& #1077;& #1086;& #1073;& #1093;& #1086;& #1076;& #1080;& #1084;& #1099;& #1077; & #1076;& #1077;& #1090;& #1072;& #1083;& #1080; & #1074; & #1072;& #1085;& #1075;& #1083;& #1080;& #1081;& #1089;& #1082;& #1086;& #1081; & #1074;& #1077;& #1088;& #1089;& #1080;& #1080;'>& #1056;& #1091;& #1089;& #1089;& #1082;& #1086;</option></select>
<input type='submit' value='Translate'></form>

Cyrillic has to be escaped …

almostbob 866 Retired: passive income ROCKS

from the pageview on the op link, it doesnt stop,
did you fix it already ?

almostbob 866 Retired: passive income ROCKS

Unexpected thought

the javascript can be rewritten
I think to work as as
showit(image)
instead of just
showit()
so that it loads the large image into the same div, overlaying the small image every time, exact code, unsure.
and the large images can be background loaded by script after the page is loaded so the large image appears immediately onclick, without affecting page load times

<!-- bla bla -->
</body>
<script type="text/javascript">
//<![CDATA[
<!-- 
image1 = new Image();
image1.src = "pic1.jpg";
image2 = new Image();
image2.src = "pic2.jpg";
//-->
//]]>
</script>
</html>
almostbob 866 Retired: passive income ROCKS

Load on mouseover especially for large images, is unacceptably slow, mouseover should appear immediately, nobody will wait.
load the thumbnails in the body, then load the large images in the background so that the appearance of immediate is maintained.

This code accomplishes it for me

<!--snip-->
<img width='320' height='240' Alt='Click for more pictures of this very interesting wreck' src='/slides/drive010a.jpg' onmouseout='src="/slides/drive010a.jpg";' onmouseover='src="/slides/drive011a.jpg";'
onclick="open('/slides.php','_parent',',,,,,,');">
<br>That house on Nuttby Mountain<br>
Always looking for new properties to renovate and restore
<!--snip-->
</body>
<script type='text/javascript'>
<!-- Begin 
image1 = new Image();
image1.src = '/slides/drive011a.jpg';
// End -->
</script>
</html>

the javascript in the code above, runs after the page is completely displayed, loads the mouseover image drive011a, and it appears immediately on mouseover of the image in the body. There can be any number of images in the javascript, and they will background load,
It should not take much modifiaction of the database query page to preload the images

almostbob 866 Retired: passive income ROCKS
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">

minor bug with this, the doctype is html 4, so xml namespaces are illegal.

bangs head on desk,
read the prior post about shift to xhtml, and messed up
things you do, without thinking, bite you in the bum

almostbob 866 Retired: passive income ROCKS

try it with the doctype all on 1 line
without the carriage return and tabs

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
almostbob 866 Retired: passive income ROCKS

Required attributes
The following attributes are required when adding a Flash movie to an HTML page:
<snip>
Both object and embed:

sure looks like macromedia havent deprecated embed
proprietary systems,
can and do tell W3C to stick their recommendations in proverbial dark places.
until Macromedia change the requirements of flash, what everyone else does, matters a gnat fart
as the OP noted,
But thank you the embed part is what i was missing. /cheers
Function - before everything else, it has to work NOW
There is not much point in producing W3C code that does not work till some unimagined point in the future when Macromedia decides to become standard compliant.
When Flash implementations are compliant (at least til W3c changes it acgain), <embed></embed> will be just another ignored tag, the code will still work

almostbob 866 Retired: passive income ROCKS

wrap your code in
[code=language] code

[/code] tags leave out the blank lines
it makes it easier to read

use proper html doctypes if you want to use attributes of those doctypes
<html> means html 2.0 = no floats

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

fun isn-nit
float the menu left

almostbob 866 Retired: passive income ROCKS

from the documentation inside the file
first parameter (e.g. "index.php?image|...") is the mode
//available modes are
//image: returns the picture resized
//browse: overview of all pics
//slides: slideshow
//
its all detailed
or google search for another version

almostbob 866 Retired: passive income ROCKS

the same effect with layers, is better, looks like a popup, and cant get blocked,
this is one possibility
(I know tables suck, but you can get the code right)
you could replace the button with image mapping the small image so the area clicked on expands to fill the layer

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<style>
<!--
.top { background-color: #000070; color: #ffffff; text-align: right; }
.bottom {  background-color: #efefef; padding: 15px; }
-->
</style>
<script language="javascript" type="text/javascript">
<!--
(document.getElementById) ? dom = true : dom = false; //ie
function hideIt() {
 if (dom) {document.getElementById("layer1").style.visibility='hidden';} 
 if (document.layers) {document.layers["layer1"].visibility='hide';} }  //firefox
function showIt() {
 if (dom) {document.getElementById("layer1").style.visibility='visible';}
 if (document.layers) {document.layers["layer1"].visibility='show';} }
onResize="window.location.href = window.location.href"
//--></script>
</head>
<body>
<button onClick="showIt();">Big image</button>
<div id="layer1" style="position:fixed; left:20px; width:45%; top:20px; visibility:hidden;">
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td Align="right" onClick="hideIt()" class="top">
<font Color="#ffffff"><Strong>Close</strong></font>
</td>
</tr>
<tr>
<td class="bottom">
<img src='bigimage.jpg'></td>
</tr>
<tr>
<td Align="right" onClick="hideIt()" class="top">
<font Color="#ffffff"><Strong>Close</strong></font>
</td>
</tr>
</table>
</div>
</body></html>
almostbob 866 Retired: passive income ROCKS

BzzBee nailed it
the field isnt populated if(isset($_REQUEST['autoid']))

almostbob 866 Retired: passive income ROCKS

it is unneccessary, and often makes you miss a quote, to drop in and out of php text for every html tag

echo '<tr><td>'.$row['title'].'</td><td>'.$row['category'].'</td><td>'.$row['year'].'</td>
<td><font size="2"><a href="edit.php?autoid="'.$row['autoid'].'">  edit </a></font></td>
<td><font size="2"><a href="delete.php?autoid="'.$row['autoid'].'" >delete</a></font></td></tr>';

when it displays the table, view source to make sure the delet <a href ?parameter is populated with an id, stranger things happen, the error may be in the prior sql query
and $query4= "delete from movie where autoid='$id'"; looks right

almostbob 866 Retired: passive income ROCKS

there is only one important for any implementation it works
macromedia, the developer of flash, include the embed tag,
screw deprecated

almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS
echo '<tr><td>'.$row['title'].'</td><td>'.$row['category'].'</td><td>'.$row['year'].'</td><td><font size="2"><a href="delete.php?id='.$row['autoid'].'" >delete</a></font></td></tr>';
// or
echo "<tr><td>$row['title']</td><td>$row['category']</td><td>$row['year']</td><td><font size='2'><a href='delete.php?id=$row['autoid']' >delete</a></font></td></tr>";
almostbob 866 Retired: passive income ROCKS

flash is not text/html
typical macromedia flash

<OBJECT type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="550" HEIGHT="400" id="myMovieName">
<PARAM NAME=movie VALUE="myFlashMovie.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="/support/flash/ts/documents/myFlashMovie.swf"  quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400" NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>

Try
google flash

<object type="application/x-shockwave-flash" width="400" height="326">
<param name="movie" value="http://video.google.com/googleplayer.swf?docId=8755581808731033658" />
<param name="allowScriptAcess" value="always" />
<param name="quality" value="high" />
<param name="bgcolor" value="#600000" />
<param name="scale" value="noScale" />
<param name="salign" value="TL" />
<param name="FlashVars" value="playerMode=embedded" />
<embed id="VideoPlayback" src="http://video.google.ca/googleplayer.swf?docid=8755581808731033658&hl=en&fs=true" style="width:400px;height:326px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"> </embed>
</object>

Embed and object for cross browser compatibility, but am unsure of exact syntax, should be closer..

almostbob 866 Retired: passive income ROCKS

forgot
tooo late to edit last post

in the javascript that performs the reboot
the url is broken into harder to recognize pieces
something similar to

var str = "/sys/restart2.xgi?";
str += exeStr("submit REBOOT");
location.href=str;
almostbob 866 Retired: passive income ROCKS

browse the source of the router page containing the reboot button
the source of javascript function will contain the actual url used to reboot the router
something like ' "/sys/restart2.xgi?submit REBOOT"; ' (dlink)
giving a value for your desktop button

<!-- one of many possible values -->
http://192.168.1.1/sys/restart2.xgi?submit REBOOT
almostbob 866 Retired: passive income ROCKS

this one allows you to set images per row, rows per page,
does both gallery & slideshow
allows the user to download a .zip of the images (or not),
configured by changing true/false in the settings section
well documented internally
drop in a folder of images when you unzip the file, and it just works
only with image types jpg/jpeg gif bmp png tif

google is your friend

There are thousands available for download

almostbob 866 Retired: passive income ROCKS

a question does

<? line; ?>
<? line; ?>

etc
take more processor than

<? line;
line;
line;
line; ?>
almostbob 866 Retired: passive income ROCKS

or

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
almostbob 866 Retired: passive income ROCKS

why are you using php for this
its straight html
php just adds overhead,
anyway a possible fix,,
and, the versioning of html is important

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

very old versions of html <html> cant read external javascripts

almostbob 866 Retired: passive income ROCKS

smaller flipped and mirrored, and tiled each way

especially if you have shares in an optician

almostbob 866 Retired: passive income ROCKS

its a framebreaker,
to reduce bandwidth theft, content theft
stop stealing other sites' content,
stop stealing other sites' bandwidth,
open pages in a new tab not in your iframe,
use their RSS feed if they provide one,
or contact the site owner and seek a licensing deal for their content.

almostbob 866 Retired: passive income ROCKS

you know if your saying ms access database will make a bad database, why did microsoft made it in the first place if it will make a bad database. You are very pessimistic.

think
windows vista
windows xp initial release
windows 98 famous bluescreen on release

ms dont care whether it is good
just good enough to sell

almostbob 866 Retired: passive income ROCKS

superscript raises the text, and therefore raises the top of the text,
when you see typeset books with superscripts, the superscript text is a smaller font.
decrease the font size of the superscript text by the same proportion it is elevated and the top of the text box will remain the same.
else the remainder of the text line will be pushed down so the top of the superscript text does not occlude the line above.

almostbob 866 Retired: passive income ROCKS

Screen dumps are useless
show the code please

mozilla and IE allocate whitespace differently, it may just need a tweak to the padding or margin in your stylesheet for one or the other browser.

almostbob 866 Retired: passive income ROCKS

try this (attached file index.php in zip)


configureable for rows/columns/ slideshow/download as zip/full size/screen size

almostbob 866 Retired: passive income ROCKS

unfortunately the dates dont determine the seasons the same in all regions, some change on equinox and solstice, some change on first day of months,
once you decide on how YOU want your site background to change on date it would be far simpler to set on the server, by server date settings, in php asp or shtml, than on the user pc there are a lot of delays to load backgrounds after the page is loaded and the javascript run,
in php and I assume other server side languages it is simple to get the date, so

function GetSeason() {
$SeasonDates = array('/12/21'=>'winter','/09/21'=>'autumn','/06/21'=>'summer','/03/21'=>'spring','/12/31'=>'winter');
foreach ($SeasonDates AS $key => $value) // Loop through the season dates
 {  $SeasonDate = date("Y").$key;
    if (strtotime("now") > strtotime($SeasonDate)) // If we're after the date of the starting season
    { return $value; } 
  }
}
echo '<style>body {background-image: url('.GetSeason().'.jpg);}</style>' ;

the dates are guesses, I think in Mar 1 Jun 1 Sep 1 Dec 1

almostbob 866 Retired: passive income ROCKS

I store a hires un watermarked version for people who subscribe, and serve a lower res version with a watermak to unregistered users
the scripts are at http://koivi.com/php-gd-image-watermark/

almostbob 866 Retired: passive income ROCKS

Is the update script being called from a page that is being updated
if so
page 1 should update page 2 first then page 1,
page 2 should update page 1 first then page 2,
if the page updates itself, the script stops, because the page with the script is no longer current

think I have my head around it

almostbob 866 Retired: passive income ROCKS

I think you cant via http, tcp and other protocols maybe,
you can build your own http server and get "a" mac address, but its likely going to be the address of the last router in the traceroute path

almostbob 866 Retired: passive income ROCKS

IonCube would be the best bet,
99.999% likely can unencode the encoding,

All ionCube products include priority support and upgrades as standard, and as our customers say, we deliver when you need it most.

almostbob 866 Retired: passive income ROCKS

Contact the author
Obfuscation implies attempt to protect the code

the IonCube loader is a freebie,
at least you will be able to read it,, http://www.ioncube.com/loaders.php

almostbob 866 Retired: passive income ROCKS
(document.getElementById) ? dom = true : dom = false;
function hidetime(id) {
 if (dom) {setTimeOut("document.getElementById(id).style.visibility='hidden';",10000)} //IE
 if (document.layers) {SetTimeOut("document.layers[id].visibility='hide';",10000)} } //mozilla
function showtime(id) {
 if (dom) {setTimeOut("document.getElementById(id).style.visibility='visible';",10000)}
 if (document.layers) {setTimeOut("document.layers[id].visibility='show';",10000)} }

Cross browser capable scripts to show/hide

<body onload='showtime("thisimage");'>
<img style='visibility:hidden' src='image1.jpg' id='thisimage'>
</body></html>

dont know about the display part, that just P___s me off when someone does it, so I havent thought about it, but if you combine the codes it might do it

almostbob 866 Retired: passive income ROCKS
$result = mysql_query("SELECT * FROM table where id=%s, $id");
almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS
<table border="0" cellpadding='0' cellspacing='0' align="center" width="60%">

browsers default to different cell whitepace that may be the cause of the white around images, apologies if already mention, I havent read all the posts yet, got to write while the brain works

almostbob 866 Retired: passive income ROCKS
<meta http-equiv='Refresh' content='0;url=javascript:history.go(-1)'>

if javascript is on

almostbob 866 Retired: passive income ROCKS

May be some errors, this my understanding
ssi php asp, are, dunno, extensions to html I suppose
ssi php asp includes provide a templating system,
never sure what words to usethey run on the server and output html pages
if all the pages carry the same header and menu and footer and the content is different
then in php it can be

<?php 
include ('header.php');
include ('menu.php');
?>
<!-- 
regular html for the body 
as long or as short as you need
-->
<?php include ('footer.php'); ?>

header.php includes the doctype declarations necessary for proper html validation, css, scripts, et al.
footer php likewise
menu php is a menu

>=thousands of pages all with the same theme
when you need to alter it you only need to alter 1 file
framesets or Iframes need to be tweaked on different screens and browsers to get the look right.

the output to the browser is complete syntactically correct html, tailored to OS capability (if the author is good) by the headers sent when the browser requests the page.

Choice of language depends on the support given by the host, Apache/linux mostly use php
MS mostly ASP
just about everybody can use shtml, but the other two seem more capable (personal opinion, no supporting data)
server languages can produce web sites, without much input, just from directory lists,
drop a file in the root, - menu

almostbob 866 Retired: passive income ROCKS

where do i place this?

in the #1,#2, and #3 for the jscript?

the one that says document.slideshow.src = NewImg[ImgNum]; there is only one

almostbob 866 Retired: passive income ROCKS

head slap moment, what you get when you dont read what you wrote

document.slideshow.src = NewImg[ImgNum]; 
/* should be */
document.getElementById('slideshow').src = NewImg[ImgNum];

this link will point you to a bunch of scripts, freeware, that do work
Hotscripts:: Javascript slideshow

almostbob 866 Retired: passive income ROCKS

Norton is a pig
useless
bloated
slow to update
and should only be used by people you dont like