source: extensions/meta_og/include/function.mog.inc.php @ 32241

Last change on this file since 32241 was 32229, checked in by ddtddt, 4 years ago

[Meta_OG] add chose albums for list photos / options use other image for album and photo

File size: 2.0 KB
Line 
1<?php 
2// +-----------------------------------------------------------------------+
3// | meta_og plugin for Piwigo by TEMMII                                   |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2008-2020 ddtddt               http://temmii.com/piwigo/ |
6// +-----------------------------------------------------------------------+
7// | This program is free software; you can redistribute it and/or modify  |
8// | it under the terms of the GNU General Public License as published by  |
9// | the Free Software Foundation                                          |
10// |                                                                       |
11// | This program is distributed in the hope that it will be useful, but   |
12// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
13// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
14// | General Public License for more details.                              |
15// |                                                                       |
16// | You should have received a copy of the GNU General Public License     |
17// | along with this program; if not, write to the Free Software           |
18// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
19// | USA.                                                                  |
20// +-----------------------------------------------------------------------+
21
22function listphotosmog(){
23  global $conf;
24  if ($conf['moglista'] != false){
25        $listchose=safe_unserialize($conf['moglista']);
26        $listchose= implode(",", $listchose);
27  }
28  $query='SELECT i.id,i.file,i.name,i.path
29                        FROM ' . IMAGES_TABLE. ' as i ';
30  if(isset($listchose)){
31        $query.='INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id = ic.image_id
32        where ic.category_id IN ('.$listchose.') ';
33  }
34
35  $query.=' order by id;';
36 
37 
38  $tab_picture = pwg_query($query);
39  return $tab_picture;
40}
41?>
Note: See TracBrowser for help on using the repository browser.