⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scrollinggallery.php

📁 太烦了
💻 PHP
字号:
<?php/** * class scrollingGallery * *  A template to get you started building templates.  Rename all scrollingGallery *  with the name of your plugin * * * */include_once(MODOSDATE_DIR . 'modPlugin.php');class scrollingGallery extends modPlugin {   /**   * Holds the language phrases   *   * @access private   */   var $lang;   /**   * The name name of the plugin class.   *   * @access private   */   var $plugin_class_name = "scrollingGallery";   /**   * The link text that appears on the user's menu   *   * @access private   */   var $display_name  ;   /**   * The link text that appears on the user's menu   *   * @access private   */   var $user_menu_text ;   /**   * Appear on users menu (true or false)   *   * @access private   */   var $user_menu_appear = true;   /**   * The link text that appears on the admin's menu   *   * @access private   */   var $admin_menu_text = "";   /**   * Appear on admin's menu (true or false)   *   * @access private   */   var $admin_menu_appear = false;   /**   * Constructor   *   * @return   * @access public   */  function scrollingGallery( )  {    $this->modPlugin();	$pluginDir = dirname(__FILE__).'/../';	$this->lang = $this->modLoadLang($pluginDir);  	$this->user_menu_text=$this->modGetLang('user_title');  	$this->display_name = $this->admin_menu_text=$this->modGetLang('admin_title');  } // end of member method pluginClass   /**   * Does the processing to display a user page.  Called from plugin.php   *   * @return array   * @access public   */   function  displayPluginPage() {	if(!isset($_GET['framepic']))	{        if ( $_REQUEST['id'] ) {            $userid = $_REQUEST['id'];            $udata = $this->modGetUser( array('userid' => $userid) );        }        else {             $udata = $this->modGetLoggedInUser();             $userid = $udata['id'];       }        $username = $udata['username'];        $search = array('username' => $udata['username']);        $useralbums = $this->modGetAllAlbums($search);        $album_passwd = $_REQUEST['album_passwd'];        $album_id = $_REQUEST['album_id'];        if ($album_id != '') {                $search = array(                    'username' => $username,                    'id'       => $album_id,                );                $adata = $this->modGetAlbum($search);                $pwd = $adata['password'];                if ($pwd != md5($album_passwd) && $userid != $_SESSION['UserId']) {                        $err = $this->lang['invalid_password'];                        $album_id = '';                }        }        if ($album_id != '') {                $search = array(                    'userid' => $userid,                    'album_id' => $album_id,                );                $pics = $this->modGetAllPictures($search);        } else {                $search = array(                    'userid' => $userid,                    'album_id' => 0,                );                $pics = $this->modGetAllPictures($search);        }        if ( isset($pics[0]['picno']) ) {          $this->modSmartyAssign('galpicid', $pics[0]['picno']);        }        $this->modSmartyAssign('useralbums', $useralbums);        $this->modSmartyAssign('username',$username);        $this->modSmartyAssign('pics',$pics);        $this->modSmartyAssign('userid',$userid);        $this->modSmartyAssign('err', $err);        $this->modSmartyAssign('album_id', $album_id);        $this->modSmartyAssign('plugin_name', $this->plugin_class_name);        $this->modSmartyAssign('link',"showpic.tpl");        $css = '<link rel="stylesheet" href="' . $this->modGetDocIncludes() . 'gallerystyle.css" type="text/css" />';        $js = '<script type="text/javascript" src="' . $this->modGetDocIncludes() . 'motiongallery.js"></script>';        $this->modSmartyJS($js);        $this->modSmartyCSS($css);        return $this->modSmartyFetch('scrollinggallery.tpl');	}	else	{	$this->modSmartyAssign('userid',$_GET['id']);	$this->modSmartyAssign('galpicid',$_GET['picid']);	$this->modSmartyAssign('album_id',$_GET['album_id']);	echo $this->modSmartyFetch('showpic.tpl');die();	}   }   /**   * WARNING: USER IS NOT VALIDATED HERE.  BE CAREFUL   * Does the processing to display 100% plugin content.  Called from pluginraw.php   *   * @return array   * @access public   */   function  displayPluginContent() {      return $this->modSmartyFetch('pictureframe.tpl');   }    /**   * Returns the content that will appear in the left column of a page.  Designed to be overridden by plugins   *   * @return array   * @access public   */  function displayLeftCol() {  }    /**   * Returns the content that will appear in the main content area of the page.  This content will appear after the existing main content.  Designed to be overridden by plugins   *   * @return array   * @access public   */  function displayMain() {  }}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -