debug = false; $view->debugging = false; foreach($_REQUEST as $key=>$value) { $$key = $value; } if($mid <=0) exit; $params["DateToUrl"] = "album_list.php?mid=".$mid."&date="; if(!empty($_POST)) { if($action == "move") { $ids = $_POST["SendVal"]; $result = $db->Execute("Select * From blog_attach Where PID in(".$ids.")"); while($row = $result->FetchRow()) { @unlink("..".$row["URL"]); } $result = $db->Execute("Delete From `blog_attach` Where PID in(".$ids.")"); if($result) { $db->Execute("Delete From `blog_photo` Where ID in(".$ids.")"); } } } if($action == "lock") { $db->Execute("Update member Set RIGHT_LOCK=".$_REQUEST[lock]." Where id=".$mid); } $result = $db->GetRow("Select * From `member` Where 1 and ID={$mid}"); $result["BLOG"] = $db->GetOne("Select SUM(DOWNLOAD) From blog_attach Where MID=$mid"); $view->assign("Owner", $result); //$db->Execute("Update member Set blog=blog+1 Where id=".$mid); if($_GET["date"] != "") { $sdate = strtotime($date." 00:00:01"); $bdate = strtotime($date." 23:23:59"); } $where = $_SESSION["memberID"]==$init["SysBlogId"] ? "" : " and p.MID <> ".$init["SysBlogId"]; if($_SESSION["memberID"] != $mid) $where .= " and IS_SHOW=1 "; isset($_GET['date']) && ($_GET['date']!="") && $where .= " and p.CREATE_AT<=".$bdate." and p.CREATE_AT>=".$sdate; isset($_GET['mid']) && ($_GET['mid']=(int)$_GET['mid']) && $where .= " and p.MID = '{$_GET['mid']}' "; $querystring="mid={$mid}&date=".$date; $sql = " Select count(p.ID) From `blog_photo` p Where 1 {$where}"; $where .= " group by p.ID order by a.FRONT desc,p.id DESC, a.ID DESC"; $params['Cnt'] = $db->GetOne($sql); $sql = " Select a.ID as AID,a.URL, p.*,s.NAME AS cNAME From`blog_photo` p "; $sql .= "left join `blog_attach` a on p.ID=a.PID "; $sql .= "left join speciality_photo s on p.CATE_ID=s.ID "; $sql .= "Where 1 {$where}"; $result = $db->SelectLimit($sql, $params['PageNums'], $params['start'])->GetArray(); $photo = array(); for($i=0 ;$iGetRow($sql); $row["URL"] = $rs["URL"]; unset($sql); $sql = "Select COUNT(1) as cnt From `blog_attach` Where PID=".$row["ID"]; $rs = $db->GetRow($sql); $row["cnt"] = $rs["cnt"]; $row["status"] = $row["CREATE_AT"]assign("photo", $photo); $params['Uri'] = "album_list.php?{$querystring}&start="; $pager = new Page($params['Cnt'], $params['start'], $params['Uri'], $params['PageNums'], $params['PageOffset'] ); $pager->txt_start = 1 + $pager->current; $pager->txt_end = ($pager->current + $pager->num >= $pager->total) ? $pager->total : ($pager->current + $pager->num); $view->assign("page", $pager); $view->assign("ords", $ords); $sql = "Select * From member Where id=".$mid; if($sql != "") { $data = $db->GetRow($sql); if ($data['LOGO_L']){ $hash=round($data["ID"]/100); $logoPath="/userdir/logos/$hash/".trim($data['USERNAME'])."/logo_l".$data['LOGO_L']; $logosize=@getimagesize($init["UserHome"]."/logos/$hash/".trim($data['USERNAME'])."/logo_l".$data['LOGO_L']); } else $logoPath=$init["DefaultLogoL"]; $data["logoPath"] = $logoPath; $data["logosize"] = $logosize[3]; $data["MID"] = $data["ID"]; require_once("user_info_right.php"); } $view->assign("frm",$_REQUEST); $view->assign("sess",$_SESSION); output("album_list"); ?>