Berichten: 605
avatar
Offline Stuur privebericht
Beste CP ik heb een shoutbox gevonden voor me game nu wil ik dat als ik een bericht typ dat er niet staat naam maar de username die het typt ik dacht aan <?echo$data->login;?></a> om het opteroepen. Maar er veranderd niks hier het script waar in het moet veranderen :


Code | Selecteer Alles
minimaliseren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?
ob_start
();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Bloodbullet-chat</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
function addsmiley(symbol) {
  document.postshout.msg.value += symbol;
  document.postshout.msg.focus();
}

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=300,height=500');");
}
</script>
<link href="default.css" rel="stylesheet" type="text/css">
</head>

<body class="phpshout_body">
<form name="postshout" method="post" action="<? echo $_SERVER['PHP_SELF']; ?>">
  <table align="center" class="phpshout_table">
    <tr>
      <td class="phpshout_form"><?
    
include "config2.php";
    include 
"functions2.php";
    
banned_user();
    
    if (isset(
$_POST["Submit"])) {
        
        
// Remove any tabs
        
$_POST["?echo$data->login;?></a>"] = str_replace("t"," ",$_POST["<?echo$data->login;?></a>"]);
        
$_POST["msg"] = str_replace("t"," ",$_POST["msg"]);

        
// Make name and string lower case for bad language filter
        
$_POST["name"] = strtolower(stripslashes(trim(htmlspecialchars($_POST["name"]))));
        
$_POST["msg"] = strtolower(stripslashes(trim(htmlspecialchars($_POST["msg"]))));

        if (!
file_exists("messages.txt")) {
        
            echo 
"<p class=\"error\">Messages.txt doesn't exsist. Please create a file call messages.txt on your server</p>";
        
        } else if (
$_POST <?echo$data->login;?></a> == "name" || $_POST["msg"] == "message" || $_POST["name"] == NULL || $_POST["msg"] == NULL) {
    
            echo "<p class=\"error\">Name & message are required fields. Please enter your name and message.</p>";
    
        } else {
        
            $filename = "messages.txt";
            $handle = fopen($filename,"r");
            $read = file_get_contents($filename);
        
            if ($read != "" || $read != NULL) {
                    
                    $array = explode("n", $read);

                    if ($array[0] != NULL || $array[0] != "") {
                
                    list($name, $msg, $time, $ip) = explode("t", $array[0]);
                                        
                    $ip = trim($ip);
                    
                    // Convert timestamp to unix timestamp and get current unix timestamp
                    $strtime = strtotime($time);
                    $flood_gate_time = $strtime+$floodtime;
                    $curtime = time();
                    $valid = true;
                    }
                    
                    if ($ip == $_SERVER['REMOTE_ADDR'] && $flood_gate_time > $curtime) {
                        echo "<p class=\"error\">You must wait ".$floodtime." seconds before posting again</p>";
                    } else {

                    writetofile($_POST["name"],$_POST["msg"]);
                    
                    }
                    
            } else {
                writetofile($_POST["name"],$_POST["msg"]);
            }
            
        } // end if file exists
        
    } // end submit

?></td>
    </tr>
    <tr>
      <td class="phpshout_form"><input class="textfields" name="<?echo$data->login;?></a>" type="text" id="<?echo$data->login;?></a>" value="<? echo fillnamevalues("name","name"?>"></td>
    </tr>
    <tr>
      <td class="phpshout_form"><input class="textfields" name="msg" type="text" id="msg" value="<? echo filltextvalues("msg","message"?>" maxlength="<? echo $maxchars?>"></td>
    </tr>
    <tr>
      <td class="phpshout_form"><input class="buttons" type="submit" name="Submit" value="Send">      </td>
    </tr>
    <tr>
      <td class="phpshout_form"><a href="javascript:addsmiley(' :) ');"><img class="smilies" src="<? echo $imagepath?>/icon_smile.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :lol: ');"><img class="smilies" src="<? echo $imagepath?>/icon_lol.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :D ');"><img src="<? echo $imagepath?>/icon_cheesygrin.gif" width="15" height="15" border="0" class="smilies"></a> <a href="javascript:addsmiley(' :P ');"><img src="<? echo $imagepath?>/icon_razz.gif" width="15" height="15" border="0" class="smilies"></a>&nbsp;<a href="javascript:addsmiley(' ;) ');"><img class="smilies" src="<? echo $imagepath?>/icon_wink.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :redface: ');"><img class="smilies" src="<? echo $imagepath?>/icon_redface.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :o ');"><img class="smilies" src="<? echo $imagepath?>/icon_surprised.gif" width="15" height="15"></a><a href="javascript:addsmiley(' :shock: ');"> </a></td>
    </tr>
    <tr>
      <td class="phpshout_form"><a href="javascript:addsmiley(' :shock: ');"><img src="<? echo $imagepath?>/icon_eek.gif" width="15" height="15" border="0" class="smilies"></a>&nbsp;<a href="javascript:addsmiley(' :( ');"><img class="smilies" src="<? echo $imagepath?>/icon_sad.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :cry: ');"><img class="smilies" src="<? echo $imagepath?>/icon_cry.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :roll: ');"><img class="smilies" src="<? echo $imagepath?>/icon_rolleyes.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :x ');"><img class="smilies" src="<? echo $imagepath?>/icon_mad.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :twisted: ');"><img class="smilies" src="<? echo $imagepath?>/icon_twisted.gif" width="15" height="15"></a>&nbsp;<a href="javascript:addsmiley(' :evil: ');"><img class="smilies" src="<? echo $imagepath?>/icon_evil.gif" width="15" height="15"></a></td>
    </tr>
    <tr>
      <td class="phpshout_form"><a class="phpshout_link" href="javascript:popUp('oldmsg.php')">Archive</a><br>
      <br></td>
    </tr>
          <? 
    
    $filename 
"messages.txt";

    if (
file_exists($filename)) {
    
    
$handle fopen($filename"r");
    
$read file_get_contents($filename);
    
$array explode("n"$read);
    
$x=0;
    
    for(
$i=0$i<$numofposts$i++) {
        
        if (
$array[$i] != NULL || $array[$i] != "") {
            
            list(
$name$msg$date$ip) = explode("t"$array[$i]);
                    
            
$date str_replace(" ","/",$date);
            list(
$year,$month,$day,$time) = explode("/"$date);
            
            
// convert text to smilies.
            
$msg smiles($msg);

            
// Show date, Yes or No.
            
if ($showdate == "1") {
                
$title "title=\"Posted ".$day."/".$month."/".$year." ".$time."\"";
            } else {
                
$title "";
            }
            
                
$x++;
                if ( 
$x != ) {
                    echo 
"<tr><td ".$title." class=\"phpshout_posts\"><strong>".wordwrap($name,18,"<br>n",1)." : </strong>".ereg_replace("([^ /]{22})","\1<wbr>",$msg)."</td></tr>";
                } else {
                    echo 
"<tr><td ".$title." class=\"phpshout_2nd_posts\"><strong>".wordwrap($name,18,"<br>n",1)." : </strong>".ereg_replace("([^ /]{22})","\1<wbr>",$msg)."</td></tr>";
                }     
                        
        } else {
        
        break;
        
        }
    }
    
    
fclose($handle);
    
    }
    
?>
  </table>
</form>
</body>
</html>
<?
ob_end_flush
();
?>

24-07-2011 21:23
Dit topic is 159 keer bekeken door 33 verschillende leden
Reacties op: "Chat"
1
Berichten: 370
avatar
Offline Stuur privébericht
je kan ook de shoutbox pakken van encoder alleen even aanpassen naar jou site
24-07-2011 21:29
Berichten: 605
avatar
Offline Stuur privébericht
Link ?
24-07-2011 21:33
Berichten: 370
avatar
Offline Stuur privébericht
Staat wel onder source hier bij downloads
24-07-2011 21:36
Berichten: 605
avatar
Offline Stuur privébericht
Ikweet niet welk script je bedoelt hoor
24-07-2011 21:45
24-07-2011 21:50
Berichten: 370
avatar
Offline Stuur privébericht
Jep die
24-07-2011 21:53
Reageer op: "Chat"
1
Je kan niet reageren omdat je niet bent ingelogd. Inloggen of Aanmelden