Avatar Image
Machacateclados
Machacateclados

OYE este codigo sta mal , cambio los datos para la contraseña y me da fallo,  he cambiado la contraseña y nada, me lo descargue de webtaller....

mirar pagina

Spoiler

<?php
/* copywrited davehusk.com EasyPHPDiscussions, free to use, no re-distribution alowed

put this file in the web server http root, your domain disc_name url, add this page by adding include_once("discussion.php"); to the page you want it on.
$EasyPHPDiscus[discussion_dir]  storage directory must be 0777 and pages 0666, after all the pages are made for security if above web root, you can change back to 0755
*/
$EasyPHPDiscus['discussion_dir'] = './discussion_files';
//blank for no, admin_email notification and posts content will be sent to
$EasyPHPDiscus['admin_email'] = "";
$EasyPHPDiscus['recent_first'] = "";
$EasyPHPDiscus['posts_top'] = "1";
$EasyPHPDiscus['admin_password'] = "demo";
// end config
$EasyPHPDiscus['disc_content_page'] = "$_SERVER[PHP_SELF]$_SERVER[QUERY_STRING]";
$EasyPHPDiscus[disc_content_page] = ereg_replace("%20", "_", $EasyPHPDiscus[disc_content_page]);
$EasyPHPDiscus[disc_content_page] = ereg_replace("\?", "_", $EasyPHPDiscus[disc_content_page]);
$EasyPHPDiscus[disc_content_page] = ereg_replace("\=", "_", $EasyPHPDiscus[disc_content_page]);
$EasyPHPDiscus[disc_content_page] = ereg_replace("\&", "_", $EasyPHPDiscus[disc_content_page]);
$EasyPHPDiscus[disc_content_page] = ereg_replace(" ", "_", $EasyPHPDiscus[disc_content_page]);
$EasyPHPDiscus[disc_content_page] = ereg_replace("/", "_", $EasyPHPDiscus[disc_content_page]);
$EasyPHPDiscus[disc_content_page] = ereg_replace('\.', '_', $EasyPHPDiscus[disc_content_page]);
$EasyPHPDiscus['disc_content_url'] = "$EasyPHPDiscus[discussion_dir]/$EasyPHPDiscus[disc_content_page].html";

    function SELF_QUERY() {
        if ($_SERVER[QUERY_STRING]) {
            $SELF_QUERY = "$_SERVER[PHP_SELF]?$_SERVER[QUERY_STRING]";
        } else {
            $SELF_QUERY = $_SERVER[PHP_SELF];
        }
        return $SELF_QUERY;
    }

$SELF_QUERY=SELF_QUERY();
    if($post_disc) {
global $useip, $date_now, $disc_name, $post_disc_content, $EasyPHPDiscus, $SELF_QUERY;
$disc_name = $_POST['disc_name'];
$post_disc_content = $_POST['post_disc_content'];

if(!$disc_name) {print "Need Name";exit;}
if(!$post_disc_content) {print "Need Content";exit;}
$post_disc_content = preg_replace("/\\\'/","'",$post_disc_content);
$post_disc_content = stripslashes($post_disc_content);
$disc_name = stripslashes($disc_name);
if ($EasyPHPDiscus['recent_first']){
global $useip, $date_now, $disc_name, $post_disc_content, $EasyPHPDiscus, $SELF_QUERY, $file_pointer;
        if(file_exists($EasyPHPDiscus['disc_content_url'])){
            $file_pointer = @fopen($EasyPHPDiscus[disc_content_url], "r");
            $old_discontent = @fread($file_pointer, filesize($EasyPHPDiscus[disc_content_url])) or die ("Directory or File $EasyPHPDiscus[disc_content_url] not writeable");
            @fclose($file_pointer);
               }
        $file_pointer = @fopen($EasyPHPDiscus[disc_content_url], "w");
} else {
        $file_pointer = @fopen($EasyPHPDiscus[disc_content_url], "a");
}
        if ($file_pointer) {
global $useip, $date_now, $disc_name, $post_disc_content, $EasyPHPDiscus, $SELF_QUERY, $file_pointer;
$date_now = date('r');
$useip = $_SERVER['REMOTE_ADDR'];

$write_disc_content = "<B>$disc_name</B> Posted On: <BR><BR><!------------><hr>\n";
            fwrite($file_pointer, $write_disc_content);
            fclose($file_pointer);
if ($EasyPHPDiscus[admin_email]){
global $useip, $date_now, $disc_name, $post_disc_content, $EasyPHPDiscus, $SELF_QUERY;
$_THIS_PAGE = "http://$_SERVER[SERVER_NAME]$SELF_QUERY";
$headers .= "From: $EasyPHPDiscus[admin_email]\n";
$subject = "Discutions posted";
$emaildiscontent = "\nName:$disc_name\nPosted:$post_disc_content\n\nPosted On: $date_now\n$_THIS_PAGE\n$useip\n";
@mail($EasyPHPDiscus[admin_email],$subject,$emaildiscontent,$headers);
}
$msg = "<B><A href=\"$SELF_QUERY\">Refresh</A></B><BR><BR>";
echo "<html><head><META http-equiv=\"refresh\" content=\"0;URL=$SELF_QUERY\"></head><body></body></html>";
        } else {
            $msg = "<BR><font color=red><b>Write Permissions Not Set ".$EasyPHPDiscus[disc_content_url]."</B></font><p>";
        }
    }
function post_form(){
global $SELF_QUERY, $msg, $EasyPHPDiscus, $_SERVER;
echo '
    <center>
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <form disc_name="post_disc" method="post" action="' . $SELF_QUERY . '">
          <center>' . $msg . '
            Name:<input type="text" name="disc_name" size="30"><BR>
            <textarea name="post_disc_content" cols="35" rows="4"></textarea>
            <input type="hidden" name="view_Discus" value="'.$view_Discus.'">
            <input type="submit" name="post_disc" value="Post">
          </center>
    </form>
    </td>
    </tr>
    </table>
    </center>
';
}

if ($Edit_discus or $save_discus){
    global $view_Discus_url, $view_Discus, $EasyPHPCal, $savecontent;
    if($save_discus) {
        if ($password != $EasyPHPDiscus[admin_password]) {
            echo("password incorrect");
            exit;
        }
    $savecontent = $_POST['savecontent'];
    $loadcontent = $_POST['loadcontent'];
    $disc_content_url = $_POST['disc_content_url'];
    $view_Discus = $_POST['view_Discus'];
        $savecontent = stripslashes($savecontent);
        $fp = @fopen($disc_content_url, "w");
        if ($fp) {
            fwrite($fp, $savecontent);
            fclose($fp);
        }
    }
    $loadcontent = $disc_content_url;

    $fp = @fopen($loadcontent, "r");
        $loadcontent = @fread($fp, filesize($loadcontent));
        $loadcontent = htmlspecialchars($loadcontent);
        @fclose($fp);
$admin_edit_Discus .= '
<form name="save_discus" method=post action="'.$SELF_QUERY.'">
<textarea name="savecontent" cols="80" rows="15">'.$loadcontent.'</textarea>
<br> <input type="hidden" name="disc_content_url" value="'.$disc_content_url.'">
<BR>Password: <input type="password" name="password">
<input type="submit" name="save_discus" value="Save">   
</form>
';
}

//end header
?>

<?
//start post form
if ($EasyPHPDiscus[posts_top]){
global $SELF_QUERY, $EasyPHPDiscus, $b_name;
echo '<BR><BR><B>Discussions:</b><BR>'.$admin_edit_Discus.' <BR>    ';
if (is_file($EasyPHPDiscus[disc_content_url]))  include_once("$EasyPHPDiscus[disc_content_url]");
print ' <BR><form name="Edit_discus" action="'.$SELF_QUERY.'" method=post>&nbsp;<input type="hidden" name="disc_content_url" value="'.$EasyPHPDiscus[disc_content_url].'">&nbsp;<input type="submit" name="Edit_discus" value="Edit"></form>';
post_form();
} else {
post_form();
echo "<B>Discussions:</b><BR>'.$admin_edit_Discus.' <BR>";
if (is_file($EasyPHPDiscus[disc_content_url])) include_once("$EasyPHPDiscus[disc_content_url]");
print ' <BR><form name="Edit_discus" action="'.$SELF_QUERY.'" method=post>&nbsp;<input type="hidden" name="disc_content_url" value="'.$EasyPHPDiscus[disc_content_url].'">&nbsp;<input type="submit" name="Edit_discus" value="Edit"></form>';
}
?>

Avatar Image
@man / @woman
@man / @woman

NO.

Di que error te sale. En que línea. Y si eso, te podran ayudar.

Avatar Image
@man / @woman
@man / @woman

Y pon la línea, porque si es la 182... va largo para contar.

ATENCIÓN: Este tema no tiene actividad desde hace más de 6 MESES,
te recomendamos abrir un nuevo tema en lugar de responder al actual
Opciones:
Ir al subforo:
Permisos:
TU NO PUEDES Escribir nuevos temas
TU NO PUEDES Responder a los temas
TU NO PUEDES Editar tus propios mensajes
TU NO PUEDES Borrar tus propios mensajes
Temas similares
No se han encontrado temas similares