###############Test variables###############
$onpage = intval($_SESSION["onpage"]);
$prew = intval($_SESSION["prew"]);
$sort = get2ses('sort');
$id = intval($_GET['id']);
if (!empty ($_POST['page']))
{
$page = intval($_POST['page']);}
else {$page = intval($_GET['page']);}
$start = intval($_GET['start']);
if($onpage < 3){
$onpage = 11;
}
if($prew != 0 and $prew != 1){
$prew = $setup['preview'];
}
$valid_sort = array('name' => '','data' => '','load' => '','size' => '','eval' =>'');
if(!isset($valid_sort[$sort])){
$sort='name';
}
$MODE = '`priority` DESC,`name` ASC';
if($sort == 'data') $MODE = '`priority` DESC,`timeupload` DESC';
elseif($sort == 'size') $MODE = '`priority` DESC,`size` ASC';
elseif($sort == 'load') $MODE = '`priority` DESC,`loads` DESC';
elseif($sort == 'eval' && $setup['eval_change']) $MODE = '`priority` DESC,`yes` DESC ,`no` ASC';
###############Get the current directory#############
if(!$id){
$d['path'] = $setup['path'].'/';
}
else{
$d = mysql_fetch_assoc(mysql_query('SELECT `path` FROM `files` WHERE `id` = '.$id.' LIMIT 1'));
}
if(!is_dir($d['path'])) die('Folder not found.</body></html>');
By this code i just sort according to Name | Size | Popularity | Rating but i want to sort according to Alphabetical order.Please anyone tell me what code should be added in this and where should add that code???? please help or tell me any other option... <<<<<Thanks Masterminds >>>>
$onpage = intval($_SESSION["onpage"]);
$prew = intval($_SESSION["prew"]);
$sort = get2ses('sort');
$id = intval($_GET['id']);
if (!empty ($_POST['page']))
{
$page = intval($_POST['page']);}
else {$page = intval($_GET['page']);}
$start = intval($_GET['start']);
if($onpage < 3){
$onpage = 11;
}
if($prew != 0 and $prew != 1){
$prew = $setup['preview'];
}
$valid_sort = array('name' => '','data' => '','load' => '','size' => '','eval' =>'');
if(!isset($valid_sort[$sort])){
$sort='name';
}
$MODE = '`priority` DESC,`name` ASC';
if($sort == 'data') $MODE = '`priority` DESC,`timeupload` DESC';
elseif($sort == 'size') $MODE = '`priority` DESC,`size` ASC';
elseif($sort == 'load') $MODE = '`priority` DESC,`loads` DESC';
elseif($sort == 'eval' && $setup['eval_change']) $MODE = '`priority` DESC,`yes` DESC ,`no` ASC';
###############Get the current directory#############
if(!$id){
$d['path'] = $setup['path'].'/';
}
else{
$d = mysql_fetch_assoc(mysql_query('SELECT `path` FROM `files` WHERE `id` = '.$id.' LIMIT 1'));
}
if(!is_dir($d['path'])) die('Folder not found.</body></html>');
By this code i just sort according to Name | Size | Popularity | Rating but i want to sort according to Alphabetical order.Please anyone tell me what code should be added in this and where should add that code???? please help or tell me any other option... <<<<<Thanks Masterminds >>>>