All pastes #74806 Raw Edit

Untitled

public php v1 · immutable
#74806 ·published 2006-06-29 14:03 UTC
rendered paste body
<?phpinclude "conn.php";$FILES_DIR="../files";        $anv2="SELECT * FROM w_user INNER JOIN w_usergroup ON w_user.w_usergroupID=w_usergroup.w_usergroupID WHERE w_userName='$anv'";        $anv3=mysql_query($anv2) or die("Kunde inte hitta anv\xe4ndare");        $anv4=mysql_fetch_array($anv3);        if ( ($anv4[w_usergroupID] != '2') ) {                header("Location: index.php");        }        print "<center><table border=1>";        include 'top2.php';        print "<b>S\xf6k testamenten</b></center>";        print "<center>";#       include 'top.php';        print "<table border='0' width='100%' cellspacing='20'>";        print "<tr><td width='18%' valign='top'>";        include 'leftwills.php';        print "</td>";        print "<td valign='top' width='75%'>";        if(isset($_POST['seeksubmit']))        {                $soc_nr=$_POST['seek1'];                list($soc1, $soc2) = split('[-]', $soc_nr);                $soc_nr="$soc1$soc2";                print "<table border='1'>";                print "<tr><td>Person-nummer</td><td>Visa testamente</td></tr>";                $getans="SELECT * FROM wills WHERE willsSocNr LIKE '%$soc_nr%' ORDER BY willsSocNr, willsID ";                $getans2=mysql_query($getans) or die("Kunde inte hitta n\xe5got testamente");                while($getans3=mysql_fetch_array($getans2))                {                        $changeFormat=substr(chunk_split($getans3[willsSocNr], 6, '-'),0,11);                        print "<tr><td>$changeFormat</td><td><a href='$FILES_DIR/$getans3[willsFileName]'>Se testamentet</a></td></tr>";                }                print "</table>";        }        else        {                print "<form action='searchwills.php' method='post'>";                print "<table border='1'>";                print "<tr><td>Person-nummer</td><td><input type='text' size=29 name='seek1'></td></tr>";                print "</table>";                print "<input type='submit' name='seeksubmit' value='s\xf6k'></form><br>";        }        print "</td></tr></table>";        print "</center>";?>