Antworten

Thema: login

Nachricht

Klicke hier, um dich anzumelden

 

Du kannst aus dieser Liste ein Symbol für deine Nachricht auswählen.

Zusätzliche Einstellungen

  • Wenn du diese Option aktivierst, werden URLs automatisch mit BB-Code ergänzt. www.beispiel.de wird zu [URL]http://www.beispiel.de[/URL].

Thema bewerten

Wenn du möchtest, kannst du dieses Thema bewerten.

Übersicht (Neuester Beitrag zuerst)

  • 24.08.2004
    Montoyafan
    Hi,

    Original von Grapfe
    @ montoyafan: hab ich mir zuerst auch gedacht, aber dabei kommt ein login fehler.
    Und was für ein Fehler kommt genau?

    Gib den mal wieder.

    Kann man davon mal ein Live Beispiel sehen?

    Cu
  • 23.08.2004
    Grapfe
    @ montoyafan: hab ich mir zuerst auch gedacht, aber dabei kommt ein login fehler.

    evtl hilft euch ja der ganze code:

    <?
    #####################
    $conf = "news/config.php";
    #####################

    // Config Auslesen
    $config = file($conf);
    $config = explode("|--|",$config[1]);
    $nps = $config[1];
    $code = $config[2];
    $head_links = $config[4];
    $pn_db = $config[5];
    $pn_images = $config[6];
    $pn_temp = $config[7];
    $pn_lang = $config[8];
    $dateiname = $config[9];
    $admin_file = $config[10];
    $prefix = $config[11];
    $fontface = $config[12];
    $fontsize = $config[13];
    $sml_font = $fontsize - 1;
    $lrg_font = $fontsize + 1;
    $tbsize = "$config[14]%";
    $tbcolor1 = $config[15];
    $tbcolor2 = $config[16];
    $site_name = $config[18];
    $servertime = ($config[20]*60)*60;
    $news_submit= $config[21];
    $submit_value = $config[22];
    $rel_aus = $config[23];
    $email_submit = $config[24];
    $max_b = $line[25];
    $highlight = $config[26];
    $foot_links = $config[27];
    $quote_hr_color = $config[28];
    $smilies_db = $config[29];
    $java_s = $config[30];
    //-- Ende
    //------Register Globals
    $GET_POST = array_merge($_GET, $_POST, $_SESSION);
    extract($GET_POST);
    //------
    // Datenbank Auslesen
    $db = file("$pn_db/news.dat");
    $db_anz = count($db);
    $kate = file("$pn_db/kats.dat");
    $anz_kat = count($kate);
    $db_sub = file("$pn_db/submit.dat");
    $anz_sub = count($db_sub);
    // Ende

    $seiten = $db_anz/$nps;
    $seiten = ceil($seiten);
    // Dateien Includen
    include("$pn_lang/language.php");
    $sort_dropdown = sort_dropdown();
    // Ende

    // Header
    $head = "$pn_temp/header.html";
    $open_head = fopen($head, "r");
    $head = fread($open_head, filesize($head));
    $head = ereg_replace("\{admin\}","<a href=\"$dateiname$prefix=admin\">$ab</a>",$head);
    $head = ereg_replace("\{news\}","<a href=\"$dateiname\">$ac</a>",$head);
    $head = ereg_replace("\{anz\}","$db_anz",$head);
    $head = ereg_replace("\{anz_aktiv\}","$anz_sub",$head);
    $head = ereg_replace("\{seiten\}","$seiten",$head);
    $head = ereg_replace("\{submit\}","<a href=\"$dateiname$prefix=submit\">$fg</a>",$head);
    $head = ereg_replace("\{search\}","<a href=\"$dateiname$prefix=search\">$ft</a>",$head);
    $head = ereg_replace("\{logout\}","<a href=\"$dateiname$prefix=logout\">$gc</a>",$head);
    $head = ereg_replace("\{archiv\}","<a href=\"$dateiname$prefix=archiv\">$gg</a>",$head);
    $head = ereg_replace("\{kategorien\}","$sort_dropdown",$head);
    fclose($open_head);
    // Ende

    //---- Admin Center
    {
    $login = user_login($login);
    if($login == 'TRUE')
    {
    $status = user_status($user);
    $user_name = user_name($user);
    if($cookie_on==ON)
    {
    $java = java(admin);
    echo $java;
    }
    echo "<center><font face=\"$fontface\"size=\"4\">$ap</font></center><br><center><a href=\"$dateiname$prefix=post&user=$user&passwort=$passwort&status=$status\"><font size=\"$fontsize\"face=\"$fontface\">$cb</font></a> ? ";
    if($status=='0')
    {
    echo "<a href=\"$dateiname$prefix=member&user=$user&passwort=$passwort\"><font size=\"$fontsize\"face=\"$fontface\">$cc</font></a> ? ";
    }
    echo "<a href=\"$dateiname$prefix=memberlogin&user=$user&passwort=$passwort\"><font size=\"$fontsize\"face=\"$fontface\">$cd</font></a></center><br>";
    if($status!='2')
    {
    $db_sub = file("$pn_db/submit.dat");
    $anz_sub = count($db_sub);
    echo "<div align=\"center\"><center>";
    if($anz_sub!=0)
    {
    echo "<p style=\"margin-top: 0; margin-bottom: 0\" align=\"center\"><b>$gz</b></p>
    <div align=\"center\">
    <center><table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"$tbsize\" id=\"AutoNumber1\">
    <tr bgcolor=\"$tbcolor1\">
    <td width=\"61%\"><b>$gw</b></td>
    <td width=\"13%\"><p align=\"center\"><b><font size=\"$fontsize\"face=\"$fontface\">$gx</font></b></td>
    <td width=\"13%\"><p align=\"center\"><b><font size=\"$fontsize\"face=\"$fontface\">$he</font></b></td>
    <td width=\"13%\"><p align=\"center\"><b><font size=\"$fontsize\"face=\"$fontface\">$gy</font></b></td>
    </tr>";
    $i = 0;
    while($i<$anz_sub)
    {
    $sub_data = explode("|--|",$db_sub[$i]);
    echo "<tr bgcolor=\"$tbcolor2\">
    <td width=\"61%\"><p style=\"margin-top: 0; margin-bottom: 0\">$sub_data[1]</td>
    <td width=\"13%\"><center><a href=\"$dateiname$prefix=aktivnews&id=$i&user=$user&passwort=$passwort\"><img border=\"0\"src=\"$pn_images/aktiv.gif\"></a></center></td>
    <td width=\"13%\"><center><a href=\"$dateiname$prefix=editform&id=$i&user=$user&passwort=$passwort&fileform=submit\"><img border=\"0\"src=\"$pn_images/edit.gif\"></a></center></td>
    <td width=\"13%\"><p style=\"margin-top: 0; margin-bottom: 0\" align=\"center\"><a href=\"$dateiname$prefix=del_inaktivnews&id=$i&user=$user&passwort=$passwort\"><img border=\"0\"src=\"$pn_images/delete.gif\"></a></td>
    </tr>";
    $i++;
    }
    echo "</table></center></div><br>";
    }
    echo "<p style=\"margin-top: 0; margin-bottom: 0\" align=\"center\"><b>Aktive News</b></p><table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"$tbsize\" id=\"AutoNumber1\">
    <tr bgcolor=\"$tbcolor1\">
    <td width=\"62%\"><font size=\"$fontsize\"face=\"$fontface\"><b>$ce</b></font></td>
    <td width=\"12%\"><font size=\"$fontsize\"face=\"$fontface\"><b><center>$cf</center></b></font></td>
    <td width=\"12%\"><font size=\"$fontsize\"face=\"$fontface\"><b><center>$cg</center></b></font></td>
    <td width=\"16%\"><font size=\"$fontsize\"face=\"$fontface\"><b><center>$ch</center></b></font></td>
    </tr>";
    $news_a = file("$pn_db/news.dat");
    $anz = count($news_a);
    $i = 0;
    $anz2 = $anz -1;
    while($i < $anz)
    {
    $news = explode("|--|", $news_a[$anz2]);
    $anz_fb = $news[5];
    echo "<tr bgcolor=\"$tbcolor2\">
    <td width=\"62%\"><font size=\"$fontsize\"face=\"$fontface\">$news[1]</font></td>
    <td width=\"12%\"><font size=\"$fontsize\"face=\"$fontface\"><center>";
    if($status=='0' OR $status=='1' OR $status=='2' AND $news[0]==$user_name)
    {
    echo "<a href=\"$dateiname$prefix=editform&id=$anz2&user=$user&passwort=$passwort\"><img border=\"0\"src=\"$pn_images/edit.gif\"></a>";
    }
    elseif($status=='2' AND $news[0]!=$user_db[0])
    {
    echo "<img border=\"0\" title=\"Nicht Editierbar/Not Editable\" src=\"$pn_images/non.gif\">";
    }
    echo "</center></font></td><td width=\"12%\"><font size=\"$fontsize\"face=\"$fontface\" size=\"2\"><center>";
    if($status=='0' OR $status == '1')
    {
    echo "<a href=\"$dateiname$prefix=delform&id=$anz2&user=$user&passwort=$passwort\"><img border=\"0\"src=\"$pn_images/delete.gif\"></a>";
    }
    elseif($status=='2')
    {
    echo "<img border=\"0\" title=\"Nicht Löschbar/Not Deleteable\" src=\"$pn_images/non.gif\">";
    }
    echo "</center></font></td><td width=\"16%\"><font size=\"$fontsize\"face=\"$fontface\" size=\"2\"><center>";
    if($status=='0' OR $status == '1')
    {
    echo "<a href=\"$dateiname$prefix=listcomments&id=$anz2&user=$user&passwort=$passwort\">$ci($anz_fb)</a>";
    }
    elseif($status=='2')
    {
    echo "$ci($anz_fb)";
    }
    echo "</center></font></td>
    </tr>";
    $i++;
    $anz2--;
    }
    echo "</table></center></div>";
    }
    }
    else
    {
    $cook = explode("...",$HTTP_COOKIE_VARS[PNews]);
    echo"<form method=\"POST\" action=\"$dateiname$prefix=admin\">
    <div align=\"center\">
    <center>
    <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"40%\" id=\"AutoNumber1\">
    <tr bgcolor=\"$tbcolor1\">
    <td width=\"100%\" colspan=\"2\"><font size=\"$fontsize\" face=\"$fontface\"><center><b>$ev</b></center></font></td>
    </tr>
    <tr bgcolor=\"$tbcolor2\">
    <td width=\"50%\"><font size=\"$fontsize\" face=\"$fontface\">$cj</font></td>
    <td width=\"50%\"><font size=\"$fontsize\"face=\"$fontface\"><select size=\"1\" name=\"user\">";
    $i = 2;
    $user_db = file("$pn_db/user.dat");
    $user_anz = count($user_db);
    while($i < $user_anz)
    {
    $username = explode("|-|", $user_db[$i]);
    if($cook[1]==$i)
    {
    echo "<option selected value=\"$i\">$username[2]</option>";
    }
    else
    {
    echo "<option value=\"$i\">$username[2]</option>";
    }
    $i++;
    }
    echo "</select></font></td>
    </tr>
    <tr bgcolor=\"$tbcolor2\">
    <td width=\"50%\"><font size=\"$fontsize\" face=\"$fontface\">$ck</font></td>
    <td width=\"50%\"><font size=\"$fontsize\"face=\"$fontface\"><input type=\"password\" value=\"$cook[0]\" name=\"passwort\" size=\"20\"></font></td>
    </tr>
    ";
    if($passwort != '')
    {
    echo "<tr bgcolor=\"$tbcolor2\">
    <td width=\"50%\"><font size=\"$fontsize\" face=\"$fontface\"><center><b>$gl</b></center></font></td>
    <td width=\"50%\"><font size=\"$fontsize\"face=\"$fontface\">$gm</font></td>
    </tr>";
    $username = explode("|-|", $user_db[$user]);
    $betreff = "Error Login: $username[0]";
    $text = $go;
    $timestamp = $servertime+time();
    $date = date("H:i - d.m.Y",$timestamp);
    $text .= " @ $date";
    @mail("$username[3]", $betreff, $text, "From: P-News Admin <noreply>");
    }
    echo "<tr>
    <td width=\"100%\" colspan=\"2\"><p align=\"center\"><font size=\"$fontsize\"face=\"$fontface\"><input type=\"submit\" value=\"Log In\" name=\"B1\"></font></td>
    </tr>
    </table>
    </center>
    </div>
    </form>";
    }
    }
    ?>
  • 23.08.2004
    gateway
    Oke hast recht anpassen muss ma nix weil ja die Kontrolle da gar nicht dürchgeführt wird... naja war scho spät

    LG

    Gate
  • 22.08.2004
    Montoyafan
    Hallo,

    so gehts, anpassen musst Du nichts:

    Code:
    <td width=\"50%\"><font size=\"$fontsize\" face=\"$fontface\">$cj</font></td>
    <td width=\"50%\"><font size=\"$fontsize\"face=\"$fontface\">
    <input type=\"text\" name=\"user\" size=\"20\"></font></td>
    </tr>
    <tr bgcolor=\"$tbcolor2\">
    <td width=\"50%\"><font size=\"$fontsize\" face=\"$fontface\">$ck</font></td>
    <td width=\"50%\"><font size=\"$fontsize\"face=\"$fontface\"><input type=\"password\" value=\"$cook[0]\" name=\"passwort\" size=\"20\"></font></td>
    </tr>
    Cu
  • 22.08.2004
    Grapfe
    und wie mach ich das?
  • 22.08.2004
    gateway
    Du müsstest das option select ändern in ein einfaches input type = "text" allerdings musst du dann natürlich auch die kontrollroutine anpassen.

    LG

    Gate
  • 22.08.2004
    Grapfe
    hallo, hab folgendes prob:
    möchte mich in ein newssystem einloggen, doch das login formular ist soll gleich auf der index sein. soweit so gut.
    bloß das blöde is halt, dass man den user per drowpdown auswählen muss, was dann aber nicht mehr ins design passt.
    wie muss ich das script umschreiben, damit anstatt dem dropdown menü ein einfaches eingabefeld zu sehen ist (wie fürs passwort)

    hier der code:

    <td width=\"50%\"><font size=\"$fontsize\" face=\"$fontface\">$cj</font></td>
    <td width=\"50%\"><font size=\"$fontsize\"face=\"$fontface\"><select size=\"1\" name=\"user\">";
    $i = 0;
    $user_db = file("$pn_db/user.dat");
    $user_anz = count($user_db);
    while($i < $user_anz)
    {
    $username = explode("|-|", $user_db[$i]);
    if($cook[1]==$i)
    {
    echo "<option selected value=\"$i\">$username[0]</option>";
    }
    else
    {
    echo "<option value=\"$i\">$username[0]</option>";
    }
    $i++;
    }
    echo "</select></font></td>
    </tr>
    <tr bgcolor=\"$tbcolor2\">
    <td width=\"50%\"><font size=\"$fontsize\" face=\"$fontface\">$ck</font></td>
    <td width=\"50%\"><font size=\"$fontsize\"face=\"$fontface\"><input type=\"password\" value=\"$cook[0]\" name=\"passwort\" size=\"20\"></font></td>
    </tr>

Berechtigungen

  • Neue Themen erstellen: Ja
  • Themen beantworten: Ja
  • Anhänge hochladen: Ja
  • Beiträge bearbeiten: Ja
  •