Skip to content

Commit

Permalink
Start next dev version
Browse files Browse the repository at this point in the history
  • Loading branch information
GM-Script-Writer-62850 committed Jun 29, 2013
1 parent 9d1b756 commit de0346b
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 19 deletions.
2 changes: 1 addition & 1 deletion download.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function ext2mime($ext){
header("Pragma: public");
header("Content-type: application/x-bzip");
$t=time();
header("Content-Disposition: attachment; filename=\"PHP-Scanner-Server".addslashes($_GET['ver']).".tar.bz2\"");
header("Content-Disposition: attachment; filename=\"PHP-Scanner-Server-".addslashes($_GET['ver']).".tar.bz2\"");
shell_exec("tar cjf /tmp/scanner-$t.tar.bz2 --exclude=\"scans/*\" --exclude=\"config/*.json\" --exclude=\"config/*.txt\" ./");// '--exclude=\"password.md5\"' What was this in there for?
$file=file_get_contents("/tmp/scanner-$t.tar.bz2");
header('Content-Length: '.strlen($file));
Expand Down
6 changes: 4 additions & 2 deletions inc/header.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<!--[if lt IE 10]><meta http-equiv="X-UA-Compatible" content="chrome=1"><![endif]-->
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="chrome=1"><![endif]-->
<title><?php echo $GLOBALS['NAME']; ?> ~ <?php echo $GLOBALS['PAGE']; ?></title>
<link id="style" rel="stylesheet" href="inc/style.php<?php
if(isset($_COOKIE["colors"])){
Expand Down Expand Up @@ -69,7 +69,9 @@
<h2>Error: Legacy Browsers are NOT Supported</h2>
<p>You can view the list of supported browsers in the <a href="index.php?page=About">release notes</a>.<br/>
Please install <a href="http://www.mozilla.com/firefox/">Mozilla Firefox</a> (Recommended) alternatively, you may use<br/>
<a href="http://lmgtfy.com/?q=Internet+Explorer+10+Download&l=1">Internet Explorer 10</a> (Windows 7 and 8 only) or <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a> <sup><i>EOL January 2014</i></sup> for Internet Explorer.
<a href="http://lmgtfy.com/?q=Internet+Explorer+10+Download">Internet Explorer 10</a> (Windows 7 and 8 only) or
<a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a> <sup><i>EOL January 2014</i></sup> for Internet Explorer.<br>
<a href="http://lmgtfy.com/?q=Internet+Explorer+9+Download">Internet Explorer 9</a> will function, but you don't get all the fancy eye candy.
</p>
</div>
<![endif]-->
29 changes: 28 additions & 1 deletion inc/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var ias, previewIMG, scanners, paper, filesLst={},TC='textContent';
var ias, previewIMG, scanners, paper, filesLst={},TC='textContent';// TC can be changed to 'innerText' see header.php
$(document).ready(function () {
e=$('img[title="Preview"]');
previewIMG=e[0];
Expand Down Expand Up @@ -1010,3 +1010,30 @@ function updateCheck(vs,e){
httpRequest.open('GET', 'download.php?update='+encodeURIComponent(vs)+'&'+new Date().getTime());
httpRequest.send(null);
}
function enableColumns(ele,e){ // They work flawlessly in Firefox so it does not call this function
if(e!=null){
ele=getID(ele);
if(ele.className){// there is a class name
if(ele.className=='columns'){
ele.removeAttribute('class');// disable
e.nextSibling[TC]='Enable';
}
else if(ele.className.indexOf('columns')==-1){
ele.className+=' columns';// enable
e.nextSibling[TC]='Disable';
}
else{
ele.className=ele.className.substring(0,ele.className.indexOf(' columns'));// Disable preserve original class name
e.nextSibling[TC]='Enable';
}
}
else{// enable
ele.className='columns';
e.nextSibling[TC]='Disable';
}
}
else if(typeof document.body.style.WebkitColumnGap=="string"||typeof document.body.style.columnGap=="string")
printMsg('CSS3 Columns','Your browser supports them, but they do not work as expected.<br/>'+
'You can try them out by clicking <span class="tool"><a href="#" onclick="return enableColumns(\''+ele+'\',this);">here</a><span class="tip">Enable</span></span>.<br/>'+
'Oh, and by the way they work in <a href="http://www.mozilla.org/en-US/firefox/all.html" target="_blank">Firefox</a> flawlessly.','center',-1);
}
6 changes: 6 additions & 0 deletions inc/paper.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
}
}
?></div>
<script type="text/javascript">
if(typeof document.body.style.MozColumnGap=="string")
getID("paper-list").className+=" columns";// At least someone knows how to do something right
else
enableColumns("paper-list",null);
</script>
<div id="paperForm" class="box box-full"><h2>New Paper Maker</h2><form action="index.php?page=Paper%20Manager" method="POST"><p>
<span>Paper Name:</span><input type="text" name="add"/><br/>
<span>Paper Width:</span><input type="text" name="width"/> inches<br/>
Expand Down
23 changes: 11 additions & 12 deletions inc/style.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
// Chrome's css columns break things
// Chrome's and IE's css columns break things
header('Content-type: text/css');
$expires=86400;//24 hrs
header("Pragma: public");
Expand Down Expand Up @@ -531,7 +531,7 @@
border-color: #<?php echo $LK_COLOR; ?>;
}

#scans.enable{
#scans.columns{
-moz-column-count: 3;
-moz-column-gap: 0;
/* broken tool-tips in opera, chrome, safari, and IE10 (IE10 also breaks some images) */
Expand All @@ -542,11 +542,7 @@
padding-right: 6px;
}

#scans.enable.webkit a.tool[style] .tip{ /* workaround for shitty column implementation*/
bottom: 101%;
left: 30%;
}
#scans.enable .box{
#scans.columns .box{
display: inline-block;
float: none;
}
Expand Down Expand Up @@ -611,16 +607,19 @@
}

#paper-list ul{
list-style: none;
padding-right: 40px;
overflow: visible;
}

#paper-list.columns ul{
-moz-column-count: 3;
-moz-column-gap: 50px;
/* broken tool-tips in opera/IE10 (IE10 also broke a image), messed up borders and broken tool-tips in chrome and safari
/* broken tool-tips in opera/IE10 (IE10 also broke a image), messed up borders and broken tool-tips in chrome and safari */
-webkit-column-count: 3;
-webkit-column-gap: 50px;
column-count: 3;
column-gap: 50px;*/
list-style: none;
padding-right: 40px;
overflow: visible;
column-gap: 50px;
}

#paper-list li, .boxlist{
Expand Down
8 changes: 6 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Sorry for the lack of explanations in the code feel free to ask what something does

$NAME="PHP Scanner Server";
$VER="1.3-6";
$VER="1.3-7_dev";
$SAE_VER="1.4"; // Scanner access enabler version

# ****************
Expand Down Expand Up @@ -301,7 +301,11 @@ function quit(){
$IMAGE=$FILES[$i];
include "inc/scans.php";
}
echo '</div><script type="text/javascript">if(document.body.style.MozColumnGap==""||document.body.style.WebkitColumnGap==""/*||document.body.style.columnGap==""*/)getID("scans").className="enable"+(document.body.style.WebkitColumnGap==""?" webkit":"");</script>';
echo '</div><script type="text/javascript">'.
'if(typeof document.body.style.MozColumnGap=="string")'.
'getID("scans").className="columns";'.// At least someone knows how to do something right
'else '.
'enableColumns("scans",null);</script>';
}
checkFreeSpace($FreeSpaceWarn);
Footer();
Expand Down
2 changes: 1 addition & 1 deletion print.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta http-equiv="Content-type" content="text/html; charset=UTF-8"/><style>div{text-align:center;padding:20px;display:inline-block;/*page-break-after:always;*/}</style><title><?php
<html><head><meta http-equiv="Content-type" content="text/html; charset=UTF-8"/><link rel="shortcut icon" href="inc/images/favicon.png"/><style type="text/css">div{text-align:center;padding:20px;display:inline-block;/*page-break-after:always;*/}</style><title><?php
if(isset($_GET['file'])){
$files=json_decode('{"'.$_GET['file'].'":1}');
$prefix='';
Expand Down

0 comments on commit de0346b

Please sign in to comment.