Friends, I did as requested and here I send the number of errors appearing on the page.
They also insert the code of the page to be looked at.
Urgent need to fix this! to be able to upload images to the respective folder.
Thanks
Errors in the page:
Notice: Use of undefined constant on - assumed 'on' in /home/comite/public_html/admin/prensa/prensa.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/comite/public_html/admin/prensa/prensa.php:3) in /home/comite/public_html/WA_SecurityAssist/Helper_PHP.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /home/comite/public_html/admin/prensa/prensa.php:3) in /home/comite/public_html/admin/prensa/prensa.php on line 62
Warning: move_uploaded_file(/home/comite/public_html/admin/prensa/../../images/prensa/lg/fb6a7b6c31a5f146491c3253e9ddc19e_tmp.png) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/comite/public_html/WA_DigitalFilePro/HelperPHP.php on line 96
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpUajGtC' to '/home/comite/public_html/admin/prensa/../../images/prensa/lg/fb6a7b6c31a5f146491c3253e9ddc19e_tmp.png' in /home/comite/public_html/WA_DigitalFilePro/HelperPHP.php on line 96
Warning: copy(/home/comite/public_html/admin/prensa/../../images/prensa/lg/fb6a7b6c31a5f146491c3253e9ddc19e_tmp.png) [function.copy]: failed to open stream: No such file or directory in /home/comite/public_html/WA_DigitalFilePro/HelperPHP.php on line 98
Warning: copy(/home/comite/public_html/admin/prensa/../../images/prensa/lg/fb6a7b6c31a5f146491c3253e9ddc19e_tmp.png) [function.copy]: failed to open stream: No such file or directory in /home/comite/public_html/WA_DigitalFilePro/HelperPHP.php on line 98
Code of Page:
<?php
error_reporting(E_ALL);
ini_set('display_errors',on);
?>
<?php require_once('../../Connections/comite.php'); ?>
<?php require_once("../../WA_DigitalFilePro/HelperPHP.php"); ?>
<?php require_once( "../../WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Logged in to administradores")){
WA_Auth_RestrictAccess("../../index.php");
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO prensa (imagen_url) VALUES (%s)",
GetSQLValueString($_POST['imagen_url'], "text"));
mysql_select_db($database_comite, $comite);
$Result1 = mysql_query($insertSQL, $comite) or die(mysql_error());
$insertGoTo = "";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_comite, $comite);
$query_prensa = "SELECT * FROM prensa";
$prensa = mysql_query($query_prensa, $comite) or die(mysql_error());
$row_prensa = mysql_fetch_assoc($prensa);
$totalRows_prensa = mysql_num_rows($prensa);?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../../images/prensa/lg/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
'UploadFolder' => "../../images/prensa/tn/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "4",
'ResizeWidth' => "85",
'ResizeHeight' => "140",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "subirprensa", "0", "", "JPG:80", $WA_UploadResult1_Params);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="../../WA_DigitalFilePro/jquery-blockui-formprocessing.js" type="text/javascript"></script>...
...<!--
@import url("../../css/dashboard_style.css");
-->
</style>
<style type="text/css" media="print">
body {
background-color: #fff;
background-image: none;
border-color: #000; /* Sets the border color properties for an element using shorthand notation */
color: #000;
}
-->
</style>
<!--[if IE 5]>
<style type="text/css">
#outerWrapper #contentWrapper #leftColumn1 {
width: 220px;
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
#outerWrapper #contentWrapper, #outerWrapper #contentWrapper #content {
zoom: 1;
}
</style>
<![endif]-->
<!--[if lt IE 7]>
<style type="text/css">
img, div {
behavior: url("../dashboardcomitemexicano_images/iepngfix.htc");
}
</style>
<![endif]-->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<style type="text/css">
.arrowgreen{
width: 180px; /*width of menu*/
border-style: solid solid none solid;
border-color: #94AA74;
border-size: 1px;
border-width: 1px;
}
.arrowgreen ul{
list-style-type: none;
margin: 0;
padding: 0;
}
.arrowgreen li a{
font: bold 12px Verdana, Arial, Helvetica, sans-serif;
display: block;
background: transparent url(../images/arrowgreen.gif) 100% 0;
height: 24px; /*Set to height of bg image- padding within link (ie: 32px - 4px - 4px)*/
padding: 4px 0 4px 10px;
line-height: 24px; /*Set line-height of bg image- padding within link (ie: 32px - 4px - 4px)*/
text-decoration: none;
}
.arrowgreen li a:link, .arrowgreen li a:visited {
color: #5E7830;
}
.arrowgreen li a:hover{
color: #26370A;
background-position: 100% -32px;
}
.arrowgreen li a.selected{
color: #26370A;
background-position: 100% -64px;
}
</style>
</head>
<body>
<div id="outerWrapper">
<div id="header"></div>
<div id="topNavigation"><span style="font-weight: bold"></span</div>
<div id="contentWrapper">
<div id="leftColumn1">
<h2><div class="arrowgreen">
<ul>
<li><a href="../index.php" title="Home">Inicio Admin</a></li>
<li><a href="../homepage/home.php" class="selected" title="Inicio">Cambios en Inicio</a></li>
<li><a href="../fiestas/fiestas.php" title="Whois">Simbolos y Fiestas</a></li>
<li><a href="../comite/comite.php" title="Comite Mexicano">Comite Mexicano</a></li>
<li><a href="../historia/historia.php" title="Tools">Historia</a></li>
<li><a href="../prensa/prensa.php" title="JavaScript">Prensa</a></li>
</ul>
</div>
</a></p>
</div>
<div id="content"> <h1>Ingresar una imagen en la sección Prensa.</h1>
<hr />
<p style="font-size: 12px; color: #333; text-align: center;"><?php echo WA_DFP_AllUploadsDebug(); ?></p>
<div id="form1_ProgressWrapper">
<form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" id="form1">
<table>
<tr valign="baseline">
<td width="122" height="58" align="right">Nombre Imagen:</td>
<td width="468"><input type="text" name="imagen_url" value="" size="32" />
<span style="font-size: 12px"> </span></td>
</tr>
<tr valign="baseline">
<td height="47" align="right">Subir Imagen:</td>
<td width="468"><label>
<input type="file" name="subirprensa" id="subirprensa" />
</label></td>
</tr>
<tr valign="baseline">
<td height="35" align="right"> </td>
<td><input type="submit" value="Insertar Imagen" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
</div>...
...<div id="form1_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('form1', 'form1_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:CaboSunset']);
</script>
<div id="form1_ProgressMessage" >
<p style="margin:10px; padding:5px;" ><img src="../../WA_DigitalFilePro/images/cabo-largespin.gif" alt="" title="" style="vertical-align:middle;" /> Please wait</p>
</div>
</div>...
</body>
</html>
<?php
mysql_free_result($prensa);
?>