From: <be...@us...> - 2012-08-01 03:11:39
|
Revision: 9972 http://xoops.svn.sourceforge.net/xoops/?rev=9972&view=rev Author: beckmi Date: 2012-08-01 03:11:30 +0000 (Wed, 01 Aug 2012) Log Message: ----------- Version 0.81 Beta 1 (conversion to XOOPS 2.5.5 GUI) Modified Paths: -------------- XoopsModules/xhelp/trunk/xhelp/admin/about.php XoopsModules/xhelp/trunk/xhelp/admin/admin.php XoopsModules/xhelp/trunk/xhelp/admin/admin_header.php XoopsModules/xhelp/trunk/xhelp/admin/delete.php XoopsModules/xhelp/trunk/xhelp/admin/department.php XoopsModules/xhelp/trunk/xhelp/admin/faqAdapter.php XoopsModules/xhelp/trunk/xhelp/admin/fields.php XoopsModules/xhelp/trunk/xhelp/admin/file.php XoopsModules/xhelp/trunk/xhelp/admin/index.php XoopsModules/xhelp/trunk/xhelp/admin/menu.php XoopsModules/xhelp/trunk/xhelp/admin/mimetypes.php XoopsModules/xhelp/trunk/xhelp/admin/myblocksadmin.php XoopsModules/xhelp/trunk/xhelp/admin/notifications.php XoopsModules/xhelp/trunk/xhelp/admin/staff.php XoopsModules/xhelp/trunk/xhelp/admin/status.php XoopsModules/xhelp/trunk/xhelp/admin/upgrade.php XoopsModules/xhelp/trunk/xhelp/blocks/xhelp_blocks.php XoopsModules/xhelp/trunk/xhelp/class/msgParser.php XoopsModules/xhelp/trunk/xhelp/class/validator.php XoopsModules/xhelp/trunk/xhelp/docs/CHANGELOG.txt XoopsModules/xhelp/trunk/xhelp/functions.php XoopsModules/xhelp/trunk/xhelp/include/blocksadmin.inc.php XoopsModules/xhelp/trunk/xhelp/include/functions_admin.php XoopsModules/xhelp/trunk/xhelp/language/english/modinfo.php XoopsModules/xhelp/trunk/xhelp/xoops_version.php Added Paths: ----------- XoopsModules/xhelp/trunk/xhelp/admin/about2.php XoopsModules/xhelp/trunk/xhelp/admin/admin_footer.php XoopsModules/xhelp/trunk/xhelp/admin/admin_header2.php XoopsModules/xhelp/trunk/xhelp/admin/main.php XoopsModules/xhelp/trunk/xhelp/docs/credits.txt XoopsModules/xhelp/trunk/xhelp/docs/install.txt XoopsModules/xhelp/trunk/xhelp/docs/lang_diff.txt XoopsModules/xhelp/trunk/xhelp/docs/licence.txt XoopsModules/xhelp/trunk/xhelp/language/english/help/ XoopsModules/xhelp/trunk/xhelp/language/english/help/help.html XoopsModules/xhelp/trunk/xhelp/language/english/help/index.html XoopsModules/xhelp/trunk/xhelp/language/french/help/ XoopsModules/xhelp/trunk/xhelp/language/french/help/help.html XoopsModules/xhelp/trunk/xhelp/language/french/help/index.html XoopsModules/xhelp/trunk/xhelp/language/german/help/ XoopsModules/xhelp/trunk/xhelp/language/german/help/help.html XoopsModules/xhelp/trunk/xhelp/language/german/help/index.html XoopsModules/xhelp/trunk/xhelp/language/italian/help/ XoopsModules/xhelp/trunk/xhelp/language/italian/help/help.html XoopsModules/xhelp/trunk/xhelp/language/italian/help/index.html XoopsModules/xhelp/trunk/xhelp/language/japanese/help/ XoopsModules/xhelp/trunk/xhelp/language/japanese/help/help.html XoopsModules/xhelp/trunk/xhelp/language/japanese/help/index.html XoopsModules/xhelp/trunk/xhelp/language/nederlands/help/ XoopsModules/xhelp/trunk/xhelp/language/nederlands/help/help.html XoopsModules/xhelp/trunk/xhelp/language/nederlands/help/index.html XoopsModules/xhelp/trunk/xhelp/language/persian/help/ XoopsModules/xhelp/trunk/xhelp/language/persian/help/help.html XoopsModules/xhelp/trunk/xhelp/language/persian/help/index.html XoopsModules/xhelp/trunk/xhelp/language/portugues.de.portugal/help/ XoopsModules/xhelp/trunk/xhelp/language/portugues.de.portugal/help/help.html XoopsModules/xhelp/trunk/xhelp/language/portugues.de.portugal/help/index.html XoopsModules/xhelp/trunk/xhelp/language/portugues.do.brasil/help/ XoopsModules/xhelp/trunk/xhelp/language/portugues.do.brasil/help/help.html XoopsModules/xhelp/trunk/xhelp/language/portugues.do.brasil/help/index.html XoopsModules/xhelp/trunk/xhelp/language/spanish/help/ XoopsModules/xhelp/trunk/xhelp/language/spanish/help/help.html XoopsModules/xhelp/trunk/xhelp/language/spanish/help/index.html XoopsModules/xhelp/trunk/xhelp/language/tchinese/help/ XoopsModules/xhelp/trunk/xhelp/language/tchinese/help/help.html XoopsModules/xhelp/trunk/xhelp/language/tchinese/help/index.html Removed Paths: ------------- XoopsModules/xhelp/trunk/xhelp/reports/WS_FTP.LOG XoopsModules/xhelp/trunk/xhelp/templates/.cvsignore Modified: XoopsModules/xhelp/trunk/xhelp/admin/about.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/about.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/about.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -1,170 +1,30 @@ -<?php -global $xoopsModule; -$xhelp_imagePath = XOOPS_URL.'/modules/xhelp/images'; - -$module_handler = &xoops_gethandler('module'); -$xhelp_info = &$module_handler->get($xoopsModule->getVar('mid')); - -echo "<table border='0'>"; -echo "<tr>"; -echo "<td><img src='".$xhelp_imagePath."/xhelp_slogo.png'></td>"; -echo "<td><div style='margin-top: 0px; color: #2F5376; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $xhelp_info->getInfo('name') . " version " . $xhelp_info->getInfo('version') . " (" . $xhelp_info->getInfo('version_info') . ")</div>"; -echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>"._AM_XHELP_TEXT_BY." ".$xhelp_info->getInfo('creator')."</div>"; -echo "<div>".$xhelp_info->getInfo('license')."</div>"; -echo "</td></tr>"; -echo "</table><br />"; - -echo "<table width='100%' border='0' cellspacing='1' class='outer'>"; -echo "<tr><th colspan='2'>"._AM_XHELP_TEXT_CONTRIB_INFO."</th></tr>"; -echo "<tr><td class='head' width='20%' valign='top'>"._AM_XHELP_TEXT_DEVELOPERS."</td>"; -echo "<td class='even' valign='top'>"; -$contributors = $xhelp_info->getInfo('contributors'); -$devs = $contributors['developers']; -echo "<table border='0'>"; //Create nested table for developers -foreach($devs as $dev){ - echo "<tr><td><a href='mailto: ".$dev['email']."'>".$dev['uname']."</a> (".$dev['name'].")</td> - </tr>"; -} -echo "</table>"; -echo "</tr>"; //end of nested developers table - -if(isset($contributors['translators']) && (count($contributors['translators']) > 0)){ - $translators = $contributors['translators']; - echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_TRANSLATORS."</td>"; - echo "<td class='even' valign='top'>"; - echo "<table border='0'>"; //Create nested table for translators - foreach($translators as $tran){ - if($tran['website'] != ''){ - $tran_contact = "<a href='".$tran['website']."'>".$tran['uname']."</a>"; - } else { - if($tran['email'] != ''){ - $tran_contact = "<a href='mailto: ".$tran['email']."'>".$tran['uname']."</a>"; - } else { - $tran_contact = $tran['uname']; - } - } - echo "<tr><td>".$tran_contact." (".$tran['language'].")</td> - </tr>"; - } - echo "</table>"; - echo "</tr>"; //end of nested translators table -} - -if(isset($contributors['testers']) && (count($contributors['testers']) > 0)){ - $testers = $contributors['testers']; - echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_TESTERS."</td>"; - echo "<td class='even' valign='top'>"; - echo "<table border='0'>"; //Create nested table for testers - foreach($testers as $tester){ - if($tester['website'] != ''){ - $tester_contact = "<a href='".$tester['website']."'>".$tester['uname']."</a>"; - } else { - if($tester['email'] != ''){ - $tester_contact = "<a href='mailto: ".$tester['email']."'>".$tester['uname']."</a>"; - } else { - $tester_contact = $tester['uname']; - } - } - echo "<tr><td>".$tester_contact." (".$tester['name'].")</td> - </tr>"; - } - echo "</table>"; - echo "</tr>"; //end of nested testers table -} - -if(isset($contributors['documenters']) && (count($contributors['documenters']) > 0)){ - $documenters = $contributors['documenters']; - echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_DOCUMENTER."</td>"; - echo "<td class='even' valign='top'>"; - echo "<table border='0'>"; //Create nested table for documenters - foreach($documenters as $doc){ - if($doc['website'] != ''){ - $doc_contact = "<a href='".$doc['website']."'>".$doc['uname']."</a>"; - } else { - if($doc['email'] != ''){ - $doc_contact = "<a href='mailto: ".$doc['email']."'>".$doc['uname']."</a>"; - } else { - $doc_contact = $doc['uname']; - } - } - echo "<tr><td>".$doc_contact." (".$doc['name'].")</td> - </tr>"; - } - echo "</table>"; - echo "</tr>"; //end of nested documenters table -} - -if(isset($contributors['code']) && (count($contributors['code']) > 0)){ - $coders = $contributors['code']; - echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_CODE."</td>"; - echo "<td class='even' valign='top'>"; - echo "<table border='0'>"; //Create nested table for code contributors - foreach($coders as $coder){ - if($coder['website'] != ''){ - $coder_contact = "<a href='".$coder['website']."'>".$coder['uname']."</a>"; - } else { - if($coder['email'] != ''){ - $coder_contact = "<a href='mailto: ".$coder['email']."'>".$coder['uname']."</a>"; - } else { - $coder_contact = $coder['uname']; - } - } - echo "<tr><td>".$coder_contact." (".$coder['name'].")</td> - </tr>"; - } - echo "</table>"; - echo "</tr>"; //end of nested documenters table -} - -echo "</table><br />"; - -echo "<table width='100%' border='0' cellspacing='1' class='outer'>"; -echo "<tr><th colspan='2'>"._AM_XHELP_TEXT_MODULE_DEVELOPMENT."</th></tr>"; -echo "<tr><td class='head' width='20%' valign='top'>"._AM_XHELP_TEXT_RELEASE_DATE."</td> - <td class='even' valign='top'>".$xhelp_info->getInfo('release_date')."</td> - </tr>"; -echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_STATUS."</td> - <td class='even' valign='top'>".$xhelp_info->getInfo('version_info')."</td> - </tr>"; -echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_DEMO_SITE."</td> - <td class='even' valign='top'><a target='_blank' href='".$xhelp_info->getInfo('demo_site')."'>"._AM_XHELP_DEMO_SITE."</a></td> - </tr>"; -echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_OFFICIAL_SITE."</td> - <td class='even' valign='top'><a target='_blank' href='".$xhelp_info->getInfo('official_site')."'>"._AM_XHELP_OFFICIAL_SITE."</a></td> - </tr>"; -echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_REPORT_BUG."</td> - <td class='even' valign='top'><a target='_blank' href='".$xhelp_info->getInfo('bug_url')."'>"._AM_XHELP_REPORT_BUG."</a></td> - </tr>"; -echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_NEW_FEATURE."</td> - <td class='even' valign='top'><a target='_blank' href='".$xhelp_info->getInfo('feature_url')."'>"._AM_XHELP_NEW_FEATURE."</a></td> - </tr>"; -echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_QUESTIONS."</td> - <td class='even' valign='top'><a href='mailto: ".$xhelp_info->getInfo('questions_email')."'>"._AM_XHELP_QUESTIONS."</a></td> - </tr>"; -echo "</table><br />"; - -echo "<table width='100%' border='0' cellspacing='1' class='outer'>"; -echo "<tr><th>"._AM_XHELP_TEXT_DISCLAIMER."</th></tr>"; -echo "<tr><td class='even'>"._AM_XHELP_DISCLAIMER."</td></tr>"; -echo "</table><br />"; - -// For CHANGELOG -if (is_dir(XOOPS_ROOT_PATH.'/modules/xhelp/docs')) { - $dir = XOOPS_ROOT_PATH.'/modules/xhelp/docs/'; -} else { - $dir = XOOPS_ROOT_PATH.'/modules/xhelp/'; -} -$filename = "CHANGELOG.txt"; -if(is_file($dir.$filename)){ - $filesize = filesize($dir.$filename); - $handle = fopen($dir.$filename, 'r'); - - echo "<table width='100%' border='0' cellspacing='1' class='outer'>"; - echo "<tr><th>"._AM_XHELP_TEXT_CHANGELOG."</th></tr>"; - echo "<tr><td class='even'><pre>".fread($handle, $filesize)."</pre></td></tr>"; - echo "</table><br />"; - fclose($handle); -} -xhelpAdminFooter(); -xoops_cp_footer(); -?> \ No newline at end of file +<?php +/* + * 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 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package + * @since + * @author XOOPS Development Team + * @version $Id $ + */ + +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); + +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/xhelp/trunk/xhelp/admin/about2.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/about2.php (rev 0) +++ XoopsModules/xhelp/trunk/xhelp/admin/about2.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -0,0 +1,168 @@ +<?php +global $xoopsModule; +$xhelp_imagePath = XOOPS_URL.'/modules/xhelp/images'; + +$module_handler = &xoops_gethandler('module'); +$xhelp_info = &$module_handler->get($xoopsModule->getVar('mid')); + +echo "<table border='0'>"; +echo "<tr>"; +echo "<td><img src='".$xhelp_imagePath."/xhelp_slogo.png'></td>"; +echo "<td><div style='margin-top: 0px; color: #2F5376; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $xhelp_info->getInfo('name') . " version " . $xhelp_info->getInfo('version') . " (" . $xhelp_info->getInfo('version_info') . ")</div>"; +echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>"._AM_XHELP_TEXT_BY." ".$xhelp_info->getInfo('creator')."</div>"; +echo "<div>".$xhelp_info->getInfo('license')."</div>"; +echo "</td></tr>"; +echo "</table><br />"; + +echo "<table width='100%' border='0' cellspacing='1' class='outer'>"; +echo "<tr><th colspan='2'>"._AM_XHELP_TEXT_CONTRIB_INFO."</th></tr>"; +echo "<tr><td class='head' width='20%' valign='top'>"._AM_XHELP_TEXT_DEVELOPERS."</td>"; +echo "<td class='even' valign='top'>"; +$contributors = $xhelp_info->getInfo('contributors'); +$devs = $contributors['developers']; +echo "<table border='0'>"; //Create nested table for developers +foreach($devs as $dev){ + echo "<tr><td><a href='mailto: ".$dev['email']."'>".$dev['uname']."</a> (".$dev['name'].")</td> + </tr>"; +} +echo "</table>"; +echo "</tr>"; //end of nested developers table + +if(isset($contributors['translators']) && (count($contributors['translators']) > 0)){ + $translators = $contributors['translators']; + echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_TRANSLATORS."</td>"; + echo "<td class='even' valign='top'>"; + echo "<table border='0'>"; //Create nested table for translators + foreach($translators as $tran){ + if($tran['website'] != ''){ + $tran_contact = "<a href='".$tran['website']."'>".$tran['uname']."</a>"; + } else { + if($tran['email'] != ''){ + $tran_contact = "<a href='mailto: ".$tran['email']."'>".$tran['uname']."</a>"; + } else { + $tran_contact = $tran['uname']; + } + } + echo "<tr><td>".$tran_contact." (".$tran['language'].")</td> + </tr>"; + } + echo "</table>"; + echo "</tr>"; //end of nested translators table +} + +if(isset($contributors['testers']) && (count($contributors['testers']) > 0)){ + $testers = $contributors['testers']; + echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_TESTERS."</td>"; + echo "<td class='even' valign='top'>"; + echo "<table border='0'>"; //Create nested table for testers + foreach($testers as $tester){ + if($tester['website'] != ''){ + $tester_contact = "<a href='".$tester['website']."'>".$tester['uname']."</a>"; + } else { + if($tester['email'] != ''){ + $tester_contact = "<a href='mailto: ".$tester['email']."'>".$tester['uname']."</a>"; + } else { + $tester_contact = $tester['uname']; + } + } + echo "<tr><td>".$tester_contact." (".$tester['name'].")</td> + </tr>"; + } + echo "</table>"; + echo "</tr>"; //end of nested testers table +} + +if(isset($contributors['documenters']) && (count($contributors['documenters']) > 0)){ + $documenters = $contributors['documenters']; + echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_DOCUMENTER."</td>"; + echo "<td class='even' valign='top'>"; + echo "<table border='0'>"; //Create nested table for documenters + foreach($documenters as $doc){ + if($doc['website'] != ''){ + $doc_contact = "<a href='".$doc['website']."'>".$doc['uname']."</a>"; + } else { + if($doc['email'] != ''){ + $doc_contact = "<a href='mailto: ".$doc['email']."'>".$doc['uname']."</a>"; + } else { + $doc_contact = $doc['uname']; + } + } + echo "<tr><td>".$doc_contact." (".$doc['name'].")</td> + </tr>"; + } + echo "</table>"; + echo "</tr>"; //end of nested documenters table +} + +if(isset($contributors['code']) && (count($contributors['code']) > 0)){ + $coders = $contributors['code']; + echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_CODE."</td>"; + echo "<td class='even' valign='top'>"; + echo "<table border='0'>"; //Create nested table for code contributors + foreach($coders as $coder){ + if($coder['website'] != ''){ + $coder_contact = "<a href='".$coder['website']."'>".$coder['uname']."</a>"; + } else { + if($coder['email'] != ''){ + $coder_contact = "<a href='mailto: ".$coder['email']."'>".$coder['uname']."</a>"; + } else { + $coder_contact = $coder['uname']; + } + } + echo "<tr><td>".$coder_contact." (".$coder['name'].")</td> + </tr>"; + } + echo "</table>"; + echo "</tr>"; //end of nested documenters table +} + +echo "</table><br />"; + +echo "<table width='100%' border='0' cellspacing='1' class='outer'>"; +echo "<tr><th colspan='2'>"._AM_XHELP_TEXT_MODULE_DEVELOPMENT."</th></tr>"; +echo "<tr><td class='head' width='20%' valign='top'>"._AM_XHELP_TEXT_RELEASE_DATE."</td> + <td class='even' valign='top'>".$xhelp_info->getInfo('release_date')."</td> + </tr>"; +echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_STATUS."</td> + <td class='even' valign='top'>".$xhelp_info->getInfo('version_info')."</td> + </tr>"; +echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_DEMO_SITE."</td> + <td class='even' valign='top'><a target='_blank' href='".$xhelp_info->getInfo('demo_site')."'>"._AM_XHELP_DEMO_SITE."</a></td> + </tr>"; +echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_OFFICIAL_SITE."</td> + <td class='even' valign='top'><a target='_blank' href='".$xhelp_info->getInfo('official_site')."'>"._AM_XHELP_OFFICIAL_SITE."</a></td> + </tr>"; +echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_REPORT_BUG."</td> + <td class='even' valign='top'><a target='_blank' href='".$xhelp_info->getInfo('bug_url')."'>"._AM_XHELP_REPORT_BUG."</a></td> + </tr>"; +echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_NEW_FEATURE."</td> + <td class='even' valign='top'><a target='_blank' href='".$xhelp_info->getInfo('feature_url')."'>"._AM_XHELP_NEW_FEATURE."</a></td> + </tr>"; +echo "<tr><td class='head' valign='top'>"._AM_XHELP_TEXT_QUESTIONS."</td> + <td class='even' valign='top'><a href='mailto: ".$xhelp_info->getInfo('questions_email')."'>"._AM_XHELP_QUESTIONS."</a></td> + </tr>"; +echo "</table><br />"; + +echo "<table width='100%' border='0' cellspacing='1' class='outer'>"; +echo "<tr><th>"._AM_XHELP_TEXT_DISCLAIMER."</th></tr>"; +echo "<tr><td class='even'>"._AM_XHELP_DISCLAIMER."</td></tr>"; +echo "</table><br />"; + +// For CHANGELOG +if (is_dir(XOOPS_ROOT_PATH.'/modules/xhelp/docs')) { + $dir = XOOPS_ROOT_PATH.'/modules/xhelp/docs/'; +} else { + $dir = XOOPS_ROOT_PATH.'/modules/xhelp/'; +} +$filename = "CHANGELOG.txt"; +if(is_file($dir.$filename)){ + $filesize = filesize($dir.$filename); + $handle = fopen($dir.$filename, 'r'); + + echo "<table width='100%' border='0' cellspacing='1' class='outer'>"; + echo "<tr><th>"._AM_XHELP_TEXT_CHANGELOG."</th></tr>"; + echo "<tr><td class='even'><pre>".fread($handle, $filesize)."</pre></td></tr>"; + echo "</table><br />"; + fclose($handle); +} +include_once "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/xhelp/trunk/xhelp/admin/admin.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/admin.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/admin.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -40,7 +40,7 @@ if (empty($fct)) $fct = 'preferences' ; include "../../../mainfile.php"; include XOOPS_ROOT_PATH."/include/cp_functions.php"; -include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php"; +include_once XOOPS_ROOT_PATH."/kernel/module.php"; $admintest = 0; Added: XoopsModules/xhelp/trunk/xhelp/admin/admin_footer.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/admin_footer.php (rev 0) +++ XoopsModules/xhelp/trunk/xhelp/admin/admin_footer.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -0,0 +1,29 @@ +<?php +/* + * 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 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package + * @since + * @author XOOPS Development Team + * @version $Id $ + */ + +global $pathIcon32; +echo "<div class='adminfooter'>\n" + ." <div style='text-align: center;'>\n" + ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + ." </div>\n" + ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" + ."</div>"; + +xoops_cp_footer(); \ No newline at end of file Modified: XoopsModules/xhelp/trunk/xhelp/admin/admin_header.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/admin_header.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/admin_header.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -1,77 +1,115 @@ -<?php -if (!defined('XHELP_CONSTANTS_INCLUDED')) { - include_once(XOOPS_ROOT_PATH.'/modules/xhelp/include/constants.php'); -} - -require(XHELP_BASE_PATH.'/admin/admin_buttons.php'); -require_once(XHELP_BASE_PATH.'/functions.php'); -require_once(XHELP_INCLUDE_PATH.'/functions_admin.php'); -require_once(XHELP_INCLUDE_PATH.'/events.php'); -require_once(XHELP_CLASS_PATH.'/session.php'); - -include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; - -xhelpIncludeLang('main'); -xhelpIncludeLang('modinfo'); - - -global $xoopsModule; -$module_id = $xoopsModule->getVar('mid'); -$oAdminButton = new AdminButtons(); -$oAdminButton->AddTitle(sprintf(_AM_XHELP_ADMIN_TITLE, $xoopsModule->getVar('name'))); -$oAdminButton->AddButton(_AM_XHELP_INDEX, XHELP_ADMIN_URL."/index.php", 'index'); -$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_DEPARTMENTS, XHELP_ADMIN_URL."/department.php?op=manageDepartments", 'manDept'); -$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_FILES, XHELP_ADMIN_URL."/file.php?op=manageFiles", 'manFiles'); -$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_STAFF, XHELP_ADMIN_URL."/staff.php?op=manageStaff", 'manStaff'); -$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_NOTIFICATIONS, XHELP_ADMIN_URL."/notifications.php", 'manNotify'); -$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_STATUSES, XHELP_ADMIN_URL."/status.php?op=manageStatus", 'manStatus'); -$oAdminButton->addButton(_AM_XHELP_TEXT_MANAGE_FIELDS, XHELP_ADMIN_URL.'/fields.php', 'manfields'); -$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_FAQ, "faqAdapter.php?op=manage", 'manFaqAdapters'); -$oAdminButton->addButton(_AM_XHELP_MENU_MIMETYPES, XHELP_ADMIN_URL."/mimetypes.php", 'mimetypes'); -$oAdminButton->addButton(_AM_XHELP_TEXT_MAIL_EVENTS, XHELP_ADMIN_URL."/index.php?op=mailEvents", 'mailEvents'); -$oAdminButton->AddTopLink(_AM_XHELP_MENU_PREFERENCES, XOOPS_URL ."/modules/system/admin.php?fct=preferences&op=showmod&mod=". $module_id); -//$oAdminButton->AddTopLink(_AM_XHELP_BLOCK_TEXT, XHELP_ADMIN_URL."/index.php?op=blocks"); -$oAdminButton->addTopLink(_AM_XHELP_UPDATE_MODULE, XOOPS_URL ."/modules/system/admin.php?fct=modulesadmin&op=update&module=xhelp"); -$oAdminButton->addTopLink(_MI_XHELP_MENU_CHECK_TABLES, XHELP_ADMIN_URL."/upgrade.php?op=checkTables"); -$oAdminButton->AddTopLink(_AM_XHELP_ADMIN_GOTOMODULE, XHELP_BASE_URL."/index.php"); -$oAdminButton->AddTopLink(_AM_XHELP_ADMIN_ABOUT, XHELP_ADMIN_URL."/index.php?op=about"); - -$myts = &MyTextSanitizer::getInstance(); - - -$imagearray = array( - 'editimg' => "<img src='". XHELP_IMAGE_URL ."/button_edit.png' alt='" . _AM_XHELP_ICO_EDIT . "' align='middle' />", - 'deleteimg' => "<img src='". XHELP_IMAGE_URL ."/button_delete.png' alt='" . _AM_XHELP_ICO_DELETE . "' align='middle' />", - 'online' => "<img src='". XHELP_IMAGE_URL ."/on.png' alt='" . _AM_XHELP_ICO_ONLINE . "' align='middle' />", - 'offline' => "<img src='". XHELP_IMAGE_URL ."/off.png' alt='" . _AM_XHELP_ICO_OFFLINE . "' align='middle' />", -); - -// Overdue time -require_once(XHELP_CLASS_PATH.'/session.php'); -$_xhelpSession = new Session(); - -if(!$overdueTime = $_xhelpSession->get("xhelp_overdueTime")){ - $_xhelpSession->set("xhelp_overdueTime", $xoopsModuleConfig['xhelp_overdueTime']); - $overdueTime = $_xhelpSession->get("xhelp_overdueTime"); -} - -if($overdueTime != $xoopsModuleConfig['xhelp_overdueTime']){ - $_xhelpSession->set("xhelp_overdueTime", $xoopsModuleConfig['xhelp_overdueTime']); // Set new value for overdueTime - - // Change overdueTime in all of tickets (OPEN & HOLD) - $hTickets =& xhelpGetHandler('ticket'); - $crit = new Criteria('status', 2, '<>'); - $tickets =& $hTickets->getObjects($crit); - $updatedTickets = array(); - foreach($tickets as $ticket){ - $ticket->setVar('overdueTime', $ticket->getVar('posted') + ($xoopsModuleConfig['xhelp_overdueTime'] *60*60)); - if(!$hTickets->insert($ticket, true)){ - $updatedTickets[$ticket->getVar('id')] = false; // Not used anywhere - } else { - $updatedTickets[$ticket->getVar('id')] = true; // Not used anywhere - } - } -} -?> \ No newline at end of file +<?php +/* + * 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 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package + * @since + * @author XOOPS Development Team + * @version $Id $ + */ + +$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'; + +if (!defined('XHELP_CONSTANTS_INCLUDED')) { + include_once(XOOPS_ROOT_PATH.'/modules/xhelp/include/constants.php'); +} + +require(XHELP_BASE_PATH.'/admin/admin_buttons.php'); +require_once(XHELP_BASE_PATH.'/functions.php'); +require_once(XHELP_INCLUDE_PATH.'/functions_admin.php'); +require_once(XHELP_INCLUDE_PATH.'/events.php'); +require_once(XHELP_CLASS_PATH.'/session.php'); + +include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + +xhelpIncludeLang('main'); +xhelpIncludeLang('modinfo'); + + +global $xoopsModule; +/* +$module_id = $xoopsModule->getVar('mid'); +$oAdminButton = new AdminButtons(); +$oAdminButton->AddTitle(sprintf(_AM_XHELP_ADMIN_TITLE, $xoopsModule->getVar('name'))); +$oAdminButton->AddButton(_AM_XHELP_INDEX, XHELP_ADMIN_URL."/index.php", 'index'); +$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_DEPARTMENTS, XHELP_ADMIN_URL."/department.php?op=manageDepartments", 'manDept'); +$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_FILES, XHELP_ADMIN_URL."/file.php?op=manageFiles", 'manFiles'); +$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_STAFF, XHELP_ADMIN_URL."/staff.php?op=manageStaff", 'manStaff'); +$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_NOTIFICATIONS, XHELP_ADMIN_URL."/notifications.php", 'manNotify'); +$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_STATUSES, XHELP_ADMIN_URL."/status.php?op=manageStatus", 'manStatus'); +$oAdminButton->addButton(_AM_XHELP_TEXT_MANAGE_FIELDS, XHELP_ADMIN_URL.'/fields.php', 'manfields'); +$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_FAQ, "faqAdapter.php?op=manage", 'manFaqAdapters'); +$oAdminButton->addButton(_AM_XHELP_MENU_MIMETYPES, XHELP_ADMIN_URL."/mimetypes.php", 'mimetypes'); +$oAdminButton->addButton(_AM_XHELP_TEXT_MAIL_EVENTS, XHELP_ADMIN_URL."/index.php?op=mailEvents", 'mailEvents'); +$oAdminButton->AddTopLink(_AM_XHELP_MENU_PREFERENCES, XOOPS_URL ."/modules/system/admin.php?fct=preferences&op=showmod&mod=". $module_id); +//$oAdminButton->AddTopLink(_AM_XHELP_BLOCK_TEXT, XHELP_ADMIN_URL."/index.php?op=blocks"); +$oAdminButton->addTopLink(_AM_XHELP_UPDATE_MODULE, XOOPS_URL ."/modules/system/admin.php?fct=modulesadmin&op=update&module=xhelp"); +$oAdminButton->addTopLink(_MI_XHELP_MENU_CHECK_TABLES, XHELP_ADMIN_URL."/upgrade.php?op=checkTables"); +$oAdminButton->AddTopLink(_AM_XHELP_ADMIN_GOTOMODULE, XHELP_BASE_URL."/index.php"); +$oAdminButton->AddTopLink(_AM_XHELP_ADMIN_ABOUT, XHELP_ADMIN_URL."/index.php?op=about"); +*/ +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); + +//if functions.php file exist +//require_once dirname(dirname(__FILE__)) . '/include/functions.php'; + +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); +$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +$imagearray = array( + 'editimg' => "<img src='". XHELP_IMAGE_URL ."/button_edit.png' alt='" . _AM_XHELP_ICO_EDIT . "' align='middle' />", + 'deleteimg' => "<img src='". XHELP_IMAGE_URL ."/button_delete.png' alt='" . _AM_XHELP_ICO_DELETE . "' align='middle' />", + 'online' => "<img src='". XHELP_IMAGE_URL ."/on.png' alt='" . _AM_XHELP_ICO_ONLINE . "' align='middle' />", + 'offline' => "<img src='". XHELP_IMAGE_URL ."/off.png' alt='" . _AM_XHELP_ICO_OFFLINE . "' align='middle' />", +); + +// Overdue time +require_once(XHELP_CLASS_PATH.'/session.php'); +$_xhelpSession = new Session(); + +if(!$overdueTime = $_xhelpSession->get("xhelp_overdueTime")){ + $_xhelpSession->set("xhelp_overdueTime", $xoopsModuleConfig['xhelp_overdueTime']); + $overdueTime = $_xhelpSession->get("xhelp_overdueTime"); +} + +if($overdueTime != $xoopsModuleConfig['xhelp_overdueTime']){ + $_xhelpSession->set("xhelp_overdueTime", $xoopsModuleConfig['xhelp_overdueTime']); // Set new value for overdueTime + + // Change overdueTime in all of tickets (OPEN & HOLD) + $hTickets =& xhelpGetHandler('ticket'); + $crit = new Criteria('status', 2, '<>'); + $tickets =& $hTickets->getObjects($crit); + $updatedTickets = array(); + foreach($tickets as $ticket){ + $ticket->setVar('overdueTime', $ticket->getVar('posted') + ($xoopsModuleConfig['xhelp_overdueTime'] *60*60)); + if(!$hTickets->insert($ticket, true)){ + $updatedTickets[$ticket->getVar('id')] = false; // Not used anywhere + } else { + $updatedTickets[$ticket->getVar('id')] = true; // Not used anywhere + } + } +} + + +include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); \ No newline at end of file Added: XoopsModules/xhelp/trunk/xhelp/admin/admin_header2.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/admin_header2.php (rev 0) +++ XoopsModules/xhelp/trunk/xhelp/admin/admin_header2.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -0,0 +1,77 @@ +<?php +if (!defined('XHELP_CONSTANTS_INCLUDED')) { + include_once(XOOPS_ROOT_PATH.'/modules/xhelp/include/constants.php'); +} + +require(XHELP_BASE_PATH.'/admin/admin_buttons.php'); +require_once(XHELP_BASE_PATH.'/functions.php'); +require_once(XHELP_INCLUDE_PATH.'/functions_admin.php'); +require_once(XHELP_INCLUDE_PATH.'/events.php'); +require_once(XHELP_CLASS_PATH.'/session.php'); + +include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + +xhelpIncludeLang('main'); +xhelpIncludeLang('modinfo'); + + +global $xoopsModule; +$module_id = $xoopsModule->getVar('mid'); +$oAdminButton = new AdminButtons(); +$oAdminButton->AddTitle(sprintf(_AM_XHELP_ADMIN_TITLE, $xoopsModule->getVar('name'))); +$oAdminButton->AddButton(_AM_XHELP_INDEX, XHELP_ADMIN_URL."/index.php", 'index'); +$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_DEPARTMENTS, XHELP_ADMIN_URL."/department.php?op=manageDepartments", 'manDept'); +$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_FILES, XHELP_ADMIN_URL."/file.php?op=manageFiles", 'manFiles'); +$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_STAFF, XHELP_ADMIN_URL."/staff.php?op=manageStaff", 'manStaff'); +$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_NOTIFICATIONS, XHELP_ADMIN_URL."/notifications.php", 'manNotify'); +$oAdminButton->AddButton(_AM_XHELP_TEXT_MANAGE_STATUSES, XHELP_ADMIN_URL."/status.php?op=manageStatus", 'manStatus'); +$oAdminButton->addButton(_AM_XHELP_TEXT_MANAGE_FIELDS, XHELP_ADMIN_URL.'/fields.php', 'manfields'); +$oAdminButton->AddButton(_AM_XHELP_MENU_MANAGE_FAQ, "faqAdapter.php?op=manage", 'manFaqAdapters'); +$oAdminButton->addButton(_AM_XHELP_MENU_MIMETYPES, XHELP_ADMIN_URL."/mimetypes.php", 'mimetypes'); +$oAdminButton->addButton(_AM_XHELP_TEXT_MAIL_EVENTS, XHELP_ADMIN_URL."/index.php?op=mailEvents", 'mailEvents'); +$oAdminButton->AddTopLink(_AM_XHELP_MENU_PREFERENCES, XOOPS_URL ."/modules/system/admin.php?fct=preferences&op=showmod&mod=". $module_id); +//$oAdminButton->AddTopLink(_AM_XHELP_BLOCK_TEXT, XHELP_ADMIN_URL."/index.php?op=blocks"); +$oAdminButton->addTopLink(_AM_XHELP_UPDATE_MODULE, XOOPS_URL ."/modules/system/admin.php?fct=modulesadmin&op=update&module=xhelp"); +$oAdminButton->addTopLink(_MI_XHELP_MENU_CHECK_TABLES, XHELP_ADMIN_URL."/upgrade.php?op=checkTables"); +$oAdminButton->AddTopLink(_AM_XHELP_ADMIN_GOTOMODULE, XHELP_BASE_URL."/index.php"); +$oAdminButton->AddTopLink(_AM_XHELP_ADMIN_ABOUT, XHELP_ADMIN_URL."/index.php?op=about"); + +$myts = &MyTextSanitizer::getInstance(); + + +$imagearray = array( + 'editimg' => "<img src='". XHELP_IMAGE_URL ."/button_edit.png' alt='" . _AM_XHELP_ICO_EDIT . "' align='middle' />", + 'deleteimg' => "<img src='". XHELP_IMAGE_URL ."/button_delete.png' alt='" . _AM_XHELP_ICO_DELETE . "' align='middle' />", + 'online' => "<img src='". XHELP_IMAGE_URL ."/on.png' alt='" . _AM_XHELP_ICO_ONLINE . "' align='middle' />", + 'offline' => "<img src='". XHELP_IMAGE_URL ."/off.png' alt='" . _AM_XHELP_ICO_OFFLINE . "' align='middle' />", +); + +// Overdue time +require_once(XHELP_CLASS_PATH.'/session.php'); +$_xhelpSession = new Session(); + +if(!$overdueTime = $_xhelpSession->get("xhelp_overdueTime")){ + $_xhelpSession->set("xhelp_overdueTime", $xoopsModuleConfig['xhelp_overdueTime']); + $overdueTime = $_xhelpSession->get("xhelp_overdueTime"); +} + +if($overdueTime != $xoopsModuleConfig['xhelp_overdueTime']){ + $_xhelpSession->set("xhelp_overdueTime", $xoopsModuleConfig['xhelp_overdueTime']); // Set new value for overdueTime + + // Change overdueTime in all of tickets (OPEN & HOLD) + $hTickets =& xhelpGetHandler('ticket'); + $crit = new Criteria('status', 2, '<>'); + $tickets =& $hTickets->getObjects($crit); + $updatedTickets = array(); + foreach($tickets as $ticket){ + $ticket->setVar('overdueTime', $ticket->getVar('posted') + ($xoopsModuleConfig['xhelp_overdueTime'] *60*60)); + if(!$hTickets->insert($ticket, true)){ + $updatedTickets[$ticket->getVar('id')] = false; // Not used anywhere + } else { + $updatedTickets[$ticket->getVar('id')] = true; // Not used anywhere + } + } +} +?> \ No newline at end of file Modified: XoopsModules/xhelp/trunk/xhelp/admin/delete.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/delete.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/delete.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -16,7 +16,7 @@ if (!isset($_POST['ok'])) { xoops_cp_header(); - echo $oAdminButton->renderButtons('manDept'); + //echo $oAdminButton->renderButtons('manDept'); xoops_confirm(array('deleteDept' => 1, 'deptid' => $deptID, 'ok' => 1), XHELP_BASE_URL .'/admin/delete.php', sprintf(_AM_XHELP_MSG_DEPT_DEL_CFRM, $deptID)); xoops_cp_footer(); } else { @@ -67,7 +67,7 @@ if (!isset($_POST['ok'])) { xoops_cp_header(); - echo $oAdminButton->renderButtons('manDept'); + //echo $oAdminButton->renderButtons('manDept'); xoops_confirm(array('deleteStaff' => 1, 'uid' => $staffid, 'ok' => 1), XHELP_BASE_URL .'/admin/delete.php', sprintf(_AM_XHELP_MSG_STAFF_DEL_CFRM, $staffid)); xoops_cp_footer(); } else { Modified: XoopsModules/xhelp/trunk/xhelp/admin/department.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/department.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/department.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -143,7 +143,7 @@ } function DeleteDepartmentServer() { - global $oAdminButton; + if(isset($_REQUEST['id'])){ $emailID = intval($_REQUEST['id']); } else { @@ -155,7 +155,10 @@ if (!isset($_POST['ok'])) { xoops_cp_header(); - echo $oAdminButton->renderButtons('manDept'); + //echo $oAdminButton->renderButtons('manDept'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('department.php'); + xoops_confirm(array('op' => 'DeleteDepartmentServer', 'id' => $emailID, 'ok' => 1), XHELP_BASE_URL .'/admin/department.php', sprintf(_AM_XHELP_MSG_DEPT_MBOX_DEL_CFRM, $server->getVar('emailaddress'))); xoops_cp_footer(); } else { @@ -202,7 +205,7 @@ function editDepartment() { $_xhelpSession = Session::singleton(); - global $imagearray, $xoopsModule, $oAdminButton, $limit, $start, $xoopsModuleConfig; + global $imagearray, $xoopsModule, $limit, $start, $xoopsModuleConfig; $module_id = $xoopsModule->getVar('mid'); $displayName =& $xoopsModuleConfig['xhelp_displayName']; // Determines if username or real name is displayed @@ -304,7 +307,7 @@ } else { xoops_cp_header(); - echo $oAdminButton->renderButtons('manDept'); + //echo $oAdminButton->renderButtons('manDept'); $dept =& $hDepartments->get($deptID); @@ -317,6 +320,9 @@ xhelpRenderErrors($sess_errors, xhelpMakeURI(XHELP_ADMIN_URL.'/department.php', array('op'=>'clearEditSession', 'deptid'=>$deptID))); } + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('department.php?op=editDepartment'); + // Get list of groups with permission $crit = new CriteriaCompo(new Criteria('gperm_modid', $module_id)); $crit->add(new Criteria('gperm_itemid', $deptID)); @@ -555,8 +561,7 @@ //--> </script>"; - xhelpAdminFooter(); - xoops_cp_footer(); +include_once "admin_footer.php"; } } @@ -586,9 +591,10 @@ redirect_header(XHELP_ADMIN_URL."/department.php?op=editDepartment&deptid=".$deptServer->getVar('departmentid'),3); } } else { - global $oAdminButton; xoops_cp_header(); - echo $oAdminButton->renderButtons('manDept'); + //echo $oAdminButton->renderButtons('manDept'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('department.php'); echo '<script type="text/javascript" src="'.XOOPS_URL.'/modules/xhelp/include/functions.js"></script>'; echo "<form method='post' id='edit_server' action='department.php?op=EditDepartmentServer&id=".$id."'> <table width='100%' cellspacing='1' class='outer'> @@ -680,19 +686,19 @@ //--> </script>"; - xhelpAdminFooter(); - xoops_cp_footer(); +include_once "admin_footer.php"; } } function manageDepartments() { - global $xoopsModule, $oAdminButton, $aSortBy, $aOrderBy, $aLimitBy, $order, $limit, $start, $sort, $dept_search; + global $xoopsModule, $aSortBy, $aOrderBy, $aLimitBy, $order, $limit, $start, $sort, $dept_search; $module_id = $xoopsModule->getVar('mid'); $hGroups =& xoops_gethandler('group'); $hGroupPerm =& xoops_gethandler('groupperm'); + if(isset($_POST['addDept'])){ $hasErrors = false; $errors = array(); @@ -814,7 +820,9 @@ asort($aGroups); // Set groups in alphabetical order xoops_cp_header(); - echo $oAdminButton->renderButtons('manDept'); + //echo $oAdminButton->renderButtons('manDept'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('department.php?op=manageDepartments'); $session =& Session::singleton(); $sess_dept = $session->get('xhelp_addDepartment'); @@ -908,8 +916,7 @@ } echo "</td></tr></table>"; echo "<div id='dept_nav'>".$nav->renderNav()."</div>"; - xhelpAdminFooter(); - xoops_cp_footer(); +include_once "admin_footer.php"; } } Modified: XoopsModules/xhelp/trunk/xhelp/admin/faqAdapter.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/faqAdapter.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/faqAdapter.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -28,12 +28,15 @@ function manage() { - global $oAdminButton, $imagearray; + global $imagearray; $faqAdapters =& xhelpFaqAdapterFactory::installedAdapters(); $myAdapter =& xhelpFaqAdapterFactory::getFaqAdapter(); xoops_cp_header(); - echo $oAdminButton->renderButtons('manFaqAdapters'); + //echo $oAdminButton->renderButtons('manFaqAdapters'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('faqAdapter.php'); + echo "<form method='post' action='".XHELP_ADMIN_URL."/faqAdapter.php?op=updateActive'>"; echo "<table width='100%' cellspacing='1' class='outer'>"; @@ -80,8 +83,7 @@ $faq = $myAdapter->createFaq(); } - xhelpAdminFooter(); - xoops_cp_footer(); +include_once "admin_footer.php"; } function updateActive() Modified: XoopsModules/xhelp/trunk/xhelp/admin/fields.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/fields.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/fields.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -50,7 +50,7 @@ function manageFields() { - global $oAdminButton, $imagearray; + global $imagearray; $session =& Session::singleton(); $regex_array =& _getRegexArray(); @@ -82,7 +82,9 @@ //Display List of Current Fields, form for new field xoops_cp_header(); - echo $oAdminButton->renderButtons('manfields'); + //echo $oAdminButton->renderButtons('manfields'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('fields.php'); if ($count) { $nav = new XoopsPageNav($count, $limit, $start, 'start', "op=manageFields&limit=$limit"); @@ -261,8 +263,7 @@ $form->addElement($btn_tray); echo $form->render(); - xhelpAdminFooter(); - xoops_cp_footer(); +include_once "admin_footer.php"; } else { //Validate Field Information @@ -441,7 +442,7 @@ function deleteField() { - global $_eventsrv, $oAdminButton; + global $_eventsrv ; if (!isset( $_REQUEST['id'])) { redirect_header(xhelpMakeURI(XHELP_ADMIN_URL.'/fields.php', array('op'=> 'manageDepartments'), false), 3, _AM_XHELP_MESSAGE_NO_FIELD); } @@ -450,7 +451,10 @@ if (!isset($_POST['ok'])) { xoops_cp_header(); - echo $oAdminButton->renderButtons('manfields'); + //echo $oAdminButton->renderButtons('manfields'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('fields.php'); + xoops_confirm(array('op' => 'delfield', 'id' => $id, 'ok' => 1), XHELP_ADMIN_URL .'/fields.php', sprintf(_AM_XHELP_MSG_FIELD_DEL_CFRM, $id)); xoops_cp_footer(); } else { @@ -469,8 +473,6 @@ function editField() { - global $oAdminButton; - $eventsrv =& xhelpNewEventService(); $session =& Session::singleton(); $regex_array =& _getRegexArray(); @@ -524,7 +526,10 @@ //Display Field modification xoops_cp_header(); - echo $oAdminButton->renderButtons('manfields'); + //echo $oAdminButton->renderButtons('manfields'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('fields.php'); + //Edit Field Form $controls = xhelpGetControlArray(); @@ -608,8 +613,7 @@ $form->addElement($btn_tray); echo $form->render(); - xhelpAdminFooter(); - xoops_cp_footer(); + include_once "admin_footer.php"; } else { //Validate Field Information $has_errors = false; Modified: XoopsModules/xhelp/trunk/xhelp/admin/file.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/file.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/file.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -83,11 +83,13 @@ function deleteResolved() { - global $oAdminButton; if(!isset($_POST['ok'])){ xoops_cp_header(); - echo $oAdminButton->renderButtons('manFiles'); + //echo $oAdminButton->renderButtons('manFiles'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('file.php'); + xoops_confirm(array('op' => 'deleteResolved', 'ok' => 1), XHELP_BASE_URL .'/admin/file.php', _AM_XHELP_MSG_DELETE_RESOLVED); xoops_cp_footer(); } else { @@ -116,7 +118,7 @@ function manageFiles() { - global $oAdminButton, $aSortBy, $aOrderBy, $aLimitBy, $order, $limit, $start, $sort; + global $aSortBy, $aOrderBy, $aLimitBy, $order, $limit, $start, $sort; $xhelpUploadDir = XHELP_UPLOAD_PATH; $dir_status =& xhelp_admin_getPathStatus($xhelpUploadDir, true); @@ -136,7 +138,10 @@ redirect_header(XHELP_ADMIN_URL."/file.php?op=manageFiles", 3, _XHELP_MESSAGE_DELETE_FILE_ERR); } xoops_cp_header(); - echo $oAdminButton->renderButtons('manFiles'); + //echo $oAdminButton->renderButtons('manFiles'); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('file.php?op=manageFiles'); + echo '<script type="text/javascript" src="'.XOOPS_URL.'/modules/xhelp/include/functions.js"></script>'; echo "<form method='post' action='".XHELP_ADMIN_URL."/file.php?op=manageFiles'>"; @@ -241,8 +246,7 @@ } - xhelpAdminFooter(); - xoops_cp_footer(); +include_once "admin_footer.php"; } Modified: XoopsModules/xhelp/trunk/xhelp/admin/index.php =================================================================== --- XoopsModules/xhelp/trunk/xhelp/admin/index.php 2012-08-01 03:07:04 UTC (rev 9971) +++ XoopsModules/xhelp/trunk/xhelp/admin/index.php 2012-08-01 03:11:30 UTC (rev 9972) @@ -1,452 +1,32 @@ -<?php -//$Id: index.php,v 1.144 2005/11/29 17:48:12 ackbarr Exp $ -include('../../../include/cp_header.php'); -include_once('admin_header.php'); -include_once(XOOPS_ROOT_PATH . '/class/pagenav.php'); -define('MAX_STAFF_RESPONSETIME', 5); -define('MAX_STAFF_CALLSCLOSED', 5); - -global $HTTP_GET_VARS, $xoopsModule; -$module_id = $xoopsModule->getVar('mid'); - -$op = 'default'; - -if ( isset( $_REQUEST['op'] ) ) -{ - $op = $_REQUEST['op']; -} - -switch ( $op ) -{ - case "about": - about(); - break; - - case "mailEvents": - mailEvents(); - break; - - case "searchMailEvents": - searchMailEvents(); - break; - - case "blocks": - require 'myblocksadmin.php'; - break; - - case "createdir": - createdir(); - break; - - case "setperm": - setperm(); - break; - - case "manageFields": - manageFields(); - break; - - default: - xhelp_default(); - break; -} - -function modifyTicketFields() -{ - //xoops_cp_header(); - //echo "not created yet"; - xoops_cp_footer(); -} - -function displayEvents($mailEvents, $mailboxes) -{ - echo "<table width='100%' cellspacing='1' class='outer'>"; - if(count($mailEvents) > 0){ - echo "<tr><th colspan='4'>"._AM_XHELP_TEXT_MAIL_EVENTS."</th></tr>"; - echo "<tr class='head'><td>"._AM_XHELP_TEXT_MAILBOX."</td> - <td>"._AM_XHELP_TEXT_EVENT_CLASS."</td> - <td>"._AM_XHELP_TEXT_DESCRIPTION."</td> - <td>"._AM_XHELP_TEXT_TIME."</td> - </tr>"; - - $class = 'odd'; - foreach($mailEvents as $event){ - echo "<tr class='". $class ."'><td>".$mailboxes[$event->getVar('mbox_id')]->getVar('emailaddress')."</td> - <td>".xhelpGetEventClass($event->getVar('event_class'))."</td> - <td>".$event->getVar('event_desc')."</td> - <td>".$event->posted()."</td> - </tr>"; - $class = ($class == 'odd') ? 'even' : 'odd'; - } - - } else { - echo "<tr><th>"._AM_XHELP_TEXT_MAIL_EVENTS."</th></tr>"; - echo "<tr><td class='odd'>"._AM_XHELP_NO_EVENTS."</td></tr>"; - } - echo "</table><br />"; - echo "<a href='index.php?op=searchMailEvents'>"._AM_XHELP_SEARCH_EVENTS."</a>"; -} - - -function mailEvents() -{ - global $oAdminButton; - // Will display the last 50 mail events - $hMailEvent =& xhelpGetHandler('mailEvent'); - $hDeptMbox =& xhelpGetHandler('departmentMailBox'); - $mailboxes =& $hDeptMbox->getObjects(null, true); - - $crit = new Criteria('', ''); - $crit->setLimit(50); - $crit->setOrder('DESC'); - $crit->setSort('posted'); - $mailEvents =& $hMailEvent->getObjects($crit); - - xoops_cp_header(); - echo $oAdminButton->renderButtons('mailEvents'); - - displayEvents($mailEvents, $mailboxes); - - xhelpAdminFooter(); - xoops_cp_footer(); -} - -function searchMailEvents() -{ - global $oAdminButton; - xoops_cp_header(); - echo $oAdminButton->renderButtons('mailEvents'); - - if(!isset($_POST['searchEvents'])){ - - $stylePath = include_once XHELP_INCLUDE_PATH.'/calendar/calendarjs.php'; - echo '<link rel="stylesheet" type="text/css" media="all" href="'.$stylePath.'" /><!--[if gte IE 5.5000]><script src="iepngfix.js" language="JavaScript" type="text/javascript"></script><![endif]-->'; - - echo "<form method='post' action='".XHELP_ADMIN_URL."/index.php?op=searchMailEvents'>"; - - echo "<table width='100%' cellspacing='1' class='outer'>"; - echo "<tr><th colspan='2'>"._AM_XHELP_SEARCH_EVENTS."</th></tr>"; - echo "<tr><td width='20%' class='head'>"._AM_XHELP_TEXT_MAILBOX."</td> - <td class='even'><input type='text' size='55' name='email' class='formButton'></td></tr>"; - echo "<tr><td class='head'>"._AM_XHELP_TEXT_DESCRIPTION."</td> - <td class='even'><input type='text' size='55' name='description' class='formButton'></td></tr>"; - echo "<tr><td class='head'>"._AM_XHELP_SEARCH_BEGINEGINDATE."</td> - <td class='even'><input type='text' name='begin_date' id='begin_date' size='10' maxlength='10' value='".formatTimestamp(time(), 'mysql')."' /> - <a href='' onclick='return showCalendar(\"begin_date\");'><img src='".XHELP_IMAGE_URL."/calendar.png' alt='Calendar image' name='calendar' style='vertical-align:bottom;border:0;background:transparent' /></a> "; - xhelpDrawHourSelect("begin_hour", 12); - xhelpDrawMinuteSelect("begin_minute"); - xhelpDrawModeSelect("begin_mode"); - echo "<tr><td class='head'>"._AM_XHELP_SEARCH_ENDDATE."</td> - <td class='even'><input type='text' name='end_date' id='end_date' size='10' maxlength='10' value='".formatTimestamp(time(), 'mysql')."' /> - <a href='' onclick='return showCalendar(\"end_date\");'><img src='".XHELP_IMAGE_URL."/calendar.png' alt='Calendar image' name='calendar' style='vertical-align:bottom;border:0;background:transparent' /></a> "; - xhelpDrawHourSelect("end_hour", 12); - xhelpDrawMinuteSelect("end_minute"); - xhelpDrawModeSelect("end_mode"); - echo "<tr><td class='foot' colspan='2'><input type='submit' name='searchEvents' value='"._AM_XHELP_BUTTON_SEARCH."' /></td></tr>"; - echo "</table>"; - echo "</form>"; - - xhelpAdminFooter(); - xoops_cp_footer(); - } else { - $hMailEvent =& xhelpGetHandler('mailEvent'); - $hDeptMbox =& xhelpGetHandler('departmentMailBox'); - $mailboxes =& $hDeptMbox->getObjects(null, true); - - $begin_date = explode( '-', $_POST['begin_date']); - $end_date = explode('-', $_POST['end_date']); - $begin_hour = xhelpChangeHour($_POST['begin_mode'], $_POST['begin_hour']); - $end_hour = xhelpChangeHour($_POST['end_mode'], $_POST['end_hour']); - - // Get timestamps to search by - $begin_time = mktime($begin_hour, $_POST['begin_minute'], 0, $begin_date[1], $begin_date[2], $begin_date[0]); - $end_time = mktime($end_hour, $_POST['end_minute'], 0, $end_date[1], $end_date[2], $end_date[0]); - - $crit = new CriteriaCompo(new Criteria('posted', $begin_time, '>=')); - $crit->add(new Criteria('posted', $end_time, '<=')); - if($_POST['email'] != ''){ - $email = $_POST['email']; - $crit->add(new Criteria('emailaddress', "%$email%", "LIKE", "d")); - } - if($_POST['description'] != ''){ - $description = $_POST['description']; - $crit->add(new Criteria('event_desc', "%$description%", "LIKE")); - } - $crit->setOrder('DESC'); - $crit->setSort('posted'); - if(isset($email)){ - $mailEvents =& $hMailEvent->getObjectsJoin($crit); - } else { - $mailEvents =& $hMailEvent->getObjects($crit); - } - - displayEvents($mailEvents, $mailboxes); - - xhelpAdminFooter(); - xoops_cp_footer(); - } -} - -/** - * changes hour to am/pm - * - * @param int $mode, 1-am, 2-pm - * @param int $hour hour of the day - * - * @return hour in 24 hour mode - */ -function xhelpChangeHour($mode, $hour) -{ - $mode = intval($mode); - $hour = intval($hour); - - if($mode == 2){ - $hour = $hour + 12; - return $hour; - } - return $hour; -} - -function xhelpDrawHourSelect($name, $lSelect="-1") -{ - echo "<select name='".$name."'>"; - for($i = 1; $i <= 12; $i++){ - if($lSelect == $i){ - $selected = "selected='selected'"; - } else { - $selected = ''; - } - echo "<option value='".$i."'".$selected.">".$i."</option>"; - } - echo "</select>"; -} - -function xhelpDrawMinuteSelect($name) -{ - $lSum = 0; - - echo "<select name='".$name."'>"; - for($i = 0; $lSum <= 50; $i++){ - if($i == 0){ - echo "<option value='00' selected='selected'>00</option>"; - } else { - $lSum = $lSum + 5; - echo "<option value='".$lSum."'>".$lSum."</option>"; - } - } - echo "</select>"; -} - -function xhelpDrawModeSelect($name, $sSelect='AM') -{ - echo "<select name='".$name."'>"; - if($sSelect == 'AM'){ - echo "<option value='1' selected='selected'>AM</option>"; - echo "<option value='2'>PM</option>"; - } else { - echo "<option value='1'>AM</option>"; - echo "<option value='2' selected='selected'>PM</option>"; - } -} - -function xhelp_default() -{ - global $xoopsModuleConfig, $oAdminButton; - xoops_cp_header(); - echo $oAdminButton->renderButtons('index'); - $displayName =& $xoopsModuleConfig['xhelp_displayName']; // Determines if username or real name is displayed - - $stylePath = XHELP_BASE_URL.'/styles/xhelp.css'; - echo '<link rel="stylesheet" type="text/css" media="all" href="'.$stylePath.'" /><!--[if gte IE 5.5000]><script src="iepngfix.js" language="JavaScript" type="text/javascript"></script><![endif]-->'; - - global $xoopsUser, $xoopsDB; - $hTickets =& xhelpGetHandler('ticket'); - $hStatus =& xhelpGetHandler('status'); - - $crit = new Criteria('', ''); - $crit->setSort('description'); - $crit->setOrder('ASC'); - $statuses =& $hStatus->getObjects($crit); - $table_class = array('odd', 'even'); - echo "<table border='0' width='100%'>"; - echo "<tr><td width='50%' valign='top'>"; - echo "<div id='ticketInfo'>"; - echo "<table border='0' width='95%' cellspacing='1' class='outer'> - <tr><th colspan='2'>". _AM_XHELP_TEXT_TICKET_INFO ."</th></tr>"; - $class = "odd"; - $totalTickets = 0; - foreach($statuses as $status){ - $crit = new Criteria('status', $status->getVar('id')); - $numTickets =& $hTickets->getCount($crit); - $totalTickets += $numTickets; - - - echo "<tr class='".$class."'><td>".$status->getVar('description')."</td><td>".$numTickets."</td></tr>"; - if($class == "odd"){ - $class = "even"; - } else { - ... [truncated message content] |