Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 10-01-2007, 08:35   #1 (permalink)
Neuer User
 
Registriert seit: Jan 2007
Beiträge: 1
Passwort in PhP übertragen.

hallo, ich hoffe ich bin hier richtig. ich habe ein problem mit php und flash.
es geht um unsere fotografenseite. ich habe ein script gekauft um es dem user zu erlauben, fotos online zu bestellen. dafür muss er sich anmelden. ich habe hierfür in der flashseite ein textfeld mit submit button erstellt.

normalerweise soll dieser login vorgang direkt in html über php laufen. aus designgründen würde ich es gerne mit flash realisieren.

die original php datei sieht wie folgt aus:
wie müsste ich die flash datei gestalten bzw. die php datei umändern???
ich hoffe es kann mir jemand helfen!

PHP-Code:
<?php
define
('DONT_START_SESSION',1);
require_once(
"../include/general.php");
require_once(
"../include/simple-textdb.php");
require_once(
"../include/password.php");
require_once(
"../include/util.php");
require_once(
"../include/filesndirs.php");
require_once(
"../include/init.php");

if(
$_SERVER['REQUEST_METHOD'] == "GET"){
    if(
session_id() == ""){
        
session_start();
        
$_SESSION["cookiecheck"] = 888;
    }
}

if(
$_SERVER['REQUEST_METHOD'] == "POST"){
    
session_start();
    if(
$_SESSION["cookiecheck"] == 888){
        if(
ini_get("session.use_trans_sid") != "1"){
            
$_SESSION["cookiesallowed"] = true;
        } else {
            
$_SESSION["cookiesallowed"] = false;
        }
    } else {
        
$_SESSION["cookiesallowed"] = false;
    }
}

$error "";
if(
session_id() != ""){
    
$_SESSION["password"] = "";
    
$_SESSION["loginAlbum"] = "";
    unset(
$_SESSION["password"]);
    unset(
$_SESSION["loginAlbum"]);
}



// read some data
$db = new simpleTextDB("../data/photogr_data.php");
$prefs = array();
$db->getNameValuePairs($prefs);
unset(
$db);

if(isset(
$_POST["passwd"])){
    
// check $_POST["passwd"]
    
$pDB = new passwordDB();
    
$album $pDB->checkLogin($_POST["passwd"]);
    if(
$album === false){
        
// login failed
        
$error "<span class=\"red\"><b>Error:</b><br>".htmlentities($prefs["wPasswort"],ENT_QUOTES,"UTF-8")."</span>";
        
$_SESSION["password"] = "";
        
$_SESSION["loginAlbum"] = "";
        unset(
$_SESSION["password"]);
        unset(
$_SESSION["loginAlbum"]);
    } else {
        
$_SESSION["password"] = $_POST["passwd"];
        
$go AddSID("../user/intro.php");
            
        
initSessionData();
        
$_SESSION["loginAlbum"] = $album;
        
$_SESSION["currAlbum"] = $album;
    
        if(
$album == "admin"){
            
$go AddSID("../admin/albumlist.php");
        }
        
header("Location: ".$go);
        exit;
    } 
}
// read login text
$loginFilename "../data/logintext.txt";
$textfield implode("",file($loginFilename));
$textfield nl2br(htmlentities($textfield,ENT_QUOTES,"UTF-8"));

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $prefs["sitetitle"];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="Keywords" content="bytepix, Fotograf, photographer, online, online-Album, album, alben, photograph, bilder, images, bestellen, order, Bilder-Shop, image shop, portraits, Hochzeiten, wedding, Studioaufnahmen, studio, erotic, Erotik-Fotografie, Presse, press" />
<meta name="Description" content="bytepix - Online-Alben, die verkaufen! Für Fotografen die Hochzeiten, Portraits, Erotik, Events und anderes fotografieren. Mit bytepix stellen Sie die Bilder Ihrer Shootings ins Netz und erleichtern so Auswahl und Bestellung für Ihre Kunden. Sell Online! For photographers who take fotos of weddings, portraits, erotic, events and other topics. Bring your fotos into the web, to make selection and ordering easy for Your customer." />
<!-- COPYRIGHT: (c) 2006 bytework gmbh, Germany, [url]www.bytepix.de[/url] -->
<style type="text/css">
<!--
body, p, a {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: <?php echo $prefs["logintextcol"];?>;
    margin: 0;
    padding: 0;
    text-decoration: none;
}
body {
    background-color: <?php echo $prefs["loginbgcol"];?>;
    text-align: center;
}
h1 { font-size:14px; font-weight:bold; }
p { padding-bottom: 20px; }
a {    color: <?php echo $prefs["logintextcol"];?>; text-decoration: none; font-weight: bold; }
a:link { color: <?php echo $prefs["logintextcol"];?>; text-decoration: none; font-weight: bold; }
a:hover { color: #EE0000; text-decoration: none; font-weight: bold; }
#pageblock{ position:static; width: 410px; margin-right: auto; margin-left: auto; }
#theimage { position:relative; }
#textblock { position:relative; text-align:left; padding-top: 20px; width: 400px;}
#login { position:relative; width: 400px;}
#thelink { position:relative; text-align:center; width: 400px; padding-top: 10px;}
-->
</style>
<?php 
$css 
"../data/login.css";
if(
file_exists($css)){
    
printf("<link href=\"%s\" rel=\"stylesheet\" type=\"text/css\">",$css);
}
?>
</head>
<body>
<div id="pageblock" align="center">
  <div id="theimage"><img src="../data/images/logogross.jpg" alt="login image" /></div>
  <div id="textblock">
    <p>
      <?php echo $textfield?>
    </p>
    <p>
      <?php if($error != "") echo $error."<br />\n"?>
    </p>
  </div>
  <div id="login"> 
    <form action="index.php" method="post" name="form1" class="form" id="form1">
      <input type="password" name="passwd" class="feld" />
      <input type="submit" name="Submit" value="login" class="submit" />
    </form>
  </div>
  <div id="thelink"><a href="impressum.php" target="_blank" >
    <?php echo htmlentities($prefs["wImpressum"],ENT_QUOTES,"UTF-8");?>
    </a></div>
</div>
<script language="JavaScript" type="text/javascript">
  document.form1.password.focus();
</script> 
</body>
</html>

Geändert von yannicschon (10-01-2007 um 08:48 Uhr)
yannicschon ist offline   Mit Zitat antworten
Alt 10-01-2007, 08:42   #2 (permalink)
Supermassive
 
Benutzerbild von elysian
 
Registriert seit: Aug 2004
Ort: Frankfurt, Bornheim
Beiträge: 861
xervus und willkommen im ff!

editiere mal deinen beitrag und pack den code in [ php]...[ /php] tags - ich bezweifle, dass das so jemand lesen wird...

cheers, thomas
__________________
Personal » amenity*blogging » elysian.de » Flexpertise - Enterprise Flex Collaboration
Networks » Xing » ColdFusion Community
Everything Cairngorm »
cairngormdocs.org
elysian ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

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

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



Alle Zeitangaben in WEZ +1. Es ist jetzt 00:18 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele