kostenloser Webspace werbefrei: lima-city


Brauche hilfe bei ne php script was ich echt nicht verstehe wo der fehler ist :(

lima-cityForumProgrammiersprachenPHP, MySQL & .htaccess

  1. Autor dieses Themas

    xtreme

    Kostenloser Webspace von xtreme

    xtreme hat kostenlosen Webspace.

    http://xtreme.xardas.lima-city.de/Imageview5-install/imageview5/admin/login.php

    der link ich weiss echt nicht wo der fehler ist habe alle versucht und ich kann mich nicht einlogen

    hier der PHP script :( wenn kann mir helfen ???

    der fehler ist irgend wo vorne vom script weiss nur nicht was das f?r ne fehler ist :(

    <?php
    //load settings
    require('config.php');
    //check if admin
    if($_COOKIE['isadmin'] !== 'isadmin'.'isadmin'){
    echo 'You are not logged in!<br><a target="_parent" href="../index.php?admin">Click Here</a> to go to the login screen.<link rel="stylesheet" type="text/css" href="../data/style/admin.css">';
    exit;
    }
    //load classes
    require('classes/class.crypt.php');
    //create Crypto
    $crypto = new Crypto();
    $crypto->password = 'imageview';

    //check if we need to save the log file?
    if(isset($_POST['action'])){
    $_POST['txtUser'] = $crypto->encrypt($_POST['txtUser']);
    $_POST['txtPass'] = $crypto->encrypt($_POST['txtPass']);
    $_POST['txtmagickbin'] = str_replace("'", '\"', $_POST['txtmagickbin']);
    $nl = "\r\n";
    $tab = "\t";
    $newconf_full = '<?php'.$nl;
    $newconf_full = $newconf_full.$tab.'$username = "'.$_POST['txtUser'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$password = "'.$_POST['txtPass'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$show_comment = "'.$_POST['rbComment'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$default_album = "'.$_POST['lsDefAlbum'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$view = "'.$_POST['mode'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$tn_col = "'.$_POST['txtThumbCol'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$tn_size_width = "'.$_POST['txtTnWidth'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$tn_size_height = "'.$_POST['txtTnHeight'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$tn_quality = "'.$_POST['txtQuality'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$imglib = "'.$_POST['rbimglib'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$magickbin = "'.$_POST['txtmagickbin'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$annotate = "'.$_POST['txtAnnotation'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$resizemenu = "'.$_POST['rbResize'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$mail = "'.$_POST['rbMail'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$rss = "'.$_POST['rbRSS'].'";'.$nl;
    $newconf_full = $newconf_full.$tab.'$smart_tn = "'.$_POST['rbsmarttn'].'";'.$nl;
    $newconf_full = $newconf_full.'?>';
    $file = fopen('config.php','w+');
    fwrite($file, $newconf_full);
    fclose($file);
    $umaskold = umask(0);
    chmod('config.php',0777);
    umask($umaskold);
    if($_COOKIE['isadmin'] !== $_POST['txtUser'].$_POST['txtPass']){
    setcookie("isadmin", $_POST['txtUser'].$_POST['txtPass'], 0, "/");
    }
    echo '<meta http-equiv="refresh" content="0; URL=settings.php?saved">';
    exit;
    }

    //decrypt user and pass
    $username = $crypto->decrypt($username);
    $password = $crypto->decrypt($password);
    /*
    Function GetAlbums
    */
    function GetAlbum($dir, $subpath){
    require('config.php');
    //check for ending /
    if(substr($dir, strlen($dir)-1, 1) !== '/'){
    $dir = $dir.'/';
    }
    //Generate Content
    if ($handle = opendir($dir)){
    while (false !== ($file = readdir($handle))) {
    if($file == "."){
    // do nothing is parent
    }elseif($file == "..") {
    // do nothing is parent
    }elseif($file == "...") {
    // do nothing is parent
    }elseif(is_dir($dir.'/'.$file) == "1") {
    if(file_exists($dir.'/'.$file.'/data.dat')){
    require($dir.'/'.$file.'/data.dat');
    }else{
    $user_alb = '';
    $passwd_alb = '';
    $comment = '';
    $description = '';
    $lock = '';
    $upload = '';
    $group = '';
    }
    $count = $count + 1;
    $parent = substr($dir, 7, strlen($dir)-7);
    if($subpath !== ''){
    if(substr($subpath, -1) !== '/'){
    $subpath = $subpath.'/';
    }
    }
    if($group == 1){
    GetAlbum($dir.$file, $subpath.$file);
    }else{
    echo '<option value="'.$subpath.$file.'"';
    if($default_album == $subpath.$file){
    echo ' selected';
    }
    echo '>'.$subpath.$file.'</option>';
    }
    }
    }
    }
    }
    ?>
    <html>
    <head>
    <title>Imageview 5 :: Admin :: Settings</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="../data/style/admin.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    .line{
    /*
    border-bottom-color: #000000;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    */
    background-color: #CCCCCC;
    }
    .bottom-line{
    border-bottom-color: #000000;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    }
    </style>
    </head>

    <body <?php if(isset($_GET['saved'])){ echo 'OnLoad="alert(\'Your Settings Have Been Saved!\');"'; } ?>>
    <form action="settings.php" method="post" name="frmsettings" target="_self">
    <table width="100%" border="0" cellspacing="1" cellpadding="0">
    <tr>
    <td height="20" colspan="2" background="../data/images/layout/fill_admin.png"><b><font color="#605F7F"><font color="#FFFFFF">Imageview 5 :: Settings</font></font></b></td>
    </tr>
    <tr>
    <td colspan="2" class="line"><b>General</b></td>
    </tr>
    <tr>
    <td width="150">Username:</td>
    <td width="962"><input name="txtUser" type="text" id="txtUser" value="<?php echo $username; ?>"></td>
    </tr>
    <tr>
    <td>Password:</td>
    <td><input name="txtPass" type="text" id="txtPass" value="<?php echo $password; ?>"></td>
    </tr>
    <tr>
    <td colspan="2">?</td>
    </tr>
    <tr>
    <td colspan="2" class="line"><b>Display</b></td>
    </tr>
    <tr>
    <td>Default Album: </td>
    <td>
    <select name="lsDefAlbum" id="lsDefAlbum">
    <option value="" <?php if($default_album == ''){ echo 'selected'; }; ?>>(none)</option>
    <?php GetAlbum('../albums/', ''); ?>
    </select> </td>
    </tr>
    <tr>
    <td>Default View Style: </td>
    <td><select name="mode" id="mode">
    <option value="thumbnail" <?php if($view == 'thumbnail'){ echo 'selected'; }; ?>>Thumbnail</option>
    <option value="list" <?php if($view == 'list'){ echo 'selected'; }; ?>>List</option>
    <option value="slideshow" <?php if($view == 'slideshow'){ echo 'selected'; }; ?>>Slide Show</option>
    </select></td>
    </tr>
    <tr>
    <td>Show Comment: </td>
    <td><input name="rbComment" type="radio" value="1" <?php if($show_comment == '1'){echo 'checked';} ?>>
    Yes
    <input name="rbComment" type="radio" value="0" <?php if($show_comment == '0'){echo 'checked';} ?>>
    No</td>
    </tr>
    <tr>
    <td>Show Resize Menu:</td>
    <td><input name="rbResize" type="radio" value="1" <?php if($resizemenu == '1'){echo 'checked';} ?>>
    Yes
    <input name="rbResize" type="radio" value="0" <?php if($resizemenu == '0'){echo 'checked';} ?>>
    No?<a href="#"><img src="../data/images/icons/important.gif" width="16" height="16" align="absmiddle" OnClick="alert('CPU Intensive!\n Will take a few seconds before the image is resized.');"></a></td>
    </tr>
    <tr>
    <td>Show Mail: </td>
    <td><input name="rbMail" type="radio" value="1" <?php if($mail == '1'){echo 'checked';} ?>>
    Yes
    <input name="rbMail" type="radio" value="0" <?php if($mail == '0'){echo 'checked';} ?>>
    No</td>
    </tr>
    <tr>
    <td>Show RSS: </td>
    <td><input name="rbRSS" type="radio" value="1" <?php if($rss == '1'){echo 'checked';} ?>>
    Yes
    <input name="rbRSS" type="radio" value="0" <?php if($rss == '0'){echo 'checked';} ?>>
    No</td>
    </tr>
    <tr>
    <td colspan="2">?</td>
    </tr>
    <tr>
    <td colspan="2" class="line"><b>Thumbnails</b></td>
    </tr>
    <tr>
    <td>Image Library:</td>
    <td><input name="rbimglib" type="radio" value="gd" OnClick="document.getElementById('IMPath_row').style.display = 'none';" <?php if($imglib == 'gd'){echo 'checked';} ?>>
    GD Lib 2
    <input name="rbimglib" type="radio" value="im" OnClick="document.getElementById('IMPath_row').style.display = '';" <?php if($imglib == 'im'){echo 'checked';} ?>>
    ImageMagick</td>
    </tr>
    <tr id="IMPath_row" <?php if($imglib == 'gd'){echo 'style="display: none;"';}?>>
    <td>ImageMagick: </td>
    <td><input name="txtmagickbin" type="text" id="txtmagickbin" value="<?php echo str_replace('"', "'", $magickbin); ?>" style="width: 270px;">?<a href="#"><img src="../data/images/icons/important.gif" width="16" height="16" align="absmiddle" OnClick="alert('For a windows server use \'c:\\my path\\...\' if the path contains spaces.');"></a></td>
    </tr>
    <tr>
    <td>Thumbnail Size:</td>
    <td><input name="txtTnWidth" type="text" id="txtTnWidth" value="<?php echo $tn_size_width; ?>" maxlength="4" style="width: 40px;">
    x
    <input name="txtTnHeight" type="text" id="txtTnHeight" value="<?php echo $tn_size_height; ?>" maxlength="4" style="width: 40px;">?<a href="#"><img src="../data/images/icons/important.gif" width="16" height="16" align="absmiddle" OnClick="alert('You need to recreate all thumbnails for this to have any effect.');"></a></td>
    </tr>
    <tr>
    <td>Thumbnail Quality:</td>
    <td><input name="txtQuality" type="text" id="txtQuality" value="<?php echo $tn_quality; ?>" style="width: 40px;" maxlength="3">?<a href="#"><img src="../data/images/icons/important.gif" width="16" height="16" align="absmiddle" OnClick="alert('You need to recreate all thumbnails for this to have any effect.');"></a></td>
    </tr>
    <tr>
    <td>Annotation:</td>
    <td><input name="txtAnnotation" type="text" id="txtAnnotation" value="<?php echo $annotate; ?>" style="width: 270px;">?<a href="#"><img src="../data/images/icons/important.gif" width="16" height="16" align="absmiddle" OnClick="alert('Leave blank to disable. (recommended)\nThis is also CPU Intensive, and will slow down all requists for Images.');"></a></td>
    </tr>
    <tr>
    <td>Smart Thumbnail:</td>
    <td><input name="rbsmarttn" type="radio" value="1" <?php if($smart_tn == '1'){echo 'checked';} ?>>
    Yes
    <input name="rbsmarttn" type="radio" value="0" <?php if($smart_tn == '0'){echo 'checked';} ?>>
    No?<a href="#"><img src="../data/images/icons/important.gif" width="16" height="16" align="absmiddle" OnClick="alert('Smart thumbnail is a function that creates thumbnails when they are missing.');"></a></td>
    </tr>
    <tr>
    <td>Thumbnail Column's: </td>
    <td><input name="txtThumbCol" type="text" id="txtThumbCol" value="<?php echo $tn_col; ?>" style="width: 70px;">?<a href="#"><img src="../data/images/icons/important.gif" width="16" height="16" align="absmiddle" OnClick="alert('Set to \'auto\' if you want to make it auto fill.');"></a></td>
    </tr>
    <tr>
    <td colspan="2" class="bottom-line">?</td>
    </tr>
    <tr align="right">
    <td colspan="2"><input name="action" type="submit" id="action" value="Save"></td>
    </tr>
    </table>
    </form>
    </body>
    </html>
  2. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

  3. Autor dieses Themas

    xtreme

    Kostenloser Webspace von xtreme

    xtreme hat kostenlosen Webspace.

    http://xtreme.xardas.lima-city.de/Imageview5-install/imageview5/admin/login.php

    der test link ist doch da oben

    nicht gesehen :biggrin: ?
  4. b************y

    Tobi meinte du richtest ein Account ein damit wir uns einloggen k?nnen und mal Fehlermeldungen sehen und so.

    Sonst k?nnen wir nichtmal vermuten wo der Fehler ist wenn du nur sagst am Anfang vom Script.

    Aber ich h?tte da schonmal was du must schreiben:

    if($_COOKIE['isadmin'] !== 'isadmin' AND 'isadmin')

    oder was ich nicht glaube dass du das willst

    if($_COOKIE['isadmin'] !== 'isadmin' OR 'isadmin')

    Das gilt nat?rlich f?r alle IF Abfragen die du in dem Script hast!
    Frage: Hast du das selbst gescriptet?
  5. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

Dir gefällt dieses Thema?

Über lima-city

Login zum Webhosting ohne Werbung!