OnlineWebService Webmaster Foren     Zu OnlineWebService.de - Gästebücher, Flash Gästebücher, Foren, Umfragen, Counter

Zurück   OnlineWebService Webmaster Foren > OWS Webmaster Foren > PHP, Perl, Flash, Actionscript

Antwort
 
Themen-Optionen Ansicht
  #21  
Alt 24.07.2005, 15:00
Unregistriert
Gast
 
Beiträge: n/a
Standard AW: PHP-Scriptelchen

Zitat:
Zitat von saschas
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td> </td></tr><tr><td id="QUOTE">
&lt;html&gt;

&lt;head&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;../css/sds.css&quot; type=&quot;text/css&quot;&gt;
&lt;title&gt;..::ANNOMAILER 1.3::..&lt;/title&gt;

&lt;meta name=&quot;author&quot; content=&quot;sdswebdesignonline&quot;&gt;
&lt;META NAME=&quot;robots&quot; CONTENT=&quot;NOINDEX,NOFOLLOW&quot;&gt;
&lt;/head&gt;

&lt;body text=&quot;#000000&quot; bgcolor=&quot;#dfdfdf&quot; link=&quot;#FF0000&quot; alink=&quot;#FF0000&quot; vlink=&quot;#FF0000&quot;&gt;
&lt;font color=&quot;#000000&quot; face=&quot;Verdana&quot;&gt;
&lt;center&gt;&lt;b&gt;..::Annonymer-Mailer V. 1.3::..&lt;/b&gt;&lt;/center&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;form action=&quot;&quot; method=&quot;post&quot; target=&quot;&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font color=&quot;#000000&quot; face=&quot;Verdana&quot;&gt;From:/Von:&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type=&quot;Text&quot; name=&quot;from&quot; value=&quot;&quot; size=&quot;&quot; maxlength=&quot;&quot; style=&quot;background-color:'#dfdfdf'; color:'#ff0000';&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font color=&quot;#000000&quot; face=&quot;Verdana&quot;&gt;To:/An:&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type=&quot;Text&quot; name=&quot;to&quot; value=&quot;&quot; size=&quot;&quot; maxlength=&quot;&quot; style=&quot;background-color:'#dfdfdf'; color:'#ff0000';&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font color=&quot;#000000&quot; face=&quot;Verdana&quot;&gt;Subject/Betreff:&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type=&quot;Text&quot; name=&quot;subject&quot; value=&quot;&quot; size=&quot;&quot; maxlength=&quot;&quot; style=&quot;background-color:'#dfdfdf'; color:'#ff0000';&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br/&gt;Body/Text:&lt;br/&gt;
&lt;textarea name=&quot;body&quot; cols=&quot;35&quot; rows=&quot;10&quot; style=&quot;background-color:'#dfdfdf'; color:'#ff0000';&quot;&gt;&lt;/textarea&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;input type=&quot;Submit&quot; name=&quot;&quot; value=&quot;Mail senden&quot;&gt; &lt;input type=&quot;reset&quot; value=&quot;Löschen&quot;&gt;&lt;/form&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;?php
if (isset($to) &amp;&amp; $to != &quot;&quot {
if(mail(&quot;$to&quot;, &quot;$subject&quot;, &quot;$body&quot;, &quot;From: $from&quot) {

echo &quot;Ihre IP: &quot;;
echo &quot;$REMOTE_ADDR&quot;;
echo &quot;&lt;br&gt;&lt;br&gt;OK! Ihre E-Mail wurde gesendet:&lt;br&gt;&lt;br&gt;&lt;b&gt;From: $from&lt;br&gt;To: $to&lt;br&gt;Subject: $subject&lt;br&gt;Body:&lt;br/&gt; $body&lt;/b&gt;&quot;;

}
else {
echo &quot;Ihre IP:&quot;;
echo &quot;$REMOTE_ADDR&quot;;
echo &quot;&lt;br&gt;&lt;br&gt;Ooops! He did it again! Da ist was schiefgegangen, bitte versuchen Sie es erneut!&quot;;

}
}
?&gt;
<span id='postcolor'>

kleiner anno-mailer!
der php teil kann natürlich auch in eine extra dat.

Tschüssi,
Sascha[/quote]
Mit Zitat antworten
  #22  
Alt 26.09.2005, 19:52
Unregistriert
Gast
 
Beiträge: n/a
Standard AW: PHP-Scriptelchen

Zitat:
Counter als Image

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td> </td></tr><tr><td id="CODE">
/* DB Connection */
mysql_connect($mysqlhost, $mZXZXysqluser, $mysqlpassword);
mysql_select_db($mysqldb);

/* Standart Image Hight */
$hight = 85;

/* Read DB Data */
$counter = mysql_fetch_array(mysql_query("SELECT gesamt, tag FROM hfb".$n."_stats_counter"));
$useronline = mysql_fetch_array(mysql_query("SELECT count(ip) FROM hfb".$n."_useronline"));

$result = mysql_query("SELECT DISTINCT location FROM hfb".$n."_useronline");
while($row = mysql_fetch_array($result)) {
$onpage = mysql_fetch_array(mysql_query("SELECT count(ip) AS onpage FROM hfb".$n."_useronline WHERE location='".$row['location']."'"));
$userbit .= "\n\r» ".$onpage['onpage']." User @ ".$row['location'];
$hight=$hight+10;
unset($onpage);
}

/* Create New Image */
$image = imagecreate(150, $hight);
imagefill($image, 0, 0, imagecolorallocate($image, 46, 46, 46));
$top_left = imagecolorallocate($image, 0, 0, 0);
$right_bottom = imagecolorallocate($image, 82, 82, 82);
imageline($image, 0, 0, 150, 0, $top_left);
imageline($image, 0, 0, 0, $hight, $top_left);
imageline($image, 150-1, 0, 150-1, $hight, $right_bottom);
imageline($image, 0, $hight-1, 150, $hight-1, $right_bottom);

/* Set String to Image */
$imagestring = "Besucher bisher: ".$counter['gesamt']."\n\rin den letzten 24h: ".$counter['tag']."\n\r\n\rTotal ".$useronline['0']." User Online.".$userbit."\n\r\n\r--------------------------\n\rDate: ".date("d.m.y, H:i");
ImageTTFText ($image, 10, 0, 5, 10, imagecolorallocate($image, 174, 174, 142), "./fonttyps/VERDANA.TTF", $imagestring);

/* Send Browser Output */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") ." GMT");
header("Content-Type: image/png");
imagepng($image);
imagedestroy($image);
<span id='postcolor'>

p.S. Das ist nur die ausgabe der Daten[/quote]
Mit Zitat antworten
  #23  
Alt 16.06.2006, 14:31
PPunisherP PPunisherP ist offline
Neuer Benutzer
 
Registriert seit: 16.06.2006
Beiträge: 1
Standard AW: PHP-Scriptelchen

Hallo,

Kann ich für das im Zitat stehende upload skript was machen das nur die Filetypen jpg,gif und bmp oder mer waren nur beispiele erlaubt sind? Weil bei meinem Hoster hab ich zwar unbegrenzt Speicher aber es dürfen eben nur bestimmte Filetypen auf dem Server liegen sonst ist der account futsch. Kann mir jemand helfen? | Und Opptional würd ich gern noch viell. ein Password schutz reinmachen aber das ist nur nebensache!
Zitat:
<?php

// CSS-Style:
$cssstyle =
'<style type="text/css"><!--
a:link{color:#000000;}
a:visited{color:#999999;}
a:hover{color:#999999;}
a:active{color:#f999999;}
--></style>';


//************************************************** ************
// Programm:
//************************************************** ************

echo "$cssstyle";

// Links on Top
head();

// Startsite

// Get $path & $action
if ($SubmitDir || $SubmitUpload)
{$path = $chosenpath;}
else
{$path = $_GET["path"];}

$action = $_GET["action"];

// choose downloadpath
if ($action == "download" && $path == '')
{
$all_dirs = get_all_dirs();
choose_download_dir($all_dirs);
}

// choose downloadfile
if ($action == "download" && $path != '')
{
$all_dirs = get_all_dirs();
choose_download_dir($all_dirs);
$all_files = listen_dir($path);
choose_download($all_files, $path);
}

// choose upload
if ($action == "upload" && !$SubmitUpload)
{
$all_dirs = get_all_dirs();
choose_upload($all_dirs);
}

// do upload
if ($SubmitUpload)
{
upload($path);


}

// Links on bottom
foot();


//************************************************** ************
// Functions:
//************************************************** ************

function head()
{
echo '
<html>
<head>
<title>Upload/Download</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<font face="tahoma">
<div align="center"> <a href="';
echo "$PHP_SELF";
echo '?action=">Startseite</a> | <a href="';
echo "$PHP_SELF";
echo '?action=download">Download</a>
| <a href="';
echo "$PHP_SELF";
echo'?action=upload">Upload</a> </div>
';
}

function foot()
{
echo '
</font>
</body>
</html>
';
}

function choose_download_dir($all_dirs)
{
echo '<br><div align="center">';
echo "Choose Directory for Download:";
echo '<form name="form1" method="post" action="';
echo "$PHP_SELF?action=download";
echo '">';
echo '<select name="chosenpath">';

for ($i = 0; $i < count($all_dirs); $i++)
{
echo '<option>';
echo "$all_dirs[$i]";
echo '</option>';
}

echo '</select>';
echo ' ';
echo '<input type="submit" name="SubmitDir" value="Choose" class="SB_button">';
echo '</form></div>';
}

function choose_download($all_files, $path)
{
echo '<table width="90%" border="0" align="center" bordercolor="#000000">
<tr>
<td><font face=tahoma size=2><b>Filename:</b></font></td>
<td><font face=tahoma size=2><b>Size:</b></font></td>
<td><font face=tahoma size=2><b>Date:</b></font></td>
</tr>
<tr>
<td><font face=tahoma size=2></font></td>
<td><font face=tahoma size=2></font></td>
<td><font face=tahoma size=2></font></td>
</tr>';
for ($i = 0; $i < count($all_files); $i++)
{
if ($bgcolor == "#CCCCCC") {$bgcolor = "#FFFFFF";}
else {$bgcolor = "#CCCCCC";}
$file = $path . "/" . $all_files[$i];
$file_date = @date("d.m.Y", filemtime($file));
$file_size = (int)(filesize($file)/2048);
if ($file_date == "01.01.1970") {$file_date = "-";}

echo "<tr bgcolor=$bgcolor>
<td><font face=tahoma size=2><a href=$file>$all_files[$i]</a></font></td>
<td><font face=tahoma size=2>$file_size KB</font></td>
<td><font face=tahoma size=2>$file_date</font></td>";
}
echo '</table>';
}

function listen_dir($dir)
{
$dir .= "/";
if (file_exists($dir))
{
!$opendir = opendir($dir);
$i = 0;
while ($file = readdir($opendir))
{
$ext = strrchr($file,'.');
if ($ext != '' && $file != '.' && $file != '..')
{
$all_files[$i] = $file;
$i++;
}
}
closedir($opendir);
return $all_files;
}
}

function get_all_dirs()
{
$verz=opendir ('.');
$i = 0;
while ($file = readdir ($verz))
{
if(is_dir($file) && $file != "." && $file != "..")
{
$all_dirs[$i] = $file;
$i++;
}
}
closedir($verz);
return $all_dirs;
}

function choose_upload($all_dirs)
{
echo '<br><div align="center">';
echo "Choose Directory for Upload:";
echo '<form enctype="multipart/form-data" name="form1" method="post" action="';
echo "$PHP_SELF?action=upload";
echo '">';
echo '<select name="chosenpath">';

for ($i = 0; $i < count($all_dirs); $i++)
{
echo '<option>';
echo "$all_dirs[$i]";
echo '</option>';
}

echo '</select>';
echo '<p>Choose File for Upload:<p>';

for ($i = 0; $i <5; $i++)
{
echo '<input type="file" name="uploadfile';
echo "$i";
echo' "><br>';
}

echo '<p><input type="submit" name="SubmitUpload" value="Upload" class="formbutton">';
echo '</form></div>';
}

function upload($path)
{
echo "<p>";
foreach ($_FILES as $upfile_info) {
if (($file_name=$upfile_info['name'])!='') {
$file_name = stripslashes($file_name);
$file_name = str_replace("'","",$file_name);
$dest_location=$path."/".$file_name;
$ext = strrchr($file_name,'.');
if (!file_exists($dest_location) && ($ext != ".php"))
{
$copy = copy($upfile_info['tmp_name'], $dest_location);
}
else {$MSG = "File already exists or Fileextension not allowed!";}
$type=$upfile_info['type'];
$size=(int)($upfile_info['size']/1024);
$MSG="<b>$dest_location</b> (mime: $type | size: $size KB)";
echo "<div align=center><font size=2>Successfully uploaded file: $MSG</font></div><br>";
}
}

}


?>
Mit Zitat antworten
  #24  
Alt 22.09.2015, 15:17
Ryder Ryder ist offline
Neuer Benutzer
 
Registriert seit: 22.09.2015
Beiträge: 3
Standard AW: PHP-Scriptelchen

Danke für die tollen Scripte!
Mit Zitat antworten
Antwort

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
PHP in Flash einbinden ? xFuture PHP, Perl, Flash, Actionscript 8 25.09.2003 16:56
HTML, CGI, Java, PHP Haribo Homepage-Basteln Allgemein 34 10.08.2002 15:28
CURL & PHP Warhog Homepage-Basteln Allgemein 11 16.07.2002 07:34
PHP Homepage-Basteln Allgemein 12 05.05.2002 22:50


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:13 Uhr.


Powered by vBulletin® Version 3.8.1 (Deutsch)
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
OnlineWebService.de