PHP代码问题 我刚学习PHP 手里有个网站感觉他里面的怎么没有 HTML代码 看起来很费劲 20
<?phpinclude("include/func_ini.php");session_start();include("session.php");include("...
<?php
include( "include/func_ini.php" );
session_start( );
include( "session.php" );
include( "include/functions.php" );
include( "goods_header.php" );
if ( !$refvircd || $refvircd == "00000000"||$refvircd =="" )
{
$te_list = kgogo_fetch_array( kgogo_query_error( "select * from ".$kgogo_align." order by classification_id asc limit 1, 1" ) );
if ( $te_list[classification_id] )
{
$refvircd = $te_list[classification_id];
}
else
{
error_msg( "{$lang_mall_ctegory_uid}", "" );
}
}
$mc_list = kgogo_fetch_array( kgogo_query_error( "select * from ".$kgogo_align." where classification_id = '{$refvircd}'" ) );
if ( !$mc_list[uid] )
{
error_msg( "{$lang_mall_ctegory_uid}", "" );
}
if ( $k_permission < $mc_list[classification_grant] )
{
if ( !$k_check_id )
{
error_msg( "{$lang_mall_grant}", "login.php?url=good_align_list.php&refvircd=".$refvircd );
}
else
{
error_msg( "{$lang_mall_grant_member}", "" );
}
}
if ( $refvircd )
{
$tmp_level = classification_level( $refvircd );
$next_num = $tmp_level * 2;
$parent_str = substr( $refvircd, 0, $next_num );
$top_sql = " where ( substring(merchandise_category,1,".$next_num.") = '{$parent_str}' or substring(merchandise_mcategory1,1,{$next_num}) = '{$parent_str}' or substring(merchandise_mcategory2,1,{$next_num}) = '{$parent_str}' or substring(merchandise_mcategory3,1,{$next_num}) = '{$parent_str}' or substring(merchandise_mcategory4,1,{$next_num}) = '{$parent_str}' or substring(merchandise_mcategory5,1,{$next_num}) = '{$parent_str}' ) and merchandise_class = '0' and approval_date > '0' ";
$top_result = kgogo_query_error( "select * from ".$kgogo_goodsdetail." {$top_sql} order by merchandise_sale_stock desc limit 0, 5" );
}
else{
$top_sql =" where 1=1 ";
}
$query1 = "select * from ".$kgogo_goodsdetail." {$top_sql} and merchandise_addoption1 = '1' order by merchandise_rank asc limit 0, 12";
$result1 = kgogo_query_error( $query1 );
$query2 = "select * from ".$kgogo_goodsdetail." {$top_sql} and merchandise_addoption2 = '1' order by merchandise_rank asc limit 0, 12";
$result2 = kgogo_query_error( $query2 );
最上面是引入文件 下面的就看不懂了 ,我知道里面有很多函数,也不知道那些是,谁榜我 解释下 是什么意思,说的月详细越好 我新手 附加图片是他的页面形式, 展开
include( "include/func_ini.php" );
session_start( );
include( "session.php" );
include( "include/functions.php" );
include( "goods_header.php" );
if ( !$refvircd || $refvircd == "00000000"||$refvircd =="" )
{
$te_list = kgogo_fetch_array( kgogo_query_error( "select * from ".$kgogo_align." order by classification_id asc limit 1, 1" ) );
if ( $te_list[classification_id] )
{
$refvircd = $te_list[classification_id];
}
else
{
error_msg( "{$lang_mall_ctegory_uid}", "" );
}
}
$mc_list = kgogo_fetch_array( kgogo_query_error( "select * from ".$kgogo_align." where classification_id = '{$refvircd}'" ) );
if ( !$mc_list[uid] )
{
error_msg( "{$lang_mall_ctegory_uid}", "" );
}
if ( $k_permission < $mc_list[classification_grant] )
{
if ( !$k_check_id )
{
error_msg( "{$lang_mall_grant}", "login.php?url=good_align_list.php&refvircd=".$refvircd );
}
else
{
error_msg( "{$lang_mall_grant_member}", "" );
}
}
if ( $refvircd )
{
$tmp_level = classification_level( $refvircd );
$next_num = $tmp_level * 2;
$parent_str = substr( $refvircd, 0, $next_num );
$top_sql = " where ( substring(merchandise_category,1,".$next_num.") = '{$parent_str}' or substring(merchandise_mcategory1,1,{$next_num}) = '{$parent_str}' or substring(merchandise_mcategory2,1,{$next_num}) = '{$parent_str}' or substring(merchandise_mcategory3,1,{$next_num}) = '{$parent_str}' or substring(merchandise_mcategory4,1,{$next_num}) = '{$parent_str}' or substring(merchandise_mcategory5,1,{$next_num}) = '{$parent_str}' ) and merchandise_class = '0' and approval_date > '0' ";
$top_result = kgogo_query_error( "select * from ".$kgogo_goodsdetail." {$top_sql} order by merchandise_sale_stock desc limit 0, 5" );
}
else{
$top_sql =" where 1=1 ";
}
$query1 = "select * from ".$kgogo_goodsdetail." {$top_sql} and merchandise_addoption1 = '1' order by merchandise_rank asc limit 0, 12";
$result1 = kgogo_query_error( $query1 );
$query2 = "select * from ".$kgogo_goodsdetail." {$top_sql} and merchandise_addoption2 = '1' order by merchandise_rank asc limit 0, 12";
$result2 = kgogo_query_error( $query2 );
最上面是引入文件 下面的就看不懂了 ,我知道里面有很多函数,也不知道那些是,谁榜我 解释下 是什么意思,说的月详细越好 我新手 附加图片是他的页面形式, 展开
3个回答
展开全部
额,这个貌似很麻烦,建议你去专业论坛里问问………………
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这个好像就是一个分类信息调用的片段,应该是某个系统的一个文件吧,哈哈。。看来你没学过PHP啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你找到error_msg 这个函数的功能 多半是打印输出和地址跳转的功能.kgogo_query_error 是从数据库中取出结果,具体实现看下对应包含文件的函数就明白了.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询