Saludos,
Estoy desarrollando un sistema donde las imagenes se inserten y en caso tal d haber una con el mismo nombre este la renombre y la suba para q no se intercambien ... pero me da este error
Parse error: syntax error, unexpected T_VARIABLE in /home/gentesc/public_html/prueba/rrhh.php on line 105
y mi codigo es
Código PHP:
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$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 . "'" : "''";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "''";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "''";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "''";
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")) {
$ediciondir= 'curri/';
$uploaddir=$ediciondir;
if (!is_dir($ediciondir)) { mkdir($uploaddir, 0777); }
$filename = $_FILES['img']['name'];
if (file_exists($filename))
{
//Renombramos imagen añadiendole la letra b al final, aunque puede ser cualquier cosa
$imagen=$filename."b.jpg";
//La copiamos al servidor
move_uploaded_file($imagen $uploaddir . $imagen); <--- linea 105
}else
{
//La copiamos al servidor
move_uploaded_file($_FILES['img']['tmp_name'], $uploaddir . $_FILES['img']['name']);
}
Alguien podria ayudarme???
Gracias