- <?php
- $select = mysql_query("SELECT * FROM brugere WHERE id = '". $_GET['id'] ."' ");
- $num_rows = mysql_num_rows($select);
-
- $select_user = mysql_query("SELECT * FROM brugere WHERE id = '". $_SESSION['id'] ."' ");
- $use = mysql_fetch_assoc($select_user);
-
- $select2 = mysql_query("SELECT * FROM p_opslag WHERE bid = '". $_GET['id'] ."' ORDER BY id DESC LIMIT 4");
- $num_rows2 = mysql_num_rows($select2);
-
- $select3 = mysql_query("SELECT * FROM p_opslag WHERE bid = '". $_GET['id'] ."' && bid2 = '". $_GET['id'] ."' ORDER BY id DESC LIMIT 10 ");
- $oprow = mysql_fetch_assoc($select3);
- $num_rows_opslag = mysql_num_rows($select3);
-
-
- if(isset($_POST['send'])) {
- mysql_query("INSERT INTO p_opslag (bid, bid2, indhold, ip) VALUES ('". $_GET['id'] ."', '". $_POST['bid2'] ."', '". $_POST['indhold'] ."', '". $_POST['ip'] ."')");
- header("Location: http://www.b2f.dk/?s=profile&id=". $_GET['id'] ."");
- }
-
- if($_GET['d']=="true" && $_GET['s']=="profile" && $_SESSION['id']==$_GET['id']) {
- mysql_query("DELETE FROM p_opslag WHERE id = '". $_GET['pid'] ."'");
- header("Location: http://www.b2f.dk/?s=profile&id=". $_GET['id']."");
- }
-
- function CalculateAge($BirthDate)
- {
- list($Year, $Month, $Day) = explode("/", $BirthDate);
-
- $YearDiff = date("Y") - $Year;
-
- if(date("m") < $Month || (date("m") == $Month && date("d") < $DayDiff))
- {
- $YearDiff--;
- }
- return $YearDiff;
- }
-
- if($num_rows == null) {
- echo "Profilen med den angivne id, findes desværre ikke.";
- } else {
- $row3 = mysql_fetch_assoc($select);
-
- $rank = mysql_query("SELECT * FROM brugere INNER JOIN rank ON brugere.rank = rank.id ORDER BY '". $_GET['id'] ."' ");
- $rrow = mysql_fetch_assoc($rank);
-
- if($row3['img'] == null) {
- $row3['img'] = "http://www.fairtrade-denmark.dk/fileadmin/templates/Billeder/Fairtrade/no_image.gif";
- }
-
- if($row3['fdag'] == null) {
- $row3['fdag'] = date("d");
- $row3['fmaaned'] = date("m");
- $row3['faar'] = date("Y");
- }
-
- ?>
- <script type="text/javascript" language="JavaScript">
- function ReverseContentDisplay(d) {
- if(d.length < 1) { return; }
- if(document.getElementById(d).style.display == "block") { document.getElementById(d).style.display = "none"; }
- else { document.getElementById(d).style.display = "block"; }
- }
-
- document.getElementById(d).style.display = "none";
- </script>
-
-
- <h3><?php echo $row3['brugernavn']; ?>'s profil</h3>
- <div style="color: #999999; font-size: 10px;">
- <?php if($row3['rank']=="1") { ?>
- Denne profil er ægte
- <?php } ?>
- </div>
-
- <div style="float: left; border-right: 1px dotted #999999; width: 220px; min-height: 300px;">
- <img src="<?php echo $row3['img']; ?>" border="2" height="200" width="200" />
- <strong>Navn:</strong> <?php echo $row3['fnavn'] . " " . $row3['enavn']; ?><br />
- <strong>Alder:</strong> <?php echo CalculateAge($row3['faar'] . "/" . $row3['fmaaned'] . "/" . $row['fdag']); ?> år<br />
- <strong>Rank:</strong> <?php echo $rrow['nrrank']; ?>
- </div>
- <?php } ?>
Den kommer bare frem og siger
Profilen med den angivne id, findes desværre ikke.
det her har jeg skrevet oppe i
hvad har jeg lavet af
Billeder af phpmyadmin;
fejl.
http://localhostr.com/files/whV84nf/minhjemmeside.pngRank;
http://localhostr.com/files/C0jJe91/rank.pngUpload Billede;
http://localhostr.com/files/LQMdpjA/uploadbilleder.pngNår man skal ind på sin profil så har jeg lavet link sådan her
¨
- <a href="./?s=profil&id=<?php echo $_SESSION['id']; ?>" target="_self"<?php if($_GET['s']=="minprofil") { ?> class="current"<?php } ?>>Min Profil</a>
Indlæg senest redigeret d. 19.03.2011 14:56 af Bruger #16353