298 and $gotten[1] < 426) { $location = "/net/graham.html"; } elseif ($gotten[1] < 426) { $location = "/index.html"; } elseif ($gotten[2] < 50) { $location = "/net/about.html"; } elseif ($gotten[1] < 463) { $location = "/course/perl.html"; } elseif ($gotten[1] < 516) { $location = "/course/python.html"; } elseif ($gotten[1] < 551) { $location = "/course/php.html"; } elseif ($gotten[1] < 601) { $location = "/course/mysql.html"; } elseif ($gotten[1] < 649) { $location = "/course/tcl.html"; } elseif ($gotten[1] < 700) { $location = "/course/c.html"; } else { $location = "/course/linux.html"; } header("Location: http://www.wellho.net$location"); exit(0); }?>"; $rs = mysql_query("delete from sharedata where pagename = '$fname[1]'"); } else { $stlog .= "$fname[1] marked $_POST[$field]
"; } } } } $pagename = "HomePage"; if ($_REQUEST[pagename]) { $pagename = $_REQUEST[pagename]; } elseif ($_REQUEST[updatingpage]) { $pagename = $_REQUEST[updatingpage]; } $rs = @mysql_query("select * from sharedata where pagename = '$pagename'"); $pagedata = @mysql_fetch_assoc($rs); if (! $pagedata[pagename]) { $pagedata[pagename] = $pagename; $pagedata[title] = "This is page $pagename"; $pagedata[owner] = -2; # $pagedata[info] = "The page text goes here"; if (ereg('^[[:digit:]]+$',$pagename)) { $pagedata[info] = "[auto]"; } else { $pagedata[info] = "New Page"; } /* MySQL table create ... create table sharedata(pagename text, title text, info text, lastchangeby text, lastchangedate text, owner int, sid int primary key not null auto_increment); */ $q = "insert into sharedata (pagename, title, info, owner) values (". "'$pagedata[pagename]', ". "'$pagedata[title]', ". "'$pagedata[info]', ". "$pagedata[owner]". ")"; $rs = @mysql_query($q); } if ($_REQUEST[updatingpage]) { $canthey = ($_POST[agree] == "Yes") and ($auth || $_REQUEST[owner] == 0); if (! $canthey) { $_REQUEST[edit] = 1; $errmsg = "
DATA NOT SAVED - bad auth code
"; if ($_POST[agree] != "Yes") $errmsg = "
DATA NOT SAVED - conditions not agreed to
"; } $pagedata[pagename] = $_REQUEST[updatingpage]; $oldtitle = $pagedata[title]; $pagedata[title] = stripslashes($_REQUEST[title]); $oldinfo = $pagedata[info]; $pagedata[info] = stripslashes($_REQUEST[info]); $owner = -1; if (ereg('^-?[[:digit:]]+$',$_REQUEST[owner])) $owner = $_REQUEST[owner]; if ($canthey) { $rs = mysql_query("delete from sharedata where pagename = '$_REQUEST[updatingpage]'"); $q = "insert into sharedata (pagename, title, info, owner) values (". "'$_REQUEST[updatingpage]', ". "'$_REQUEST[title]', ". "'$_REQUEST[info]', $owner". ")"; $rs = mysql_query($q); $old = explode("\n",$oldinfo); $new = explode("\n",$pagedata[info]); $atnew = 0; $amend = array(); if ($oldtitle != $pagedata[title]) { array_push($amend,"TITLE CHANGED FROM $oldtitle"); array_push($amend,"TITLE CHANGED TO $pagedata[title]"); } $keyscope = 10; $k = 0; while ($k 1) { $rb1 = 0; for ($upto=1; $upto<$ahead; $upto++) { if ($old[$k+$upto] == $new[$atnew+$ahead]) { $rb1 = $upto; $rb2 = $ahead; } if ($old[$k+$ahead] == $new[$atnew+$upto]) { $rb1 = $ahead; $rb2 = $upto; } if ($rb1) { for ($ahn=0; $ahn<$rb1; $ahn++) { array_push($amend,"REPLACED at line ".($k+$ahn)." ... ".$old[$k+$ahn]); } for ($ahn=0; $ahn<$rb2; $ahn++) { array_push($amend,"BY new line ".($atnew+$ahn)." ... ".$new[$atnew+$ahn]); } $k+=$rb1; $atnew+=$rb2; $rekey = 1; break 2; } } } $rekey = -1; } if ($rekey < 0) { array_push($amend,"COULD NOT REKEY from line $k"); break; } } } if (! count($amend)) array_push($amend,"UNCHANGED - data save without alteration"); $from = preg_replace('/\?.*/','',$_SERVER[HTTP_REFERER]); $from = preg_replace('/upd$/','html',$from); $amlog = "---- AMENDMENT LOG ------ to $from\n".join ("\n",$amend)."\n\n------ NEW DATA READS ------\n"; } } $taggled = htmlspecialchars($pagedata[info]); # Strip out private information if the user's not logged in! if ($auth != 1 and $pagedata[owner] < -1) { $taggled = "Sorry - this is an internal page. Please log in to view. If you are not an authorised user, please go back to the HomePage of this system"; } if ($auth == 1) { $taggled = preg_replace('!\[x(=\d+)?\](.*?)\[/x\]!s','\2',$taggled); $taggled = preg_replace('!\[-x(=\d+)?\](.*?)\[/x\]!s','',$taggled); } else { $taggled = preg_replace('!\[-x(=\d+)?\](.*?)\[/x\]!s','\2',$taggled); $taggled = preg_replace('!\[x(=\d+)?\](.*?)\[/x\]!s','',$taggled); } if ($auth > 0) { $taggled = preg_replace('!\[y(=\d+)?\](.*?)\[/y\]!s','\2',$taggled); $taggled = preg_replace('!\[-y(=\d+)?\](.*?)\[/y\]!s','',$taggled); } else { $taggled = preg_replace('!\[-y(=\d+)?\](.*?)\[/y\]!s','\2',$taggled); $taggled = preg_replace('!\[y(=\d+)?\](.*?)\[/y\]!s','',$taggled); } # If there's an "auto" tag, go to the diary? if (preg_match("/\[auto\]/",$taggled)) { $daily = findaround($pagedata[pagename]); # $taggled = preg_replace("/\[auto\]/",'((Information from office system to appear here))',$taggled); $taggled = preg_replace("/\[auto\]/",$daily,$taggled); } $taggled = preg_replace("/\[([u])\]/",'<\1>',$taggled); $taggled = preg_replace("!\[/([u])\]!",'',$taggled); $taggled = preg_replace('!^\[b\](.*)\[/b\]!m','
\1
',$taggled); $taggled = preg_replace("/\[([b])\]/",'',$taggled); $taggled = preg_replace("!\[/([b])\]!",'',$taggled); $taggled = preg_replace("/\[([i])\]/",'',$taggled); $taggled = preg_replace("!\[/([i])\]!",'',$taggled); $taggled = preg_replace("/\[([p])\]/",'
',$taggled);
$taggled = preg_replace("!\[/([p])\]!",'
',$taggled); $taggled = preg_replace("/\[sp\]/",' ',$taggled); $taggled = preg_replace('!\[cell=(\w+)/\]\s*!','',$taggled); if (preg_match('!\[index/\]!',$taggled)) { $rs = mysql_query("select pagename, owner, title from sharedata "); $index = array(); $level = array(); while ($row = mysql_fetch_assoc($rs)) { $index[strtolower($row[pagename])] = $row[title]; $level[strtolower($row[pagename])] = $row[owner]; } ksort($index); $ind = ""; if ($loggedin == 1) { $ind .= ""; } foreach (array_keys($index) as $pname) { if ($loggedin == 1 or $level[$pname] >= -1) { $ind .= ""; if ($loggedin == 1) { $ind .= ""; } if ($level[$pname] == 0 ) $ind .= ""; if ($level[$pname] == -1 ) $ind .= ""; if ($level[$pname] == -2 ) $ind .= ""; $ind .= ""; $ind .= ""; $ind .= ""; } } if ($loggedin == 1) { $ind .= ""; } $ind .= "
Guest EditableGuest ViewableInternal only$pname$index[$pname]\n
 
"; } $taggled = preg_replace('!\[index/\]!',$ind,$taggled); $taggled = preg_replace('/\[([t])\]\s*/','',$taggled); $taggled = preg_replace('!\[/([t])\]\s*!','

',$taggled); $taggled = preg_replace('/\[([r])\]\s*/','',$taggled); $taggled = preg_replace('!\[/([r])\]\s*!','',$taggled); $taggled = preg_replace('!\[c=white\](.+?)\[/c\]\s*!','\1',$taggled); # $taggled = preg_replace('!\[c=white\](.+?)\[/c\]\s*!','\1',$taggled); $taggled = preg_replace('!\[c=(grey|white|red|green|yellow|blue|orange)\](.+?)\[/c\]\s*!', '\2',$taggled); $taggled = preg_replace('//','',$taggled); $taggled = preg_replace('//','',$taggled); $taggled = preg_replace('//','',$taggled); $taggled = preg_replace('//','',$taggled); $taggled = preg_replace('//','',$taggled); $taggled = preg_replace('//','',$taggled); $taggled = preg_replace('!\[l=(\d{6})(\d\d)/?\]\s*!','\2',$taggled); $taggled = preg_replace('!>0(\d)!','>\1',$taggled); # Note the links to other pages in order to add "back" links to the share system preg_match_all('!\[osl=(/[-.a-zA-Z0-9/_]+?)\](.+?)\[/osl\]!',$taggled,$matches); $fh = fopen("$_SERVER[DOCUMENT_ROOT]/../include/seealso.txt","a"); for ($k=0; $k\2',$taggled); if ($pagedata[owner] < 0) { $taggled = preg_replace('!\[away=(.+?)\](.+?)\[/away\]!', '\2',$taggled); } $hxt=""; if (ereg('\[map=(........)\]([^\[]*)\[/map\]',$taggled,$gotten)) { $nrows = 5; if (eregi("area",$pagedata[pagename])) $nrows=35; $hxt = nb6($gotten[1],$nrows); $taggled .= "
".$hxt; } $taggled = preg_replace('!\[map=([A-Z][A-Z]\d{6})\](.+?)\[/map\]!', 'Map locator - \2',$taggled); if ($sitelast == "uk") { $extrahost = "http://www.wellho.net"; } else { $extrahost = ""; } $taggled = preg_replace('!\[img=([-a-zA-Z0-9_]+?)\]xxx\[/img\]!', '
Ref: \1
Ref: \1
',$taggled); # Capture to database - additional test code if (preg_match_all('!\[img=([-a-zA-Z0-9_]+?)\](.+?)\[/img\]!', $taggled, $descriptors)) { for ($k=0; $k\2
\2',$taggled); if (! ereg('[[:digit:]]{8}',$pagename)) { $taggled = preg_replace("!(([A-Z][a-z]+)([A-Z])([a-z]*))!e", '"\2".strtolower("\3")."\4"',$taggled); $taggled = preg_replace('!\[link=([-a-zA-Z0-9_/]+?)\](.+?)\[/link\]!e', '"\2"',$taggled); } if ($_REQUEST[tellem]) { $eh = "Content-Type: multipart/alternative; boundary=\"43002609.1463793406.1109516413\"\n"; $eb = "\n--43002609.1463793406.1109516413\nContent-Type: text/html\n\n"; $ef = "\n--43002609.1463793406.1109516413--\n"; $tagmail = preg_replace("/[\r\n]{3,}/","

",$taggled); $tagmail = preg_replace("/[\r\n]{2,}/","
\n",$tagmail); $tagmail = preg_replace('!!',"\n",$tagmail); $reportfrom = $whom; if ($whom == "") $reportfrom = "guest at ".$_SERVER[REMOTE_ADDR]; mail ("all@wellho.net","Share update by $reportfrom", "$eb

$_REQUEST[title]

". "
".htmlspecialchars($amlog)."
".$tagmail."$ef", "Bcc: n.ellis@which.net\n". "From: graham@wellho.net (Graham Ellis)\n". "Reply-to: graham@wellho.net (Graham Ellis)\n".$eh ); } $lhsi = "onhead"; if (strlen($pagedata[info]) % 2) $lhsi = "ropefiddle"; if (eregi("iceland",$pagedata[info])) $lhsi = "tern1"; if (eregi("map=",$pagedata[info])) $lhsi = "awayhome"; if (eregi("melksham",$taggled)) $lhsi = "mh"; if (eregi("ing",$pagedata[title])) $lhsi = "fl"; if (eregi("melksham",$pagedata[title])) $lhsi = "brook"; if (eregi("hotel",$pagedata[info]) and strlen($pagedata[info]) % 3 ) $lhsi = "manorside"; if (eregi("hotel",$pagedata[info]) and strlen($pagedata[info]) % 4 ) $lhsi = "br1"; if (eregi("uky",$pagedata[info])) $lhsi = "lisaleft"; if (eregi("uky",$pagedata[title])) $lhsi = "lisaleft"; if (eregi("graham",$pagedata[info])) $lhsi = "gje"; if (eregi("uky",$pagedata[pagename])) $lhsi = "lisaleft"; if (eregi("london",$pagedata[pagename])) $lhsi = "l2012"; if (eregi("bir",$pagedata[pagename])) $lhsi = "gulltop"; if (eregi("edin",$pagedata[pagename])) $lhsi = "ehside"; if (eregi("diary",$pagedata[pagename])) $lhsi = "diary"; if (eregi("mas",$pagedata[pagename])) $lhsi = "chsid"; if (eregi("san",$pagedata[pagename])) $lhsi = "sealionside"; if (eregi("santa",$pagedata[pagename])) $lhsi = "santa2"; if (eregi("westbury",$pagedata[pagename])) $lhsi = "westside"; if (eregi("bath",$pagedata[pagename])) $lhsi = "nashside"; if (eregi("brist",$pagedata[pagename])) $lhsi = "beachsd"; if (eregi("hotel",$pagedata[pagename])) $lhsi = "br1"; if (eregi("wilts-",$pagedata[pagename])) $lhsi = "1896_3"; if (eregi("area",$pagedata[pagename])) $lhsi = "1896_3"; $pl1 = "wellhouse"; $alt1 = "Well House Consultants"; $pl2 = "hotel"; $alt2 = "Well House Manor Hotel, Melksham, Wiltshire"; if ($_REQUEST[wiw] == 1) { $dh = opendir("../wiltshire"); $imgs = array(); while ($file = readdir($dh)) { if (ereg('jpg$',$file)) { array_push($imgs,$file); }} $tim1 = $imgs[strlen($pagedata[info])%count($imgs)]; $tim2 = $imgs[(strlen($pagedata[pagename])+ strlen($pagedata[info]))%count($imgs)]; $t1 = ereg_replace(".jpg\$","",$tim1); $t2 = ereg_replace(".jpg\$","",$tim2); foreach (file("../../include/piclinks") as $lline) { $parts = explode(" ",$lline); if ($parts[0] == $t1) { $pl1 = $parts[1]; $alt1 = implode(" ",array_slice($parts,2)); } if ($parts[0] == $t2) { $pl2 = $parts[1]; $alt2 = implode(" ",array_slice($parts,2)); } } } else { $tim1 = "wiwsh.jpg"; $tim2 = "wiwb90.jpg"; } ?> <?= htmlspecialchars($pagedata[title]) ?>'); ?>
.html><?= $alt1 ?>.html><?= $alt2 ?>
spacer spacer
Your changes are saved ...

".nl2br(htmlspecialchars($amlog))."

\n"; } ?>
EDIT PAGE CONTENTS ...
title
content
owner id
email folks?
Agreement I agree to the /termsandconditions.html target=somewindow>posting conditions
 

Edit page


OPTIONS AVAILABLE TO YOU
You may follow links in the text to explore other topics.
Extra link - /index.php4>Return to the HomePage of this share system
Extra link - /.html>Refresh this page
Extra link - Edit this page

STATUS AND CONTROL
Please when completed
Enter name and password to


This is a page from Well House Consultant's shared information directory. Learn about our shared information system.
spacer

$googlerow
"); // Equivalent of % ginc % print ($seealso) ; print ($ctexts) ; if ($seealso or $ctexts or $googlerow) print ('
'); ?> WELL HOUSE CONSULTANTS LTD • 404, The Spa • Melksham, Wiltshire SN12 6QL • United Kingdom
PHONE: • FACSIMILE • EMAIL: info@wellho.net
You are currently on our . Change your country.") ; } else { print ("Visit worldwide site.") ; } ?>
Privacy and Copyright StatementTerms and Conditions
Updated • © Well House Consultants,

This is page $browser,$bvers f=$fontsize, c=$colourgroup v=6
$tracing"); ?>