<?
/****************************************/
/* (c) 2005 Patrik Jakab */
/* phpAlbum.net */
/*Licence info: GNU/GPL */
/* see file LICENSE */
/****************************************/
/****************************************/
/* Constants */
/****************************************/
/*
these are only default values, need not to be changed here because of
possibility to change it in setup
*/
$phpalbum_version="0.4.1.14";
define("PHPALBUM_APP","OK"); // if this is setted to DEMO then only superuser can change something in setup.
// should be used only for demos i.e. on phpAlbum.net demo page. for normal access use some other value.
if ( file_exists("config.php")){
include("config.php");
}else{
echo "<html><body>";
echo "<table width=\"100%\"><tr><td align=\"center\"><table ><tr valign=\"top\"><td bgcolor=\"#FFDDDD\" width=700 align=left>";
echo "<b> Welcome to phpAlbum $phpalbum_version</b><br>";
echo " You have to edit config_change_it.php and rename it to config.php.<br>";
echo " You have to define data directory, because of security issues it is recommended that this is not data/ but";
echo " something like \"data_Ab6Lkj88KJ/\"";
echo "<td></tr></table></td></tr></table>";
generate_footer();
return;
}
if ( !is_dir($data_dir)){
echo "<html><body>";
echo "<table width=\"100%\"><tr><td align=\"center\"><table ><tr valign=\"top\"><td bgcolor=\"#FFDDDD\" width=700 align=left>";
echo "<b> Welcome to phpAlbum $phpalbum_version</b><br>";
echo "Please check your config.php file, the directory <b>$data_dir</b> does not exist <br>";
echo "<td></tr></table></td></tr></table>";
generate_footer();
return;
}
if ( !check_writable($data_dir)){
echo "<html><body>";
echo "<table width=\"100%\"><tr><td align=\"center\"><table ><tr valign=\"top\"><td bgcolor=\"#FFDDDD\" width=700 align=left>";
echo "<b> Welcome to phpAlbum $phpalbum_version</b><br>";
echo "Your data directory $data_dir is not writable <br>";
echo "Please change the rights on this directory so php can write in it. (UNIX: CHMOD 777, WINDOWS: setup rights)";
echo "<td></tr></table></td></tr></table>";
generate_footer();
return;
}
$pa_setup=Array();
$pa_quality=Array();
$pa_theme=Array();
$pa_lang=Array();
$pa_color_map=Array();
$pa_keywords=Array();
$themes_dir="themes/";
$site_engine="phptemplate";
$act_dir_sorting="default";
/* header buffering */
$sent_header=Array();
/*testing for modules*/
if(function_exists("ftp_login")){
$ftp_support=true;
}else{
$ftp_support=false;
}
if(function_exists("mb_get_info")){
$mbstring=true;
$_mb_info=mb_get_info('all');
if(isset($_mb_info['internal_encoding'])){
$int_encoding=$_mb_info['internal_encoding'];
}else{
$int_encoding='ISO-8859-1';//default
}
}else{
$mbstring=false;
}
//error_reporting(E_WARNING | E_ERROR);
$old_error_handler = set_error_handler("userErrorHandler");
//time limit
@set_time_limit(0);
function userErrorHandler($errno, $errmsg, $filename, $linenum, $vars)
{
global $data_dir,$pa_setup;
// timestamp for the error entry
if(isset($pa_setup['error_logging_enabled'])){
if($pa_setup['error_logging_enabled']=="true"){
$dt = date("y/m/d H:i:s");
// define an assoc array of error string
// in reality the only entries we should
// consider are E_WARNING, E_NOTICE, E_USER_ERROR,
// E_USER_WARNING and E_USER_NOTICE
$errortype = array (
E_ERROR => "Error",
E_WARNING => "Warning",
E_PARSE => "Parsing Error",
E_NOTICE => "Notice",
E_CORE_ERROR => "Core Error",
E_CORE_WARNING => "Core Warning",
E_COMPILE_ERROR => "Compile Error",
E_COMPILE_WARNING => "Compile Warning",
E_USER_ERROR => "User Error",
E_USER_WARNING => "User Warning",
E_USER_NOTICE => "User Notice"
);
// set of errors for which a var trace will be saved
//$user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);
if($errno==E_NOTICE){
return;
}
if(defined("E_STRICT")){
if($errno==E_STRICT){
return;
}
}
$err = "\$phpalbum_Errors[]= Array(\"datetime\" => \"$dt\",";
$err .= "\"errornum\" => \"$errno\",";
$err .= "\"errortype\" => \"".$errortype[$errno]."\",";
$err .= "\"errormsg\" => \"$errmsg\",";
$err .= "\"scriptname\" => \"$filename\",";
$err .= "\"scriptlinenum\" => \"$linenum\"";
$err .= ");";
if(file_exists($data_dir."error.log")){
if(filesize($data_dir."error.log")>1024*1024*2){
unlink($data_dir."error.log");
}
}
$ff=fopen($data_dir."error.log","a");
fwrite($ff,"<? ".$err." ?>\n");
fclose($ff);
}}
}
function pa_readfile($path){
/*fixed bug where if readfile disabled phpAlbum doesn't work*/
if(!function_exists("readfile")){
$file=fopen($path,"rb");
$doc=fread($file,filesize($path));
fclose($file);
echo $doc;
}else{
readfile($path);
}
}
function conv_out($string){
global $pa_setup,$mbstring,$pa_lang;
if($mbstring){
return mb_convert_encoding($string,$pa_lang["character_set"]);
}else{
return $string;
}
}
function prepit($text){
//prepare text from db to be in input type="text"
return str_replace('"','"',$text);
}
function prepdb($text){
//adding slash for all but "
$ret=addslashes($text);
$ret=str_replace('\"','"',$ret);
return $ret;
}
function conv_in($string){
global $pa_setup,$int_encoding,$mbstring,$pa_lang;
if($mbstring){
return mb_convert_encoding($string,$int_encoding,$pa_lang["character_set"]);
}else{
return $string;
}
}
function conv_out_header ($string){
global $pa_setup,$mbstring,$pa_lang;
if($mbstring){
return mb_encode_mimeheader($string,$pa_lang["character_set"]);
}else{
return $string;
}
}
function send_header($text){
global $sent_header;
header($text);
$sent_header[]=$text; /*store for later use*/
}
function store_header($file_name){
global $sent_header;
if(is_array($sent_header)){
$f=fopen($file_name,"w");
foreach($sent_header as $header){
fwrite($f,$header."\n");
}
fclose($f);
}
}
function resend_header($file_name){
$file=file($file_name);
foreach($file as $line){
header(substr($line,0,strlen($line)-1));
}
}
function sent_header(){
global $sent_header;
if(sizeof($sent_header)>0){
return true;
}else{
return false;
}
}
/*assertion*/
/****************************************/
/* Functions */
/****************************************/
function UnsharpMask($img, $amount, $radius,$threshold) {
////////////////////////////////////////////////////////////////////////////////////////////////
////
//// Unsharp Mask for PHP - version 2.0
////
//// Unsharp mask algorithm by Torstein H?nsi 2003-06.
//// thoensi_at_netcom_dot_no.
//// Please leave this notice.
////
///////////////////////////////////////////////////////////////////////////////////////////////
// $img is an image that is already created within php using
// imgcreatetruecolor. No url! $img must be a truecolor image.
// Attempt to calibrate the parameters to Photoshop:
if ($amount > 500) $amount = 500;
$amount = $amount * 0.016;
if ($radius > 50) $radius = 50;
$radius = $radius * 2;
$radius = abs(round($radius)); // Only integers make sense.
if ($radius == 0) return $img;
$w = imagesx($img); $h = imagesy($img);
$imgBlur = imagecreatetruecolor($w, $h);
// Gaus
没有合适的资源?快使用搜索试试~ 我知道了~
[图片动画]phpAlbum v0.4.1.beta14_phpalbum_v0.4.1.beta14.rar
共88个文件
php:38个
png:28个
inc:16个
0 下载量 16 浏览量
2024-04-20
02:02:06
上传
评论
收藏 315KB RAR 举报
温馨提示
【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
资源推荐
资源详情
资源评论
收起资源包目录
[图片动画]phpAlbum v0.4.1.beta14_phpalbum_v0.4.1.beta14.rar (88个子文件)
[图片动画]phpAlbum v0.4.1.beta14_phpalbum_v0.4.1.beta14
phpAlbum_v0.4.1.beta14
language.php 997B
setup_thumbnails.inc 7KB
Arial_Black.ttf 113KB
setup_ecard.inc 2KB
lang
en_utf8.php 29KB
setup_dirs.inc 6KB
config.php 261B
LICENSE 18KB
setup_errorlog.inc 3KB
setup_admin.inc 6KB
main.php 85KB
res
nopic.png 18KB
logo_setup.png 12KB
new.png 1024B
logo.png 23KB
expl.png 1KB
stamp.png 17KB
red_x.png 755B
audio.png 18KB
flowing.png 1KB
movie.png 19KB
raster.png 1KB
CodePicture.class.php 1KB
phpdatabase.php 22KB
upgrade.php 6KB
setup.php 38KB
themes
Borders
album.tpl.php 5KB
comments.tpl.php 2KB
dir_new.png 1KB
default.css 4KB
login.tpl.php 767B
error.tpl.php 2KB
dir_passwd.png 1KB
ecard.tpl.php 2KB
shdw_ru.png 374B
thmb.tpl.php 2KB
shdw_r.png 209B
parameters.tpl.php 392B
dir.tpl.php 404B
raster.tpl.php 222B
dir_pic.tpl.php 571B
shdw_d.png 212B
imageview.tpl.php 6KB
shdw_ld.png 365B
dir.png 983B
shdw_rd.png 340B
Flowing_Dark
album.tpl.php 4KB
comments.tpl.php 2KB
dir_new.png 3KB
login.tpl.php 767B
error.tpl.php 2KB
dir_passwd.png 3KB
ecard.tpl.php 2KB
shdw_ru.png 374B
thmb.tpl.php 2KB
shdw_r.png 209B
parameters.tpl.php 392B
dir.tpl.php 485B
raster.tpl.php 233B
dir_pic.tpl.php 1KB
shdw_d.png 212B
imageview.tpl.php 6KB
shdw_ld.png 365B
dir.png 2KB
shdw_rd.png 340B
engines
phptemplate
setup.tpl.php 903B
main_setup.php 3KB
engine.php 20KB
default.css 3KB
raster.tpl.php 187B
setup.css 2KB
setup_user.inc 3KB
setup_themes.inc 11KB
setup_logs.inc 4KB
index.php 451B
setup_params.inc 6KB
setup_cache.inc 1KB
INSTALL 74B
install_db.php 10KB
setup_photos.inc 5KB
setup_groups.inc 7KB
setup_comments.inc 4KB
setup_texts.inc 2KB
config_change_it.php 258B
upgrade_db.php 5KB
setup_main.inc 5KB
copyright.png 5KB
setup_users.inc 2KB
共 88 条
- 1
资源评论
小肥羊k
- 粉丝: 1424
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功