fixed qr code
This commit is contained in:
91
ChangeLog
91
ChangeLog
@@ -0,0 +1,91 @@
|
|||||||
|
2017-02-17 11:04
|
||||||
|
|
||||||
|
* [r13] debian/control.in:
|
||||||
|
backup
|
||||||
|
|
||||||
|
2017-01-14 10:26
|
||||||
|
|
||||||
|
* [r12] debian/control.in:
|
||||||
|
build system updated
|
||||||
|
|
||||||
|
2017-01-12 13:22
|
||||||
|
|
||||||
|
* [r11] ChangeLog, autogen.sh, ax_init_standard_project.m4,
|
||||||
|
bootstrap.sh, build-in-docker.conf, build-in-docker.sh,
|
||||||
|
debian/changelog.in, debian/control.in, resolve-debbuilddeps.sh,
|
||||||
|
resolve-rpmbuilddeps.sh:
|
||||||
|
update build system
|
||||||
|
|
||||||
|
2016-09-30 21:55
|
||||||
|
|
||||||
|
* [r10] ChangeLog[ADD], autogen.sh[ADD],
|
||||||
|
ax_cxx_compile_stdcxx_11.m4, ax_init_standard_project.m4,
|
||||||
|
bootstrap.sh, build-in-docker.conf[ADD], build-in-docker.sh,
|
||||||
|
doc/footer.html.in[ADD], doc/header.html.in[ADD],
|
||||||
|
doc/plantuml.jar[ADD], doc/style.css[ADD],
|
||||||
|
mac-create-app-bundle.sh, makefile_test.inc.am[ADD],
|
||||||
|
resolve-debbuilddeps.sh, resolve-rpmbuilddeps.sh,
|
||||||
|
sharing-gallery.desktop.in[ADD], sql-to-dot.sed:
|
||||||
|
build fixed
|
||||||
|
|
||||||
|
2016-04-04 09:47
|
||||||
|
|
||||||
|
* [r9] COPYING[DEL], ChangeLog[DEL], INSTALL[DEL]:
|
||||||
|
after migration to new svn server
|
||||||
|
|
||||||
|
2015-11-16 12:38 marc
|
||||||
|
|
||||||
|
* [r8] doc/doxyfile.in:
|
||||||
|
SVG must not be interactive for embedding in redmine
|
||||||
|
|
||||||
|
2015-11-09 22:52 marc
|
||||||
|
|
||||||
|
* [r7] COPYING[ADD], ChangeLog[ADD], INSTALL[ADD],
|
||||||
|
ax_init_standard_project.m4, bootstrap.sh,
|
||||||
|
resolve-debbuilddeps.sh, sql-to-dot.sed[ADD]:
|
||||||
|
build system updated
|
||||||
|
|
||||||
|
2015-11-07 10:47 marc
|
||||||
|
|
||||||
|
* [r6] bootstrap.sh, debian/control.in:
|
||||||
|
there is no qt4-default
|
||||||
|
|
||||||
|
2015-11-07 09:23 marc
|
||||||
|
|
||||||
|
* [r5] bootstrap.sh:
|
||||||
|
there is no qt4-default
|
||||||
|
|
||||||
|
2015-11-07 00:25 marc
|
||||||
|
|
||||||
|
* [r4] debian/control.in:
|
||||||
|
set Section
|
||||||
|
|
||||||
|
2015-11-05 12:54 marc
|
||||||
|
|
||||||
|
* [r3] bootstrap.sh, debian, debian/changelog.in[ADD],
|
||||||
|
debian/compat[ADD], debian/control.in[ADD], debian/docs[ADD],
|
||||||
|
debian/rules[ADD]:
|
||||||
|
updated build system
|
||||||
|
|
||||||
|
2015-11-05 10:23 marc
|
||||||
|
|
||||||
|
* [r2] .htaccess[DEL], AUTHORS[ADD], NEWS[ADD], README[ADD],
|
||||||
|
ax_check_qt.m4[ADD], ax_cxx_compile_stdcxx_11.m4[ADD],
|
||||||
|
ax_init_standard_project.m4[ADD], bootstrap.sh[ADD],
|
||||||
|
build-in-docker.sh[ADD], build-resource-file.sh[ADD],
|
||||||
|
configure.ac[ADD], debian[ADD], debian/changelog.in[ADD],
|
||||||
|
debian/compat[ADD], debian/control.in[ADD], debian/docs[ADD],
|
||||||
|
debian/rules[ADD], doc[ADD], doc/doxyfile.in[ADD],
|
||||||
|
doc/makefile.am[ADD], folder.png[DEL], html[ADD],
|
||||||
|
html/.htaccess[CPY], html/folder.png[CPY], html/index.php[CPY],
|
||||||
|
html/makefile.am[ADD], index.php[DEL],
|
||||||
|
mac-create-app-bundle.sh[ADD], makefile.am[ADD],
|
||||||
|
resolve-debbuilddeps.sh[ADD], resolve-rpmbuilddeps.sh[ADD],
|
||||||
|
sharing-gallery.spec.in[ADD]:
|
||||||
|
updated build system
|
||||||
|
|
||||||
|
2015-03-29 15:24 marc
|
||||||
|
|
||||||
|
* [r1] .[ADD], .htaccess[ADD], folder.png[ADD], index.php[ADD]:
|
||||||
|
initial files
|
||||||
|
|
||||||
|
@@ -23,12 +23,11 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
|||||||
ldap_start_tls($ldapconn)
|
ldap_start_tls($ldapconn)
|
||||||
or error_die($ldapconn, "cannot start LDAP TLS");
|
or error_die($ldapconn, "cannot start LDAP TLS");
|
||||||
if ($ldapbind = @ldap_bind($ldapconn, $checkuser.'='.$tstusername.','.$ldapbase, $password)) {
|
if ($ldapbind = @ldap_bind($ldapconn, $checkuser.'='.$tstusername.','.$ldapbase, $password)) {
|
||||||
$search = ldap_search($ldapconn, $ldapbase, $checkuser.'='.$tstusername, array('mail\
|
$search = ldap_search($ldapconn, $ldapbase, $checkuser.'='.$tstusername, array('mail', 'cn'));
|
||||||
', 'cn'));
|
|
||||||
$data = ldap_get_entries($ldapconn, $search);
|
$data = ldap_get_entries($ldapconn, $search);
|
||||||
ldap_close($ldapconn);
|
ldap_close($ldapconn);
|
||||||
$username = $tstusername;
|
$username = $tstusername;
|
||||||
$email = array('count' => 1, 0 => $username.'@'.$_SERVER[HTTP_HOST]);
|
$email = array('count' => 1, 0 => $username.'@'.$_SERVER['HTTP_HOST']);
|
||||||
$fullname = $username;
|
$fullname = $username;
|
||||||
if ($data['count']==1) {
|
if ($data['count']==1) {
|
||||||
if (isset($data[0]['mail']))
|
if (isset($data[0]['mail']))
|
||||||
@@ -36,6 +35,7 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
|||||||
if (isset($data[0]['cn'][0]))
|
if (isset($data[0]['cn'][0]))
|
||||||
$fullname = $data[0]['cn'][0];
|
$fullname = $data[0]['cn'][0];
|
||||||
}
|
}
|
||||||
|
error_log(print_r($data, true));
|
||||||
} else {
|
} else {
|
||||||
error_log("user login failed: ".$checkuser.'='.$tstusername.','.$ldapbase);
|
error_log("user login failed: ".$checkuser.'='.$tstusername.','.$ldapbase);
|
||||||
error_log(ldap_error($ldapconn));
|
error_log(ldap_error($ldapconn));
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once('/usr/share/phpqrcode/qrlib.php'); // configure path to phpqrcode
|
require_once('/usr/share/phpqrcode/phpqrcode.php'); // configure path to phpqrcode
|
||||||
$imagepath = "/path/to/your/files";
|
$imagepath = "/path/to/your/files";
|
||||||
$thumbpath = "/var/tmp/sharing-gallery/thumbnails/";
|
$thumbpath = "/var/tmp/sharing-gallery/thumbnails/";
|
||||||
$max_validity_days = "30";
|
$max_validity_days = "30";
|
||||||
$font = "DejaVu-Sans";
|
$font = "DejaVu-Sans";
|
||||||
$preview_num = "5";
|
$preview_num = "5";
|
||||||
$default_mail_subject = "Sharing Gallery: See my Fotos";
|
$default_mail_subject = "Sharing Gallery: See my Fotos";
|
||||||
$default_mail_text = "Fotos from my gallery:\n\npassword = PASSWORD\n\nlink: LINK\n\nRegards\nUSERNAME";
|
$default_mail_text = "Fotos from my gallery, please follow the link:\n\npassword: PASSWORD\n\nlink:\nLINK\n\nRegards\nUSERNAME";
|
||||||
$default_mailto = "";
|
$default_mailto = "";
|
||||||
$fallback_mail_replyto = "";
|
$fallback_mail_replyto = "";
|
||||||
?>
|
?>
|
@@ -158,6 +158,11 @@
|
|||||||
}
|
}
|
||||||
if (!isset($_REQUEST['secret'])) {
|
if (!isset($_REQUEST['secret'])) {
|
||||||
if ($username=="") error_die('not authorized', '403 Forbidden');
|
if ($username=="") error_die('not authorized', '403 Forbidden');
|
||||||
|
if (isset($_REQUEST['qrcode'])) {
|
||||||
|
QRcode::png((isset($_SERVER['HTTPS']) ? 'https' : 'http')
|
||||||
|
.'://'.$_SERVER['HTTP_HOST'].explode('?', $_SERVER['REQUEST_URI'])[0].'?secret='.$_REQUEST['qrcode']);
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
if (isset($_REQUEST['path'])) checkPath($_REQUEST['path']);
|
if (isset($_REQUEST['path'])) checkPath($_REQUEST['path']);
|
||||||
if (isset($_REQUEST['folder']) && !preg_match('/\//', $_REQUEST['folder'])) {
|
if (isset($_REQUEST['folder']) && !preg_match('/\//', $_REQUEST['folder'])) {
|
||||||
$file = $thumbpath.'/folders/'.$subpath.'/'.$_REQUEST['folder'].'.png';
|
$file = $thumbpath.'/folders/'.$subpath.'/'.$_REQUEST['folder'].'.png';
|
||||||
@@ -182,6 +187,7 @@
|
|||||||
}
|
}
|
||||||
} elseif (isset($_REQUEST['file'])) checkFile($_REQUEST['file'], isset($_REQUEST['thumb']));
|
} elseif (isset($_REQUEST['file'])) checkFile($_REQUEST['file'], isset($_REQUEST['thumb']));
|
||||||
if ($file!="") returnFile($file);
|
if ($file!="") returnFile($file);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isset($_REQUEST['password'])) {
|
if (isset($_REQUEST['password'])) {
|
||||||
$secret = decrypt($_REQUEST['secret']) or error_die('bad password', '403 Forbidden');
|
$secret = decrypt($_REQUEST['secret']) or error_die('bad password', '403 Forbidden');
|
||||||
@@ -218,10 +224,6 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (isset($_REQUEST['qrcode'])) {
|
|
||||||
QRcode::png((isset($_SERVER['HTTPS']) ? 'https' : 'http')
|
|
||||||
.'://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI].'?secret='.$_REQUEST['secret']);
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?><!DOCTYPE html>
|
?><!DOCTYPE html>
|
||||||
@@ -274,10 +276,15 @@
|
|||||||
$secret=urlencode(encrypt($key));
|
$secret=urlencode(encrypt($key));
|
||||||
$default_mailto = "";
|
$default_mailto = "";
|
||||||
if (isset($_REQUEST['mailto'])) {
|
if (isset($_REQUEST['mailto'])) {
|
||||||
|
if (preg_match('/LINK/', $message))
|
||||||
$message = preg_replace('/PASSWORD/', $_REQUEST['password'], $_REQUEST['mailtext']);
|
$message = preg_replace('/PASSWORD/', $_REQUEST['password'], $_REQUEST['mailtext']);
|
||||||
|
else
|
||||||
|
$message = $_REQUEST['mailtext']."\n\npassword: ".$REQUEST['password'];
|
||||||
$link = (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].explode('?', $_SERVER['REQUEST_URI'])[0].'?secret='.$secret;
|
$link = (isset($_SERVER['HTTPS'])?'https://':'http://').$_SERVER['HTTP_HOST'].explode('?', $_SERVER['REQUEST_URI'])[0].'?secret='.$secret;
|
||||||
if (preg_match('/LINK/', $message)) $message = preg_replace('/LINK/', $link, $message);
|
if (preg_match('/LINK/', $message))
|
||||||
else $message .= "\n\n".$link;
|
$message = preg_replace('/LINK/', $link, $message);
|
||||||
|
else
|
||||||
|
$message .= "\n\n".$link;
|
||||||
if (mail($_REQUEST['mailto'], $_REQUEST['subject'], $message, 'From: '.$_REQUEST['replyto']."\r\n".'Reply-To: '.$_REQUEST['replyto'])) {
|
if (mail($_REQUEST['mailto'], $_REQUEST['subject'], $message, 'From: '.$_REQUEST['replyto']."\r\n".'Reply-To: '.$_REQUEST['replyto'])) {
|
||||||
echo '<h2>Mail Successfully Sent</h2>';
|
echo '<h2>Mail Successfully Sent</h2>';
|
||||||
echo '<p>Mail sent to '.$_REQUEST['mailto'].'.</p>';
|
echo '<p>Mail sent to '.$_REQUEST['mailto'].'.</p>';
|
||||||
@@ -292,17 +299,17 @@
|
|||||||
='.$secret.'">Link to Share</a></p>';
|
='.$secret.'">Link to Share</a></p>';
|
||||||
?>
|
?>
|
||||||
<img src="<?php echo (isset($_SERVER['HTTPS']) ? 'https' : 'http')
|
<img src="<?php echo (isset($_SERVER['HTTPS']) ? 'https' : 'http')
|
||||||
.'://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI].'?secret='.$secret.'&qrcode=1'; ?>" />
|
.'://'.$_SERVER['HTTP_HOST'].explode('?', $_SERVER['REQUEST_URI'])[0].'?qrcode='.$secret; ?>" />
|
||||||
<p>or Send Link in E-Mail:</p>
|
<p>or Send Link in E-Mail:</p>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<table style="width: 100%"><tr>
|
<table style="width: 100%"><tr>
|
||||||
<td><label for="replyto">From:</label></td><td><input name="replyto" type="text" value="<?php echo alt($_REQUEST['replyto'], $email, $fallback_mail_replyto) ?>" style="width: 99%"/></td>
|
<td><label for="replyto">From:</label></td><td><input name="replyto" type="text" value="<?php echo alt($_REQUEST['replyto'], $email[0], $fallback_mail_replyto); ?>" list="emails" style="width: 99%"/><datalist id="emails"><?php for ($i=0; $i<$email['count']; ++$i) echo '<option value="'.$email[$i].'">'; ?></datalist></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td><label for="mailto">To:</label></td><td><input name="mailto" type="text" value="<?php echo alt($_REQUEST['mailto'], $default_mailto) ?>" style="width: 99%"/></td>
|
<td><label for="mailto">To:</label></td><td><input name="mailto" type="text" value="<?php echo alt($_REQUEST['mailto'], $default_mailto); ?>" style="width: 99%"/></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td><label for="subject">Subject:</label></td><td><input name="subject" type="text" value="<?php echo alt($_REQUEST['subject'], $default_mail_subject) ?>" style="width: 99%"/></td>
|
<td><label for="subject">Subject:</label></td><td><input name="subject" type="text" value="<?php echo alt($_REQUEST['subject'], $default_mail_subject) ?>" style="width: 99%"/></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td colspan="2"><textarea name="mailtext" style="width: 99%; height: 15em"><?php echo alt($_REQUEST['mailtext'], $default_mail_text) ?></textarea></td>
|
<td colspan="2"><textarea name="mailtext" style="width: 99%; height: 15em"><?php echo preg_replace('/USERNAME/', $fullname, alt($_REQUEST['mailtext'], $default_mail_text)) ?></textarea></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td colspan="2"><input type="submit" value="send email"/></td>
|
<td colspan="2"><input type="submit" value="send email"/></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
Reference in New Issue
Block a user