okay er helt forviret nu
dette er et kopi past direkte fra mit index hvor den er galt- <?php
- session_start();
- include ("conf/dbconnect.php");
- $db_hent = mysql_query("select * from user_brugere where id = '$_GET[id]'");
- $hent = mysql_fetch_array($db_hent);
-
- if(isset($_POST['send'])) {
-
- $errmsg = "";
-
- $message = trim($_POST['message']);
- $modid = trim($hent['id']);
- $fraid = trim($_SESSION['id']);
- $date = date("d-m-Y");
- $time = date("H:i");
- $modtagtGB = trim($hent['modtagtGB']);
- $sendtGB = trim($hent['sendtGB']);
-
- $message = str_replace('<', '<', $message);
- $message = str_replace('>', '>', $message);
- $message = str_replace('<i>', '<i>', $message);
- $message = str_replace('</i>', '</i>', $message);
- $message = str_replace('<b>', '<b>', $message);
- $message = str_replace('</b>', '</b>', $message);
-
-
- if ($message == "") {
- $errmsg .= "Skriv din besked. ";
- }
- if ($message == "Skriv din besked.") {
- $errmsg .= "FEJL, du må ikke skrive Skriv din besked.";
- }
- if ($message == "FEJL, du må ikke skrive Skriv din besked.") {
- $errmsg .= "Stop så !?";
- }
- if ($message == "Beskeden er sendt.") {
- $errmsg .= "FEJL, du må ikke skrive Beskeden er sendt.";
- }
- if ($message == "FEJL, du må ikke skrive Beskeden er sendt.") {
- $errmsg .= "Stop så !?";
- }
- if ($message == "Stop så !?") {
- $errmsg .= "Stop så !?";
- }
- if ($modid == "") {
- $errmsg .= "Brugeren eksistere ikke. ";
- }
- if ($fraid == $modid) {
- $errmsg .= "Du kan ikke sende til dig selv. Benyt din notesblok. Højre menu, under 'Ændre'";
- }
-
- if ($errmsg == "") {
-
- $query = "insert into user_gb (message, modid, fraid, date, time) " .
- "values ('$message', '$modid', '$fraid', '$date', '$time')";
-
- mysql_query($query) or die('Error, query failed: <br><br>' . mysql_error() . '<br><br>' . mysql_error() . '<br><br>' . $query);
-
- $query = "insert into user_gb_backup (message, modid, fraid, date, time) " .
- "values ('$message', '$modid', '$fraid', '$date', '$time')";
-
- mysql_query($query) or die('Error, query failed: <br><br>' . mysql_error() . '<br><br>' . mysql_error() . '<br><br>' . $query);
-
- $query = "update user_brugere set modtagtGB=modtagtGB+1 where id=$modid";
-
- mysql_query($query) or die('Error, query failed: <br><br>' . mysql_error() . '<br><br>' . mysql_error() . '<br><br>' . $query);
-
- $query = "update user_brugere set sendtGB=sendtGB+1 where id=$fraid";
-
- mysql_query($query) or die('Error, query failed: <br><br>' . mysql_error() . '<br><br>' . mysql_error() . '<br><br>' . $query);
-
- $msg = "Beskeden er sendt.";
- } else {
- $msg = "$errmsg";
- }
- }
- $ingenbeskeder = mysql_query("select * from user_gb where modid = '$_GET[id]' order by id");
- $ibn = mysql_num_rows($ingenbeskeder);
-
- $nuller = mysql_query("select * from user_brugere where id = '$_GET[id]' and aktiv = '1' order by id");
- $nul = mysql_num_rows($nuller);
-
- if(isset($_GET['slet'])) {
- $sletid = $_GET['slet'];
- $query = "DELETE FROM user_gb WHERE modid = '$_SESSION[id]' and id = $sletid";
- mysql_query($query) or die('Error, query failed: <br><br>' . mysql_error() . '<br><br>' . mysql_error() . '<br><br>' . $query);
- $skriv = "Besked er nu slettet.";
- }
- // VALUES START
- $dato = date("d-m-Y");
- $realtal = $_SESSION['redtal'];
- // VALUES SLUT
-
- function fdag($fdag) {
- if ($fdag !== "00-00-0000") {
- $nu_dag = date('d');
- $nu_maaned = date('m');
- $nu_aar = date('Y');
- $del = split('-', $fdag);
- if (intval($del[0])==0) return '';
- $dagen = $del[0];
- $maaneden = $del[1];
- $aaret = $del[2];
- unset($del);
- $alder = $nu_aar - $aaret - 1;
- if ($maaneden < $nu_maaned || ($maaneden == $nu_maaned && $dagen <= $nu_dag)) {
- $alder++;
- return $alder;
- } else {
- return $alder;
- }
- } else {
- $maaneden = 0; $dagen = 0; $aaret = 0;
- }
- }
- $alderregnet = fdag($hent['alder'])." år";
-
- include('includepoint.php');
-
- /*
- <?php print $minonl ?><br>
- <?php print $mgb ?><br>
- <?php print $sgb ?><br>
- <br>
- <?php print $minutter ?><br>
- <?php print $modtaget ?><br>
- <?php print $sendt ?><br>
- <br>
- <?php print $ialt ?><br>
- */
- ?>
-
- <html>
-
-
-
- <head>
- <title>Umbrella-gaming fun gaming</title>
-
- <meta http-equiv="Content-Type" content="text/html; charset=uft-8">
-
- <link rel="stylesheet" href="amain.css" type="text/css" media="all" />
-
- <style type="text/css">
- .om-umbrella { color: #FFF;
- }
- .status7 { color: #FFF;
- }
- .status8 { color: #FFF;
- }
- </style>
- </head>
- <body>
- <div id="wrapper">
- <ul id="navigation">
- <li id="home"><a href="index.php">home</a></li>
- <li id="team"><a href="produkter.php">the team</a></li>
- <li id="about"><a href="fordele.php">about us</a></li>
- <li id="results"><a href="historie.php">results</a></li>
- <li id="news"><a href="kontakt.php">news</a></li>
- </ul>
- <h1><a href="index.php"><img src="../images/banner.png" alt="" /></a></h1>
- <div id="user-panel">
- <h2>Umbrella</h2>
-
- <ul id="user-actions">
- </ul>
- <div class="clear"></div>
- </div>
- <div id="sidebar">
- <h3><img src="../images/p/logo.png" alt="amd" /></h3>
- <table width="273" border="0">
- <tr>
- <td><?php
- $db_nyhed = mysql_query("select * from user_news where front = 1 order by id desc LIMIT 0,1");
- while($nyhed = mysql_fetch_array($db_nyhed)){
-
- $sql3 = "select * from user_news where id = '$nyhed[id]'";
- $result3 = mysql_query($sql3) or die(mysql_errno().' '.mysql_error().'<br>'.$sql3);
- while($row3 = mysql_fetch_array($result3)) {
- $fraid3 = $row3['afid'];
- $sql4 = "select * from user_brugere where id = '$fraid3'";
- $result4 = mysql_query($sql4) or die(mysql_errno().' '.mysql_error().'<br>'.$sql4);
- $row4 = mysql_fetch_array($result4);
- $nyhedafid = $row4['id'];
- $nyhedafuser = $row4['brugernavn'];
-
-
- }
- ?>
- <b><?php print $nyhed['overskrift'] ?></b></td>
- </tr>
- <tr>
- <td><? print substr($nyhed['nyhed'], 0, 180); ?>...</td>
- </tr>
- <tr>
- <td>D. <i><?php print $nyhed['date'] ?> <?php print $nyhed['time'] ?></i></td>
- </tr>
- <tr>
- <td>Af <a href="/usersystem/profile.php?id=<?php print $nyhedafid ?>"><?php print $nyhedafuser ?></a></td>
- </tr>
- <tr>
- <td><a href="/usersystem/news.php">Læs mere</a>.</p></td>
- </tr>
- </table>
- <p>
- <?php } ?>
- </p>
- <h3> </h3>
- <ul>
- <li></li>
- <li>erterte</li>
- <li>rt</li>
- <li>e</li>
- <li>t</li>
- <li>et</li>
- </ul>
- <h3> </h3>
- </div>
-
- <div id="content">
- <div id="news-content">
- <h3><?php if($hent['online'] != "1"){ ?><img src="../images/offline.jpg" width="124" height="36">
- <?php }else{ ?><img src="../images/online.jpg" width="119" height="36"><?php } ?>
- </h3>
-
- <!-- Post -->
- <div class="post">
- <h4>
- <span class="title">Profil</span>
- <span class="info">Lavet af Giet Shet<a href="#"></a></span></h4>
- <div class="post-content"><p> Kunde nr.
- <td> </td>
- <td><?php print $hent['id'] ?></td>
- <?php if($_SESSION['realtal'] > 49){ ?>
- <?php if($hent['brugernavn'] != $_SESSION['brugernavn']){ ?>
- <tr>
- <td> Adminstrer</td>
- <td><a href="adminpanel.php?id=<?php print $hent['id'] ?>">Lige her</a> - Dit AN er <b><?php print $_SESSION['realtal'] ?></b></td>
- </tr>
- <?php }else{ ?>
- <?php }} ?>
- <br />
- </div>
- <div class="post-foot"></div>
- </div>
-
-
-
- </div>
-
- </div>
- <div id="footer">
-
- <h4 align="center">Copyright @ www.umbrella-gaming.dk</h4>
- </div>
- </div>
- </body>
- </html>
ved ikke om i kan bruge dette
jeg bruger Dreamweaver og der står unicode (UTF-8)
EDIT endrede UTF-8 over til iso og nu virker det
Indlæg senest redigeret d. 30.05.2011 13:03 af Bruger #16454