这是什么错呢
不会,请教Parse error: parse erro in admin\product_images_modify.php on line 76
<?php
/*********************/
/* */
/*Version : 5.1.0*/
/*Author: RM */
/*Comment : 071223 */
/* */
/*********************/
if ( !defined( "NetGou_SESSION_START" ) )
{
header( "Location: ../../" );
exit( "Access denied" );
}
if ( $REQUEST_METHOD == "POST" && $mode == "product_images" )
{
if ( $userfile )
{
switch ( $imagetype )
{
case "C" :
$config_data['path'] = $netgou['icons_path'];
$return = $netgou['icons_size_limit'] == "0";
break;
case "W" :
$config_data['path'] = $netgou['pcicons_path'];
$return = $netgou['pcicons_size_limit'] == "0";
break;
case "T" :
$config_data['path'] = $netgou['thumbnails_path'];
$return = $netgou['thumbnails_size_limit'] == "0";
break;
case "D" :
$config_data['path'] = $netgou['det_images_path'];
$return = $netgou['det_images_size_limit'] == "0";
break;
return false;
}
$file_name = $imagetype == "W" ? "w_".$productid : $imagetype == "C" ? "c_".$productid : $imagetype == "T" ? "t_".$productid : "d_".$productid;
$file_type = strstr( $_FILES['userfile']['type'], "gif" ) ? "gif" : strstr( $_FILES['userfile']['type'], "png" ) ? "png" : "jpg";
$counter = 1;
$file_name_tmp = $file_name;
while ( file_exists( "../".$config_data['path'].$file_name_tmp.".".$file_type ) )
{
$file_name_tmp = $file_name."_".sprintf( "%02d", $counter );
++$counter;
}
$file_name = $file_name_tmp;
$path = "../".$config_data['path'].$file_name.".".$file_type;
$image_path = $config_data['path'].$file_name.".".$file_type;
if ( !@move_uploaded_file( $_FILES['userfile']['tmp_name'], $path ) )
{
$top_message['content'] = $lng_man['msg_err_file_operation'];
$top_message['type'] = "E";
}
else
{
db_query( "INSERT INTO ".$sql_tbl['images']." (productid, alt, avail, image_path) VALUES ('{$productid}', '".addslashes( $alt )."', 'Y', '".addslashes( $image_path )."')" );
$top_message['content'] = $lng_man['msg_file_uploaded'];
@chmod( $path, 438 );
@unlink( $userfile );
}
}
ng_header_location( "product_modify.php?mode=return&productid=".$productid."§ion=images" );
}
if ( $mode == "update_availability" )
{
if ( $image_avail )
{
foreach ( $image_avail as $key => $value )
{
db_query( "UPDATE ".$sql_tbl['images']." SET avail='{$value}', alt='{$image_alt[$key]}', orderby='{$image_orderby[$key]}' WHERE imageid='{$key}'" );
if ( !$fields['d_image'][$key] && !$productids )
{
$data = ng_query_first( "SELECT * FROM ".$sql_tbl['images']." WHERE productid = '{$productid}' AND imageid = '{$key}'" );
unset( $data->'imageid' );
unset( $data->'productid' );
$data = array_map( "addslashes", $data );
foreach ( $productids as $k => $v )
{
db_query( "DELETE FROM ".$sql_tbl['images']." WHERE productid = '{$k}' AND md5 = '{$data['md5']}'" );
$data['productid'] = $k;
ng_array2insert( "images", $data );
}
}
}
$top_message['content'] = $lng_man['msg_adm_product_images_upd'];
$top_message['type'] = "I";
}
ng_header_location( "product_modify.php?mode=return&productid=".$productid."§ion=images" );
}
if ( $mode == "product_images_delete" )
{
if ( $product_info )
{
$image_paths = ng_query( "SELECT image_path FROM ".$sql_tbl['images']." WHERE imageid='{$imageid}' AND productid='{$productid}'" );
if ( !empty( $image_paths ) )
{
foreach ( $image_paths as $v )
{
if ( $v['image_path'] != "files/default_image.gif" )
{
@unlink( "../".$v['image_path'] );
}
}
}
db_query( "DELETE FROM ".$sql_tbl['images']." WHERE imageid='{$imageid}' AND productid='{$productid}'" );
$top_message['content'] = $lng_man['msg_adm_product_images_del'];
$top_message['type'] = "I";
}
ng_header_location( "product_modify.php?mode=return&productid=".$productid."§ion=images" );
}
?>
76行 没人愿意告诉我:'(
让我胡乱猜想出来了,是dezned过程中把符号改变了,好像己解决
再找个没zend的空间调试一下;P 不懂帮不上 己经在上载了;P
本机基本调试没看到问题,但本机有zend支持
去落伍逛逛,这边等一天都没两个人
页:
[1]