找回密码
 注册
广告投放 虚位以待【阿里云】2核2G云新老同享 99元/年,续费同价做网站就用糖果主机-sugarhosts.comJtti.com-新加坡服务器,美国服务器,香港服务器
查看: 298|回复: 3

这是什么错呢

[复制链接]
发表于 2008 年 10 月 19 日 18:14:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
不会,请教

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 ( [email=!@move_uploaded_file]!@move_uploaded_file[/email]( $_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."&section=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."&section=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."&section=images" );
}
?>

76行
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
 楼主| 发表于 2008 年 10 月 19 日 19:06:15 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
没人愿意告诉我

让我胡乱猜想出来了,是dezned过程中把符号改变了,好像己解决

再找个没zend的空间调试一下
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2008 年 10 月 19 日 19:35:22 | 显示全部楼层
不懂帮不上
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2008 年 10 月 19 日 20:13:03 | 显示全部楼层
己经在上载了

本机基本调试没看到问题,但本机有zend支持

去落伍逛逛,这边等一天都没两个人
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2025 年 2 月 1 日 23:02 , Processed in 0.028315 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表