相册程序
程序
/*
+---------------------------------------------------+
| Name : NEATPIC (无数据版本)
+---------------------------------------------------+
| Created / Modify : 2003-12-27 / 2004-4-13
+---------------------------------------------------+
| Version : 1.2.3
+---------------------------------------------------+
| Author : walkerlee, gouki
+---------------------------------------------------+
| Powered by NEATSTUDIO 2002 - 2004
+---------------------------------------------------+
| QQ : 808075
| Email : walkerlee@163.net
| Homepge : http://www.neatstudio.com
| BBS : http://www.neatstudio.com/bbs/
+---------------------------------------------------+
| Note :
|
| 1.本软件对于非商业用户完全免费,如果要使用在商业用途
| 方面,必须取得作者的授权.
|
| 2.你可以任意传播以及修改本程序,但不能以任何形式删除
| 本程序的版权.请记住,保留作者版权是对作者工作的尊敬.
|
| 3.如果有问题,可以通过上面提供的方式进行解答,但作者
| 学业繁重,如果不能及时或者不解答,请谅解.
|
| 4.作者对使用该程序导致的问题,不予以负责.
|
| 5.本程序版权归 NeatStudio 所有.禁止任何侵权行为!
|
+---------------------------------------------------+
*/
/*
+----------------------------------+
| Config
+----------------------------------+
| C / M : 2003-12-28 / 2004-4-13
+----------------------------------+
*/
$configAdminPass = "neatpic"; //管理员密码 注:安全起见,默认密码不能登陆管理
$configWantedPass = false; //查看相册是否需要密码 需要:true 不需要:false
$configOpenGzip = true; //是否压缩页面 压缩:true 不压缩:false
$configShowPicSize = false; //是否显示图片的大小 (单位:KB) 显示:true 不显示:false (注:不显示,程序运行速度将提高)
$configExt = array('jpg', 'jpeg', 'gif', 'png', 'bmp'); //图片类型
$strLenMax = 25; //文件名字限制长度 (防止撑破表格)
$configEachPageMax = 16; //每页显示的图片数目
$configEachLineMax = 4; //每行显示的图片数目
$configTDWidth = 185; //表格宽度
$configTDHeight = 138; //表格高度
$configPageMax = 5; //分页前后预览数
$configDirPasswordFile = "neatpicPassword.php"; //密码文件
$configTilte = "欢迎光临“开花的草”相册。设有精美小图、动态图片、人物图片、图文并茂、网页横幅、站长相关。"; //标题
$configVer = "1.2.3"; //程序版本号
/*
+----------------------------------+
| Class
+----------------------------------+
| C / M : 2003-12-28 / 2003-12-29
+----------------------------------+
*/
Class neatpic
{
var $configWantedPass;
var $configAdminPass;
var $configOpenGzip;
var $configShowPicSize;
var $configExt = array();
var $strLenMax;
var $configEachPageMax;
var $configEachLineMax;
var $configTDHeight;
var $configTDWidth;
var $configPageMax;
var $configTilte;
var $configVer;
var $dirOptionList;
var $timer;
var $usedTime;
var $pathLevelNum;
var $nowDirNmae;
var $dirNum;
var $picNum;
var $pageTotal;
var $start;
var $offSet;
var $pageStart;
var $pageMiddle;
var $pageEnd;
var $temp;
var $picID;
var $picRealSizeWidth;
var $picRealSizeHeight;
var $picArray = array();
var $picFileArray = array();
var $dirArray = array();
var $dirNameArray = array();
var $pathArray = array();
var $pathError = false;
var $page;
var $path;
var $style;
var $c;
/*
+----------------------------------+
| Constructor
+----------------------------------+
| C / M : 2003-12-28 / 2003-12-29
+----------------------------------+
*/
function neatpic($configWantedPass, $configAdminPass, $configDirPasswordFile, $configOpenGzip, $configShowPicSize, $configExt, $strLenMax, $configEachPageMax, $configEachLineMax, $configTDHeight, $configTDWidth, $configPageMax, $configTilte, $configVer)
{
$this->configWantedPass = & $configWantedPass;
$this->configAdminPass = & $configAdminPass;
$this->configDirPasswordFile = & $configDirPasswordFile;
$this->configOpenGzip = & $configOpenGzip;
$this->configShowPicSize = & $configShowPicSize;
$this->configExt = & $configExt;
$this->strLenMax = & $strLenMax;
$this->configEachPageMax = & $configEachPageMax;
$this->configEachLineMax = & $configEachLineMax;
$this->configTDHeight = & $configTDHeight ;
$this->configTDWidth = & $configTDWidth;
$this->configPageMax = & $configPageMax;
$this->configTilte = & $configTilte;
$this->configVer = & $configVer;
}
/*
+----------------------------------+
| Open gzip
+----------------------------------+
| C / M : 2003-12-29 / --
+----------------------------------+
*/
function gzip()
{
if ($this->configOpenGzip == true)
ob_start("ob_gzhandler");
}
/*
+----------------------------------+
| Get the querystring
+----------------------------------+
| C / M : 2003-12-28 / 2003-12-29
+----------------------------------+
*/
function getVars()
{
$this->page = rawurldecode($_GET['page']);
$this->path = rawurldecode($_GET['path']);
$this->style = $_GET['style'];
if (!$this->style) $this->style = "small";
if (!$this->path) $this->path = ".";
}
/*
+----------------------------------+
| Check error
+----------------------------------+
| C / M : 2003-12-28 / 2004-1-1
+----------------------------------+
*/
function checkError()
{
if (preg_match("/\.\./", $this->path)) $pathError = true;
if (!is_dir($this->path)) $pathError = true;
if ($pathError == true)
{
header("location:".$_SERVER['PHP_SELF']);
exit;
}
}
/*
+----------------------------------+
| Path array initialize
+----------------------------------+
| C / M : 2003-12-28 / 2003-12-29
+----------------------------------+
*/
function pathArrayInitialize()
{
if (!$this->path) $this->path = ".";
$this->pathArray = explode("/", $this->path);
$this->pathLevelNum = count($this->pathArray);
$this->nowDirName = $this->pathArray[$this->pathLevelNum - 1];
if ($this->nowDirName == ".") $this->nowDirName = "根目录";
}
/*
+----------------------------------+
| Timer
+----------------------------------+
| C / M : 2003-12-29 / --
+----------------------------------+
*/
function timer()
{
$time = explode( " ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
$this->timer = $usec + $sec;
}
/*
+----------------------------------+
| Show used time
+----------------------------------+
| C / M : 2003-12-29 / --
+----------------------------------+
*/
function usedTime()
{
$startTime = $this->timer;
$this->timer();
$endTime = $this->timer;
$usedTime = $endTime - $startTime;
$this->usedTime = sprintf("%0.4f", $usedTime);
}
/*
+----------------------------------+
| Make over direct
+----------------------------------+
| C / M : 2003-12-28 / 2003-12-29
+----------------------------------+
*/
function makeOverdirect()
{
$overPath = ".";
for($i = 1; $i pathLevelNum - 1; $i++)
{
$overPath = $overPath."/".$this->pathArray[$i];
}
$this->dirArray[] = $overPath;
$this->dirNameArray[] = "上级目录";
for($i = 1; $i pathLevelNum; $i++)
{
$this->encodePath .= rawurlencode($this->pathArray[$i])."/";
}
}
/*
+----------------------------------+
| GetFileExt
+----------------------------------+
| C / M : 2003-12-28 / --
+----------------------------------+
*/
function getFileExt($fileName)
{
$pos = strrpos($fileName, '.');
return strtolower(substr($fileName, $pos+1, (strlen($fileName)-$pos-1)));
}
/*
+----------------------------------+
| Make direct list
+----------------------------------+
| C / M : 2003-12-28 / 2003-12-29
+----------------------------------+
*/
function makeDirList()
{
$dir = dir($this->path);
while($file = $dir->read())
{
if ($file "." and $file "..")
{
$fileName = $file;
$file = $this->path."/".$file;
if (is_dir($file))
{
$this->dirArray[] = $file;
$this->dirNameArray[] = $fileName;
}
if (in_array($this->getFileExt($file), $this->configExt))
{
$this->picEncodeArray[] = "./" . $this->encodePath . rawurlencode($fileName);
$this->picArray[] = $file;
$this->picFileArray[] = $fileName;
}
}
}
}
/*
+----------------------------------+
| Get each array number
+----------------------------------+
| C / M : 2003-12-28 / --
+----------------------------------+
*/
function getEachArrayNum()
{
$this->dirNum = count($this->dirArray);
$this->picNum = count($this->picArray);
}
/*
+----------------------------------+
| Make page bar
+----------------------------------+
| C / M : 2003-12-28 / 2003-12-29
+----------------------------------+
*/
function makePageBar()
{
$this->pageTotal = ceil($this->picNum / $this->configEachPageMax);
if (!$this->page or $this->page page = 1;
if ($this->page > $this->pageTotal) $this->page = $this->pageTotal;
$this->offSet = $this->configEachPageMax * $this->page;
$this->start = $this->offSet - $this->configEachPageMax;
if ($this->start start = 0;
if ($this->offSet > $this->picNum) $this->offSet = $this->picNum;
$this->pageStart = $this->page - $this->configPageMax;
if ($this->pageStart pageStart = 1;
$this->pageMiddle = $this->page + 1;
$this->pageEnd = $this->pageMiddle + $this->configPageMax;
if ($this->page configPageMax) $this->pageEnd = $this->configPageMax * 2 + 1;
if ($this->pageEnd > $this->pageTotal) $this->pageEnd = $this->pageTotal + 1;
}
/*
+----------------------------------+
| Show page bar
+----------------------------------+
| C / M : 2003-12-28 / 2003-12-29
+----------------------------------+
*/
function showPageBar()
{
print("
print("
");
print("[ path)."&style=".$this->style."&page=".($this->page - 1)."\" title=\"上一页\">上一页 ] ");
print("path)."&style=".$this->style."&page=1\" title=\"首页\">\n");
for ($i = $this->pageStart; $i page; $i++)
print("path)."&style=".$this->style."&page=".$i."\" title=\"第 ".$i." 页\">[".$i."] ");
printf("[%s]", $this->page);
for ($i = $this->pageMiddle; $i pageEnd; $i++)
print("path)."&style=".$this->style."&page=".$i."\" title=\"第 ".$i." 页\">[".$i."] ");
print("...path)."&style=".$this->style."&page=".$this->pageTotal."\" title=\"第 " . $this->pageTotal . " 页\">[" . $this->pageTotal . "]\n");
print(" path)."&style=".$this->style."&page=".$this->pageTotal."\" title=\"尾页\">>>\n");
print("[ path)."&style=".$this->style."&page=".($this->page + 1)."\" title=\"下一页\">下一页 ] 共 ".$this->pageTotal." 页 当前所在第 ".$this->page." 页");
print("
");
print("
}
/*
+----------------------------------+
| Set picture ID
+----------------------------------+
| C / M : 2003-12-28 / --
+----------------------------------+
*/
function setPicID($id)
{
$this->picID = $id;
}
/*
+----------------------------------+
| Get picture dimension
+----------------------------------+
| C / M : 2003-12-28 / --
+----------------------------------+
*/
function getPicDim()
{
$picSize = GetImageSize($this->picArray[$this->picID]);
preg_match("!width=\"(.*)\" height=\"(.*)\"!", $picSize['3'], $tempSize);
$this->picRealSizeWidth = $tempSize['1'];
$this->picRealSizeHeight = $tempSize['2'];
/*
$tempSize['1'] configTDWidth ? $this->temp['Width'] = $tempSize['1'] : $this->temp['Width'] = $this->configTDWidth;
$tempSize['2'] configTDHeight ? $this->temp['Height'] = $tempSize['2'] : $this->temp['Height'] = $this->configTDHeight;
*/
$tWidth = $this->picRealSizeWidth / $this->configTDWidth;
$tHeight = $this->picRealSizeHeight / $this->configTDHeight;
if ($this->picRealSizeWidth > $this->configTDWidth OR $this->picRealSizeHeight > $this->configTDHeight)
{
if ($tWidth > $tHeight)
{
$this->temp['Width'] = $this->configTDWidth;
$this->temp['Height'] = number_format($this->picRealSizeHeight / $tWidth);
}
elseif ($tWidth {
$this->temp['Height'] = $this->configTDHeight;
$this->temp['Width'] = number_format($this->picRealSizeWidth / $tHeight);
}
else
{
$this->temp['Width'] = $this->configTDWidth;
$this->temp['Height'] = $this->configTDHeight;
}
}
else
{
$this->temp['Width'] = $this->picRealSizeWidth;
$this->temp['Height'] = $this->picRealSizeHeight;
}
}
/*
+----------------------------------+
| Show the title javascript
+----------------------------------+
| C / M : 2003-12-29 / 2003-12-30
+----------------------------------+
*/
function ShowJS()
{
print('
<script><br/> /******************************************************************************<br/> NEATPIC Show Title<br/> Modified by: walkerlee<br/> Date: 2003-12-30<br/> Based upon: Crossday Studio and http://www.cnzzz.com<br/> *******************************************************************************/</script>
tPopWait=20;
showPopStep=10;
popOpacity=85;
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;
document.write("
document.write("");
document.write("
function showPopupText(){
var o=event.srcElement;
MouseX=event.x;
MouseY=event.y;
if(o.alt!=null && o.alt!="") { o.pop=o.alt;o.alt="" }
if(o.title!=null && o.title!=""){ o.pop=o.title;o.title="" }
if(o.pop) { o.pop=o.pop.replace("\n","
"); o.pop=o.pop.replace("\n","
"); }
if(o.pop!=sPop) {
sPop=o.pop;
clearTimeout(curShow);
clearTimeout(tFadeOut);
clearTimeout(tFadeIn);
clearTimeout(tFadeWaiting);
if(sPop==null || sPop=="") {
popLayer.innerHTML="";
popLayer.style.filter="Alpha()";
popLayer.filters.Alpha.opacity=0;
} else {
if(o.dyclass!=null) popStyle=o.dyclass
else popStyle="cPopText";
curShow=setTimeout("showIt()",tPopWait);
}
}
}
function showIt() {
popLayer.className=popStyle;
popLayer.innerHTML=\'
\'+sPop+\'
\';
popWidth=popLayer.clientWidth;
popHeight=popLayer.clientHeight;
if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0;
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else popTopAdjust=0;
popLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
popLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
popLayer.style.filter="Alpha(Opacity=0)";
fadeOut();
}
function fadeOut(){
if(popLayer.filters.Alpha.opacity
tFadeOut=setTimeout("fadeOut()",1);
}
}
document.onmouseover=showPopupText;
');
}
/*
+----------------------------------+
| Show css
+----------------------------------+
| C / M : 2003-12-28 / --
+----------------------------------+
*/
function showCSS()
{
print("
");
}
/*
+----------------------------------+
| Show title
+----------------------------------+
| C / M : 2003-12-28 / --
+----------------------------------+
*/
function showTitle()
{
print("\n");
print("
print("\n");
print("\n");
print("
\n");
print("
print($this->configTilte);
print("
print("
\n");
}
/*
+----------------------------------+
| Show state
+----------------------------------+
| C / M : 2003-12-28 / 2004-4-9
+----------------------------------+
*/
function showState()
{
print("
print("
\n"); print(" |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The message "Your organization has asked you to change your PIN" will appear on the login screen. This happens when the PIN expiration limit is reached on a computer using organization-based account settings, where they have control over personal devices. However, if you set up Windows using a personal account, the error message should ideally not appear. Although this is not always the case. Most users who encounter errors report using their personal accounts. Why does my organization ask me to change my PIN on Windows 11? It's possible that your account is associated with an organization, and your primary approach should be to verify this. Contacting your domain administrator can help! Additionally, misconfigured local policy settings or incorrect registry keys can cause errors. Right now

Windows 11 brings fresh and elegant design to the forefront; the modern interface allows you to personalize and change the finest details, such as window borders. In this guide, we'll discuss step-by-step instructions to help you create an environment that reflects your style in the Windows operating system. How to change window border settings? Press + to open the Settings app. WindowsI go to Personalization and click Color Settings. Color Change Window Borders Settings Window 11" Width="643" Height="500" > Find the Show accent color on title bar and window borders option, and toggle the switch next to it. To display accent colors on the Start menu and taskbar To display the theme color on the Start menu and taskbar, turn on Show theme on the Start menu and taskbar

By default, the title bar color on Windows 11 depends on the dark/light theme you choose. However, you can change it to any color you want. In this guide, we'll discuss step-by-step instructions for three ways to change it and personalize your desktop experience to make it visually appealing. Is it possible to change the title bar color of active and inactive windows? Yes, you can change the title bar color of active windows using the Settings app, or you can change the title bar color of inactive windows using Registry Editor. To learn these steps, go to the next section. How to change title bar color in Windows 11? 1. Using the Settings app press + to open the settings window. WindowsI go to "Personalization" and then

Do you see "A problem occurred" along with the "OOBELANGUAGE" statement on the Windows Installer page? The installation of Windows sometimes stops due to such errors. OOBE means out-of-the-box experience. As the error message indicates, this is an issue related to OOBE language selection. There is nothing to worry about, you can solve this problem with nifty registry editing from the OOBE screen itself. Quick Fix – 1. Click the “Retry” button at the bottom of the OOBE app. This will continue the process without further hiccups. 2. Use the power button to force shut down the system. After the system restarts, OOBE should continue. 3. Disconnect the system from the Internet. Complete all aspects of OOBE in offline mode

Taskbar thumbnails can be fun, but they can also be distracting or annoying. Considering how often you hover over this area, you may have inadvertently closed important windows a few times. Another disadvantage is that it uses more system resources, so if you've been looking for a way to be more resource efficient, we'll show you how to disable it. However, if your hardware specs can handle it and you like the preview, you can enable it. How to enable taskbar thumbnail preview in Windows 11? 1. Using the Settings app tap the key and click Settings. Windows click System and select About. Click Advanced system settings. Navigate to the Advanced tab and select Settings under Performance. Select "Visual Effects"

We all have different preferences when it comes to display scaling on Windows 11. Some people like big icons, some like small icons. However, we all agree that having the right scaling is important. Poor font scaling or over-scaling of images can be a real productivity killer when working, so you need to know how to customize it to get the most out of your system's capabilities. Advantages of Custom Zoom: This is a useful feature for people who have difficulty reading text on the screen. It helps you see more on the screen at one time. You can create custom extension profiles that apply only to certain monitors and applications. Can help improve the performance of low-end hardware. It gives you more control over what's on your screen. How to use Windows 11

Many users will choose the Huawei brand when choosing smart watches. Among them, Huawei GT3pro and GT4 are very popular choices. Many users are curious about the difference between Huawei GT3pro and GT4. Let’s introduce the two to you. . What are the differences between Huawei GT3pro and GT4? 1. Appearance GT4: 46mm and 41mm, the material is glass mirror + stainless steel body + high-resolution fiber back shell. GT3pro: 46.6mm and 42.9mm, the material is sapphire glass + titanium body/ceramic body + ceramic back shell 2. Healthy GT4: Using the latest Huawei Truseen5.5+ algorithm, the results will be more accurate. GT3pro: Added ECG electrocardiogram and blood vessel and safety

Screen brightness is an integral part of using modern computing devices, especially when you look at the screen for long periods of time. It helps you reduce eye strain, improve legibility, and view content easily and efficiently. However, depending on your settings, it can sometimes be difficult to manage brightness, especially on Windows 11 with the new UI changes. If you're having trouble adjusting brightness, here are all the ways to manage brightness on Windows 11. How to Change Brightness on Windows 11 [10 Ways Explained] Single monitor users can use the following methods to adjust brightness on Windows 11. This includes desktop systems using a single monitor as well as laptops. let's start. Method 1: Use the Action Center The Action Center is accessible
