PM na upload

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Senior, Medior and Junior SAP HANA Developer

Vacature details Vakgebied: Software/IT Opleiding: Medior Werklocatie: Veldhoven Vacature ID: 12696 Introductie Our client is the world's leading provider of lithography systems for the semiconductor industry, manufacturing complex machines that are critical to the production of integrated circuits or chips. Our purpose is “unlocking the potential of people and society by pushing technology to new limits”. We do this guided by the principles “Challenge”, “Collaborate” and “Care”. Wat verwachten we van jou? SAP Certified Application Associate - SAP HANA Cloud Modeling (training and/or certification) Bachelor degree or higher Excellent understanding of SAP HANA (2.0 / Cloud), Data Modelling and writing

Bekijk vacature »

14/02/2005 01:45:00
Quote Anchor link
Ik heb de volgende Upload script:

///////////////////////////////////////////////////////////
<html>
<head>
<title>JvsJ Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="eeeeee" text="000000" link="aaaaaa">
<p><font face="Arial, Helvetica, sans-serif"><b>Upload Scripts </b></font></p>
<font face="Arial, Helvetica, sans-serif"><font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
<?PHP
// Upload map
$map = "upload/scripts/";
// Max grootte
$max = "50000";
// Extensies
$ext = "txt wdl doc";
if ($Uploaden){
if (!$bestand)
print ("Give up a file!");
else{
// Bestands naam opvragen
$bestand2 = explode("\\", $bestand_name);
$laatste = count($bestand2) - 1;
$bestand2 = "$bestand2[$laatste]";  
// Extensie van bestand opvragen
$bestand3 = explode(".", $bestand2);
$laatste = count($bestand3) - 1;
$bestand3 = "$bestand3[$laatste]";  
$bestand3 = strtolower($bestand3);
// Toegestaande extensies opvragen
$ext = strtolower($ext);
$ext = explode(" ", $ext);
$aantal = count($ext);
for ($tel = 0;$tel < $aantal; $tel++){
if ($bestand3 == $ext[$tel]){
$extfout = "nee";
}
}

if (!$extfout){
print ("Extensie niet geldig.");
}

else
{
if ($bestand_size > $max)
print ("Te groot.");
else
{
// Opslaan van het bestand
copy($bestand, "$map$bestand2");  
print ("Succesvolle upload!");
}
}
}
}

// Upload formulier
print ("<form method=post action=scripts.php enctype=multipart/form-data>
File: <input type=file name=bestand><br><br>
<input type=submit name=Uploaden value=Uploaden></form>"
);
?>

</font>
///////////////////////////////////////////////////////////

En na de succesvolle upload moet de persoon die op dat moment is ingelogd een PM krijgen. (PM systeem zit in de login systeem. Hier is een stukje script van de PM systeem:

///////////////////////////////////////////////////////////
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
<?
session_start();
if(session_is_registered('memberid')){
require("config.php");
// Verwijder deze comment en de onderstaande regel als je een eigen stylesheet gebruikt...
echo "<link rel=\"stylesheet\" content=\"text/css\" href=\"style.css\">";
?>

<script language="javascript">
function verwijder(bericht, url)
{
if(confirm(bericht)) location.href = url;
}
function icon(theicon)
{
document.formulier.bericht.value += ""+theicon;
document.formulier.bericht.focus();
}
</script>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
<?
if(!$new AND !$send AND !$id AND !$deleteall AND !$delete AND !$block AND !$saveblock AND !$reply){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid' ORDER BY id DESC");
$result = mysql_num_rows($query);
if(!$result){
echo "<b>Niks in je inbox!</b><br><br>";
}

else{
?>

<font face="Arial, Helvetica, sans-serif"><b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $result ?>
Private messages in your inbox...</b>
</font>
<hr>
<font face="Arial, Helvetica, sans-serif">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="75%"">
</font>
<tr>
<td width="5%"><font face="Arial, Helvetica, sans-serif"><b>Read</b></font></td>
<td width="10%"><font face="Arial, Helvetica, sans-serif"><b>Author</b></font></td>
<td width="10%"><font face="Arial, Helvetica, sans-serif"><b>Subject</b></font></td>
<td width="10%"><font face="Arial, Helvetica, sans-serif"><b>Date</b></font></td>
</tr>
<font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
<?
while($object = mysql_fetch_object($query)){
?>

</font>
<tr>
<td width="5%"><font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? if($object->gelezen){ echo "Read"; } else{ echo "Unread"; } ?>

</font></td>
<td width="10%"><font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
<?
$fuck
= mysql_query("SELECT * FROM members WHERE memberid = '$object->van'");

while($you = mysql_fetch_object($fuck)){
$auteur = $you->naam;
}

echo $auteur;
?>

</font></td>
<td width="10%"><font face="Arial, Helvetica, sans-serif"><a href="?id=
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $object->id ?>
">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $object->onderwerp ?>
</a></font></td>
<td width="10%"><font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $object->datum ?>
</font></td>
</tr>
<font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
<?
}
echo "</table><hr>";
}

?>

<img src="img/new.gif"> <a href="?new=1">New Message</a><br>
<img src="img/delete.gif"> <a href="javascript:verwijder('Are you sure you wants to remove ALL messages in your inbox?','?deleteall=1')">Delete all messages </a><br>
<img src="img/block.gif"> <a href="?block=1">Block members </a>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
<?
}
if($new){
if($reply){
$query = mysql_query("SELECT * FROM priveberichten WHERE id = '$reply'");
while($object = mysql_fetch_object($query)){
$object->onderwerp = str_replace("Re: ", "", $object->onderwerp);
$titel = "Re: $object->onderwerp";
$naar = $object->van;
}
}

?>

Write a message below to send it to an other member... <br>
<br>
</font><form method="POST" action="?send=1" name=formulier><font face="Arial, Helvetica, sans-serif">
Member ID:
<input type="text" name="naar" size="5" value="
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $naar ?>
">
( <a href="profiel.php">Search member ID</a> )<br>
Subject:
<input type="text" name="onderwerp" size="20" maxlength="100" value="
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $titel ?>
">
<br>
<input type="button" style="font-weight: bold; width: 30px" value="B" onclick="javascript:icon(' ')">
<input type="button" style="font-style: italic; width: 30px" value="I " onclick="javascript:icon(' ')">
<input type="button" style="text-decoraton: underline; width: 30px" value="U" onclick="javascript:icon(' ')">
<input type="button" style="color: #0000FF" value="Color" onclick="javascript:icon(' ')">
<input type="button" value="Code" onclick="javascript:icon('
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
')">
<br>
<textarea rows="7" name="bericht" cols="40"></textarea>
<br>
<a href="javascript:icon(';-)')"><img border="0" src="img/smiles/wink.gif"></a><a href="javascript:icon(':-|')"><img border="0" src="img/smiles/unsure.gif"></a><a href="javascript:icon(':-P')"><img border="0" src="img/smiles/tongue.gif"></a><a href="javascript:icon(':-)')"><img border="0" src="img/smiles/smile.gif"></a><a href="javascript:icon(':(')"><img border="0" src="img/smiles/sad.gif"></a><a href="javascript:icon('%-)')"><img border="0" src="img/smiles/rolleyes.gif"></a><a href="javascript:icon('|8|')"><img border="0" src="img/smiles/ph34r.gif"></a><a href="javascript:icon(':-O')"><img border="0" src="img/smiles/ohmy.gif"></a><a href="javascript:icon(':-@')"><img border="0" src="img/smiles/mad.gif"></a><a href="javascript:icon(':-]')"><img border="0" src="img/smiles/laugh.gif"></a><a href="javascript:icon(':-?')"><img border="0" src="img/smiles/huh.gif"></a><a href="javascript:icon(':-\\')"><img border="0" src="img/smiles/dry.gif"></a><a href="javascript:icon('8)')"><img border="0" src="img/smiles/cool.gif"></a><a href="javascript:icon('8-/')"><img border="0" src="img/smiles/blink.gif"></a><a href="javascript:icon(':-D')"><img border="0" src="img/smiles/biggrin.gif"></a><br>
<input type="submit" value="Send">
<input type="reset" value="Clear Fields">
</p>
</font></form>
<font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
<?
}
if($send){
if(!$naar || !$onderwerp || !$bericht){
echo "Niet alle velden ingevuld!";
}

else{
$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query)){
$ikblock = $object->blockpm;
$error = $object->pm;
$geblokkeerd = $object->blockpm;
}

if(strstr($ikblock,$naar)){
echo "Je hebt de member geblokt!";
}

else{
if(strstr($geblokkeerd,$memberid)){
echo "Wil geen berichten ontvangen.,";
}

else{
if(!$error){
echo "Kan niks ontvangen";
}

else{
if(!$result){
echo "Bestaat niet";
}

if($result){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$naar'");
$result = mysql_num_rows($query);
if($result > $maxpm-1){
echo "Maximale PMs bereikt";
}

else{
$query = mysql_query("SELECT * FROM members WHERE memberid = '$naar'");
while($object = mysql_fetch_object($query)){
$naar = $object->memberid;
$naarnaam = $object->naam;
$privmsg = $object->pm;
}

$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
while($object = mysql_fetch_object($query)){
$van = $object->memberid;
}

$datum = date("d-m-Y \o\m\ H:i:s");
if($privmsg){
$query = mysql_query("INSERT INTO priveberichten (onderwerp,van,naar,datum,bericht,ip,gelezen) VALUES ('$onderwerp','$van','$naar','$datum','$bericht','$REMOTE_ADDR','0')") or die (mysql_error());
echo "Succesvol verzonden";
}

else{
echo "Member bestaat niet.";
}
}
}
}
}
}
}
}

if($id){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid' AND id = '$id'");
$result = mysql_num_rows($query);
if(!$result){
echo "Bericht bestaat niet</a>";
}

else{
mysql_query("UPDATE priveberichten SET gelezen = '1' WHERE id = '$id'");
while($object = mysql_fetch_object($query)){
$hopla = mysql_query("SELECT * FROM members WHERE memberid = '$object->van'");
while($kee = mysql_fetch_object($hopla)){
$a = $kee->naam;
}

$aap = mysql_query("SELECT * FROM members WHERE memberid = '$object->naar'");
while($noot = mysql_fetch_object($aap)){
$b = $noot->naam;
}

?>

<b>From:</b> <a href="profiel.php?mid=
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $object->van ?>
">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $a ?>
</a><br>
<b>To:</b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $b ?>
<br>
<b>Send:</b>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $object->datum ?>
</font>
<hr style="width: 50%" align="left">
<font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
<?
$bericht
= $object->bericht;
$bericht = htmlspecialchars($bericht);
$bericht = nl2br($bericht);
$bericht = str_replace("\n","<br>",$bericht);
$bericht = str_replace(" ","&nbsp;",$bericht);
$bericht = str_replace(":]","<img src=\"img/smiles/laugh.gif\">",$bericht);
$bericht = str_replace(":-]","<img src=\"img/smiles/laugh.gif\">",$bericht);
$bericht = str_replace(":)","<img src=\"img/smiles/smile.gif\">",$bericht);
$bericht = str_replace(":-)","<img src=\"img/smiles/smile.gif\">",$bericht);
$bericht = str_replace(":D","<img src=\"img/smiles/biggrin.gif\">",$bericht);
$bericht = str_replace(":-D","<img src=\"img/smiles/biggrin.gif\">",$bericht);
$bericht = str_replace(":P","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":-P","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":p","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":-p","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(";)","<img src=\"img/smiles/wink.gif\">",$bericht);
$bericht = str_replace(";-)","<img src=\"img/smiles/wink.gif\">",$bericht);
$bericht = str_replace(":O","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":-O","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":o","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":-o","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":(","<img src=\"img/smiles/sad.gif\">",$bericht);
$bericht = str_replace(":-(","<img src=\"img/smiles/sad.gif\">",$bericht);
$bericht = str_replace("8)","<img src=\"img/smiles/cool.gif\">",$bericht);
$bericht = str_replace("8-)","<img src=\"img/smiles/cool.gif\">",$bericht);
$bericht = str_replace(":\\","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":-\\","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace("%)","<img src=\"img/smiles/rolleyes.gif\">",$bericht);
$bericht = str_replace("%-)","<img src=\"img/smiles/rolleyes.gif\">",$bericht);
$bericht = str_replace(":@","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":-@","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":|","<img src=\"img/smiles/unsure.gif\">",$bericht);
$bericht = str_replace(":-|","<img src=\"img/smiles/unsure.gif\">",$bericht);
$bericht = str_replace(":?","<img src=\"img/smiles/huh.gif\">",$bericht);
$bericht = str_replace(":-?","<img src=\"img/smiles/huh.gif\">",$bericht);
$bericht = str_replace("|8|","<img src=\"img/smiles/ph34r.gif\">",$bericht);
$bericht = str_replace("|8-|","<img src=\"img/smiles/ph34r.gif\">",$bericht);
$bericht = str_replace("8/","<img src=\"img/smiles/blink.gif\">",$bericht);
$bericht = str_replace("8-/","<img src=\"img/smiles/blink.gif\">",$bericht);
$bericht = preg_replace("#\[b\](.*?)\[/b\]#si","<b>\\1</b>", $bericht);
$bericht = preg_replace("#\[i\](.*?)\[/i\]#si","<i>\\1</i>", $bericht);
$bericht = preg_replace("#\[u\](.*?)\[/u\]#si","<u>\\1</u>", $bericht);
$bericht = preg_replace("#\[center\](.*?)\[/center\]#si","<b>\\1</b>", $bericht);
$bericht = preg_replace("#\[hr\]#si","<hr style=\"width: 50%\" align=\"left\">", $bericht);
$bericht = preg_replace("#\[code\](.*?)\[/code\]#si","<font style=\"font-family: Courier New\">\\1</font>", $bericht);
$bericht = eregi_replace("([a-zA-Z0-9_-]+)@([a-zA-Z0-9\._-]+)(\.[a-zA-Z]+)", "<a href=\"mailto:\\1@\\2\\3\">\\1@\\2\\3</a>", $bericht);
$bericht = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>",$bericht);
$bericht = preg_replace("#\[img=&quot;(.*?)&quot;\]#si","<img src=\"http://\\1\">", $bericht);
$bericht = preg_replace("#\[color=&quot;(.*?)&quot;](.*?)\[/color\]#si","<font color=\"\\1\">\\2</font>", $bericht);
echo $bericht;
?>

</font>
<hr style="width: 50%" align="left">
<font face="Arial, Helvetica, sans-serif">> <a href="?new=1">New Message </a><br>
> <a href="?new=1&reply=
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $object->id ?>
">Reply</a><br>
> <a href="javascript:verwijder('Are you sure you wants to remove this message?','?delete=
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo $object->id ?>
')">Remove</a><br>
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?
}
}
}

if($deleteall){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid'");
$result = mysql_num_rows($query);
if(!$result){
echo "Inbox is leeg</a>";
}

if($result){
$query = mysql_query("DELETE FROM priveberichten WHERE naar = '$memberid'");
$query = mysql_query("REPAIR TABLE priveberichten");
echo "Alle pms verwijderd";
}
}

if($block){
$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
while($object = mysql_fetch_object($query)){
$geblokkeerd = $object->blockpm;
}

?>

Here you can ignore other members. Place every member ID on a new line to ignore the specified members. ( <a href="profiel.php">Search memberID</a> )<br>
</font>
<form method="POST" action="?saveblock=1">
<center>
<font face="Arial, Helvetica, sans-serif">
<textarea name="blockdeze" rows="8">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
<? echo htmlspecialchars($geblokkeerd); ?>
</textarea>
<br>
<input class="button" type="submit" value="Save">
</font>
</center>
</form>
<font face="Arial, Helvetica, sans-serif">
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?
}
if($saveblock){
$query = mysql_query("UPDATE members SET blockpm = '$blockdeze' WHERE memberid = '$memberid'") or die (mysql_error());
echo "gegevens opgeslagen";
}

if($delete){
$query = mysql_query("SELECT * FROM priveberichten WHERE id = '$delete'");
$result = mysql_num_rows($query);
if(!$result){
echo "bericht bestaat niet";
}

else{
mysql_query("DELETE FROM priveberichten WHERE id = '$delete' AND naar = '$memberid'") or die(mysql_error());
echo "succesvol verwijderd";
}
}
}

else{
echo "EERST INLOGGEN!!!!";
}

?>

</font>
<p>
<a href="index.php"><< Back</a>
///////////////////////////////////////////////////////////

Wie kan me vertellen hoe diegene een PM krijgt met daarin de bestandsnaam die is geupload en de grote en de datum enz?
Ik ben een wrak in PHP dus vraag ik jullie hulp
 
PHP hulp

PHP hulp

13/01/2025 03:29:11
 
Han eev

Han eev

14/02/2005 09:11:00
Quote Anchor link
volgens het script krijg je er geen een
maar mieschien include?

edit: niet een beetje groot script?
Gewijzigd op 14/02/2005 09:16:00 door Han eev
 
Elwin - Fratsloos

Elwin - Fratsloos

14/02/2005 11:22:00
Quote Anchor link
Han:
edit: niet een beetje groot script?
Een beetje. Hmm.. Een veel te groot script..

Elwin
 
Jelle Posthuma

Jelle Posthuma

14/02/2005 12:41:00
Quote Anchor link
Kan iemand me er nog mee helpen?

Het zijn 2 scripts overigens...

Die script is van mij ik vergat alleen in te loggen toen ik em postte...
Gewijzigd op 14/02/2005 12:41:00 door Jelle Posthuma
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.