Avatar billede volturex Nybegynder
20. maj 2008 - 13:45 Der er 2 kommentarer

url der giver alle søge resultater

Hejsa.

Jeg har et mindre problem. Sidder her med en kode hvor der gerne skulle være et tekst link der går tilbage og viser alle resultater i databasen. Hvis jeg søger på et resultat kommer det frem men kan ikke lave et tekst link der hopper tilbage og viser alle i databasen.

Her er min kode:

<?php
session_start();

if(isset($HTTP_GET_VARS['asapNOIfr']))
{
        unset($HTTP_SESSION_VARS['asapIfr_brugttilpaahaeng_2347']);
}

require("brugttilpaahaeng_connect.php");

$Link = mysql_connect ($Host, $User, $Password);
mysql_select_db($DBName, $Link);

?>
<html>
<head>
<title>Havnens Marine Center A/S</title>
<meta name="generator" content="Data ASap v3.3.85">
<link rel="stylesheet" href="brugttilpaahaeng_styles.css" type="text/css">
<script language="javascript">
<!--
var bName = navigator.appName;
var bVer = parseFloat(navigator.appVersion);
var browser;

if (bName == "Netscape")
browser = "Netscape Navigator"
else
browser = bName;

  // return 1 for Internet Explorer
  if (browser == "Netscape Navigator")
document.write("<!-- This is Netscape //-->")

  // return 2 for Navigator
  else
document.write("<style type=\"text/css\">")
document.write("<!--")
document.write(".fields{")
document.write("border : #000000;")
document.write("border-style: solid;")
document.write("border-width: 1px;")
document.write("}")
document.write("-->")
document.write("</style>")

  // return 0 for other browsers

//-->

</script>
<script language="JavaScript1.2" src="main.js" type="text/javascript"></script>
<script language="JavaScript">
<!--
function validateForm()
{
var errors = '';

  if (errors) alert('The following error(s) occurred:\n' + errors);

  document.returnValue = (errors == '');
}

function callJavaScript(functionName)
{
  return eval(functionName)
}
//-->
</script>
</head>
<body onLoad="callJavaScript('document.search.field8.focus()')" topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></DIV>
<script language="JavaScript1.2" src="brugttilpaahaeng_style_sf.js" type="text/javascript"></script>
<?php
require("brugttilpaahaeng_header.inc");
?>
<div align="center">
<table width="650" cellpadding="0" cellspacing="0">
<tr>
<td>
<form name="search" onSubmit="validateForm();return document.returnValue" method="POST" action="brugttilpaahaeng_search_results.php">
<div align="center">
  <table width="100%" class="report" cellpadding="0" cellspacing="0">
    <tr>
      <td class="strip">&nbsp;&nbsp;Søg på både.</td>
    </tr>
    <tr>
      <td class="data3">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tr>
            <td height="16" colspan="4" valign="top">
              <hr class="line" size="1">
            </td>
          </tr>
          <tr>
            <td width="2%" valign="top">&nbsp;</td>
            <td width="18%" valign="top">
              <div align="right">
                <table cellpadding="1" cellspacing="0" width="100%">
                  <tr>
                    <td class="fieldname">Mærke</td>
                  </tr>
                </table>
              </div>
            </td>
            <td width="2%" valign="top"></td>
            <td width="78%" valign="top" class="data3">
            <input class="fields" type="text" name="field8" value="">
          </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td class="strip">&nbsp;</td>
    </tr>
<tr>
<td colspan="2">
<div align="center">
<input name='begin_search' type='hidden' id='begin_search' value='1'>
<input type="submit" name="submit" value="Søg">
</div>
</td>
</tr>
  </table>
</div>
</form>
</td>
</tr>
</table>
</div>
  <br>
<!--Generated using ASaP! Version 3.3.85 , Copyright (C) 2000-2007 San Diego Web Partners, All Rights Reserved.. Visit us at:  http://www.data-asap.com  or at:  http://www.sandiegowebpartners.com -->
<!--Generated for Unregistered User at Havnens Marine Service APS-->
</body>
</html>
Avatar billede volturex Nybegynder
20. maj 2008 - 13:47 #1
undskyld. Det er den kode her hvor tekstlinket skal være.

<?php
session_start();

require("brugttilpaahaeng_connect.php");

$Link = mysql_connect ($Host, $User, $Password);
mysql_select_db($DBName, $Link);


// hardwired stuff here --------------------------
$THISuniqueID = "brugttilpaahaeng_2347";
$lineIndex = 0;
$linkCount = 0;
$itemNumber = 0;
$get = 0;
$post = 0;
$newID = 0;
$prefix = "";
$suffix = "";
$RFvar = "";

$rows_per_page = 10;
$asapPages = 1;
$screen = 1;
$preOrder = " ORDER BY brugttilpaahaeng.";

$thumb_prefix = "";
$thumb_suffix = "";

//below gets the ascending / descending going
//below is for the first time
if(!isset($HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347']))
{
    $ASCDESC = " ASC";
    $HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'] = $ASCDESC;
}
else
{
  //below is if session is set and we have clicked on a heading
  if(isset($HTTP_GET_VARS['asapSB']))
  {
        if($HTTP_GET_VARS['asapSB'] == $HTTP_SESSION_VARS['asapSB_brugttilpaahaeng_2347'])
      {
        // below is if we have clicked on the same heading
          if($HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'] == " ASC")
              $ASCDESC = " DESC";
            else
              $ASCDESC = " ASC";

            $HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'] = $ASCDESC;
      }
        else
      {
        // below is if we have clicked on a different heading
            $ASCDESC = " ASC";
            $HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'] = $ASCDESC;
        }
  }
    else
    {
      $ASCDESC = $HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'];
    }
}

if ($ASCDESC == " ASC")
  $asapWD = "&#x25BC;";
else
  $asapWD = "&#x25B2;";

// below gets the sortby going
if(isset($HTTP_GET_VARS['asapSB']))
{
  $asapSB = $HTTP_GET_VARS['asapSB'];
    $HTTP_SESSION_VARS['asapSB_brugttilpaahaeng_2347'] = $asapSB;
}
else
{
  if(!isset($HTTP_SESSION_VARS['asapSB_brugttilpaahaeng_2347']))
  {
      $asapSB = "field8";
      $HTTP_SESSION_VARS['asapSB_brugttilpaahaeng_2347'] = $asapSB;
  }
    else
    {
      $asapSB = $HTTP_SESSION_VARS['asapSB_brugttilpaahaeng_2347'];
    }
}
// keyword functions here ------------------------
function Exact($whereclause,$fieldname,$strInput,$selCrit)
{
  $whereclause = $whereclause . " (" . $fieldname . " LIKE '";
    $whereclause = $whereclause . $strInput . "') AND ";
    //echo "<br>" . $whereclause;
    return $whereclause;
}

function Keywrd($whereclause,$fieldname,$strInput,$selCrit)
{
  $arrSearch = explode(" ",$strInput);
    $strCombine = implode("%') " . $selCrit . " (" . $fieldname . " LIKE '%",$arrSearch);
  $whereclause = $whereclause . " (" . $fieldname . " LIKE '%" . $strCombine . "%') AND ";
    //echo "<br>" . $whereclause;
    return $whereclause;
}
// end keyword functions
// iframe stuff here ------------------------------
if (isset($HTTP_GET_VARS['asapIfr']))
{
    $asapIfr = $HTTP_GET_VARS['asapIfr'];
    $HTTP_SESSION_VARS['asapIfr_brugttilpaahaeng_2347'] = $asapIfr;
}

if (isset($HTTP_SESSION_VARS['asapIfr_brugttilpaahaeng_2347']))
    $asapIfr = $HTTP_SESSION_VARS['asapIfr_brugttilpaahaeng_2347'];

if(isset($HTTP_GET_VARS['asapNOIfr']))
{
        unset($asapIfr);
        unset($HTTP_SESSION_VARS['asapIfr_brugttilpaahaeng_2347']);
}

// looking for uniqueID information here ---------------------------
if (!isset($HTTP_SESSION_VARS['uniqueID_brugttilpaahaeng_2347']))
{
    $uniqueID = "brugttilpaahaeng_2347";
    $uniqueID_brugttilpaahaeng_2347 = $uniqueID;
    $HTTP_SESSION_VARS['uniqueID'] = $uniqueID;
}
if (isset($HTTP_SESSION_VARS['uniqueID_brugttilpaahaeng_2347']))
{
    if ($HTTP_SESSION_VARS['uniqueID_brugttilpaahaeng_2347'] <> $THISuniqueID)
    {
        $newID = 1;
        $HTTP_SESSION_VARS['uniqueID_brugttilpaahaeng_2347'] = $THISuniqueID;
    }
}

// looking for related field here
if (isset($HTTP_GET_VARS['asapRF']))
{
  $asapRF = $HTTP_GET_VARS['asapRF'];
  if ($asapRF <> "")
  {
      $RFvar = $HTTP_GET_VARS['RFvar'];
      switch ($asapRF) {
        case "field1";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field8";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field23";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field24";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field2";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field3";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field4";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field5";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field6";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field7";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field9";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field10";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field11";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field12";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field13";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field14";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field15";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field16";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field17";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field18";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field19";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field20";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field21";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "field22";
        $RFvar = "'" . $RFvar . "'";
          break;
        case "ID";
        $RFvar = $RFvar;
        break;
    }
      $get = 1;
  }
}

// looking for variables from url HTTP_GET_VARS ------------------------------
if (isset($HTTP_GET_VARS['begin_search']))
{
    $get = 1;
}
if (isset($HTTP_GET_VARS['field8']))
{
    $field8 = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['field8'] : addslashes($HTTP_GET_VARS['field8']);
    $get = 1;
}

if ($get == 1)
{
    $whereclause = "WHERE ";

    //this is strictly for a related field
    if ($asapRF <> "")
      $whereclause = $whereclause . "brugttilpaahaeng." . $asapRF . " = " .  $RFvar . " AND ";

    if (isset($field8))
        $whereclause = $whereclause . "brugttilpaahaeng.field8 LIKE '%" . $field8 . "%' AND ";
    if ( substr($whereclause,-5) == " AND ")
        $whereclause = substr_replace($whereclause,"",-5);  // strip off ' AND'
    elseif ( substr($whereclause,-4) == " OR ")
        $whereclause = substr_replace($whereclause,"",-4);  // strip off ' OR'
    else
        $whereclause = substr_replace($whereclause,"",-6);  // strip off 'WHERE '

        $whereclause_brugttilpaahaeng_2347 = $whereclause;  // sets unique whereclause
    if (!isset($HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347']))
        $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'] = $whereclause;
    else
        $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'] = $whereclause;

    $fullOrderBy = " ORDER BY brugttilpaahaeng.field8";

    $fullOrderBy_brugttilpaahaeng_2347 = $fullOrderBy;  // sets unique fullOrderBy

    if (!isset($HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347']))
        $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy;
    else
        $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy;
}

// looking for variables from search form HTTP_POST_VARS -----------------------------
if (isset($HTTP_POST_VARS['field8']))
{
    $field8 = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS['field8'] : addslashes($HTTP_POST_VARS['field8']);
    $post = 1;
}

if ($post == 1)
{
    $whereclause = "WHERE ";
    if ($field8 <> "")
        $whereclause = $whereclause . "brugttilpaahaeng.field8 LIKE '%" . $field8 . "%' AND ";
    if ( substr($whereclause,-5) == " AND ")
        $whereclause = substr_replace($whereclause,"",-5);  // strip off ' AND'
    elseif ( substr($whereclause,-4) == " OR ")
        $whereclause = substr_replace($whereclause,"",-4);  // strip off ' OR'
    else
        $whereclause = substr_replace($whereclause,"",-6);  // strip off 'WHERE '

        $whereclause_brugttilpaahaeng_2347 = $whereclause;  // this sets unique whereclause

    if (!isset($HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347']))
        $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'] = $whereclause;
    else
        $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'] = $whereclause;

    $fullOrderBy = " ORDER BY brugttilpaahaeng.field8";

    $fullOrderBy_brugttilpaahaeng_2347 = $fullOrderBy;  // this sets unique fullOrderBy

    if (!isset($HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347']))
        $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy;
    else
        $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy;
}

// looking to see if we've received some commands to orderby a certain field //
if (isset($HTTP_GET_VARS['asapSB']))
{
    $asapSB = $HTTP_GET_VARS['asapSB'];
    $fullOrderBy = $preOrder . $asapSB . $ASCDESC;
    $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy;
    $whereclause = $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'];
}

// looking to see if search without search form and reusing session if set //
if ($get == 0 && $post == 0)
{
    if (!isset($HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347']))
    {
        $fullOrderBy = " ORDER BY brugttilpaahaeng.field8";
        $fullOrderBy_brugttilpaahaeng_2347 = $fullOrderBy;  // sets unique fullOrderBy
        $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy;
    }
    else
    {
        if($newID == 1)
        {
            $fullOrderBy = " ORDER BY brugttilpaahaeng.field8";
            $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy;
        }
        else
            $fullOrderBy = $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'];
    }

    if (!isset($HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347']))
    {
        $whereclause = "WHERE ";
        if ( substr($whereclause,-5) == " AND ")
            $whereclause = substr_replace($whereclause,"",-5);  // strip off ' AND'
        elseif ( substr($whereclause,-4) == " OR ")
            $whereclause = substr_replace($whereclause,"",-4);  // strip off ' OR'
        else
            $whereclause = substr_replace($whereclause,"",-6);  // strip off 'WHERE '

            $whereclause_brugttilpaahaeng_2347 = $whereclause;  // sets unique whereclause

            $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'] = $whereclause;
    }
    else
    {
        if($newID == 1)
        {
            $whereclause = "WHERE ";
            if ( substr($whereclause,-5) == " AND ")
                $whereclause = substr_replace($whereclause,"",-5);  // strip off ' AND'
            elseif ( substr($whereclause,-4) == " OR ")
                $whereclause = substr_replace($whereclause,"",-4);  // strip off ' OR'
            else
                $whereclause = substr_replace($whereclause,"",-6);  // strip off 'WHERE '
                $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'] = $whereclause;
        }
        else
            $whereclause = $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'];
    }
}

// for deleting multiple records
if(isset($HTTP_POST_VARS['Delete']))
{
  $remove = $HTTP_POST_VARS['Delete'];
  $n        = count($remove);
  $i        = 0;

  while ($i < $n)
  {
      $delQuery = "DELETE FROM brugttilpaahaeng WHERE brugttilpaahaeng.ID = " . $remove[$i];
      if ($Result = mysql_query($delQuery, $Link))
    {
          $i++;
    }
  }
}
$Count = "SELECT ID,field1,field8,field23,field24,field2,field3,field4,field5,field6,field7,field9,field10,field11,field12,field13,field14,field15,field16,field17,field18,field19,field20,field21,field22 FROM brugttilpaahaeng " . $whereclause;
$Recordset = mysql_query($Count, $Link);

if (!isset($total_records))
{
    $total_records = mysql_num_rows($Recordset);
    $total_results = $total_records - 1;
    $total_results_brugttilpaahaeng_2347 = $total_results;  // sets unique total_results

    if (!isset($HTTP_SESSION_VARS['total_results_brugttilpaahaeng_2347']))
            $HTTP_SESSION_VARS['total_results_brugttilpaahaeng_2347'] = $total_results;
    else
            $HTTP_SESSION_VARS['total_results_brugttilpaahaeng_2347'] = $total_results;
}
$asapPages = ceil($total_records / $rows_per_page);
mysql_free_result($Recordset);


//  looking for request of screen number (alias Page Number) //
if (!isset($HTTP_GET_VARS['screen']))
    $screen = 1;
else
    $screen = $HTTP_GET_VARS['screen'];

// loooking for screen number from delete function
if (isset($HTTP_POST_VARS['screen']))
    $screen = $HTTP_POST_VARS['screen'];

$start = ($screen - 1) * $rows_per_page;

// Querying database here //

$Query = "SELECT ID,field1,field8,field23,field24,field2,field3,field4,field5,field6,field7,field9,field10,field11,field12,field13,field14,field15,field16,field17,field18,field19,field20,field21,field22";
$Query = $Query . " FROM brugttilpaahaeng " . $whereclause . $fullOrderBy . " LIMIT $start, $rows_per_page";
$Recordset = mysql_query($Query, $Link);
$rows = mysql_num_rows($Recordset);

// this is the total number of chapters holding the pages //
$asapChapters = ceil($asapPages / 10);

// this is the current chapter //
$asapChapter = ceil($screen * .1);

// this would be the first page in the current chapter //
$start10 = ($asapChapter * 10) - 9;

// this would be the last page in the current chapter //
$stop10 = $asapChapter * 10;
if ($stop10 > $asapPages)
{
  $stop10 = $asapPages;
}

$next1 = $stop10 + 1;
$previous1 = $start10 - 1;

$Next = "brugttilpaahaeng_search_results.php?screen=" . $next1;
$Previous = "brugttilpaahaeng_search_results.php?screen=" . $previous1;
    $prefix = "location.href='";
    $suffix = "'";
?>
<html>
<head>
<title>Havnens Marine Center A/S</title>

<SCRIPT LANGUAGE=JAVASCRIPT>
<!-- Hide script form old browsers
var win=null;
function newWindow(url) {
var winl = (screen.width-500)/2;
var wint = (screen.height-500)/2;
mapWindow = window.open(url, 'ASaP','left='+winl+',top='+wint+',width=500,height=500,scrollbars=yes')
}

// End hiding script from old browsers -->
</SCRIPT>

<meta name="generator" content="Data ASap v3.3.85">
<link rel="stylesheet" href="brugttilpaahaeng_styles.css" type="text/css">
</head>
<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 link='##4E5B70' alink='##4E5B70' vlink='##4E5B70'>
<?php
    require("brugttilpaahaeng_header.inc");
?>
<div align="center">
<a href="/brugttilpaahaeng_search_results.php?screen=1"><font color="#000000">Klik her for at komme tilbage til alle brugte både til påhængsmotor.</a>
<br>
<br>

<table width="950" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      <table width="100%" border="0" cellpadding="2" cellspacing="0">
        <tr>
          <td width="10" class="strip">&nbsp;</td>
          <td width="10" class="strip">&nbsp;</td>
          <td class="strip" onmouseover="this.className='strip',this.style.cursor='pointer'" onclick="location.href='brugttilpaahaeng_search_results.php?asapSB=field1&screen=<?php echo $screen; ?>',this.className='strip'">
          <?php
          if ($asapSB == 'field1')
          {
          ?>
          <?php echo $asapWD; ?>
          <?php
          }
          ?>
          </td>
          <td class="strip" onmouseover="this.className='strip',this.style.cursor='pointer'" onclick="location.href='brugttilpaahaeng_search_results.php?asapSB=field8&screen=<?php echo $screen; ?>',this.className='strip'">
          <?php
          if ($asapSB == 'field8')
          {
          ?>
          <?php echo $asapWD; ?>
          <?php
          }
          ?>
          <span class='strip'>Mærke</span>
          </td>
          <td class="strip" onmouseover="this.className='strip',this.style.cursor='pointer'" onclick="location.href='brugttilpaahaeng_search_results.php?asapSB=field23&screen=<?php echo $screen; ?>',this.className='strip'">
          <?php
          if ($asapSB == 'field23')
          {
          ?>
          <?php echo $asapWD; ?>
          <?php
          }
          ?>
          <span class='strip'>Beskrivelse</span>
          </td>
          <td class="strip" onmouseover="this.className='strip',this.style.cursor='pointer'" onclick="location.href='brugttilpaahaeng_search_results.php?asapSB=field24&screen=<?php echo $screen; ?>',this.className='strip'">
          <?php
          if ($asapSB == 'field24')
          {
          ?>
          <?php echo $asapWD; ?>
          <?php
          }
          ?>
          <span class='strip'>Pris i Kr. incl. moms</span>
          </td>
</tr>
<?php
for ($i = 0; $i < $rows; $i++)
{
    while ($Row = mysql_fetch_assoc($Recordset))
    {
        $newitemNumber = (($screen - 1) * $rows_per_page) + $itemNumber;
        $resultLink = $prefix . "brugttilpaahaeng_detail.php?key=" . $Row['ID'] . "&itemNumber=" . $newitemNumber . $suffix;
        if ($lineIndex % 2 == 0)
        {
?>
<tr class="data1" onmouseover="this.style.cursor='pointer'" onclick="<?php echo $resultLink; ?>">
          <td width="10">&nbsp;</td>
          <td width="100" class="data1">
        <img src='<?php echo $thumb_prefix?><?php echo $Row['field1']; ?><?php echo $thumb_suffix?>' width='90' border='1'>
        </td>
          <td>&nbsp;</td>
          <td><?php echo $Row['field8']; ?></td>
          <td><?php echo $Row['field23']; ?></td>
          <td><?php echo $Row['field24']; ?></td>
</tr>
<?php
}
else
{
?>
<tr class="data2" onmouseover="this.style.cursor='pointer'" onclick="<?php echo $resultLink; ?>">
          <td width="10">&nbsp;</td>
          <td width="100" class="data2">
        <img src='<?php echo $thumb_prefix?><?php echo $Row['field1']; ?><?php echo $thumb_suffix?>' width='90' border='1'>
        </td>
          <td>&nbsp;</td>
          <td><?php echo $Row['field8']; ?></td>
          <td><?php echo $Row['field23']; ?></td>
          <td><?php echo $Row['field24']; ?></td>
</tr>
<?php
  }
  $itemNumber = $itemNumber + 1;
  $lineIndex = $lineIndex + 1;
}
}
?>
</table>
    </td>
  </tr>
  <tr>
    <td class="strip">&nbsp;Antal =&nbsp;<?php echo $total_records; ?></td>
  </tr>
</table>
<br><br>
<?php
$previousurl = "brugttilpaahaeng_search_results.php?" . SID . "&screen=" . ($screen - 1);
$nexturl = "brugttilpaahaeng_search_results.php?" . SID . "&screen=" . ($screen + 1);
?>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="35%">
        <div align="center">
                  <?php
if ($screen > 1 && $screen < $asapPages)
{
?>
                <div align="center">
                  <p><a class="button" href="<?php echo $previousurl; ?>">Forrige</a></p>
                </div>
         
        </div>
      </td>
      <td width="30%">
        <div align="center"> </div>
      </td>
      <td width="35%">
        <div align="center">
<?php
}
elseif ($screen > 1 && $screen == $asapPages)
{
?>
                <div align="center">
                  <p><a class="button" href="<?php echo $previousurl; ?>">Forrige</a></p>
                </div>
<?php
}
elseif ($screen < $asapPages && $screen == 1)
{
?>
                <div align="center">
                  <p><a class="button" href="<?php echo $nexturl; ?>">Næste</a></p>
                </div>
<?php
}
if ($screen < $asapPages && $screen > 1)
{
?>
                <div align="center">
                  <p><a class="button" href="<?php echo $nexturl; ?>">Næste</a></p>
                </div>
<?php
}
?>
        </div>
      </td>
    </tr>
  </table>
  <br>
<?php
if ($total_records == 0)
{
?>
  <b><span class='pagetext'>Undskyld, ingen detaljer i databasen matcher din søgning. Klik tilbage og prøv igen. </span></b>
<?php
}
?>
</div>
<div align="center">
<table cellpadding="0" cellspacing="2">
<?php
if ($asapChapter > 1)
{
?>
<td>
<a class='links' href='<?=$Previous?>'>10 Næste</a>
</td>
<?php
}
// loops through entire range of numbers

for ($i = $start10; $i <= $stop10; $i++)
{
$URL = "brugttilpaahaeng_search_results.php?screen=" . $i;
  if ($i == $screen)
    {
    ?>
    <td>
    <table border="1" bordercolor="#000000" cellpadding="0" cellspacing="0">
    <tr>
    <td class="pageselected" bgcolor="#cccccc" valign="bottom" width="15"><?php echo $i; ?></td>
    </tr>
    </table>
    </td>
    <?php
    }
    else
    {
    ?>
  <td valign="bottom"><b>
  <a class='links' href='<?=$URL?>'><?=$i?></a></b>
    </td>
    <?php
    }
}
if ($asapChapter < $asapChapters)
{
?>
<td>
<a class='links' href='<?=$Next?>'>Næste 10</a>
</td>
<?php
}
?>
</tr>
</table>
<?php
mysql_free_result($Recordset);
?>
</td>
</tr>
</table>
</div>
<!--Generated using ASaP! Version 3.3.85 , Copyright (C) 2000-2007 San Diego Web Partners, All Rights Reserved.. Visit us at:  http://www.data-asap.com  or at:  http://www.sandiegowebpartners.com -->
<!--Generated for Unregistered User at Havnens Marine Service APS-->
</body>
</html>
Avatar billede volturex Nybegynder
20. maj 2008 - 13:49 #2
Hvis jeg bruger søg og ikke skriver noget viser den alle resultater i databasen. Er der en url jeg kan skrive som virker på samme måde?
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester