當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gallery::get_gallery方法代碼示例

本文整理匯總了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);
 }
開發者ID:Aranjedeath,項目名稱:LaravelAppSkeleton,代碼行數:12,代碼來源:GalleryController.php

示例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);
開發者ID:Kylemurray25,項目名稱:wmlmusicguide,代碼行數:31,代碼來源:newgallery.php


注:本文中的Gallery::get_gallery方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。