".sort_header('Message_ID','ID')."
function sort_header($fild,$header, $wrap=0){
global $sub,$cc,$sort,$order;
/*
* URI sort, order, sid.
* , .. ,
*
*/
$param="";
$separator='?';
foreach ($_GET as $key => $value) {
if($key!='sort' && $key!='order' && $key!='sid')
{
$param .=$separator.$key."=".$value;
$separator='&';
}
}
// .
if($wrap==0)
{
$out .="";
}
$out .="<a href='$param&sort=$fild";
if($sort==$fild && $order !='ASC')
{
$out .="&order=ASC";
}
$out .="'>$header";
$out .="";
if($sort==$fild && $order =='ASC')
{
$out .=" ";
}
elseif($sort==$fild)
{
$out .=" ";
}
if($wrap==0)
{
$out .="
function sort_header($fild,$header, $wrap=0){
global $sub,$cc,$sort,$order;
/*
* URI sort, order, sid.
* , .. ,
*
*/
$param="";
$separator='?';
foreach ($_GET as $key => $value) {
if($key!='sort' && $key!='order' && $key!='sid')
{
$param .=$separator.$key."=".$value;
$separator='&';
}
}
// .
if($wrap==0)
{
$out .="";
}
$out .="<a href='$param&sort=$fild";
if($sort==$fild && $order !='ASC')
{
$out .="&order=ASC";
}
$out .="'>$header";
$out .="";
if($sort==$fild && $order =='ASC')
{
$out .=" ";
}
elseif($sort==$fild)
{
$out .=" ";
}
if($wrap==0)
{
$out .="
$query_order = sort_set();
function sort_set(){
global $inside_admin,$sort,$order,$classID;
// . ,
$sql = "SHOW COLUMNS FROM Message".$classID." WHERE Field = '".$sort."'";
$result = mysql_query($sql);
$num_rows = mysql_num_rows($result);
if($num_rows == 1)
{
if($order=='ASC')
{
$order = 'ASC';
}
else
{
$order = 'DESC';
}
// , $query_order
$out="a.".$sort." ".$order;
return $out;
}
else
{
return;
}
}