Popular Searches:

""){ if ($scount<24){ echo "$row[1]
"; } $scount++; } } } function insertTopBlock($topLine, $subLine){ ?>


search
0){ //echo("start=$stpos
"); //echo("end=$enpos
"); //echo("raw=".substr($raw,$stpos,$enpos-$stpos)."
"); $raw=substr($raw,$stpos,$enpos-$stpos); //echo("raw=$raw
"); } $temp=$pg; //$temp=str_replace($raw,"",$temp); //echo("temp=$temp
"); $temp2=str_replace($raw,"",$temp); //echo("temp2=$temp2
"); if($temp2==""){ $temp2=$row2[5]; } $result = mysql_query("SELECT * FROM PAGEHits WHERE yr='$y' AND month='$m' AND dy='$d' AND PAGE='$temp2'"); $num_rows = mysql_num_rows($result); if($num_rows==0){ $sql="INSERT INTO PAGEHits (yr,month,hits,dy,PAGE ) VALUES('$y','$m',1,'$d','$temp2')"; $result2 = mysql_query($sql); }else{ $result = mysql_query("SELECT * FROM PAGEHits WHERE yr='$y' AND month='$m' AND dy='$d' AND PAGE='$temp2'"); $row=mysql_fetch_row($result); $curval=$row[3]; $curval=($curval+1); //echo("incremented is ".$curval); $query="UPDATE PAGEHits set yr='$y', month='$m', hits=$curval, dy='$d', PAGE='$temp2' WHERE id='$row[0]'"; $result=mysql_query($query); } //now log hosts //now deal with USER AGENT TRACKING $sql="CREATE TABLE HOSTHits (id INT AUTO_INCREMENT PRIMARY KEY, yr TEXT, month TEXT, hits INT)"; $result = mysql_query($sql); mysql_query("ALTER TABLE HOSTHits ADD dy TEXT"); mysql_query("ALTER TABLE HOSTHits ADD HOST TEXT"); $m=date("m"); $y=date("y"); $d=date("d"); $pg=$_SERVER['REMOTE_ADDR']; $result = mysql_query("SELECT * FROM HOSTHits WHERE yr='$y' AND month='$m' AND dy='$d' AND HOST='$pg'"); $num_rows = mysql_num_rows($result); if($num_rows==0){ $sql="INSERT INTO HOSTHits (yr,month,hits,dy,HOST ) VALUES('$y','$m',1,'$d','$pg')"; $result2 = mysql_query($sql); }else{ $result = mysql_query("SELECT * FROM HOSTHits WHERE yr='$y' AND month='$m' AND dy='$d' AND HOST='$pg'"); $row=mysql_fetch_row($result); $curval=$row[3]; $curval=($curval+1); //echo("incremented is ".$curval); $query="UPDATE HOSTHits set yr='$y', month='$m', hits=$curval, dy='$d', HOST='$pg' WHERE id='$row[0]'"; $result=mysql_query($query); } //finally look for where linked from $sql="CREATE TABLE REFHits (id INT AUTO_INCREMENT PRIMARY KEY, yr TEXT, month TEXT, hits INT)"; $result = mysql_query($sql); mysql_query("ALTER TABLE REFHits ADD dy TEXT"); mysql_query("ALTER TABLE REFHits ADD REF TEXT"); $m=date("m"); $y=date("y"); $d=date("d"); $pg=$_SERVER['HTTP_REFERER']; $stpos=strpos($pg,"crumb.sunderland.ac.uk/~admin/beta"); if($stpos==false){ //echo("$pg tracking $stpos"); $result = mysql_query("SELECT * FROM REFHits WHERE yr='$y' AND month='$m' AND dy='$d' AND REF='$pg'"); $num_rows = mysql_num_rows($result); if($num_rows==0){ $sql="INSERT INTO REFHits (yr,month,hits,dy,REF ) VALUES('$y','$m',1,'$d','$pg')"; $result2 = mysql_query($sql); }else{ $result = mysql_query("SELECT * FROM REFHits WHERE yr='$y' AND month='$m' AND dy='$d' AND REF='$pg'"); $row=mysql_fetch_row($result); $curval=$row[3]; $curval=($curval+1); //echo("incremented is ".$curval); $query="UPDATE REFHits set yr='$y', month='$m', hits=$curval, dy='$d', REF='$pg' WHERE id='$row[0]'"; $result=mysql_query($query); } } } } } function insertFinalSideMenu(){ if(1==1){ gatherInfo(); //page tracking ?> $row[5]){ ?> 9){ //this is generic items insert insertGenericMenuItems($row[5]); } if ($row[2]=="Interviews"){ insertInterviews(); } if ($row[2]=="Seminars"){ insertSeminars(); } if ($row[2]=="Links & Bibliographies"){ insertBibliographies(); } if ($row[2]=="CRUMB Outputs"){ insertBibliographies(); } //END OF OPEN SUBMENUS ?>
 
    "); ?> "); while ($row3=mysql_fetch_row($result3)) { $sublink=$sublink+1; // if ($row3[0]==$selItem){ //if ($row3[0]==$selItem){ if ($sublink==$_GET[sublink] && $_SESSION['noarrow']<>1){ echo(""); }else{ echo(""); } echo(""); getIntervieweeNoLink($row3[0]); echo(""); } echo""; } if ($row[2]=="Seminars"){ selectDatabase("CoreDatabase"); $selItem=$_GET[id]; $sql3="SELECT * FROM seminarTable ORDER BY Date"; $result3=mysql_query($sql3); $sublink=0; echo(""); while ($row3=mysql_fetch_row($result3)) { $sublink=$sublink+1; //if ($row3[0]==$selItem){ if (($sublink==$_GET[sublink] && $_SESSION['noarrow']<>1)){ echo(""); } echo("
    "); }else{ echo("
    "); } echo("$row3[2]
    "); } if ($row[2]==""){ $sql2="SELECT * FROM sideMenu where subLink='$row[5]' ORDER BY ordinal"; $result2=mysql_query($sql2); $sublink=0; while ($row2=mysql_fetch_row($result2)) { $sublink=$sublink+1; echo(""); if ($sublink==$_GET[sublink] && $_SESSION['noarrow']<>1){ echo(""); }else{ echo(""); } echo("$row2[1]"); } } echo(""); } } ?>  
  "); } if($type=="showExhibWorks"){ echo(""); global $link_id; $eID=$_GET[showExhib]; selectDatabase('CoreDatabase'); $SQL="SELECT * FROM exhibitionWorkLinks WHERE exhibition=$eID"; // echo($SQL); $result = mysql_query($SQL, $link_id); $row=mysql_fetch_row($result); $workCollection=$row[2]; // echo("
work collection=$workCollection"); $SQL="SELECT * FROM exhibitionWorkLinks WHERE exhibition=$eID"; // echo($SQL); $result = mysql_query($SQL, $link_id); $row=mysql_fetch_row($result); $workCollection=$row[2]; // echo("
work collection=$workCollection"); if ($workCollection<>""){ selectDatabase("AssetDatabase"); //echo("SELECT * FROM workCollectionTable WHERE id=$theseLinks"); $sql=mysql_query("SELECT * FROM workCollectionTable WHERE id=$workCollection"); while ($row = mysql_fetch_row($sql)) { $imString=$row[3]; } //echo("$imString
"); $imCount=1; //now go through imstring while(strLen($imString)>1){ $imString=subStr($imString, 1, strLen($imString)); //echo("
$imString"); $nextSlash=strPos($imString,"/"); $seekVal=subStr($imString, 0, ($nextSlash)); selectDatabase("CoreDatabase"); $result="SELECT * FROM workTable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query($result); $userow=mysql_fetch_row($sql); $linkDat=""; if($_GET[exD]==$userow[0]){ $linkDat=">$linkDat"; }else{ $linkDat="  $linkDat"; } $linkDat="$linkDat$userow[1]"; $thisWork=$userow[0]; //get artists selectDatabase("CoreDatabase"); $imagesSoFar=""; $imcountA=1; $getWorkNameSQLA="SELECT title from workTable where id='$thisWork'"; //echo ("semnamesql is $getWorkNameSQL"); $namresultsA=mysql_query($getWorkNameSQLA); $rowA=mysql_fetch_row($namresultsA); $artists=""; //echo("
Current artists links to the work '$row[0]'
"); $sqlPeop="SELECT * FROM worksArtistsLinks WHERE work='$thisWork'"; $peop=mysql_query($sqlPeop); $rowP=mysql_fetch_row($peop); $pid=$rowP[2]; selectDatabase("CoreDatabase"); $sqlA = mysql_query("SELECT * FROM peopleCollectionTable WHERE id=$pid"); if ($sqlA){ while ($rowA = mysql_fetch_row($sqlA)) { $imStringA=$rowA[3]; } //echo("
"); $imCountA=1; //now go through imstring while(strLen($imStringA)>1){ $imStringA=subStr($imStringA, 1, strLen($imStringA)); //echo("
$imString"); $nextSlashA=strPos($imStringA,"/"); $seekValA=subStr($imStringA, 0, ($nextSlashA)); selectDatabase("CoreDatabase"); $resultA="SELECT * FROM PeopleTable WHERE id='$seekValA'"; //echo($result); $sqlA=mysql_query($resultA); $userowA=mysql_fetch_row($sqlA); $linkDatA=$userowA[1]." ".$userowA[3]." ".$userowA[2]; $artists="$artists >>$linkDatA "; $imStringA=subStr($imStringA, $nextSlashA, strLen($imStringA)); $imCountA=$imCountA+1; } } //end getartists echo("$linkDat
"); $imString=subStr($imString, $nextSlash, strLen($imString)); $imCount=$imCount+1; $type="showExhibs"; } } echo("
"); } if($type=="showExhibs"){ global $link_id; echo(""); selectDatabase('CoreDatabase'); $result= mysql_query("SELECT * FROM exhibitionTable", $link_id); while ($row = mysql_fetch_row($result)) { if ($_GET[id]==$row[0]){ echo(">"); }else{ echo("  "); } echo("$row[2]
"); } echo("


"); } if($type=="isNewsItem"){ $months=array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); echo("


Recent Postings:

"); selectDatabase('CoreDatabase'); $SQL="SELECT * FROM newsDB WHERE visible='1' ORDER BY itemDate DESC"; $result=mysql_query($SQL); $firstRef=""; while($thisRow=mysql_fetch_row($result)){ if ($firstRef==""){ $firstRef=$thisRow[3]; } $authID=$row[1]; $title=$thisRow[2]; $date=$thisRow[3]; $y=substr($date,0,4); $m=substr($date,4,2); $d=substr($date,6,2); $m=$months[$m-1]; $abstract=$thisRow[4]; $detail=$thisRow[5]; echo(""); if ($thisRow[0]==$_GET[id]){ echo(">"); }else{ echo("  "); } echo(" $m $d, $y
"); } } if($type=="isNews"){ echo("




"); } if($type=="isPresentation"){ global $firstId; echo("


Other presentations from this seminar:
"); selectDatabase("CoreDatabase"); $query2="SELECT * FROM presentationCollectionTable WHERE presentationCollectionIDs LIKE '%/".$_GET[presID]."/%'"; //echo($query2); $result2= mysql_query($query2); while($row2 = mysql_fetch_row($result2)) { $firstId=$row2[0]; } $query="SELECT * FROM SeminarPresentationLinks WHERE presentationCollection='$firstId'"; //echo($query); $result = mysql_query($query); while($row = mysql_fetch_row($result)) { $semId=$row[1]; } global $link_id; selectDatabase("CoreDatabase"); $query="SELECT * FROM SeminarPresentationLinks WHERE Seminar=$semId"; //echo($query); $result = mysql_query($query, $link_id); while($row = mysql_fetch_row($result)) { $presColID=$row[2]; } if ($presColID<>""){ $query="SELECT * FROM SeminarPresentationLinks WHERE Seminar=$semId"; //echo($query); //echo("SELECT * FROM presentationCollectionTable WHERE id=$presColID"); $result = mysql_query("SELECT * FROM presentationCollectionTable WHERE id=$presColID"); while($row = mysql_fetch_row($result)) { $datString=$row[3]; } //echo($presLinks); //now go through links and create SQL Statment for getting presentation list: $SQLStr=""; $datCount=1; //now go through datString while(strLen($datString)>1){ $datString=subStr($datString, 1, strLen($datString)); //echo("
$datString"); $nextSlash=strPos($datString,"/"); $seekVal=subStr($datString, 0, ($nextSlash)); selectDatabase("CoreDatabase"); $result="SELECT * FROM presentationTable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query($result); $userow=mysql_fetch_row($sql); $userowIdRef=$userow[0]; $linkDat=$userow[1]." - ".$userow[2]."
"; if ($SQLStr<>""){ $SQLStr="$SQLStr OR "; } $SQLStr="$SQLStr id='$userow[0]'"; //echo("$datCount) $linkDat"); $datString=subStr($datString, $nextSlash, strLen($datString)); $datCount=$datCount+1; } if ($SQLStr<>""){ $SQLStr="$SQLStr ORDER BY evdate, startTime"; $SQLStr="SELECT * FROM presentationTable WHERE $SQLStr"; } //echo("hello $SQLStr

"); //now test the query $currentDate="NoDateSet"; $sql=mysql_query($SQLStr); while($row = mysql_fetch_row($sql)) { //echo($row[2]); global $curentStartTime; //echo("row 4 is $row[4]"); $currentStartTime=parseTime($row[4]); //echo("cs is $currentStartTime"); $currentTitle=$row[2]; $currentPresID=$row[0]; $thisDate=parseDate($row[3]); if ($currentDate<>$thisDate){ $months=array("January","February","March","April","May","June","July","August","September","October","November","December"); $m=substr($thisdate,3,2); $month=$months[$m]; $yr=substr($thisDate,6,4); $dy=substr($thisDate,0,2); echo("
$dy $month $yr

"); // THE NEXT BLOCK ADDS A SLOT FOR THE NEW DATE (left of table) $currentDate=$thisDate; ?> $currentDate");?> "); }else{ echo("  "); } echo(" $currentTitle"); ?>
> 1)){ //echo(""); // }else{ //echo(""); // } ?> 1)){ //echo(""); // }else{ //echo(""); // } ?> 1){ //echo(""); }else{ //echo(""); } $interviewHref="getInterviewDetail.php?id=$row3[0]&ts=".mktime()."&sublink=$sublink&op=".$_SESSION['open']; ?> CRUMB // "); echo(""); echo(""); } function dropStyle1(){ echo(""); } function dropStyle2(){ echo("STYLE='font-family : monospace; font-size : 5pt'"); } function dropStyle3(){ echo(""); } function dropStyleSearch(){ echo("STYLE='font-family : monospace; font-size : 7pt'"); } function setParticulars(){ useSess(); } function testLog(){ useSess(); $s=$_SESSION['isadmin']; if ($s!=1){ header("Location: notadmin.php?ts=".mkTime()); } } function redirectTo($strURL) { //echo("$strURL"); echo ""; } function selectDatabase($thisdbName){ global $link_id, $dbname, $debug; $debug=1; $site="crumbweb_crumb2"; $dbhost='5.254.160.166'; $dbusername='crumbweb'; // all privileges $dbuserpass='k469gVF2tn'; //$dbusername='admin'; // all privileges //$dbuserpass='management'; $dbname=$site.$thisdbName; $task=$_POST[task]; //echo($dbhost." ".$dbname); if($link_id) mysql_close($link_id); $link_id=mysql_connect ($dbhost, $dbusername, $dbuserpass); //echod ("
success in database connection - $thisdbName"); // create the database. //$dbname=$dbname; //echo("
dbname is $dbname"); if (!mysql_query("CREATE DATABASE $dbname")){ //echo ("Didn't create this time."); }else{ //echo "success in database creation."; } // select the specific database name we want to access. //echo($dbname); if (!mysql_select_db(strtolower($dbname), $link_id)) { echo("
cant select db"); //die(); } } function newImageCount($thisC){ selectDatabase("Prefs"); $query="UPDATE imagePrefs set imageCount='$thisC' WHERE id='1'"; // echo("QUERY IS $query"); mysql_query($query); } function newvideoCount($thisC){ selectDatabase("Prefs"); $query="UPDATE videoPrefs set videoCount='$thisC' WHERE id='1'"; // echo("QUERY IS $query"); mysql_query($query); } function getPeopleDropDown($selectThis){ //selectThis is a variable to identify which item in the list to select ?> "); global $embolden, $scanText; $embolden=array(); $datCount=1; //now go through ipeople ?> 1){ $datString=subStr($pc, 1, strLen($pc)); //echo("
$datString"); $nextSlash=strPos($datString,"/"); //echo("nextSlas=$nextSlash"); $seekVal=subStr($datString, 0, ($nextSlash)); //echo("s=$seekVal"); selectDatabase("CoreDatabase"); $result="SELECT * FROM peopletable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query(strtolower($result), $link_id); $userow=mysql_fetch_row($sql); $scanText=" $scanText $userow[1] $userow[2] $userow[1] $userow[3] $userow[2] "; $linkDat="
".$userow[1]." ".$userow[3]." ".$userow[2].""; $initials1=substr($userow[1],0,1); $initials2=substr($userow[2],0,1); $initials3=substr($userow[3],0,1); //echo("$initials1$initials3$initials2:"); if ($userow[3]==""){ array_push($embolden, "$userow[1] $userow[2]:"); array_push($embolden, "$initials1$initials2:"); }else{ array_push($embolden, "$userow[1] $userow[3] $userow[2]:"); array_push($embolden, "$initials1$initials3$initials2:"); } if ($datCount<>1){ echo(" & "); } //echo("
$linkDat"); ?> 2){ ?> "); global $embolden, $scanText; $embolden=array(); $datCount=1; //now go through ipeople ?> 1){ $datString=subStr($pc, 1, strLen($pc)); //echo("
$datString"); $nextSlash=strPos($datString,"/"); //echo("nextSlas=$nextSlash"); $seekVal=subStr($datString, 0, ($nextSlash)); //echo("s=$seekVal"); selectDatabase("CoreDatabase"); $result="SELECT * FROM peopletable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query($result); $userow=mysql_fetch_row($sql); $scanText=" $scanText $userow[1] $userow[2] $userow[1] $userow[3] $userow[2] "; $linkDat=$userow[1]." ".$userow[3]." ".$userow[2]; $initials1=substr($userow[1],0,1); $initials2=substr($userow[2],0,1); $initials3=substr($userow[3],0,1); //echo("$initials1$initials3$initials2:"); if ($userow[3]==""){ array_push($embolden, "$userow[1] $userow[2]:"); array_push($embolden, "$initials1$initials2:"); }else{ array_push($embolden, "$userow[1] $userow[3] $userow[2]:"); array_push($embolden, "$initials1$initials3$initials2:"); } if ($datCount<>1){ echo(" & "); } //echo("
$linkDat"); ?>
2){ ?> "); global $embolden, $scanText; $embolden=array(); $datCount=1; //now go through ipeople while(strLen($pc)>1){ $datString=subStr($pc, 1, strLen($pc)); //echo("
$datString"); $nextSlash=strPos($datString,"/"); //echo("nextSlas=$nextSlash"); $seekVal=subStr($datString, 0, ($nextSlash)); //echo("s=$seekVal"); selectDatabase("CoreDatabase"); $result="SELECT * FROM peopletable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query($result); $userow=mysql_fetch_row($sql); $scanText=" $scanText $userow[1] $userow[2] $userow[1] $userow[3] $userow[2] "; $linkDat=$userow[1]." ".$userow[3]." ".$userow[2]; $initials1=substr($userow[1],0,1); $initials2=substr($userow[2],0,1); $initials3=substr($userow[3],0,1); //echo("$initials1$initials3$initials2:"); if ($userow[3]==""){ array_push($embolden, "$userow[1] $userow[2]:"); array_push($embolden, "$initials1$initials2:"); }else{ array_push($embolden, "$userow[1] $userow[3] $userow[2]:"); array_push($embolden, "$initials1$initials3$initials2:"); } if ($datCount<>1){ echo(" & "); } //echo("
$linkDat"); ?> 2){ ?> "); global $embolden, $scanText; $embolden=array(); $datCount=1; //now go through ipeople ?> 1){ $datString=subStr($pc, 1, strLen($pc)); //echo("
$datString"); $nextSlash=strPos($datString,"/"); //echo("nextSlas=$nextSlash"); $seekVal=subStr($datString, 0, ($nextSlash)); //echo("s=$seekVal"); selectDatabase("CoreDatabase"); $result="SELECT * FROM peopletable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query(strtolower($result), $link_id); $userow=mysql_fetch_row($sql); $scanText=" $scanText $userow[1] $userow[2] $userow[1] $userow[3] $userow[2] "; $linkDat=$userow[1]." ".$userow[3]." ".$userow[2]; $initials1=substr($userow[1],0,1); $initials2=substr($userow[2],0,1); $initials3=substr($userow[3],0,1); //echo("$initials1$initials3$initials2:"); if ($userow[3]==""){ array_push($embolden, "$userow[1] $userow[2]:"); array_push($embolden, "$initials1$initials2:"); }else{ array_push($embolden, "$userow[1] $userow[3] $userow[2]:"); array_push($embolden, "$initials1$initials3$initials2:"); } if ($datCount<>1){ echo(" & "); } //echo("
$linkDat"); ?> 2){ ?> "); global $embolden, $scanText; $embolden=array(); $datCount=1; //now go through imstring while(strLen($pc)>1){ $datString=subStr($pc, 1, strLen($pc)); //echo("
$datString"); $nextSlash=strPos($datString,"/"); //echo("nextSlas=$nextSlash"); $seekVal=subStr($datString, 0, ($nextSlash)); //echo("s=$seekVal"); selectDatabase("CoreDatabase"); $result="SELECT * FROM peopletable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query($result); $userow=mysql_fetch_row($sql); $scanText="$scanText $userow[1] $userow[2] $userow[1] $userow[3] $userow[2] "; $linkDat=$userow[1]." ".$userow[3]." ".$userow[2]; $initials1=substr($userow[1],0,1); $initials2=substr($userow[2],0,1); $initials3=substr($userow[3],0,1); //echo("$initials1$initials3$initials2:"); if ($userow[3]==""){ array_push($embolden, "$userow[1] $userow[2]:"); array_push($embolden, "$initials1$initials2:"); }else{ array_push($embolden, "$userow[1] $userow[3] $userow[2]:"); array_push($embolden, "$initials1$initials3$initials2:"); } $scanText="$scanText $initials1 $initials2 $initials3 "; if ($datCount<>1){ //echo("
"); } //echo("$linkDat"); $pc=subStr($pc, $nextSlash+1, strLen($pc)); $datCount=$datCount+1; } } function getImageCollectionDropDown(){ ?>
"); //$sql = mysql_query("DROP TABLE imageDatabase"); while ($row = mysql_fetch_row($sql)) { //echo "
ID:$row[0]
Date: $row[1]
Title: $row[2]
Abstract: $row[3]


"; if ($row[1]<>""){ echo(""); } } echo(""); } function getPresentationCollections(){ //Now get the drop down for presentation collections global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("CoreDatabase"); $sql = mysql_query("SELECT * FROM presentationCollectionTable"); echo(""); } function getEveningEventCollections(){ //Now get the drop down for presentation collections global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("CoreDatabase"); $sql = mysql_query("SELECT * FROM eventCollectionTable"); echo(""); } function getLInks(){ //Now get the drop down for link collections global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("AssetDatabase"); $sql = mysql_query("SELECT * FROM linkCollectionTable ORDER BY linkCollectionName"); echo(""); } function getDocuments(){ //Now get the drop down for link collections global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("AssetDatabase"); $sql = mysql_query("SELECT * FROM documentTable"); echo(""); } function getWork(){ //Now get the drop down for link collections global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("AssetDatabase"); $sql = mysql_query("SELECT * FROM workCollectionTable"); echo(""); } function getWorks(){ //Now get the drop down for link collections global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("AssetDatabase"); $sql = mysql_query("SELECT * FROM workCollectionTable"); echo(""); } function getMetaLInks(){ //Now get the drop down for link collections global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("AssetDatabase"); $sql = mysql_query("SELECT * FROM metaLinkCollectionTable"); echo(""); } function getPresentationLInks(){ //Now get the drop down for images global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("CoreDatabase"); $sql = mysql_query("SELECT * FROM presentationCollectionTable"); echo(""); } function getEveningEventLInks(){ //Now get the drop down for images global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("CoreDatabase"); $sql = mysql_query("SELECT * FROM eventCollectionTable"); echo(""); } function getPeopleCollection(){ //Now get the drop down for images global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("CoreDatabase"); $sql = mysql_query("SELECT * FROM peopleCollectionTable ORDER BY peopleCollectionName"); echo(""); } function getAllLInks(){ //Now get the drop down for links global $link_id, $dbname, $debug; $task=$_POST[task]; selectDatabase("AssetDatabase"); $sql = mysql_query("SELECT * FROM linkTable"); echo(""); } function testQuery($thisDB, $thisQuery){ global $countVal, $link_id, $summary; //echo($thisDB); selectDatabase($thisDB); $retVal="F"; //echo($thisQuery); $result=mySql_query(($thisQuery),$link_id); while($row9=mysql_fetch_row($result)){ $countVal=$row9[0]; if ($row9[0]!=0){ $retVal="T"; //echo($thisContentQuery); } } //echo($thisQuery." ".$retVal); return($retVal); } function testQuery2($thisDB, $thisQuery, $thisContentQuery, $thisType){ global $countVal, $link_id, $summary, $showFull, $firstFlag; //echo($thisDB); selectDatabase($thisDB); $retVal="F"; //echo($thisQuery); $result=mySql_query($thisQuery); while($row9=mysql_fetch_row($result)){ $countVal=$row9[0]; if ($row9[0]!=0){ $retVal="T"; //echo($thisContentQuery); $contentResult=mySql_query($thisContentQuery); $contCount=0; while($row10=mysql_fetch_row($contentResult) AND $contCount<4){ //echo($row10[0]); //$summary="$summary $row10[1]
"; //echo("thistype=$thisType"); if ($thisType<>$lastType){ $lastType=$thisType; if ($row9[0]>0){ if (1==1){ //$summary="$summary"; //$summary if ($showFull<>""){ //$summary="$summary"; $summary="$summary$showFull"; } $showType=$thisType; if($thisType=="bio"){$showType="Profiles";} if($thisType=="interviews"){$showType="Interviews";} if($thisType=="presentations"){$showType="Presentations";} if($thisType=="images"){$showType="Images";} if($thisType=="video"){$showType="Videos";} if($thisType=="downloads"){$showType="Downloads";} if($thisType=="links"){$showType="Links";} if($thisType=="discussion"){$showType="Discussion List Postings";} $summary="$summary
$showType
"; //$summary="$summary
$showFull
$thisType
"; //$summary=""; }else{ $summary="$summary
"; $firstFlag="notfirst"; } $showFull=""; //$summary2=str_replace("

4){ $showFull="More... [List all $row9[0] images]



"; } } if ($thisType=="video"){ $summary="$summaryVideo: $row10[1]




"; if ($row9[0]>4){ $showFull="More... [List all $row9[0] videos]



"; } } if ($thisType=="sound"){ $summary="$summarySound: $row10[2]
"; if ($row9[0]>4){ $showFull="More... [List all $row9[0] sounds



"; } } if ($thisType=="links"){ $summary="$summaryLinks: $row10[1]
"; $cont=getSearchContext($row10[1]." ".$row10[2]." ".$row10[3]." ".$row10[4]); if($cont<>""){ $summary="$summary
$cont"; } if ($row9[0]>4){ $showFull="More... [List all $row9[0] links]



"; } } if ($thisType=="interviews"){ $summary="$summaryInterview: $row10[1]"; $cont=getSearchContext($row10[5]." ".$row10[4]." ".$row10[1]); if($cont<>""){ $summary="$summary
$cont"; } if ($row9[0]>4){ $showFull="More... [List all $row9[0] interviews]



"; } } if ($thisType=="presentations"){ $summary="$summaryPresentation: $row10[2]"; $cont=getSearchContext($row10[7]." ".$row10[6]." ".$row10[1]); if($cont<>""){ $summary="$summary
$cont"; } if ($row9[0]>4){ $showFull="More... [List all $row9[0] presentations]



"; } } if ($thisType=="downloads"){ $cont=getSearchContext($row10[1]." ".$row10[2]." ".$row10[4]); $summary="$summaryDownload: $row10[1]"; if($cont<>""){ $summary="$summary
$cont"; } if ($row9[0]>4){ $showFull="More... [List all $row9[0] downloads]



"; } } if ($thisType=="bio"){ //echo("got one"); $summary="$summaryProfile: $row10[1] $row10[3] $row10[2]"; $cont=getSearchContext($row10[7]." ".$row10[6]); if ($row9[0]>4){ $showFull="More... [List all $row9[0] profiles]



"; } if($cont<>""){ $summary="$summary
$cont"; } } if ($thisType=="discussion"){ //echo("got one"); if ($row9[0]>4){ //$showFull="More... [List all $row9[0] discussion items]"; } $m=urlDecode($row10[5]); $m2=str_replace(" > ", " ",$m); $m=$m2; //echo($m); //get list extract $startTerm=strpos($m,$searchTerm); $origPlace=$startTerm; $startTerm=$startTerm-20; $startTerm2=$startTerm; if($startTerm<1){ $startTerm2=1; } $startTerm2=strpos($m," ",$startTerm2); $endTerm=strpos($m,". ",$origPlace); //echo(" $searchTerm $startTerm $endTerm "); $context=substr($m,$startTerm2, $endTerm-$startTerm2); $context2=$context; //$startTerm2=strpos($context2," ",$startTerm2); //$endTerm=strpos($context2,". ",$origPlace); if (strpos($context2, "

")>0){ $startBody=strpos($context2, "

")+3; //echo("startbody= $startBody"); $context2=substr($context2,$startBody); //$context2=strip_tags(substr($context2,$startBody)); } $lowerSearch=strtolower($searchTerm); $lowerSearchNOSP=strtolower($searchTermNOSP); $context3=str_replace("$searchTerm", "$searchTerm",$context2); $context4=str_replace("$lowerSearch", "$lowerSearch",$context3); $context5=str_replace("$searchTermNOSP,", "$searchTermNOSP,",$context4); $context6=str_replace("$lowerSearchNOSP,", " $lowerSearchNOSP,",$context5); $context7=str_replace("$searchTermNOSP.", " $searchTermNOSP.",$context6); $context8=str_replace("$lowerSearchNOSP.", " $lowerSearchNOSP.",$context7); $context4=strip_tags($context8); $fromSubs=strpos ($m,''); $fromSube=strpos ($m,'
',$fromSubs+1); $fromSubBlock=substr($m,$fromSubs, $fromSube-$fromSubs); $fromSubBlock=str_replace(''); $subend=strpos($m,'
',($substart+1)); $subject=substr($m,$substart, $subend-$substart); $subs2=strpos($subject,'')+28; $subj2=substr($subject,$subs2); $subj2=str_replace('">
','', $subj2); //echo($subj2); $subs3=strpos($subj2,'">')+2; //echo($subs3); $subj3=substr($subj2,$subs3); //echo(""); $fullBlock="
List Posting: $subj3
$fromSubBlock

".chr(13); $fullBlock2=str_replace('', "",$fullBlock); $fullBlock3=str_replace('', "", $fullBlock2); $summary="$summary $fullBlock3"; $context5=str_replace("
", " ",$context4); if (strLen($context5)>220){ $context5=subStr($context5,1,220); } $summary="$summary...$context5...



"; //$summary="$summary Discussion: $row10[1] $row10[3] $row10[2]
"; } //$summary="$summary .linkArrow { font-family: Ariel, Helivetica, sans-serif; font-size: 9px; color: #444444;} .style1 { font-family: Ariel, Helivetica, sans-serif; font-size: 11px; color: #111111;} .seminarTitle { font-family: Ariel, Helivetica, sans-serif; font-size: 11px; color: #111111;} .seminarAbstract { font-family: Ariel, Helivetica, sans-serif; font-size: 11px; color: #111111;} .presentationTimes { font-family: Ariel, Helivetica, sans-serif; font-size: 11px; color: #111111;} .presentationTitle { font-family: Ariel, Helivetica, sans-serif; font-size: 11px; color: #111111;} .presentationDate { font-family: Ariel, Helivetica, sans-serif; font-size: 11px; color: #111111;} .speakerInfo { font-family: Ariel, Helivetica, sans-serif; font-size: 11px; color: #111111;} .presentationDetailTitle { font-family: Ariel, Helivetica, sans-serif; font-size: 11px; color: #111111;} .presentationDetailAbstract { font-family: Ariel, Helivetica, sans-serif; font-size: 10px; color: #111111;} .presentationDetailSpeakers { font-family: Ariel, Helivetica, sans-serif; font-size: 10px; color: #111111;} .presentationDetailBody { font-family: Ariel, Helivetica, sans-serif; font-size: 10px; color: #111111;} a:link { text-decoration: none; color: #111111; } a:visited { text-decoration: none; color: #111111; } a:hover { text-decoration: none; color: #333333; } a:active { text-decoration: none; color: #111111; } "" && $_GET[fromSearch]<>1){ $_SESSION['open']=$_GET[op]; //work out which menu item should be open $_SESSION['noarrow']=2; }else{ //$_SESSION['noarrow']=0; if ($_SESSION['noarrow']>=1){ $_SESSION['noarrow']=$_SESSION['noarrow']-1; } } if ($_GET[fromSearch]==1 && $_SESSION['searchFlag']<=0){ $_SESSION['noarrow']=0; $_SESSION['open']=$_GET[op]; $_SESSION['searchFlag']=2; }else{ $_SESSION['searchFlag']=$_SESSION['searchFlag']-1; } // echo("no arrow=".$_SESSION['noarrow']." sf=".$_SESSION['searchFlag']); $first=1; selectDatabase("CoreDatabase"); $sql="SELECT * FROM sideMenu where subLink='-1' ORDER BY ordinal"; $result=mysql_query($sql); $mainCount=0; while ($row=mysql_fetch_row($result)) { //echo("!$row[1]"); $href=$row[2]; $mainCount=$mainCount+1; $href="crumbFramework.php?op=$row[5]&sublink=-1"; if ($_SESSION['open']==$row[5]){ if ($first<>1){ echo("
"); } } $first=0; echo("$row[1]
"); if ($_SESSION['open']==$row[5]){ ?>

1){ echo(""); }else{ echo(""); } if($row2[2]=="http://www.jiscmail.ac.uk/lists/new-media-curating.html"){ echo("$row2[1]
"); }else{ echo("$row2[1]
"); } } } if ($row[2]=="Seminars"){ selectDatabase("CoreDatabase"); $selItem=$_GET[id]; $sql3="SELECT * FROM seminarTable ORDER BY Date"; $result3=mysql_query($sql3); $sublink=0; while ($row3=mysql_fetch_row($result3)) { $sublink=$sublink+1; //if ($row3[0]==$selItem){ if (($sublink==$_GET[sublink] && $_SESSION['noarrow']<>1)){ echo(""); }else{ echo(""); } echo("$row3[2]
"); } } if ($row[2]=="Interviews"){ selectDatabase("CoreDatabase"); $selItem=$_GET[id]; $sql3="SELECT * FROM interviewcontent ORDER BY date"; $result3=mysql_query($sql3); $sublink=0; echo(""); while ($row3=mysql_fetch_row($result3)) { $sublink=$sublink+1; // if ($row3[0]==$selItem){ //if ($row3[0]==$selItem){ if ($sublink==$_GET[sublink] && $_SESSION['noarrow']<>1){ echo(""); } echo"
"); }else{ echo("
"); } echo(""); getIntervieweeNoLink($row3[0]); echo("
"; } ?>
"); } } echo("
Advanced Search"); echo("type=$type"); if($type=="isExhibWork"){ echo("


Other Works:
"); echo(""); $eID=$_GET[showExhib]; selectDatabase('CoreDatabase'); $SQL="SELECT * FROM exhibitionWorkLinks WHERE exhibition=$eID"; // echo($SQL); $result = mysql_query($SQL, $link_id); $row=mysql_fetch_row($result); $workCollection=$row[2]; // echo("
work collection=$workCollection"); $SQL="SELECT * FROM exhibitionWorkLinks WHERE exhibition=$eID"; // echo($SQL); $result = mysql_query($SQL, $link_id); $row=mysql_fetch_row($result); $workCollection=$row[2]; // echo("
work collection=$workCollection"); if ($workCollection<>""){ selectDatabase("AssetDatabase"); //echo("SELECT * FROM workCollectionTable WHERE id=$theseLinks"); $sql=mysql_query("SELECT * FROM workCollectionTable WHERE id=$workCollection"); while ($row = mysql_fetch_row($sql)) { $imString=$row[3]; } //echo("$imString
"); $imCount=1; //now go through imstring while(strLen($imString)>1){ $imString=subStr($imString, 1, strLen($imString)); //echo("
$imString"); $nextSlash=strPos($imString,"/"); $seekVal=subStr($imString, 0, ($nextSlash)); selectDatabase("CoreDatabase"); $result="SELECT * FROM workTable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query($result); $userow=mysql_fetch_row($sql); $linkDat="$userow[1]"; $thisWork=$userow[0]; //get artists selectDatabase("CoreDatabase"); $imagesSoFar=""; $imcountA=1; $getWorkNameSQLA="SELECT title from workTable where id='$thisWork'"; //echo ("semnamesql is $getWorkNameSQL"); $namresultsA=mysql_query($getWorkNameSQLA); $rowA=mysql_fetch_row($namresultsA); $artists=""; //echo("
Current artists links to the work '$row[0]'
"); $sqlPeop="SELECT * FROM worksArtistsLinks WHERE work='$thisWork'"; $peop=mysql_query($sqlPeop); $rowP=mysql_fetch_row($peop); $pid=$rowP[2]; selectDatabase("CoreDatabase"); $sqlA = mysql_query("SELECT * FROM peopleCollectionTable WHERE id=$pid"); if ($sqlA){ while ($rowA = mysql_fetch_row($sqlA)) { $imStringA=$rowA[3]; } //echo("
"); $imCountA=1; //now go through imstring while(strLen($imStringA)>1){ $imStringA=subStr($imStringA, 1, strLen($imStringA)); //echo("
$imString"); $nextSlashA=strPos($imStringA,"/"); $seekValA=subStr($imStringA, 0, ($nextSlashA)); selectDatabase("CoreDatabase"); $resultA="SELECT * FROM PeopleTable WHERE id='$seekValA'"; //echo($result); $sqlA=mysql_query($resultA); $userowA=mysql_fetch_row($sqlA); $linkDatA=$userowA[1]." ".$userowA[3]." ".$userowA[2]; $artists="$artists >$linkDatA "; $imStringA=subStr($imStringA, $nextSlashA, strLen($imStringA)); $imCountA=$imCountA+1; } } //end getartists echo(""); $imString=subStr($imString, $nextSlash, strLen($imString)); $imCount=$imCount+1; } } ?> "); //added for exhibition } if($type=="showExhibWorks"){ echo("


All works in this exhibition:

"); global $link_id; $eID=$_GET[showExhib]; selectDatabase('CoreDatabase'); $SQL="SELECT * FROM exhibitionWorkLinks WHERE exhibition=$eID"; // echo($SQL); $result = mysql_query($SQL, $link_id); $row=mysql_fetch_row($result); $workCollection=$row[2]; // echo("
work collection=$workCollection"); $SQL="SELECT * FROM exhibitionWorkLinks WHERE exhibition=$eID"; // echo($SQL); $result = mysql_query($SQL, $link_id); $row=mysql_fetch_row($result); $workCollection=$row[2]; // echo("
work collection=$workCollection"); if ($workCollection<>""){ selectDatabase("AssetDatabase"); //echo("SELECT * FROM workCollectionTable WHERE id=$theseLinks"); $sql=mysql_query("SELECT * FROM workCollectionTable WHERE id=$workCollection"); while ($row = mysql_fetch_row($sql)) { $imString=$row[3]; } //echo("$imString
"); $imCount=1; //now go through imstring while(strLen($imString)>1){ $imString=subStr($imString, 1, strLen($imString)); //echo("
$imString"); $nextSlash=strPos($imString,"/"); $seekVal=subStr($imString, 0, ($nextSlash)); selectDatabase("CoreDatabase"); $result="SELECT * FROM workTable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query($result); $userow=mysql_fetch_row($sql); $linkDat=""; if($_GET[exD]==$userow[0]){ $linkDat="$linkDat>"; }else{ $linkDat="$linkDat  "; } $linkDat="$linkDat$userow[1]"; $thisWork=$userow[0]; //get artists selectDatabase("CoreDatabase"); $imagesSoFar=""; $imcountA=1; $getWorkNameSQLA="SELECT title from workTable where id='$thisWork'"; //echo ("semnamesql is $getWorkNameSQL"); $namresultsA=mysql_query($getWorkNameSQLA); $rowA=mysql_fetch_row($namresultsA); $artists=""; //echo("
Current artists links to the work '$row[0]'
"); $sqlPeop="SELECT * FROM worksArtistsLinks WHERE work='$thisWork'"; $peop=mysql_query($sqlPeop); $rowP=mysql_fetch_row($peop); $pid=$rowP[2]; selectDatabase("CoreDatabase"); $sqlA = mysql_query("SELECT * FROM peopleCollectionTable WHERE id=$pid"); if ($sqlA){ while ($rowA = mysql_fetch_row($sqlA)) { $imStringA=$rowA[3]; } //echo("
"); $imCountA=1; //now go through imstring while(strLen($imStringA)>1){ $imStringA=subStr($imStringA, 1, strLen($imStringA)); //echo("
$imString"); $nextSlashA=strPos($imStringA,"/"); $seekValA=subStr($imStringA, 0, ($nextSlashA)); selectDatabase("CoreDatabase"); $resultA="SELECT * FROM PeopleTable WHERE id='$seekValA'"; //echo($result); $sqlA=mysql_query($resultA); $userowA=mysql_fetch_row($sqlA); $linkDatA=$userowA[1]." ".$userowA[3]." ".$userowA[2]; $artists="$artists >$linkDatA "; $imStringA=subStr($imStringA, $nextSlashA, strLen($imStringA)); $imCountA=$imCountA+1; } } //end getartists echo("$linkDat
"); $imString=subStr($imString, $nextSlash, strLen($imString)); $imCount=$imCount+1; } } } if($type=="showExhibs"){ global $link_id; echo("


All exhibitions:

"); selectDatabase('CoreDatabase'); $result= mysql_query("SELECT * FROM exhibitionTable", $link_id); while ($row = mysql_fetch_row($result)) { echo(""); if ($_GET[id]==$row[0]){ echo(">"); }else{ echo("  "); } echo("$row[2]
"); } } if($type=="isNewsItem"){ $months=array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); echo("


Recent Postings:

"); selectDatabase('CoreDatabase'); $SQL="SELECT * FROM newsDB WHERE visible='1' ORDER BY itemDate DESC"; $result=mysql_query($SQL); $firstRef=""; while($thisRow=mysql_fetch_row($result)){ if ($firstRef==""){ $firstRef=$thisRow[3]; } $authID=$row[1]; $title=$thisRow[2]; $date=$thisRow[3]; $y=substr($date,0,4); $m=substr($date,4,2); $d=substr($date,6,2); $m=$months[$m-1]; $abstract=$thisRow[4]; $detail=$thisRow[5]; echo(""); if ($thisRow[0]==$_GET[id]){ echo(">"); }else{ echo("  "); } echo(" $m $d, $y
"); } } if($type=="isPresentation"){ global $firstId; echo("


Other presentations from this seminar:
"); selectDatabase("CoreDatabase"); $query2="SELECT * FROM presentationCollectionTable WHERE presentationCollectionIDs LIKE '%/".$_GET[presID]."/%'"; //echo($query2); $result2= mysql_query($query2); while($row2 = mysql_fetch_row($result2)) { $firstId=$row2[0]; } $query="SELECT * FROM SeminarPresentationLinks WHERE presentationCollection='$firstId'"; //echo($query); $result = mysql_query($query); while($row = mysql_fetch_row($result)) { $semId=$row[1]; } global $link_id; selectDatabase("CoreDatabase"); $query="SELECT * FROM SeminarPresentationLinks WHERE Seminar=$semId"; //echo($query); $result = mysql_query($query, $link_id); while($row = mysql_fetch_row($result)) { $presColID=$row[2]; } if ($presColID<>""){ $query="SELECT * FROM SeminarPresentationLinks WHERE Seminar=$semId"; //echo($query); //echo("SELECT * FROM presentationCollectionTable WHERE id=$presColID"); $result = mysql_query("SELECT * FROM presentationCollectionTable WHERE id=$presColID"); while($row = mysql_fetch_row($result)) { $datString=$row[3]; } //echo($presLinks); //now go through links and create SQL Statment for getting presentation list: $SQLStr=""; $datCount=1; //now go through datString while(strLen($datString)>1){ $datString=subStr($datString, 1, strLen($datString)); //echo("
$datString"); $nextSlash=strPos($datString,"/"); $seekVal=subStr($datString, 0, ($nextSlash)); selectDatabase("CoreDatabase"); $result="SELECT * FROM presentationTable WHERE id='$seekVal'"; //echo($result); $sql=mysql_query($result); $userow=mysql_fetch_row($sql); $userowIdRef=$userow[0]; $linkDat=$userow[1]." - ".$userow[2]."
"; if ($SQLStr<>""){ $SQLStr="$SQLStr OR "; } $SQLStr="$SQLStr id='$userow[0]'"; //echo("$datCount) $linkDat"); $datString=subStr($datString, $nextSlash, strLen($datString)); $datCount=$datCount+1; } if ($SQLStr<>""){ $SQLStr="$SQLStr ORDER BY evdate, startTime"; $SQLStr="SELECT * FROM presentationTable WHERE $SQLStr"; } //echo("hello $SQLStr

"); //now test the query $currentDate="NoDateSet"; $sql=mysql_query($SQLStr); while($row = mysql_fetch_row($sql)) { //echo($row[2]); global $curentStartTime; //echo("row 4 is $row[4]"); $currentStartTime=parseTime($row[4]); //echo("cs is $currentStartTime"); $currentTitle=$row[2]; $currentPresID=$row[0]; $thisDate=parseDate($row[3]); if ($currentDate<>$thisDate){ $months=array("January","February","March","April","May","June","July","August","September","October","November","December"); $m=substr($thisdate,3,2); $month=$months[$m]; $yr=substr($thisDate,6,4); $dy=substr($thisDate,0,2); echo("
$dy $month $yr

"); // THE NEXT BLOCK ADDS A SLOT FOR THE NEW DATE (left of table) $currentDate=$thisDate; ?> $currentDate");?> "); }else{ echo("  "); } echo(" $currentTitle"); ?>
$imCount) $linkDat $artists
"); if (strpos ($thisText, $nameSeek)>-1 ||strpos ($thisText, $nameSeek2)>-1){ $nameList="$nameList
$nameSeek2"; } } if ($nameList<>""){ echo("

>People:$nameList
"); } } function scanforPeopleStyled($thisText){ global $nameList, $link_id; selectDatabase('CoreDatabase'); $sql="SELECT * FROM peopleTable"; $result=mysql_query(strtolower($sql), $link_id); $nameList=""; while($thisrow=mysql_fetch_row($result)){ $nameSeek="$thisrow[1] $thisrow[2]"; $nameSeek2=$thisrow[1]." ".$thisrow[3]." ".$thisrow[2]; //echo("$nameSeek = ".strpos ($thisText, $nameSeek)." ".strpos ($thisText, $nameSeek2)."
"); if (strpos ($thisText, $nameSeek)>-1 ||strpos ($thisText, $nameSeek2)>-1){ $nameList="$nameList  $nameSeek2
"; } } if ($nameList<>""){ ?>

People:

"); if (strpos ($thisText, $nameSeek)>-1 ||strpos ($thisText, $nameSeek2)>-1){ $nameList="$nameList >$nameSeek2"; $scanText=" $scanText $nameSeek2 "; } } if ($nameList<>""){ echo("


Related People:$nameList
"); } } function scanforTheory($thisText){ global $nameList, $scanText, $link_id; selectDatabase('CoreDatabase'); $sql="SELECT * FROM lexicontable WHERE lextype<>'person'"; //echo($sql); $result=mysql_query(strtolower($sql),$link_id); //echo("$result"); $nameList=""; while($thisrow=mysql_fetch_row($result)){ $nameSeek="$thisrow[1]"; $nameSeek2="$thisrow[1]"; //echo($nameSeek); //echo("$nameSeek = ".strpos ($thisText, $nameSeek)." ".strpos ($thisText, $nameSeek2)."
"); if (strpos ($thisText, $nameSeek)>-1 ||strpos ($thisText, $nameSeek2)>-1){ $nameList="$nameList
$nameSeek2"; $scanText=" $scanText $nameSeek2 "; } } if ($nameList<>""){ echo("

>Keywords:$nameList
"); } } function scanforTheoryStyled($thisText){ //echo($thisText); global $nameList, $link_id; selectDatabase('CoreDatabase'); $sql="SELECT * FROM lexicontable WHERE lextype<>'person'"; $result=mysql_query(strtolower($sql), $link_id); $nameList=""; while($thisrow=mysql_fetch_row($result)){ $nameSeek="$thisrow[1]"; $nameSeek2=$thisrow[1]; //echo("$nameSeek"); //echo("$nameSeek = ".strpos ($thisText, $nameSeek)." ".strpos ($thisText, $nameSeek2)."
"); if (strpos ($thisText, $nameSeek)>-1 ||strpos ($thisText, $nameSeek2)>-1){ $nameList="$nameList  $nameSeek2
"; } } if ($nameList<>""){ ?> Keywords:

'person'"; //echo($sql); $result=mysql_query($sql); //echo("$result"); $nameList=""; while($thisrow=mysql_fetch_row($result)){ $nameSeek="$thisrow[1]"; $nameSeek2="$thisrow[1]"; //echo($nameSeek); //echo("$nameSeek = ".strpos ($thisText, $nameSeek)." ".strpos ($thisText, $nameSeek2)."
"); if (strpos ($thisText, $nameSeek)>-1 ||strpos ($thisText, $nameSeek2)>-1){ $nameList="$nameList >$nameSeek2"; $scanText=" $scanText $nameSeek2 "; } } if ($nameList<>""){ echo("

Related Keywords:$nameList
"); } } function scanForSearchTerms($thisText){ global $abstract, $overviewCreds, $work, $artist; selectDatabase("CoreDatabase"); //echo("SELECT * FROM popularSearches WHERE phrase='$nam'"); $excludes=" a b c d e f g h i j k l m n o p q r s t u v w x y z he she it they we my your the them is us test "; $sql = mysql_query("SELECT * FROM popularSearches ORDER BY frequency"); $keywords=""; //echo("hello"); while($row=mysql_fetch_row($sql)){ //echo("seeking $row[1]"); $term=$row[1]; $term=trim($term); str_replace("%20"," ",$term); str_replace(" "," ",$term); //$biography=str_replace($work,"$work",$biography); $t1=strtoupper(substr($term,0,1)).strtolower(substr($term,1)); //echo("t1=$t1"); //$term=trim($term); //echo("term is $term :".$work." ".$artist." ".$overviewCreds); if ($term<>""){ if ((strpos (" ".$thisText." ", $term)>0) or (strpos (" ".$thisText." ", $t1)>0)){ if ((strpos ($excludes, $term)<1) and ($term<>"")){ //echo("found one"); $keywords="$keywords > ".strtolower($row[1])." "; } } } } if ($keywords<>""){ echo("
Related user searches: $keywords
"); } } function getSearchContext($thisString){ global $searchTerm, $searchTermNOSP; $out=""; $m=$thisString; //echo("searching for $thisString"); //$m1=str_replace("
", " ",$m); $m2=str_replace(" > ", " ",$m); $m=$m2; $startTerm=strpos($m,$searchTerm); $origPlace=$startTerm; $startTerm=$startTerm-20; $startTerm2=$startTerm; if($startTerm<1){ $startTerm2=1; } $startTerm2=strpos($m," ",$startTerm2); $endTerm=strpos($m,". ",$origPlace); //echo(" $searchTerm $startTerm $endTerm "); $context=substr($m,$startTerm2, $endTerm-$startTerm2); $context2=$context; //$startTerm2=strpos($context2," ",$startTerm2); //$endTerm=strpos($context2,". ",$origPlace); if (strpos($context2, "

")>0){ $startBody=strpos($context2, "

")+3; //echo("startbody= $startBody"); $context2=substr($context2,$startBody); } $lowerSearch=strtolower($searchTerm); $lowerSearchNOSP=strtolower($searchTermNOSP); $context3=str_replace("$searchTerm", "$searchTerm",$context2); $context4=str_replace("$lowerSearch", "$lowerSearch",$context3); $context5=str_replace("$searchTermNOSP,", "$searchTermNOSP,",$context4); $context6=str_replace("$lowerSearchNOSP,", "$lowerSearchNOSP,",$context5); $context7=str_replace("$searchTermNOSP.", "$searchTermNOSP.",$context6); $context8=str_replace("$lowerSearchNOSP.", "$lowerSearchNOSP.",$context7); $context4=$context8; $context5=str_replace("
", " ",$context4); if (strLen($context5)>220){ $context5=subStr($context5,1,220); } $out="...$context5...



"; return($out); } ?>