A voir également:
- Enlever texte PHP du site
- Site de telechargement - Accueil - Outils
- Site comme coco - Accueil - Réseaux sociaux
- Quel site remplace coco - Accueil - Réseaux sociaux
- Site pour vendre des objets d'occasion - Guide
- Excel cellule couleur si condition texte - Guide
7 réponses
jordane45
Messages postés
38453
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
11 mars 2025
4 741
27 nov. 2014 à 23:03
27 nov. 2014 à 23:03
Tu veux dire que c'est ce qui s'affiche lorsque tu navigue sur ta page ?
Tu la lance comment ?
Tu as bien utilisé http:// localhost/tapage.php ??
Tu as nien installé un serveur php ?
Tu la lance comment ?
Tu as bien utilisé http:// localhost/tapage.php ??
Tu as nien installé un serveur php ?
Tu veux dire que c'est ce qui s'affiche lorsque tu navigue sur ta page ? Oui
Tu la lance comment ? Clic gauche WAMPSERVER=>Loclahost=>Vos Projets=>Site
Tu as bien utilisé http:// localhost/tapage.php ??
Tu as bien installé un serveur php ? Tu veux dire PHPmyAdmin (Oui)
Il y a afficher plus de truc même.
Tu la lance comment ? Clic gauche WAMPSERVER=>Loclahost=>Vos Projets=>Site
Tu as bien utilisé http:// localhost/tapage.php ??
Tu as bien installé un serveur php ? Tu veux dire PHPmyAdmin (Oui)
Il y a afficher plus de truc même.
jordane45
Messages postés
38453
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
11 mars 2025
4 741
27 nov. 2014 à 23:47
27 nov. 2014 à 23:47
Montres le code source de ta page.
<?
define(TITLE, 'Futallaby-powered image board'); //Name of this image board
define(SQLLOG, 'CHANGEME'); //Table (NOT DATABASE) used by image board
define(SQLHOST, 'localhost'); //MySQL server address, usually localhost
define(SQLUSER, 'CHANGEME'); //MySQL user (must be changed)
define(SQLPASS, 'CHANGEME'); //MySQL user's password (must be changed)
define(SQLDB, 'CHANGEME'); //Database used by image board
define(ADMIN_PASS, 'CHANGEME'); //Janitor password (CHANGE THIS YO)
define(SHOWTITLETXT, '1'); //Show TITLE at top (1: yes 0: no)
define(SHOWTITLEIMG, '0'); //Show image at top (0: no, 1: single, 2: rotating)
define(TITLEIMG, 'title.jpg'); //Title image (point to php file if rotating)
define(IMG_DIR, 'src/'); //Image directory (needs to be 777)
define(THUMB_DIR,'thumb/'); //Thumbnail directory (needs to be 777)
define(HOME, '../'); //Site home directory (up one level by default
define(MAX_KB, '500'); //Maximum upload size in KB
define(MAX_W, '250'); //Images exceeding this width will be thumbnailed
define(MAX_H, '250'); //Images exceeding this height will be thumbnailed
define(PAGE_DEF, '5'); //Images per page
define(LOG_MAX, '500'); //Maxium number of entries
//define(RE_COL, '789922'); //Color of replies (lines proceeded by greater than sign) (THIS IS DEPRECIATED IN 040103)
define(PHP_SELF, 'imgboard.php'); //Name of main script file
define(PHP_SELF2, 'imgboard.htm'); //Name of main htm file
define(PHP_EXT, '.htm'); //Extension used for board pages after first
define(RENZOKU, '5'); //Seconds between posts (floodcheck)
define(RENZOKU2, '10'); //Seconds between image posts (floodcheck)
define(MAX_RES, '30'); //Maximum topic bumps
define(USE_THUMB, 1); //Use thumbnails (1: yes 0: no)
define(PROXY_CHECK, 0); //Enable proxy check (1: yes 0: no)
define(DISP_ID, 0); //Display user IDs (1: yes 0: no)
define(BR_CHECK, 15); //Max lines per post (0 = no limit)
//NEW FOR FUTALLABY 040103
define(TRIPKEY, '#'); //this character is displayed before tripcodes
define(CSSFILE, 'futaba.css'); //location of the css file
?>
define(TITLE, 'Futallaby-powered image board'); //Name of this image board
define(SQLLOG, 'CHANGEME'); //Table (NOT DATABASE) used by image board
define(SQLHOST, 'localhost'); //MySQL server address, usually localhost
define(SQLUSER, 'CHANGEME'); //MySQL user (must be changed)
define(SQLPASS, 'CHANGEME'); //MySQL user's password (must be changed)
define(SQLDB, 'CHANGEME'); //Database used by image board
define(ADMIN_PASS, 'CHANGEME'); //Janitor password (CHANGE THIS YO)
define(SHOWTITLETXT, '1'); //Show TITLE at top (1: yes 0: no)
define(SHOWTITLEIMG, '0'); //Show image at top (0: no, 1: single, 2: rotating)
define(TITLEIMG, 'title.jpg'); //Title image (point to php file if rotating)
define(IMG_DIR, 'src/'); //Image directory (needs to be 777)
define(THUMB_DIR,'thumb/'); //Thumbnail directory (needs to be 777)
define(HOME, '../'); //Site home directory (up one level by default
define(MAX_KB, '500'); //Maximum upload size in KB
define(MAX_W, '250'); //Images exceeding this width will be thumbnailed
define(MAX_H, '250'); //Images exceeding this height will be thumbnailed
define(PAGE_DEF, '5'); //Images per page
define(LOG_MAX, '500'); //Maxium number of entries
//define(RE_COL, '789922'); //Color of replies (lines proceeded by greater than sign) (THIS IS DEPRECIATED IN 040103)
define(PHP_SELF, 'imgboard.php'); //Name of main script file
define(PHP_SELF2, 'imgboard.htm'); //Name of main htm file
define(PHP_EXT, '.htm'); //Extension used for board pages after first
define(RENZOKU, '5'); //Seconds between posts (floodcheck)
define(RENZOKU2, '10'); //Seconds between image posts (floodcheck)
define(MAX_RES, '30'); //Maximum topic bumps
define(USE_THUMB, 1); //Use thumbnails (1: yes 0: no)
define(PROXY_CHECK, 0); //Enable proxy check (1: yes 0: no)
define(DISP_ID, 0); //Display user IDs (1: yes 0: no)
define(BR_CHECK, 15); //Max lines per post (0 = no limit)
//NEW FOR FUTALLABY 040103
define(TRIPKEY, '#'); //this character is displayed before tripcodes
define(CSSFILE, 'futaba.css'); //location of the css file
?>
jordane45
Messages postés
38453
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
11 mars 2025
4 741
28 nov. 2014 à 00:01
28 nov. 2014 à 00:01
Remplaces <? Par <?php
jordane45
Messages postés
38453
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
11 mars 2025
4 741
28 nov. 2014 à 00:02
28 nov. 2014 à 00:02
Et il manque du code non ?
Ca ne correspond pas à ce que tu affiches en haut...
Ca ne correspond pas à ce que tu affiches en haut...
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<? # Futallaby 040103 # # For setup instructions and latest version, please visit: # http://www.1chan.net/futallaby/ # # Based on GazouBBS and Futaba include "config.php"; include "strings_e.php"; //String resource file extract($_POST); extract($_GET); extract($_COOKIE); $upfile_name=$_FILES["upfile"]["name"]; $upfile=$_FILES["upfile"]["tmp_name"]; $path = realpath("./").'/'.IMG_DIR; ignore_user_abort(TRUE); $badstring = array("dummy_string","dummy_string2"); // Refused text $badfile = array("dummy","dummy2"); //Refused files (md5 hashes) $badip = array("addr1\\.dummy\\.com","addr2\\.dummy\\.com"); //Refused hosts (IP bans) if(!$con=mysql_connect(SQLHOST,SQLUSER,SQLPASS)){ echo S_SQLCONF; //unable to connect to DB (wrong user/pass?) exit; } $db_id=mysql_select_db(SQLDB,$con); if(!$db_id){echo S_SQLDBSF;} if (!table_exist(SQLLOG)) { echo (SQLLOG.S_TCREATE); $result = mysql_call("create table ".SQLLOG." (primary key(no), no int not null auto_increment, now text, name text, email text, sub text, com text, host text, pwd text, ext text, w int, h int, tim text, time int, md5 text, fsize int, root timestamp, resto int)"); if(!$result){echo S_TCREATEF;} } function updatelog($resno=0){ global $path; $find = false; $resno=(int)$resno; if($resno){ $result = mysql_call("select * from ".SQLLOG." where root>0 and no=$resno"); if($result){ $find = mysql_fetch_row($result); mysql_free_result($result); } if(!$find) error(S_REPORTERR); } if($resno){ if(!$treeline=mysql_call("select * from ".SQLLOG." where root>0 and no=".$resno." order by root desc")){echo S_SQLFAIL;} }else{ if(!$treeline=mysql_call("select * from ".SQLLOG." where root>0 order by root desc")){echo S_SQLFAIL;} } //Finding the last entry number if(!$result=mysql_call("select max(no) from ".SQLLOG)){echo S_SQLFAIL;} $row=mysql_fetch_array($result); $lastno=(int)$row[0]; mysql_free_result($result); $counttree=mysql_num_rows($treeline); if(!$counttree){ $logfilename=PHP_SELF2; $dat=''; head($dat); form($dat,$resno); $fp = fopen($logfilename, "w"); set_file_buffer($fp, 0); rewind($fp); fputs($fp, $dat); fclose($fp); chmod($logfilename,0666); } for($page=0;$page<$counttree;$page+=PAGE_DEF){ $dat=''; head($dat); form($dat,$resno); if(!$resno){ $st = $page; } $dat.='<form action="'.PHP_SELF.'" method="post">'; for($i = $st; $i < $st+PAGE_DEF; $i++){ list($no,$now,$name,$email,$sub,$com,$host,$pwd,$ext,$w,$h,$tim,$time,$md5,$fsize,)=mysql_fetch_row($treeline); if(!$no){break;} // URL and link if($email) $name = "<a href=\"mailto:$email\">$name</a>"; $com = auto_link($com); $com = eregi_replace("(^|>)(>[^<]*)", "\\1<div class=\"unkfunc\">\\2</div>", $com); // Picture file name $img = $path.$tim.$ext; $src = IMG_DIR.$tim.$ext; // img tag creation $imgsrc = ""; if($ext){ $size = $fsize;//file size displayed in alt text if($w && $h){//when there is size... if(@is_file(THUMB_DIR.$tim.'s.jpg')){ $imgsrc = " <span class=\"thumbnailmsg\">".S_THUMB."</span><br /><a href=\"".$src."\" target=\"_blank\"><img src=\"".THUMB_DIR.$tim.'s.jpg'. "\" border=\"0\" align=\"left\" width=\"$w\" height=\"$h\" hspace=\"20\" alt=\"".$size." B\" /></a><br />"; }else{ $imgsrc = "<a href=\"".$src."\" target=\"_blank\"><img src=\"".$src. "\" border=\"0\" align=\"left\" width=\"$w\" height=\"$h\" hspace=\"20\" alt=\"".$size." B\" /></a><br />"; } }else{ $imgsrc = "<a href=\"".$src."\" target=\"_blank\"><img src=\"".$src. "\" border=\"0\" align=\"left\" hspace=\"20\" alt=\"".$size." B\" /></a><br />"; } $dat.="<span class=\"filesize\">".S_PICNAME."<a href=\"$src\" target=\"_blank\">$tim$ext</a>-($size B)</span>$imgsrc"; } // Main creation $dat.="<input type=\"checkbox\" name=\"$no\" value=\"delete\" /><span class=\"filetitle\">$sub</span> \n"; $dat.="Name <span class=\"postername\">$name</span> $now No.$no \n"; if(!$resno) $dat.="[<a href=\"".PHP_SELF."?res=$no\">".S_REPLY."</a>]"; $dat.="\n<blockquote>$com</blockquote>"; // Deletion pending if($lastno-LOG_MAX*0.95>$no){ $dat.="<span class=\"oldpost\">".S_OLD."</span><br />\n"; } if(!$resline=mysql_call("select * from ".SQLLOG." where resto=".$no." order by no")){echo S_SQLFAIL;} $countres=mysql_num_rows($resline); if(!$resno){ $s=$countres - 10; if($s<0){$s=0;} elseif($s>0){ $dat.="<span class=\"omittedposts\">".S_RESU.$s.S_ABBR."</span><br />\n"; } }else{$s=0;} while($resrow=mysql_fetch_row($resline)){ if($s>0){$s--;continue;} list($no,$now,$name,$email,$sub,$com,$host,$pwd,$ext,$w,$h,$tim,$time,$md5,$fsize,)=$resrow; if(!$no){break;} // URL and e-mail if($email) $name = "<a href=\"mailto:$email\">$name</a>"; $com = auto_link($com); //$com = eregi_replace("(^|>)(>[^<]*)", "\\1<font color=".RE_COL.">\\2</font>", $com); $com = eregi_replace("(^|>)(>[^<]*)", "\\1<div class=\"unkfunc\">\\2</div>", $com); // Main creation $dat.="<table><tr><td class=\"doubledash\">>></td><td class=\"reply\">\n"; $dat.="<input type=\"checkbox\" name=\"$no\" value=\"delete\" /><span class=\"replytitle\">$sub</span> \n"; $dat.="Name <span class=\"commentpostername\">$name</span> $now No.$no \n"; $dat.="<blockquote>$com</blockquote>"; $dat.="</td></tr></table>\n"; } $dat.="<br clear=\"left\" /><hr />\n"; clearstatcache();//clear stat cache of a file mysql_free_result($resline); $p++; if($resno){break;} //only one tree line at time of res } $dat.='<table align="right"><tr><td nowrap="nowrap" align="center"> <input type="hidden" name="mode" value="usrdel" />'.S_REPDEL.'[<input type="checkbox" name="onlyimgdel" value="on" />'.S_DELPICONLY.']<br /> '.S_DELKEY.'<input type="password" name="pwd" size="8" maxlength="8" value="" /> <input type="submit" value="'.S_DELETE.'" /></td></tr></table></form> <script language="JavaScript" type="script"><!-- l(); //--></script>'; if(!$resno){ // if not in res display mode $prev = $st - PAGE_DEF; $next = $st + PAGE_DEF; // Page processing $dat.="<table><tr>"; if($prev >= 0){ if($prev==0){ $dat.="<form action=\"".PHP_SELF2."\" method=\"get\" /><td>"; }else{ $dat.="<form action=\"".$prev/PAGE_DEF.PHP_EXT."\" method=\"get>\" /<td>"; } $dat.="<input type=\"submit\" value=\"".S_PREV."\" />"; $dat.="</td></form>"; }else{$dat.="<td>".S_FIRSTPG."</td>";} $dat.="<td>"; for($i = 0; $i < $counttree ; $i+=PAGE_DEF){ if($i&&!($i%(PAGE_DEF*2))){$dat.=" ";} if($st==$i){$dat.="[".($i/PAGE_DEF)."] ";} else{ if($i==0){$dat.="[<a href=\"".PHP_SELF2."\">0</a>] ";} else{$dat.="[<a href=\"".($i/PAGE_DEF).PHP_EXT."\">".($i/PAGE_DEF)."</a>] ";} } } $dat.="</td>"; if($p >= PAGE_DEF && $counttree > $next){ $dat.="<td><form action=\"".$next/PAGE_DEF.PHP_EXT."\" method=\"get\">"; $dat.="<input type=\"submit\" value=\"".S_NEXT."\" />"; $dat.="</form></td>"; }else{$dat.="<td>".S_LASTPG."</td>";} $dat.="</tr></table><br clear=\"all\" />\n"; } foot($dat); if($resno){echo $dat;break;} if($page==0){$logfilename=PHP_SELF2;} else{$logfilename=$page/PAGE_DEF.PHP_EXT;} $fp = fopen($logfilename, "w"); set_file_buffer($fp, 0); rewind($fp); fputs($fp, $dat); fclose($fp); chmod($logfilename,0666); } mysql_free_result($treeline); } function mysql_call($query){ $ret=mysql_query($query); if(!$ret){ #echo "error!!<br />"; echo $query."<br />"; # echo mysql_errno().": ".mysql_error()."<br />"; } return $ret; } /* head */ function head(&$dat){ $titlepart = ''; if (SHOWTITLEIMG == 1) { $titlepart.= '<img src="'.TITLEIMG.'" alt="'.TITLE.'" />'; if (SHOWTITLETXT == 1) {$titlepart.= '<br />';} } else if (SHOWTITLEIMG == 2) { $titlepart.= '<img src="'.TITLEIMG.'" onclick="this.src=this.src;" alt="'.TITLE.'" />'; if (SHOWTITLETXT == 1) {$titlepart.= '<br />';} } if (SHOWTITLETXT == 1) { $titlepart.= ''.TITLE.''; } $dat.=' <!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" xml:lang="jp"><head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <!-- meta HTTP-EQUIV="pragma" CONTENT="no-cache" --> <link rel="stylesheet" type="text/css" href="'.CSSFILE.'" title="Standard Futaba" /> <title>'.TITLE.'</title> <script language="JavaScript" type="script"><!-- function l(e){var P=getCookie("pwdc"),N=getCookie("namec"),i;with(document){for(i=0;i<forms.length;i++){if(forms[i].pwd)with(forms[i]){if(!pwd.value)pwd.value=P;}if(forms[i].name)with(forms[i]){if(!name.value)name.value=N;}}}};function getCookie(key, tmp1, tmp2, xx1, xx2, xx3) {tmp1 = " " + document.cookie + ";";xx1 = xx2 = 0;len = tmp1.length; while (xx1 < len) {xx2 = tmp1.indexOf(";", xx1);tmp2 = tmp1.substring(xx1 + 1, xx2);xx3 = tmp2.indexOf("=");if (tmp2.substring(0, xx3) == key) {return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));}xx1 = xx2 + 1;}return("");} //--></script> </head> <body> '.$titlebar.' <div class="adminbar"> [<a href="'.HOME.'" target="_top">'.S_HOME.'</a>] [<a href="'.PHP_SELF.'?mode=admin">'.S_ADMIN.'</a>] </div> <div class="logo">'.$titlepart.'</div><hr /><br /><br />'; } /* Contribution form */ function form(&$dat,$resno,$admin=""){ $maxbyte = MAX_KB * 1024; $no=$resno; if($resno){ $msg .= "[<a href=\"".PHP_SELF2."\">".S_RETURN."</a>]\n"; $msg .= "<div class=\"theading\">".S_POSTING."</div>\n"; } if($admin){ $hidden = "<input type=hidden name=admin value=\"".ADMIN_PASS."\">"; $msg = "<em>".S_NOTAGS."</em>"; /* Note to self: Find out where this happened. */ } $dat.=$msg.'<div align="center"><div class="postarea"> <form action="'.PHP_SELF.'" method="post" enctype="multipart/form-data"> <input type="hidden" name="mode" value="regist" /> '.$hidden.' <input type="hidden" name="MAX_FILE_SIZE" value="'.$maxbyte.'" /> '; if($no){$dat.='<input type="hidden" name="resto" value="'.$no.'" /> ';} $dat.='<table> <tr><td class="postblock" align="left">'.S_NAME.'</td><td align="left"><input type="text" name="name" size="28" /></td></tr> <tr><td class="postblock" align="left">'.S_EMAIL.'</td><td align="left"><input type="text" name="email" size="28" /></td></tr> <tr><td class="postblock" align="left">'.S_SUBJECT.'</td><td align="left"><input type="text" name="sub" size="35" /> <input type="submit" value="'.S_SUBMIT.'" /></td></tr> <tr><td class="postblock" align="left">'.S_COMMENT.'</td><td align="left"><textarea name="com" cols="48" rows="4"></textarea></td></tr> '; if(!$resno){ $dat.='<tr><td class="postblock" align="left">'.S_UPLOADFILE.'</td> <td><input type="file" name="upfile" size="35" /> [<label><input type="checkbox" name="textonly" value="on" />'.S_NOFILE.'</label>]</td></tr> ';} $dat.='<tr><td align="left" class="postblock" align="left">'.S_DELPASS.'</td><td align="left"><input type="password" name="pwd" size="8" maxlength="8" value="" />'.S_DELEXPL.'</td></tr> <tr><td colspan="2"> <div align="left" class="rules">'.S_RULES.'</div></td></tr></table></form></div></div><hr />'; } /* Footer */ function foot(&$dat){ $dat.=' <div class="footer">'.S_FOOT.'</div> </body></html>'; } function error($mes,$dest=''){ /* Hey guys, what's going on in this function? Since I don't see it so often, I'll leave the tags alone for now.*/ global $upfile_name,$path; if(is_file($dest)) unlink($dest); head($dat); echo $dat; echo "<br /><br /><hr size=1><br /><br /> <center><font color=blue size=5>$mes<br /><br /><a href=".PHP_SELF2.">".S_RELOAD."</a></b></font></center> <br /><br /><hr size=1>"; die("</body></html>"); } /* Auto Linker */ function auto_link($proto){ $proto = ereg_replace("(https?|ftp|news)(://[[:alnum:]\+\$\;\?\.%,!#~*/:@&=_-]+)","<a href=\"\\1\\2\" target=\"_blank\">\\1\\2</a>",$proto); return $proto; } function proxy_connect($port) { $fp = @fsockopen ($_SERVER["REMOTE_ADDR"], $port,$a,$b,2); if(!$fp){return 0;}else{return 1;} } /* Regist */ function regist($name,$email,$sub,$com,$url,$pwd,$upfile,$upfile_name,$resto){ global $path,$badstring,$badfile,$badip,$pwdc,$textonly; // time $time = time(); $tim = $time.substr(microtime(),2,3); // upload processing if($upfile&&file_exists($upfile)){ $dest = $path.$tim.'.tmp'; move_uploaded_file($upfile, $dest); //if an error in up, it changes to down (what?) //copy($upfile, $dest); $upfile_name = CleanStr($upfile_name); if(!is_file($dest)) error(S_UPFAIL,$dest); $size = getimagesize($dest); if(!is_array($size)) error(S_NOREC,$dest); $md5 = md5_of_file($dest); foreach($badfile as $value){if(ereg("^$value",$md5)){ error(S_SAMEPIC,$dest); //Refuse this image }} chmod($dest,0666); $W = $size[0]; $H = $size[1]; $fsize = filesize($dest); if($fsize>MAX_KB * 1024) error(S_TOOBIG,$dest); switch ($size[2]) { case 1 : $ext=".gif";break; case 2 : $ext=".jpg";break; case 3 : $ext=".png";break; case 4 : $ext=".swf";break; case 5 : $ext=".psd";break; case 6 : $ext=".bmp";break; case 13 : $ext=".swf";break; default : $ext=".xxx";break; } // Picture reduction if($W > MAX_W || $H > MAX_H){ $W2 = MAX_W / $W; $H2 = MAX_H / $H; ($W2 < $H2) ? $key = $W2 : $key = $H2; $W = ceil($W * $key); $H = ceil($H * $key); } $mes = S_UPGOOD; } if($_FILES["upfile"]["error"]==2){ error(S_TOOBIG,$dest); } if($upfile_name&&$_FILES["upfile"]["size"]==0){ error(S_TOOBIGORNONE,$dest); } //The last result number if(!$result=mysql_call("select max(no) from ".SQLLOG)){echo S_SQLFAIL;} $row=mysql_fetch_array($result); $lastno=(int)$row[0]; mysql_free_result($result); // Number of log lines if(!$result=mysql_call("select no,ext,tim from ".SQLLOG." where no<=".($lastno-LOG_MAX))){echo S_SQLFAIL;} else{ while($resrow=mysql_fetch_row($result)){ list($dno,$dext,$dtim)=$resrow; if(!mysql_call("delete from ".SQLLOG." where no=".$dno)){echo S_SQLFAIL;} if($dext){ if(is_file($path.$dtim.$dext)) unlink($path.$dtim.$dext); if(is_file(THUMB_DIR.$dtim.'s.jpg')) unlink(THUMB_DIR.$dtim.'s.jpg'); } } mysql_free_result($result); } $find = false; $resto=(int)$resto; if($resto){ if(!$result = mysql_call("select * from ".SQLLOG." where root>0 and no=$resto")){echo S_SQLFAIL;} else{ $find = mysql_fetch_row($result); mysql_free_result($result); } if(!$find) error(S_NOTHREADERR,$dest); } foreach($badstring as $value){if(ereg($value,$com)||ereg($value,$sub)||ereg($value,$name)||ereg($value,$email)){ error(S_STRREF,$dest);};} if($_SERVER["REQUEST_METHOD"] != "POST") error(S_UNJUST,$dest); // Form content check if(!$name||ereg("^[ | @|]*$",$name)) $name=""; if(!$com||ereg("^[ | @|\t]*$",$com)) $com=""; if(!$sub||ereg("^[ | @|]*$",$sub)) $sub=""; if(!$resto&&!$textonly&&!is_file($dest)) error(S_NOPIC,$dest); if(!$com&&!is_file($dest)) error(S_NOTEXT,$dest); $name=ereg_replace(S_MANAGEMENT,"\"".S_MANAGEMENT."\"",$name); $name=ereg_replace(S_DELETION,"\"".S_DELETION."\"",$name); if(strlen($com) > 1000) error(S_TOOLONG,$dest); if(strlen($name) > 100) error(S_TOOLONG,$dest); if(strlen($email) > 100) error(S_TOOLONG,$dest); if(strlen($sub) > 100) error(S_TOOLONG,$dest); if(strlen($resto) > 10) error(S_UNUSUAL,$dest); if(strlen($url) > 10) error(S_UNUSUAL,$dest); //host check $host = gethostbyaddr($_SERVER["REMOTE_ADDR"]); foreach($badip as $value){ //Refusal hosts if(eregi("$value$",$host)){ error(S_BADHOST,$dest); }} if(eregi("^mail",$host) || eregi("^ns",$host) || eregi("^dns",$host) || eregi("^ftp",$host) || eregi("^prox",$host) || eregi("^pc",$host) || eregi("^[^\.]\.[^\.]$",$host)){ $pxck = "on"; } if(eregi("ne\\.jp$",$host)|| eregi("ad\\.jp$",$host)|| eregi("bbtec\\.net$",$host)|| eregi("aol\\.com$",$host)|| eregi("uu\\.net$",$host)|| eregi("asahi-net\\.or\\.jp$",$host)|| eregi("rim\\.or\\.jp$",$host) ){$pxck = "off";} else{$pxck = "on";} if($pxck=="on" && PROXY_CHECK){ if(proxy_connect('80') == 1){ error(S_PROXY80,$dest); } elseif(proxy_connect('8080') == 1){ error(S_PROXY8080,$dest); } } // No, path, time, and url format srand((double)microtime()*1000000); if($pwd==""){ if($pwdc==""){ $pwd=rand();$pwd=substr($pwd,0,8); }else{ $pwd=$pwdc; } } $c_pass = $pwd; $pass = ($pwd) ? substr(md5($pwd),2,8) : "*"; $youbi = array(S_SUN, S_MON, S_TUE, S_WED, S_THU, S_FRI, S_SAT); $yd = $youbi[gmdate("w", $time+9*60*60)] ; $now = gmdate("y/m/d",$time+9*60*60)."(".(string)$yd.")".gmdate("H:i",$time+9*60*60); if(DISP_ID){ if($email&&DISP_ID==1){ $now .= " ID:???"; }else{ $now.=" ID:".substr(crypt(md5($_SERVER["REMOTE_ADDR"].'id'.gmdate("Ymd", $time+9*60*60)),'id'),-8); } } //Text plastic surgery (rorororor) $email= CleanStr($email); $email=ereg_replace("[\r\n]","",$email); $sub = CleanStr($sub); $sub =ereg_replace("[\r\n]","",$sub); $url = CleanStr($url); $url =ereg_replace("[\r\n]","",$url); $resto= CleanStr($resto); $resto=ereg_replace("[\r\n]","",$resto); $com = CleanStr($com); // Standardize new character lines $com = str_replace( "\r\n", "\n", $com); $com = str_replace( "\r", "\n", $com); // Continuous lines $com = ereg_replace("\n((!@| )*\n){3,}","\n",$com); if(!BR_CHECK || substr_count($com,"\n")<BR_CHECK){ $com = nl2br($com); //br is substituted before newline char } $com = str_replace("\n", "", $com); //\n is erased //$name=ereg_replace(TRIPKEY,"",$name); //erase tripkeys in name $name=ereg_replace("[\r\n]","",$name); $names=$name; $name = trim($name);//blankspace removal if (get_magic_quotes_gpc()) {//magic quotes is deleted (?) $name = stripslashes($name); } $name = htmlspecialchars($name);//remove html special chars $name = str_replace("&", "&", $name);//remove ampersands $name = str_replace(",", ",", $name);//remove commas if(ereg("(#|!)(.*)",$names,$regs)){ $cap = $regs[2]; $cap=strtr($cap,"&", "&"); $cap=strtr($cap,",", ","); $name=ereg_replace("(#|!)(.*)","",$name); //$name=ereg_replace(TRIPKEY,"",$name); //erase tripkeys in name $salt=substr($cap."H.",1,2); $salt=ereg_replace("[^\.-z]",".",$salt); $salt=strtr($salt,":;<=>?@[\\]^_`","ABCDEFGabcdef"); $name.=TRIPKEY.substr(crypt($cap,$salt),-10).""; } if(!$name) $name=S_ANONAME; if(!$com) $com=S_ANOTEXT; if(!$sub) $sub=S_ANOTITLE; // Read the log $query="select time from ".SQLLOG." where com='".mysql_escape_string($com)."' ". "and host='".mysql_escape_string($host)."' ". "and no>".($lastno-20); //the same if(!$result=mysql_call($query)){echo S_SQLFAIL;} $row=mysql_fetch_array($result); mysql_free_result($result); if($row&&!$upfile_name)error(S_RENZOKU3,$dest); $query="select time from ".SQLLOG." where time>".($time - RENZOKU)." ". "and host='".mysql_escape_string($host)."' "; //from precontribution if(!$result=mysql_call($query)){echo S_SQLFAIL;} $row=mysql_fetch_array($result); mysql_free_result($result); if($row&&!$upfile_name)error(S_RENZOKU3, $dest); // Upload processing if($dest&&file_exists($dest)){ $query="select time from ".SQLLOG." where time>".($time - RENZOKU2)." ". "and host='".mysql_escape_string($host)."' "; //from precontribution if(!$result=mysql_call($query)){echo S_SQLFAIL;} $row=mysql_fetch_array($result); mysql_free_result($result); if($row&&$upfile_name)error(S_RENZOKU2,$dest); //Duplicate image check $result = mysql_call("select tim,ext,md5 from ".SQLLOG." where md5='".$md5."'"); if($result){ list($timp,$extp,$md5p) = mysql_fetch_row($result); mysql_free_result($result); # if($timp&&file_exists($path.$timp.$extp)){ #} if($timp){ error(S_DUPE,$dest); } } } $restoqu=(int)$resto; if($resto){ //res,root processing $rootqu="0"; if(!$resline=mysql_call("select * from ".SQLLOG." where resto=".$resto)){echo S_SQLFAIL;} $countres=mysql_num_rows($resline); mysql_free_result($resline); if(!stristr($email,'sage') && $countres < MAX_RES){ $query="update ".SQLLOG." set root=now() where no=$resto"; //age if(!$result=mysql_call($query)){echo S_SQLFAIL;} } }else{$rootqu="now()";} //now it is root $query="insert into ".SQLLOG." (now,name,email,sub,com,host,pwd,ext,w,h,tim,time,md5,fsize,root,resto) values (". "'".$now."',". "'".mysql_escape_string($name)."',". "'".mysql_escape_string($email)."',". "'".mysql_escape_string($sub)."',". "'".mysql_escape_string($com)."',". "'".mysql_escape_string($host)."',". "'".mysql_escape_string($pass)."',". "'".$ext."',". (int)$W.",". (int)$H.",". "'".$tim."',". (int)$time.",". "'".$md5."',". (int)$fsize.",". $rootqu.",". (int)$resto.")"; if(!$result=mysql_call($query)){echo S_SQLFAIL;} //post registration //Cookies setcookie ("pwdc", $c_pass,time()+7*24*3600); /* 1 week cookie expiration */ if(function_exists("mb_internal_encoding")&&function_exists("mb_convert_encoding") &&function_exists("mb_substr")){ if(ereg("MSIE|Opera",$_SERVER["HTTP_USER_AGENT"])){ $i=0;$c_name=''; mb_internal_encoding("SJIS"); while($j=mb_substr($names,$i,1)){ $j = mb_convert_encoding($j, "UTF-16", "SJIS"); $c_name.="%u".bin2hex($j); $i++; } header("Set-Cookie: namec=$c_name; expires=".gmdate("D, d-M-Y H:i:s",time()+7*24*3600)." GMT",false); }else{ $c_name=$names; setcookie ("namec", $c_name,time()+7*24*3600); /* 1 week cookie expiration */ } } if($dest&&file_exists($dest)){ rename($dest,$path.$tim.$ext); if(USE_THUMB){thumb($path,$tim,$ext);} } updatelog(); echo "<html><head><meta http-equiv=\"refresh\" content=\"1;URL=".PHP_SELF2."\" /></head>"; echo "<body>$mes ".S_SCRCHANGE."</body></html>"; } //thumbnails function thumb($path,$tim,$ext){ if(!function_exists("ImageCreate")||!function_exists("ImageCreateFromJPEG"))return; $fname=$path.$tim.$ext; $thumb_dir = THUMB_DIR; //thumbnail directory $width = MAX_W; //output width $height = MAX_H; //output height // width, height, and type are aquired $size = GetImageSize($fname); switch ($size[2]) { case 1 : if(function_exists("ImageCreateFromGIF")){ $im_in = @ImageCreateFromGIF($fname); if($im_in){break;} } if(!is_executable(realpath("./gif2png"))||!function_exists("ImageCreateFromPNG"))return; @exec(realpath("./gif2png")." $fname",$a); if(!file_exists($path.$tim.'.png'))return; $im_in = @ImageCreateFromPNG($path.$tim.'.png'); unlink($path.$tim.'.png'); if(!$im_in)return; break; case 2 : $im_in = @ImageCreateFromJPEG($fname); if(!$im_in){return;} break; case 3 : if(!function_exists("ImageCreateFromPNG"))return; $im_in = @ImageCreateFromPNG($fname); if(!$im_in){return;} break; default : return; } // Resizing if ($size[0] > $width || $size[1] >$height) { $key_w = $width / $size[0]; $key_h = $height / $size[1]; ($key_w < $key_h) ? $keys = $key_w : $keys = $key_h; $out_w = ceil($size[0] * $keys) +1; $out_h = ceil($size[1] * $keys) +1; } else { $out_w = $size[0]; $out_h = $size[1]; } // the thumbnail is created if(function_exists("ImageCreateTrueColor")&&get_gd_ver()=="2"){ $im_out = ImageCreateTrueColor($out_w, $out_h); }else{$im_out = ImageCreate($out_w, $out_h);} // copy resized original ImageCopyResized($im_out, $im_in, 0, 0, 0, 0, $out_w, $out_h, $size[0], $size[1]); // thumbnail saved ImageJPEG($im_out, $thumb_dir.$tim.'s.jpg',60); chmod($thumb_dir.$tim.'s.jpg',0666); // created image is destroyed ImageDestroy($im_in); ImageDestroy($im_out); } //check version of gd function get_gd_ver(){ if(function_exists("gd_info")){ $gdver=gd_info(); $phpinfo=$gdver["GD Version"]; }else{ //earlier than php4.3.0 ob_start(); phpinfo(8); $phpinfo=ob_get_contents(); ob_end_clean(); $phpinfo=strip_tags($phpinfo); $phpinfo=stristr($phpinfo,"gd version"); $phpinfo=stristr($phpinfo,"version"); } $end=strpos($phpinfo,"."); $phpinfo=substr($phpinfo,0,$end); $length = strlen($phpinfo)-1; $phpinfo=substr($phpinfo,$length); return $phpinfo; } //md5 calculation for earlier than php4.2.0 function md5_of_file($inFile) { if (file_exists($inFile)){ if(function_exists('md5_file')){ return md5_file($inFile); }else{ $fd = fopen($inFile, 'r'); $fileContents = fread($fd, filesize($inFile)); fclose ($fd); return md5($fileContents); } }else{ return false; }} /* text plastic surgery */ function CleanStr($str){ global $admin; $str = trim($str);//blankspace removal if (get_magic_quotes_gpc()) {//magic quotes is deleted (?) $str = stripslashes($str); } if($admin!=ADMIN_PASS){//admins can use tags $str = htmlspecialchars($str);//remove html special chars $str = str_replace("&", "&", $str);//remove ampersands } return str_replace(",", ",", $str);//remove commas } //check for table existance function table_exist($table){ $result = mysql_call("show tables like '$table'"); if(!$result){return 0;} $a = mysql_fetch_row($result); mysql_free_result($result); return $a; } /* user image deletion */ function usrdel($no,$pwd){ global $path,$pwdc,$onlyimgdel; $host = gethostbyaddr($_SERVER["REMOTE_ADDR"]); $delno = array(); $delflag = FALSE; reset($_POST); while ($item = each($_POST)){ if($item[1]=='delete'){array_push($delno,$item[0]);$delflag=TRUE;} } if($pwd==""&&$pwdc!="") $pwd=$pwdc; $countdel=count($delno); $flag = FALSE; for($i = 0; $i<$countdel; $i++){ if(!$result=mysql_call("select no,ext,tim,pwd,host from ".SQLLOG." where no=".$delno[$i])){echo S_SQLFAIL;} else{ while($resrow=mysql_fetch_row($result)){ list($dno,$dext,$dtim,$dpass,$dhost)=$resrow; if(substr(md5($pwd),2,8) == $dpass || substr(md5($pwdc),2,8) == $dpass || $dhost == $host || ADMIN_PASS==$pwd){ $flag = TRUE; $delfile = $path.$dtim.$dext; //path to delete if(!$onlyimgdel){ if(!mysql_call("delete from ".SQLLOG." where no=".$dno)){echo S_SQLFAIL;} //sql is broke } if(is_file($delfile)) unlink($delfile);//Deletion if(is_file(THUMB_DIR.$dtim.'s.jpg')) unlink(THUMB_DIR.$dtim.'s.jpg');//Deletion } } mysql_free_result($result); } } if(!$flag) error(S_BADDELPASS); } /*password validation */ function valid($pass){ if($pass && $pass != ADMIN_PASS) error(S_WRONGPASS); head($dat); echo $dat; echo "[<a href=\"".PHP_SELF2."\">".S_RETURNS."</a>]\n"; echo "[<a href=\"".PHP_SELF."\">".S_LOGUPD."</a>]\n"; echo "<div class=\"passvalid\">".S_MANAMODE."</div>\n"; echo "<p><form action=\"".PHP_SELF."\" method=\"post\">\n"; // Mana login form if(!$pass){ echo "<div class=\passvalid\"><input type=radio name=admin value=del checked>".S_MANAREPDEL; echo "<input type=radio name=admin value=post>".S_MANAPOST."<p>"; echo "<input type=hidden name=mode value=admin>\n"; echo "<input type=password name=pass size=8>"; echo "<input type=submit value=\"".S_MANASUB."\"></form></div>\n"; die("</body></html>"); } } /* Admin deletion */ function admindel($pass){ global $path,$onlyimgdel; $delno = array(dummy); $delflag = FALSE; reset($_POST); while ($item = each($_POST)){ if($item[1]=='delete'){array_push($delno,$item[0]);$delflag=TRUE;} } if($delflag){ if(!$result=mysql_call("select * from ".SQLLOG."")){echo S_SQLFAIL;} $find = FALSE; while($row=mysql_fetch_row($result)){ list($no,$now,$name,$email,$sub,$com,$host,$pwd,$ext,$w,$h,$tim,$time,$md5,$fsize,)=$row; if($onlyimgdel==on){ if(array_search($no,$delno)){//only a picture is deleted $delfile = $path.$tim.$ext; //only a picture is deleted if(is_file($delfile)) unlink($delfile);//delete if(is_file(THUMB_DIR.$tim.'s.jpg')) unlink(THUMB_DIR.$tim.'s.jpg');//delete } }else{ if(array_search($no,$delno)){//It is empty when deleting $find = TRUE; if(!mysql_call("delete from ".SQLLOG." where no=".$no)){echo S_SQLFAIL;} $delfile = $path.$tim.$ext; //Delete file if(is_file($delfile)) unlink($delfile);//Delete if(is_file(THUMB_DIR.$tim.'s.jpg')) unlink(THUMB_DIR.$tim.'s.jpg');//Delete } } } mysql_free_result($result); if($find){//log renewal } } // Deletion screen display echo "<input type=hidden name=mode value=admin>\n"; echo "<input type=hidden name=admin value=del>\n"; echo "<input type=hidden name=pass value=\"$pass\">\n"; echo "<div class=\"dellist\">".S_DELLIST."</div>\n"; echo "<div class=\"delbuttons\"><input type=submit value=\"".S_ITDELETES."\">"; echo "<input type=reset value=\"".S_MDRESET."\">"; echo "[<input type=checkbox name=onlyimgdel value=on><!--checked-->".S_MDONLYPIC."]</div>"; echo "<table class=\"postlists\">\n"; echo "<tr class=\"managehead\">".S_MDTABLE1; echo S_MDTABLE2; echo "</tr>\n"; if(!$result=mysql_call("select * from ".SQLLOG." order by no desc")){echo S_SQLFAIL;} $j=0; while($row=mysql_fetch_row($result)){ $j++; $img_flag = FALSE; list($no,$now,$name,$email,$sub,$com,$host,$pwd,$ext,$w,$h,$tim,$time,$md5,$fsize,$root,$resto)=$row; // Format $now=ereg_replace('.{2}/(.*)$','\1',$now); $now=ereg_replace('\(.*\)',' ',$now); if(strlen($name) > 10) $name = substr($name,0,9)."."; if(strlen($sub) > 10) $sub = substr($sub,0,9)."."; if($email) $name="<a href=\"mailto:$email\">$name</a>"; $com = str_replace("<br />"," ",$com); $com = htmlspecialchars($com); if(strlen($com) > 20) $com = substr($com,0,18) . "."; // Link to the picture if($ext && is_file($path.$tim.$ext)){ $img_flag = TRUE; $clip = "<a href=\"".IMG_DIR.$tim.$ext."\" target=\"_blank\">".$tim.$ext."</a><br />"; $size = $fsize; $all += $size; //total calculation $md5= substr($md5,0,10); }else{ $clip = ""; $size = 0; $md5= ""; } $class = ($j % 2) ? "row1" : "row2";//BG color echo "<tr class=$class><td><input type=checkbox name=\"$no\" value=delete></td>"; echo "<td>$no</td><td>$now</td><td>$sub</td>"; echo "<td>$name</b></td><td>$com</td>"; echo "<td>$host</td><td>$clip($size)</td><td>$md5</td><td>$resto</td><td>$tim</td><td>$time</td>\n"; echo "</tr>\n"; } mysql_free_result($result); echo "</table><input type=submit value=\"".S_ITDELETES."$msg\">"; echo "<input type=reset value=\"".S_RESET."\"></form>"; $all = (int)($all / 1024); echo "[ ".S_IMGSPACEUSAGE.$all."</b> KB ]"; die("</body></html>"); } /*-----------Main-------------*/ switch($mode){ case 'regist': regist($name,$email,$sub,$com,'',$pwd,$upfile,$upfile_name,$resto); break; case 'admin': valid($pass); if($admin=="del") admindel($pass); if($admin=="post"){ echo "</form>"; form($post,$res,1); echo $post; die("</body></html>"); } break; case 'usrdel': usrdel($no,$pwd); default: if($res){ updatelog($res); }else{ updatelog(); echo "<meta http-equiv=\"refresh\" content=\"0;URL=".PHP_SELF2."\" />"; } } ?>
EDIT : Ajout des balises de code (jordane)
jordane45
Messages postés
38453
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
11 mars 2025
4 741
28 nov. 2014 à 00:13
28 nov. 2014 à 00:13
1 - J'ai édité ton message pour y mettre la coloration syntaxique.
Explications à lire ici : https://codes-sources.commentcamarche.net/faq/10686-le-nouveau-codes-sources-comment-ca-marche#balises-code
Merci d'y penser pour la prochaine fois.
2 - Même remarque que ma réponse précédente :
Remplace
3 - On est bien d'accord.. que ta page porte l'extension " .php " ?
Fais la modif que je te propose.. et vérifie...
Dis nous si ça fait toujours pareil.
Explications à lire ici : https://codes-sources.commentcamarche.net/faq/10686-le-nouveau-codes-sources-comment-ca-marche#balises-code
Merci d'y penser pour la prochaine fois.
2 - Même remarque que ma réponse précédente :
Remplace
<?par
<?php
3 - On est bien d'accord.. que ta page porte l'extension " .php " ?
Fais la modif que je te propose.. et vérifie...
Dis nous si ça fait toujours pareil.
Notice: Undefined index: upfile in C:\wamp\www\public_html\imgboard\imgboard.php on line 16
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
( ! ) Notice: Undefined index: upfile in C:\wamp\www\public_html\imgboard\imgboard.php on line 17
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
( ! ) Notice: Undefined variable: con in C:\wamp\www\public_html\imgboard\imgboard.php on line 37
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
( ! ) Warning: mysql_select_db() expects parameter 2 to be resource, null given in C:\wamp\www\public_html\imgboard\imgboard.php on line 37
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
2 0.2396 610048 mysql_select_db ( ) ..\imgboard.php:37
S_SQLDBSF
( ! ) Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\public_html\imgboard\imgboard.php on line 241
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
2 0.2506 610192 table_exist( ) ..\imgboard.php:40
3 0.2506 610320 mysql_call( ) ..\imgboard.php:761
4 0.2506 610368 mysql_query ( ) ..\imgboard.php:241
show tables like 'CHANGEME'
CHANGEMES_TCREATEcreate table CHANGEME (primary key(no), no int not null auto_increment, now text, name text, email text, sub text, com text, host text, pwd text, ext text, w int, h int, tim text, time int, md5 text, fsize int, root timestamp, resto int)
S_TCREATEF
( ! ) Notice: Undefined variable: pass in C:\wamp\www\public_html\imgboard\imgboard.php on line 923
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
( ! ) Notice: Undefined variable: titlebar in C:\wamp\www\public_html\imgboard\imgboard.php on line 276
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
2 0.2786 618056 valid( ) ..\imgboard.php:923
3 0.2786 618232 head( ) ..\imgboard.php:808
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
( ! ) Notice: Undefined index: upfile in C:\wamp\www\public_html\imgboard\imgboard.php on line 17
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
( ! ) Notice: Undefined variable: con in C:\wamp\www\public_html\imgboard\imgboard.php on line 37
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
( ! ) Warning: mysql_select_db() expects parameter 2 to be resource, null given in C:\wamp\www\public_html\imgboard\imgboard.php on line 37
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
2 0.2396 610048 mysql_select_db ( ) ..\imgboard.php:37
S_SQLDBSF
( ! ) Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\public_html\imgboard\imgboard.php on line 241
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
2 0.2506 610192 table_exist( ) ..\imgboard.php:40
3 0.2506 610320 mysql_call( ) ..\imgboard.php:761
4 0.2506 610368 mysql_query ( ) ..\imgboard.php:241
show tables like 'CHANGEME'
CHANGEMES_TCREATEcreate table CHANGEME (primary key(no), no int not null auto_increment, now text, name text, email text, sub text, com text, host text, pwd text, ext text, w int, h int, tim text, time int, md5 text, fsize int, root timestamp, resto int)
S_TCREATEF
( ! ) Notice: Undefined variable: pass in C:\wamp\www\public_html\imgboard\imgboard.php on line 923
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
( ! ) Notice: Undefined variable: titlebar in C:\wamp\www\public_html\imgboard\imgboard.php on line 276
Call Stack
# Time Memory Function Location
1 0.0000 587296 {main}( ) ..\imgboard.php:0
2 0.2786 618056 valid( ) ..\imgboard.php:923
3 0.2786 618232 head( ) ..\imgboard.php:808
jordane45
Messages postés
38453
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
11 mars 2025
4 741
28 nov. 2014 à 01:11
28 nov. 2014 à 01:11
Oui et ???
Ça n'a pas de rapport avec ta question précédente...
La il semble plus que tu ais des erreurs dans ton code....
Je t'invite pour cela à OUVRIR une nouvelle discussion..(en remettant cette liste d'erreurs) ainsi qu'une copie de ton code
( EN UTILISANT LES[ https://codes-sources.commentcamarche.net/faq/10686-le-nouveau-codes-sources-comment-ca-marche#balises-code BALISES DE CODE...])
Ça n'a pas de rapport avec ta question précédente...
La il semble plus que tu ais des erreurs dans ton code....
Je t'invite pour cela à OUVRIR une nouvelle discussion..(en remettant cette liste d'erreurs) ainsi qu'une copie de ton code
( EN UTILISANT LES[ https://codes-sources.commentcamarche.net/faq/10686-le-nouveau-codes-sources-comment-ca-marche#balises-code BALISES DE CODE...])
jordane45
Messages postés
38453
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
11 mars 2025
4 741
28 nov. 2014 à 01:28
28 nov. 2014 à 01:28
Ca t"affichait DEJA ça tout à l'heure ??
Quoi qu'il en soit... les messages d'erreurs sont clairs..
Par exemple le premier :
Il signifie que la variable n'est pas "définie" .. à la ligne 16
Le souci venant très certainement de celle là :
Idem en ligne 17 ..
Pour y remedier.. le mieux est de vérifier grâce à un ISSET si la variable existe avant de vouloir l'utiliser ...
Ensuite.. ligne 37
Il semble que la variable $con ne soit pas bonne.. donc que la connexion à ta BDD n'aie pas fonctionnée...
Etc....
Il t'indique aussi que mysql est "deprecated"... Il est conseillé de passer à Mysqli voir mieux..à la PDO.
Mais ne t'inquiête pas... ces messages ne sont "que" des avertissements ( NOTICE..WARNING...) cela ne bloque pas le fonctionnement de ton site.
Au pire.. (ce n'est pas très propre.. mais bon..) tu peux désactiver l'affichage de ces infos dans le fichier php.ini .
Quoi qu'il en soit... les messages d'erreurs sont clairs..
Par exemple le premier :
Notice: Undefined index: upfile in C:\wamp\www\public_html\imgboard\imgboard.php on line 16
Il signifie que la variable n'est pas "définie" .. à la ligne 16
Le souci venant très certainement de celle là :
$_FILES["upfile"]["name"]
Idem en ligne 17 ..
Pour y remedier.. le mieux est de vérifier grâce à un ISSET si la variable existe avant de vouloir l'utiliser ...
$upfile_name=isset($_FILES["upfile"]["name"])?$_FILES["upfile"]["name"]:''; $upfile=isset($_FILES["upfile"]["tmp_name"])?$_FILES["upfile"]["tmp_name"]:'';
Ensuite.. ligne 37
Notice: Undefined variable: con in C:\wamp\www\public_html\imgboard\imgboard.php on line 37
Il semble que la variable $con ne soit pas bonne.. donc que la connexion à ta BDD n'aie pas fonctionnée...
Etc....
Il t'indique aussi que mysql est "deprecated"... Il est conseillé de passer à Mysqli voir mieux..à la PDO.
Mais ne t'inquiête pas... ces messages ne sont "que" des avertissements ( NOTICE..WARNING...) cela ne bloque pas le fonctionnement de ton site.
Au pire.. (ce n'est pas très propre.. mais bon..) tu peux désactiver l'affichage de ces infos dans le fichier php.ini .