本文整理汇总了PHP中Gallery::get_gallery方法的典型用法代码示例。如果您正苦于以下问题:PHP Gallery::get_gallery方法的具体用法?PHP Gallery::get_gallery怎么用?PHP Gallery::get_gallery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gallery
的用法示例。
在下文中一共展示了Gallery::get_gallery方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gallery
public function gallery($page = 1)
{
$page_details = array('pageURL' => '/gallery/' . $page);
$current_page_details = Common::setPageDetails($page_details);
$page = intval($page) < 1 ? 1 : intval($page);
$input = count($_GET) ? Common::formXssClean() : array();
$input['search'] = isset($input['search']) ? preg_replace('/[^\\p{L}\\-_ 0-9]+/u', '', $input['search']) : '';
$input['filter'] = isset($input['filter']) && in_array($input['filter'], array('winners', 'all')) ? $input['filter'] : 'all';
$gallery = Gallery::get_gallery($page, $input['search'], $input['filter'] == 'winners');
$total_pages = Gallery::get_total_pages($input['search'], $input['filter'] == 'winners');
return View::make('layouts/default')->with('template', 'gallery')->with('gallery', $gallery)->with('total_pages', $total_pages)->with('input', $input)->with('page', $page)->with('page_details', $current_page_details);
}
示例2: Gallery
<?php
include 'includes/inc.php';
include "includes/classes/class.gallery.php";
$gallery = new Gallery();
$arr = NULL;
$data = NULL;
//print_r($_SESSION); exit;
if (isset($_GET['act']) && isset($_GET['id'])) {
$data = $gallery->get_gallery($_GET['id'], $_SESSION['user_id']);
$data['gallery_path'] = '../../admin/images/gallery/' . $data['customer_id'] . '/' . $_GET['id'] . '/';
/*echo '<pre>';
print_r($data);
exit;*/
}
if (isset($_POST['AddGallery'])) {
$arr['customer_id'] = $_SESSION['user_id'];
$arr['customer_name'] = $_SESSION['username'];
$arr['customer_gallery_name'] = $_POST['customer_gallery_name'];
// print_r($arr); exit;
if (isset($_POST['gallery_id']) && $_POST['gallery_id'] != '') {
$temp_dir_name = $_POST['gallery_id'];
} else {
$temp_dir_name = "temp";
}
//echo $temp_dir_name; exit;
$new_path = $album_path . '/' . $temp_dir_name;
//echo $new_path;
if (!is_dir($new_path)) {
mkdir($new_path, 0777);
chmod($new_path, 0777);