From: <wis...@us...> - 2014-12-08 20:52:00
|
Revision: 12891 http://sourceforge.net/p/xoops/svn/12891 Author: wishcraft Date: 2014-12-08 20:51:51 +0000 (Mon, 08 Dec 2014) Log Message: ----------- Fixing Trunk Added Paths: ----------- XoopsModules/signed/trunk/modules/signed/admin/ XoopsModules/signed/trunk/modules/signed/admin/about.php XoopsModules/signed/trunk/modules/signed/admin/admin.php XoopsModules/signed/trunk/modules/signed/admin/admin_footer.php XoopsModules/signed/trunk/modules/signed/admin/admin_header.php XoopsModules/signed/trunk/modules/signed/admin/events.php XoopsModules/signed/trunk/modules/signed/admin/index.html XoopsModules/signed/trunk/modules/signed/admin/menu.php XoopsModules/signed/trunk/modules/signed/admin/signatures.php Added: XoopsModules/signed/trunk/modules/signed/admin/about.php =================================================================== --- XoopsModules/signed/trunk/modules/signed/admin/about.php (rev 0) +++ XoopsModules/signed/trunk/modules/signed/admin/about.php 2014-12-08 20:51:51 UTC (rev 12891) @@ -0,0 +1,34 @@ +<?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 1.13 + * @author Simon Roberts <wis...@us...> + * @author Antony Cipher <ci...@la...> + * @subpackage administration + * @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) + */ + + include_once dirname(__FILE__) . '/../../../include/cp_header.php'; + include '../../../class/xoopsformloader.php'; + include_once dirname(__FILE__) . '/admin_header.php'; + xoops_cp_header(); + + $aboutAdmin = new ModuleAdmin(); + + echo $aboutAdmin->addNavigation('about.php'); + echo $aboutAdmin->renderabout('-------------', false); + + include_once dirname(__FILE__) . '/admin_footer.php'; +?> \ No newline at end of file Property changes on: XoopsModules/signed/trunk/modules/signed/admin/about.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/signed/trunk/modules/signed/admin/admin.php =================================================================== --- XoopsModules/signed/trunk/modules/signed/admin/admin.php (rev 0) +++ XoopsModules/signed/trunk/modules/signed/admin/admin.php 2014-12-08 20:51:51 UTC (rev 12891) @@ -0,0 +1,77 @@ +<?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 1.13 + * @author Simon Roberts <wis...@us...> + * @author Antony Cipher <ci...@la...> + * @subpackage administration + * @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) + */ + + include_once dirname(__FILE__) . '/admin_header.php'; + xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + + echo $indexAdmin->addNavigation('admin.php'); + $signaturesHandler = xoops_getmodulehandler('signatures', 'signed'); + + $indexAdmin->addInfoBox(_SIGNED_AM_DASHBOARD); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_TOTAL. "</infolabel>", $signaturesHandler->getCount(new Criteria('1', '1')), 'Green'); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_PROGRESS. "</infolabel>", $signaturesHandler->getCount(new Criteria('state', 'progress')), 'Purple'); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_ACTIVE. "</infolabel>", $signaturesHandler->getCount(new Criteria('state', 'active')), 'Blue'); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_INACTIVE. "</infolabel>", $signaturesHandler->getCount(new Criteria('state', 'inactive'))."</infotext>", 'Orange'); + $criteria = new CriteriaCompo(new Criteria('state', 'active')); + $criteria->add(new Criteria('expires', time(), '>=')); + $criteria->add(new Criteria('expires', time() + (3600 * 24 * 7), '<=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_EXPIRE_NEXT_WEEK. "</infolabel>", $signaturesHandler->getCount($criteria), 'Red'); + $criteria = new CriteriaCompo(new Criteria('state', 'active')); + $criteria->add(new Criteria('expires', time(), '>=')); + $criteria->add(new Criteria('expires', time() + (3600 * 24 * 14), '<=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_EXPIRE_NEXT_FORTNIGHT. "</infolabel>", $signaturesHandler->getCount($criteria), 'Red'); + $criteria = new CriteriaCompo(new Criteria('1', '1')); + $criteria->add(new Criteria('expires', 0, '>')); + $criteria->add(new Criteria('expires', time(), '<=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_EXPIRED. "</infolabel>", $signaturesHandler->getCount($criteria), 'Red'); + $criteria = new CriteriaCompo(new Criteria('1', '1')); + $criteria->add(new Criteria('issued', time(), '<=')); + $criteria->add(new Criteria('issued', time() - (3600 * 24 * 7), '>=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_ISSUED_LAST_WEEK. "</infolabel>", $signaturesHandler->getCount($criteria), 'Green'); + $criteria = new CriteriaCompo(new Criteria('1', '1')); + $criteria->add(new Criteria('saved', time(), '<=')); + $criteria->add(new Criteria('saved', time() - (3600 * 24 * 7), '>=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_CREATED_LAST_WEEK. "</infolabel>", $signaturesHandler->getCount($criteria), 'Cyan'); + $criteria = new CriteriaCompo(new Criteria('1', '1')); + $criteria->add(new Criteria('used', time(), '<=')); + $criteria->add(new Criteria('used', time() - (3600 * 24 * 7), '>=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_ACCESSED_LAST_WEEK. "</infolabel>", $signaturesHandler->getCount($criteria), 'Black'); + $criteria = new CriteriaCompo(new Criteria('1', '1')); + $criteria->add(new Criteria('issued', time(), '<=')); + $criteria->add(new Criteria('issued', time() - (3600 * 24 * 14), '>=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_ISSUED_LAST_FORTNIGHT. "</infolabel>", $signaturesHandler->getCount($criteria), 'Green'); + $criteria = new CriteriaCompo(new Criteria('1', '1')); + $criteria->add(new Criteria('saved', time(), '<=')); + $criteria->add(new Criteria('saved', time() - (3600 * 24 * 14), '>=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_CREATED_LAST_FORTNIGHT. "</infolabel>", $signaturesHandler->getCount($criteria), 'Cyan'); + $criteria = new CriteriaCompo(new Criteria('1', '1')); + $criteria->add(new Criteria('used', time(), '<=')); + $criteria->add(new Criteria('used', time() - (3600 * 24 * 14), '>=')); + $indexAdmin->addInfoBoxLine(_SIGNED_AM_DASHBOARD, "<infolabel>" ._SIGNED_AM_ACCESSED_LAST_FORTNIGHT. "</infolabel>", $signaturesHandler->getCount($criteria), 'Black'); + + echo $indexAdmin->renderIndex(); + + include_once dirname(__FILE__) . '/admin_footer.php'; + +?> \ No newline at end of file Property changes on: XoopsModules/signed/trunk/modules/signed/admin/admin.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/signed/trunk/modules/signed/admin/admin_footer.php =================================================================== --- XoopsModules/signed/trunk/modules/signed/admin/admin_footer.php (rev 0) +++ XoopsModules/signed/trunk/modules/signed/admin/admin_footer.php 2014-12-08 20:51:51 UTC (rev 12891) @@ -0,0 +1,26 @@ +<?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 1.13 + * @author Simon Roberts <wis...@us...> + * @author Antony Cipher <ci...@la...> + * @subpackage administration + * @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) + */ + + echo "<div class='adminfooter'>\n" . _SIGNED_AM_ADMIN_FOOTER . "\n" ."</div>"; + + xoops_cp_footer(); +?> \ No newline at end of file Property changes on: XoopsModules/signed/trunk/modules/signed/admin/admin_footer.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/signed/trunk/modules/signed/admin/admin_header.php =================================================================== --- XoopsModules/signed/trunk/modules/signed/admin/admin_header.php (rev 0) +++ XoopsModules/signed/trunk/modules/signed/admin/admin_header.php 2014-12-08 20:51:51 UTC (rev 12891) @@ -0,0 +1,65 @@ +<?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 1.13 + * @author Simon Roberts <wis...@us...> + * @author Antony Cipher <ci...@la...> + * @subpackage administration + * @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) + */ + + + $path = dirname(dirname(dirname(dirname(__FILE__)))); + include_once $path . '/mainfile.php'; + include_once $path . '/include/cp_functions.php'; + require_once $path . '/include/cp_header.php'; + + global $xoopsModule; + $thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); + + // Load language files + xoops_loadLanguage('admin', $thisModuleDir); + xoops_loadLanguage('modinfo', $thisModuleDir); + xoops_loadLanguage('main', $thisModuleDir); + + xoops_load('pagenav'); + + $pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); + $pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); + $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + + if ($xoopsUser) { + $moduleperm_handler =& xoops_gethandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar('mid'), $xoopsUser->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } + } else { + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); + } + + if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $xoopsTpl = new XoopsTpl(); + } + + if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) { + include_once XOOPS_ROOT_PATH . '/class/template.php'; + $GLOBALS['xoopsTpl'] = new XoopsTpl(); + } +?> \ No newline at end of file Property changes on: XoopsModules/signed/trunk/modules/signed/admin/admin_header.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/signed/trunk/modules/signed/admin/events.php =================================================================== --- XoopsModules/signed/trunk/modules/signed/admin/events.php (rev 0) +++ XoopsModules/signed/trunk/modules/signed/admin/events.php 2014-12-08 20:51:51 UTC (rev 12891) @@ -0,0 +1,39 @@ +<?php +/** + * Private message + * + * 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 The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package pm + * @since 2.3.0 + * @author Jan Pedersen + * @author Taiwen Jiang <ph...@us...> + * @version $Id: prune.php 12593 2014-06-14 16:04:02Z beckmi $ + */ + + include_once dirname(__FILE__) . '/admin_header.php'; + xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('events.php'); + + $start = intval(isset($_REQUEST['start']) ? $_REQUEST['start'] : "0"); + $limit = intval(isset($_REQUEST['limit']) ? $_REQUEST['limit'] : "42"); + + $eventsHandler = xoops_getmodulehandler('events', 'signed'); + $pageNav = new XoopsPageNav($eventsHandler->getCount(new Criteria("1","1")), $limit, $start, 'start', 'limit='.$limit); + + $GLOBALS['xoopsTpl']->assign('pagenav', $pageNav->renderNav(5)); + $GLOBALS['xoopsTpl']->append('signatures', $eventsHandler->getAdminTabled($start, $limit)); + $GLOBALS['xoopsTpl']->display($GLOBALS['xoops']->path('/modules/signed/templates/admin/signed_events.html')); + + include_once dirname(__FILE__) . '/admin_footer.php'; + +?> \ No newline at end of file Property changes on: XoopsModules/signed/trunk/modules/signed/admin/events.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/signed/trunk/modules/signed/admin/index.html =================================================================== --- XoopsModules/signed/trunk/modules/signed/admin/index.html (rev 0) +++ XoopsModules/signed/trunk/modules/signed/admin/index.html 2014-12-08 20:51:51 UTC (rev 12891) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsModules/signed/trunk/modules/signed/admin/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/signed/trunk/modules/signed/admin/menu.php =================================================================== --- XoopsModules/signed/trunk/modules/signed/admin/menu.php (rev 0) +++ XoopsModules/signed/trunk/modules/signed/admin/menu.php 2014-12-08 20:51:51 UTC (rev 12891) @@ -0,0 +1,58 @@ +<?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 1.13 + * @author Simon Roberts <wis...@us...> + * @author Antony Cipher <ci...@la...> + * @subpackage administration + * @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) + */ + + $path = dirname(dirname(dirname(dirname(__FILE__)))); + include_once $path . '/mainfile.php'; + + $dirname = basename(dirname(dirname(__FILE__))); + $module_handler = xoops_gethandler('module'); + $module = $module_handler->getByDirname($dirname); + $pathIcon32 = $module->getInfo('icons32'); + $pathModuleAdmin = $module->getInfo('dirmoduleadmin'); + $pathLanguage = $path . $pathModuleAdmin; + + if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { + $fileinc = $pathLanguage . '/language/english/main.php'; + } + + include_once $fileinc; + + $adminmenu = array(); + + $i = 1; + $adminmenu[$i]['title'] = _SIGNED_MI_INDEX; + $adminmenu[$i]['link'] = "admin/admin.php"; + $adminmenu[$i]['icon'] = $pathIcon32.'/security.png' ; + ++$i; + $adminmenu[$i]['title'] = _SIGNED_MI_SIGNATURES; + $adminmenu[$i]['link'] = "admin/signatures.php"; + $adminmenu[$i]['icon'] = $pathIcon32.'/identity.png' ; + ++$i; + $adminmenu[$i]['title'] = _SIGNED_MI_EVENTS; + $adminmenu[$i]['link'] = "admin/events.php"; + $adminmenu[$i]['icon'] = $pathIcon32.'/event.png' ; + ++$i; + $adminmenu[$i]['title'] = _SIGNED_MI_ABOUT; + $adminmenu[$i]['link'] = 'admin/about.php'; + $adminmenu[$i]['icon'] = $pathIcon32.'/about.png'; + +?> \ No newline at end of file Property changes on: XoopsModules/signed/trunk/modules/signed/admin/menu.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/signed/trunk/modules/signed/admin/signatures.php =================================================================== --- XoopsModules/signed/trunk/modules/signed/admin/signatures.php (rev 0) +++ XoopsModules/signed/trunk/modules/signed/admin/signatures.php 2014-12-08 20:51:51 UTC (rev 12891) @@ -0,0 +1,41 @@ +<?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 1.13 + * @author Simon Roberts <wis...@us...> + * @author Antony Cipher <ci...@la...> + * @subpackage administration + * @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) + */ + + include_once dirname(__FILE__) . '/admin_header.php'; + xoops_cp_header(); + + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('signatures.php'); + + $start = intval(isset($_REQUEST['start']) ? $_REQUEST['start'] : "0"); + $limit = intval(isset($_REQUEST['limit']) ? $_REQUEST['limit'] : "42"); + + $signatureHandler = xoops_getmodulehandler('signatures', 'signed'); + $pageNav = new XoopsPageNav($signatureHandler->getCount(new Criteria("1","1")), $limit, $start, 'start', 'limit='.$limit); + + $GLOBALS['xoopsTpl']->assign('pagenav', $pageNav->renderNav(5)); + $GLOBALS['xoopsTpl']->append('signatures', $signatureHandler->getAdminTabled($start, $limit)); + $GLOBALS['xoopsTpl']->display($GLOBALS['xoops']->path('/modules/signed/templates/admin/signed_signatures.html')); + + include_once dirname(__FILE__) . '/admin_footer.php'; + +?> \ No newline at end of file Property changes on: XoopsModules/signed/trunk/modules/signed/admin/signatures.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property |