From: <wis...@us...> - 2015-07-29 10:39:14
|
Revision: 13135 http://sourceforge.net/p/xoops/svn/13135 Author: wishcraft Date: 2015-07-29 10:39:10 +0000 (Wed, 29 Jul 2015) Log Message: ----------- Signed 2.1.9 Final Major - Puesdo.legal.binding.v2 Added Paths: ----------- XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.7z XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.ar XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.cbr XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.cbz XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.cpio XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.ear XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.exe XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.iso XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.jar XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.rar XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar.7z XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar.Z XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar.bz2 XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar.gz XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar.lz XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar.lzma XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar.lzo XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.tar.xz XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.war XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.zip Removed Paths: ------------- XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.7z XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.ear XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.exe XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.iso XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.rar XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.tar XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.tar.bz2 XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.tar.gz XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.war XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.zoo Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.7z =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.ear =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.exe =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.iso =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.rar =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.tar =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.tar.bz2 =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.tar.gz =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.war =================================================================== (Binary files differ) Deleted: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19f.zoo =================================================================== (Binary files differ) Added: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.7z =================================================================== (Binary files differ) Index: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.7z =================================================================== --- XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.7z 2015-07-29 10:33:23 UTC (rev 13134) +++ XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.7z 2015-07-29 10:39:10 UTC (rev 13135) Property changes on: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.7z ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.ar =================================================================== --- XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.ar (rev 0) +++ XoopsModules/signed/releases/2.1.9/xoops2.5_signed_2.19fm.ar 2015-07-29 10:39:10 UTC (rev 13135) @@ -0,0 +1,26706 @@ +!<arch> +index.html/ 1438165903 1000 1000 100775 33 ` + <script>history.go(-1);</script> +index.html/ 1438165903 1000 1000 100775 33 ` + <script>history.go(-1);</script> +index.html/ 1438165903 1000 1000 100775 33 ` + <script>history.go(-1);</script> + +index.html/ 1438165903 1000 1000 100775 33 ` + <script>history.go(-1);</script> + +GIF.php/ 1438165903 1000 1000 100775 1546 ` +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package Internal/Mappers + **/ + + /** + * Mapper class for GIF files + * + * @package Internal/Mappers + */ + class WideImage_Mapper_GIF + { + function load($uri) + { + return @imagecreatefromgif($uri); + } + + function save($handle, $uri = null) + { + // This is a workaround for a bug, for which PHP devs claim it's not + // really a bug. Well, it IS. + // You can't pass null as the second parameter, because php is + // then trying to save an image to a '' location (which results in an + // error, of course). And the same thing works fine for imagepng() and + // imagejpeg(). It's a bug! ;) + if ($uri) + return imagegif($handle, $uri); + else + return imagegif($handle); + } + } +.htaccess/ 1438165903 1000 1000 100775 84 ` +<IfModule mod_rewrite.c> + + RewriteEngine On + RewriteRule ^$ index.php + +</IfModule> +api-calls.txt/ 1438165904 1000 1000 100775 416 ` +classes|%s/classes +descriptions|%s/descriptions +enumerators|%s/enumerators +fields|%s/fields +fieldtypes|%s/fieldtypes +identifications|%s/identifications +languages|%s/languages +prompts|%s/prompts +providers|%s/providers +sign|%s/sign +signatures|%s/signatures +sites|%s/sites +validations|%s/validations +verification|%s/verification +verify|%s/verify +language|%s/language +states|%s/states +request|%s/request +banned|%s/bannedlayersmenu.js/ 1438165903 1000 1000 100775 4153 ` +// $Id: layersmenu.js 1473 2008-04-20 14:56:53Z phppp $ +// Deprecated, for legacy GUI only +// PHP Layers Menu 1.0.7 (c) 2001, 2002 Marco Pratesi <pr...@te...> +// several "var"s inserted by CPKS to silence errors + +var DOM = (document.getElementById) ? 1 : 0; +var NS4 = (document.layers) ? 1 : 0; +var IE4 = (document.all) ? 1 : 0; +var loaded = 0; // to avoid stupid errors of Microsoft browsers +var Konqueror = (navigator.userAgent.indexOf("Konqueror") > -1) ? 1 : 0; +// We need to explicitly detect Konqueror +// because Konqueror 3 sets IE4 = 1 ... AAAAAAAAAARGHHH!!! +var Opera5 = (navigator.userAgent.indexOf("Opera 5") > -1 || navigator.userAgent.indexOf("Opera/5") > -1 || navigator.userAgent.indexOf("Opera 6") > -1 || navigator.userAgent.indexOf("Opera/6") > -1) ? 1 : 0; + +// it works with NS4, Mozilla, NS6, Opera 5 and 6, IE +var currentY = -1; +function grabMouse(e) { + if ((DOM && !IE4) || Opera5) { + currentY = e.clientY; + } else if (NS4) { + currentY = e.pageY; + } else { + currentY = event.y; + } + if (DOM && !IE4 && !Opera5 && !Konqueror) { + currentY += window.pageYOffset; + } else if (IE4 && DOM && !Opera5 && !Konqueror) { + currentY += document.body.scrollTop; + } +} + +// Replace deprecated captureEvents with addEventListener +// by phppp since signed 2.0.17 +if (document.addEventListener){ + document.addEventListener('mousemove', grabMouse, false); +} else if (document.attachEvent){ + document.attachEvent('onmousemove', grabMouse); +} + +function popUp(menuName,on) { + if (loaded) { // to avoid stupid errors of Microsoft browsers + if (on) { +// moveLayers(); + if (DOM) { + document.getElementById(menuName).style.visibility = "visible"; + document.getElementById(menuName).style.zIndex = 1000; + } else if (NS4) { + document.layers[menuName].visibility = "show"; + document.layers[menuName].zIndex = 1000; + } else { + document.all[menuName].style.visibility = "visible"; + document.all[menuName].style.zIndex = 1000; + } + } else { + if (DOM) { + document.getElementById(menuName).style.visibility = "hidden"; + } else if (NS4) { + document.layers[menuName].visibility = "hide"; + } else { + document.all[menuName].style.visibility = "hidden"; + } + } + } +} + +function setleft(layer,x) { + if (DOM) { + document.getElementById(layer).style.left = x + 'px'; + } else if (NS4) { + document.layers[layer].left = x; + } else { + document.all[layer].style.pixelLeft = x; + } +} + +function settop(layer,y) { + if (DOM) { + document.getElementById(layer).style.top = y + 'px'; + } else if (NS4) { + document.layers[layer].top = y; + } else { + document.all[layer].style.pixelTop = y; + } +} + +function setwidth(layer,w) { + if (DOM) { + document.getElementById(layer).style.width = w; + document.getElementById(layer).style.width = w + 'px'; + } else if (NS4) { +// document.layers[layer].width = w; + } else { + document.all[layer].style.pixelWidth = w; + } +} + +function moveLayerY(menuName, ordinata, e) { + if (loaded) { + // to avoid stupid errors of Microsoft browsers + //alert (ordinata); + // Konqueror: ordinata = -1 according to the initialization currentY = -1 + // Opera: isNaN(ordinata), currentY is NaN, it seems that Opera ignores the initialization currentY = -1 + if (ordinata != -1 && !isNaN(ordinata)) { // The browser has detected the mouse position + if (DOM) { + // attenzione a "px" !!! + if (e && e.clientY) { // just use the pos of the mouseOver event if we have it + document.getElementById(menuName).style.top = e.clientY + 'px'; + } else { + appoggio = parseInt(document.getElementById(menuName).style.top); + if (isNaN(appoggio)) appoggio = 0; + if (Math.abs(appoggio + ordinata_margin - ordinata) > thresholdY) + document.getElementById(menuName).style.top = (ordinata - ordinata_margin) + 'px'; + } + + } else if (NS4) { + if (Math.abs(document.layers[menuName].top + ordinata_margin - ordinata) > thresholdY) + document.layers[menuName].top = ordinata - ordinata_margin; + } else { + if (Math.abs(document.all[menuName].style.pixelTop + ordinata_margin - ordinata) > thresholdY) + document.all[menuName].style.pixelTop = ordinata - ordinata_margin; + } + } + } +} + + + + +index.html/ 1438165904 1000 1000 100775 0 ` +formeditor.php/ 1438165903 1000 1000 100775 1231 ` +<?php +/** + * Chronolabs Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright Chronolabs Cooperative http://labs.coop + * @license General Software Licence (https://web.labs.coop/public/legal/general-software-license/10,3.html) + * @package signed + * @since 2.07 + * @author Simon Roberts <wis...@us...> + * @subpackage forms + * @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + */ + +defined('_PATH_ROOT') or die('Restricted access'); + +/** + * signed Form Editor + * + */ +class signedFormEditor extends xoopsFormEditor +{ + +} + +?> + +.htaccess/ 1438165903 1000 1000 100775 84 ` +<IfModule mod_rewrite.c> + + RewriteEngine On + RewriteRule ^$ index.php + +</IfModule> +Unsharp.php/ 1438165903 1000 1000 100775 4247 ` +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package Internal/Operations + **/ + + /** + * Unsharp filter + * + * This filter was taken from http://vikjavev.no/computing/ump.php, + * the original author Torstein Hønsi. Adapted to fit better within + * the Wideimage package. + * + * @package Internal/Operations + */ + class WideImage_Operation_Unsharp { + /** + * Returns sharpened image + * + * @param WideImage_Image $image + * @param float $amount + * @param int $radius + * @param float $threshold + * @return WideImage_Image + */ + function execute($image, $amount, $radius, $threshold) { + + // Attempt to calibrate the parameters to Photoshop: + if ($amount > 500) $amount = 500; + $amount = $amount * 0.016; + if ($radius > 50) $radius = 50; + $radius = $radius * 2; + if ($threshold > 255) $threshold = 255; + + $radius = abs(round($radius)); // Only integers make sense. + if ($radius == 0) { + return $image; + } + + // Gaussian blur matrix + + $matrix = array( + array(1, 2, 1), + array(2, 4, 2), + array(1, 2, 1) + ); + + $blurred = $image->applyConvolution($matrix, 16, 0); + + if($threshold > 0) { + // Calculate the difference between the blurred pixels and the original + // and set the pixels + for ($x = 0; $x < $image->getWidth(); $x++) { + for ($y = 0; $y < $image->getHeight(); $y++) { + $rgbOrig = $image->getRGBAt($x, $y); + $rOrig = $rgbOrig["red"]; + $gOrig = $rgbOrig["green"]; + $bOrig = $rgbOrig["blue"]; + + $rgbBlur = $blurred->getRGBAt($x, $y); + $rBlur = $rgbBlur["red"]; + $gBlur = $rgbBlur["green"]; + $bBlur = $rgbBlur["blue"]; + + // When the masked pixels differ less from the original + // than the threshold specifies, they are set to their original value. + $rNew = (abs($rOrig - $rBlur) >= $threshold) + ? max(0, min(255, ($amount * ($rOrig - $rBlur)) + $rOrig)) + : $rOrig; + $gNew = (abs($gOrig - $gBlur) >= $threshold) + ? max(0, min(255, ($amount * ($gOrig - $gBlur)) + $gOrig)) + : $gOrig; + $bNew = (abs($bOrig - $bBlur) >= $threshold) + ? max(0, min(255, ($amount * ($bOrig - $bBlur)) + $bOrig)) + : $bOrig; + $rgbNew = array("red" => $rNew, "green" => $gNew, "blue" => $bNew, "alpha" => 0); + + if (($rOrig != $rNew) || ($gOrig != $gNew) || ($bOrig != $bNew)) { + $image->setRGBAt($x, $y, $rgbNew); + } + } + } + } + else { + $w = $image->getWidth(); + $h = $image->getHeight(); + for ($x = 0; $x < $w; $x++) { + for ($y = 0; $y < $h; $y++) { + $rgbOrig = $image->getRGBAt($x, $y); + $rOrig = $rgbOrig["red"]; + $gOrig = $rgbOrig["green"]; + $bOrig = $rgbOrig["blue"]; + + $rgbBlur = $blurred->getRGBAt($x, $y); + $rBlur = $rgbBlur["red"]; + $gBlur = $rgbBlur["green"]; + $bBlur = $rgbBlur["blue"]; + + $rNew = ($amount * ($rOrig - $rBlur)) + $rOrig; + if($rNew>255){$rNew=255;} + elseif($rNew<0){$rNew=0;} + $gNew = ($amount * ($gOrig - $gBlur)) + $gOrig; + if($gNew>255){$gNew=255;} + elseif($gNew<0){$gNew=0;} + $bNew = ($amount * ($bOrig - $bBlur)) + $bOrig; + if($bNew>255){$bNew=255;} + elseif($bNew<0){$bNew=0;} + $rgbNew = array("red" => $rNew, "green" => $gNew, "blue" => $bNew, "alpha" => 0); + + $image->setRGBAt($x, $y, $rgbNew); + } + } + } + + return $image; + } + } + +.htaccess/ 1438165904 1000 1000 100775 31 ` +order deny,allow +deny from all + +global.php/ 1438165903 1000 1000 100775 1653 ` +<?php +/** + * Chronolabs Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright Chronolabs Cooperative http://labs.coop + * @license General Software Licence (https://web.labs.coop/public/legal/general-software-license/10,3.html) + * @package signed + * @since 2.07 + * @author Simon Roberts <wis...@us...> + * @author Leshy Cipherhouse <le...@sl...> + * @subpackage language + * @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + */ + +if (!defined('_SITE_GLOBALS')) { + + define('_SITE_GLOBALS', true); + + define('_SITE_EMAIL', 'wis...@us...'); + define('_SITE_NAME', 'Digital Signatures'); + define('_SITE_COMPANY', 'Chronolabs Cooperative'); + define('_SITE_FROM_EMAIL', 'no...@la...'); + define('_SITE_FROM_NAME', _SITE_NAME . ' ('._SITE_COMPANY.')'); + + define("_SIGNED_NOT_DISCOVERABLE", "None Discoverable API"); + define("_SIGNED_IS_DISCOVERABLE", "Discoverable API"); + + xoops_loadLanguage('global', 'global'); + +} +?> +index.html/ 1438165903 1000 1000 100775 33 ` + <script>history.go(-1);</script> + +send-email.php/ 1438165903 1000 1000 100775 2674 ` +<?php +/** + * Chronolabs Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright Chronolabs Cooperative http://labs.coop + * @license General Software Licence (https://web.labs.coop/public/legal/general-software-license/10,3.html) + * @package signed + * @since 2.07 + * @author Simon Roberts <wis...@us...> + * @author Leshy Cipherhouse <le...@sl...> + * @subpackage templates + * @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + */ +?><?php + $verify = signedArrays::getInstance()->returnKeyed(_SIGNATURE_MODE, 'getValidationsArray'); + signedPackages::getInstance()->sealPackage('entity'); + $code = signedCiphers::getInstance()->getSignatureCode(_SIGNATURE_MODE, $_SESSION["signed"]['package']); + $certificate = signedCiphers::getInstance()->getSignatureCertificate(_SIGNATURE_MODE, $_SESSION["signed"]['package']); + signedPackages::getInstance()->saveEnsigmentPackage($_SESSION["signed"]['package']['serial-number'], $code, $certificate, $_SESSION["signed"]['package'], $verify); + $mode = $_SESSION["signed"]['signature_mode']; + if (!$GLOBALS['configurations']['htaccess']) + $GLOBALS['url'] = _URL_ROOT . '/=generator=/?op=finished&serial='.$_SESSION["signed"]['package']['serial-number']; + else + $GLOBALS['url'] = _URL_ROOT . '/=generator=/finished/'.$_SESSION["signed"]['package']['serial-number'].$GLOBALS['configurations']['htaccess_extension']; + session_destroy(); + session_start(); + $_SESSION["signed"]['signature_mode'] = $mode; + $_SESSION["signed"]['action'] = 'help-entity-finished'; + $_SESSION["signed"]['stepstogo'] = 'passthru'; + $GLOBALS['pause'] = 9; +?> +<p style="font-size: 2.345em; font-weight:bold; text-align: center; margin-bottom: 19px;"><?php echo _CONTENT_DEPLOYED_ENTITY_EMAIL_P1; ?></p> +<p style="font-size: 1.345em; font-weight:bold; text-align: center;"><?php echo $msg = sprintf(_CONTENT_DEPLOYED_ENTITY_EMAIL_P2, constant("_URL_IMAGES"), $GLOBALS['url']); ?></p> +<?php redirect_header($GLOBALS['url'], $GLOBALS['pause'], $msg); ?> +.htaccess/ 1438165903 1000 1000 100775 84 ` +<IfModule mod_rewrite.c> + + RewriteEngine On + RewriteRule ^$ index.php + +</IfModule> +index.html/ 1438165904 1000 1000 100775 0 ` +index.php/ 1438165903 1000 1000 100775 2386 ` +<?php +/** + * Chronolabs Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright Chronolabs Cooperative http://labs.coop + * @license General Software Licence (https://web.labs.coop/public/legal/general-software-license/10,3.html) + * @package signed + * @since 2.07 + * @author Simon Roberts <wis...@us...> + * @author Leshy Cipherhouse <le...@sl...> + * @subpackage api + * @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + */ + + // Enables API Runtime Constant + define('_SIGNED_API_FUNCTION', basename(dirname(__FILE__))); + define('_SIGNED_EVENT_SYSTEM', 'api'); + define('_SIGNED_EVENT_TYPE', basename(dirname(__FILE__))); + require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'common.php'; + require dirname(dirname(__FILE__)) . _DS_ . 'validate.php'; + + // Checks if API Function is Enabled + if (!in_array(basename(dirname(__FILE__)), $GLOBALS['api']->callKeys())) { + header("Location: " . _URL_ROOT); + exit(0); + } + + if (isset($_GET['language'])&&!empty($_GET['language'])) { + if (function_exists('http_response_code')) + http_response_code(200); + echo $GLOBALS['api']->format(array('success'=> true, 'enumerators' => signedProcesses::getInstance()->getEnumeratorsArray(), 'when' => time())); + @$GLOBALS['logger']->logPolling('default', basename(dirname(__FILE__)), array('server' => $_SERVER, 'request' => $_REQUEST)); + exit(0); + + } else { + if (function_exists('http_response_code')) + http_response_code(400); + echo $GLOBALS['api']->format(array('success'=> false, 'error'=> 'The corresponding field(s): '.implode(', ', array('language')) . ' ~ was not specified!', 'error-code' => '135')); + exit(0); + } +?>index.html/ 1438165903 1000 1000 100775 33 ` + <script>history.go(-1);</script> +watermark.gif/ 1438165903 1000 1000 100775 2243 ` +GIF89a<c+yq,JS,\x89:\x90W\x9D\x9C\x97\xA0\x8EV\x94\x95\xA1\xA4\x9F\xA9\xA8\xA2\x8F\xAC\x80\xA7\xAFL\xA7\x9BH\xAA\xB6Z+,t\x91\x8D\x81\x83Y\xBE\xBF\xB3\x87\xAEy\xC9\xCD\xBBY\xBD\xCA\xC1ff\xC7.\xC9f\xC4M\x99cת\xCC \xE0ZONC\xE6E \xEA\xF0\xF1\xEC0\xEF\xF2\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF+# \xE8]\xA4섅U\x88\xE0\xCFFk\xED\xAF\xE0i\xA9\xE7\xB88(\xB2\x8CP8\x8AnV&&]\x8Dċc\x98 +\x90\xEA+\xBChNE\xBD\xFD\x86+A\xA0\\xA4w\xB9+V\x92 \xCF{\xBC\xF13\xD0Dm\xF4\xD1H'\xAD\xB4\x9A+z\xFFՕ@@\xDE\xC6e\x88\xC2=\xA1;e\x8B\x9E\xFE\xD6\xC4?\xB3tC\xFD\xC1\x8E\xCD+i'l +А\xEBr\xCE\xE8 \xD9I\x90\x98\xAE\xC61!\xE3\xA0\xC9U"\xEB\x8F\xD3zeb\xC9J\xA2yB\x9C\x8B9ل\xD5\xCD \x97\x93,ðFqsC\xDFY+\x91u\xB0\x86)dk\xB3a\ՉX`0\xC8|+o#W\x86 \x86\xA3g\xB3\xB3\xDE\x85\x892\x9C\xFA\xE7\x82@\xC2DE\xE4Q8a\xC1\xEF\xFE\xC4IA\x9F\xF9/&\xCAC\xE8\x99\xC8\xF9\x86\x91 4^y +F߰\xBC\xE7\xF9\xE4zu\x97ig\x9Eyn+\xE2\xEC\xF8\x9A^\xC6ϱ\x94m\x8B\xEBΖ\x8F P@\x9C%\xB3N +A\x8BQ\xA3Φ=z\xA1m6m\xA3\xEE\xC4H\xE9\x89O \x85ab\xC5)Z=9n\xAAmT\x95\xCC\xC0R-\x94t\x8FyhY+\xE6\xFE\xE0P\xDD\xD2 \xB6W\xF1FL_\xF8\xCD\x93\xAAHl\x9A\x98%+4B\x935A.\xE6r3^`Y`\x9C\x91\x85\xEA,\x86EO\x9A\xB0JZ=\xCD^\xA0 \x87\x9E7\xB3,YP\xEB2K\x84\xE6y\x94\xA4\xAA\xF4r\x87d(\xBD\xA2\xE5ߌ+\x89pa\xEB\xAD\x90\xE4!\xFF\xEA$\xA7$/Kl\xD3\xE1\x8B\xB5\xF5\xECV8\xE3\x92h]`f\xC6Ʉz}b\xD0|\xBA%\xE8\xAE \x82@\x93}e+d\xAF\xC0\xD1D(c\xD8\xC3g9++\x901-N\xF06\xEC\xC6\xE8E\xA2\xC6S5i`7\xCD\xE9N{\xFAӠ\xB5\xA8GM\xEAR\x9B\xFAԨN\xB5\xAAW\xCD\xEAV\xBB\xFA\xD5Z\x89+index.html/ 1438165904 1000 1000 100775 0 ` +WideImage.php/ 1438165903 1000 1000 100775 11970 ` +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + require_once WideImage::path() . 'Exception.php'; + + require_once WideImage::path() . 'Image.php'; + require_once WideImage::path() . 'TrueColorImage.php'; + require_once WideImage::path() . 'PaletteImage.php'; + + require_once WideImage::path() . 'Coordinate.php'; + require_once WideImage::path() . 'Canvas.php'; + require_once WideImage::path() . 'MapperFactory.php'; + require_once WideImage::path() . 'OperationFactory.php'; + + require_once WideImage::path() . 'Font/TTF.php'; + require_once WideImage::path() . 'Font/GDF.php'; + require_once WideImage::path() . 'Font/PS.php'; + + /** + * @package Exceptions + */ + class WideImage_InvalidImageHandleException extends WideImage_Exception {} + + /** + * @package Exceptions + */ + class WideImage_InvalidImageSourceException extends WideImage_Exception {} + + /** + * @package Exceptions + * + * Class for invalid GD function calls result (for example those that return bool) + */ + class WideImage_GDFunctionResultException extends WideImage_Exception {} + + /** + * The gateway class for loading images and core library functions + * + * @package WideImage + */ + class WideImage + { + const SIDE_TOP_LEFT = 1; + const SIDE_TOP = 2; + const SIDE_TOP_RIGHT = 4; + const SIDE_RIGHT = 8; + const SIDE_BOTTOM_RIGHT = 16; + const SIDE_BOTTOM = 32; + const SIDE_BOTTOM_LEFT = 64; + const SIDE_LEFT = 128; + const SIDE_ALL = 255; + + /** + * @var string Path to the library base directory + */ + protected static $path = null; + + /** + * Returns the library version + * @return string The library version + */ + static function version() + { + return '11.02.19'; + } + + /** + * Returns the path to the library + * @return string + */ + static function path() + { + if (self::$path === null) + self::$path = dirname(__FILE__) . DIRECTORY_SEPARATOR; + return self::$path; + } + + /** + * Checks whether the gd library is loaded, and throws an exception otherwise + */ + static function checkGD() + { + if (!extension_loaded('gd')) + throw new WideImage_Exception("WideImage requires the GD extension, but it's apparently not loaded."); + } + + /** + * Registers a custom mapper for image loading and saving + * + * Example: + * <code> + * WideImage::registerCustomMapper('WideImage_Mapper_TGA', 'image/tga', 'tga'); + * </code> + * + * @param string $mapper_class_name + * @param string $mime_type + * @param string $extension + */ + static function registerCustomMapper($mapper_class_name, $mime_type, $extension) + { + WideImage_MapperFactory::registerMapper($mapper_class_name, $mime_type, strtoupper($extension)); + } + + /** + * Loads an image from a file, URL, HTML input file field, binary string, or a valid image handle. + * The image format is auto-detected. + * + * Currently supported formats: PNG, GIF, JPG, BMP, TGA, GD, GD2. + * + * This function analyzes the input and decides whether to use WideImage::loadFromHandle(), + * WideImage::loadFromFile(), WideImage::loadFromUpload() or WideImage::loadFromString(), + * all of which you can also call directly to spare WideImage some guessing. + * + * Arrays are supported for upload fields; it returns an array of loaded images. + * To load only a single image from an array field, use WideImage::loadFromUpload('img', $i), + * where $i is the index of the image you want to load. + * + * <code> + * $img = WideImage::load('http://url/image.png'); // image URL + * $img = WideImage::load('/path/to/image.png'); // local file path + * $img = WideImage::load('img'); // upload field name + * $img = WideImage::load(imagecreatetruecolor(10, 10)); // a GD resource + * $img = WideImage::load($image_data); // binary string containing image data + * </code> + * + * @param mixed $source File name, url, HTML file input field name, binary string, or a GD image resource + * @return WideImage_Image WideImage_PaletteImage or WideImage_TrueColorImage instance + */ + static function load($source) + { + $predictedSourceType = ''; + + if ($source == '') + $predictedSourceType = 'String'; + + // Creating image via a valid resource + if (!$predictedSourceType && self::isValidImageHandle($source)) + $predictedSourceType = 'Handle'; + + // Check for binary string + if (!$predictedSourceType) + { + // search first $binLength bytes (at a maximum) for ord<32 characters (binary image data) + $binLength = 64; + $sourceLength = strlen($source); + $maxlen = ($sourceLength > $binLength) ? $binLength : $sourceLength; + for ($i = 0; $i < $maxlen; $i++) + if (ord($source[$i]) < 32) + { + $predictedSourceType = 'String'; + break; + } + } + + // Uploaded image (array uploads not supported) + if (isset($_FILES[$source]) && isset($_FILES[$source]['tmp_name'])) + $predictedSourceType = 'Upload'; + + // Otherwise, must be a file or an URL + if (!$predictedSourceType) + $predictedSourceType = 'File'; + + return call_user_func(array('WideImage', 'loadFrom' . $predictedSourceType), $source); + } + + /** + * Create and load an image from a file or URL. The image format is auto-detected. + * + * @param string $uri File or url + * @return WideImage_Image WideImage_PaletteImage or WideImage_TrueColorImage instance + */ + static function loadFromFile($uri) + { + $data = file_get_contents($uri); + $handle = @imagecreatefromstring($data); + if (!self::isValidImageHandle($handle)) + { + try + { + // try to find a mapper first + $mapper = WideImage_MapperFactory::selectMapper($uri); + if ($mapper) + $handle = $mapper->load($uri); + } + catch (WideImage_UnsupportedFormatException $e) + { + // mapper not found + } + + // try all custom mappers + if (!self::isValidImageHandle($handle)) + { + $custom_mappers = WideImage_MapperFactory::getCustomMappers(); + foreach ($custom_mappers as $mime_type => $mapper_class) + { + $mapper = WideImage_MapperFactory::selectMapper(null, $mime_type); + $handle = $mapper->loadFromString($data); + if (self::isValidImageHandle($handle)) + break; + } + } + } + + if (!self::isValidImageHandle($handle)) + throw new WideImage_InvalidImageSourceException("File '{$uri}' appears to be an invalid image source."); + + return self::loadFromHandle($handle); + } + + /** + * Create and load an image from a string. Format is auto-detected. + * + * @param string $string Binary data, i.e. from BLOB field in the database + * @return WideImage_Image WideImage_PaletteImage or WideImage_TrueColorImage instance + */ + static function loadFromString($string) + { + if (strlen($string) < 128) + throw new WideImage_InvalidImageSourceException("String doesn't contain image data."); + + $handle = @imagecreatefromstring($string); + if (!self::isValidImageHandle($handle)) + { + $custom_mappers = WideImage_MapperFactory::getCustomMappers(); + foreach ($custom_mappers as $mime_type => $mapper_class) + { + $mapper = WideImage_MapperFactory::selectMapper(null, $mime_type); + $handle = $mapper->loadFromString($string); + if (self::isValidImageHandle($handle)) + break; + } + } + + if (!self::isValidImageHandle($handle)) + throw new WideImage_InvalidImageSourceException("String doesn't contain valid image data."); + + return self::loadFromHandle($handle); + } + + /** + * Create and load an image from an image handle. + * + * <b>Note:</b> the resulting image object takes ownership of the passed + * handle. When the newly-created image object is destroyed, the handle is + * destroyed too, so it's not a valid image handle anymore. In order to + * preserve the handle for use after object destruction, you have to call + * WideImage_Image::releaseHandle() on the created image instance prior to its + * destruction. + * + * <code> + * $handle = imagecreatefrompng('file.png'); + * $image = WideImage::loadFromHandle($handle); + * </code> + * + * @param resource $handle A valid GD image resource + * @return WideImage_Image WideImage_PaletteImage or WideImage_TrueColorImage instance + */ + static function loadFromHandle($handle) + { + if (!self::isValidImageHandle($handle)) + throw new WideImage_InvalidImageSourceException("Handle is not a valid GD image resource."); + + if (imageistruecolor($handle)) + return new WideImage_TrueColorImage($handle); + else + return new WideImage_PaletteImage($handle); + } + + /** + * This method loads a file from the $_FILES array. The image format is auto-detected. + * + * You only have to pass the field name as the parameter. For array fields, this function will + * return an array of image objects, unless you specify the $index parameter, which will + * load the desired image. + * + * @param $field_name Name of the key in $_FILES array + * @param int $index The index of the file to load (if the input field is an array) + * @return WideImage_Image The loaded image + */ + static function loadFromUpload($field_name, $index = null) + { + if (!array_key_exists($field_name, $_FILES)) + throw new WideImage_InvalidImageSourceException("Upload field '{$field_name}' doesn't exist."); + + if (is_array($_FILES[$field_name]['tmp_name'])) + { + if (isset($_FILES[$field_name]['tmp_name'][$index])) + $filename = $_FILES[$field_name]['tmp_name'][$index]; + else + { + $result = array(); + foreach ($_FILES[$field_name]['tmp_name'] as $idx => $tmp_name) + $result[$idx] = self::loadFromFile($tmp_name); + return $result; + } + } + else + $filename = $_FILES[$field_name]['tmp_name']; + + if (!file_exists($filename)) + throw new WideImage_InvalidImageSourceException("Uploaded file doesn't exist."); + return self::loadFromFile($filename); + } + + /** + * Factory method for creating a palette image + * + * @param int $width + * @param int $height + * @return WideImage_PaletteImage + */ + static function createPaletteImage($width, $height) + { + return WideImage_PaletteImage::create($width, $height); + } + + /** + * Factory method for creating a true-color image + * + * @param int $width + * @param int $height + * @return WideImage_TrueColorImage + */ + static function createTrueColorImage($width, $height) + { + return WideImage_TrueColorImage::create($width, $height); + } + + /** + * Check whether the given handle is a valid GD resource + * + * @param mixed $handle The variable to check + * @return bool + */ + static function isValidImageHandle($handle) + { + return (is_resource($handle) && get_resource_type($handle) == 'gd'); + } + + /** + * Throws exception if the handle isn't a valid GD resource + * + * @param mixed $handle The variable to check + */ + static function assertValidImageHandle($handle) + { + if (!self::isValidImageHandle($handle)) + throw new WideImage_InvalidImageHandleException("{$handle} is not a valid image handle."); + } + } + + WideImage::checkGD(); + + WideImage::registerCustomMapper('WideImage_Mapper_BMP', 'image/bmp', 'bmp'); + WideImage::registerCustomMapper('WideImage_Mapper_TGA', 'image/tga', 'tga'); + GDF.php/ 1438165903 1000 1000 100775 1344 ` +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package WideImage + **/ + + /** + * GDF font support class + * + * @package WideImage + */ + class WideImage_Font_GDF + { + protected $font; + protected $color; + + function __construct($face, $color) + { + if (is_int($face) && $face >= 1 && $face <= 5) + $this->font = $face; + else + $this->font = imageloadfont($face); + $this->color = $color; + } + + function writeText($image, $x, $y, $text) + { + imagestring($image->getHandle(), $this->font, $x, $y, $text, $this->color); + } + } +Merge.php/ 1438165903 1000 1000 100775 2173 ` +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package Internal/Operations + **/ + + /** + * Merge operation class + * + * @package Internal/Operations + */ + class WideImage_Operation_Merge + { + /** + * Returns a merged image + * + * @param WideImage_Image $base + * @param WideImage_Image $overlay + * @param smart_coordinate $left + * @param smart_coordinate $top + * @param numeric $pct + * @return WideImage_Image + */ + function execute($base, $overlay, $left, $top, $pct) + { + $x = WideImage_Coordinate::fix($left, $base->getWidth(), $overlay->getWidth()); + $y = WideImage_Coordinate::fix($top, $base->getHeight(), $overlay->getHeight()); + + $result = $base->asTrueColor(); + $result->alphaBlending(true); + $result->saveAlpha(true); + + if ($pct <= 0) + return $result; + + if ($pct < 100) + { + if (!imagecopymerge( + $result->getHandle(), + $overlay->getHandle(), + $x, $y, 0, 0, + $overlay->getWidth(), + $overlay->getHeight(), + $pct)) + throw new WideImage_GDFunctionResultException("imagecopymerge() returned false"); + } + else + { + if (!imagecopy( + $result->getHandle(), + $overlay->getHandle(), + $x, $y, 0, 0, + $overlay->getWidth(), + $overlay->getHeight())) + throw new WideImage_GDFunctionResultException("imagecopy() returned false"); + } + + return $result; + } + } + + + +.htaccess/ 1438165904 1000 1000 100775 31 ` +order deny,allow +deny from all + +request.php/ 1438165903 1000 1000 100775 4536 ` +<?php +/** + * Chronolabs Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright Chronolabs Cooperative http://labs.coop + * @license General Software Licence (https://web.labs.coop/public/legal/general-software-license/10,3.html) + * @package signed + * @since 2.07 + * @author Simon Roberts <wis...@us...> + * @author Leshy Cipherhouse <le...@sl...> + * @subpackage module + * @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + */ + +/** + * CronJob/Scheduled Task is Run Many Times A Day! + */ +define('_SIGNED_CRON_EXECUTING', microtime(true)); +require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'common.php'; + +if (is_dir(_PATH_PATHWAYS_REQUEST)) { + foreach(signedLists::getFileListAsArray(_PATH_PATHWAYS_REQUEST) as $file) { + $serial = str_replace($GLOBALS['io']->_extensions, "", $file); + $request = $GLOBALS['io']->load($dir, str_replace($GLOBALS['io']->_extensions, "", $file));; + if ($request['reminder']<time()) { + + $verification = XML2Array::createArray(file_get_contents(_PATH_REPO_VALIDATION . _DS_ . $serial . '.xml')); + $verification = $GLOBALS['io']->load(_PATH_REPO_VALIDATION, $serial); + if (signed_doesRequestMakeExpiry($request['request'])==true) { + // Expire Permantly + if ($verification['verification']['expired'] == false) { + $verification = $GLOBALS['io']->load(_PATH_REPO_VALIDATION, $serial); + $verification['verification']['expired'] == true; + $GLOBALS['io']->save($verification, _PATH_REPO_VALIDATION, $serial); + signed_lodgeCallbackSessions($serial, 'expired'); + } + } + + $resource = $GLOBALS['io']->load(_PATH_REPO_SIGNATURES, $serial); + $mailer = signed_getMailer(); + $mailer->setTemplateDir(_PATH_ROOT . _DS_ . 'language' . _DS_ . _SIGNED_CONFIG_LANGUAGE . _DS_ . 'mail_template'); + + switch($resource['resources']['signature']['signature']['type']) { + case 'personal': + $to = array( 'name' => $resource['resources']['signature']['personal']['name'], + 'email' => $resource['resources']['signature']['personal']['email']); + break; + case 'entity': + $to = array( 0 => array( 'name' => $resource['resources']['signature']['personal']['name'], + 'email' => $resource['resources']['signature']['personal']['email']), + 1 => array( 'name' => $resource['resources']['signature']['personal']['name'], + 'email' => $resource['resources']['signature']['entity']['entity-email'])); + break; + } + + $data['SERIAL_NUMBER'] = $serial; + $data['PERSON_FOR'] = $resource['resources']['signature']['signature']['signer']['name']; + $data['PERSON_BY'] = $resource['resources']['signature']['signature']['signee']['name']; + + if ($verification['verification']['expired']==true) { + $data['EXPIRY_STATE'] = 'has been temporarily expired until the update is done'; + } else { + $data['EXPIRY_STATE'] = 'has not been temporarily expired as the changes are only minor'; + } + + $data['EDIT_URL'] = signed_shortenURL(_URL_ROOT . '/=request=/?serial='.$serial.'&signature_mode='.$resource['resources']['signature']['signature']['type']); + $data['REJECT_URL'] = signed_shortenURL(_URL_ROOT . '/=reject=/?serial='.$serial); + + $data['REQUEST_HTML'] = signed_getRequestText($request['request'], 'html'); + $data['REQUEST_TEXT'] = signed_getRequestText($request['request'], 'text'); + + $body = $mailer->getBodyFromTemplate('update-request', $data, true); + + if ($mailer->sendMail($to, array(), array(), 'Data update to require for a signature for '.$resource['resources']['signature']['signature']['signer']['name'], $body['body'], array(), array(), $body['isHTML'])) { + $request['reminder'] = time() + _SIGNED_EMAIL_QUEUED; + $request['sent'] = time(); + $GLOBALS['io']->save($request, _PATH_PATHWAYS_REQUEST, $serial); + } + } + } +} +?>uploader.php/ 1438165903 1000 1000 100775 1185 ` +<?php +/** + * Chronolabs Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright Chronolabs Cooperative http://labs.coop + * @license General Software Licence (https://web.labs.coop/public/legal/general-software-license/10,3.html) + * @package signed + * @since 2.07 + * @author Simon Roberts <wis...@us...> + * @author Leshy Cipherhouse <le...@sl...> + * @subpackage language + * @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + */ + +xoops_loadLanguage('uploader', 'global'); + +index.html/ 1438165904 1000 1000 100775 0 ` +index.html/ 1438165903 1000 1000 100775 33 ` + <script>history.go(-1);</script> + + +form.php/ 1438165903 1000 1000 100775 1186 ` +<?php +/** + * Chronolabs Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright Chronolabs Cooperative http://labs.coop + * @license General Software Licence (https://web.labs.coop/public/legal/general-software-license/10,3.html) + * @package signed + * @since 2.07 + * @author Simon Roberts <wis...@us...> + * @subpackage forms + * @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + */ + +defined('_PATH_ROOT') or die('Restricted access'); + +class signedForm extends xoopsForm +{ + +} + +?> +index.html/ 1438165903 1000 1000 100775 33 ` + <script>history.go(-1);</script> + + +ApplyMask.php/ 1438165903 1000 1000 100775 3225 ` +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package Internal/Operations + **/ + + /** + * ApplyMask operation class + * + * @package Internal/Operations + */ + class WideImage_Operation_ApplyMask + { + /** + * Applies a mask on the copy of source image + * + * @param WideImage_Image $image + * @param WideImage_Image $mask + * @param smart_coordinate $left + * @param smart_coordinate $top + * @return WideImage_Image + */ + function execute($image, $mask, $left = 0, $top = 0) + { + $left = WideImage_Coordinate::fix($left, $image->getWidth(), $mask->getWidth()); + $top = WideImage_Coordinate::fix($top, $image->getHeight(), $mask->getHeight()); + + $width = $image->getWidth(); + $mask_width = $mask->getWidth(); + + $height = $image->getHeight(); + $mask_height = $mask->getHeight(); + + $result = $image->asTrueColor(); + + $result->alphaBlending(false); + $result->saveAlpha(true); + + $srcTransparentColor = $result->getTransparentColor(); + if ($srcTransparentColor >= 0) + { + # this was here. works without. + #$trgb = $image->getColorRGB($srcTransparentColor); + #$trgb['alpha'] = 127; + #$destTransparentColor = $result->allocateColorAlpha($trgb); + #$result->setTransparentColor($destTransparentColor); + $destTransparentColor = $srcTransparentColor; + } + else + { + $destTransparentColor = $result->allocateColorAlpha(255, 255, 255, 127); + } + + for ($x = 0; $x < $width; $x++) + for ($y = 0; $y < $height; $y++) + { + $mx = $x - $left; + $my = $y - $top; + if ($mx >= 0 && $mx < $mask_width && $my >= 0 && $my < $mask_height) + { + $srcColor = $image->getColorAt($x, $y); + if ($srcColor == $srcTransparentColor) + $destColor = $destTransparentColor; + else + { + $maskRGB = $mask->getRGBAt($mx, $my); + if ($maskRGB['red'] == 0) + $destColor = $destTransparentColor; + elseif ($srcColor >= 0) + { + $imageRGB = $image->getRGBAt($x, $y); + $level = ($maskRGB['red'] / 255) * (1 - $imageRGB['alpha'] / 127); + $imageRGB['alpha'] = 127 - round($level * 127); + if ($imageRGB['alpha'] == 127) + $destColor = $destTransparentColor; + else + $destColor = $result->allocateColorAlpha($imageRGB); + } + else + $destColor = $destTransparentColor; + } + $result->setColorAt($x, $y, $destColor); + } + } + return $result; + } + } + +.htaccess/ 1438165903 1000 1000 100775 84 ` +<IfModule mod_rewrite.c> + + RewriteEngine On + RewriteRule ^$ index.php + +</IfModule> +AutoCrop.php/ 1438165903 1000 1000 100775 4631 ` +<?php + /** + * @author Gasper Kozak + * @copyright 2007-2011 + + This file is part of WideImage. + + WideImage is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + WideImage is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with WideImage; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + * @package Internal/Operations + **/ + + /** + * AutoCrop operation + * + * @package Internal/Operations + */ + class WideImage_Operation_AutoCrop + { + /** + * Executes the auto-crop operation on the $img + * + * @param WideImage_Image $img + * @param int $rgb_threshold The difference in RGB from $base_color + * @param int $pixel_cutoff The number of pixels on each border that must be over $rgb_threshold + * @param int $base_color The color that will get cropped + * @return WideImage_Image resulting auto-cropped image + */ + function execute($img, $margin, $rgb_threshold, $pixel_cutoff, $base_color) + { + $margin = intval($margin); + + $rgb_threshold = intval($rgb_threshold); + if ($rgb_threshold < 0) + $rgb_threshold = 0; + + $pixel_cutoff = intval($pixel_cutoff); + if ($pixel_cutoff <= 1) + $pixel_cutoff = 1; + + if ($base_color === null) + $rgb_base = $img->getRGBAt(0, 0); + else + { + if ($base_color < 0) + return $img->copy(); + + $rgb_base = $img->getColorRGB($base_color); + } + + $cut_rect = array('left' => 0, 'top' => 0, 'right' => $img->getWidth() - 1, 'bottom' => $img->getHeight() - 1); + + for ($y = 0; $y <= $cut_rect['bottom']; $y++) + { + $count = 0; + for ($x = 0; $x <= $cut_rect['right']; $x++) + { + $rgb = $img->getRGBAt($x, $y); + $diff = abs($rgb['red'] - $rgb_base['red']) + abs($rgb['green'] - $rgb_base['green']) + abs($rgb['blue'] - $rgb_base['blue']); + if ($diff > $rgb_threshold) + { + $count++; + if ($count >= $pixel_cutoff) + { + $cut_rect['top'] = $y; + break 2; + } + } + } + } + + for ($y = $img->getHeight() - 1; $y >= $cut_rect['top']; $y--) + { + $count = 0; + for ($x = 0; $x <= $cut_rect['right']; $x++) + { + $rgb = $img->getRGBAt($x, $y); + $diff = abs($rgb['red'] - $rgb_base['red']) + abs($rgb['green'] - $rgb_base['green']) + abs($rgb['blue'] - $rgb_base['blue']); + if ($diff > $rgb_threshold) + { + $count++; + if ($count >= $pixel_cutoff) + { + $cut_rect['bottom'] = $y; + break 2; + } + } + } + } + + for ($x = 0; $x <= $cut_rect['right']; $x++) + { + $count = 0; + for ($y = $cut_rect['top']; $y <= $cut_rect['bottom']; $y++) + { + $rgb = $img->getRGBAt($x, $y); + $diff = abs($rgb['red'] - $rgb_base['red']) + abs($rgb['green'] - $rgb_base['green']) + abs($rgb['blue'] - $rgb_base['blue']); + if ($diff > $rgb_threshold) + { + $count++; + if ($count >= $pixel_cutoff) + { + $cut_rect['left'] = $x; + break 2; + } + } + } + } + + for ($x = $cut_rect['right']; $x >= $cut_rect['left']; $x--) + { + $count = 0; + for ($y = $cut_rect['top']; $y <= $cut_rect['bottom']; $y++) + { + $rgb = $img->getRGBAt($x, $y); + $diff = abs($rgb['red'] - $rgb_base['red']) + abs($rgb['green'] - $rgb_base['green']) + abs($rgb['blue'] - $rgb_base['blue']); + if ($diff > $rgb_threshold) + { + $count++; + if ($count >= $pixel_cutoff) + { + $cut_rect['right'] = $x; + break 2; + } + } + } + } + + $cut_rect = array( + 'left' => $cut_rect['left'] - $margin, + 'top' => $cut_rect['top'] - $margin, + 'right' => $cut_rect['right'] + $margin, + 'bottom' => $cut_rect['bottom'] + $margin + ); + + if ($cut_rect['left'] < 0) + $cut_rect['left'] = 0; + + if ($cut_rect['top'] < 0) + $cut_rect['top'] = 0; + + if ($cut_rect['right'] >= $img->getWidth()) + $cut_rect['right'] = $img->getWidth() - 1; + + if ($cut_rect['bottom'] >= $img->getHeight()) + $cut_rect['bottom'] = $img->getHeight() - 1; + + return $img->crop($cut_rect['left'], $cut_rect['top'], $cut_rect['right'] - $cut_rect['left'] + 1, $cut_rect['bottom'] - $cut_rect['top'] + 1); + } + } + + +index.php/ 1438165903 1000 1000 100775 2024 ` +<?php +/** + * Chronolabs Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright Chronolabs Cooperative http://labs.coop + * @license General Software Licence (https://web.labs.coop/public/legal/general-software-license/10,3.html) + * @package signed + * @since 2.07 + * @author Simon Roberts <wis...@us...> + * @author Leshy Cipherhouse <le...@sl...> + * @subpackage api + * @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + * @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure) + */ + + // Enables API Runtime Constant + define('_SIG... [truncated message content] |