Код:if(!isset($shop_intrell)) $shop_intrell=new shop_intrell();
$nc_comments = new nc_comments($cc);
$fields=$db->get_results("SELECT * FROM `Field` WHERE `Class_ID`=".$current_cc['Sub_Class_Settings']['product_type']." ORDER BY `Priority`");
if($fields)
foreach($fields as $field)
{
$query_select .="b.`".$field->Field_Name."`,";
$result_vars .="\$f_".$field->Field_Name.",";
}
$query_join=" LEFT JOIN `Message".$current_cc['Sub_Class_Settings']['product_type']."` as b ON (b.`Parent_Message_ID`=a.`Message_ID`) ";
$query_select .="'clear'";
$result_vars .="\$trashh";
if( !empty( $_GET['order'] ) && in_array( $_GET['order'], array( 'Name' ) ) ){
$query_order .= " a." . $_GET['order'] . " ";
if( isset( $_GET['desc'] ) )
$query_order .= "DESC ";
}
if( !empty( $_GET['order'] ) && in_array( $_GET['order'], array( 'Price' ) ) ){
$query_order .= " a." . $_GET['order'] . " ";
if( isset( $_GET['desc'] ) )
$query_order .= "DESC ";
}