├── README.md
├── index.php
├── public_html
├── css
│ └── main.css
└── js
│ └── main.js
└── resources
├── config.php
├── library
├── adapt.min.js
├── jquery-ui.js
├── jquery.js
└── phpthumb
│ ├── GdThumb.inc.php
│ ├── PhpThumb.inc.php
│ ├── ThumbBase.inc.php
│ ├── ThumbLib.inc.php
│ └── thumb_plugins
│ └── gd_reflection.inc.php
└── templates
├── breadcrumbs.php
├── content.php
├── functions.php
├── header.php
└── menu.php
/README.md:
--------------------------------------------------------------------------------
1 | PhotoLight
2 | ==========
3 |
4 | The easiest photo gallery there is.
5 |
6 | Just edit the file "config.php" (located in resources) to specify the path to your photos, and voila !
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | .
22 | *
23 | * @category Website
24 | * @package Photolight
25 | * @author Thibaud Rohmer
26 | * @copyright 2011 Thibaud Rohmer
27 | * @license http://www.gnu.org/licenses/
28 | * @link http://github.com/thibaud-rohmer/PhotoLight
29 | */
30 |
31 | // load up config file
32 | require_once("resources/config.php");
33 | require_once(TEMPLATES_PATH . "/functions.php");
34 |
35 |
36 | $dir = $config['path'];
37 |
38 | if(file_exists($config['thumbs_path']."/new.txt")){
39 | $new = file($config['thumbs_path']."/new.txt");
40 | }else{
41 | $new = array();
42 | }
43 |
44 | // Get image
45 | if(isset($_GET['i'])){
46 | $i = r2a(stripslashes($_GET['i']),$config['path']);
47 | if(inGoodPlace($i,$config['path'])){
48 | return output($i);
49 | }else{
50 | $err = "Wrong image path";
51 | }
52 | }
53 |
54 | // Get thumb
55 | if(isset($_GET['t'])){
56 | $i = r2a(stripslashes($_GET['t']),$config['path']);
57 | $t = r2a(stripslashes($_GET['t']),$config['thumbs_path']);
58 | // Image in good place
59 | if(inGoodPlace($i,$config['path'])){
60 |
61 | // No thumb yet
62 | if(!file_exists($t)){
63 | create_thumb($i,$t,$config['thumbs_path']);
64 | }
65 | if(file_exists($t)){
66 | return output($t);
67 | }else{
68 | return output($i);
69 | }
70 | }else{
71 | $err = "Wrong image path";
72 | }
73 | }
74 |
75 |
76 | // Get folder
77 | if(isset($_GET['f'])){
78 | $d = r2a(stripslashes($_GET['f']),$config['path']);
79 | if(inGoodPlace($d,$config['path'])){
80 | $dir = $d;
81 | }else{
82 | $err = "Wrong path.";
83 | }
84 | }
85 |
86 | require_once(TEMPLATES_PATH . "/header.php");
87 |
88 | ?>
89 |
90 |
91 | $err
";
94 | }
95 | ?>
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
107 |
108 | Loading...
109 |
110 |
111 |
112 |
113 |